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

core: write head block hash when shutdown #1912

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

NathanBSC
Copy link
Contributor

@NathanBSC NathanBSC commented Oct 10, 2023

Description

core: write head block hash when shutdown

Rationale

  1. without write down head block hash, prune state may get error as following
WARN [10-10|08:59:59.106] Failed to load snapshot                  err="head doesn't match snapshot: have 0x386c55a45a2dc49e8152eb7e43843edffae9214e3bb7d3a50224b11a3f62e9b0, want 0x11968cf7a00e02b1cfd477f8d39c17871d54cfce0b60c24b207ad23a782e3222"
ERROR[10-10|08:59:59.107] Failed to open snapshot tree             err="head doesn't match snapshot: have 0x386c55a45a2dc49e8152eb7e43843edffae9214e3bb7d3a50224b11a3f62e9b0, want 0x11968cf7a00e02b1cfd477f8d39c17871d54cfce0b60c24b207ad23a782e3222"
  1. when run triedb.Dereference in a go routine, may report error in log
Dangling trie nodes after full cleanup

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@buddh0 buddh0 merged commit 35d85e2 into bnb-chain:master Oct 11, 2023
5 checks passed
@NathanBSC NathanBSC deleted the write_head_block_hash_when_stop branch October 12, 2023 02:02
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.

5 participants