Commit Graph

11533 Commits

Author SHA1 Message Date
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
luigi1111
8a280dd6d0
Merge pull request #8937
1bea8ef wallet2: fix store_to() and change_password() (jeffro256)
2023-09-14 22:17:27 -05:00
koe
51e40f721b add seraphis_crypto directory 2023-09-10 16:49:58 -05:00
koe
9b231c9ac3 add account_generators for mapping public EC generators to account keys 2023-09-10 16:02:46 -05:00
jeff
1025e4fcb1
unit_test: set data dir relative to exe & add log-level arg 2023-09-10 02:18:50 -05:00
jeffro256
1bea8ef42a
wallet2: fix store_to() and change_password()
Resolves #8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
2023-08-23 11:48:18 -05:00
jeffro256
d4d884057c
functional_tests: fix multisig tests noutputs assertion
The changes to the multisig tests in #8914 and #8904 affected each other, this PR cleans up the code and fixes that issue.
2023-08-19 22:09:51 -05:00
j-berman
759293de08 wallet2: fix version check at hf version 1 2023-08-17 13:29:46 -07:00
luigi1111
8123d945f8
Merge pull request #8959
26fa796 docs: update ANONYMITY_NETWORKS (DonW16)
2023-08-17 10:27:34 -05:00
luigi1111
72211163b8
Merge pull request #8956
f7fb5c7 scan_tx: fix custom comparator for == case; fixes #8951 (j-berman)
2023-08-17 10:26:24 -05:00
luigi1111
e3c990f03a
Merge pull request #8955
192d87c remove more 'using namespace' statements from headers (jeffro256)
2023-08-17 10:25:51 -05:00
luigi1111
1ab593991c
Merge pull request #8950
a0e5c3c wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
2023-08-17 10:24:53 -05:00
luigi1111
28eca0cb79
Merge pull request #8927
1104b59 Update help for set command in simplewallet Add help for max-reorg-depth and load-deprecated-formats options (MasFlam)
2023-08-17 10:23:10 -05:00
luigi1111
6fc67869a1
Merge pull request #8924
ffbf9f4 blockchain_and_pool: move to crytonote_core and enforce its usage (jeffro256)
d6f86e5 Avoid nullptr dereference when constructing Blockchain and tx_memory_pool (lukas)
2023-08-17 10:21:40 -05:00
luigi1111
3b67d5fc5b
Merge pull request #8914
45b52de wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:20:20 -05:00
luigi1111
fc84506a96
Merge pull request #8913
2a2cf03 blockchain_db: add clarification to get_block_already_generated_coins (jeffro256)
2023-08-17 10:19:26 -05:00
luigi1111
30ba5a5280
Merge pull request #8890
e8cac61 core_rpc_server: return ID of submitted block (jeffro256)
2023-08-17 10:17:46 -05:00
luigi1111
83df9b1429
Merge pull request #8882
a8d2a58 wallet2: ensure transfers and sweeps use same fee calc logic (j-berman)
2023-08-17 10:17:22 -05:00
luigi1111
b9fd761a25
Merge pull request #8868
a6ce2dc Write interface for new serialization system (Lee *!* Clagett)
2023-08-17 10:14:17 -05:00
luigi1111
4cabfe7aba
Merge pull request #8853
6ff87ef net: tor_address: remove support for v2 onion addresses (tobtoht)
2023-08-17 10:11:12 -05:00
luigi1111
c490e38f56
Merge pull request #8840
503c3e0 core: do not force sync the db when finding a block in regtest mode (Crypto City)
2023-08-17 10:10:14 -05:00
luigi1111
01ee1682aa
Merge pull request #8786
0ae5c91 http_client: reduce number of packets sent for small bodies (jeffro256)
2023-08-17 10:08:29 -05:00
teknosquet
f70d65c8bc
ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd
Signed-off-by: teknosquet <teknosquet@danwin1210.de>
2023-08-14 02:36:14 -05:00
Lee *!* Clagett
a6ce2dc7c5 Write interface for new serialization system 2023-08-11 16:34:27 -04:00
jeffro256
8190f2532b
KV_SERIALIZE: remove extraneous semicolons in DSL
Prereq of https://github.com/monero-project/monero/pull/8867
2023-08-10 11:13:14 -05:00
maogo
eba9011ca0
README: remove obsolete forum 2023-08-10 04:18:24 +02:00
jeffro256
f71e2dcdc8
multisig: better errors for small malformed kex msgs
Resolves https://github.com/monero-project/monero/issues/8493
2023-08-08 12:01:40 -05:00
jeffro256
1e2e7035e9
core_rpc_server: silence unused warnings 2023-08-01 17:46:34 -05:00