fix(ledger): fail closed on committee certificates - #2146
Conversation
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Merge Risk: 🔵 Low · up to Committee certificate validation now rejects unavailable or unknown committee state and recognizes pending committee members. The change is mergeable with owner awareness that ledger-state providers must consistently implement the current-and-pending membership contract and return stable results during validation. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
The legacy conformance adapter keyed committee lookups on the raw hash, so a script cold or hot credential whose hash matched a registered key-hash member was returned as an authoritative member. The released store cannot represent a script member, so report not a member for a script credential rather than aliasing it onto the key-hash entry. UtxoValidateUnknownVoters returned raw provider errors while UtxoValidateCommitteeCertificates wrapped them. Wrap the voter path the same way, and rename CommitteeMemberLookupError.ColdCredential to MemberCredential, since it now carries the hot credential for a voter lookup. Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
arepala-uml
left a comment
There was a problem hiding this comment.
Verified independently against the current checkout (build, vet, make lint, nilaway, go test -race ./ledger/..., and go test ./internal/test/conformance/...): all pass, 315/315 conformance vectors pass. CodeRabbit and Cubic have no actionable findings; all CI checks are green.
Traced the new common.CommitteeCredentialState capability across the dependency spine: ouroboros-mock's shared MockLedgerState already implements it (merged in ouroboros-mock#263), and Dingo's LedgerView has a matching structural implementation in progress (dingo#3745, open). Release sequencing note: don't let Dingo bump to a gouroboros release containing this fix before dingo#3745 merges, or committee certificates/CC votes will fail closed in production until that lands.
No merge-blocking findings.
Fixes #2142.
CommitteeMemberLookupError, carrying the credential and its type rather than a bare provider errorThe legacy conformance adapter reports a script credential as not a member: the released hash-only store cannot represent one, so answering it could only alias onto the key-hash entry of the same hash.