audit: ingest LEP-6 storage proof results#118
Conversation
Reviewed af4c9fc (commit since last review). Both findings from Zee's production-gate review (118-F1 dedup bypass via
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
db04b1e to
923895a
Compare
Production-gate review by Zee — 2 findingsMethodology: full file-by-file read of every non-generated changed file in this PR's diff (pr-118 vs its base branch), cross-checked against:
Status legend: each finding's status is computed at the PR #122 stack-tip (consensus-gap-fixes commit Severity breakdown: HIGH=1, MEDIUM=1 118-F1 — Duplicate-descriptor key includes attacker-controlled
|
There was a problem hiding this comment.
Pull request overview
Implements LEP-6 “storage proof results” ingestion for the audit module by extending MsgSubmitEpochReport to accept, validate, and persist storage_proof_results, and introduces foundational “storage-truth” state/query/genesis/params plumbing (plus placeholder tx endpoints).
Changes:
- Extend
MsgSubmitEpochReport/EpochReportwithstorage_proof_resultsand add validation + persistence inSubmitEpochReport. - Add storage-truth params (incl. enforcement mode enum), genesis fields, and keeper state storage for node/reporter/ticket/heal-op state.
- Add new storage-truth query endpoints, AutoCLI wiring, and placeholder tx messages/handlers (returning
ErrNotImplemented).
Reviewed changes
Copilot reviewed 29 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| x/audit/v1/types/query.pb.gw.go | Regenerated gRPC-gateway bindings for new query endpoints. |
| x/audit/v1/types/params_test.go | Adds tests covering new storage-truth param defaults and validation. |
| x/audit/v1/types/params.pb.go | Regenerated protobuf bindings for new params + enum. |
| x/audit/v1/types/params.go | Adds storage-truth param keys/defaults/validation and ParamSetPairs. |
| x/audit/v1/types/keys.go | Adds KV key prefixes/helpers for storage-truth state and heal-op indexing. |
| x/audit/v1/types/genesis.pb.go | Regenerated protobuf bindings for expanded genesis state. |
| x/audit/v1/types/genesis.go | Sets NextHealOpId default in genesis. |
| x/audit/v1/types/errors.go | Adds ErrInvalidStorageProofs and ErrNotImplemented. |
| x/audit/v1/types/codec.go | Registers new msg types for interface unpacking. |
| x/audit/v1/simulation/submit_evidence_test.go | Tests simulation op for submit evidence returns NoOp msg. |
| x/audit/v1/module/simulation_test.go | Ensures module weighted ops include submit evidence op. |
| x/audit/v1/module/autocli.go | Adds AutoCLI commands for new queries and placeholder tx methods. |
| x/audit/v1/keeper/storage_truth_state_test.go | Tests round-trip persistence for new storage-truth KV state. |
| x/audit/v1/keeper/storage_truth_state.go | Implements KV CRUD for storage-truth states + heal-op indices/counter. |
| x/audit/v1/keeper/query_storage_truth_test.go | Tests new storage-truth query server endpoints. |
| x/audit/v1/keeper/query_storage_truth.go | Implements new storage-truth query server endpoints with pagination. |
| x/audit/v1/keeper/msg_submit_epoch_report_test.go | Adds tests for storage proof result persistence + validation failures. |
| x/audit/v1/keeper/msg_submit_epoch_report_storage_proofs.go | Adds storage_proof_results validation (eligibility, fields, enums, duplicates). |
| x/audit/v1/keeper/msg_submit_epoch_report.go | Wires storage proof validation and persistence into report submission. |
| x/audit/v1/keeper/msg_storage_truth_placeholders_test.go | Tests placeholder msg handlers return validation/not-implemented errors. |
| x/audit/v1/keeper/msg_storage_truth_placeholders.go | Adds placeholder msg handlers returning ErrNotImplemented. |
| x/audit/v1/keeper/genesis_test.go | Extends genesis round-trip tests for new genesis fields. |
| x/audit/v1/keeper/genesis.go | Imports/exports new storage-truth state and next heal-op ID in genesis. |
| proto/lumera/audit/v1/tx.proto | Extends MsgSubmitEpochReport; adds new storage-truth tx messages/RPCs. |
| proto/lumera/audit/v1/query.proto | Adds new storage-truth query RPCs and request/response messages. |
| proto/lumera/audit/v1/params.proto | Adds storage-truth params and enforcement mode enum. |
| proto/lumera/audit/v1/genesis.proto | Adds storage-truth state lists and next heal-op ID to genesis. |
| proto/lumera/audit/v1/audit.proto | Adds storage proof result types and storage-truth state/heal-op types; adds storage proof results to EpochReport. |
| devnet/go.sum | Updates dependency checksums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
923895a to
4e58c68
Compare
cb16594 to
af4c9fc
Compare
PR#118 Summary (LEP-6-report-ingestion)
Title
audit: ingest LEP-6 storage proof resultsOverview
This PR implements the LEP-6 report ingestion milestone on top of
LEP-6-foundationby wiringstorage_proof_resultsintoMsgSubmitEpochReportvalidation and persistence paths.What’s Included
MsgSubmitEpochReportnow includes:repeated StorageProofResult storage_proof_results = 5;tx.pb.go).NO_ELIGIBLE_TICKETrules (ticket/artifact fields constrained/empty).RECHECK_CONFIRMED_FAILrequiresRECHECKbucket.storage_proof_resultsare now stored inEpochReportduringSubmitEpochReport.ErrInvalidStorageProofs(code9).Test Coverage Added
Scope / Non-Goals
N/R/D) updates, no enforcement/penalty activation, and no heal/recheck execution logic changes yet.