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: memo staking verification #38

Merged
merged 1 commit into from
Jan 22, 2025
Merged

fix: memo staking verification #38

merged 1 commit into from
Jan 22, 2025

Conversation

gluax
Copy link
Contributor

@gluax gluax commented Jan 22, 2025

Motivation

So that memos don't break staking.

Explanation of Changes

So the memo was being used, but the problem is the types were different in cosmwasm(Binary) vs non-cosmwasm(String).
Since they were options, the .hash() method uses AsRef<[u8]> which was different for each type.

Now we handle the memo in the Staking message the same way we do for the PostDataRequestArgs.

This is a breaking change in the API, so it's a minor version increment.

Testing

Added a new test for testing that the non-cosmwasm side correctly generates a proof, and the cosmwasm side verifies the proof.

Related PRs and Issues

We should create a new issue to add this test for any of the proof & verification. To ensure bugs similar to this one are caught right away.

@gluax gluax self-assigned this Jan 22, 2025
@gluax gluax merged commit 7810fad into main Jan 22, 2025
2 checks passed
@gluax gluax deleted the fix/stake-memo-verify branch January 22, 2025 16:43
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.

2 participants