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

pbss: support to load legacy async buffer format #2819

Merged
merged 8 commits into from
Dec 25, 2024

Conversation

galaio
Copy link
Contributor

@galaio galaio commented Dec 20, 2024

Description

This PR fixes a legacy journal format issue, it tries to load an async buffer in a legacy journal file.

When the PR is enabled, the node can read the async buffer correctly.

logs/bsc.log.2024-12-20_11:t=2024-12-20T11:15:10+0000 lvl=info msg="New async node buffer" limit="256.00 MiB" layers=44221
logs/bsc.log.2024-12-20_12:t=2024-12-20T12:15:37+0000 lvl=info msg="Failed to load journal, discard it" err="unexpected journal version want 2 got 0"

It will fix the issue #2796.

Changes

Notable changes:

  • pbss: support to load legacy async buffer format;
  • ...

@galaio
Copy link
Contributor Author

galaio commented Dec 23, 2024

PBSS journal history change:

  1. journal ver1, core/state, trie/triedb/pathdb: remove storage incomplete flag ethereum/go-ethereum#28940
  2. journal ver2, triedb/pathdb: track flat state changes in pathdb (snapshot integration pt 2) ethereum/go-ethereum#30643

The async buffer saved in the journal only changes in ver2, so we need to handle the legacy async buffer ver0/ver1 in the same way.

triedb/pathdb/journal.go Outdated Show resolved Hide resolved
zzzckck
zzzckck previously approved these changes Dec 24, 2024
@zzzckck zzzckck merged commit b6e1d5f into bnb-chain:develop Dec 25, 2024
6 of 7 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