Skip to content

core: write head block hash when shutdown#1912

Merged
buddh0 merged 1 commit intobnb-chain:masterfrom
node-real:write_head_block_hash_when_stop
Oct 11, 2023
Merged

core: write head block hash when shutdown#1912
buddh0 merged 1 commit intobnb-chain:masterfrom
node-real:write_head_block_hash_when_stop

Conversation

@NathanBSC
Copy link
Copy Markdown
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
@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