wip(tbtc): ABI 3.5 inventory/state-witness consumers and signing readiness#4199
Draft
mswilkison wants to merge 5 commits into
Draft
wip(tbtc): ABI 3.5 inventory/state-witness consumers and signing readiness#4199mswilkison wants to merge 5 commits into
mswilkison wants to merge 5 commits into
Conversation
…iness Adds Go consumers for the Rust signer's ABI 3.5 inventory and state-witness symbols, plus interactive-signing readiness checks wired into the node. INCOMPLETE - committed to preserve the work, not because it is ready: - Native inventory parsing is unfixed. The Rust keyGroup is a lowercase 66-character compressed SEC1 key; the parser must accept both valid 64-character x-only test keys and 66-character compressed keys via TaprootOutputKeyFromTBTCSignerKey, and require the resulting x-only key to equal walletID. Frozen vector to pin: walletID = 11*32, keyGroup = 02 + 11*32, threshold 2, participants 3, epoch 0, public commitment 33*32, seat 1/3 commitments 44*32 and 55*32, expected inventory commitment bd6ec36fa27a57dd9926883bb2ff4dee7ececd28de940df7294f0e0f0dedd150. - The read-only state anchor is still an interface. It needs a concrete authenticated Read + CompareAndSwap service with a durable PostgreSQL schema, fresh nonce, store/protocol/trust-domain/operator/authority/client identity binding, signed responses with bounded ancestry verification, unknown-outcome recovery by readback, and rejection of stale, divergent, ahead, over-window or wrong-identity states. It must anchor every security-relevant native mutation before Round1 commitments or Round2 shares leave the process. An interface-only implementation is not acceptable. - Casing asymmetry to verify against the Rust side: DurableStoreIdentityResult is snake_case, while RetainedKeyPackageInventoryResult, StateWitnessProofRequest (deny_unknown_fields, maximumEntries is u16 bounded 1..=256) and StateWitnessProofResult are camelCase. Verified only that `go build ./pkg/tbtc/... ./pkg/frost/...` succeeds. No test run, no cgo integration run, no cross-language vector check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KZb3W6TwYtKTw1mb2sfpS
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Lockstep bump for the signer's ABI 3.5 -> 4.0 change (keep-core #4198). Per this file's own rule, the Go constants and ci/frost-signer-pin.env move together with the lib commit that provides them. Under ABI 3, `durable_store_fingerprint` mixed the stable `.store-id` with the parent directory's path string and inode, the filesystem device, and the advisory lock file's inode — and that composite was the first field of every state commitment. So deleting the zero-byte lock file, restoring the data directory from backup at the same path, renaming it, or remounting where st_dev is unstable made every committed record unverifiable and the signer unstartable, with no in-band recovery: the failure is raised inside StateFileLock::acquire, before the corruption policy can apply. ABI 4.0 binds commitments to the stable `.store-id` alone. The path, filesystem and lock fingerprints are still computed and still enforced at open — they simply no longer enter any committed transcript. The symbol set is unchanged, but the VALUES of existing wire fields differ, so an ABI-3 library must not be linked by this bridge. requiredTBTCSignerABIMajor 3 -> 4 requiredTBTCSignerABIMinMinor 5 -> 0 FROST_SIGNER_MIRROR_REF 6e0fa97 -> a5363e9 Minor 0 is the initial ABI-4 surface and carries forward every symbol added through 3.5 under the v2 identity and transcript schemas. Verified: go build ./pkg/frost/... ./pkg/tbtc/... clean; go test ./pkg/frost/signing/ passes, including the contract-pin guard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KZb3W6TwYtKTw1mb2sfpS
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.
Based on #3866. Draft — incomplete, opened to make the work reviewable and durable, not because it is ready.
Adds Go consumers for the Rust signer's ABI 3.5 inventory and state-witness symbols (see keep-core #4198), plus interactive-signing readiness checks wired into the node.
What is NOT done
Native inventory parsing is unfixed. The Rust
keyGroupis a lowercase 66-character compressed SEC1 key. The parser must accept both valid 64-character x-only test keys and 66-character compressed keys viaTaprootOutputKeyFromTBTCSignerKey, and require the resulting x-only key to equalwalletID. Frozen vector to pin:The state anchor is still an interface. It needs a concrete authenticated Read + CompareAndSwap service with a durable PostgreSQL schema, fresh nonce, store/protocol/trust-domain/operator/authority/client identity binding, signed responses with bounded ancestry verification, unknown-outcome recovery by readback, and rejection of stale, divergent, ahead, over-window or wrong-identity states. It must anchor every security-relevant native mutation before Round1 commitments or Round2 shares leave the process. An interface-only implementation is not acceptable for activation.
Casing asymmetry to verify against the Rust side:
DurableStoreIdentityResultis snake_case;RetainedKeyPackageInventoryResult,StateWitnessProofRequest(deny_unknown_fields,maximumEntriesis u16 bounded 1..=256) andStateWitnessProofResultare camelCase.Verification performed
Only
go build ./pkg/tbtc/... ./pkg/frost/...— succeeds. No test run, no cgo integration run, no cross-language vector check.