Skip to content

Commit

Permalink
Better configurability for consensus storage GC
Browse files Browse the repository at this point in the history
Add target, minimum retentions and target usage, like the archival
pruner. This allows us to take full advantage of the storage space
if we have it, keeping data around for longer, while still ensuring
we keep it around long *enough* even if we are low on space.
  • Loading branch information
jbearer committed Nov 13, 2024
1 parent bef771b commit 268acb4
Show file tree
Hide file tree
Showing 3 changed files with 283 additions and 77 deletions.
4 changes: 3 additions & 1 deletion sequencer/api/public-env-vars.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ variables = [
"ESPRESSO_SEQUENCER_CATCHUP_MAX_RETRY_DELAY",
"ESPRESSO_SEQUENCER_CDN_ENDPOINT",
"ESPRESSO_SEQUENCER_CHUNK_FETCH_DELAY",
"ESPRESSO_SEQUENCER_CONSENSUS_VIEW_RETENTION",
"ESPRESSO_SEQUENCER_CONSENSUS_STORAGE_MINIMUM_RETENTION",
"ESPRESSO_SEQUENCER_CONSENSUS_STORAGE_TARGET_RETENTION",
"ESPRESSO_SEQUENCER_CONSENSUS_STORAGE_TARGET_USAGE",
"ESPRESSO_SEQUENCER_FETCH_RATE_LIMIT",
"ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS",
"ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT",
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/api/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl SequencerDataSource for DataSource {
let fetch_limit = opt.fetch_rate_limit;
let active_fetch_delay = opt.active_fetch_delay;
let chunk_fetch_delay = opt.chunk_fetch_delay;
let mut cfg = Config::try_from(opt)?;
let mut cfg = Config::try_from(&opt)?;

if reset {
cfg = cfg.reset_schema();
Expand Down
Loading

0 comments on commit 268acb4

Please sign in to comment.