Skip to content

Commit 6ef03eb

Browse files
authored
chore: remove all calls to forest_statediff in the daemon (#2380)
1 parent 72769bc commit 6ef03eb

8 files changed

Lines changed: 5 additions & 29 deletions

File tree

Cargo.lock

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

blockchain/chain_sync/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ forest_message = { workspace = true, features = ["blst"] }
2424
forest_message_pool.workspace = true
2525
forest_networks.workspace = true
2626
forest_state_manager.workspace = true
27-
forest_statediff.workspace = true
2827
forest_utils.workspace = true
2928
futures-util.workspace = true
3029
futures.workspace = true
@@ -55,7 +54,3 @@ fvm_ipld_car.workspace = true
5554
hex.workspace = true
5655
quickcheck_macros.workspace = true
5756
serde_json.workspace = true
58-
59-
[features]
60-
rocksdb = ["forest_statediff/rocksdb"]
61-
paritydb = ["forest_statediff/paritydb"]

blockchain/chain_sync/src/tipset_syncer.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,15 +1347,6 @@ async fn validate_block<DB: Blockstore + Store + Clone + Sync + Send + 'static,
13471347
})?;
13481348

13491349
if &state_root != header.state_root() {
1350-
if let Err(err) = forest_statediff::print_state_diff(
1351-
v_state_manager.blockstore(),
1352-
&state_root,
1353-
header.state_root(),
1354-
Some(1),
1355-
) {
1356-
eprintln!("Failed to print state-diff: {err}");
1357-
}
1358-
13591350
return Err(TipsetRangeSyncerError::<C>::Validation(format!(
13601351
"Parent state root did not match computed state: {} (header), {} (computed)",
13611352
header.state_root(),

blockchain/state_manager/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ forest_legacy_ipld_amt.workspace = true
2525
forest_message = { workspace = true, features = ["blst"] }
2626
forest_metrics.workspace = true
2727
forest_networks.workspace = true
28-
forest_statediff.workspace = true
2928
forest_utils.workspace = true
3029
futures.workspace = true
3130
fvm.workspace = true

blockchain/state_manager/src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,14 +1147,6 @@ where
11471147
let mut last_receipt = *ts_chain.last().unwrap().blocks()[0].message_receipts();
11481148
for ts in ts_chain.iter().rev() {
11491149
if ts.parent_state() != &last_state {
1150-
forest_statediff::print_state_diff(
1151-
self.blockstore(),
1152-
&last_state,
1153-
ts.parent_state(),
1154-
Some(1),
1155-
)
1156-
.unwrap();
1157-
11581150
anyhow::bail!(
11591151
"Tipset chain has state mismatch at height: {}, {} != {}, \
11601152
receipts mismatched: {}",

forest/cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ rand.workspace = true
7070

7171
[features]
7272
default = ["rocksdb"]
73-
rocksdb = ["forest_cli_shared/rocksdb", "forest_chain_sync/rocksdb"]
74-
paritydb = ["forest_cli_shared/paritydb", "forest_chain_sync/paritydb"]
73+
rocksdb = ["forest_cli_shared/rocksdb"]
74+
paritydb = ["forest_cli_shared/paritydb"]
7575
slow_tests = []

forest/daemon/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ rand.workspace = true
8484

8585
[features]
8686
default = ["forest_fil_cns", "rocksdb"]
87-
rocksdb = ["forest_db/rocksdb", "forest_cli_shared/rocksdb", "forest_chain_sync/rocksdb"]
88-
paritydb = ["forest_db/paritydb", "forest_cli_shared/paritydb", "forest_chain_sync/paritydb"]
87+
rocksdb = ["forest_db/rocksdb", "forest_cli_shared/rocksdb"]
88+
paritydb = ["forest_db/paritydb", "forest_cli_shared/paritydb"]
8989
insecure_post = ["forest_fil_cns/insecure_post"]
9090
forest_fil_cns = ["dep:forest_fil_cns"]
9191
forest_deleg_cns = ["dep:forest_deleg_cns"]

utils/statediff/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
3737
[features]
3838
paritydb = ["forest_db/paritydb"]
3939
rocksdb = ["forest_db/rocksdb"]
40+
default = ["rocksdb"]

0 commit comments

Comments
 (0)