Skip to content

drop the BlockStateCache from calcFees/finalize (P4) - #23207

Draft
sudeepdino008 wants to merge 1 commit into
sudeepdino008/bsc-drop-committed-tierfrom
sudeepdino008/bsc-drop-calcfees-finalize-buffer
Draft

drop the BlockStateCache from calcFees/finalize (P4)#23207
sudeepdino008 wants to merge 1 commit into
sudeepdino008/bsc-drop-committed-tierfrom
sudeepdino008/bsc-drop-calcfees-finalize-buffer

Conversation

@sudeepdino008

@sudeepdino008 sudeepdino008 commented Aug 12, 2026

Copy link
Copy Markdown
Member

The per-tx calcFees and block-finalize steps share one base stateReader. It uses BlockStateCache (specifically, the current fields) as fallback, because the versionMap was not a strict superset of the buffer (there was a case of EIP-161 clearing accounts)

But #23149 fixes this...such that versionMap truly carried the in-block accumulated writes properly. This allows us to use versionMap for the stateReader, and remove BlockStateCache here.

  • historic path: NewHistoryReaderV3WithSharedDomains (was ...WithBlockCache)
  • current path: NewReaderV3 (was NewCurrentCachedReaderV3)

Verified: mainnet re-exec through block 2,676,607 (the EIP-161 sweep block that previously surfaced a wrong trie root) → 0 wrong roots.

Stacked on #23171.

@sudeepdino008 sudeepdino008 changed the title execution/stagedsync: drop the block write buffer from the calcFees/finalize base reader (#23140) execution/stagedsync: drop the block write buffer from the calcFees/finalize base reader (P4) Aug 12, 2026
@sudeepdino008 sudeepdino008 changed the title execution/stagedsync: drop the block write buffer from the calcFees/finalize base reader (P4) execution/stagedsync: drop the BlockStateCache from the calcFees/finalize base reader (P4) Aug 12, 2026
@sudeepdino008 sudeepdino008 changed the title execution/stagedsync: drop the BlockStateCache from the calcFees/finalize base reader (P4) execution/stagedsync: drop the BlockStateCache from calcFees/finalize (P4) Aug 12, 2026
@sudeepdino008 sudeepdino008 changed the title execution/stagedsync: drop the BlockStateCache from calcFees/finalize (P4) drop the BlockStateCache from calcFees/finalize (P4) Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant