Skip to content

check-commitment-hist-at-blk-range: support empty blocks, sampling logic extraction#19642

Open
AskAlexSharov wants to merge 17 commits intomainfrom
alex/sampler_34
Open

check-commitment-hist-at-blk-range: support empty blocks, sampling logic extraction#19642
AskAlexSharov wants to merge 17 commits intomainfrom
alex/sampler_34

Conversation

@AskAlexSharov
Copy link
Collaborator

@AskAlexSharov AskAlexSharov commented Mar 5, 2026

  • relax check when several empty blocks (same state root)
  • sampling logic extraction
for blockNum := range sampler.BlockNums(from, to) {

or

for start := fromBlock; start <= toBlock; start += chunkSize {
	if sampler.CanSkip() {
		continue
	}

Also:

  • enable CommitmentHistVal by default - with --sample support

return err
}
for gapBlock := latestBlockNum + 1; gapBlock < blockNum; gapBlock++ {
gapHeader, err := br.HeaderByNumber(ctx, tx, gapBlock)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this loop and check for empty blocks?
we can just compare with header stateroot hash and be done. That's enough check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, i still see the "verify gap blocks" logic
I don't think we need checks for empty blocks? is it adding anything? we can remove it and keep things simple.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we don't know "are they really empty?" - need proof by headers root compare
  2. even if "empty blocks" are real - we still need to check: that our StateHistory doesn't have any history events in this blocks.

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.

2 participants