Skip to content

pbss: support to load legacy async buffer format#2819

Merged
zzzckck merged 8 commits intobnb-chain:developfrom
galaio:fix-pbss-journal-issue
Dec 25, 2024
Merged

pbss: support to load legacy async buffer format#2819
zzzckck merged 8 commits intobnb-chain:developfrom
galaio:fix-pbss-journal-issue

Conversation

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

zzzckck
zzzckck previously approved these changes Dec 24, 2024
@zzzckck zzzckck merged commit b6e1d5f into bnb-chain:develop Dec 25, 2024
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