8104 Commits

Author SHA1 Message Date
tobtoht
74dd968cd9 Merge pull request #10039
488bf71 cryptonote_basic: add overload for get_block_longhash() (jeffro256)
2026-01-29 15:43:22 +00:00
tobtoht
f65b286455 Merge pull request #10272
3f964fc blockchain_db/rpc: faster is_key_image_spent (jeffro256)
2026-01-17 03:41:46 +00:00
tobtoht
24742771dc Merge pull request #10273
2d978db common: fix `apply_permutation()` for `std::vector<bool>` (jeffro256)
2026-01-17 03:39:07 +00:00
binaryFate
11be390610 Remove .no moneropulse domain from codebase 2026-01-12 11:49:46 +01:00
tobtoht
ab2ea4763a Merge pull request #10166
a863bf7 BlockchainDB: rm `skip_coinbase` in `get_blocks_from()` (jeffro256)
2026-01-09 16:08:54 +00:00
jeffro256
3f964fcdb5 blockchain_db/rpc: faster is_key_image_spent
Does the following to speedup the `/is_key_image_spent` RPC endpoint:
  - Reads all on-chain key images in one LMDB read transacion
  - Uses `cryptonote_core::are_key_images_spent_in_pool()` instead of `cryptonote_core::get_pool_transactions_and_spent_keys_info()` for pool querying. This only does a LMDB read per key image if in the pool.
  - Filters known on-chain spent key images before querying for key images spent in pool

This RPC endpoint was causing major daemon slowdowns in the Carrot/FCMP++ Alpha Stressnet when using the `rescan_spent` command, especially for large wallets.
The effect was much worse if the mempool was full.
2026-01-07 00:49:44 -06:00
jeffro256
2d978db016 common: fix apply_permutation() for std::vector<bool> 2026-01-05 18:51:01 -06:00
tobtoht
4286fbe6cd Merge pull request #10157
022fb8e unit_tests: @j-berman unit tests for #10157 (jeffro256)
40eb828 cryptonote_core: cache input verification results directly in mempool (jeffro256)
2026-01-03 11:31:27 +00:00
jeffro256
40eb82873e cryptonote_core: cache input verification results directly in mempool
This replaces `ver_rct_non_semantics_simple_cached()` with an API that offloads
the responsibility of tracking input verification successes to the caller. The
main caller of this function in the codebase, `cryptonote::Blockchain()` instead
keeps track of the verification results for transaction in the mempool by
storing a "verification ID" in the mempool metadata table (with `txpool_tx_meta_t`).
This has several benefits, including:

* When the mempool is large (>8192 txs), we no longer experience cache misses and unnecessarily re-verify ring signatures. This greatly improves block propagation time for FCMP++ blocks under load
* For the same reason, reorg handling can be sped up by storing verification IDs of transactions popped from the chain
* Speeds up re-validating every mempool transaction on fork change (monerod revalidates the whole tx-pool on HFs #10142)
* Caches results for every single type of Monero transaction, not just latest RCT type
* Cache persists over a node restart
* Uses 512KiB less RAM (8192*2*32B)
* No additional storage or DB migration required since `txpool_tx_meta_t` already had padding allocated
* Moves more verification logic out of `cryptonote::Blockchain`

Furthermore, this opens the door to future multi-threaded block verification
speed-ups. Right now, transactions' input proof verification is limited to one
transaction at a time. However, one can imagine a scenario with verification IDs
where input proofs are optimistically multi-threaded in advance of block
processing. Then, even though ring member fetching and verification is
single-threaded inside of `cryptonote::Blockchain::check_tx_inputs()`, the
single thread can skip the CPU-intensive cryptographic code if the verification
ID allows it.

Also changes the default log category in `tx_verification_utils.cpp` from "blockchain" to "verify".
2026-01-02 15:47:19 -06:00
tobtoht
02357fe53f Merge pull request #10263
5905589 src: update checkpoints to match v0.18.4.5 (selsta)
2025-12-29 22:42:09 +00:00
tobtoht
d761ceb02f Merge pull request #10256
d7c5f95 p2p: fix race causing dropped connections during sync (j-berman)
2025-12-29 22:23:20 +00:00
selsta
590558960f src: update checkpoints to match v0.18.4.5 2025-12-29 22:29:17 +01:00
j-berman
ab9bc6499c wallet2: fix edge case where tx's ki's remain marked unspent
If a tx is marked as failed (because it never shows up in the
daemon's pool), its key images get reset back to unspent so they
can be used in future txs.

If the tx re-enters the daemon's pool (e.g. it's removed from the
pool and then relayed back), then the wallet incorrectly maintains
that the tx's key images are unspent.

This change ensures the wallet re-marks the tx's key images as
spent if the tx re-appears in the node's pool.
2025-12-12 09:15:48 -08:00
j-berman
d7c5f95704 p2p: fix race causing dropped connections during sync
Without this commit:
1) read height from DB
2) add block to chain in separate thread
3) read chain for block id's and request them from peer
4) ERR in handle_response_chain_entry, peer's first block is the
one that was added to the chain, which has block idx=height from
step 1.

This commit reads the chain for height and highest block id's
in one go while holding the m_blockchain_lock to avoid the race.
2025-12-11 21:36:42 -08:00
tobtoht
48ad374b0d Merge pull request #10242
b937f86 ledger: add nano gen5 id (tobtoht)
2025-12-09 17:58:31 +00:00
tobtoht
6c958f40fa Merge pull request #10236
4741792 debug_utilities: fix build with Boost ASIO 1.87+ (tobtoht)
2025-12-09 17:53:13 +00:00
tobtoht
1d8f5d8523 Merge pull request #10244
24ef337 simplewallet: report file writing failure for export_transfers command (WHR)
2025-12-09 17:39:21 +00:00
Lee *!* Clagett
86927f33ae Remove invalid constexpr 2025-12-04 16:13:57 -05:00
WHR
24ef33768c simplewallet: report file writing failure for export_transfers command 2025-12-03 12:26:12 +08:00
tobtoht
b937f8616d ledger: add nano gen5 id 2025-12-01 01:48:32 +01:00
tobtoht
bf233c5652 Merge pull request #9203
b7b9bce simplewallet: edit desc. text for transfer (Cat)
2025-11-26 20:43:03 +00:00
Cat
b7b9bce9f7 simplewallet: edit desc. text for transfer 2025-11-26 20:04:40 +00:00
tobtoht
662f0a6f32 Merge pull request #10215
d8d212c common: add std equivalent of hash_combine (jeffro256)
2025-11-26 19:32:06 +00:00
tobtoht
483913506b Merge pull request #10179
9e57f9b blockchain_prune: check DB version (jeffro256)
2025-11-26 18:49:08 +00:00
tobtoht
5fd71368db Merge pull request #10214
a817da5 serialization: revert va_args_commaprefix usage (jeffro256)
2025-11-26 18:23:42 +00:00
tobtoht
337525d3d0 Merge pull request #10192
38bc627 Blockchain: cancel pop_blocks() operation on interupt (jeffro256)
2025-11-26 18:23:06 +00:00
tobtoht
ddfa2ed8fa Merge pull request #10190
1347805 rpc: remove `COMMAND_RPC_SUBMIT_RAW_TX` (hinto.janai)
2025-11-26 18:22:31 +00:00
tobtoht
3eef33d8b3 Merge pull request #10188
acda1d4 p2p: unpack memory layout of peerlist entries (jeffro256)
2025-11-26 18:21:57 +00:00
tobtoht
4741792dc8 debug_utilities: fix build with Boost ASIO 1.87+ 2025-11-24 22:39:55 +01:00
jeffro256
d8d212ca42 common: add std equivalent of hash_combine 2025-11-13 11:59:57 -06:00
jeffro256
a817da5215 serialization: revert va_args_commaprefix usage 2025-11-13 11:48:13 -06:00
tobtoht
bba6aa518b Merge pull request #10205
1fd6f27 Daemon: relay empty fluffy block on found block (j-berman)
2025-11-12 09:22:16 +00:00
j-berman
1fd6f275da Daemon: relay empty fluffy block on found block 2025-11-11 16:37:36 -08:00
j-berman
a378b59628 tx pool: only increment m_txpool_weight for newly added pool txs
Otherwise we can end up double counting txs towards the weight,
which can over-state the pool weight. E.g. relay tx to node in
stem phase, add its weight to pool weight, then receive tx
from another node, then bump the pool weight again. That double
counts the tx towards the pool weight.

If the weight exceeds the max, the node will "prune" txs from the
pool. Thus, over-counting is probably a cause of, but perhaps
not the only cause of:
https://github.com/seraphis-migration/monero/issues/148
2025-11-11 16:31:01 -08:00
tobtoht
d6be783927 Merge pull request #10196
e89922a ledger: throw on secret view key export rejection (tobtoht)
2025-11-11 23:01:45 +00:00
tobtoht
cdaca019fc Merge pull request #10201
52b4c73 cryptonote_protocol: accurate next_needed_height when there is an overlap (0xFFFC0000)
2025-11-11 22:41:41 +00:00
tobtoht
6c17c7d1ad Merge pull request #10200
ef3fe66 src: update checkpoints to match v0.18.4.4 (selsta)
2025-11-11 21:53:12 +00:00
tobtoht
e89922a2fd ledger: throw on secret view key export rejection 2025-11-11 21:21:41 +01:00
j-berman
c01e1fa288 Fix logging deadlock 2025-11-11 10:43:39 -08:00
0xFFFC0000
52b4c73ab4 cryptonote_protocol: accurate next_needed_height when there is an overlap 2025-11-11 00:29:23 +03:30
selsta
ef3fe664fd src: update checkpoints to match v0.18.4.4 2025-11-10 19:00:50 +01:00
jeffro256
38bc62741b Blockchain: cancel pop_blocks() operation on interupt
On SIGINT, `Blockchain::cancel()` is called, which sets `m_cancel` to `true`.
This commit stops attempting to pop blocks from the chain once that flag is
set. This should leave the blockchain in a well-define state, even if the
`pop_blocks()` operation itself did not "complete".
2025-11-07 13:21:00 -06:00
hinto.janai
1347805434 rpc: remove COMMAND_RPC_SUBMIT_RAW_TX 2025-11-06 23:29:45 +00:00
jeffro256
acda1d4a37 p2p: unpack memory layout of peerlist entries
The `#pragma pack(push, 1)` directive was causing unaligned memory
accesses to shared pointers in `epee::net_utils::network_address`.
The peerlist file uses Boost serialization, so this should be
backwards compatible.
2025-11-05 15:30:52 -06:00
jeffro256
9e57f9be83 blockchain_prune: check DB version
Prevents accidental future corruption of the database by refusing
to prune the DB before checking the version value inside the
properties table.
2025-10-27 18:11:54 -05:00
tobtoht
6bb36309d6 Merge pull request #10123
4e9d199 daemon: fix print_cn command when 0 connections (jeffro256)
2025-10-27 18:52:36 +00:00
tobtoht
b4a168b5f8 Merge pull request #10083
daded36 wallet: identify spends in pool when scanning (j-berman)
2025-10-27 18:50:40 +00:00
tobtoht
fc6170a1f7 Merge pull request #10156
0fc5e87 cryptonote_core: rm confusing/redundant BP consensus rule (jeffro256)
2025-10-27 18:47:58 +00:00
tobtoht
0237f04617 Merge pull request #10172
5905b20 wallet: sanity check ring indices only against spendable (jeffro256)
2025-10-27 18:47:03 +00:00
jeffro256
5905b202f0 wallet: sanity check ring indices only against spendable 2025-10-15 17:00:21 -05:00