Repository navigation
fix(relay): align native signature verification arguments - #2237
Conversation
preserve the channel batch size and random source slots when passing native verification through the signed transport and test fixtures. Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz> Signed-off-by: Kalvin Chau <kalvin@block.xyz>
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
Verdict: no blockers. This repairs a semantic merge conflict between #2217 (native live verification) and #1574 (live batching): #1574 inserted channelBatchSize before random, so on main the signed transport passes signer.verifySignatures into the random slot: live events fall back to JS verification, and retry-delay jitter calls the verifier without claims (the claims.map failure). The production fix in transport.ts restores the intended slot; the test edits realign setup(channels, admission, batchSize, random, signatures) and the artifact-sync call with the new signature.
Checked: the only production caller of subscribeRelayTraffic is transport.ts; the three trailing parameters have mutually incompatible types (number, () => number, SignatureVerifier), so a green typecheck covers any remaining misaligned callers.
Merge criteria: hosted CI green on d140b37d9 (in progress at review time). The body says "keep draft" pending native GUI acceptance, but the PR is marked ready; since main is red, merging on CI seems right, with that acceptance as a follow-up.
Main CI at b5f9bf5 fails because live batching inserted
channelBatchSizebefore the random source and signature verifier. The signed transport and native-verification tests retained the previous argument positions. Native subscriptions call the verifier without claims, while TypeScript and author builds reject the mismatched arguments.Align those call sites with the existing signature. Production change: one default argument. Existing coverage reproduces the defect; no new tests or journeys.
Validation: TypeScript passes; 8 affected native-verification cases pass; both failing Node CLI integration tests pass; the conversation and mocked-native IPC journeys pass in Chromium and WebKit (4/4). The original Chromium IPC journey reproduced the undefined
claims.mapfailure before the repair. Broader validation is supplied by hosted CI. Native GUI acceptance and human testing are unobserved.Original failed run: https://github.com/block/buzz-app/actions/runs/41570790480
Independent agent review found no actionable issues and verified TypeScript plus 177/177 cases in the two affected Vitest files. No human test is claimed.