Commit Graph
777 Commits
Author SHA1 Message Date
Justin BermanandGitHub d31783a151 Merge pull request #462 from j-berman/unique-roots
FCMP++: guarantee every usable tree root is unique
2026-09-22 21:50:46 -07:00
jeffro256andj-berman 0dfbdcbfbf More rebase fixes
Co-authored-by: j-berman <justinberman@protonmail.com>
2026-09-18 12:21:38 -07:00
j-berman 8fe4a088ac FCMP++: guarantee every usable tree root is unique
1) if coinbase `unlock_time >= FCMP++ fork height`, then require
at least 1 coinbase out, and start doing FCMP++ torsion validation

2) Require FCMP++ txs' `reference_block+1 >= FCMP++ fork height`.

We want unique tree roots so that a tx with `reference_block=m`
can't possibly have a valid membership proof for some other
`reference_block=n`.
2026-09-18 01:51:20 -07:00
+3 a9145f9d38 FCMP++/Carrot mega commit [9/14/26]
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
Co-authored-by: Lee *!* Clagett <code@leeclagett.com>
Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com>
Co-authored-by: jeetrex17 <jeetrex@tutamail.com>
Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com>
Co-authored-by: MrCyjaneK
Co-authored-by: tobtoht
Co-authored-by: selsta
Co-authored-by: Thomas <thomas.giudici@proton.me>
Co-authored-by: navidR
Co-authored-by: Boog900 <boog900@tutanota.com>
2026-09-17 18:33:24 -07:00
tobtoht cee436892f Merge pull request #11235
f8e2a87 cryptonote_basic: serialization checks (j-berman)

ACKs: plowsof, selsta*, jpk68
2026-09-10 13:30:16 +00:00
j-berman f8e2a8709d cryptonote_basic: serialization checks 2026-09-09 18:20:50 -07:00
tobtoht 1577f64637 Merge pull request #11168
bc870e0 blockchain: limit offsets cache size (j-berman)

ACKs: jeffro256, selsta, jpk68, thomasbuilds, plowsof
2026-09-09 19:58:53 +00:00
jeffro256 c7a2d4f66a crypto: reduce crypto.h header weight 2026-09-07 21:32:29 -05:00
tobtoht 3bd4a991a1 Merge pull request #11179
3e35bfa src: reduce unnecessary copies/allocations (jpk68)

ACKs: selsta, jeffro256
2026-08-31 18:36:37 +00:00
jeffro256 59702e0275 rpc: speedup block&tx RPC calls
In RPC calls `get_blocks.bin` and `get_transactions`:
  1. Skip deserializing then re-serializing tx blobs
  2. Provide full unpruned transaction from mempool in `get_transactions` when `!req.prune`
  3. Change `on_get_transactions()` response sort time from O(N^2) to O(N)
  4. Generally improve memory usage and lookups in `on_get_transactions()`

Reviewed-by: selsta <selsta@sent.at>
Reviewed-by: j-berman <justinberman@protonmail.com>
Reviewed-by: jpk68 <jpk68@tutanota.com>
2026-08-27 15:08:57 -05:00
jpk68 3e35bfad7e src: reduce unnecessary copies/allocations 2026-08-27 15:59:55 -04:00
j-berman bc870e0b57 blockchain: limit offsets cache size 2026-08-21 11:35:15 -07:00
tobtoht 4145106443 Merge pull request #11080
53ff15b Blockchain: improve check_block_timestamp() overloads (jeffro256)

ACKs: j-berman*, thomasbuilds*, jpk68, selsta
2026-08-16 15:19:07 +00:00
j-berman 236ca60be0 cryptonote_basic: parse_and_validate_tx param to check max size
Simple API to check max blob size before parsing. This is useful
when reading blobs from untrusted sources.

@selsta pointed out that coinbase txs can technically be larger
than get_max_tx_size(), otherwise we could enforce it on all txs.
2026-08-13 09:12:10 -07:00
jeffro256 53ff15b0d6 Blockchain: improve check_block_timestamp() overloads 2026-08-11 11:32:15 -05:00
tobtoht d006bd463f Merge pull request #11049
20db2e7 blockchain: if block is known invalid, fail block verification (j-berman)

ACKs: jeffro256, selsta
2026-08-10 13:21:48 +00:00
j-berman 20db2e7162 blockchain: if block is known invalid, fail block verification 2026-08-04 13:57:57 -07:00
Thomas e7278c0add cryptonote_core: remove dead code
Never had a caller:
- Blockchain::init taking HardFork*&: added in 8f863e742, no caller in
  any revision since
- tx_memory_pool::get_txpool_weight, set_txpool_max_weight: added as
  get_txpool_size and set_txpool_max_size in bc61ae69b alongside
  --max-txpool-size, which is wired through tx_memory_pool::init
  instead; renamed size to weight in 5ffb2ff9b, still uncalled
- get_transaction_version: added in b750fb27b, no caller since

Dead when their last user went:
- core::get_blocks taking vector<pair<blobdata, block>>, both overloads:
  last caller removed in 9faef1f83; ed2c81ed9 later converted the
  already-dead signatures from std::list to std::vector. The
  vector<block> overload is still used by core_tests and is kept
- blocks_container: 9e82b694d removed the in-memory blockchain that
  used it
- tx_by_fee_and_receive_time_entry: 445319d3f replaced the sorted
  container it keyed with a boost::bimap
- m_store_blockchain_interval: its do_call went with the original
  blockchain_storage format in 9e82b694d
- m_fork_moaner: its do_call went with the "We are most likely forked"
  message in f0371210e

Also drops two break statements after a return in ver_mixed_rct_semantics
and the doc comments belonging to the removed declarations.
2026-07-28 07:43:43 +02:00
tobtoht e00908bc49 Merge pull request #10921
edea850 general: replace auto_scope_leave_caller with scope_guard (jeffro256)

ACKs: selsta, tobtoht
2026-07-22 16:31:31 +00:00
tobtoht da5d40d597 Merge pull request #10885
c9a18b9 blockchain: fix misleading request chain error logs (selsta)

ACKs: jpk68, plowsof
2026-07-16 13:41:18 +00:00
jeffro256 edea8505db general: replace auto_scope_leave_caller with scope_guard
And replace unused inclusions of misc_language.h
2026-07-15 19:54:58 -05:00
tobtoht d9d83b0d27 Merge pull request #10762
95b207f Blockchain: fix data race in get_dynamic_base_fee_estimate (Masamune)

ACKs: selsta, jeffro256
2026-07-15 19:50:54 +00:00
selsta c9a18b96cb blockchain: fix misleading request chain error logs 2026-07-10 16:26:06 +02:00
tobtoht 381fce8dde Merge pull request #10828
fecef76 Fix spelling typos in comments and string literals (Thomas)

ACKs: tobtoht, selsta
2026-07-02 13:18:56 +00:00
tobtoht 596d0a0363 Merge pull request #10780
c914c27 src: update checkpoints to match v0.18.5.1 (selsta)

ACKs: plowsof*, tobtoht
2026-06-30 10:05:22 +00:00
tobtoht 05b312799c Merge pull request #10837
265e95a blockchain: improve incoming block scan table handling (selsta)

ACKs: SChernykh, j-berman
2026-06-30 10:01:32 +00:00
selsta c914c27c46 src: update checkpoints to match v0.18.5.1 2026-06-29 18:28:41 +02:00
selsta 265e95a8b5 blockchain: improve incoming block scan table handling 2026-06-29 14:07:28 +02:00
Thomas fecef767c9 Fix spelling typos in comments and string literals 2026-06-27 09:53:48 +02:00
Thomas b5136b1a5d common: remove unused data_cache.h
Dead since 40eb82873 (2025-10) moved verRct caching into the mempool;
only a stale #include remained in blockchain.cpp.
2026-06-23 22:31:28 +02:00
Masamune 95b207f00f Blockchain: fix data race in get_dynamic_base_fee_estimate 2026-06-12 15:36:57 +07:00
akildemirandselsta 1bd4dfe43a rpc: return prunable hashes in pruned getblocks
Co-authored-by: selsta <selsta@sent.at>
2026-06-11 20:37:13 +02:00
tobtoht c113dee523 Merge pull request #10716
196078e Refactored tx verification NIC logic (SChernykh)
2026-06-10 17:10:21 +00:00
tobtoht acb83adf37 Merge pull request #10714
6f7ad2c Blockchain: fix wrong block_weight in handle_get_objects (SChernykh)
2026-06-09 17:53:48 +00:00
jeffro256 9dbce17bb5 Blockchain: option for fast manual block popping 2026-06-07 14:59:57 -05:00
SChernykh 196078ea0c Refactored tx verification NIC logic
Encapsulated `nic_verified_hf_version` and `txs_by_txid` to make it impossible for callers to skip updating it.
2026-06-04 09:55:38 +02:00
SChernykh 6f7ad2cdc9 Blockchain: fix wrong block_weight in handle_get_objects
- When there are missing IDs, blocks.size() != arg.blocks.size(), so arg.blocks can't be indexed by `i` - the indices will be wrong, the wrong weight will be returned to some peer and this peer will ban our node.

Use `bl.second` instead of `arg.blocks[i]`. Also it saves one DB query per returned block.
2026-06-04 07:37:53 +02:00
Thomas 2c327aa325 fix spelling in comments and docs 2026-05-13 21:20:05 +02:00
tobtoht dace76882d Merge pull request #10407
ccba74c src: update checkpoints to match v0.18.5.0 (selsta)
2026-05-03 19:24:17 +00:00
tobtoht b84aee62a4 Merge pull request #10143
4a2d6eb Daemon RPC: getblocks.bin block_ids_exclusive req param (j-berman)
2026-04-29 12:35:26 +00:00
tobtoht 172b4e1883 fix: warning: variable set but not used 2026-04-28 16:24:41 +02:00
selsta ccba74ce5e src: update checkpoints to match v0.18.5.0 2026-04-28 03:41:51 +02:00
tobtoht 6f284e8779 Merge pull request #10319
f459bd6 src: update checkpoints to match v0.18.4.6 (selsta)
2026-02-18 22:20:45 +00:00
selsta f459bd655e src: update checkpoints to match v0.18.4.6 2026-02-13 18:23:07 +01:00
tobtoht 087b97773a Merge pull request #10285
b90f455 blockchain_db: remove {add/get}_max_block_size() (jeffro256)
2026-02-03 18:56:49 +00:00
jeffro256 b90f455e6b blockchain_db: remove {add/get}_max_block_size() 2026-01-21 11:49:46 -06: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 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
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