1579 Commits

Author SHA1 Message Date
tobtoht
337525d3d0 Merge pull request #10192
38bc627 Blockchain: cancel pop_blocks() operation on interupt (jeffro256)
2025-11-26 18:23:06 +00: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
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
tobtoht
adc395577a Merge pull request #10103
bc8b210 Send ZMQ miner notifications after txpool additions (WeebDataHoarder)
2025-09-28 18:33:35 +00: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
nahuhh
935f2d20ec cryptonote_core: --dns-versions-check is deprecated 2025-09-21 18:52:25 +00: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
tobtoht
389e3ba1df Merge pull request #10020
c08f111 src: update checkpoints to match v0.18.4.2 (selsta)
2025-08-05 16:10:10 +00:00
selsta
c08f1114de src: update checkpoints to match v0.18.4.2 2025-08-01 17:27:51 +02:00
jeffro256
377071ea89 cryptonote_core: remove blockchain_storage_boost_serialization.h
unused
2025-07-24 02:22:14 -05: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
c2e3835223 Merge pull request #9910
d106e21b7 src: fix clangd warnings (0xFFFC0000)
2025-05-07 03:32:02 +00:00
0xFFFC0000
d106e21b74 src: fix clangd warnings 2025-05-01 05:27:35 +00:00
tobtoht
d2d976ca5a Merge pull request #9404
f4672c259 cryptonote_core: only verify txpool when the hardfork value has changed. (0xFFFC0000)
2025-04-24 16:13:01 +00:00
tobtoht
56ee3d2765 Merge pull request #9872
6d6e8e173 construct_tx_and_get_tx_key: don't erase exception trace (jeffro256)
2025-04-23 16:22:25 +00: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
jeffro256
6d6e8e1733 construct_tx_and_get_tx_key: don't erase exception trace 2025-03-26 15:10:09 -05: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
0xFFFC0000
f4672c2595 cryptonote_core: only verify txpool when the hardfork value has changed.
Co-authored-by: Boog900 <boog900@tutanota.com>
2025-02-24 17:25:27 +00: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
luigi1111
25dcb8dc9f Merge pull request #9376
445319d src: update internal data structure to boost::bimap. startup speed up 2-5x because this PR changing O(n^2) operation to O(nlogn). (0xFFFC0000)
2024-12-23 10:27:17 -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
jeffro256
ed955bf751 build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions
3. Removed reimplementation of `std::hash` for `boost::uuids::uuid
4. Removed `<<` operator overload for `crypto::secret_key`
5. Removed instances in code where private view key was dumped to the log in plaintext
2024-09-06 11:46:22 -05:00
Crypto City
cfb19b932f blockchain: more opportunities for caching the rolling median 2024-08-17 14:42:35 +00:00