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
Suppose the challenge period (i.e. BlockTreePruningDepth) of ER is 10 domain blocks, so the ER of #1 is considered confirmed when ER of #11 is submitted into the block tree.
But in the current implementation, the ER of #1 can be submitted any time before it is considered confirmed, so a malicious operator can submit an invalid ER of #1 when the head receipt number is #10 and right before ER of #11 is submitted. In this way, the invalid ER will be considered as confirmed before there is a fraud proof submitted and pruning it, then we will have 2 ERs of #1 considered as confirmed and will result in a MultipleERsAfterChallengePeriod error.
The correct ER should be considered as confirmed is the one that has 10 ERs built on top of it, but it is non-trivial to identify such an ER currently. It is also unnecessary because #1731 will fix the issue automatically by rejecting the invalid ER of #1 being submitted, if an operator wants to submit another ER of #1 it must submit a fraud proof to prune the current ER of #1 first.
Currently, the ER of
#N
is considered as confirmed whenever the ER of#(N + BlockTreePruningDepth)
is added to the block tree:https://github.com/subspace/subspace/blob/17225c4b10efb10fb0d4277de657236f32d0798b/crates/pallet-domains/src/block_tree.rs#L252-L263
Suppose the challenge period (i.e.
BlockTreePruningDepth
) of ER is 10 domain blocks, so the ER of#1
is considered confirmed when ER of#11
is submitted into the block tree.But in the current implementation, the ER of
#1
can be submitted any time before it is considered confirmed, so a malicious operator can submit an invalid ER of#1
when the head receipt number is#10
and right before ER of#11
is submitted. In this way, the invalid ER will be considered as confirmed before there is a fraud proof submitted and pruning it, then we will have 2 ERs of#1
considered as confirmed and will result in aMultipleERsAfterChallengePeriod
error.The correct ER should be considered as confirmed is the one that has 10 ERs built on top of it, but it is non-trivial to identify such an ER currently. It is also unnecessary because #1731 will fix the issue automatically by rejecting the invalid ER of
#1
being submitted, if an operator wants to submit another ER of#1
it must submit a fraud proof to prune the current ER of#1
first.cc @vedhavyas
The text was updated successfully, but these errors were encountered: