Skip to content

fix: trieJournal format compatible old db format#2395

Merged
zzzckck merged 4 commits intobnb-chain:developfrom
jingjunLi:develop_fix_journal
Apr 16, 2024
Merged

fix: trieJournal format compatible old db format#2395
zzzckck merged 4 commits intobnb-chain:developfrom
jingjunLi:develop_fix_journal

Conversation

@jingjunLi
Copy link
Copy Markdown
Contributor

@jingjunLi jingjunLi commented Apr 15, 2024

Description

If trieJournal is stored in the database, it retains the old journal format; if trieJournal writes to the journal file using the new journal format;

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

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

@jingjunLi jingjunLi requested a review from zzzckck as a code owner April 15, 2024 12:28
RenRick
RenRick previously approved these changes Apr 15, 2024
Copy link
Copy Markdown

@RenRick RenRick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

fynnss
fynnss previously approved these changes Apr 16, 2024
Copy link
Copy Markdown
Contributor

@fynnss fynnss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NathanBSC
Copy link
Copy Markdown
Contributor

can we avoid to change the interface of function loadDiffLayer, loadDiskLayer and journal?
we can already get JournalFilePath by db.config.JournalFilePath

@NathanBSC
Copy link
Copy Markdown
Contributor

why a field length is need?
rlp decode will not use it, I also can't see other usage

@jingjunLi
Copy link
Copy Markdown
Contributor Author

can we avoid to change the interface of function loadDiffLayer, loadDiskLayer and journal? we can already get JournalFilePath by db.config.JournalFilePath

We can avoid changing the interface of functions loadDiffLayer and loadDiskLayer. However, the journal is called by diffLayer and diskLayer, which cannot access db.config.JournalFilePath.

@jingjunLi jingjunLi dismissed stale reviews from fynnss and RenRick via 821c411 April 16, 2024 03:23
@zzzckck zzzckck merged commit 90eb5b3 into bnb-chain:develop Apr 16, 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.

6 participants