Skip to content

Commit 4fc40a9

Browse files
meyer9dhyaniarun1993emhane
committed
feat: implement initial sync backfill job (#196)
Based on #183 This PR adds a backfill job that accepts a DB transaction and copies the current state to the database. The transaction ensures we see a consistent view of the database at the current block, even if the node is syncing. This requires `--db.read-transaction-timeout 0`. This currently doesn't handle interrupting the job because the state may update while syncing and may read a different version of the database upon restart. --------- Co-authored-by: Arun Dhyani <[email protected]> Co-authored-by: Emilia Hane <[email protected]>
1 parent cff785d commit 4fc40a9

File tree

6 files changed

+718
-9
lines changed

6 files changed

+718
-9
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/exex/external-proofs/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ reth-exex.workspace = true
1818
alloy-primitives = { workspace = true }
1919

2020
# reth
21+
reth-chainspec.workspace = true
2122
reth-db-api.workspace = true
2223
reth-node-types.workspace = true
2324
reth-node-api.workspace = true
@@ -33,17 +34,21 @@ futures-util.workspace = true
3334
serde.workspace = true
3435
thiserror.workspace = true
3536
tokio.workspace = true
37+
tracing.workspace = true
3638

3739
# dev dependencies
3840
[dev-dependencies]
3941
tokio = { workspace = true, features = ["test-util", "rt-multi-thread", "macros"] }
4042
test-case.workspace = true
4143
futures.workspace = true
44+
reth-db = { workspace = true, features = ["test-utils"] }
4245

4346
[features]
4447
test-utils = [
4548
"reth-primitives-traits/test-utils",
4649
"reth-db-api/test-utils",
4750
"reth-provider/test-utils",
4851
"reth-trie/test-utils",
52+
"reth-db/test-utils",
53+
"reth-chainspec/test-utils",
4954
]

0 commit comments

Comments
 (0)