-
Notifications
You must be signed in to change notification settings - Fork 11
feat(chain): make slug_name a first-class ABI type #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
09aee7c
feat(chain): make slug_name a first-class ABI type
heifner b50882e
fix(chain): carry a non-canonical slug_name across the JSON text boun…
heifner f2cd62e
docs: drop the "v6" label, and decouple the struct-key fixture from s…
heifner e66cc36
fix(chain): reject a signed slug spelling, and pin builtin-over-struc…
heifner f831d61
feat(chain): give slug_name one canonical JSON carrier
heifner 459de80
fix(fc): validate the slug_name object arm's packed value
heifner 5415b86
feat(fc): a slug_name code must start with a letter
heifner 9f89933
feat(contracts): use CDT's slug_name and validate payload codes
heifner 5ebfd5e
chore(contracts): rebuild sysio.epoch against wire-cdt #119
heifner 8c14fde
Merge remote-tracking branch 'origin/master' into feature/slug-name-a…
heifner 6f148db
chore(contracts): rebuild reenter_deposit against wire-cdt #119
heifner 444962c
fix(contracts): validate slug_name codes at the writers that persist …
heifner 7e1a5bd
fix(libfc): bind Traits::alphabet to a view before using it
heifner db999fb
chore(contracts): rebuild chalg/opreg/uwrit against wire-cdt #119
heifner e7f462d
Merge remote-tracking branch 'origin/master' into feature/slug-name-a…
heifner 1881aee
fix(contracts): refund value-bearing messages with an unspellable code
heifner af01d74
fix(chain): convert a slug_name totally — never throw, never fall bac…
heifner b6cfee0
fix(chain): name a slug key only when it can be named; hex otherwise
heifner d74ef99
fix(chain_plugin): keep json=true fallback cursors scope-relative
heifner 4d27537
refactor(libfc): derive slug_name; move is_canonical onto it
heifner f3dc7e0
refactor(libfc): drop the slug_name shape pins
heifner a21b966
fix(libfc): give the derived slug_name its own std::hash
heifner 4242ff5
fix(chain_plugin): tag raw cursors absolute; dispatch bounds past whi…
heifner 2dbca9c
fix(chain_plugin): keep an absolute bound inside the scope it names
heifner cd0246e
docs(slug_name): correct the non-canonical rendering contract
heifner 07ebfc9
docs(slug_name): finish the total-renderer sweep
heifner 88c97b0
docs(slug_name): correct the number-carrier rationale and keep all th…
heifner fc6ed3d
fix(chain_plugin): make a scope-only displayed key replayable; correc…
heifner 17890b6
Merge remote-tracking branch 'origin/master' into feature/slug-name-a…
heifner 59263b0
test(sysio.liq): read registry slug codes as their canonical string
heifner 4d61929
test(opp): validate reserve codes in the bootstrap config preflight
heifner 8a85586
Merge remote-tracking branch 'origin/master' into feature/slug-name-a…
heifner 1e66942
fix(query_engine): treat slug_name as the builtin primitive it now is
heifner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
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
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
Binary file not shown.
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
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
Binary file not shown.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Validate SwapRequest codes before persisting the UWREQ
This gate still misses ATTESTATION_TYPE_SWAP_REQUEST: dispatch_attestation forwards its opaque bytes directly to createuwreq, which constructs the source/target token and reserve slugs from raw protobuf uint64s. Its missing/inactive-reserve zero-quote path intentionally continues and persists the request, so a swap with a valid target chain but token/reserve value 7 still creates an unrenderable row. Rendering that row makes values_only expose the fallback scalar, and the underwriter's unconditional row.get_object() drops the entire scan cycle. Validate the decoded SwapRequest codes inside createuwreq before lookup/persistence, emit SwapRevert so the source deposit is refunded, and add a SWAP_REQUEST regression; the new test only covers OperatorAction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right, and the gap is structural rather than a miss in the gate: msgch's dispatch arm forwards SWAP_REQUEST to
uwrit::createuwreqas opaque bytes, so none of the sevenpayload_codes_canonicalsites can see it.Fixed in
444962ccca.createuwreqnow validates the four payload codes immediately after the provenance check and emits SwapRevert — refund, not drop, exactly as you said, because the deposit is escrowed on the source outpost and a silent skip would strand it.emit_swap_revertpacks raw.valueuint64s, so the revert still works when the offending code is the unspellable one.Your reading of the zero-quote path was exactly right, and I verified it rather than assuming. Removing the new guard and re-running the regression shows the row IS created, and that reading it back throws inside the depot's own ABI unpack:
required_reserves_activeis false when the reserve is MISSING, so the fail-closed guard never fires andreqs.emplacestores the code verbatim.The regression is
sysio_dispatch_tests/swap_request_uncanonical_code_is_refunded: a bad target token and a bad source reserve, both with a valid target chain — your case — plus a canonical control proving the guard rejects the code rather than the shape of the request.I validate four codes, not six. The two chain codes are covered by the registry:
src_chain_codeis bound to the proven delivering outpost,dst_chain_codemust passchain_registered_active, and the P2 fix below makes a registered code a renderable one by construction. That dependency is why both landed together.