Fix address validation to work with Penumbra chains #770
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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](https://private-user-images.githubusercontent.com/7871622/411117748-6692ada0-4847-4ee0-9b6e-e55460879878.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODQyNjEsIm5iZiI6MTczOTM4Mzk2MSwicGF0aCI6Ii83ODcxNjIyLzQxMTExNzc0OC02NjkyYWRhMC00ODQ3LTRlZTAtOWI2ZS1lNTU0NjA4Nzk4NzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTgxMjQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmVjMTZjNWJhZmZmMDFhZmMyNmIzNzNhYzMxNDc4YzkyNTYzN2Y4MDA4ZTQxNjAxNzYzODhhZGI1NTI1MDYzZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Vb0CYiOqrRh19-KwMBXoMKxTXIC62bAvO9P5LC7th_I)
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
.bech32
compatible address to make it work, with prefixpenumbracompat1
bech32
address with atpenumbra
prefix (widget: add support for taddrs on penumbra #759)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.