Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sync failed from genesis #401

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

j75689
Copy link
Collaborator

@j75689 j75689 commented Mar 7, 2024

Description

Sync blocks starting from genesis will fail on the first block.

{"level":"error","module":"server","module":"blockchain","err":"wrong Block.Header.LastResultsHash.  Expected 6908820926ED68A842B585BD1927F47F3853DC66EBA2A66AE899688848963151, got 007F040A8F62D6EEDD4B62FD11B145756DD5E6D47286280839DA676390F8F57C","time":"2024-03-07T15:07:17+08:00","message":"Error in validation"}

Rationale

After Nagqu, the KV read gas will be set to 0 (#300).
However, "InitUpgraded" per block was added in v1.4.0(#391), if this happens before the Nagqu upgrade or at the same height, this will cause the gas reading to increase, causing begin_block_extra_data, end_block_extra_data produces different results

Example

n/a

Changes

Notable changes:

  • upgrade module

@j75689 j75689 force-pushed the fix/sync_from_genesis branch from 5ad3236 to fc25bc2 Compare March 7, 2024 07:48
@j75689 j75689 added this pull request to the merge queue Mar 7, 2024
Merged via the queue into bnb-chain:master with commit 74c1626 Mar 7, 2024
15 checks passed
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.

4 participants