feat: reth drop-stage merkle (#1941)

This commit is contained in:
Georgios Konstantopoulos
2023-03-23 14:12:50 -07:00
committed by GitHub
parent d580b5a185
commit 1ce021f250
3 changed files with 14 additions and 0 deletions

View File

@@ -172,6 +172,7 @@ impl Command {
BlockTransitionIndex,
TxTransitionIndex,
SyncStage,
SyncStageProgress,
Transactions
]);
}

View File

@@ -72,6 +72,18 @@ impl Command {
Ok::<_, eyre::Error>(())
})??;
}
StageEnum::Merkle => {
tool.db.update(|tx| {
tx.clear::<tables::AccountsTrie>()?;
tx.clear::<tables::StoragesTrie>()?;
tx.put::<tables::SyncStageProgress>(
// TODO: Extract to constant in `TrieLoader` in trie/mod.rs
"TrieLoader".to_string(),
Vec::new(),
)?;
Ok::<_, eyre::Error>(())
})??;
}
_ => {
info!("Nothing to do for stage {:?}", self.stage);
}

View File

@@ -29,4 +29,5 @@ enum StageEnum {
Bodies,
Senders,
Execution,
Merkle,
}