Skip to content

Conversation

@mirgee
Copy link
Contributor

@mirgee mirgee commented Jan 14, 2026

Adds new CLI options:

  • --Xchain-pruning-bals-retained - sets the number of retained BALs, must be <= --Xchain-pruning-blocks-retained
  • --Xchain-pruning-bals-frequency - the time in blocks after which BAL pruning is executed
  • --Xchain-bal-pruning-enabled - whether BAL pruning is enabled (default: true)

The relationship between BALs and blocks retained is currently enforced because both pruning task use forkBlocks, but only one can be responsible for deleting them (which is the block pruning task) without further changes. However, this restriction only applies if --Xchain-pruning-enabled, which it isn't by default, so removing this restriction was considered lower priority for now.

Breaking changes:

The option --Xchain-pruning-blocks-blocks-limit was renamed to --Xchain-pruning-blocks-bals-limit, as it sets the lower bound on the number of BALs retained (and then only indirectly on blocks retained). This is debatable as if BAL pruning is disabled, it still bounds blocks retained.

By default, the minimal number of BALs retained (and hence the minimum number of blocks retained) is 3533 * 32 = 417792. This lower bound can be overriden by setting a lower --Xchain-pruning-blocks-bals-limit, for example for purposes of networks without BALs or WSP.

TODO:

  • Pruning blocks but not BALs is violating the invariant BALs retained <= blocks retained.
  • Test.

Based on #9629 .

@mirgee mirgee force-pushed the bal-retention-policy branch 2 times, most recently from d282594 to 682a5cf Compare January 15, 2026 20:22
@mirgee mirgee marked this pull request as ready for review January 18, 2026 16:37
@mirgee mirgee force-pushed the bal-retention-policy branch 2 times, most recently from 2cf48b5 to d095ff3 Compare January 21, 2026 15:26
@macfarla macfarla moved this to Open PRs in 26.1.0 Release Jan 22, 2026
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
…s-retained-limit

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
@mirgee mirgee force-pushed the bal-retention-policy branch from d095ff3 to 7c42e69 Compare January 22, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Open PRs

Development

Successfully merging this pull request may close these issues.

EIP-7928 - Block-level Access Lists : change BAL retention period to WSP

2 participants