You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, even the user can specify the state_pruning and blocks_pruning in the domain cli arguments but only the finalized blocks are subject to removal and the domain block finalization is disabled:
So no matter what the domain state_pruning and blocks_pruning specified to, the domain block/state won't be pruned and the node will occupy more and more space as running.
We can enable domain block finalization but there are some requirements for the domain block/state from FP and XDM that we should consider first:
For fraud proof, the FP generation requires the domain block/state so the domain node must keep all the domain blocks that have not passed the challenge period yet
For XDM, the relayer can only relay the XDM after the domain block that contains the XDM is confirmed, i.e. passed the challenge period, if the domain block is pruned immediately after becoming confirmed then the relayer may fail to generate XDM due to there is race condition and the block just be pruned before the relayer start to handle the block. So the node should also keep some confirmed domain block to workaround the race condition.
TLDR: to enable proper domain block/state pruning we need:
Enable domain block finalization (by uncommenting the above linked code)
Check the state_pruning and blocks_pruning arg to at least keep challenge period + N or challenge period * N where N is used to keep extra confirmed domain block for the XDM relayer
Remove the aux storage for the pruned domain block
Keep compatible with the incoming domain snap sync
The text was updated successfully, but these errors were encountered:
Currently, even the user can specify the
state_pruning
andblocks_pruning
in the domain cli arguments but only the finalized blocks are subject to removal and the domain block finalization is disabled:subspace/domains/client/domain-operator/src/domain_block_processor.rs
Lines 325 to 339 in 129f35f
So no matter what the domain
state_pruning
andblocks_pruning
specified to, the domain block/state won't be pruned and the node will occupy more and more space as running.We can enable domain block finalization but there are some requirements for the domain block/state from FP and XDM that we should consider first:
TLDR: to enable proper domain block/state pruning we need:
state_pruning
andblocks_pruning
arg to at least keepchallenge period + N
orchallenge period * N
whereN
is used to keep extra confirmed domain block for the XDM relayerThe text was updated successfully, but these errors were encountered: