fix: solana caip350 binary representation is the full 32 bytes - #195
Open
recxodus wants to merge 1 commit into
Open
fix: solana caip350 binary representation is the full 32 bytes#195recxodus wants to merge 1 commit into
recxodus wants to merge 1 commit into
Conversation
Decoding the truncated 32-character CAIP-2 chain reference yields 23 bytes, contradicting the text representation, the text -> binary conversion, and the worked example. Also define the missing CAIP-350 link reference in the solana and eip155 profiles. Closes ChainAgnostic#173
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #173 — @bumblefudge was right, decoding the truncated string gives you 23 bytes, not 32.
The binary representation section told you to truncate the base58btc text to 32 characters and then decode:
Everything else in the profile already says 32 bytes: the text representation is the full 44-character blockhash,
Text -> binary conversionis a plain base58btc decode with no truncation, and the worked example shows the full hash. Footnote 1 warns against exactly this. Only that one sentence disagreed, so it's now stated the other way round — truncation belongs to the CAIP-2 text form only.Also defines the missing
[CAIP-350]link reference insolana/caip350.mdandeip155/caip350.md; both cite it in the note under Text representation but neither declares it, so it renders as literal brackets on the site.bip122andstarknetalready have it.