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

feat: add gravity nonce #31

Merged
merged 5 commits into from
May 29, 2024
Merged

Conversation

byte-bandit
Copy link
Contributor

@byte-bandit byte-bandit commented May 28, 2024

Related Github tickets

Background

Gravity expects atomically incrementing nonces with every event emitted. At the moment, that's not the case, as the emitted event_id is shared across different message types. The gravity implementation is a lot more strict that our regular communication channels as in it will enforce a id = id + 1 constraint for every nonce it receives, and will attest to them in order only. This is to ensure correctness of order of funds transferred.

This change will also require an update to Pigeon and possibly Paloma in order to populate the constructor properly.

contracts/Compass.vy Outdated Show resolved Hide resolved
contracts/Compass.vy Outdated Show resolved Hide resolved
contracts/Compass.vy Outdated Show resolved Hide resolved
@byte-bandit
Copy link
Contributor Author

@webelf101 I have no idea how to get the tests running for this, I've updated conftest.py but looks like that alone wasn't enough.

Copy link
Contributor

@webelf101 webelf101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The test was built using brownie framework but it isn't updated anymore so the test will fail. We may need to rebuild tests using apeworx.

@taariq taariq merged commit 95b856d into palomachain:master May 29, 2024
1 check failed
@taariq taariq deleted the clohr/gravity-nonce branch May 29, 2024 14:08
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