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 address validation to work with Penumbra chains #770

Conversation

erwanor
Copy link
Contributor

@erwanor erwanor commented Feb 8, 2025

Trying to make transfers to Penumbra from anyhere in the interchain fails with this error on the main Skip app (not in the widget, curiously):
Screenshot 2025-02-07 at 7 24 44 PM

After digging, I learned that this started after this commit 8be4ad9 added address validation.

The source of the error is that Penumbra uses bech32m addresses.

I wish we could stop there, I would have pushed this simple change: d512a6e and carried on. Unfortunately, the diff has to be bigger because of interop issues with Noble mainnet.

Some context:

Penumbra addresses contain encrypted metadata. For a variety of reasons, this means that addresses must be encoded using bech32m.

  1. Noble middleware first broke transfer with Penumbra chains, so we created a compat bech32 compatible address to make it work, with prefix penumbracompat1
  2. Unfortunately, a second breakage happened and transfers with both the compat and ordinary privacy addresses broke, so we invented a transparent address format which is a bech32 address with a tpenumbra prefix (widget: add support for taddrs on penumbra #759)
  3. Noble has deployed a good fix on their testnet, it should hit mainnet at the end of the month

In the meantime, this PR (along with #759) restores Skip functionality for Penumbra users. Once the Noble fix lands, I would be happy to straighten up the code here and in the fetch address logic.

Copy link

changeset-bot bot commented Feb 8, 2025

⚠️ No Changeset found

Latest commit: 832678a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 8, 2025

@erwanor is attempting to deploy a commit to the Skip Protocol Team on Vercel.

A member of the Team first needs to authorize it.

@codingki codingki changed the base branch from staging to penumbra-address-fixes February 11, 2025 19:00
Copy link
Member

@codingki codingki left a comment

Choose a reason for hiding this comment

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

the dependencies should live in client's package.json. I'll fix this after merge. thanks!

@codingki codingki merged commit 978b8e2 into skip-mev:penumbra-address-fixes Feb 11, 2025
1 of 2 checks passed
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