Commit Graph

11615 Commits

Author SHA1 Message Date
tobtoht 1062b172b6
wallet: sign_tx: get tx pubkey from extra 2023-11-02 15:19:05 +01:00
jeffro256 23179a0ba4
wallet: fix multisig key memory leak
Multisig keys per-transfer were being wiped, but not erased, which lead to a ginormous
quadratic bloat the more transfers and exports you performed with the wallet.
2023-11-02 02:58:50 -05:00
jeffro256 504269e6cf
unit tests: fix running from pwd and auto test selected location 2023-10-28 03:14:05 -05:00
selsta 5443240aa6
core_tests: fix gcc7 compilation 2023-10-28 04:26:27 +02:00
selsta b4491c1072
cmake: set -fno-aligned-allocation on macOS ARM
We set a deployment target that is lower than 10.14, which means
we have to disable aligned allocation otherwise compilation fails.
2023-10-26 04:02:27 +02:00
selsta df9f380671
cmake: set BOOST_NO_AUTO_PTR to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta 5136974da9
device: boost -> std locks to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta 5965b02aef
cmake: set cpp17 standard 2023-10-26 04:02:25 +02:00
luigi1111 053ba2cf07
Merge pull request #9026
9dc10bb Update RandomX to 1.2.1 (tevador)
2023-10-25 21:40:59 -04:00
luigi1111 5dbe2d0407
Merge pull request #9017
fe4a34e depends: zeromq: update to 4.3.5 (tobtoht)
2023-10-25 21:39:47 -04:00
luigi1111 40af6848f2
Merge pull request #9007
c8e4de1 depends: remove kernel version from darwin triplet (tobtoht)
2023-10-25 21:39:24 -04:00
luigi1111 b91ed92fa4
Merge pull request #9003
b9f1e37 depends: unwind: do not build for linux hosts (tobtoht)
2023-10-25 21:38:57 -04:00
luigi1111 e946315627
Merge pull request #9002
932bba3 depends: remove libiconv: unused (tobtoht)
2023-10-25 21:38:32 -04:00
luigi1111 10f208fbc5
Merge pull request #8989
9b231c9 add account_generators for mapping public EC generators to account keys (koe)
2023-10-25 21:37:37 -04:00
luigi1111 a1a40d67d2
Merge pull request #8987
1025e4f unit_test: set data dir relative to exe & add log-level arg (jeff)
2023-10-25 21:37:09 -04:00
luigi1111 fc4397010d
Merge pull request #8974
759293d wallet2: fix version check at hf version 1 (j-berman)
2023-10-25 21:36:36 -04:00
luigi1111 829c8f0ff9
Merge pull request #8972
f70d65c ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd (teknosquet)
2023-10-25 21:36:09 -04:00
luigi1111 e3d0154b5b
Merge pull request #8969
8190f25 KV_SERIALIZE: remove extraneous semicolons in DSL (jeffro256)
2023-10-25 21:35:43 -04:00
luigi1111 f10ed50431
Merge pull request #8967
eba9011 README: remove obsolete forum (maogo)
2023-10-25 21:35:17 -04:00
luigi1111 faffe09bdb
Merge pull request #8966
f71e2dc multisig: better errors for small malformed kex msgs (jeffro256)
2023-10-25 21:34:57 -04:00
luigi1111 1d3eba161f
Merge pull request #8963
294366f depends: openssl: update to 3.0.11 (tobtoht)
2023-10-25 21:34:36 -04:00
luigi1111 d5da693866
Merge pull request #8958
b0bf49a blockchain_db: add k-anonymity to txid fetching (jeffro256)
2023-10-25 21:34:06 -04:00
luigi1111 cf474d55f6
Merge pull request #8933
ebb7671 depends: use macOS 11 SDK with libc++ headers (tobtoht)
2023-10-25 21:31:40 -04:00
luigi1111 8f0343df16
Merge pull request #8752
c444a7e trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests (Dusan Klinec)
056c996 fix chaingen tests (Dusan Klinec)
2023-10-25 21:30:49 -04:00
jeffro256 e191083bed
epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
tobtoht ebb7671e0e
depends: use macOS 11 SDK with libc++ headers 2023-10-24 19:56:11 +02:00
jeffro256 05231400ce
ringct: make `rctSigBase` serialization follow strict aliasing rule
Accessing an object of type `char` thru an lvalue of type `crypto::hash8` is undefined behavior.
https://developers.redhat.com/blog/2020/06/03/the-joys-and-perils-of-aliasing-in-c-and-c-part-2
2023-10-23 16:28:02 -05:00
jeffro256 56dab0fad2
cryptonote_config: include cstdint
Header was using `uint64_t` without including `<cstdint>` which caused some issues downstream for windows builds
2023-10-22 18:02:54 -05:00
jeffro256 30cf537bcc
unit tests: wallet_storage: generate in "Ascii" format test 2023-10-21 18:37:12 -05:00
selsta 9ea325777f
gitian: add riscv64 support 2023-10-21 16:02:55 +02:00
tevador 9dc10bb223 Update RandomX to 1.2.1 2023-10-20 20:46:36 +02:00
jeffro256 b2eb47d875
wallet: mitigate statistical dependence for decoy selection within rings
Since we are required to check for uniqueness of decoy picks within any given
ring, and since some decoy picks may fail due to unlock time or malformed EC points,
the wallet2 decoy selection code was building up a larger than needed *unique* set of
decoys for each ring according to a certain distribution *without replacement*. After
filtering out the outputs that it couldn't use, it chooses from the remaining decoys
uniformly random *without replacement*.

The problem with this is that the picks later in the picking process are not independent
from the picks earlier in the picking process, and the later picks do not follow the
intended decoy distribution as closely as the earlier picks. To understand this
intuitively, imagine that you have 1023 marbles. You label 512 marbles with the letter A,
label 256 with the letter B, so on and so forth, finally labelling one marble with the
letter J. You put them all into a bag, shake it well, and pick 8 marbles from the bag,
but everytime you pick a marble of a certain letter, you remove all the other marbles
from that bag with the same letter. That very first pick, the odds of picking a certain
marble are exactly how you would expect: you are twice as likely to pick A as you are B,
twice as likely to pick B as you are C, etc. However, on the second pick, the odds of
getting the first pick are 0%, and the chances for everything else is higher. As you go
down the line, your picked marbles will have letters that are increasingly more unlikely
to pick if you hadn't remove the other marbles. In other words, the distribution of the
later marbles will be more "skewed" in comparison to your original distribution of marbles.

In Monero's decoy selection, this same statistical effect applies. It is not as dramatic
since the distribution is not so steep, and we have more unique values to choose from,
but the effect *is* measureable. Because of the protocol rules, we cannot have duplicate
ring members, so unless that restriction is removed, we will never have perfectly
independent picking. However, since the earlier picks are less affected by this
statistical effect, the workaround that this commit offers is to store the order that
the outputs were picked and commit to this order after fetching output information over RPC.
2023-10-17 00:53:40 -05:00
jeff 80b5bf8b3d
gcc: fix uninitialized constructor warnings 2023-10-16 16:48:27 -05:00
tobtoht fe4a34ebb2
depends: zeromq: update to 4.3.5 2023-10-10 00:08:44 +02:00
luigi1111 67d190ce7c
Merge pull request #9013
bb33daa add a test for the long term weight cache (Boog900)
65839b5 Fix: long term block weight cache The long term block weight cache was doing a wrong calculation when adding a new block to the cache. (Boog900)
2023-10-02 15:27:39 -04:00
Boog900 bb33daab1b
add a test for the long term weight cache 2023-10-02 01:38:10 +01:00
Boog900 65839b5ac1
Fix: long term block weight cache
The long term block weight cache was doing a wrong calculation when
adding a new block to the cache.
2023-10-01 13:40:06 +01:00
luigi1111 f29a3d45f3
Merge pull request #9000
9636375 storages: change error log category to serialization (selsta)
2023-09-30 14:45:06 -04:00
luigi1111 6d37eb0a01
Merge pull request #8998
9f981ac wallet: store watch-only wallet correctly when change_password() is called (jeff)
2023-09-30 14:43:40 -04:00
Dusan Klinec c444a7e002
trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests
- passphrase logic: remove backward compatibility for 2.4.3, code cleanup.
- fix LibUSB cmake for static builds on OSX
- tests: all tests now work with passphrase logic enabled. Passphrase test added with different passphrase. no_passphrase test added, Trezor pin test added. Testing wallet opening with correct and incorrect passphrase. Trezor test chain revamp, cleanup. Smaller chain, chain file versioning added.
- tests: Trezor tests support TEST_MINING_ENABLED, TEST_MINING_TIMEOUT env vars to change mining-related tests behaviour.
- requires protobuf@21 on osx for now (c++14), building with unlinked protobuf: `CMAKE_PREFIX_PATH=$(find /opt/homebrew/Cellar/protobuf@21 -maxdepth 1 -type d -name "21.*" -print -quit) \
make debug-test-trezor -j8`
2023-09-30 09:01:10 +02:00
Dusan Klinec 056c996703
fix chaingen tests
- fix tx create from sources, input locking. Originally, creating a synthetic transactions with chaingen could create a transaction with outputs that are still locked in the current block, thus failing chain validation by the daemon. Simple unlock check was added. Some buggy tests were fixed as well as new unlock-checking version of tx creation rejected those, fixes are simple - mostly using correct block after a rewind to construct a transaction
2023-09-29 19:11:20 +02:00
tobtoht c8e4de13f2
depends: remove kernel version from darwin triplet 2023-09-27 07:37:01 +02:00
j-berman 47042ce808 wallet2: call on_reorg callback in handle_reorg 2023-09-26 20:37:11 -07:00
tobtoht 0d763a19b8
depends: move cmake system config to hosts files 2023-09-26 16:46:51 +02:00
tobtoht b9f1e37d33
depends: unwind: do not build for linux hosts 2023-09-26 09:47:36 +02:00
tobtoht 932bba3b79
depends: remove libiconv: unused 2023-09-25 14:00:34 +02:00
selsta 9636375421
storages: change error log category to serialization 2023-09-22 19:05:55 +02:00
jeff 9f981ac219
wallet: store watch-only wallet correctly when `change_password()` is called
The Monero GUI code was calling `Monero::wallet::setPassword()` on every open/close for some reason,
and the old `store_to()` code called `store_keys()` with `watch_only=false`, even for watch-only wallets.
This caused a bug where the watch-only keys file got saved with with the JSON field `watch_only` set to 0,
and after saving a watch-only wallet once, a user could never open it back up against because `load()` errored out.
This never got brought up before this because you would have to change the file location of the watch-only
wallet to see this bug, and I guess that didn't happen often, but calling the new `store_to()` function with the
new `force_rewrite` parameter set to `true` triggers key restoring and the bug appeared.
2023-09-21 22:42:16 -05:00
tobtoht 294366f8af
depends: openssl: update to 3.0.11 2023-09-19 15:54:00 +02:00
luigi1111 90294f09ae
Merge pull request #8976
d4d8840 functional_tests: fix multisig tests noutputs assertion (jeffro256)
2023-09-14 22:20:10 -05:00