-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce the bundles contain ER that pointing to the last domain block or extend the head receipt #1731
Comments
This storage item is used to keek track of the immediate descendants of an ER, it is used during fraud proof processing to prune all the descendants of the targetted fraudulent ER. This storage item can be removed after this task #1731 is implemented, by then every ER should only have one immediate descendant Signed-off-by: linning <linningde25@gmail.com>
The receipt may already been pruned if there is fraud proof being processed and the is reverted. Test cases is added accordingly. This commit also add TODO for a non-trival to fix issue, and it is intended to fix with #1731 Signed-off-by: linning <linningde25@gmail.com>
We also need this constraint to reject invalid bundles that are produced accidentally by honest operators that lag behind the latest domain chain. Without this constraint, the lagging operator could win the challenge and produce a bundle, but the bundle is validated against the lagging domain chain instead of the latest domain chain, so it may be considered an invalid bundle and cause the operator to get slashed. With this constraint, the lagging operator's bundle will be rejected (thus no slash) since its ER is not deriving from the latest domain block and doesn't extend the head ER. The constraint will ensure only the operator has progressed its local domain chain to the latest and carries the latest ER in its bundle, which means the bundle is validated against the latest domain chain, and then the bundle will be accepted. Noted, there is still a race condition that, the operator has build & import the latest domain block, and then it immediately builds and submits the bundle with the tx in its tx pool, before the tx is validated against the latest block (which happens asynchronously in the |
Add more constraints to the ER to simply the overall design:
last_domain_block_number
==current_head_receipt
, then only ER that points to the last domain block is acceptablelast_domain_block_number
>current_head_receipt
, then the bundle can contain multiple ERs, the first ER must extend the head receipt and these ERs must be consecutive.last_domain_block_number
is rejected since it is invalid obviously.With the above changes most of the
ReceiptType::NewBranch
usage can be eliminated, and with the multiple ER changes #1673 is also fixed.Estimation: 3-4 days
The text was updated successfully, but these errors were encountered: