Commit Graph

7641 Commits

Author SHA1 Message Date
wowario aa7564806d
shorten timestamp check window 2024-03-09 15:58:11 +03:00
wowario a0a90ada1a
limit future blk time to 10 min 2024-03-09 15:58:11 +03:00
wowario 7b9bfb73b1
bump unlock time to 288 blks 2024-03-09 15:58:10 +03:00
wowario 642beba4af
broadcast donation sub-address 2024-03-09 15:58:10 +03:00
wowario cf8e878869
revert Preserve commitment format inside transactions #8277 2024-03-09 15:58:10 +03:00
wowario 0fd82de0be
adjust approx_blockchain_height 2024-03-09 15:58:09 +03:00
wowario ddf990f394
config wallet2 settings 2024-03-09 15:58:08 +03:00
wowario 196a3756d6
set dev fund address 2024-03-09 15:58:08 +03:00
wowario 4ed9b68d59
add seed nodes 2024-03-09 15:58:08 +03:00
wowario 37195f2128
set name of daemon stdout 2024-03-09 15:58:07 +03:00
wowario e71bef4496
set last v1 block 2024-03-09 15:58:07 +03:00
wowario a04690c66b
set pow variants 2024-03-09 15:58:07 +03:00
wowario 9c3fb6c243
set quick height for syncing 2024-03-09 15:58:07 +03:00
wowario 463de38ef5
send dump log to wowario 2024-03-09 15:58:06 +03:00
wowario c474334f41
set genesis block timestamp 2024-03-09 15:58:06 +03:00
wowario ce3a67ed21
set decimal point 2024-03-09 15:58:06 +03:00
wowario fb39891031
add forks and checkpoints 2024-03-09 15:58:04 +03:00
wowario 1c44d89030
wownero skin pack 2024-03-09 15:56:23 +03:00
wowario da6a2dc2c5
bump RX block version 2024-03-09 15:54:20 +03:00
wowario d6a3511d59
correct length of addresses 2024-03-09 15:54:20 +03:00
wowario 6b8e245aea
move utilities to debug build 2024-03-09 15:54:20 +03:00
wowario e5016a6f8e
show full version 2024-03-09 15:46:17 +03:00
wowario a93dcc1962
remove moneropulse urls 2024-03-09 15:46:17 +03:00
wowario a25032cc1e
remove monero tx bug fixes 2024-03-09 15:46:17 +03:00
wowario 2a4e1c6913
bump ring size to 22 2024-03-09 15:46:16 +03:00
wowario 3271844ab5
initialize genesis block 2024-03-09 15:46:16 +03:00
wowario 7af83ced4c
config cryptonote 2024-03-09 15:46:15 +03:00
SChernykh b5b72ae05c Fixed mempool pruning
- Fixed undefined behavior after a call to `remove_tx_from_transient_lists` (it used an invalid iterator)
- Fixed `txCompare` (it wasn't strictly weak ordered)
2024-03-08 21:03:41 +01:00
luigi1111 5eb3fc29bb
Merge pull request #9223
36ee12b get_block_template_backlog: better sorting logic (SChernykh)
2024-03-08 13:46:09 -05:00
luigi1111 c225a1f25b
Merge pull request #9224
eeb7c7c tx_memory_pool: make double spends a no-drop offense (jeffro256)
2024-03-08 10:49:17 -05:00
jeffro256 eeb7c7c546
tx_memory_pool: make double spends a no-drop offense
Nodes who see different txs in a double spend attack will drop each other, splitting the network.
Issue found by @boog900.
2024-03-08 08:14:06 -06:00
SChernykh 36ee12bd8d get_block_template_backlog: better sorting logic
std::sort is unstable, so it can return random sets of transactions when mempool has many transactions with the same fee/byte. It can result in p2pool mining empty blocks sometimes because it doesn't pick up "new" transactions immediately.
2024-03-08 14:51:33 +01:00
selsta 32b3a56313
wallet2: adjust fee during backlog, fix set priority 2024-03-08 14:12:17 +01:00
luigi1111 68e40ea2a7
Merge pull request #9158
33e3f72 serialization: fix infinite loops and clean up dispatching (jeffro256)
2024-02-24 10:19:58 -05:00
luigi1111 c6ff0d3820
Merge pull request #9136
f2360a7 build: prepare v0.18.3.2 (selsta)
2024-02-24 10:18:40 -05:00
luigi1111 522d82276e
Merge pull request #9188
0cc8f7a cryptonote_core: early out on out of bounds scaling parameter (selsta)
2024-02-24 10:16:13 -05:00
luigi1111 13ed9d501b
Merge pull request #9156
052df1b Zero initialize rctSigBase elements (Lee *!* Clagett)
2024-02-24 10:08:33 -05:00
luigi1111 8a1e49664e
Merge pull request #9142
98ee46f Disable/fix ports with I2P (Lee Clagett)
2024-02-24 10:06:26 -05:00
luigi1111 2f912f8a58
Merge pull request #9130
dfb990e wallet: mitigate statistical dependence for decoy selection within rings (jeffro256)
2024-02-24 10:01:09 -05:00
luigi1111 81f113dd8c
Merge pull request #9008
9a89e2d wallet2: call on_reorg callback in handle_reorg (j-berman)
1df5630 wallet2: add on_reorg callback (Crypto City)
2024-02-24 09:58:30 -05:00
jeffro256 51d7a6921c
wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:42 -06:00
selsta f2360a725e
build: prepare v0.18.3.2 2024-02-20 15:37:47 +01:00
selsta 0cc8f7aaa3
cryptonote_core: early out on out of bounds scaling parameter 2024-02-20 15:21:27 +01:00
jeffro256 33e3f72d24
serialization: fix infinite loops and clean up dispatching
Resolves #8687
2024-02-08 13:22:33 -06:00
Lee *!* Clagett 052df1b28c Zero initialize rctSigBase elements 2024-02-06 13:23:10 -05:00
Lee Clagett 98ee46f249 Disable/fix ports with I2P 2024-01-30 13:36:21 -05:00
jeffro256 dfb990e8bb
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.
2024-01-19 13:31:15 -06:00
luigi1111 8eab181fe1
Merge pull request #9080
47d8899 Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:43 -05:00
luigi1111 9a70f43440
Merge pull request #9053
fe746dc Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB (Lee *!* Clagett)
2024-01-18 17:57:54 -05:00
Lee Clagett 47d8899c90 Fix missing checks for IsObject in ZMQ jsonrpc reading 2023-11-28 18:05:15 -05:00
luigi1111 c09062087e
Merge pull request #9051
fe47806 wallet: fix multisig key memory leak (jeffro256)
2023-11-06 09:39:19 -05:00
luigi1111 646c3fb0d9
Merge pull request #9043
e7d51e5 JH hash compiler workarounds (SChernykh)
2023-11-06 09:34:13 -05:00
luigi1111 c193c5e85d
Merge pull request #9039
0f75585 multisig: better errors for small malformed kex msgs (jeffro256)
2023-11-06 09:32:18 -05:00
luigi1111 d5c667a5ad
Merge pull request #9036
eae62a0 ringct: make 
ctSigBase serialization follow strict aliasing rule (jeffro256)
2023-11-06 09:29:03 -05:00
luigi1111 2fe5a5e073
Merge pull request #9034
14ae812 cryptonote_config: include cstdint (jeffro256)
2023-11-06 09:27:51 -05:00
SChernykh e7d51e5583 JH hash compiler workarounds
- Fixed uninitialized `state->x` warning
- Fixed broken code with `-O3` or `-Ofast`

The old code is known to break GCC 10.1 and GCC 11.4
2023-11-04 21:01:47 +01:00
Lee *!* Clagett fe746dca4e Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB 2023-11-04 13:57:28 -04:00
jeffro256 fe47806afb
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-03 11:58:28 -05:00
jeffro256 0f75585f64
multisig: better errors for small malformed kex msgs
Resolves https://github.com/monero-project/monero/issues/8493
2023-10-25 20:38:22 -05:00
jeffro256 eae62a07e0
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-24 13:00:45 -05:00
jeffro256 14ae81246d
cryptonote_config: include cstdint
Header was using `uint64_t` without including `<cstdint>` which caused some issues downstream for windows builds
2023-10-23 14:53:58 -05:00
j-berman bdebf680bd wallet2: ensure transfers and sweeps use same fee calc logic
Ensures both transfers and sweeps use a fee that's calculated
from the tx's weight. Using different logic could theoretically
enable distinguishability between the two types of txs. We don't
want that.
2023-10-16 01:10:05 -07:00
luigi1111 2656cdf505
Merge pull request #9014
69de381 add a test for the long term weight cache (Boog900)
810f6a6 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:28:11 -04:00
luigi1111 1c12d305d6
Merge pull request #9012
fbcd8da build: prepare v0.18.3.1 (selsta)
2023-10-02 15:26:18 -04:00
luigi1111 83d0d2338f
Merge pull request #9011
03d51b7 wallet2: fix refresh function parameters (selsta)
2023-10-02 15:25:24 -04:00
Boog900 810f6a6cd2
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-02 15:27:31 +01:00
selsta fbcd8da082
build: prepare v0.18.3.1 2023-10-02 12:59:37 +02:00
selsta 03d51b7cc4
wallet2: fix refresh function parameters
max_blocks is last on master branch
2023-10-01 20:56:31 +02:00
j-berman 9a89e2d9e4 wallet2: call on_reorg callback in handle_reorg 2023-09-27 12:51:52 -07:00
Crypto City 1df5630f23 wallet2: add on_reorg callback 2023-09-27 12:50:34 -07:00
jeff 205c80427b
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-22 09:20:56 -05:00
luigi1111 533bbc3208
Merge pull request #8988
64ed938 build: prepare v0.18.3.0 (selsta)
2023-09-14 22:21:06 -05:00
luigi1111 031d318ca2
Merge pull request #8941
356e687 wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (moneromooo-monero) 633e1b7 wallet_rpc_server: add --no-initial-sync flag for quicker network binding (moneromooo-monero)
2023-09-14 22:19:27 -05:00
selsta 64ed9385a2
build: prepare v0.18.3.0 2023-09-10 18:30:34 +02:00
jeffro256 ba98269ca5
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:52:31 -05:00
moneromooo-monero 356e6877dc
wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing 2023-08-17 15:35:00 +00:00
moneromooo-monero 633e1b7359
wallet_rpc_server: add --no-initial-sync flag for quicker network binding 2023-08-17 15:34:57 +00:00
luigi1111 eac1b86bb2
Merge pull request #8957
b51f4a9 scan_tx: fix custom comparator for == case; fixes #8951 (j-berman)
2023-08-17 10:26:52 -05:00
luigi1111 3bebcc4a7d
Merge pull request #8953
ed05ac6 wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
2023-08-17 10:25:27 -05:00
luigi1111 9d5c5b5634
Merge pull request #8942
78348bc wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:24:16 -05:00
luigi1111 894adef295
Merge pull request #8891
842478c core_rpc_server: return ID of submitted block (jeffro256)
2023-08-17 10:18:12 -05:00
jeffro256 78348bcddd
wallet-rpc: restore from multisig seed 2023-08-10 10:13:07 -05:00
j-berman b51f4a9244 scan_tx: fix custom comparator for == case; fixes #8951
Co-authored-by: woodser <woodser@protonmail.com>
2023-07-19 07:45:33 -07:00
jeffro256 ed05ac6872
wallet2: when checking frozen multisig tx set, don't assume order 2023-07-17 22:53:55 -05:00
j-berman f137a35984 Enforce restricted # pool txs served via RPC + optimize chunked reqs [release-v0.18]
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-07-09 08:38:18 +02:00
rbrunner7 23f782b211 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call [release-v0.18] 2023-07-09 08:30:53 +02:00
luigi1111 ab826008d6
Merge pull request #8917
835896e wallet2: do not lose exception in current thread on refresh (Crypto City)
62bb95b wallet2: fix missing exceptions from failing wallet refresh (Crypto City)
2023-07-06 21:40:45 -05:00
luigi1111 4dc727b3f6
Merge pull request #8916
1924c17 protocol: drop peers sending duplicate txes (moneromooo-monero)
2023-07-06 21:40:12 -05:00
luigi1111 3be6c1389e
Merge pull request #8908
c6530d2 Add CLSAG serialization to ZMQ code (Lee Clagett)
2023-07-06 21:39:19 -05:00
luigi1111 5a99b2dfbe
Merge pull request #8905
dc24312 wallet: respect frozen key images in multisig wallets [RELEASE] (jeffro256)
2023-07-06 21:38:34 -05:00
luigi1111 f173bf6e72
Merge pull request #8895
26025cb Speed up perf_timer init on x86 (SChernykh)
2023-07-06 21:33:25 -05:00
luigi1111 a41453c256
Merge pull request #8892
aa139f0 wallet_rpc_server: dedup transfer RPC responses [RELEASE] (jeffro256)
2023-07-06 21:31:09 -05:00
jeffro256 842478c5a9
core_rpc_server: return ID of submitted block 2023-06-30 15:32:49 -05:00
luigi1111 9f8ae9649a
Merge pull request #8878
8dc4abd common: do not use DNS to determine if address is local (tobtoht)
2023-06-27 11:46:19 -05:00
luigi1111 11b5139506
Merge pull request #8851
1fad8cc blockchain: ensure base fee cannot reach 0 (Crypto City)
2023-06-27 11:40:06 -05:00
luigi1111 54f0f9eb96
Merge pull request #8845
cfc6227 cryptonote_basic: fix amount overflow detection on 32-bit systems [RELEASE] (jeffro256)
2023-06-27 11:38:42 -05:00
luigi1111 5c900bb69f
Merge pull request #8831
1d1d5fb Fixed RandomX initialization when mining from scratch (SChernykh)
2023-06-27 11:34:53 -05:00
luigi1111 60e9426ef2
Merge pull request #8566
65e13db wallet2: fix rescanning tx via scan_tx (j-berman)
2023-06-27 11:20:25 -05:00
Crypto City 835896ea24
wallet2: do not lose exception in current thread on refresh 2023-06-27 11:08:45 +00:00
Crypto City 62bb95b25f
wallet2: fix missing exceptions from failing wallet refresh 2023-06-27 11:08:45 +00:00