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

Avkr003/commitment keys #711

Merged
merged 7 commits into from
Aug 12, 2024
Merged

Avkr003/commitment keys #711

merged 7 commits into from
Aug 12, 2024

Conversation

avkr003
Copy link
Contributor

@avkr003 avkr003 commented Aug 12, 2024

Optimizes keys for commitments.

For secp256k1 type addresses, the earlier key took 43 bytes for hrp = "elys" as it converted the bech32 address string to a byte array. Now it directly utilises sdk.AccAddress type is a byte array of length 20 bytes for secp2556k1 addresses. + 1 byte for length

For secp256r1, it will take 32 bytes + 1 byte for length. (the bec32 address string for this type will be higher than 43 characters)

Tested for migration with chain upgrade.

@cosmic-vagabond
Copy link
Contributor

@avkr003 there is a migration error with the commitment module see https://github.com/elys-network/elys/actions/runs/10352124043/job/28657954291?pr=711#step:21:50

@avkr003
Copy link
Contributor Author

avkr003 commented Aug 12, 2024

I might not be aware of this, v3 to v4 migration have been done? Looks like not because it's trying to find that.

@avkr003
Copy link
Contributor Author

avkr003 commented Aug 12, 2024

@cosmic-vagabond fixed.

@cosmic-vagabond cosmic-vagabond merged commit bf0aa52 into main Aug 12, 2024
2 checks passed
@cosmic-vagabond cosmic-vagabond deleted the avkr003/commitmentKeys branch August 12, 2024 16:40
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