Skip to content

refactor(ceremony): the token request commits nothing, as a rule - #45

Open
SupremaLex wants to merge 1 commit into
feat/github-reveals-the-whole-exchangefrom
refactor/token-request-commits-nothing
Open

SupremaLex wants to merge 1 commit into
feat/github-reveals-the-whole-exchangefrom
refactor/token-request-commits-nothing

Conversation

@SupremaLex

Copy link
Copy Markdown
Member

Stacked on #44. Merge after it and before release/v0.13.0, so one crate release carries both changes and libid-rs takes them in one bump.

What

_tokenBody requires one revealed run and no commitment, in the base verifier, for every profile. The virtual _tokenSentCommitments and its two overrides go, together with the field that fed them: secretField leaves profiles.json, and the generator stops emitting *_TOKEN_SENT_COMMITMENTS, secret_field and secretField in Solidity, Rust and TypeScript. The body's length comes from the revealed run, which is the whole request.

Why it changes no acceptance

Every launch profile answered zero after #44 — one consumer (_tokenBody), two overrides returning a generated 0. Hard-coding the rule accepts nothing new and refuses nothing that verified before; test_rejectsAnExchangeThatCommitsABodySuffix now pins the fixed rule rather than the generated constant. The specification is going the same way: libid-org/libID#35 removes REQ-COMMON-22, the rule that gave a committed body field its ordering, so there is no concept left for the hook to configure.

Crate shape

TokenSession in the published libid-profiles crate loses secret_field. In libid-rs that makes Layout::token_request take only the request bytes and become infallible — token_request(sent) -> Layout — with the LayoutError::MissingCredential variant and the committing-path tests gone. Those edits are written and held for libid-org/libID-rs#25, which takes them together with the 0.13 pin.

Verification

  • forge test 483/483; forge fmt --check, forge lint -D notes, regen-ceremony-profiles.py --check; rust/: 29 tests, fmt --check, clippy -D warnings; ts/: build, 24 tests, lint, fmt — all clean.
  • A grep for secretField, secret_field, SENT_COMMITMENTS and _tokenSentCommitments across Solidity, Rust, TypeScript, JSON and the generator finds nothing.
  • libid-rs, against this branch's rust/profiles as a path dependency: workspace tests and clippy clean, and ceremony_fixtures regenerates byte-identical github-ceremony-session.json and x-ceremony-session.json to the ones feat(ceremony)!: github reveals its token request whole #44 carries — the layout the signature change produces is the layout already verified.

`_tokenBody` requires one revealed run and no commitment, in the base
verifier, for every profile. The virtual `_tokenSentCommitments` and its
two overrides go, together with the profile field that fed them:
`secretField` leaves profiles.json, and the generator stops emitting
`*_TOKEN_SENT_COMMITMENTS`, `secret_field` and `secretField` in Solidity,
Rust and TypeScript. The body's length now comes from the revealed run,
which is the whole request.

Every launch profile answered zero, so no verifier accepts anything it did
not accept before, and none refuses anything it accepted. The count moves
from a per-profile answer to a fixed rule because both profiles state one
shape and the specification has no committed body field left to order.

`TokenSession` in the published libid-profiles crate loses `secret_field`.
That ships in the same release as the whole-range reveal, so libid-rs takes
both in one bump.

Assisted-by: Claude Fable 5.1
Signed-off-by: SupremaLex <georglutsenko@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant