revert tagged serialization for contract addresses and coin public#853
Merged
gilescope merged 7 commits intoMar 3, 2026
Merged
Conversation
Contributor
ozgb
approved these changes
Mar 3, 2026
gilescope
added a commit
that referenced
this pull request
Mar 3, 2026
) * revert tagged serialization for contract addresses and coin public * change file * remove remaining tag arguments for coin publics and contract addresses * comment out ephemeral env test in ci * remove --tagged --------- Co-authored-by: Squirrel <giles.cope@shielded.io> Signed-off-by: Giles Cope <gilescope@gmail.com>
gilescope
pushed a commit
that referenced
this pull request
Apr 8, 2026
This reverts commit 2e3dba3.
14 tasks
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
This reverts commit 2e3dba3. Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
This reverts commit 2e3dba3. Signed-off-by: Mike Clay <mike.clay@shielded.io>
12 tasks
m2ux
added a commit
that referenced
this pull request
May 5, 2026
Revert coin_public_decode and contract_address_decode to use hex_ledger_untagged_decode. Per ADR-0022 wallet keys and addresses use untagged serialization; Bech32m HRP plays the role of a tag at the user-facing boundary. The same tagged-switch was attempted and reverted in PR #853; inline comments above both parsers cite ADR-0022 and PR #853 to prevent future re-introduction. EOF enforcement on hex_ledger_untagged_decode (the audit-#307 fix) and the improved error-message wording ("invalid hex input") are retained. The unit tests are rewritten to assert untagged-acceptance plus EOF / truncation / invalid-hex rejection on coin_public_decode, contract_address_decode, and hex_ledger_untagged_decode::<HashOutput>. The tagged test fixture (contract_address_undeployed_tagged.mn) is removed and generate_txs.rs reverts to the existing untagged fixture. Closes #307 Signed-off-by: Mike Clay <mike.clay@shielded.io>
Minhcardanian
pushed a commit
to Minhcardanian/midnight-node
that referenced
this pull request
May 9, 2026
…t Issue H) (midnightntwrk#1437) * fix(toolkit): switch CLI parsers to tagged deserialization Switch coin_public_decode and contract_address_decode from hex_ledger_untagged_decode to hex_ledger_decode (tagged), eliminating the unconditional fallback that accepted untagged input for types that implement Tagged. - Replace hex_ledger_untagged_decode with hex_ledger_decode in coin_public_decode and contract_address_decode - Add EOF enforcement to hex_ledger_untagged_decode (defense-in-depth) - Update test fixture in generate_txs.rs to use tagged hex format - Add 11 unit tests covering tagged/untagged/wrong-tag/trailing-bytes/ invalid-hex scenarios Closes #307 Signed-off-by: Mike Clay <mike.clay@shielded.io> * fix(toolkit): keep CLI parsers untagged per ADR-0022; enforce EOF Revert coin_public_decode and contract_address_decode to use hex_ledger_untagged_decode. Per ADR-0022 wallet keys and addresses use untagged serialization; Bech32m HRP plays the role of a tag at the user-facing boundary. The same tagged-switch was attempted and reverted in PR midnightntwrk#853; inline comments above both parsers cite ADR-0022 and PR midnightntwrk#853 to prevent future re-introduction. EOF enforcement on hex_ledger_untagged_decode (the audit-#307 fix) and the improved error-message wording ("invalid hex input") are retained. The unit tests are rewritten to assert untagged-acceptance plus EOF / truncation / invalid-hex rejection on coin_public_decode, contract_address_decode, and hex_ledger_untagged_decode::<HashOutput>. The tagged test fixture (contract_address_undeployed_tagged.mn) is removed and generate_txs.rs reverts to the existing untagged fixture. Closes #307 Signed-off-by: Mike Clay <mike.clay@shielded.io> --------- Signed-off-by: Mike Clay <mike.clay@shielded.io>
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.








Overview
Reverts changes to add tagged serialization for contract addresses and coin public. These were not needed.
🗹 TODO before merging
📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links