396: Don't skip any blocks if the head of the chain advances by more than one block. #397

Merged
telackey merged 7 commits from telackey/396 into v1.11.6-statediff-v5 2023-07-06 17:00:59 +00:00
Member

As https://github.com/cerc-io/go-ethereum/issues/396 shows, we can get scenarios when the chain advances by more than a single block, but the event which is seen by the WriteLoop will only be for the new head block--however many blocks in advance it is--allowing gaps to open in the statediffing.

This code will detect and trigger statediffing for the skipped blocks. The functionality is similar to the previous "head gap" filling code. Similar enough that we are able to remove that code and allow this to cover both cases.

As https://github.com/cerc-io/go-ethereum/issues/396 shows, we can get scenarios when the chain advances by more than a single block, but the event which is seen by the WriteLoop will only be for the new head block--however many blocks in advance it is--allowing gaps to open in the statediffing. This code will detect and trigger statediffing for the skipped blocks. The functionality is similar to the previous "head gap" filling code. Similar enough that we are able to remove that code and allow this to cover both cases.
dboreham reviewed 2023-06-30 05:16:59 +00:00
i-norden approved these changes 2023-07-06 13:41:51 +00:00
i-norden left a comment
Member

LGTM!

LGTM!
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#397
No description provided.