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/state: replace writing TrieJournal to the database with a journal file #11

Conversation

jingjunLi
Copy link

@jingjunLi jingjunLi commented Apr 1, 2024

Description

When the traffic is high, and BSC shuts down, the PBSS's TrieJournal becomes a large key-value pair (over 2GB), which can cause bugs in Pebble. To address this issue, we use a journal log file to store the TrieJournal instead of persisting it to the database.

Rationale

Changes:

Data Format

Journal Version
Disk Root
Disk Layer
-- **Layer Length**
-- Root
-- State ID
-- Buffer Nodes
-- **Layer Checksum**
Diff Layer
-- **Layer Length**
-- Root
-- Block
-- Trie Nodes
-- Journal Accounts
-- **Layer Checksum**
Journal Path: geth/chaindata/ancient/state.journal

Checksum: SHA256

Example

add an example CLI or API response...

Changes

Notable changes:

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

zzzckck and others added 30 commits March 12, 2024 14:57
@jingjunLi jingjunLi changed the title Integrate snapshot database to pathdb journal core/state: replace writing TrieJournal to the database with a journal file Apr 1, 2024
@fynnss fynnss force-pushed the integrate_snapshot_database_to_pathdb branch 3 times, most recently from 33ad452 to 9392ea0 Compare April 3, 2024 09:56
@fynnss fynnss force-pushed the integrate_snapshot_database_to_pathdb branch 4 times, most recently from 77c2c7f to d33cc0b Compare April 15, 2024 08:54
@fynnss fynnss closed this 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.

5 participants