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!: use uint64 IDs for Keychains and Spaces #77

Merged
merged 6 commits into from
Mar 11, 2024

Conversation

Pitasi
Copy link
Contributor

@Pitasi Pitasi commented Mar 8, 2024

We were using the SHA256 hash of a numeric sequence (truncated to 8 bytes) and encoded as bech32 to generate addresses like wardenspace1234 and wardenkeyring1234.

This PR simplify and cleans up all of this, to only store the actual numeric sequence on-chain.

The frontends are free to represent these IDs as they like.

Simplifying this code on-chain is best for saving some disk space (uint64 are much smaller than the full bech32 string, this applies to the Keychain and Space entities, but also to all the other transactions that were referring to them such as MsgNewKeyRequest), gas, and as a benefit we also don't have to deal with hash collisions.

BREAKING CHANGE: we're in early stage and I won't migrate the old IDs into the new format. It's just easier to start new chains from scratch.

Copy link

vercel bot commented Mar 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
warden-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 3:00pm

@Pitasi Pitasi force-pushed the remove-keychain-space-addresses branch from 6f636a5 to 2e9ff2d Compare March 8, 2024 14:59
@Pitasi Pitasi merged commit d218d83 into main Mar 11, 2024
18 checks passed
@Pitasi Pitasi deleted the remove-keychain-space-addresses branch March 11, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant