fix(builder-codes): put the code length after the code in the example suffix - #1906
Open
sktbrd wants to merge 1 commit into
Open
fix(builder-codes): put the code length after the code in the example suffix#1906sktbrd wants to merge 1 commit into
sktbrd wants to merge 1 commit into
Conversation
… suffix
The `dataSuffix` example encodes the length byte before the code. `ox`, which
this page recommends, encodes it after — and the Base builder dashboard issues
the same order ox produces.
page: 0x07 62617365617070 00 8021... length first
ox: 0x62617365617070 07 00 8021... length after the code
Verified with ox 0.14.34:
Attribution.toDataSuffix({ codes: ["baseapp"] })
// 0x62617365617070070080218021802180218021802180218021
Same 25 bytes, same id byte, same trailing 8021 magic — only the length byte
moves.
Worth fixing because the wrong order fails quietly. Feeding the current example
to ox's own parser throws nothing and returns a valid-looking result whose code
is reversed, resolving to no registered builder: transactions index as
unattributed, the integrator earns nothing, and no error is raised anywhere. We
caught it only by pinning our suffix byte-for-byte against the value our
dashboard issued.
Collaborator
🟡 Heimdall Review Status
|
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.
The
dataSuffixexample in the Builder Codes overview encodes the code length before the code.ox— which this page recommends for generating the suffix — encodes it after, and the Base builder dashboard issues the same orderoxproduces.Verified with
ox@0.14.34:Same 25 bytes, same
00id byte, same trailing8021magic — only the length byte moves.Why this one is worth fixing
The wrong order fails quietly. Feeding the current example's ordering to
ox's own parser throws nothing and returns a valid-looking result whose code is reversed, which resolves to no registered builder. Transactions index as unattributed, the integrator earns nothing, and no error surfaces anywhere in the stack.We found it only because we pinned our own suffix byte-for-byte against the value the builder dashboard issued for our code, rather than deriving it from the docs. An integrator who follows the page and trusts a successful transaction would have no signal at all.
Also worth noting for anyone reading the page alongside the spec: ERC-8021 is not merged upstream (
ethereum/ERCs#1209 and #1883 are both open), so there is no canonical document to arbitrate between the two orderings.oxand the dashboard agreeing is the strongest available evidence.