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
feat: Re-sign failed CCMs #4277
Conversation
information to send the CCM call themselves
0639783
to
6fad5e3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some edits too because it was easier than commenting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep an eye on #4207 , I imagine there might be some conflicts.
Fixed integration test harness that crashes at the 3rd epoch Added a integration test to ensure test harness can advance to further epochs
I've made a small change to the integration test harness's Polkadot signer so we can move past epoch 3 without error. This may conflict with Ramiz' change, but should be easy to resolve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Roy
Pull Request
Closes: PRO-263
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
When CCM failed to broadcast, information regarding the called call is stored on-chain. This is so that the user can get the information about the call and broadcast it manually. When the chain moves to the next epoch, the call is then resigned, so the user can broadcast it in the new epoch. After the second epoch expires, the call is cleaned up from memory.
Workflow:
Added a callback which is called when CCM message fails to be broadcasted. Egress ID, broadcast ID and other relevant information are stored.
on_finalize: get failed CCM deposited during the previous epoch. For each call:
T::Broadcaster::threshold_resign(ccm.broadcast_id)
T::Broadcaster::clean_up_broadcast_storage(ccm.broadcast_id);
After the threshold signing ceremony is completed, signature data is updated in the Broadcaster pallet.
User can query failed ccm data to manually broadcast the call: