Skip to content

Total Difficulty (TD)

The total-difficulty machinery upstream removed when it nuked TD (#30809): rawdb accessors, the freezer column, headerchain/blockchain TD tracking, and PoW fork choice.

Nature Count
🔄 Revived (from upstream pre-purge) 13
✏️ In-place (modified on upstream) 14
🆕 New (fork-only, no upstream pedigree) 4

🔄 Revived (from upstream pre-purge)

Code upstream deleted, transplanted back from the commit just before its removal.

Change Kind Origin Δ vs origin
BlockChain.GetTd symbol core_geth view
BlockChain.WriteTd symbol purge1 +5 -1 view
ChainSideEvent symbol purge_events +3 -3 view
DeleteTd symbol purge1 view
HeaderChain.GetTd symbol purge1 view
HeaderChain.deleteTd symbol purge1 +3 -0 view
NewMinedBlockEvent symbol purge_events view
ReadTd symbol purge1 view
ReadTdRLP symbol purge1 view
SubscribeChainSideEvent symbol purge_events +7 -2 view
WriteTd symbol purge1 view
headerTDKey symbol purge1 view
writeAncientBlockPoW symbol purge4 +1 -1 view

✏️ In-place (modified on upstream)

Upstream files the fork edits in place; the diff is against upstream v1.17.3.

Change Kind Origin Δ vs origin
BlockChain.InsertHeadersBeforeCutoff (TD) symbol upstream v1.17.3 +23 -2 view
BlockChain.InsertReceiptChain (TD) symbol upstream v1.17.3 +26 -3 view
BlockChain.ResetWithGenesisBlock (TD) symbol upstream v1.17.3 +1 -0 view
DeleteBlock (TD) symbol upstream v1.17.3 +1 -0 view
DeleteBlockWithoutNumber (TD) symbol upstream v1.17.3 +1 -0 view
HeaderChain.WriteHeaders (TD) symbol upstream v1.17.3 +19 -0 view
WriteAncientBlocksPoW symbol upstream v1.17.3 +6 -3 view
WriteAncientHeaderChainPoW symbol upstream v1.17.3 +8 -4 view
core/blockchain.go file upstream v1.17.3 +87 -7 view
core/genesis.go file upstream v1.17.3 +7 -1 view
core/headerchain.go file upstream v1.17.3 +26 -1 view
core/rawdb/accessors_chain.go file upstream v1.17.3 +10 -1 view
core/rawdb/ancient_scheme.go file upstream v1.17.3 +8 -4 view
core/rawdb/chain_freezer.go file upstream v1.17.3 +8 -0 view

🆕 New (fork-only)

Files with no upstream pedigree — the highest-scrutiny changes.

Change Kind Origin Δ vs origin
SubscribeSideBlocks symbol 🆕 view
core/blockchain_etc_test.go file 🆕 view
core/headerchain_etc_test.go file 🆕 view
core/rawdb/accessors_chain_etc_test.go file 🆕 view

← Code Changes overview · Coverage