elys-network / elys

Elys Network is the first All-In-One DEFI platform to join the Atom Economic Zone, backed by Informal Systems and the Cosmos Hub. Built on Cosmos and CometBFT, leveraging the latest blockchain technologies to provide a premier user experience. Visit our official site at https://elys.network
https://elys.network
Apache License 2.0
57 stars 51 forks source link

Avkr003/commitment keys #711

Closed avkr003 closed 1 month ago

avkr003 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

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 commented 1 month ago

@cosmic-vagabond fixed.