Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions devnet/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 h1:ig/FpDD2JofP/NExKQUbn7uOSZzJAQqogfqluZK4ed4=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/LumeraProtocol/lumera v1.10.0/go.mod h1:p2sZZG3bLzSBdaW883qjuU3DXXY4NJzTTwLywr8uI0w=
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a github.com/LumeraProtocol/lumera v1.10.0/go.mod entry to devnet/go.sum, which is a self-referential dependency (the devnet module depending on its own parent repo at a tagged version). This is likely an artifact of running go mod tidy with a stale module cache or a replace directive that was temporarily removed. If the devnet module uses a replace directive to point at the local ../ path, this checksum line is dead weight and could cause confusion if the tagged version diverges from the local code. Worth confirming this entry is intentional.

Fix it with Roo Code or mention @roomote and request a fix.

github.com/LumeraProtocol/rq-go v0.2.1 h1:8B3UzRChLsGMmvZ+UVbJsJj6JZzL9P9iYxbdUwGsQI4=
github.com/LumeraProtocol/rq-go v0.2.1/go.mod h1:APnKCZRh1Es2Vtrd2w4kCLgAyaL5Bqrkz/BURoRJ+O8=
github.com/LumeraProtocol/sdk-go v1.0.8 h1:8M4QgrrmblDM42ABaKxFfjeF9/xtTHDkRwTYHEbtrSk=
Expand Down
97 changes: 97 additions & 0 deletions proto/lumera/audit/v1/audit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,102 @@ message StorageChallengeObservation {
repeated PortState port_states = 2;
}

enum StorageProofBucketType {
STORAGE_PROOF_BUCKET_TYPE_UNSPECIFIED = 0;
STORAGE_PROOF_BUCKET_TYPE_RECENT = 1;
STORAGE_PROOF_BUCKET_TYPE_OLD = 2;
STORAGE_PROOF_BUCKET_TYPE_PROBATION = 3;
STORAGE_PROOF_BUCKET_TYPE_RECHECK = 4;
}

enum StorageProofArtifactClass {
STORAGE_PROOF_ARTIFACT_CLASS_UNSPECIFIED = 0;
STORAGE_PROOF_ARTIFACT_CLASS_INDEX = 1;
STORAGE_PROOF_ARTIFACT_CLASS_SYMBOL = 2;
}

enum StorageProofResultClass {
STORAGE_PROOF_RESULT_CLASS_UNSPECIFIED = 0;
STORAGE_PROOF_RESULT_CLASS_PASS = 1;
STORAGE_PROOF_RESULT_CLASS_HASH_MISMATCH = 2;
STORAGE_PROOF_RESULT_CLASS_TIMEOUT_OR_NO_RESPONSE = 3;
STORAGE_PROOF_RESULT_CLASS_OBSERVER_QUORUM_FAIL = 4;
STORAGE_PROOF_RESULT_CLASS_NO_ELIGIBLE_TICKET = 5;
STORAGE_PROOF_RESULT_CLASS_INVALID_TRANSCRIPT = 6;
STORAGE_PROOF_RESULT_CLASS_RECHECK_CONFIRMED_FAIL = 7;
}

// StorageProofResult captures one storage-truth storage-proof check outcome.
message StorageProofResult {
string target_supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
string challenger_supernode_account = 2 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];

// ticket_id identifies the ticket selected by deterministic bucket logic.
string ticket_id = 3;

StorageProofBucketType bucket_type = 4;
StorageProofArtifactClass artifact_class = 5;

// artifact_ordinal is the deterministic ordinal selected inside the artifact class.
uint32 artifact_ordinal = 6;
string artifact_key = 7;

StorageProofResultClass result_class = 8;
string transcript_hash = 9;

// details is an optional short diagnostic summary for non-pass outcomes.
string details = 10;
}

// NodeSuspicionState is the persisted storage-truth node-level suspicion snapshot.
message NodeSuspicionState {
string supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
int64 suspicion_score = 2;
uint64 last_updated_epoch = 3;
}

// ReporterReliabilityState is the persisted storage-truth reporter reliability snapshot.
message ReporterReliabilityState {
string reporter_supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
int64 reliability_score = 2;
uint64 last_updated_epoch = 3;
}

// TicketDeteriorationState is the persisted storage-truth ticket deterioration snapshot.
message TicketDeteriorationState {
string ticket_id = 1;
int64 deterioration_score = 2;
uint64 last_updated_epoch = 3;
uint64 active_heal_op_id = 4;
uint64 probation_until_epoch = 5;
uint64 last_heal_epoch = 6;
}

enum HealOpStatus {
HEAL_OP_STATUS_UNSPECIFIED = 0;
HEAL_OP_STATUS_SCHEDULED = 1;
HEAL_OP_STATUS_IN_PROGRESS = 2;
HEAL_OP_STATUS_HEALER_REPORTED = 3;
HEAL_OP_STATUS_VERIFIED = 4;
HEAL_OP_STATUS_FAILED = 5;
HEAL_OP_STATUS_EXPIRED = 6;
}

// HealOp is the chain-tracked storage-truth healing operation state.
message HealOp {
uint64 heal_op_id = 1;
string ticket_id = 2;
uint64 scheduled_epoch_id = 3;
string healer_supernode_account = 4 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
repeated string verifier_supernode_accounts = 5 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
HealOpStatus status = 6;
uint64 created_height = 7;
uint64 updated_height = 8;
uint64 deadline_epoch_id = 9;
string result_hash = 10;
string notes = 11;
}

// EpochReport is a single per-epoch report submitted by a Supernode.
message EpochReport {
string supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
Expand All @@ -40,4 +136,5 @@ message EpochReport {

HostReport host_report = 4 [(gogoproto.nullable) = false];
repeated StorageChallengeObservation storage_challenge_observations = 5;
repeated StorageProofResult storage_proof_results = 6;
}
9 changes: 9 additions & 0 deletions proto/lumera/audit/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "gogoproto/gogo.proto";

import "lumera/audit/v1/params.proto";
import "lumera/audit/v1/evidence.proto";
import "lumera/audit/v1/audit.proto";

// GenesisState defines the audit module's genesis state.
message GenesisState {
Expand All @@ -21,4 +22,12 @@ message GenesisState {

// next_evidence_id is the next id to use for chain-assigned ids.
uint64 next_evidence_id = 3;

repeated NodeSuspicionState node_suspicion_states = 4 [(gogoproto.nullable) = false];
repeated ReporterReliabilityState reporter_reliability_states = 5 [(gogoproto.nullable) = false];
repeated TicketDeteriorationState ticket_deterioration_states = 6 [(gogoproto.nullable) = false];
repeated HealOp heal_ops = 7 [(gogoproto.nullable) = false];

// next_heal_op_id is the next id to use for storage-truth heal operations.
uint64 next_heal_op_id = 8;
}
30 changes: 30 additions & 0 deletions proto/lumera/audit/v1/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ option go_package = "x/audit/v1/types";
import "amino/amino.proto";
import "gogoproto/gogo.proto";

enum StorageTruthEnforcementMode {
STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED = 0;
STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW = 1;
STORAGE_TRUTH_ENFORCEMENT_MODE_SOFT = 2;
STORAGE_TRUTH_ENFORCEMENT_MODE_FULL = 3;
}

// Params defines the parameters for the audit module.
message Params {
option (gogoproto.equal) = true;
Expand Down Expand Up @@ -86,4 +93,27 @@ message Params {
// Storage Challenge (SC) params.
bool sc_enabled = 19;
uint32 sc_challengers_per_epoch = 20;

// Storage-truth challenge shape params.
uint64 storage_truth_recent_bucket_max_blocks = 21;
uint64 storage_truth_old_bucket_min_blocks = 22;
uint32 storage_truth_challenge_target_divisor = 23;
uint32 storage_truth_compound_ranges_per_artifact = 24;
uint32 storage_truth_compound_range_len_bytes = 25;

// Storage-truth scoring and healing params.
uint32 storage_truth_max_self_heal_ops_per_epoch = 26;
uint32 storage_truth_probation_epochs = 27;
int64 storage_truth_node_suspicion_decay_per_epoch = 28;
int64 storage_truth_reporter_reliability_decay_per_epoch = 29;
int64 storage_truth_ticket_deterioration_decay_per_epoch = 30;
int64 storage_truth_node_suspicion_threshold_watch = 31;
int64 storage_truth_node_suspicion_threshold_probation = 32;
int64 storage_truth_node_suspicion_threshold_postpone = 33;
int64 storage_truth_reporter_reliability_low_trust_threshold = 34;
int64 storage_truth_reporter_reliability_ineligible_threshold = 35;
int64 storage_truth_ticket_deterioration_heal_threshold = 36;

// Storage-truth rollout gate.
StorageTruthEnforcementMode storage_truth_enforcement_mode = 37;
}
82 changes: 82 additions & 0 deletions proto/lumera/audit/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,36 @@ service Query {
rpc HostReports(QueryHostReportsRequest) returns (QueryHostReportsResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/host_reports/{supernode_account}";
}

// NodeSuspicionState returns storage-truth node suspicion state for a supernode account.
rpc NodeSuspicionState(QueryNodeSuspicionStateRequest) returns (QueryNodeSuspicionStateResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/node_suspicion_state/{supernode_account}";
}

// ReporterReliabilityState returns storage-truth reporter reliability state for a reporter account.
rpc ReporterReliabilityState(QueryReporterReliabilityStateRequest) returns (QueryReporterReliabilityStateResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/reporter_reliability_state/{reporter_supernode_account}";
}

// TicketDeteriorationState returns storage-truth ticket deterioration state for a ticket id.
rpc TicketDeteriorationState(QueryTicketDeteriorationStateRequest) returns (QueryTicketDeteriorationStateResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/ticket_deterioration_state/{ticket_id}";
}

// HealOp returns a single storage-truth heal operation by id.
rpc HealOp(QueryHealOpRequest) returns (QueryHealOpResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/heal_op/{heal_op_id}";
}

// HealOpsByTicket returns storage-truth heal operations for a ticket id.
rpc HealOpsByTicket(QueryHealOpsByTicketRequest) returns (QueryHealOpsByTicketResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/heal_ops/by_ticket/{ticket_id}";
}

// HealOpsByStatus returns storage-truth heal operations filtered by status.
rpc HealOpsByStatus(QueryHealOpsByStatusRequest) returns (QueryHealOpsByStatusResponse) {
option (google.api.http).get = "/LumeraProtocol/lumera/audit/v1/heal_ops/by_status/{status}";
}
}

message QueryParamsRequest {}
Expand Down Expand Up @@ -204,3 +234,55 @@ message QueryHostReportsResponse {
repeated HostReportEntry reports = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

message QueryNodeSuspicionStateRequest {
string supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
}

message QueryNodeSuspicionStateResponse {
NodeSuspicionState state = 1 [(gogoproto.nullable) = false];
}

message QueryReporterReliabilityStateRequest {
string reporter_supernode_account = 1 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
}

message QueryReporterReliabilityStateResponse {
ReporterReliabilityState state = 1 [(gogoproto.nullable) = false];
}

message QueryTicketDeteriorationStateRequest {
string ticket_id = 1;
}

message QueryTicketDeteriorationStateResponse {
TicketDeteriorationState state = 1 [(gogoproto.nullable) = false];
}

message QueryHealOpRequest {
uint64 heal_op_id = 1;
}

message QueryHealOpResponse {
HealOp heal_op = 1 [(gogoproto.nullable) = false];
}

message QueryHealOpsByTicketRequest {
string ticket_id = 1;
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

message QueryHealOpsByTicketResponse {
repeated HealOp heal_ops = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

message QueryHealOpsByStatusRequest {
HealOpStatus status = 1;
cosmos.base.query.v1beta1.PageRequest pagination = 2;
}

message QueryHealOpsByStatusResponse {
repeated HealOp heal_ops = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
48 changes: 48 additions & 0 deletions proto/lumera/audit/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ service Msg {

// SubmitEvidence defines the SubmitEvidence RPC.
rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse);

// SubmitStorageRecheckEvidence defines the storage-truth recheck submission path.
rpc SubmitStorageRecheckEvidence(MsgSubmitStorageRecheckEvidence) returns (MsgSubmitStorageRecheckEvidenceResponse);

// ClaimHealComplete defines the healer claim path for a chain-tracked heal op.
rpc ClaimHealComplete(MsgClaimHealComplete) returns (MsgClaimHealCompleteResponse);

// SubmitHealVerification defines the verifier submission path for a chain-tracked heal op.
rpc SubmitHealVerification(MsgSubmitHealVerification) returns (MsgSubmitHealVerificationResponse);
}

message MsgUpdateParams {
Expand Down Expand Up @@ -65,3 +74,42 @@ message MsgSubmitEvidence {
message MsgSubmitEvidenceResponse {
uint64 evidence_id = 1;
}

message MsgSubmitStorageRecheckEvidence {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 epoch_id = 2;
string challenged_supernode_account = 3 [(cosmos_proto.scalar) = "cosmos.AccAddressString"];
string ticket_id = 4;
string challenged_result_transcript_hash = 5;
string recheck_transcript_hash = 6;
StorageProofResultClass recheck_result_class = 7;
string details = 8;
}

message MsgSubmitStorageRecheckEvidenceResponse {}

message MsgClaimHealComplete {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 heal_op_id = 2;
string ticket_id = 3;
string heal_manifest_hash = 4;
string details = 5;
}

message MsgClaimHealCompleteResponse {}

message MsgSubmitHealVerification {
option (cosmos.msg.v1.signer) = "creator";

string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
uint64 heal_op_id = 2;
bool verified = 3;
string verification_hash = 4;
string details = 5;
}

message MsgSubmitHealVerificationResponse {}
Loading
Loading