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

fix(ampd): fix nonce for multiversx being keccak256 hash instead of created at #593

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

raress96
Copy link
Contributor

@raress96 raress96 commented Aug 21, 2024

Because of a confusion of types from the AxelarAmplifierGateway contract (see here), we assumed that the nonce should be a keccak256 hash.

Instead, for both the EVM and Sui implementations, it is the created_at date (u64) represented as a uint256. Both keccak256 & uint256 have the same 32 byte length, hence the confusion.

The only other place that needs updating is our multisig contract, which we will also handle.

This will also simplify the Relayer implementation, since previously it was not possible for us to go from the keccak256 hash back to the created_at date, which is needed for the verify_verifier_set call on the Voting Verifier.

@raress96 raress96 requested a review from a team as a code owner August 21, 2024 12:21
@cgorenflo cgorenflo enabled auto-merge (squash) August 23, 2024 05:18
@cgorenflo cgorenflo merged commit 347cd15 into axelarnetwork:main Aug 23, 2024
5 of 6 checks passed
@raress96 raress96 deleted the multiversx-nonce-fix branch August 23, 2024 05:55
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.

3 participants