Commit Graph

1510 Commits

Author SHA1 Message Date
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
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
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
luigi1111 c6ff0d3820
Merge pull request #9136
f2360a7 build: prepare v0.18.3.2 (selsta)
2024-02-24 10:18:40 -05: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
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
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 64ed9385a2
build: prepare v0.18.3.0 2023-09-10 18:30:34 +02: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
Crypto City 1fad8cc919
blockchain: ensure base fee cannot reach 0
reported by sech1
2023-05-11 13:59:41 +00:00
luigi1111 e06129bb4d
Merge pull request #8805
4f1262b build: prepare v0.18.2.2 (selsta)
2023-04-02 20:53:20 -04:00
jeffro256 059b975388 cryptonote core/protocol: don't drop peers for soft offenses
Also: txs with tx_extra which is too large will not get published to ZMQ

Co-authored-by: SChernykh <sergey.v.chernykh@gmail.com>
2023-03-29 02:07:15 -05:00
selsta 4f1262bae9
build: prepare v0.18.2.2 2023-03-27 18:52:04 +02:00
luigi1111 25645e5d23
Merge pull request #8785
cdeb286 build: prepare v0.18.2.1 (selsta)
2023-03-24 22:55:49 -04:00
luigi1111 225e5ba571
Merge pull request #8784
5900ed3 Add a size limit for tx_extra in tx pool (tevador)
2023-03-18 18:23:14 -04:00
selsta cdeb286359
build: prepare v0.18.2.1 2023-03-18 21:23:42 +01:00
tevador 5900ed3706
Add a size limit for tx_extra in tx pool 2023-03-18 20:01:58 +01:00
Jeffrey Ryan c59e0096b6 verRctNonSemanticsSimpleCached: fix fragility 2023-03-17 18:46:34 -05:00
selsta dc18efa3d7
build: prepare v0.18.2.0 2023-02-08 22:18:30 +01:00
luigi1111 c48f572e46
Merge pull request #8676
29208a3 Cache successful erRctNonSemanticsSimple calls (SChernykh)
2023-01-11 12:28:08 -05:00
SChernykh 29208a33cb Cache successful `verRctNonSemanticsSimple` calls 2022-12-20 22:19:00 +01:00
SChernykh f698f2b708 Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
2022-12-14 07:21:00 +01:00
selsta 853171bbf0
build: prepare v0.18.1.2 2022-09-26 22:41:36 +02:00
luigi1111 1f27fdf6a5
Merge pull request #8588
802c4bb Move update_checkpoints() to a later stage (SChernykh)
2022-09-26 15:00:59 -05:00
SChernykh 802c4bb0e4 Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:06:39 +02:00
SChernykh 6adf03cdc5 Second thread pool for IO 2022-09-20 10:22:12 +02:00
j-berman 864a78ee5f wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:23:08 -06:00
luigi1111 3178bbe083
Merge pull request #8552
93db74a rpc: skip bootstrap nodes that are lower than last checkpoint (selsta)
2022-09-09 12:55:40 -05:00
selsta 93db74a91e
rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:09:39 +02:00
selsta 09ee78197c
build: prepare v0.18.1.1 2022-09-06 20:22:29 +02:00
luigi1111 b9e8504cfb
Merge pull request #8467
fac7c43 continue pool pruning even if a tx can't be found (j-berman)
2022-08-09 17:43:32 -05:00
luigi1111 dc2f548a68
Merge pull request #8470
309f6ba build: prepare v0.18.1.0 (selsta)
2022-08-09 15:00:16 -05:00
luigi1111 5c33f40cd8
Merge pull request #8455
099fc1f Fixed get_block_template_backlog performance (SChernykh)
2022-08-08 20:29:56 -05:00
selsta 309f6ba3f5
build: prepare v0.18.1.0 2022-07-28 23:14:02 +02:00
j-berman fac7c43644 continue pool pruning even if a tx can't be found 2022-07-26 17:28:02 -07:00
SChernykh 099fc1f8a9 Fixed get_block_template_backlog performance
Before the fix, it processed all transactions in the mempool which could be very slow when mempool grows to several MBs in size. I observed `get_block_template_backlog` taking up to 15 seconds of CPU time under high mempool load.

After the fix, only transactions that can potentially be mined in the next block will be processed (a bit more than the current block median weight).
2022-07-22 13:50:21 +02:00
j-berman 8cc3c9af4d Publish submitted txs via zmq 2022-07-21 11:53:31 -07:00
luigi1111 f982163fc9
Merge pull request #8425
fe5d1be build: prepare v0.18.0.0 (selsta)
2022-07-15 11:23:54 -04:00
selsta fe5d1bef56
build: prepare v0.18.0.0 2022-07-13 22:07:31 +02:00
anon c7b2944f89 multisig: fix critical vulnerabilities in signing 2022-06-30 12:56:40 -05:00
j-berman b9d2c788bc fix backoff delay logic when re-relaying txs 2022-05-12 08:39:51 -07:00
luigi1111 e13244ea9c
Merge pull request #8178
5d388eb Bump ring size to 16 for v15 & remove set default in wallet cli (j-berman)
2022-04-25 10:18:26 -05:00
j-berman 5d388eb74d Bump ring size to 16 for v15 & remove set default in wallet cli 2022-04-18 14:36:28 -07:00
j-berman ea87b30f89 Add view tags to outputs to reduce wallet scanning time
Implements view tags as proposed by @UkoeHB in MRL issue
https://github.com/monero-project/research-lab/issues/73

At tx construction, the sender adds a 1-byte view tag to each
output. The view tag is derived from the sender-receiver
shared secret. When scanning for outputs, the receiver can
check the view tag for a match, in order to reduce scanning
time. When the view tag does not match, the wallet avoids the
more expensive EC operations when deriving the output public
key using the shared secret.
2022-04-18 00:49:53 -07:00