Repository navigation
Conversation
The decoder reads fields by key and builds the domain value from them, so a key it does not read is absent from the result and missing from the re-encode. Measured on a mainnet transaction, 1268 bytes: given one extra key it goes in at 1271 and comes back out as the original 1268, byte for byte. A different transaction with a different id, and nothing raised. Preserving the bytes instead would be no better: this schema models every valid Conway body key, so an unmodelled one is a pre-Conway field it cannot represent or a field from a newer era. Either way a wallet carrying it through would sign a field it cannot display, which is what a review step exists to prevent. The ledger refuses such a body too.
jorbuedo
force-pushed
the
slice/body-unmodelled-key
branch
from
October 22, 2026 10:41
f689ba9 to
ce9d53d
Compare
This branch has not been deployed
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.
One of the four fixes asked for in the closing comment on
#619 — smallest fix plus its test, nothing else.
The defect
TransactionBody's decoder reads its fields by key and builds the domain value from them, so a keyit does not read is absent from the result and missing from the re-encode.
Measured on the mainnet transaction the test carries, which is 1268 bytes: given one extra body
key it goes in at 1271 and comes back out as the original 1268, byte for byte — the key is
gone, nothing else changed, and nothing was raised. A different transaction with a different id.
Why refuse rather than preserve
This schema models every valid Conway body key, so an unmodelled one is either a pre-Conway field it
cannot represent or a field from a newer era. Either way a wallet carrying it through would sign a
field it cannot display, which is what a review step exists to prevent. The ledger refuses such a
body too.
Contents
packages/evolution/src/TransactionBody.ts— the refusal, with the offending key in the message.packages/evolution/test/Transaction.UnmodelledBodyKey.test.ts— the refusal, the key named in themessage, the valid-body path to pin that nothing else changed, and the two byte counts above
asserted against the fixture so the measurement cannot drift away from it.
Deliberately left out:
fromEncoded, and the arrival-bytes recording that belongs with#581.
Verification
All six CI tasks run locally off
ci.ymlagainst this base (lint,type-check,test,build,check:dts,docgen): green.packages/evolution: 1918 passed, 75 skipped, 0 failed. The new testfile fails on this base without the source change, so it does exercise it.
devnet's suite needsDocker and was not run here.