Skip to content

Commit ad1674d

Browse files
feat: Parallellize snapshot creation (#1799)
Snapshot generation is now concurrent.
1 parent 0c513e8 commit ad1674d

24 files changed

+1335
-696
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Description of the upcoming release here.
2525

2626
### Added
2727

28+
- [#1799](https://github.com/FuelLabs/fuel-core/pull/1799) Snapshot creation is now concurrent.
2829
- [#1786](https://github.com/FuelLabs/fuel-core/pull/1786): Regenesis now includes off-chain tables.
2930
- [#1716](https://github.com/FuelLabs/fuel-core/pull/1716): Added support of WASM state transition along with upgradable execution that works with native(std) and WASM(non-std) executors. The `fuel-core` now requires a `wasm32-unknown-unknown` target to build.
3031
- [#1770](https://github.com/FuelLabs/fuel-core/pull/1770): Add the new L1 event type for forced transactions.

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ parking_lot = "0.12"
9797
tokio = { version = "1.27", default-features = false }
9898
tokio-rayon = "2.1.0"
9999
tokio-stream = "0.1"
100+
tokio-util = { version = "0.7", default-features = false }
100101
tracing = "0.1"
101102
thiserror = "1.0"
102103
futures = "0.3"

bin/fuel-core/Cargo.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@ dirs = "4.0"
2323
dotenvy = { version = "0.15", optional = true }
2424
fuel-core = { workspace = true }
2525
fuel-core-chain-config = { workspace = true }
26-
fuel-core-storage = { workspace = true, optional = true }
2726
fuel-core-types = { workspace = true }
2827
hex = "0.4"
2928
humantime = "2.1"
30-
itertools = { workspace = true, optional = true }
3129
pyroscope = "0.5"
3230
pyroscope_pprofrs = "0.2"
33-
serde = { workspace = true }
3431
serde_json = { workspace = true }
3532
tikv-jemallocator = { workspace = true }
3633
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
@@ -44,9 +41,12 @@ url = { version = "2.2", optional = true }
4441

4542
[dev-dependencies]
4643
fuel-core = { workspace = true, features = ["test-helpers"] }
44+
fuel-core-storage = { workspace = true }
4745
fuel-core-types = { workspace = true, features = ["test-helpers"] }
46+
itertools = { workspace = true }
4847
pretty_assertions = { workspace = true }
4948
rand = { workspace = true }
49+
serde = { workspace = true }
5050
tempfile = { workspace = true }
5151
test-case = { workspace = true }
5252

@@ -56,11 +56,7 @@ env = ["dep:dotenvy"]
5656
p2p = ["fuel-core/p2p", "const_format"]
5757
relayer = ["fuel-core/relayer", "dep:url"]
5858
parquet = ["fuel-core-chain-config/parquet", "fuel-core-types/serde"]
59-
rocksdb = ["fuel-core/rocksdb", "dep:fuel-core-storage", "dep:itertools"]
60-
rocksdb-production = [
61-
"fuel-core/rocksdb-production",
62-
"dep:fuel-core-storage",
63-
"dep:itertools",
64-
]
59+
rocksdb = ["fuel-core/rocksdb"]
60+
rocksdb-production = ["fuel-core/rocksdb-production"]
6561
# features to enable in production, but increase build times
6662
production = ["env", "relayer", "rocksdb-production", "p2p", "parquet"]

bin/fuel-core/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub async fn run_cli() -> anyhow::Result<()> {
127127
Ok(opt) => match opt.command {
128128
Fuel::Run(command) => run::exec(command).await,
129129
#[cfg(any(feature = "rocksdb", feature = "rocksdb-production"))]
130-
Fuel::Snapshot(command) => snapshot::exec(command),
130+
Fuel::Snapshot(command) => snapshot::exec(command).await,
131131
Fuel::GenerateFeeContract(command) => fee_contract::exec(command).await,
132132
},
133133
Err(e) => {

0 commit comments

Comments
 (0)