Skip to content

feat(storage_challenge): add LEP-6 compound storage challenge runtime#288

Merged
j-rafique merged 1 commit intosupernode/LEP-6-chain-client-extensionsfrom
supernode/LEP-6-compound-storage-challenge
May 4, 2026
Merged

feat(storage_challenge): add LEP-6 compound storage challenge runtime#288
j-rafique merged 1 commit intosupernode/LEP-6-chain-client-extensionsfrom
supernode/LEP-6-compound-storage-challenge

Conversation

@j-rafique
Copy link
Copy Markdown
Contributor

Implements the PR3 compound storage challenge runtime on top of the updated LEP-6 PR1/PR2 foundation.

Highlights:

  • Add compound proof request/response fields and regenerated supernode proto bindings.
  • Add recipient-side GetCompoundProof handler with signed responses and range validation.
  • Add challenger-side LEP6Dispatcher for assigned-target dispatch across RECENT/OLD buckets.
  • Add result buffer implementing host_reporter ProofResultProvider with chain cap throttling.
  • Add deterministic cascade metadata resolution helpers for artifact count, key, and exact artifact size.
  • Add production ChainTicketProvider backed by final Lumera x/action ListActionsBySuperNode query.
  • Wire startup to use ChainTicketProvider and cascade metadata/action size resolution instead of NoTicketProvider.
  • Classify target RPC timeout/no-response as TIMEOUT_OR_NO_RESPONSE and malformed transcripts as INVALID_TRANSCRIPT.
  • Extend action module bindings/mocks with ListActionsBySuperNode.

Lumera dependency/source:

  • github.com/LumeraProtocol/lumera v1.12.0-rc.0.20260430142036-451f8a8e7ff3
  • chain source: lumera/master 451f8a8e7ff30b3370cba59fab8e6228473a348b

Validation:

  • git diff --check origin/supernode/LEP-6-deterministic-primitives..HEAD: pass
  • go test ./pkg/lumera/... ./pkg/storagechallenge/... ./supernode/storage_challenge ./supernode/transport/grpc/storage_challenge ./supernode/cmd ./supernode/host_reporter: pass
  • go vet ./pkg/lumera/... ./pkg/storagechallenge/... ./supernode/storage_challenge ./supernode/transport/grpc/storage_challenge ./supernode/cmd ./supernode/host_reporter: pass
  • go test ./...: fails only at pre-existing local libwebp headers in pkg/storage/files (webp/decode.h, webp/encode.h missing); PR3-focused packages pass.

Plan: docs/plans/LEP6_SUPERNODE_IMPLEMENTATION_PLAN_v3_MASTER.md PR3

@j-rafique j-rafique self-assigned this Apr 30, 2026
@j-rafique j-rafique force-pushed the supernode/LEP-6-compound-storage-challenge branch 2 times, most recently from 2d8c60c to f79f88f Compare May 1, 2026 16:43
@j-rafique j-rafique force-pushed the supernode/LEP-6-deterministic-primitives branch 2 times, most recently from 0dc9475 to af43dd8 Compare May 4, 2026 12:05
@j-rafique j-rafique force-pushed the supernode/LEP-6-compound-storage-challenge branch from f79f88f to 820625c Compare May 4, 2026 12:19
@j-rafique j-rafique marked this pull request as ready for review May 4, 2026 12:20
@j-rafique j-rafique changed the base branch from supernode/LEP-6-deterministic-primitives to supernode/LEP-6-chain-client-extensions May 4, 2026 12:20
@roomote-v0
Copy link
Copy Markdown

roomote-v0 Bot commented May 4, 2026

Rooviewer Clock   See task

Re-reviewed at 5a99549. All four issues from previous reviews are now fixed. No new issues found.

  • Race condition in ensureClient() -- secureSupernodeClientFactory.ensureClient() reads/writes grpcClient without synchronization; concurrent Dial() calls will race (lep6_client_factory.go)
  • Transcript hash divergence between challenger and recipient -- Recipient computes TranscriptHash with empty DerivationInputHash while challenger uses the actual value, producing different hashes for the same proof (handler.go)
  • classifyProofFailure misclassifies non-timeout RPC errors as HASH_MISMATCH -- Infrastructure errors (PermissionDenied, Internal, etc.) are reported as hash mismatches rather than transcript/connectivity failures (lep6_dispatch.go)
  • Recipient handler hardcodes range count/size validation against compile-time constants -- The challenger reads StorageTruthCompoundRangesPerArtifact and StorageTruthCompoundRangeLenBytes from chain params, but the recipient validates against hardcoded LEP6CompoundRangesPerArtifact/LEP6CompoundRangeLenBytes; if governance updates these params, all compound challenges will silently fail (handler.go)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment thread supernode/storage_challenge/lep6_client_factory.go
Comment thread supernode/transport/grpc/storage_challenge/handler.go
Comment thread supernode/storage_challenge/lep6_dispatch.go Outdated
@j-rafique j-rafique force-pushed the supernode/LEP-6-compound-storage-challenge branch from 820625c to 8a80fc4 Compare May 4, 2026 12:35
Comment thread supernode/transport/grpc/storage_challenge/handler.go Outdated
Implements the PR3 compound storage challenge runtime on top of the latest
LEP-6 PR1 foundation branch after PR2 was merged into it.

Highlights:
- Add compound proof request/response fields and regenerated supernode proto bindings.
- Add recipient-side GetCompoundProof handler with signed responses and range validation.
- Add challenger-side LEP6Dispatcher for assigned-target dispatch across RECENT/OLD buckets.
- Add result buffer implementing host_reporter ProofResultProvider with deterministic chain-cap throttling.
- Add deterministic cascade metadata resolution helpers for artifact count, key, and exact artifact size.
- Add production ChainTicketProvider backed by final Lumera x/action ListActionsBySuperNode query.
- Wire startup to use ChainTicketProvider and cascade metadata/action size resolution instead of NoTicketProvider.
- Classify target RPC timeout/no-response as TIMEOUT_OR_NO_RESPONSE and malformed transcripts as INVALID_TRANSCRIPT.
- Extend action module bindings/mocks with ListActionsBySuperNode.
- Preserve PR1 provider concurrency hardening and PR2 deterministic roocode fixes after rebase.

Lumera dependency/source:
- github.com/LumeraProtocol/lumera v1.12.0
- chain source: lumera/master 451f8a8e7ff30b3370cba59fab8e6228473a348b

Validation:
- git diff --check origin/supernode/LEP-6-chain-client-extensions..HEAD: pass
- go test ./pkg/storagechallenge/... ./supernode/storage_challenge ./supernode/transport/grpc/storage_challenge ./supernode/host_reporter ./pkg/lumera/modules/action ./pkg/lumera/modules/audit ./pkg/lumera/modules/audit_msg -count=1 -v: pass
- go vet ./pkg/storagechallenge/... ./supernode/storage_challenge ./supernode/transport/grpc/storage_challenge ./supernode/host_reporter ./pkg/lumera/modules/action ./pkg/lumera/modules/audit ./pkg/lumera/modules/audit_msg: pass
- go test ./... -count=1: pass

Plan: docs/plans/LEP6_SUPERNODE_IMPLEMENTATION_PLAN_v3_MASTER.md PR3
@j-rafique j-rafique force-pushed the supernode/LEP-6-compound-storage-challenge branch from 8a80fc4 to 5a99549 Compare May 4, 2026 14:45
@j-rafique j-rafique merged commit 62696db into supernode/LEP-6-chain-client-extensions May 4, 2026
6 checks passed
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