-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(primitives, storage): save prune checkpoints in database (#3628)
- Loading branch information
Showing
7 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
mod checkpoint; | ||
mod mode; | ||
mod part; | ||
mod target; | ||
|
||
pub use checkpoint::PruneCheckpoint; | ||
pub use mode::PruneMode; | ||
pub use part::PrunePart; | ||
pub use target::PruneTargets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use reth_codecs::{main_codec, Compact}; | ||
|
||
/// Part of the data that can be pruned. | ||
#[main_codec] | ||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd)] | ||
pub enum PrunePart { | ||
/// Prune part responsible for the `TxSenders` table. | ||
SenderRecovery, | ||
/// Prune part responsible for the `TxHashNumber` table. | ||
TransactionLookup, | ||
/// Prune part responsible for the `Receipts` table. | ||
Receipts, | ||
/// Prune part responsible for the `AccountChangeSet` and `AccountHistory` tables. | ||
AccountHistory, | ||
/// Prune part responsible for the `StorageChangeSet` and `StorageHistory` tables. | ||
StorageHistory, | ||
} | ||
|
||
#[cfg(test)] | ||
impl Default for PrunePart { | ||
fn default() -> Self { | ||
Self::SenderRecovery | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters