Skip to content
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

Add requestMessageReconfirm to HomeAMB #605

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

k1rill-fedoseev
Copy link
Member

Adds functionality requested under #604 . This PR only makes changes relevant to the AMB contracts. Changes for erc-to-native bridge will be implemented later, in a distinct PR.

For AMB, the requested functionality appeared to be easily integrated to the existing codebase. No oracle modifications are necessary at all. Emitting duplicate UserRequestForSignature and CollectedSignatures events is safe, since oracle does not use transaction hash for constructing the signed message.

The flow might be the following:

  • User finds out that current set of signatures is invalid.
  • User calls requestMessageReconfirm function which re-emits UserRequestForSignature and prunes all invalid signatures associated with this message.
  • Oracles catch the UserRequestForSignature event and process it in the usual way. Oracles that have not already submitted their signatures, sign a message and call submitSignature.
  • Once enough valid signatures are collected, bridge contract re-emits CollectedSignatures event.
  • If necessary, oracle catch CollectedSignatures event and executes a message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant