Commit Graph

724 Commits

Author SHA1 Message Date
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
selsta
590558960f src: update checkpoints to match v0.18.4.5 2025-12-29 22:29:17 +01: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
337525d3d0 Merge pull request #10192
38bc627 Blockchain: cancel pop_blocks() operation on interupt (jeffro256)
2025-11-26 18:23:06 +00:00
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
tobtoht
fc6170a1f7 Merge pull request #10156
0fc5e87 cryptonote_core: rm confusing/redundant BP consensus rule (jeffro256)
2025-10-27 18:47:58 +00:00
jeffro256
0fc5e87f2c cryptonote_core: rm confusing/redundant BP consensus rule
This rule is confusing/redundant because before v8, no
bulletproofs whatsoever were allowed. And during and after
v8, ONLY multi-output bulletproofs were allowed, i.e.
exactly 1 bulletproof is allowed which proves the range of
all amount commitments in the transaction.

Sources:
  * No BP before v8:
    - d32b5bfe18/src/cryptonote_core/blockchain.cpp (L3021-L3032)
  * Only 1 BP allowed:
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L174)
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L150)
  * BP must cover all outputs:
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L190-L194)
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L166-L170)
2025-10-09 15:57:54 -05:00
luigi1111
a5aa602dce Merge pull request #10147
292c053 Cleaner validation (faster and saner) (j-berman)
2025-10-07 15:22:35 -04:00
luigi1111
df90240542 Merge pull request #10107
0fb4a8f src: update checkpoints to match v0.18.4.3 (selsta)
2025-10-07 15:17:44 -04:00
selsta
0fb4a8f9b1 src: update checkpoints to match v0.18.4.3 2025-10-07 16:37:18 +02:00
j-berman
292c053280 Cleaner validation (faster and saner) 2025-10-06 12:51:16 -07:00
WeebDataHoarder
bc8b210aff Send ZMQ miner notifications after txpool additions
Bug was introduced in c069c04ede, before this txpool additions were not notified on block addition

When receiving blocks with previously unknown conditions, miner data was sent first, but txpool add events for already-added transactions in previous block were sent afterward. Miners would then include already-mined transactions in their new templates due to receiving the mistimed txpool add event.

The fix is to send miner notifications AFTER txpool events are sent, and before normal block notifications are sent (for mining switch speed purposes)

Fixes c069c04ede / #9135
Fixes dfee15eee1 / #7891
2025-09-24 09:13:25 +02:00
tobtoht
c8f3566dbb Merge pull request #10050
cc444a9 checkpoints: update to a recent block height (selsta)
2025-08-21 16:28:37 +00:00
selsta
cc444a937d checkpoints: update to a recent block height 2025-08-20 18:40:18 +02:00
Leonardo Faoro
d979031977 fix typo in CHECK_AND_ASSERT_MES 2025-08-17 01:56:04 +00:00
selsta
c08f1114de src: update checkpoints to match v0.18.4.2 2025-08-01 17:27:51 +02:00
tobtoht
26294e80c9 Merge pull request #9947
00237fe src: update checkpoints to match v0.18.4.1 (selsta)
2025-07-10 13:46:26 +00:00
selsta
00237fe18a src: update checkpoints to match v0.18.4.1 2025-07-10 15:31:54 +02:00
jeffro256
e9c89dc6ab wallet: kill support for deprecated ephemeral Boost messages
The commit kills support for deprecated ephemeral Boost messages: signed/unsigned transaction sets, pending transactions, reserve proofs, MMS messages, etc.
It does NOT kill support for loading very old wallets in Boost format, that should be supported indefinitely. These messages were deprecated 5 years ago. Since
then, we have had a hard fork to enable a new non-compatible transaction type (w/ view tags), and disable the old transaction type. This renders basically all
of the aforementioned messages before that HF useless, with the possible exception of reserve proofs.

This commit also cleans up dead inclusions of boost serialization headers.

This commit is part of upstreaming Carrot/FCMP++. Killing support for Boost messages now means less boilerplate Boost serialization review for Carrot/FCMP++.
2025-05-30 14:24:56 -05:00
tobtoht
627bb04b98 Merge pull request #9851
70fe289d8 Improve move/copy/default constructor semantics for tx and block (Lee *!* Clagett)
2025-04-23 16:14:50 +00:00
tobtoht
977dedce2c Merge pull request #9865
0e243a4ac checkpoints: update to a recent block height (selsta)
2025-03-26 12:37:06 +00:00
selsta
0e243a4ac0 checkpoints: update to a recent block height 2025-03-25 21:28:20 +01:00
tobtoht
ba77342faa Merge pull request #9845
51a72c120 Blockchain: remove skip for pruned txs in `check_tx_inputs()` (jeffro256)
2025-03-24 02:53:13 +00:00
Lee *!* Clagett
70fe289d82 Improve move/copy/default constructor semantics for tx and block 2025-03-21 14:02:12 -04:00
jeffro256
51a72c1209 Blockchain: remove skip for pruned txs in check_tx_inputs()
I can't see how this would trigger in the current codebase, so it's not a *current* safety issue,
but I can very well see it becoming on in the future if downstream code doesn't handle the passing
of pruned transactions correctly. I think the safe/good choice would be to remove this skip now
that all transactions that pass into the mempool are supposed to be unpruned. And for all in-block
txs, `check_tx_inputs()` isn't called for checkpointed blocks, and we sync pruned blocks only if
syncing checkpointed blocks.
2025-03-17 09:31:50 -05:00
jeffro256
528664b1c8 cryptonote_protocol: fix handling of pruned blocks during sync 2025-03-17 09:09:25 -05:00
tobtoht
44523cafff Merge pull request #9135
c069c04ed blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
2025-03-10 16:16:18 +00:00
jeffro256
c069c04ede blockchain sync: reduce disk writes from 2 to 1 per tx 2025-03-10 01:02:37 -05:00
tobtoht
da470b7471 Merge pull request #9688
26b4f5e00 Revert "blockchain: detect and log bad difficulty calculations" (selsta)
2025-01-22 22:51:10 +00:00
tobtoht
b32c69aabd Merge pull request #9628
4344f97 Fix build with boost ASIO 1.87. Support boost 1.66+ (Lee *!* Clagett)
2025-01-14 14:24:07 +00:00
tobtoht
38668822b7 Merge pull request #9621
fe17069 Blockchain: get height of RingCT fork programmatically (jeffro256)
2025-01-14 14:13:06 +00:00
selsta
26b4f5e00c Revert "blockchain: detect and log bad difficulty calculations"
This reverts commit 5741b4d74d.
2025-01-14 13:04:25 +01:00
Lee *!* Clagett
4344f97255 Fix build with boost ASIO 1.87. Support boost 1.66+ 2025-01-06 18:05:25 -05:00
luigi1111
1122fa523a Merge pull request #9441
cfb19b9 blockchain: more opportunities for caching the rolling median (Crypto City)
2024-12-23 10:34:25 -05:00
luigi1111
61dd13dfa6 Merge pull request #9395
7fdaf61 Blockchain: fix temp fails causing alt blocks to be permanently invalid (jeffro256)
2024-12-23 10:32:02 -05:00
jeffro256
fe170698b1 Blockchain: get height of RingCT fork programmatically
Get height of the RingCT fork to start the output distributuon programmatically, instead of using a hardcoded index.

If using a hardcoded index, when the hardfork tables are modified, this can cause segmentation faults or horrific privacy issues: https://codeberg.org/wownero/wownero/issues/488#issuecomment-2514880.
2024-12-16 15:16:38 -06:00
Crypto City
cfb19b932f blockchain: more opportunities for caching the rolling median 2024-08-17 14:42:35 +00:00
luigi1111
a1dc85c537 Merge pull request #9416
ac0af73 rpc: add cumul weight field to block template resp (jeffro256)
2024-08-14 14:19:03 -04:00
jeffro256
ac0af73222 rpc: add cumul weight field to block template resp
Resolves #9415
2024-08-01 01:03:41 -05:00
selsta
3216165822 src: update checkpoints to match v0.18.3.4 (again) 2024-07-31 18:14:23 +02:00
luigi1111
330212888a Merge pull request #9383
9f83e74 Daemon RPC: /getblocks.bin return chain's top_block_hash in resp (j-berman)
2024-07-16 19:00:39 -04:00
luigi1111
e3cfaed278 Merge pull request #9346
0fad1a8 src: update checkpoints to match v0.18.3.4 (selsta)
2024-07-16 18:49:44 -04:00
jeffro256
7fdaf61d41 Blockchain: fix temp fails causing alt blocks to be permanently invalid 2024-07-11 00:43:38 -05:00
j-berman
9f83e7434d Daemon RPC: /getblocks.bin return chain's top_block_hash in resp 2024-06-24 17:58:20 -07:00
selsta
0fad1a8d08 src: update checkpoints to match v0.18.3.4 2024-05-29 15:59:56 +02:00
copyCat
341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
luigi1111
fc452bd546 Merge pull request #9282
b27fda2 src: update checkpoints to match latest release (selsta)
2024-05-20 23:36:28 -05:00
selsta
b27fda269e src: update checkpoints to match latest release 2024-04-06 00:53:05 +02:00
jeffro256
7194506792 Blockchain: remove old fee calc logic 2024-03-10 13:30:46 -05:00