diff --git a/devnet/go.sum b/devnet/go.sum index 0cd78b6c..d39793c7 100644 --- a/devnet/go.sum +++ b/devnet/go.sum @@ -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= 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= diff --git a/proto/lumera/audit/v1/audit.proto b/proto/lumera/audit/v1/audit.proto index e1cdd985..5d3f170b 100644 --- a/proto/lumera/audit/v1/audit.proto +++ b/proto/lumera/audit/v1/audit.proto @@ -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"]; @@ -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; } diff --git a/proto/lumera/audit/v1/genesis.proto b/proto/lumera/audit/v1/genesis.proto index 5cec28b2..b08e69fa 100644 --- a/proto/lumera/audit/v1/genesis.proto +++ b/proto/lumera/audit/v1/genesis.proto @@ -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 { @@ -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; } diff --git a/proto/lumera/audit/v1/params.proto b/proto/lumera/audit/v1/params.proto index 282ce558..678864e6 100644 --- a/proto/lumera/audit/v1/params.proto +++ b/proto/lumera/audit/v1/params.proto @@ -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; @@ -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; } diff --git a/proto/lumera/audit/v1/query.proto b/proto/lumera/audit/v1/query.proto index 4eb10fc8..f6a3a9f4 100644 --- a/proto/lumera/audit/v1/query.proto +++ b/proto/lumera/audit/v1/query.proto @@ -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 {} @@ -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; +} diff --git a/proto/lumera/audit/v1/tx.proto b/proto/lumera/audit/v1/tx.proto index dec420a1..4f255bcf 100644 --- a/proto/lumera/audit/v1/tx.proto +++ b/proto/lumera/audit/v1/tx.proto @@ -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 { @@ -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 {} diff --git a/x/audit/v1/keeper/genesis.go b/x/audit/v1/keeper/genesis.go index e9e43ca2..89ea9ef1 100644 --- a/x/audit/v1/keeper/genesis.go +++ b/x/audit/v1/keeper/genesis.go @@ -49,6 +49,36 @@ func (k Keeper) InitGenesis(ctx context.Context, genState types.GenesisState) er } k.SetNextEvidenceID(sdkCtx, nextEvidenceID) + nextHealOpID := uint64(1) + if genState.NextHealOpId != 0 { + nextHealOpID = genState.NextHealOpId + } + + for _, state := range genState.NodeSuspicionStates { + if err := k.SetNodeSuspicionState(sdkCtx, state); err != nil { + return err + } + } + for _, state := range genState.ReporterReliabilityStates { + if err := k.SetReporterReliabilityState(sdkCtx, state); err != nil { + return err + } + } + for _, state := range genState.TicketDeteriorationStates { + if err := k.SetTicketDeteriorationState(sdkCtx, state); err != nil { + return err + } + } + for _, healOp := range genState.HealOps { + if err := k.SetHealOp(sdkCtx, healOp); err != nil { + return err + } + if healOp.HealOpId >= nextHealOpID { + nextHealOpID = healOp.HealOpId + 1 + } + } + k.SetNextHealOpID(sdkCtx, nextHealOpID) + return nil } @@ -73,5 +103,33 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) return nil, errors.New("invalid next evidence id") } + nodeSuspicionStates, err := k.GetAllNodeSuspicionStates(sdkCtx) + if err != nil { + return nil, err + } + genesis.NodeSuspicionStates = nodeSuspicionStates + + reporterReliabilityStates, err := k.GetAllReporterReliabilityStates(sdkCtx) + if err != nil { + return nil, err + } + genesis.ReporterReliabilityStates = reporterReliabilityStates + + ticketDeteriorationStates, err := k.GetAllTicketDeteriorationStates(sdkCtx) + if err != nil { + return nil, err + } + genesis.TicketDeteriorationStates = ticketDeteriorationStates + + healOps, err := k.GetAllHealOps(sdkCtx) + if err != nil { + return nil, err + } + genesis.HealOps = healOps + genesis.NextHealOpId = k.GetNextHealOpID(sdkCtx) + if genesis.NextHealOpId == 0 { + return nil, errors.New("invalid next heal op id") + } + return genesis, nil } diff --git a/x/audit/v1/keeper/genesis_test.go b/x/audit/v1/keeper/genesis_test.go index 73b4a33a..78d216bf 100644 --- a/x/audit/v1/keeper/genesis_test.go +++ b/x/audit/v1/keeper/genesis_test.go @@ -23,7 +23,12 @@ func TestGenesisParamsRoundTrip(t *testing.T) { require.EqualExportedValues(t, genesisState.Params, got.Params) require.Equal(t, uint64(1), got.NextEvidenceId) + require.Equal(t, uint64(1), got.NextHealOpId) require.Empty(t, got.Evidence) + require.Empty(t, got.NodeSuspicionStates) + require.Empty(t, got.ReporterReliabilityStates) + require.Empty(t, got.TicketDeteriorationStates) + require.Empty(t, got.HealOps) } func TestGenesisEvidenceRoundTripSetsNextID(t *testing.T) { @@ -53,4 +58,5 @@ func TestGenesisEvidenceRoundTripSetsNextID(t *testing.T) { require.Len(t, got.Evidence, 1) require.Equal(t, ev.EvidenceId, got.Evidence[0].EvidenceId) require.Equal(t, uint64(8), got.NextEvidenceId) + require.Equal(t, uint64(1), got.NextHealOpId) } diff --git a/x/audit/v1/keeper/msg_storage_truth_placeholders.go b/x/audit/v1/keeper/msg_storage_truth_placeholders.go new file mode 100644 index 00000000..48e21846 --- /dev/null +++ b/x/audit/v1/keeper/msg_storage_truth_placeholders.go @@ -0,0 +1,39 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + + "github.com/LumeraProtocol/lumera/x/audit/v1/types" +) + +func (m msgServer) SubmitStorageRecheckEvidence(_ context.Context, req *types.MsgSubmitStorageRecheckEvidence) (*types.MsgSubmitStorageRecheckEvidenceResponse, error) { + if req == nil { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "empty request") + } + if req.Creator == "" { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "creator is required") + } + return nil, errorsmod.Wrap(types.ErrNotImplemented, "SubmitStorageRecheckEvidence is introduced in storage-truth foundation and implemented in a later PR") +} + +func (m msgServer) ClaimHealComplete(_ context.Context, req *types.MsgClaimHealComplete) (*types.MsgClaimHealCompleteResponse, error) { + if req == nil { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "empty request") + } + if req.Creator == "" { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "creator is required") + } + return nil, errorsmod.Wrap(types.ErrNotImplemented, "ClaimHealComplete is introduced in storage-truth foundation and implemented in a later PR") +} + +func (m msgServer) SubmitHealVerification(_ context.Context, req *types.MsgSubmitHealVerification) (*types.MsgSubmitHealVerificationResponse, error) { + if req == nil { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "empty request") + } + if req.Creator == "" { + return nil, errorsmod.Wrap(types.ErrInvalidSigner, "creator is required") + } + return nil, errorsmod.Wrap(types.ErrNotImplemented, "SubmitHealVerification is introduced in storage-truth foundation and implemented in a later PR") +} diff --git a/x/audit/v1/keeper/msg_storage_truth_placeholders_test.go b/x/audit/v1/keeper/msg_storage_truth_placeholders_test.go new file mode 100644 index 00000000..9e48fc3e --- /dev/null +++ b/x/audit/v1/keeper/msg_storage_truth_placeholders_test.go @@ -0,0 +1,57 @@ +package keeper_test + +import ( + "testing" + + "github.com/LumeraProtocol/lumera/x/audit/v1/keeper" + "github.com/LumeraProtocol/lumera/x/audit/v1/types" + "github.com/stretchr/testify/require" +) + +func TestMsgSubmitStorageRecheckEvidencePlaceholder(t *testing.T) { + f := initFixture(t) + ms := keeper.NewMsgServerImpl(f.keeper) + + _, err := ms.SubmitStorageRecheckEvidence(f.ctx, nil) + require.Error(t, err) + require.Contains(t, err.Error(), "empty request") + + _, err = ms.SubmitStorageRecheckEvidence(f.ctx, &types.MsgSubmitStorageRecheckEvidence{}) + require.Error(t, err) + require.Contains(t, err.Error(), "creator is required") + + _, err = ms.SubmitStorageRecheckEvidence(f.ctx, &types.MsgSubmitStorageRecheckEvidence{ + Creator: "lumera1creator111111111111111111111111r0jv6", + EpochId: 1, + ChallengedSupernodeAccount: "lumera1subject111111111111111111111111f4pnj", + TicketId: "ticket-1", + }) + require.Error(t, err) + require.Contains(t, err.Error(), types.ErrNotImplemented.Error()) +} + +func TestMsgClaimHealCompletePlaceholder(t *testing.T) { + f := initFixture(t) + ms := keeper.NewMsgServerImpl(f.keeper) + + _, err := ms.ClaimHealComplete(f.ctx, &types.MsgClaimHealComplete{ + Creator: "lumera1creator222222222222222222222222jhx4s", + HealOpId: 3, + TicketId: "ticket-3", + }) + require.Error(t, err) + require.Contains(t, err.Error(), types.ErrNotImplemented.Error()) +} + +func TestMsgSubmitHealVerificationPlaceholder(t *testing.T) { + f := initFixture(t) + ms := keeper.NewMsgServerImpl(f.keeper) + + _, err := ms.SubmitHealVerification(f.ctx, &types.MsgSubmitHealVerification{ + Creator: "lumera1creator3333333333333333333333333v56r", + HealOpId: 7, + Verified: true, + }) + require.Error(t, err) + require.Contains(t, err.Error(), types.ErrNotImplemented.Error()) +} diff --git a/x/audit/v1/keeper/query_storage_truth.go b/x/audit/v1/keeper/query_storage_truth.go new file mode 100644 index 00000000..92320208 --- /dev/null +++ b/x/audit/v1/keeper/query_storage_truth.go @@ -0,0 +1,162 @@ +package keeper + +import ( + "context" + "encoding/binary" + + "cosmossdk.io/store/prefix" + "github.com/LumeraProtocol/lumera/x/audit/v1/types" + "github.com/cosmos/cosmos-sdk/runtime" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (q queryServer) NodeSuspicionState(ctx context.Context, req *types.QueryNodeSuspicionStateRequest) (*types.QueryNodeSuspicionStateResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.SupernodeAccount == "" { + return nil, status.Error(codes.InvalidArgument, "supernode_account is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + state, found := q.k.GetNodeSuspicionState(sdkCtx, req.SupernodeAccount) + if !found { + return nil, status.Error(codes.NotFound, "node suspicion state not found") + } + + return &types.QueryNodeSuspicionStateResponse{State: state}, nil +} + +func (q queryServer) ReporterReliabilityState(ctx context.Context, req *types.QueryReporterReliabilityStateRequest) (*types.QueryReporterReliabilityStateResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.ReporterSupernodeAccount == "" { + return nil, status.Error(codes.InvalidArgument, "reporter_supernode_account is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + state, found := q.k.GetReporterReliabilityState(sdkCtx, req.ReporterSupernodeAccount) + if !found { + return nil, status.Error(codes.NotFound, "reporter reliability state not found") + } + + return &types.QueryReporterReliabilityStateResponse{State: state}, nil +} + +func (q queryServer) TicketDeteriorationState(ctx context.Context, req *types.QueryTicketDeteriorationStateRequest) (*types.QueryTicketDeteriorationStateResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.TicketId == "" { + return nil, status.Error(codes.InvalidArgument, "ticket_id is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + state, found := q.k.GetTicketDeteriorationState(sdkCtx, req.TicketId) + if !found { + return nil, status.Error(codes.NotFound, "ticket deterioration state not found") + } + + return &types.QueryTicketDeteriorationStateResponse{State: state}, nil +} + +func (q queryServer) HealOp(ctx context.Context, req *types.QueryHealOpRequest) (*types.QueryHealOpResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.HealOpId == 0 { + return nil, status.Error(codes.InvalidArgument, "heal_op_id is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + healOp, found := q.k.GetHealOp(sdkCtx, req.HealOpId) + if !found { + return nil, status.Error(codes.NotFound, "heal op not found") + } + + return &types.QueryHealOpResponse{HealOp: healOp}, nil +} + +func (q queryServer) HealOpsByTicket(ctx context.Context, req *types.QueryHealOpsByTicketRequest) (*types.QueryHealOpsByTicketResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.TicketId == "" { + return nil, status.Error(codes.InvalidArgument, "ticket_id is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + storeAdapter := runtime.KVStoreAdapter(q.k.storeService.OpenKVStore(sdkCtx)) + store := prefix.NewStore(storeAdapter, types.HealOpByTicketIndexPrefix(req.TicketId)) + + var healOps []types.HealOp + pagination := req.Pagination + if pagination == nil { + pagination = &query.PageRequest{Limit: 100} + } + + pageRes, err := query.Paginate(store, pagination, func(key, _ []byte) error { + if len(key) != 8 { + return status.Error(codes.Internal, "invalid heal op ticket index key") + } + healOpID := binary.BigEndian.Uint64(key) + healOp, found := q.k.GetHealOp(sdkCtx, healOpID) + if !found { + return nil + } + healOps = append(healOps, healOp) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryHealOpsByTicketResponse{ + HealOps: healOps, + Pagination: pageRes, + }, nil +} + +func (q queryServer) HealOpsByStatus(ctx context.Context, req *types.QueryHealOpsByStatusRequest) (*types.QueryHealOpsByStatusResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + if req.Status == types.HealOpStatus_HEAL_OP_STATUS_UNSPECIFIED { + return nil, status.Error(codes.InvalidArgument, "status is required") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + storeAdapter := runtime.KVStoreAdapter(q.k.storeService.OpenKVStore(sdkCtx)) + store := prefix.NewStore(storeAdapter, types.HealOpByStatusIndexPrefix(req.Status)) + + var healOps []types.HealOp + pagination := req.Pagination + if pagination == nil { + pagination = &query.PageRequest{Limit: 100} + } + + pageRes, err := query.Paginate(store, pagination, func(key, _ []byte) error { + if len(key) != 8 { + return status.Error(codes.Internal, "invalid heal op status index key") + } + healOpID := binary.BigEndian.Uint64(key) + healOp, found := q.k.GetHealOp(sdkCtx, healOpID) + if !found { + return nil + } + healOps = append(healOps, healOp) + return nil + }) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryHealOpsByStatusResponse{ + HealOps: healOps, + Pagination: pageRes, + }, nil +} diff --git a/x/audit/v1/keeper/query_storage_truth_test.go b/x/audit/v1/keeper/query_storage_truth_test.go new file mode 100644 index 00000000..0cfe2ceb --- /dev/null +++ b/x/audit/v1/keeper/query_storage_truth_test.go @@ -0,0 +1,123 @@ +package keeper_test + +import ( + "testing" + + "github.com/LumeraProtocol/lumera/x/audit/v1/keeper" + "github.com/LumeraProtocol/lumera/x/audit/v1/types" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestNodeSuspicionStateQuery(t *testing.T) { + f := initFixture(t) + qs := keeper.NewQueryServerImpl(f.keeper) + + _, err := qs.NodeSuspicionState(f.ctx, nil) + require.Error(t, err) + require.Equal(t, codes.InvalidArgument, status.Code(err)) + + _, err = qs.NodeSuspicionState(f.ctx, &types.QueryNodeSuspicionStateRequest{}) + require.Error(t, err) + require.Equal(t, codes.InvalidArgument, status.Code(err)) + + _, err = qs.NodeSuspicionState(f.ctx, &types.QueryNodeSuspicionStateRequest{SupernodeAccount: "lumera1missing"}) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + + state := types.NodeSuspicionState{ + SupernodeAccount: "lumera1node111111111111111111111111111111dlux4", + SuspicionScore: 21, + LastUpdatedEpoch: 19, + } + require.NoError(t, f.keeper.SetNodeSuspicionState(f.ctx, state)) + + resp, err := qs.NodeSuspicionState(f.ctx, &types.QueryNodeSuspicionStateRequest{SupernodeAccount: state.SupernodeAccount}) + require.NoError(t, err) + require.Equal(t, state, resp.State) +} + +func TestReporterReliabilityStateQuery(t *testing.T) { + f := initFixture(t) + qs := keeper.NewQueryServerImpl(f.keeper) + + state := types.ReporterReliabilityState{ + ReporterSupernodeAccount: "lumera1reporter111111111111111111111111lyv93", + ReliabilityScore: -9, + LastUpdatedEpoch: 20, + } + require.NoError(t, f.keeper.SetReporterReliabilityState(f.ctx, state)) + + resp, err := qs.ReporterReliabilityState(f.ctx, &types.QueryReporterReliabilityStateRequest{ + ReporterSupernodeAccount: state.ReporterSupernodeAccount, + }) + require.NoError(t, err) + require.Equal(t, state, resp.State) +} + +func TestTicketDeteriorationStateQuery(t *testing.T) { + f := initFixture(t) + qs := keeper.NewQueryServerImpl(f.keeper) + + state := types.TicketDeteriorationState{ + TicketId: "ticket-query-1", + DeteriorationScore: 30, + LastUpdatedEpoch: 21, + ProbationUntilEpoch: 23, + } + require.NoError(t, f.keeper.SetTicketDeteriorationState(f.ctx, state)) + + resp, err := qs.TicketDeteriorationState(f.ctx, &types.QueryTicketDeteriorationStateRequest{ + TicketId: state.TicketId, + }) + require.NoError(t, err) + require.Equal(t, state, resp.State) +} + +func TestHealOpQueries(t *testing.T) { + f := initFixture(t) + qs := keeper.NewQueryServerImpl(f.keeper) + + healOp1 := types.HealOp{ + HealOpId: 1, + TicketId: "ticket-abc", + ScheduledEpochId: 3, + HealerSupernodeAccount: "lumera1healer1111111111111111111111111399f2", + Status: types.HealOpStatus_HEAL_OP_STATUS_SCHEDULED, + } + healOp2 := types.HealOp{ + HealOpId: 2, + TicketId: "ticket-abc", + ScheduledEpochId: 4, + HealerSupernodeAccount: "lumera1healer2222222222222222222222222v5r0s", + Status: types.HealOpStatus_HEAL_OP_STATUS_IN_PROGRESS, + } + healOp3 := types.HealOp{ + HealOpId: 3, + TicketId: "ticket-def", + ScheduledEpochId: 5, + HealerSupernodeAccount: "lumera1healer3333333333333333333333333ea4u8", + Status: types.HealOpStatus_HEAL_OP_STATUS_IN_PROGRESS, + } + + require.NoError(t, f.keeper.SetHealOp(f.ctx, healOp1)) + require.NoError(t, f.keeper.SetHealOp(f.ctx, healOp2)) + require.NoError(t, f.keeper.SetHealOp(f.ctx, healOp3)) + + respOne, err := qs.HealOp(f.ctx, &types.QueryHealOpRequest{HealOpId: 2}) + require.NoError(t, err) + require.Equal(t, healOp2, respOne.HealOp) + + respByTicket, err := qs.HealOpsByTicket(f.ctx, &types.QueryHealOpsByTicketRequest{TicketId: "ticket-abc"}) + require.NoError(t, err) + require.Len(t, respByTicket.HealOps, 2) + + respByStatus, err := qs.HealOpsByStatus(f.ctx, &types.QueryHealOpsByStatusRequest{Status: types.HealOpStatus_HEAL_OP_STATUS_IN_PROGRESS}) + require.NoError(t, err) + require.Len(t, respByStatus.HealOps, 2) + + _, err = qs.HealOpsByStatus(f.ctx, &types.QueryHealOpsByStatusRequest{Status: types.HealOpStatus_HEAL_OP_STATUS_UNSPECIFIED}) + require.Error(t, err) + require.Equal(t, codes.InvalidArgument, status.Code(err)) +} diff --git a/x/audit/v1/keeper/storage_truth_state.go b/x/audit/v1/keeper/storage_truth_state.go new file mode 100644 index 00000000..645ed14d --- /dev/null +++ b/x/audit/v1/keeper/storage_truth_state.go @@ -0,0 +1,194 @@ +package keeper + +import ( + "encoding/binary" + + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/LumeraProtocol/lumera/x/audit/v1/types" +) + +func (k Keeper) HasNodeSuspicionState(ctx sdk.Context, supernodeAccount string) bool { + store := k.kvStore(ctx) + return store.Has(types.NodeSuspicionStateKey(supernodeAccount)) +} + +func (k Keeper) GetNodeSuspicionState(ctx sdk.Context, supernodeAccount string) (types.NodeSuspicionState, bool) { + store := k.kvStore(ctx) + bz := store.Get(types.NodeSuspicionStateKey(supernodeAccount)) + if bz == nil { + return types.NodeSuspicionState{}, false + } + var state types.NodeSuspicionState + k.cdc.MustUnmarshal(bz, &state) + return state, true +} + +func (k Keeper) SetNodeSuspicionState(ctx sdk.Context, state types.NodeSuspicionState) error { + store := k.kvStore(ctx) + bz, err := k.cdc.Marshal(&state) + if err != nil { + return err + } + store.Set(types.NodeSuspicionStateKey(state.SupernodeAccount), bz) + return nil +} + +func (k Keeper) GetAllNodeSuspicionStates(ctx sdk.Context) ([]types.NodeSuspicionState, error) { + store := k.kvStore(ctx) + it := store.Iterator(types.NodeSuspicionStatePrefix(), storetypes.PrefixEndBytes(types.NodeSuspicionStatePrefix())) + defer it.Close() + + states := make([]types.NodeSuspicionState, 0) + for ; it.Valid(); it.Next() { + var state types.NodeSuspicionState + k.cdc.MustUnmarshal(it.Value(), &state) + states = append(states, state) + } + return states, nil +} + +func (k Keeper) HasReporterReliabilityState(ctx sdk.Context, reporterSupernodeAccount string) bool { + store := k.kvStore(ctx) + return store.Has(types.ReporterReliabilityStateKey(reporterSupernodeAccount)) +} + +func (k Keeper) GetReporterReliabilityState(ctx sdk.Context, reporterSupernodeAccount string) (types.ReporterReliabilityState, bool) { + store := k.kvStore(ctx) + bz := store.Get(types.ReporterReliabilityStateKey(reporterSupernodeAccount)) + if bz == nil { + return types.ReporterReliabilityState{}, false + } + var state types.ReporterReliabilityState + k.cdc.MustUnmarshal(bz, &state) + return state, true +} + +func (k Keeper) SetReporterReliabilityState(ctx sdk.Context, state types.ReporterReliabilityState) error { + store := k.kvStore(ctx) + bz, err := k.cdc.Marshal(&state) + if err != nil { + return err + } + store.Set(types.ReporterReliabilityStateKey(state.ReporterSupernodeAccount), bz) + return nil +} + +func (k Keeper) GetAllReporterReliabilityStates(ctx sdk.Context) ([]types.ReporterReliabilityState, error) { + store := k.kvStore(ctx) + it := store.Iterator(types.ReporterReliabilityStatePrefix(), storetypes.PrefixEndBytes(types.ReporterReliabilityStatePrefix())) + defer it.Close() + + states := make([]types.ReporterReliabilityState, 0) + for ; it.Valid(); it.Next() { + var state types.ReporterReliabilityState + k.cdc.MustUnmarshal(it.Value(), &state) + states = append(states, state) + } + return states, nil +} + +func (k Keeper) HasTicketDeteriorationState(ctx sdk.Context, ticketID string) bool { + store := k.kvStore(ctx) + return store.Has(types.TicketDeteriorationStateKey(ticketID)) +} + +func (k Keeper) GetTicketDeteriorationState(ctx sdk.Context, ticketID string) (types.TicketDeteriorationState, bool) { + store := k.kvStore(ctx) + bz := store.Get(types.TicketDeteriorationStateKey(ticketID)) + if bz == nil { + return types.TicketDeteriorationState{}, false + } + var state types.TicketDeteriorationState + k.cdc.MustUnmarshal(bz, &state) + return state, true +} + +func (k Keeper) SetTicketDeteriorationState(ctx sdk.Context, state types.TicketDeteriorationState) error { + store := k.kvStore(ctx) + bz, err := k.cdc.Marshal(&state) + if err != nil { + return err + } + store.Set(types.TicketDeteriorationStateKey(state.TicketId), bz) + return nil +} + +func (k Keeper) GetAllTicketDeteriorationStates(ctx sdk.Context) ([]types.TicketDeteriorationState, error) { + store := k.kvStore(ctx) + it := store.Iterator(types.TicketDeteriorationStatePrefix(), storetypes.PrefixEndBytes(types.TicketDeteriorationStatePrefix())) + defer it.Close() + + states := make([]types.TicketDeteriorationState, 0) + for ; it.Valid(); it.Next() { + var state types.TicketDeteriorationState + k.cdc.MustUnmarshal(it.Value(), &state) + states = append(states, state) + } + return states, nil +} + +func (k Keeper) GetNextHealOpID(ctx sdk.Context) uint64 { + store := k.kvStore(ctx) + bz := store.Get(types.NextHealOpIDKey()) + if bz == nil { + return 1 + } + return binary.BigEndian.Uint64(bz) +} + +func (k Keeper) SetNextHealOpID(ctx sdk.Context, id uint64) { + store := k.kvStore(ctx) + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, id) + store.Set(types.NextHealOpIDKey(), bz) +} + +func (k Keeper) HasHealOp(ctx sdk.Context, healOpID uint64) bool { + store := k.kvStore(ctx) + return store.Has(types.HealOpKey(healOpID)) +} + +func (k Keeper) GetHealOp(ctx sdk.Context, healOpID uint64) (types.HealOp, bool) { + store := k.kvStore(ctx) + bz := store.Get(types.HealOpKey(healOpID)) + if bz == nil { + return types.HealOp{}, false + } + var healOp types.HealOp + k.cdc.MustUnmarshal(bz, &healOp) + return healOp, true +} + +func (k Keeper) SetHealOp(ctx sdk.Context, healOp types.HealOp) error { + store := k.kvStore(ctx) + + if existing, found := k.GetHealOp(ctx, healOp.HealOpId); found { + store.Delete(types.HealOpByTicketIndexKey(existing.TicketId, existing.HealOpId)) + store.Delete(types.HealOpByStatusIndexKey(existing.Status, existing.HealOpId)) + } + + bz, err := k.cdc.Marshal(&healOp) + if err != nil { + return err + } + store.Set(types.HealOpKey(healOp.HealOpId), bz) + store.Set(types.HealOpByTicketIndexKey(healOp.TicketId, healOp.HealOpId), []byte{1}) + store.Set(types.HealOpByStatusIndexKey(healOp.Status, healOp.HealOpId), []byte{1}) + return nil +} + +func (k Keeper) GetAllHealOps(ctx sdk.Context) ([]types.HealOp, error) { + store := k.kvStore(ctx) + it := store.Iterator(types.HealOpPrefix(), storetypes.PrefixEndBytes(types.HealOpPrefix())) + defer it.Close() + + healOps := make([]types.HealOp, 0) + for ; it.Valid(); it.Next() { + var healOp types.HealOp + k.cdc.MustUnmarshal(it.Value(), &healOp) + healOps = append(healOps, healOp) + } + return healOps, nil +} diff --git a/x/audit/v1/keeper/storage_truth_state_test.go b/x/audit/v1/keeper/storage_truth_state_test.go new file mode 100644 index 00000000..cd5d4cc6 --- /dev/null +++ b/x/audit/v1/keeper/storage_truth_state_test.go @@ -0,0 +1,109 @@ +package keeper_test + +import ( + "testing" + + "github.com/LumeraProtocol/lumera/x/audit/v1/types" + "github.com/stretchr/testify/require" +) + +func TestNodeSuspicionStateRoundTrip(t *testing.T) { + f := initFixture(t) + + state := types.NodeSuspicionState{ + SupernodeAccount: "lumera1node000000000000000000000000000000l2sya", + SuspicionScore: 15, + LastUpdatedEpoch: 7, + } + + require.False(t, f.keeper.HasNodeSuspicionState(f.ctx, state.SupernodeAccount)) + _, found := f.keeper.GetNodeSuspicionState(f.ctx, state.SupernodeAccount) + require.False(t, found) + + require.NoError(t, f.keeper.SetNodeSuspicionState(f.ctx, state)) + require.True(t, f.keeper.HasNodeSuspicionState(f.ctx, state.SupernodeAccount)) + + got, found := f.keeper.GetNodeSuspicionState(f.ctx, state.SupernodeAccount) + require.True(t, found) + require.Equal(t, state, got) +} + +func TestReporterReliabilityStateRoundTrip(t *testing.T) { + f := initFixture(t) + + state := types.ReporterReliabilityState{ + ReporterSupernodeAccount: "lumera1reporter0000000000000000000000000m09fa", + ReliabilityScore: -5, + LastUpdatedEpoch: 8, + } + + require.False(t, f.keeper.HasReporterReliabilityState(f.ctx, state.ReporterSupernodeAccount)) + require.NoError(t, f.keeper.SetReporterReliabilityState(f.ctx, state)) + + got, found := f.keeper.GetReporterReliabilityState(f.ctx, state.ReporterSupernodeAccount) + require.True(t, found) + require.Equal(t, state, got) +} + +func TestTicketDeteriorationStateRoundTrip(t *testing.T) { + f := initFixture(t) + + state := types.TicketDeteriorationState{ + TicketId: "ticket-1", + DeteriorationScore: 25, + LastUpdatedEpoch: 9, + ActiveHealOpId: 3, + ProbationUntilEpoch: 12, + LastHealEpoch: 10, + } + + require.False(t, f.keeper.HasTicketDeteriorationState(f.ctx, state.TicketId)) + require.NoError(t, f.keeper.SetTicketDeteriorationState(f.ctx, state)) + + got, found := f.keeper.GetTicketDeteriorationState(f.ctx, state.TicketId) + require.True(t, found) + require.Equal(t, state, got) +} + +func TestHealOpAndNextIDRoundTrip(t *testing.T) { + f := initFixture(t) + + require.Equal(t, uint64(1), f.keeper.GetNextHealOpID(f.ctx)) + f.keeper.SetNextHealOpID(f.ctx, 22) + require.Equal(t, uint64(22), f.keeper.GetNextHealOpID(f.ctx)) + + healOp := types.HealOp{ + HealOpId: 5, + TicketId: "ticket-5", + ScheduledEpochId: 11, + HealerSupernodeAccount: "lumera1healer00000000000000000000000004qyrj", + VerifierSupernodeAccounts: []string{ + "lumera1verifier1000000000000000000000005tzzg", + "lumera1verifier200000000000000000000000w2x4k", + }, + Status: types.HealOpStatus_HEAL_OP_STATUS_SCHEDULED, + CreatedHeight: 100, + UpdatedHeight: 100, + DeadlineEpochId: 14, + ResultHash: "hash-1", + Notes: "initial", + } + + require.False(t, f.keeper.HasHealOp(f.ctx, healOp.HealOpId)) + require.NoError(t, f.keeper.SetHealOp(f.ctx, healOp)) + require.True(t, f.keeper.HasHealOp(f.ctx, healOp.HealOpId)) + + got, found := f.keeper.GetHealOp(f.ctx, healOp.HealOpId) + require.True(t, found) + require.Equal(t, healOp, got) + + // Update should replace status/ticket indices without duplicating stale ones. + healOp.Status = types.HealOpStatus_HEAL_OP_STATUS_IN_PROGRESS + healOp.TicketId = "ticket-5b" + healOp.UpdatedHeight = 101 + require.NoError(t, f.keeper.SetHealOp(f.ctx, healOp)) + + got, found = f.keeper.GetHealOp(f.ctx, healOp.HealOpId) + require.True(t, found) + require.Equal(t, healOp, got) +} diff --git a/x/audit/v1/module/autocli.go b/x/audit/v1/module/autocli.go index fb665452..a4ad152e 100644 --- a/x/audit/v1/module/autocli.go +++ b/x/audit/v1/module/autocli.go @@ -65,6 +65,42 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { {ProtoField: "supernode_account"}, }, }, + { + RpcMethod: "NodeSuspicionState", + Use: "node-suspicion-state [supernode-account]", + Short: "Query storage-truth node suspicion state by supernode account", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "supernode_account"}}, + }, + { + RpcMethod: "ReporterReliabilityState", + Use: "reporter-reliability-state [reporter-supernode-account]", + Short: "Query storage-truth reporter reliability state by reporter account", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "reporter_supernode_account"}}, + }, + { + RpcMethod: "TicketDeteriorationState", + Use: "ticket-deterioration-state [ticket-id]", + Short: "Query storage-truth ticket deterioration state by ticket id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ticket_id"}}, + }, + { + RpcMethod: "HealOp", + Use: "heal-op [heal-op-id]", + Short: "Query a storage-truth heal operation by id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "heal_op_id"}}, + }, + { + RpcMethod: "HealOpsByTicket", + Use: "heal-ops-by-ticket [ticket-id]", + Short: "List storage-truth heal operations by ticket id", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "ticket_id"}}, + }, + { + RpcMethod: "HealOpsByStatus", + Use: "heal-ops-by-status [status]", + Short: "List storage-truth heal operations by status", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "status"}}, + }, // this line is used by ignite scaffolding # autocli/query }, }, @@ -88,6 +124,24 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Submit evidence about a subject (metadata is JSON)", PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "subject_address"}, {ProtoField: "evidence_type"}, {ProtoField: "action_id"}, {ProtoField: "metadata"}}, }, + { + RpcMethod: "SubmitStorageRecheckEvidence", + Use: "submit-storage-recheck-evidence [epoch-id] [challenged-supernode-account] [ticket-id]", + Short: "Submit storage-truth recheck evidence (foundation path; behavior implemented in a later PR)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "epoch_id"}, {ProtoField: "challenged_supernode_account"}, {ProtoField: "ticket_id"}}, + }, + { + RpcMethod: "ClaimHealComplete", + Use: "claim-heal-complete [heal-op-id] [ticket-id] [heal-manifest-hash]", + Short: "Submit healer completion claim for a storage-truth heal op (implemented in a later PR)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "heal_op_id"}, {ProtoField: "ticket_id"}, {ProtoField: "heal_manifest_hash"}}, + }, + { + RpcMethod: "SubmitHealVerification", + Use: "submit-heal-verification [heal-op-id] [verified] [verification-hash]", + Short: "Submit verifier decision for a storage-truth heal op (implemented in a later PR)", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "heal_op_id"}, {ProtoField: "verified"}, {ProtoField: "verification_hash"}}, + }, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/audit/v1/module/simulation_test.go b/x/audit/v1/module/simulation_test.go new file mode 100644 index 00000000..0d7fca16 --- /dev/null +++ b/x/audit/v1/module/simulation_test.go @@ -0,0 +1,31 @@ +package audit + +import ( + "math/rand" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/stretchr/testify/require" + + audittypes "github.com/LumeraProtocol/lumera/x/audit/v1/types" +) + +func TestWeightedOperationsIncludesSubmitEvidence(t *testing.T) { + am := AppModule{} + + simState := module.SimulationState{ + AppParams: make(simtypes.AppParams), + } + + ops := am.WeightedOperations(simState) + require.Len(t, ops, 1) + + msg, futureOps, err := ops[0].Op()(rand.New(rand.NewSource(1)), nil, sdk.Context{}, []simtypes.Account{}, "testing") + require.NoError(t, err) + require.Empty(t, futureOps) + require.Equal(t, audittypes.ModuleName, msg.Route) + require.Equal(t, sdk.MsgTypeURL(&audittypes.MsgSubmitEvidence{}), msg.Name) + require.False(t, msg.OK) +} diff --git a/x/audit/v1/simulation/submit_evidence_test.go b/x/audit/v1/simulation/submit_evidence_test.go new file mode 100644 index 00000000..153aa8ef --- /dev/null +++ b/x/audit/v1/simulation/submit_evidence_test.go @@ -0,0 +1,26 @@ +package simulation + +import ( + "math/rand" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/stretchr/testify/require" + + "github.com/LumeraProtocol/lumera/x/audit/v1/keeper" + "github.com/LumeraProtocol/lumera/x/audit/v1/types" +) + +func TestSimulateMsgSubmitEvidenceNoOpMessage(t *testing.T) { + // Keepers/tx config are not used in this operation today. + op := SimulateMsgSubmitEvidence(nil, nil, keeper.Keeper{}, nil) + + msg, futureOps, err := op(rand.New(rand.NewSource(1)), nil, sdk.Context{}, []simtypes.Account{}, "testing") + require.NoError(t, err) + require.Empty(t, futureOps) + require.Equal(t, types.ModuleName, msg.Route) + require.Equal(t, sdk.MsgTypeURL(&types.MsgSubmitEvidence{}), msg.Name) + require.False(t, msg.OK) + require.Contains(t, msg.Comment, "no public evidence types are available") +} diff --git a/x/audit/v1/types/audit.pb.go b/x/audit/v1/types/audit.pb.go index 9102fcbc..2edb5520 100644 --- a/x/audit/v1/types/audit.pb.go +++ b/x/audit/v1/types/audit.pb.go @@ -54,6 +54,151 @@ func (PortState) EnumDescriptor() ([]byte, []int) { return fileDescriptor_0613fff850c07858, []int{0} } +type StorageProofBucketType int32 + +const ( + StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_UNSPECIFIED StorageProofBucketType = 0 + StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_RECENT StorageProofBucketType = 1 + StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_OLD StorageProofBucketType = 2 + StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_PROBATION StorageProofBucketType = 3 + StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_RECHECK StorageProofBucketType = 4 +) + +var StorageProofBucketType_name = map[int32]string{ + 0: "STORAGE_PROOF_BUCKET_TYPE_UNSPECIFIED", + 1: "STORAGE_PROOF_BUCKET_TYPE_RECENT", + 2: "STORAGE_PROOF_BUCKET_TYPE_OLD", + 3: "STORAGE_PROOF_BUCKET_TYPE_PROBATION", + 4: "STORAGE_PROOF_BUCKET_TYPE_RECHECK", +} + +var StorageProofBucketType_value = map[string]int32{ + "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, +} + +func (x StorageProofBucketType) String() string { + return proto.EnumName(StorageProofBucketType_name, int32(x)) +} + +func (StorageProofBucketType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{1} +} + +type StorageProofArtifactClass int32 + +const ( + StorageProofArtifactClass_STORAGE_PROOF_ARTIFACT_CLASS_UNSPECIFIED StorageProofArtifactClass = 0 + StorageProofArtifactClass_STORAGE_PROOF_ARTIFACT_CLASS_INDEX StorageProofArtifactClass = 1 + StorageProofArtifactClass_STORAGE_PROOF_ARTIFACT_CLASS_SYMBOL StorageProofArtifactClass = 2 +) + +var StorageProofArtifactClass_name = map[int32]string{ + 0: "STORAGE_PROOF_ARTIFACT_CLASS_UNSPECIFIED", + 1: "STORAGE_PROOF_ARTIFACT_CLASS_INDEX", + 2: "STORAGE_PROOF_ARTIFACT_CLASS_SYMBOL", +} + +var StorageProofArtifactClass_value = map[string]int32{ + "STORAGE_PROOF_ARTIFACT_CLASS_UNSPECIFIED": 0, + "STORAGE_PROOF_ARTIFACT_CLASS_INDEX": 1, + "STORAGE_PROOF_ARTIFACT_CLASS_SYMBOL": 2, +} + +func (x StorageProofArtifactClass) String() string { + return proto.EnumName(StorageProofArtifactClass_name, int32(x)) +} + +func (StorageProofArtifactClass) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{2} +} + +type StorageProofResultClass int32 + +const ( + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_UNSPECIFIED StorageProofResultClass = 0 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_PASS StorageProofResultClass = 1 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_HASH_MISMATCH StorageProofResultClass = 2 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_TIMEOUT_OR_NO_RESPONSE StorageProofResultClass = 3 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_OBSERVER_QUORUM_FAIL StorageProofResultClass = 4 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_NO_ELIGIBLE_TICKET StorageProofResultClass = 5 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_INVALID_TRANSCRIPT StorageProofResultClass = 6 + StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_RECHECK_CONFIRMED_FAIL StorageProofResultClass = 7 +) + +var StorageProofResultClass_name = map[int32]string{ + 0: "STORAGE_PROOF_RESULT_CLASS_UNSPECIFIED", + 1: "STORAGE_PROOF_RESULT_CLASS_PASS", + 2: "STORAGE_PROOF_RESULT_CLASS_HASH_MISMATCH", + 3: "STORAGE_PROOF_RESULT_CLASS_TIMEOUT_OR_NO_RESPONSE", + 4: "STORAGE_PROOF_RESULT_CLASS_OBSERVER_QUORUM_FAIL", + 5: "STORAGE_PROOF_RESULT_CLASS_NO_ELIGIBLE_TICKET", + 6: "STORAGE_PROOF_RESULT_CLASS_INVALID_TRANSCRIPT", + 7: "STORAGE_PROOF_RESULT_CLASS_RECHECK_CONFIRMED_FAIL", +} + +var StorageProofResultClass_value = map[string]int32{ + "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, +} + +func (x StorageProofResultClass) String() string { + return proto.EnumName(StorageProofResultClass_name, int32(x)) +} + +func (StorageProofResultClass) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{3} +} + +type HealOpStatus int32 + +const ( + HealOpStatus_HEAL_OP_STATUS_UNSPECIFIED HealOpStatus = 0 + HealOpStatus_HEAL_OP_STATUS_SCHEDULED HealOpStatus = 1 + HealOpStatus_HEAL_OP_STATUS_IN_PROGRESS HealOpStatus = 2 + HealOpStatus_HEAL_OP_STATUS_HEALER_REPORTED HealOpStatus = 3 + HealOpStatus_HEAL_OP_STATUS_VERIFIED HealOpStatus = 4 + HealOpStatus_HEAL_OP_STATUS_FAILED HealOpStatus = 5 + HealOpStatus_HEAL_OP_STATUS_EXPIRED HealOpStatus = 6 +) + +var HealOpStatus_name = map[int32]string{ + 0: "HEAL_OP_STATUS_UNSPECIFIED", + 1: "HEAL_OP_STATUS_SCHEDULED", + 2: "HEAL_OP_STATUS_IN_PROGRESS", + 3: "HEAL_OP_STATUS_HEALER_REPORTED", + 4: "HEAL_OP_STATUS_VERIFIED", + 5: "HEAL_OP_STATUS_FAILED", + 6: "HEAL_OP_STATUS_EXPIRED", +} + +var HealOpStatus_value = map[string]int32{ + "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, +} + +func (x HealOpStatus) String() string { + return proto.EnumName(HealOpStatus_name, int32(x)) +} + +func (HealOpStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{4} +} + // HostReport is the Supernode's self-reported host metrics and counters for an epoch. type HostReport struct { CpuUsagePercent float64 `protobuf:"fixed64,1,opt,name=cpu_usage_percent,json=cpuUsagePercent,proto3" json:"cpu_usage_percent,omitempty"` @@ -185,27 +330,35 @@ func (m *StorageChallengeObservation) GetPortStates() []PortState { return nil } -// EpochReport is a single per-epoch report submitted by a Supernode. -type EpochReport struct { - SupernodeAccount string `protobuf:"bytes,1,opt,name=supernode_account,json=supernodeAccount,proto3" json:"supernode_account,omitempty"` - EpochId uint64 `protobuf:"varint,2,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` - ReportHeight int64 `protobuf:"varint,3,opt,name=report_height,json=reportHeight,proto3" json:"report_height,omitempty"` - HostReport HostReport `protobuf:"bytes,4,opt,name=host_report,json=hostReport,proto3" json:"host_report"` - StorageChallengeObservations []*StorageChallengeObservation `protobuf:"bytes,5,rep,name=storage_challenge_observations,json=storageChallengeObservations,proto3" json:"storage_challenge_observations,omitempty"` +// StorageProofResult captures one storage-truth storage-proof check outcome. +type StorageProofResult struct { + TargetSupernodeAccount string `protobuf:"bytes,1,opt,name=target_supernode_account,json=targetSupernodeAccount,proto3" json:"target_supernode_account,omitempty"` + ChallengerSupernodeAccount string `protobuf:"bytes,2,opt,name=challenger_supernode_account,json=challengerSupernodeAccount,proto3" json:"challenger_supernode_account,omitempty"` + // ticket_id identifies the ticket selected by deterministic bucket logic. + TicketId string `protobuf:"bytes,3,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + BucketType StorageProofBucketType `protobuf:"varint,4,opt,name=bucket_type,json=bucketType,proto3,enum=lumera.audit.v1.StorageProofBucketType" json:"bucket_type,omitempty"` + ArtifactClass StorageProofArtifactClass `protobuf:"varint,5,opt,name=artifact_class,json=artifactClass,proto3,enum=lumera.audit.v1.StorageProofArtifactClass" json:"artifact_class,omitempty"` + // artifact_ordinal is the deterministic ordinal selected inside the artifact class. + ArtifactOrdinal uint32 `protobuf:"varint,6,opt,name=artifact_ordinal,json=artifactOrdinal,proto3" json:"artifact_ordinal,omitempty"` + ArtifactKey string `protobuf:"bytes,7,opt,name=artifact_key,json=artifactKey,proto3" json:"artifact_key,omitempty"` + ResultClass StorageProofResultClass `protobuf:"varint,8,opt,name=result_class,json=resultClass,proto3,enum=lumera.audit.v1.StorageProofResultClass" json:"result_class,omitempty"` + TranscriptHash string `protobuf:"bytes,9,opt,name=transcript_hash,json=transcriptHash,proto3" json:"transcript_hash,omitempty"` + // details is an optional short diagnostic summary for non-pass outcomes. + Details string `protobuf:"bytes,10,opt,name=details,proto3" json:"details,omitempty"` } -func (m *EpochReport) Reset() { *m = EpochReport{} } -func (m *EpochReport) String() string { return proto.CompactTextString(m) } -func (*EpochReport) ProtoMessage() {} -func (*EpochReport) Descriptor() ([]byte, []int) { +func (m *StorageProofResult) Reset() { *m = StorageProofResult{} } +func (m *StorageProofResult) String() string { return proto.CompactTextString(m) } +func (*StorageProofResult) ProtoMessage() {} +func (*StorageProofResult) Descriptor() ([]byte, []int) { return fileDescriptor_0613fff850c07858, []int{2} } -func (m *EpochReport) XXX_Unmarshal(b []byte) error { +func (m *StorageProofResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EpochReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *StorageProofResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EpochReport.Marshal(b, m, deterministic) + return xxx_messageInfo_StorageProofResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -215,371 +368,2442 @@ func (m *EpochReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *EpochReport) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochReport.Merge(m, src) +func (m *StorageProofResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_StorageProofResult.Merge(m, src) } -func (m *EpochReport) XXX_Size() int { +func (m *StorageProofResult) XXX_Size() int { return m.Size() } -func (m *EpochReport) XXX_DiscardUnknown() { - xxx_messageInfo_EpochReport.DiscardUnknown(m) +func (m *StorageProofResult) XXX_DiscardUnknown() { + xxx_messageInfo_StorageProofResult.DiscardUnknown(m) } -var xxx_messageInfo_EpochReport proto.InternalMessageInfo +var xxx_messageInfo_StorageProofResult proto.InternalMessageInfo -func (m *EpochReport) GetSupernodeAccount() string { +func (m *StorageProofResult) GetTargetSupernodeAccount() string { if m != nil { - return m.SupernodeAccount + return m.TargetSupernodeAccount } return "" } -func (m *EpochReport) GetEpochId() uint64 { +func (m *StorageProofResult) GetChallengerSupernodeAccount() string { if m != nil { - return m.EpochId + return m.ChallengerSupernodeAccount } - return 0 + return "" } -func (m *EpochReport) GetReportHeight() int64 { +func (m *StorageProofResult) GetTicketId() string { if m != nil { - return m.ReportHeight + return m.TicketId } - return 0 + return "" } -func (m *EpochReport) GetHostReport() HostReport { +func (m *StorageProofResult) GetBucketType() StorageProofBucketType { if m != nil { - return m.HostReport + return m.BucketType } - return HostReport{} + return StorageProofBucketType_STORAGE_PROOF_BUCKET_TYPE_UNSPECIFIED } -func (m *EpochReport) GetStorageChallengeObservations() []*StorageChallengeObservation { +func (m *StorageProofResult) GetArtifactClass() StorageProofArtifactClass { if m != nil { - return m.StorageChallengeObservations + return m.ArtifactClass } - return nil + return StorageProofArtifactClass_STORAGE_PROOF_ARTIFACT_CLASS_UNSPECIFIED } -func init() { - proto.RegisterEnum("lumera.audit.v1.PortState", PortState_name, PortState_value) - proto.RegisterType((*HostReport)(nil), "lumera.audit.v1.HostReport") - proto.RegisterType((*StorageChallengeObservation)(nil), "lumera.audit.v1.StorageChallengeObservation") - proto.RegisterType((*EpochReport)(nil), "lumera.audit.v1.EpochReport") +func (m *StorageProofResult) GetArtifactOrdinal() uint32 { + if m != nil { + return m.ArtifactOrdinal + } + return 0 } -func init() { proto.RegisterFile("lumera/audit/v1/audit.proto", fileDescriptor_0613fff850c07858) } - -var fileDescriptor_0613fff850c07858 = []byte{ - // 569 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xdd, 0x8e, 0xd2, 0x40, - 0x14, 0xa6, 0xc0, 0xaa, 0x3b, 0xb8, 0x52, 0x66, 0xd7, 0xb5, 0x0b, 0xa6, 0x12, 0xbc, 0x21, 0x64, - 0x05, 0x17, 0x2f, 0xbd, 0x02, 0x24, 0xc1, 0x9f, 0x50, 0xd2, 0x42, 0x4c, 0xbc, 0x99, 0x0c, 0xed, - 0xd8, 0x36, 0xd2, 0x4e, 0x33, 0x33, 0x25, 0xfa, 0x16, 0xfb, 0x2a, 0x26, 0x3e, 0xc4, 0xde, 0xb9, - 0xf1, 0xca, 0x2b, 0x63, 0xe0, 0x45, 0x4c, 0x3b, 0x2c, 0xb0, 0x6c, 0xd4, 0x64, 0x6f, 0x9a, 0x39, - 0xdf, 0xf7, 0x9d, 0xd3, 0x73, 0xce, 0x37, 0x03, 0x2a, 0xb3, 0x38, 0x20, 0x0c, 0xb7, 0x70, 0xec, - 0xf8, 0xa2, 0x35, 0x3f, 0x93, 0x87, 0x66, 0xc4, 0xa8, 0xa0, 0xb0, 0x28, 0xc9, 0xa6, 0xc4, 0xe6, - 0x67, 0xe5, 0x12, 0x0e, 0xfc, 0x90, 0xb6, 0xd2, 0xaf, 0xd4, 0x94, 0x4f, 0x6c, 0xca, 0x03, 0xca, - 0x51, 0x1a, 0xb5, 0x64, 0xb0, 0xa2, 0x8e, 0x5c, 0xea, 0x52, 0x89, 0x27, 0x27, 0x89, 0xd6, 0xce, - 0xb3, 0x00, 0x0c, 0x28, 0x17, 0x26, 0x89, 0x28, 0x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xb6, 0xdb, 0xb8, 0x58, 0xe8, 0xca, 0xe5, 0x42, 0x57, 0x7e, 0x2f, - 0x74, 0xe5, 0x7c, 0xa9, 0x67, 0x2e, 0x97, 0x7a, 0xe6, 0xe7, 0x52, 0xcf, 0x7c, 0x50, 0x3f, 0x6f, - 0x1e, 0xbc, 0xf8, 0x12, 0x11, 0x3e, 0xbd, 0x93, 0x3e, 0xce, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff, - 0xff, 0x2e, 0xff, 0x1c, 0xe8, 0x10, 0x04, 0x00, 0x00, +func (m *StorageProofResult) GetArtifactKey() string { + if m != nil { + return m.ArtifactKey + } + return "" } -func (m *HostReport) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *StorageProofResult) GetResultClass() StorageProofResultClass { + if m != nil { + return m.ResultClass } - return dAtA[:n], nil + return StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_UNSPECIFIED } -func (m *HostReport) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *StorageProofResult) GetTranscriptHash() string { + if m != nil { + return m.TranscriptHash + } + return "" } -func (m *HostReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FailedActionsCount != 0 { - i = encodeVarintAudit(dAtA, i, uint64(m.FailedActionsCount)) - i-- - dAtA[i] = 0x28 +func (m *StorageProofResult) GetDetails() string { + if m != nil { + return m.Details } - if len(m.InboundPortStates) > 0 { - dAtA2 := make([]byte, len(m.InboundPortStates)*10) - var j1 int - for _, num := range m.InboundPortStates { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ + return "" +} + +// NodeSuspicionState is the persisted storage-truth node-level suspicion snapshot. +type NodeSuspicionState struct { + SupernodeAccount string `protobuf:"bytes,1,opt,name=supernode_account,json=supernodeAccount,proto3" json:"supernode_account,omitempty"` + SuspicionScore int64 `protobuf:"varint,2,opt,name=suspicion_score,json=suspicionScore,proto3" json:"suspicion_score,omitempty"` + LastUpdatedEpoch uint64 `protobuf:"varint,3,opt,name=last_updated_epoch,json=lastUpdatedEpoch,proto3" json:"last_updated_epoch,omitempty"` +} + +func (m *NodeSuspicionState) Reset() { *m = NodeSuspicionState{} } +func (m *NodeSuspicionState) String() string { return proto.CompactTextString(m) } +func (*NodeSuspicionState) ProtoMessage() {} +func (*NodeSuspicionState) Descriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{3} +} +func (m *NodeSuspicionState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeSuspicionState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeSuspicionState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintAudit(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x22 - } - if m.DiskUsagePercent != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DiskUsagePercent)))) - i-- - dAtA[i] = 0x19 + return b[:n], nil } - if m.MemUsagePercent != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MemUsagePercent)))) - i-- - dAtA[i] = 0x11 +} +func (m *NodeSuspicionState) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeSuspicionState.Merge(m, src) +} +func (m *NodeSuspicionState) XXX_Size() int { + return m.Size() +} +func (m *NodeSuspicionState) XXX_DiscardUnknown() { + xxx_messageInfo_NodeSuspicionState.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeSuspicionState proto.InternalMessageInfo + +func (m *NodeSuspicionState) GetSupernodeAccount() string { + if m != nil { + return m.SupernodeAccount } - if m.CpuUsagePercent != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CpuUsagePercent)))) - i-- - dAtA[i] = 0x9 + return "" +} + +func (m *NodeSuspicionState) GetSuspicionScore() int64 { + if m != nil { + return m.SuspicionScore } - return len(dAtA) - i, nil + return 0 } -func (m *StorageChallengeObservation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *NodeSuspicionState) GetLastUpdatedEpoch() uint64 { + if m != nil { + return m.LastUpdatedEpoch } - return dAtA[:n], nil + return 0 } -func (m *StorageChallengeObservation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// ReporterReliabilityState is the persisted storage-truth reporter reliability snapshot. +type ReporterReliabilityState struct { + ReporterSupernodeAccount string `protobuf:"bytes,1,opt,name=reporter_supernode_account,json=reporterSupernodeAccount,proto3" json:"reporter_supernode_account,omitempty"` + ReliabilityScore int64 `protobuf:"varint,2,opt,name=reliability_score,json=reliabilityScore,proto3" json:"reliability_score,omitempty"` + LastUpdatedEpoch uint64 `protobuf:"varint,3,opt,name=last_updated_epoch,json=lastUpdatedEpoch,proto3" json:"last_updated_epoch,omitempty"` } -func (m *StorageChallengeObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PortStates) > 0 { - dAtA4 := make([]byte, len(m.PortStates)*10) - var j3 int - for _, num := range m.PortStates { - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ +func (m *ReporterReliabilityState) Reset() { *m = ReporterReliabilityState{} } +func (m *ReporterReliabilityState) String() string { return proto.CompactTextString(m) } +func (*ReporterReliabilityState) ProtoMessage() {} +func (*ReporterReliabilityState) Descriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{4} +} +func (m *ReporterReliabilityState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReporterReliabilityState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReporterReliabilityState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintAudit(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x12 + return b[:n], nil } - if len(m.TargetSupernodeAccount) > 0 { - i -= len(m.TargetSupernodeAccount) - copy(dAtA[i:], m.TargetSupernodeAccount) - i = encodeVarintAudit(dAtA, i, uint64(len(m.TargetSupernodeAccount))) - i-- - dAtA[i] = 0xa +} +func (m *ReporterReliabilityState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReporterReliabilityState.Merge(m, src) +} +func (m *ReporterReliabilityState) XXX_Size() int { + return m.Size() +} +func (m *ReporterReliabilityState) XXX_DiscardUnknown() { + xxx_messageInfo_ReporterReliabilityState.DiscardUnknown(m) +} + +var xxx_messageInfo_ReporterReliabilityState proto.InternalMessageInfo + +func (m *ReporterReliabilityState) GetReporterSupernodeAccount() string { + if m != nil { + return m.ReporterSupernodeAccount } - return len(dAtA) - i, nil + return "" } -func (m *EpochReport) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *ReporterReliabilityState) GetReliabilityScore() int64 { + if m != nil { + return m.ReliabilityScore } - return dAtA[:n], nil + return 0 } -func (m *EpochReport) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *ReporterReliabilityState) GetLastUpdatedEpoch() uint64 { + if m != nil { + return m.LastUpdatedEpoch + } + return 0 } -func (m *EpochReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.StorageChallengeObservations) > 0 { - for iNdEx := len(m.StorageChallengeObservations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StorageChallengeObservations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAudit(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a +// TicketDeteriorationState is the persisted storage-truth ticket deterioration snapshot. +type TicketDeteriorationState struct { + TicketId string `protobuf:"bytes,1,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + DeteriorationScore int64 `protobuf:"varint,2,opt,name=deterioration_score,json=deteriorationScore,proto3" json:"deterioration_score,omitempty"` + LastUpdatedEpoch uint64 `protobuf:"varint,3,opt,name=last_updated_epoch,json=lastUpdatedEpoch,proto3" json:"last_updated_epoch,omitempty"` + ActiveHealOpId uint64 `protobuf:"varint,4,opt,name=active_heal_op_id,json=activeHealOpId,proto3" json:"active_heal_op_id,omitempty"` + ProbationUntilEpoch uint64 `protobuf:"varint,5,opt,name=probation_until_epoch,json=probationUntilEpoch,proto3" json:"probation_until_epoch,omitempty"` + LastHealEpoch uint64 `protobuf:"varint,6,opt,name=last_heal_epoch,json=lastHealEpoch,proto3" json:"last_heal_epoch,omitempty"` +} + +func (m *TicketDeteriorationState) Reset() { *m = TicketDeteriorationState{} } +func (m *TicketDeteriorationState) String() string { return proto.CompactTextString(m) } +func (*TicketDeteriorationState) ProtoMessage() {} +func (*TicketDeteriorationState) Descriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{5} +} +func (m *TicketDeteriorationState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TicketDeteriorationState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TicketDeteriorationState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } + return b[:n], nil } - { - size, err := m.HostReport.MarshalToSizedBuffer(dAtA[:i]) +} +func (m *TicketDeteriorationState) XXX_Merge(src proto.Message) { + xxx_messageInfo_TicketDeteriorationState.Merge(m, src) +} +func (m *TicketDeteriorationState) XXX_Size() int { + return m.Size() +} +func (m *TicketDeteriorationState) XXX_DiscardUnknown() { + xxx_messageInfo_TicketDeteriorationState.DiscardUnknown(m) +} + +var xxx_messageInfo_TicketDeteriorationState proto.InternalMessageInfo + +func (m *TicketDeteriorationState) GetTicketId() string { + if m != nil { + return m.TicketId + } + return "" +} + +func (m *TicketDeteriorationState) GetDeteriorationScore() int64 { + if m != nil { + return m.DeteriorationScore + } + return 0 +} + +func (m *TicketDeteriorationState) GetLastUpdatedEpoch() uint64 { + if m != nil { + return m.LastUpdatedEpoch + } + return 0 +} + +func (m *TicketDeteriorationState) GetActiveHealOpId() uint64 { + if m != nil { + return m.ActiveHealOpId + } + return 0 +} + +func (m *TicketDeteriorationState) GetProbationUntilEpoch() uint64 { + if m != nil { + return m.ProbationUntilEpoch + } + return 0 +} + +func (m *TicketDeteriorationState) GetLastHealEpoch() uint64 { + if m != nil { + return m.LastHealEpoch + } + return 0 +} + +// HealOp is the chain-tracked storage-truth healing operation state. +type HealOp struct { + HealOpId uint64 `protobuf:"varint,1,opt,name=heal_op_id,json=healOpId,proto3" json:"heal_op_id,omitempty"` + TicketId string `protobuf:"bytes,2,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + ScheduledEpochId uint64 `protobuf:"varint,3,opt,name=scheduled_epoch_id,json=scheduledEpochId,proto3" json:"scheduled_epoch_id,omitempty"` + HealerSupernodeAccount string `protobuf:"bytes,4,opt,name=healer_supernode_account,json=healerSupernodeAccount,proto3" json:"healer_supernode_account,omitempty"` + VerifierSupernodeAccounts []string `protobuf:"bytes,5,rep,name=verifier_supernode_accounts,json=verifierSupernodeAccounts,proto3" json:"verifier_supernode_accounts,omitempty"` + Status HealOpStatus `protobuf:"varint,6,opt,name=status,proto3,enum=lumera.audit.v1.HealOpStatus" json:"status,omitempty"` + CreatedHeight uint64 `protobuf:"varint,7,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` + UpdatedHeight uint64 `protobuf:"varint,8,opt,name=updated_height,json=updatedHeight,proto3" json:"updated_height,omitempty"` + DeadlineEpochId uint64 `protobuf:"varint,9,opt,name=deadline_epoch_id,json=deadlineEpochId,proto3" json:"deadline_epoch_id,omitempty"` + ResultHash string `protobuf:"bytes,10,opt,name=result_hash,json=resultHash,proto3" json:"result_hash,omitempty"` + Notes string `protobuf:"bytes,11,opt,name=notes,proto3" json:"notes,omitempty"` +} + +func (m *HealOp) Reset() { *m = HealOp{} } +func (m *HealOp) String() string { return proto.CompactTextString(m) } +func (*HealOp) ProtoMessage() {} +func (*HealOp) Descriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{6} +} +func (m *HealOp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HealOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HealOp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintAudit(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0x22 - if m.ReportHeight != 0 { - i = encodeVarintAudit(dAtA, i, uint64(m.ReportHeight)) - i-- - dAtA[i] = 0x18 +} +func (m *HealOp) XXX_Merge(src proto.Message) { + xxx_messageInfo_HealOp.Merge(m, src) +} +func (m *HealOp) XXX_Size() int { + return m.Size() +} +func (m *HealOp) XXX_DiscardUnknown() { + xxx_messageInfo_HealOp.DiscardUnknown(m) +} + +var xxx_messageInfo_HealOp proto.InternalMessageInfo + +func (m *HealOp) GetHealOpId() uint64 { + if m != nil { + return m.HealOpId } - if m.EpochId != 0 { - i = encodeVarintAudit(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 + return 0 +} + +func (m *HealOp) GetTicketId() string { + if m != nil { + return m.TicketId } - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintAudit(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0xa + return "" +} + +func (m *HealOp) GetScheduledEpochId() uint64 { + if m != nil { + return m.ScheduledEpochId } - return len(dAtA) - i, nil + return 0 } -func encodeVarintAudit(dAtA []byte, offset int, v uint64) int { - offset -= sovAudit(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *HealOp) GetHealerSupernodeAccount() string { + if m != nil { + return m.HealerSupernodeAccount } - dAtA[offset] = uint8(v) - return base + return "" } -func (m *HostReport) Size() (n int) { - if m == nil { - return 0 + +func (m *HealOp) GetVerifierSupernodeAccounts() []string { + if m != nil { + return m.VerifierSupernodeAccounts } - var l int - _ = l - if m.CpuUsagePercent != 0 { - n += 9 + return nil +} + +func (m *HealOp) GetStatus() HealOpStatus { + if m != nil { + return m.Status } - if m.MemUsagePercent != 0 { - n += 9 + return HealOpStatus_HEAL_OP_STATUS_UNSPECIFIED +} + +func (m *HealOp) GetCreatedHeight() uint64 { + if m != nil { + return m.CreatedHeight } - if m.DiskUsagePercent != 0 { - n += 9 + return 0 +} + +func (m *HealOp) GetUpdatedHeight() uint64 { + if m != nil { + return m.UpdatedHeight } - if len(m.InboundPortStates) > 0 { - l = 0 - for _, e := range m.InboundPortStates { - l += sovAudit(uint64(e)) + return 0 +} + +func (m *HealOp) GetDeadlineEpochId() uint64 { + if m != nil { + return m.DeadlineEpochId + } + return 0 +} + +func (m *HealOp) GetResultHash() string { + if m != nil { + return m.ResultHash + } + return "" +} + +func (m *HealOp) GetNotes() string { + if m != nil { + return m.Notes + } + return "" +} + +// EpochReport is a single per-epoch report submitted by a Supernode. +type EpochReport struct { + SupernodeAccount string `protobuf:"bytes,1,opt,name=supernode_account,json=supernodeAccount,proto3" json:"supernode_account,omitempty"` + EpochId uint64 `protobuf:"varint,2,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` + ReportHeight int64 `protobuf:"varint,3,opt,name=report_height,json=reportHeight,proto3" json:"report_height,omitempty"` + HostReport HostReport `protobuf:"bytes,4,opt,name=host_report,json=hostReport,proto3" json:"host_report"` + StorageChallengeObservations []*StorageChallengeObservation `protobuf:"bytes,5,rep,name=storage_challenge_observations,json=storageChallengeObservations,proto3" json:"storage_challenge_observations,omitempty"` + StorageProofResults []*StorageProofResult `protobuf:"bytes,6,rep,name=storage_proof_results,json=storageProofResults,proto3" json:"storage_proof_results,omitempty"` +} + +func (m *EpochReport) Reset() { *m = EpochReport{} } +func (m *EpochReport) String() string { return proto.CompactTextString(m) } +func (*EpochReport) ProtoMessage() {} +func (*EpochReport) Descriptor() ([]byte, []int) { + return fileDescriptor_0613fff850c07858, []int{7} +} +func (m *EpochReport) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EpochReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EpochReport.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err } - n += 1 + sovAudit(uint64(l)) + l + return b[:n], nil } - if m.FailedActionsCount != 0 { - n += 1 + sovAudit(uint64(m.FailedActionsCount)) +} +func (m *EpochReport) XXX_Merge(src proto.Message) { + xxx_messageInfo_EpochReport.Merge(m, src) +} +func (m *EpochReport) XXX_Size() int { + return m.Size() +} +func (m *EpochReport) XXX_DiscardUnknown() { + xxx_messageInfo_EpochReport.DiscardUnknown(m) +} + +var xxx_messageInfo_EpochReport proto.InternalMessageInfo + +func (m *EpochReport) GetSupernodeAccount() string { + if m != nil { + return m.SupernodeAccount } - return n + return "" } -func (m *StorageChallengeObservation) Size() (n int) { - if m == nil { - return 0 +func (m *EpochReport) GetEpochId() uint64 { + if m != nil { + return m.EpochId } - var l int - _ = l - l = len(m.TargetSupernodeAccount) - if l > 0 { - n += 1 + l + sovAudit(uint64(l)) + return 0 +} + +func (m *EpochReport) GetReportHeight() int64 { + if m != nil { + return m.ReportHeight } - if len(m.PortStates) > 0 { - l = 0 - for _, e := range m.PortStates { - l += sovAudit(uint64(e)) + return 0 +} + +func (m *EpochReport) GetHostReport() HostReport { + if m != nil { + return m.HostReport + } + return HostReport{} +} + +func (m *EpochReport) GetStorageChallengeObservations() []*StorageChallengeObservation { + if m != nil { + return m.StorageChallengeObservations + } + return nil +} + +func (m *EpochReport) GetStorageProofResults() []*StorageProofResult { + if m != nil { + return m.StorageProofResults + } + return nil +} + +func init() { + proto.RegisterEnum("lumera.audit.v1.PortState", PortState_name, PortState_value) + proto.RegisterEnum("lumera.audit.v1.StorageProofBucketType", StorageProofBucketType_name, StorageProofBucketType_value) + proto.RegisterEnum("lumera.audit.v1.StorageProofArtifactClass", StorageProofArtifactClass_name, StorageProofArtifactClass_value) + proto.RegisterEnum("lumera.audit.v1.StorageProofResultClass", StorageProofResultClass_name, StorageProofResultClass_value) + proto.RegisterEnum("lumera.audit.v1.HealOpStatus", HealOpStatus_name, HealOpStatus_value) + proto.RegisterType((*HostReport)(nil), "lumera.audit.v1.HostReport") + proto.RegisterType((*StorageChallengeObservation)(nil), "lumera.audit.v1.StorageChallengeObservation") + proto.RegisterType((*StorageProofResult)(nil), "lumera.audit.v1.StorageProofResult") + proto.RegisterType((*NodeSuspicionState)(nil), "lumera.audit.v1.NodeSuspicionState") + proto.RegisterType((*ReporterReliabilityState)(nil), "lumera.audit.v1.ReporterReliabilityState") + proto.RegisterType((*TicketDeteriorationState)(nil), "lumera.audit.v1.TicketDeteriorationState") + proto.RegisterType((*HealOp)(nil), "lumera.audit.v1.HealOp") + proto.RegisterType((*EpochReport)(nil), "lumera.audit.v1.EpochReport") +} + +func init() { proto.RegisterFile("lumera/audit/v1/audit.proto", fileDescriptor_0613fff850c07858) } + +var fileDescriptor_0613fff850c07858 = []byte{ + // 1583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0xdb, 0xc8, + 0x15, 0x37, 0x25, 0xd9, 0xb1, 0x9f, 0x62, 0x99, 0x1e, 0xe7, 0x8f, 0x6c, 0x67, 0x15, 0xc7, 0x69, + 0x12, 0x47, 0xcd, 0xc6, 0x8d, 0x17, 0x7b, 0xea, 0x89, 0x92, 0xe8, 0x88, 0xb5, 0x2c, 0x6a, 0x87, + 0x54, 0x76, 0xd3, 0xa2, 0x18, 0xd0, 0xe4, 0x44, 0x22, 0x42, 0x8b, 0x04, 0x87, 0x32, 0xea, 0x0f, + 0x51, 0x60, 0xcf, 0x05, 0x7a, 0xe8, 0xad, 0xd7, 0x02, 0xed, 0x77, 0xd8, 0x63, 0xd0, 0x53, 0x0f, + 0x45, 0x51, 0x24, 0xfd, 0x20, 0xc5, 0xcc, 0x90, 0xfa, 0x6b, 0xcb, 0x41, 0xd0, 0x5e, 0x04, 0xcd, + 0xef, 0xf7, 0x7b, 0x6f, 0xde, 0x9b, 0x79, 0xf3, 0x66, 0x08, 0xbb, 0xc1, 0xf0, 0x9c, 0xc6, 0xce, + 0xa1, 0x33, 0xf4, 0xfc, 0xe4, 0xf0, 0xe2, 0x95, 0xfc, 0xf3, 0x32, 0x8a, 0xc3, 0x24, 0x44, 0x1b, + 0x92, 0x7c, 0x29, 0xb1, 0x8b, 0x57, 0x3b, 0x9b, 0xce, 0xb9, 0x3f, 0x08, 0x0f, 0xc5, 0xaf, 0xd4, + 0xec, 0x6c, 0xbb, 0x21, 0x3b, 0x0f, 0x19, 0x11, 0xa3, 0x43, 0x39, 0x48, 0xa9, 0x3b, 0xbd, 0xb0, + 0x17, 0x4a, 0x9c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 0x76, 0x79, + 0x54, 0x81, 0x9d, 0xa6, 0xae, 0xb5, 0x88, 0xd9, 0x11, 0x47, 0xa9, 0x3b, 0xbb, 0x19, 0x0f, 0xa0, + 0x3c, 0xc3, 0x5b, 0xf5, 0xa6, 0xde, 0xe8, 0xb6, 0xf4, 0x86, 0xaa, 0x5c, 0x61, 0x6d, 0xb4, 0x79, + 0x3c, 0xaf, 0xb1, 0x6e, 0x59, 0x6a, 0x0e, 0xed, 0x43, 0x65, 0x86, 0xe7, 0x43, 0x1d, 0x13, 0xac, + 0xf3, 0xd3, 0xab, 0x37, 0xd4, 0x3c, 0xda, 0x85, 0xfb, 0x33, 0x9a, 0x37, 0x3a, 0x96, 0xd3, 0x17, + 0xd0, 0x36, 0xdc, 0x9d, 0x21, 0x79, 0x22, 0x7a, 0x43, 0x5d, 0x46, 0x3b, 0x70, 0x6f, 0x86, 0xd2, + 0x7f, 0xe8, 0x18, 0x58, 0x6f, 0xa8, 0x2b, 0xb5, 0xea, 0x4f, 0x1f, 0x2b, 0xca, 0x87, 0x8f, 0x15, + 0xe5, 0xdf, 0x1f, 0x2b, 0xca, 0x8f, 0x9f, 0x2a, 0x4b, 0x1f, 0x3e, 0x55, 0x96, 0xfe, 0xf1, 0xa9, + 0xb2, 0xf4, 0x6b, 0xf5, 0x77, 0xe3, 0x0f, 0x6e, 0xfe, 0x51, 0xc1, 0xce, 0x56, 0xc4, 0xc7, 0xf1, + 0x37, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x04, 0xc2, 0x7f, 0x30, 0x90, 0x0f, 0x00, 0x00, +} + +func (m *HostReport) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostReport) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FailedActionsCount != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.FailedActionsCount)) + i-- + dAtA[i] = 0x28 + } + if len(m.InboundPortStates) > 0 { + dAtA2 := make([]byte, len(m.InboundPortStates)*10) + var j1 int + for _, num := range m.InboundPortStates { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintAudit(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x22 + } + if m.DiskUsagePercent != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DiskUsagePercent)))) + i-- + dAtA[i] = 0x19 + } + if m.MemUsagePercent != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MemUsagePercent)))) + i-- + dAtA[i] = 0x11 + } + if m.CpuUsagePercent != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.CpuUsagePercent)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *StorageChallengeObservation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageChallengeObservation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageChallengeObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PortStates) > 0 { + dAtA4 := make([]byte, len(m.PortStates)*10) + var j3 int + for _, num := range m.PortStates { + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintAudit(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x12 + } + if len(m.TargetSupernodeAccount) > 0 { + i -= len(m.TargetSupernodeAccount) + copy(dAtA[i:], m.TargetSupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TargetSupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StorageProofResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StorageProofResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageProofResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x52 + } + if len(m.TranscriptHash) > 0 { + i -= len(m.TranscriptHash) + copy(dAtA[i:], m.TranscriptHash) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TranscriptHash))) + i-- + dAtA[i] = 0x4a + } + if m.ResultClass != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ResultClass)) + i-- + dAtA[i] = 0x40 + } + if len(m.ArtifactKey) > 0 { + i -= len(m.ArtifactKey) + copy(dAtA[i:], m.ArtifactKey) + i = encodeVarintAudit(dAtA, i, uint64(len(m.ArtifactKey))) + i-- + dAtA[i] = 0x3a + } + if m.ArtifactOrdinal != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ArtifactOrdinal)) + i-- + dAtA[i] = 0x30 + } + if m.ArtifactClass != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ArtifactClass)) + i-- + dAtA[i] = 0x28 + } + if m.BucketType != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.BucketType)) + i-- + dAtA[i] = 0x20 + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChallengerSupernodeAccount) > 0 { + i -= len(m.ChallengerSupernodeAccount) + copy(dAtA[i:], m.ChallengerSupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.ChallengerSupernodeAccount))) + i-- + dAtA[i] = 0x12 + } + if len(m.TargetSupernodeAccount) > 0 { + i -= len(m.TargetSupernodeAccount) + copy(dAtA[i:], m.TargetSupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TargetSupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NodeSuspicionState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeSuspicionState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeSuspicionState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastUpdatedEpoch != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.LastUpdatedEpoch)) + i-- + dAtA[i] = 0x18 + } + if m.SuspicionScore != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.SuspicionScore)) + i-- + dAtA[i] = 0x10 + } + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReporterReliabilityState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReporterReliabilityState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReporterReliabilityState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastUpdatedEpoch != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.LastUpdatedEpoch)) + i-- + dAtA[i] = 0x18 + } + if m.ReliabilityScore != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ReliabilityScore)) + i-- + dAtA[i] = 0x10 + } + if len(m.ReporterSupernodeAccount) > 0 { + i -= len(m.ReporterSupernodeAccount) + copy(dAtA[i:], m.ReporterSupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.ReporterSupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TicketDeteriorationState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TicketDeteriorationState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TicketDeteriorationState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastHealEpoch != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.LastHealEpoch)) + i-- + dAtA[i] = 0x30 + } + if m.ProbationUntilEpoch != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ProbationUntilEpoch)) + i-- + dAtA[i] = 0x28 + } + if m.ActiveHealOpId != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ActiveHealOpId)) + i-- + dAtA[i] = 0x20 + } + if m.LastUpdatedEpoch != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.LastUpdatedEpoch)) + i-- + dAtA[i] = 0x18 + } + if m.DeteriorationScore != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.DeteriorationScore)) + i-- + dAtA[i] = 0x10 + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HealOp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HealOp) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HealOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Notes) > 0 { + i -= len(m.Notes) + copy(dAtA[i:], m.Notes) + i = encodeVarintAudit(dAtA, i, uint64(len(m.Notes))) + i-- + dAtA[i] = 0x5a + } + if len(m.ResultHash) > 0 { + i -= len(m.ResultHash) + copy(dAtA[i:], m.ResultHash) + i = encodeVarintAudit(dAtA, i, uint64(len(m.ResultHash))) + i-- + dAtA[i] = 0x52 + } + if m.DeadlineEpochId != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.DeadlineEpochId)) + i-- + dAtA[i] = 0x48 + } + if m.UpdatedHeight != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.UpdatedHeight)) + i-- + dAtA[i] = 0x40 + } + if m.CreatedHeight != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.CreatedHeight)) + i-- + dAtA[i] = 0x38 + } + if m.Status != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x30 + } + if len(m.VerifierSupernodeAccounts) > 0 { + for iNdEx := len(m.VerifierSupernodeAccounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.VerifierSupernodeAccounts[iNdEx]) + copy(dAtA[i:], m.VerifierSupernodeAccounts[iNdEx]) + i = encodeVarintAudit(dAtA, i, uint64(len(m.VerifierSupernodeAccounts[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.HealerSupernodeAccount) > 0 { + i -= len(m.HealerSupernodeAccount) + copy(dAtA[i:], m.HealerSupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.HealerSupernodeAccount))) + i-- + dAtA[i] = 0x22 + } + if m.ScheduledEpochId != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ScheduledEpochId)) + i-- + dAtA[i] = 0x18 + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintAudit(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0x12 + } + if m.HealOpId != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.HealOpId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EpochReport) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EpochReport) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EpochReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.StorageProofResults) > 0 { + for iNdEx := len(m.StorageProofResults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StorageProofResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.StorageChallengeObservations) > 0 { + for iNdEx := len(m.StorageChallengeObservations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StorageChallengeObservations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + { + size, err := m.HostReport.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAudit(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.ReportHeight != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.ReportHeight)) + i-- + dAtA[i] = 0x18 + } + if m.EpochId != 0 { + i = encodeVarintAudit(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintAudit(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAudit(dAtA []byte, offset int, v uint64) int { + offset -= sovAudit(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *HostReport) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CpuUsagePercent != 0 { + n += 9 + } + if m.MemUsagePercent != 0 { + n += 9 + } + if m.DiskUsagePercent != 0 { + n += 9 + } + if len(m.InboundPortStates) > 0 { + l = 0 + for _, e := range m.InboundPortStates { + l += sovAudit(uint64(e)) + } + n += 1 + sovAudit(uint64(l)) + l + } + if m.FailedActionsCount != 0 { + n += 1 + sovAudit(uint64(m.FailedActionsCount)) + } + return n +} + +func (m *StorageChallengeObservation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TargetSupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.PortStates) > 0 { + l = 0 + for _, e := range m.PortStates { + l += sovAudit(uint64(e)) + } + n += 1 + sovAudit(uint64(l)) + l + } + return n +} + +func (m *StorageProofResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TargetSupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.ChallengerSupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.BucketType != 0 { + n += 1 + sovAudit(uint64(m.BucketType)) + } + if m.ArtifactClass != 0 { + n += 1 + sovAudit(uint64(m.ArtifactClass)) + } + if m.ArtifactOrdinal != 0 { + n += 1 + sovAudit(uint64(m.ArtifactOrdinal)) + } + l = len(m.ArtifactKey) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.ResultClass != 0 { + n += 1 + sovAudit(uint64(m.ResultClass)) + } + l = len(m.TranscriptHash) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + return n +} + +func (m *NodeSuspicionState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.SuspicionScore != 0 { + n += 1 + sovAudit(uint64(m.SuspicionScore)) + } + if m.LastUpdatedEpoch != 0 { + n += 1 + sovAudit(uint64(m.LastUpdatedEpoch)) + } + return n +} + +func (m *ReporterReliabilityState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ReporterSupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.ReliabilityScore != 0 { + n += 1 + sovAudit(uint64(m.ReliabilityScore)) + } + if m.LastUpdatedEpoch != 0 { + n += 1 + sovAudit(uint64(m.LastUpdatedEpoch)) + } + return n +} + +func (m *TicketDeteriorationState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.DeteriorationScore != 0 { + n += 1 + sovAudit(uint64(m.DeteriorationScore)) + } + if m.LastUpdatedEpoch != 0 { + n += 1 + sovAudit(uint64(m.LastUpdatedEpoch)) + } + if m.ActiveHealOpId != 0 { + n += 1 + sovAudit(uint64(m.ActiveHealOpId)) + } + if m.ProbationUntilEpoch != 0 { + n += 1 + sovAudit(uint64(m.ProbationUntilEpoch)) + } + if m.LastHealEpoch != 0 { + n += 1 + sovAudit(uint64(m.LastHealEpoch)) + } + return n +} + +func (m *HealOp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HealOpId != 0 { + n += 1 + sovAudit(uint64(m.HealOpId)) + } + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.ScheduledEpochId != 0 { + n += 1 + sovAudit(uint64(m.ScheduledEpochId)) + } + l = len(m.HealerSupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if len(m.VerifierSupernodeAccounts) > 0 { + for _, s := range m.VerifierSupernodeAccounts { + l = len(s) + n += 1 + l + sovAudit(uint64(l)) + } + } + if m.Status != 0 { + n += 1 + sovAudit(uint64(m.Status)) + } + if m.CreatedHeight != 0 { + n += 1 + sovAudit(uint64(m.CreatedHeight)) + } + if m.UpdatedHeight != 0 { + n += 1 + sovAudit(uint64(m.UpdatedHeight)) + } + if m.DeadlineEpochId != 0 { + n += 1 + sovAudit(uint64(m.DeadlineEpochId)) + } + l = len(m.ResultHash) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + l = len(m.Notes) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + return n +} + +func (m *EpochReport) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovAudit(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovAudit(uint64(m.EpochId)) + } + if m.ReportHeight != 0 { + n += 1 + sovAudit(uint64(m.ReportHeight)) + } + l = m.HostReport.Size() + n += 1 + l + sovAudit(uint64(l)) + if len(m.StorageChallengeObservations) > 0 { + for _, e := range m.StorageChallengeObservations { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + if len(m.StorageProofResults) > 0 { + for _, e := range m.StorageProofResults { + l = e.Size() + n += 1 + l + sovAudit(uint64(l)) + } + } + return n +} + +func sovAudit(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAudit(x uint64) (n int) { + return sovAudit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *HostReport) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostReport: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostReport: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CpuUsagePercent", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.CpuUsagePercent = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MemUsagePercent", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MemUsagePercent = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsagePercent", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.DiskUsagePercent = float64(math.Float64frombits(v)) + case 4: + if wireType == 0 { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InboundPortStates = append(m.InboundPortStates, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.InboundPortStates) == 0 { + m.InboundPortStates = make([]PortState, 0, elementCount) + } + for iNdEx < postIndex { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InboundPortStates = append(m.InboundPortStates, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field InboundPortStates", wireType) + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FailedActionsCount", wireType) + } + m.FailedActionsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FailedActionsCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageChallengeObservation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageChallengeObservation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageChallengeObservation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType == 0 { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PortStates = append(m.PortStates, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.PortStates) == 0 { + m.PortStates = make([]PortState, 0, elementCount) + } + for iNdEx < postIndex { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PortStates = append(m.PortStates, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PortStates", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StorageProofResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StorageProofResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StorageProofResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengerSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChallengerSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TicketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BucketType", wireType) + } + m.BucketType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BucketType |= StorageProofBucketType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ArtifactClass", wireType) + } + m.ArtifactClass = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ArtifactClass |= StorageProofArtifactClass(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ArtifactOrdinal", wireType) + } + m.ArtifactOrdinal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ArtifactOrdinal |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ArtifactKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ArtifactKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultClass", wireType) + } + m.ResultClass = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResultClass |= StorageProofResultClass(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TranscriptHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TranscriptHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeSuspicionState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeSuspicionState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeSuspicionState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SuspicionScore", wireType) + } + m.SuspicionScore = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SuspicionScore |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedEpoch", wireType) + } + m.LastUpdatedEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastUpdatedEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ReporterReliabilityState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReporterReliabilityState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReporterReliabilityState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReporterSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReporterSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReliabilityScore", wireType) + } + m.ReliabilityScore = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReliabilityScore |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedEpoch", wireType) + } + m.LastUpdatedEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastUpdatedEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TicketDeteriorationState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TicketDeteriorationState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TicketDeteriorationState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TicketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeteriorationScore", wireType) + } + m.DeteriorationScore = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeteriorationScore |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedEpoch", wireType) + } + m.LastUpdatedEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastUpdatedEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveHealOpId", wireType) + } + m.ActiveHealOpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ActiveHealOpId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProbationUntilEpoch", wireType) + } + m.ProbationUntilEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProbationUntilEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastHealEpoch", wireType) + } + m.LastHealEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastHealEpoch |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAudit(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAudit + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - n += 1 + sovAudit(uint64(l)) + l } - return n -} -func (m *EpochReport) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovAudit(uint64(l)) - } - if m.EpochId != 0 { - n += 1 + sovAudit(uint64(m.EpochId)) - } - if m.ReportHeight != 0 { - n += 1 + sovAudit(uint64(m.ReportHeight)) - } - l = m.HostReport.Size() - n += 1 + l + sovAudit(uint64(l)) - if len(m.StorageChallengeObservations) > 0 { - for _, e := range m.StorageChallengeObservations { - l = e.Size() - n += 1 + l + sovAudit(uint64(l)) - } + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovAudit(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAudit(x uint64) (n int) { - return sovAudit(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *HostReport) Unmarshal(dAtA []byte) error { +func (m *HealOp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -602,119 +2826,151 @@ func (m *HostReport) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HostReport: wiretype end group for non-group") + return fmt.Errorf("proto: HealOp: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HostReport: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HealOp: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field CpuUsagePercent", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HealOpId", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + m.HealOpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HealOpId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.CpuUsagePercent = float64(math.Float64frombits(v)) case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MemUsagePercent", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) } - var v uint64 - if (iNdEx + 8) > l { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { return io.ErrUnexpectedEOF } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.MemUsagePercent = float64(math.Float64frombits(v)) + m.TicketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsagePercent", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ScheduledEpochId", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + m.ScheduledEpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ScheduledEpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DiskUsagePercent = float64(math.Float64frombits(v)) case 4: - if wireType == 0 { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HealerSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit } - m.InboundPortStates = append(m.InboundPortStates, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return ErrInvalidLengthAudit + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthAudit + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HealerSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerifierSupernodeAccounts", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(m.InboundPortStates) == 0 { - m.InboundPortStates = make([]PortState, 0, elementCount) - } - for iNdEx < postIndex { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InboundPortStates = append(m.InboundPortStates, v) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field InboundPortStates", wireType) } - case 5: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerifierSupernodeAccounts = append(m.VerifierSupernodeAccounts, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FailedActionsCount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.FailedActionsCount = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAudit @@ -724,64 +2980,71 @@ func (m *HostReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FailedActionsCount |= uint32(b&0x7F) << shift + m.Status |= HealOpStatus(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipAudit(dAtA[iNdEx:]) - if err != nil { - return err + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CreatedHeight", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAudit + m.CreatedHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CreatedHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedHeight", wireType) } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StorageChallengeObservation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit + m.UpdatedHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpdatedHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeadlineEpochId", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.DeadlineEpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DeadlineEpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StorageChallengeObservation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StorageChallengeObservation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetSupernodeAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResultHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -809,77 +3072,40 @@ func (m *StorageChallengeObservation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TargetSupernodeAccount = string(dAtA[iNdEx:postIndex]) + m.ResultHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType == 0 { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PortStates = append(m.PortStates, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthAudit - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthAudit + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(m.PortStates) == 0 { - m.PortStates = make([]PortState, 0, elementCount) - } - for iNdEx < postIndex { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAudit - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PortStates = append(m.PortStates, v) + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field PortStates", wireType) } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Notes = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAudit(dAtA[iNdEx:]) @@ -1067,6 +3293,40 @@ func (m *EpochReport) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageProofResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAudit + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAudit + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAudit + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageProofResults = append(m.StorageProofResults, &StorageProofResult{}) + if err := m.StorageProofResults[len(m.StorageProofResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAudit(dAtA[iNdEx:]) diff --git a/x/audit/v1/types/codec.go b/x/audit/v1/types/codec.go index abdb3a7c..4f3bfc52 100644 --- a/x/audit/v1/types/codec.go +++ b/x/audit/v1/types/codec.go @@ -11,6 +11,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateParams{}, &MsgSubmitEpochReport{}, &MsgSubmitEvidence{}, + &MsgSubmitStorageRecheckEvidence{}, + &MsgClaimHealComplete{}, + &MsgSubmitHealVerification{}, ) msgservice.RegisterMsgServiceDesc(registry, &Msg_serviceDesc) diff --git a/x/audit/v1/types/errors.go b/x/audit/v1/types/errors.go index c70624e9..5d89a3e6 100644 --- a/x/audit/v1/types/errors.go +++ b/x/audit/v1/types/errors.go @@ -18,4 +18,6 @@ var ( ErrInvalidSubject = errorsmod.Register(ModuleName, 1103, "invalid subject address") ErrInvalidReporter = errorsmod.Register(ModuleName, 1104, "invalid reporter address") ErrInvalidActionID = errorsmod.Register(ModuleName, 1105, "invalid action id") + + ErrNotImplemented = errorsmod.Register(ModuleName, 1200, "not implemented") ) diff --git a/x/audit/v1/types/genesis.go b/x/audit/v1/types/genesis.go index 1bbbd298..a2293cf5 100644 --- a/x/audit/v1/types/genesis.go +++ b/x/audit/v1/types/genesis.go @@ -8,6 +8,7 @@ func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), NextEvidenceId: 1, + NextHealOpId: 1, } } diff --git a/x/audit/v1/types/genesis.pb.go b/x/audit/v1/types/genesis.pb.go index 63b3d0e9..9eac9fb3 100644 --- a/x/audit/v1/types/genesis.pb.go +++ b/x/audit/v1/types/genesis.pb.go @@ -30,7 +30,13 @@ type GenesisState struct { // evidence defines the initial evidence records (optional). Evidence []Evidence `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence"` // next_evidence_id is the next id to use for chain-assigned ids. - NextEvidenceId uint64 `protobuf:"varint,3,opt,name=next_evidence_id,json=nextEvidenceId,proto3" json:"next_evidence_id,omitempty"` + NextEvidenceId uint64 `protobuf:"varint,3,opt,name=next_evidence_id,json=nextEvidenceId,proto3" json:"next_evidence_id,omitempty"` + NodeSuspicionStates []NodeSuspicionState `protobuf:"bytes,4,rep,name=node_suspicion_states,json=nodeSuspicionStates,proto3" json:"node_suspicion_states"` + ReporterReliabilityStates []ReporterReliabilityState `protobuf:"bytes,5,rep,name=reporter_reliability_states,json=reporterReliabilityStates,proto3" json:"reporter_reliability_states"` + TicketDeteriorationStates []TicketDeteriorationState `protobuf:"bytes,6,rep,name=ticket_deterioration_states,json=ticketDeteriorationStates,proto3" json:"ticket_deterioration_states"` + HealOps []HealOp `protobuf:"bytes,7,rep,name=heal_ops,json=healOps,proto3" json:"heal_ops"` + // next_heal_op_id is the next id to use for storage-truth heal operations. + NextHealOpId uint64 `protobuf:"varint,8,opt,name=next_heal_op_id,json=nextHealOpId,proto3" json:"next_heal_op_id,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -87,6 +93,41 @@ func (m *GenesisState) GetNextEvidenceId() uint64 { return 0 } +func (m *GenesisState) GetNodeSuspicionStates() []NodeSuspicionState { + if m != nil { + return m.NodeSuspicionStates + } + return nil +} + +func (m *GenesisState) GetReporterReliabilityStates() []ReporterReliabilityState { + if m != nil { + return m.ReporterReliabilityStates + } + return nil +} + +func (m *GenesisState) GetTicketDeteriorationStates() []TicketDeteriorationState { + if m != nil { + return m.TicketDeteriorationStates + } + return nil +} + +func (m *GenesisState) GetHealOps() []HealOp { + if m != nil { + return m.HealOps + } + return nil +} + +func (m *GenesisState) GetNextHealOpId() uint64 { + if m != nil { + return m.NextHealOpId + } + return 0 +} + func init() { proto.RegisterType((*GenesisState)(nil), "lumera.audit.v1.GenesisState") } @@ -94,24 +135,35 @@ func init() { func init() { proto.RegisterFile("lumera/audit/v1/genesis.proto", fileDescriptor_a433cb4f206fdbad) } var fileDescriptor_a433cb4f206fdbad = []byte{ - // 259 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0x29, 0xcd, 0x4d, - 0x2d, 0x4a, 0xd4, 0x4f, 0x2c, 0x4d, 0xc9, 0x2c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, - 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x48, 0xeb, 0x81, 0xa5, - 0xf5, 0xca, 0x0c, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x8d, 0x94, - 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0xd0, 0x0d, 0x2e, 0x48, - 0x2c, 0x4a, 0xcc, 0x85, 0x9a, 0x2b, 0x25, 0x87, 0x2e, 0x9b, 0x5a, 0x96, 0x99, 0x92, 0x9a, 0x97, - 0x9c, 0x0a, 0x91, 0x57, 0xda, 0xc8, 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x49, 0x70, 0x49, 0x62, 0x49, - 0xaa, 0x90, 0x15, 0x17, 0x1b, 0xc4, 0x00, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x71, 0x3d, - 0x34, 0x97, 0xe9, 0x05, 0x80, 0xa5, 0x9d, 0x38, 0x4f, 0xdc, 0x93, 0x67, 0x58, 0xf1, 0x7c, 0x83, - 0x16, 0x63, 0x10, 0x54, 0x87, 0x90, 0x35, 0x17, 0x07, 0xcc, 0x78, 0x09, 0x26, 0x05, 0x66, 0x0d, - 0x6e, 0x23, 0x49, 0x0c, 0xdd, 0xae, 0x50, 0x05, 0x4e, 0x2c, 0x20, 0xfd, 0x41, 0x70, 0x0d, 0x42, - 0x1a, 0x5c, 0x02, 0x79, 0xa9, 0x15, 0x25, 0xf1, 0x30, 0x81, 0xf8, 0xcc, 0x14, 0x09, 0x66, 0x05, - 0x46, 0x0d, 0x96, 0x20, 0x3e, 0x90, 0x38, 0x4c, 0x9f, 0x67, 0x8a, 0x93, 0xd6, 0x89, 0x47, 0x72, - 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, - 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x09, 0x54, 0x20, 0x3c, 0x5a, 0x52, 0x59, 0x90, 0x5a, - 0x9c, 0xc4, 0x06, 0xf6, 0xa6, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x48, 0x1f, 0xa4, 0xca, 0x7f, - 0x01, 0x00, 0x00, + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x13, 0x37, 0x76, 0xeb, 0xec, 0xe2, 0xae, 0xa3, 0x62, 0xb6, 0xab, 0xb1, 0x28, 0x42, + 0xdc, 0x43, 0x42, 0xeb, 0x45, 0xf4, 0x56, 0x14, 0xed, 0x45, 0x25, 0xf5, 0x24, 0x48, 0x98, 0x76, + 0x1e, 0xed, 0x60, 0x9a, 0x09, 0x33, 0xd3, 0xd2, 0x7e, 0x0b, 0x3f, 0x86, 0x47, 0x3f, 0x46, 0x8f, + 0x05, 0x2f, 0x9e, 0x44, 0xda, 0x83, 0x5f, 0x43, 0x32, 0x99, 0xd8, 0x9a, 0xd0, 0x4b, 0x98, 0xbc, + 0xff, 0xfb, 0xff, 0x7f, 0x6f, 0x78, 0x83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xf3, 0x1d, 0xa7, + 0x30, 0x28, 0x9b, 0xf5, 0x35, 0x0d, 0xfd, 0x76, 0x5a, 0x53, 0x24, 0xe6, 0xe8, 0x52, 0x40, 0xc6, + 0x85, 0x02, 0x11, 0x0b, 0x48, 0x18, 0x19, 0xb2, 0x84, 0xa9, 0x65, 0x09, 0xb9, 0xae, 0x21, 0x4f, + 0x6b, 0x90, 0xc8, 0x78, 0xa2, 0x9d, 0x65, 0x1f, 0x75, 0x21, 0x0e, 0xe8, 0x1a, 0xa8, 0xd8, 0xe8, + 0x0b, 0xa8, 0x98, 0x82, 0x02, 0xc1, 0xb8, 0x20, 0x6a, 0xef, 0x56, 0x8d, 0x03, 0xc0, 0x8f, 0xda, + 0xf3, 0x6a, 0xdf, 0xf2, 0x1f, 0x50, 0x1d, 0xd0, 0x25, 0x7e, 0x8e, 0x9a, 0x13, 0x20, 0x49, 0xcc, + 0x33, 0xe9, 0x1e, 0xeb, 0xf4, 0xfa, 0x96, 0xdf, 0x02, 0x49, 0xde, 0x67, 0x26, 0xeb, 0x78, 0xa2, + 0xff, 0x24, 0x7e, 0x82, 0xce, 0xf4, 0x92, 0x8c, 0x3d, 0xdf, 0x51, 0x53, 0xef, 0xe8, 0x34, 0x2f, + 0x17, 0x9e, 0x3e, 0xed, 0x5d, 0xad, 0x36, 0x9e, 0xbd, 0xde, 0x78, 0xf6, 0xef, 0x8d, 0x67, 0x7f, + 0xdd, 0x7a, 0xd6, 0x7a, 0xeb, 0x59, 0x3f, 0xb7, 0x9e, 0xf5, 0xe9, 0x7c, 0xb1, 0x7b, 0x87, 0x6a, + 0x99, 0x81, 0x1c, 0x36, 0xf4, 0x43, 0x7c, 0xf6, 0x37, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xb8, 0x9e, + 0xfe, 0x3e, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -134,6 +186,67 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.NextHealOpId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextHealOpId)) + i-- + dAtA[i] = 0x40 + } + if len(m.HealOps) > 0 { + for iNdEx := len(m.HealOps) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HealOps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.TicketDeteriorationStates) > 0 { + for iNdEx := len(m.TicketDeteriorationStates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TicketDeteriorationStates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.ReporterReliabilityStates) > 0 { + for iNdEx := len(m.ReporterReliabilityStates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ReporterReliabilityStates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.NodeSuspicionStates) > 0 { + for iNdEx := len(m.NodeSuspicionStates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NodeSuspicionStates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if m.NextEvidenceId != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.NextEvidenceId)) i-- @@ -194,6 +307,33 @@ func (m *GenesisState) Size() (n int) { if m.NextEvidenceId != 0 { n += 1 + sovGenesis(uint64(m.NextEvidenceId)) } + if len(m.NodeSuspicionStates) > 0 { + for _, e := range m.NodeSuspicionStates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ReporterReliabilityStates) > 0 { + for _, e := range m.ReporterReliabilityStates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.TicketDeteriorationStates) > 0 { + for _, e := range m.TicketDeteriorationStates { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.HealOps) > 0 { + for _, e := range m.HealOps { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.NextHealOpId != 0 { + n += 1 + sovGenesis(uint64(m.NextHealOpId)) + } return n } @@ -318,6 +458,161 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeSuspicionStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeSuspicionStates = append(m.NodeSuspicionStates, NodeSuspicionState{}) + if err := m.NodeSuspicionStates[len(m.NodeSuspicionStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReporterReliabilityStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReporterReliabilityStates = append(m.ReporterReliabilityStates, ReporterReliabilityState{}) + if err := m.ReporterReliabilityStates[len(m.ReporterReliabilityStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TicketDeteriorationStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TicketDeteriorationStates = append(m.TicketDeteriorationStates, TicketDeteriorationState{}) + if err := m.TicketDeteriorationStates[len(m.TicketDeteriorationStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HealOps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HealOps = append(m.HealOps, HealOp{}) + if err := m.HealOps[len(m.HealOps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NextHealOpId", wireType) + } + m.NextHealOpId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextHealOpId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/audit/v1/types/keys.go b/x/audit/v1/types/keys.go index e8dd7b22..ef45bb09 100644 --- a/x/audit/v1/types/keys.go +++ b/x/audit/v1/types/keys.go @@ -40,7 +40,7 @@ var ( // epochParamsSnapshotPrefix stores a per-epoch snapshot of assignment/gating-related params. // Format: "eps/" + u64be(epoch_id) epochParamsSnapshotPrefix = []byte("eps/") - reportPrefix = []byte("r/") + reportPrefix = []byte("r/") reportIndexPrefix = []byte("ri/") @@ -71,6 +71,22 @@ var ( evidenceEpochCountPrefix = []byte("eve/") actionFinalizationPostponementPrefix = []byte("ap/af/") + + // Storage-truth state: + // - NodeSuspicionStateKey: "st/ns/" + supernode_account + // - ReporterReliabilityStateKey: "st/rr/" + reporter_supernode_account + // - TicketDeteriorationStateKey: "st/td/" + ticket_id + // - HealOpKey: "st/ho/" + u64be(heal_op_id) + // - HealOpByTicketIndexKey: "st/hot/" + ticket_id + 0x00 + u64be(heal_op_id) + // - HealOpByStatusIndexKey: "st/hos/" + u32be(status) + u64be(heal_op_id) + // - NextHealOpIDKey: "st/next_ho_id" + nodeSuspicionStatePrefix = []byte("st/ns/") + reporterReliabilityStatePrefix = []byte("st/rr/") + ticketDeteriorationStatePrefix = []byte("st/td/") + healOpPrefix = []byte("st/ho/") + healOpByTicketIndexPrefix = []byte("st/hot/") + healOpByStatusIndexPrefix = []byte("st/hos/") + nextHealOpIDKey = []byte("st/next_ho_id") ) // EpochAnchorKey returns the store key for the EpochAnchor identified by epochID. @@ -281,3 +297,83 @@ func ActionFinalizationPostponementKey(supernodeAccount string) []byte { func ActionFinalizationPostponementPrefix() []byte { return actionFinalizationPostponementPrefix } + +func NodeSuspicionStateKey(supernodeAccount string) []byte { + key := make([]byte, 0, len(nodeSuspicionStatePrefix)+len(supernodeAccount)) + key = append(key, nodeSuspicionStatePrefix...) + key = append(key, supernodeAccount...) + return key +} + +func NodeSuspicionStatePrefix() []byte { + return nodeSuspicionStatePrefix +} + +func ReporterReliabilityStateKey(reporterSupernodeAccount string) []byte { + key := make([]byte, 0, len(reporterReliabilityStatePrefix)+len(reporterSupernodeAccount)) + key = append(key, reporterReliabilityStatePrefix...) + key = append(key, reporterSupernodeAccount...) + return key +} + +func ReporterReliabilityStatePrefix() []byte { + return reporterReliabilityStatePrefix +} + +func TicketDeteriorationStateKey(ticketID string) []byte { + key := make([]byte, 0, len(ticketDeteriorationStatePrefix)+len(ticketID)) + key = append(key, ticketDeteriorationStatePrefix...) + key = append(key, ticketID...) + return key +} + +func TicketDeteriorationStatePrefix() []byte { + return ticketDeteriorationStatePrefix +} + +func HealOpKey(healOpID uint64) []byte { + key := make([]byte, 0, len(healOpPrefix)+8) + key = append(key, healOpPrefix...) + key = binary.BigEndian.AppendUint64(key, healOpID) + return key +} + +func HealOpPrefix() []byte { + return healOpPrefix +} + +func HealOpByTicketIndexKey(ticketID string, healOpID uint64) []byte { + key := make([]byte, 0, len(healOpByTicketIndexPrefix)+len(ticketID)+1+8) // "st/hot/" + ticket + 0x00 + u64be(heal_op_id) + key = append(key, healOpByTicketIndexPrefix...) + key = append(key, ticketID...) + key = append(key, 0) + key = binary.BigEndian.AppendUint64(key, healOpID) + return key +} + +func HealOpByTicketIndexPrefix(ticketID string) []byte { + key := make([]byte, 0, len(healOpByTicketIndexPrefix)+len(ticketID)+1) // "st/hot/" + ticket + 0x00 + key = append(key, healOpByTicketIndexPrefix...) + key = append(key, ticketID...) + key = append(key, 0) + return key +} + +func HealOpByStatusIndexKey(status HealOpStatus, healOpID uint64) []byte { + key := make([]byte, 0, len(healOpByStatusIndexPrefix)+4+8) // "st/hos/" + u32be(status) + u64be(heal_op_id) + key = append(key, healOpByStatusIndexPrefix...) + key = binary.BigEndian.AppendUint32(key, uint32(status)) + key = binary.BigEndian.AppendUint64(key, healOpID) + return key +} + +func HealOpByStatusIndexPrefix(status HealOpStatus) []byte { + key := make([]byte, 0, len(healOpByStatusIndexPrefix)+4) // "st/hos/" + u32be(status) + key = append(key, healOpByStatusIndexPrefix...) + key = binary.BigEndian.AppendUint32(key, uint32(status)) + return key +} + +func NextHealOpIDKey() []byte { + return nextHealOpIDKey +} diff --git a/x/audit/v1/types/params.go b/x/audit/v1/types/params.go index a6339cd8..c86cd947 100644 --- a/x/audit/v1/types/params.go +++ b/x/audit/v1/types/params.go @@ -33,6 +33,25 @@ var ( KeyScEnabled = []byte("ScEnabled") KeyScChallengersPerEpoch = []byte("ScChallengersPerEpoch") + + KeyStorageTruthRecentBucketMaxBlocks = []byte("StorageTruthRecentBucketMaxBlocks") + KeyStorageTruthOldBucketMinBlocks = []byte("StorageTruthOldBucketMinBlocks") + KeyStorageTruthChallengeTargetDivisor = []byte("StorageTruthChallengeTargetDivisor") + KeyStorageTruthCompoundRangesPerArtifact = []byte("StorageTruthCompoundRangesPerArtifact") + KeyStorageTruthCompoundRangeLenBytes = []byte("StorageTruthCompoundRangeLenBytes") + + KeyStorageTruthMaxSelfHealOpsPerEpoch = []byte("StorageTruthMaxSelfHealOpsPerEpoch") + KeyStorageTruthProbationEpochs = []byte("StorageTruthProbationEpochs") + KeyStorageTruthNodeSuspicionDecayPerEpoch = []byte("StorageTruthNodeSuspicionDecayPerEpoch") + KeyStorageTruthReporterReliabilityDecayPerEpoch = []byte("StorageTruthReporterReliabilityDecayPerEpoch") + KeyStorageTruthTicketDeteriorationDecayPerEpoch = []byte("StorageTruthTicketDeteriorationDecayPerEpoch") + KeyStorageTruthNodeSuspicionThresholdWatch = []byte("StorageTruthNodeSuspicionThresholdWatch") + KeyStorageTruthNodeSuspicionThresholdProbation = []byte("StorageTruthNodeSuspicionThresholdProbation") + KeyStorageTruthNodeSuspicionThresholdPostpone = []byte("StorageTruthNodeSuspicionThresholdPostpone") + KeyStorageTruthReporterReliabilityLowTrustThreshold = []byte("StorageTruthReporterReliabilityLowTrustThreshold") + KeyStorageTruthReporterReliabilityIneligibleThreshold = []byte("StorageTruthReporterReliabilityIneligibleThreshold") + KeyStorageTruthTicketDeteriorationHealThreshold = []byte("StorageTruthTicketDeteriorationHealThreshold") + KeyStorageTruthEnforcementMode = []byte("StorageTruthEnforcementMode") ) var ( @@ -90,6 +109,26 @@ var ( // DefaultScChallengersPerEpoch is the number of challengers selected per epoch from the anchored ACTIVE set. // A value of 0 means "auto" (implementation-defined default). DefaultScChallengersPerEpoch = uint32(0) // 0 means auto + + // DefaultStorageTruth* are LEP-6 parameters kept behavior-neutral in PR1. + DefaultStorageTruthRecentBucketMaxBlocks = uint64(7200) + DefaultStorageTruthOldBucketMinBlocks = uint64(7201) + DefaultStorageTruthChallengeTargetDivisor = uint32(3) + DefaultStorageTruthCompoundRangesPerArtifact = uint32(4) + DefaultStorageTruthCompoundRangeLenBytes = uint32(256) + + DefaultStorageTruthMaxSelfHealOpsPerEpoch = uint32(5) + DefaultStorageTruthProbationEpochs = uint32(3) + DefaultStorageTruthNodeSuspicionDecayPerEpoch = int64(1) + DefaultStorageTruthReporterReliabilityDecayPerEpoch = int64(1) + DefaultStorageTruthTicketDeteriorationDecayPerEpoch = int64(1) + DefaultStorageTruthNodeSuspicionThresholdWatch = int64(20) + DefaultStorageTruthNodeSuspicionThresholdProbation = int64(50) + DefaultStorageTruthNodeSuspicionThresholdPostpone = int64(100) + DefaultStorageTruthReporterReliabilityLowTrustThreshold = int64(-20) + DefaultStorageTruthReporterReliabilityIneligibleThreshold = int64(-50) + DefaultStorageTruthTicketDeteriorationHealThreshold = int64(100) + DefaultStorageTruthEnforcementMode = StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW ) // Params notes @@ -133,6 +172,23 @@ func NewParams( actionFinalizationRecoveryMaxTotalBadEvidences uint32, scEnabled bool, scChallengersPerEpoch uint32, + storageTruthRecentBucketMaxBlocks uint64, + storageTruthOldBucketMinBlocks uint64, + storageTruthChallengeTargetDivisor uint32, + storageTruthCompoundRangesPerArtifact uint32, + storageTruthCompoundRangeLenBytes uint32, + storageTruthMaxSelfHealOpsPerEpoch uint32, + storageTruthProbationEpochs uint32, + storageTruthNodeSuspicionDecayPerEpoch int64, + storageTruthReporterReliabilityDecayPerEpoch int64, + storageTruthTicketDeteriorationDecayPerEpoch int64, + storageTruthNodeSuspicionThresholdWatch int64, + storageTruthNodeSuspicionThresholdProbation int64, + storageTruthNodeSuspicionThresholdPostpone int64, + storageTruthReporterReliabilityLowTrustThreshold int64, + storageTruthReporterReliabilityIneligibleThreshold int64, + storageTruthTicketDeteriorationHealThreshold int64, + storageTruthEnforcementMode StorageTruthEnforcementMode, ) Params { return Params{ EpochLengthBlocks: epochLengthBlocks, @@ -157,6 +213,25 @@ func NewParams( ScEnabled: scEnabled, ScChallengersPerEpoch: scChallengersPerEpoch, + + StorageTruthRecentBucketMaxBlocks: storageTruthRecentBucketMaxBlocks, + StorageTruthOldBucketMinBlocks: storageTruthOldBucketMinBlocks, + StorageTruthChallengeTargetDivisor: storageTruthChallengeTargetDivisor, + StorageTruthCompoundRangesPerArtifact: storageTruthCompoundRangesPerArtifact, + StorageTruthCompoundRangeLenBytes: storageTruthCompoundRangeLenBytes, + + StorageTruthMaxSelfHealOpsPerEpoch: storageTruthMaxSelfHealOpsPerEpoch, + StorageTruthProbationEpochs: storageTruthProbationEpochs, + StorageTruthNodeSuspicionDecayPerEpoch: storageTruthNodeSuspicionDecayPerEpoch, + StorageTruthReporterReliabilityDecayPerEpoch: storageTruthReporterReliabilityDecayPerEpoch, + StorageTruthTicketDeteriorationDecayPerEpoch: storageTruthTicketDeteriorationDecayPerEpoch, + StorageTruthNodeSuspicionThresholdWatch: storageTruthNodeSuspicionThresholdWatch, + StorageTruthNodeSuspicionThresholdProbation: storageTruthNodeSuspicionThresholdProbation, + StorageTruthNodeSuspicionThresholdPostpone: storageTruthNodeSuspicionThresholdPostpone, + StorageTruthReporterReliabilityLowTrustThreshold: storageTruthReporterReliabilityLowTrustThreshold, + StorageTruthReporterReliabilityIneligibleThreshold: storageTruthReporterReliabilityIneligibleThreshold, + StorageTruthTicketDeteriorationHealThreshold: storageTruthTicketDeteriorationHealThreshold, + StorageTruthEnforcementMode: storageTruthEnforcementMode, } } @@ -182,6 +257,23 @@ func DefaultParams() Params { DefaultActionFinalizationRecoveryMaxTotalBadEvidences, DefaultScEnabled, DefaultScChallengersPerEpoch, + DefaultStorageTruthRecentBucketMaxBlocks, + DefaultStorageTruthOldBucketMinBlocks, + DefaultStorageTruthChallengeTargetDivisor, + DefaultStorageTruthCompoundRangesPerArtifact, + DefaultStorageTruthCompoundRangeLenBytes, + DefaultStorageTruthMaxSelfHealOpsPerEpoch, + DefaultStorageTruthProbationEpochs, + DefaultStorageTruthNodeSuspicionDecayPerEpoch, + DefaultStorageTruthReporterReliabilityDecayPerEpoch, + DefaultStorageTruthTicketDeteriorationDecayPerEpoch, + DefaultStorageTruthNodeSuspicionThresholdWatch, + DefaultStorageTruthNodeSuspicionThresholdProbation, + DefaultStorageTruthNodeSuspicionThresholdPostpone, + DefaultStorageTruthReporterReliabilityLowTrustThreshold, + DefaultStorageTruthReporterReliabilityIneligibleThreshold, + DefaultStorageTruthTicketDeteriorationHealThreshold, + DefaultStorageTruthEnforcementMode, ) } @@ -231,6 +323,57 @@ func (p Params) WithDefaults() Params { if p.ActionFinalizationRecoveryMaxTotalBadEvidences == 0 { p.ActionFinalizationRecoveryMaxTotalBadEvidences = DefaultActionFinalizationRecoveryMaxTotalBadEvidences } + if p.StorageTruthRecentBucketMaxBlocks == 0 { + p.StorageTruthRecentBucketMaxBlocks = DefaultStorageTruthRecentBucketMaxBlocks + } + if p.StorageTruthOldBucketMinBlocks == 0 { + p.StorageTruthOldBucketMinBlocks = DefaultStorageTruthOldBucketMinBlocks + } + if p.StorageTruthChallengeTargetDivisor == 0 { + p.StorageTruthChallengeTargetDivisor = DefaultStorageTruthChallengeTargetDivisor + } + if p.StorageTruthCompoundRangesPerArtifact == 0 { + p.StorageTruthCompoundRangesPerArtifact = DefaultStorageTruthCompoundRangesPerArtifact + } + if p.StorageTruthCompoundRangeLenBytes == 0 { + p.StorageTruthCompoundRangeLenBytes = DefaultStorageTruthCompoundRangeLenBytes + } + if p.StorageTruthMaxSelfHealOpsPerEpoch == 0 { + p.StorageTruthMaxSelfHealOpsPerEpoch = DefaultStorageTruthMaxSelfHealOpsPerEpoch + } + if p.StorageTruthProbationEpochs == 0 { + p.StorageTruthProbationEpochs = DefaultStorageTruthProbationEpochs + } + if p.StorageTruthNodeSuspicionDecayPerEpoch == 0 { + p.StorageTruthNodeSuspicionDecayPerEpoch = DefaultStorageTruthNodeSuspicionDecayPerEpoch + } + if p.StorageTruthReporterReliabilityDecayPerEpoch == 0 { + p.StorageTruthReporterReliabilityDecayPerEpoch = DefaultStorageTruthReporterReliabilityDecayPerEpoch + } + if p.StorageTruthTicketDeteriorationDecayPerEpoch == 0 { + p.StorageTruthTicketDeteriorationDecayPerEpoch = DefaultStorageTruthTicketDeteriorationDecayPerEpoch + } + if p.StorageTruthNodeSuspicionThresholdWatch == 0 { + p.StorageTruthNodeSuspicionThresholdWatch = DefaultStorageTruthNodeSuspicionThresholdWatch + } + if p.StorageTruthNodeSuspicionThresholdProbation == 0 { + p.StorageTruthNodeSuspicionThresholdProbation = DefaultStorageTruthNodeSuspicionThresholdProbation + } + if p.StorageTruthNodeSuspicionThresholdPostpone == 0 { + p.StorageTruthNodeSuspicionThresholdPostpone = DefaultStorageTruthNodeSuspicionThresholdPostpone + } + if p.StorageTruthReporterReliabilityLowTrustThreshold == 0 { + p.StorageTruthReporterReliabilityLowTrustThreshold = DefaultStorageTruthReporterReliabilityLowTrustThreshold + } + if p.StorageTruthReporterReliabilityIneligibleThreshold == 0 { + p.StorageTruthReporterReliabilityIneligibleThreshold = DefaultStorageTruthReporterReliabilityIneligibleThreshold + } + if p.StorageTruthTicketDeteriorationHealThreshold == 0 { + p.StorageTruthTicketDeteriorationHealThreshold = DefaultStorageTruthTicketDeteriorationHealThreshold + } + if p.StorageTruthEnforcementMode == StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED { + p.StorageTruthEnforcementMode = DefaultStorageTruthEnforcementMode + } return p } @@ -259,6 +402,24 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyScEnabled, &p.ScEnabled, validateBool), paramtypes.NewParamSetPair(KeyScChallengersPerEpoch, &p.ScChallengersPerEpoch, validateUint32), + + paramtypes.NewParamSetPair(KeyStorageTruthRecentBucketMaxBlocks, &p.StorageTruthRecentBucketMaxBlocks, validateUint64), + paramtypes.NewParamSetPair(KeyStorageTruthOldBucketMinBlocks, &p.StorageTruthOldBucketMinBlocks, validateUint64), + paramtypes.NewParamSetPair(KeyStorageTruthChallengeTargetDivisor, &p.StorageTruthChallengeTargetDivisor, validateUint32), + paramtypes.NewParamSetPair(KeyStorageTruthCompoundRangesPerArtifact, &p.StorageTruthCompoundRangesPerArtifact, validateUint32), + paramtypes.NewParamSetPair(KeyStorageTruthCompoundRangeLenBytes, &p.StorageTruthCompoundRangeLenBytes, validateUint32), + paramtypes.NewParamSetPair(KeyStorageTruthMaxSelfHealOpsPerEpoch, &p.StorageTruthMaxSelfHealOpsPerEpoch, validateUint32), + paramtypes.NewParamSetPair(KeyStorageTruthProbationEpochs, &p.StorageTruthProbationEpochs, validateUint32), + paramtypes.NewParamSetPair(KeyStorageTruthNodeSuspicionDecayPerEpoch, &p.StorageTruthNodeSuspicionDecayPerEpoch, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthReporterReliabilityDecayPerEpoch, &p.StorageTruthReporterReliabilityDecayPerEpoch, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthTicketDeteriorationDecayPerEpoch, &p.StorageTruthTicketDeteriorationDecayPerEpoch, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthNodeSuspicionThresholdWatch, &p.StorageTruthNodeSuspicionThresholdWatch, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthNodeSuspicionThresholdProbation, &p.StorageTruthNodeSuspicionThresholdProbation, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthNodeSuspicionThresholdPostpone, &p.StorageTruthNodeSuspicionThresholdPostpone, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthReporterReliabilityLowTrustThreshold, &p.StorageTruthReporterReliabilityLowTrustThreshold, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthReporterReliabilityIneligibleThreshold, &p.StorageTruthReporterReliabilityIneligibleThreshold, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthTicketDeteriorationHealThreshold, &p.StorageTruthTicketDeteriorationHealThreshold, validateInt64), + paramtypes.NewParamSetPair(KeyStorageTruthEnforcementMode, &p.StorageTruthEnforcementMode, validateStorageTruthEnforcementMode), } } @@ -342,6 +503,46 @@ func (p Params) Validate() error { if p.ActionFinalizationRecoveryMaxTotalBadEvidences == 0 { return fmt.Errorf("action_finalization_recovery_max_total_bad_evidences must be > 0") } + if p.StorageTruthRecentBucketMaxBlocks == 0 { + return fmt.Errorf("storage_truth_recent_bucket_max_blocks must be > 0") + } + if p.StorageTruthOldBucketMinBlocks == 0 { + return fmt.Errorf("storage_truth_old_bucket_min_blocks must be > 0") + } + if p.StorageTruthRecentBucketMaxBlocks >= p.StorageTruthOldBucketMinBlocks { + return fmt.Errorf("storage_truth_recent_bucket_max_blocks must be < storage_truth_old_bucket_min_blocks") + } + if p.StorageTruthChallengeTargetDivisor == 0 { + return fmt.Errorf("storage_truth_challenge_target_divisor must be > 0") + } + if p.StorageTruthCompoundRangesPerArtifact == 0 { + return fmt.Errorf("storage_truth_compound_ranges_per_artifact must be > 0") + } + if p.StorageTruthCompoundRangeLenBytes == 0 { + return fmt.Errorf("storage_truth_compound_range_len_bytes must be > 0") + } + if p.StorageTruthMaxSelfHealOpsPerEpoch == 0 { + return fmt.Errorf("storage_truth_max_self_heal_ops_per_epoch must be > 0") + } + if p.StorageTruthProbationEpochs == 0 { + return fmt.Errorf("storage_truth_probation_epochs must be > 0") + } + if p.StorageTruthNodeSuspicionThresholdWatch > p.StorageTruthNodeSuspicionThresholdProbation { + return fmt.Errorf("storage_truth_node_suspicion_threshold_watch must be <= storage_truth_node_suspicion_threshold_probation") + } + if p.StorageTruthNodeSuspicionThresholdProbation > p.StorageTruthNodeSuspicionThresholdPostpone { + return fmt.Errorf("storage_truth_node_suspicion_threshold_probation must be <= storage_truth_node_suspicion_threshold_postpone") + } + if p.StorageTruthReporterReliabilityLowTrustThreshold < p.StorageTruthReporterReliabilityIneligibleThreshold { + return fmt.Errorf("storage_truth_reporter_reliability_low_trust_threshold must be >= storage_truth_reporter_reliability_ineligible_threshold") + } + switch p.StorageTruthEnforcementMode { + case StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW, + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_SOFT, + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_FULL: + default: + return fmt.Errorf("storage_truth_enforcement_mode is invalid") + } ports := append([]uint32(nil), p.RequiredOpenPorts...) sort.Slice(ports, func(i, j int) bool { return ports[i] < ports[j] }) @@ -370,6 +571,14 @@ func validateUint32(v interface{}) error { return nil } +func validateInt64(v interface{}) error { + _, ok := v.(int64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + return nil +} + func validateUint32Slice(v interface{}) error { _, ok := v.([]uint32) if !ok { @@ -385,3 +594,11 @@ func validateBool(v interface{}) error { } return nil } + +func validateStorageTruthEnforcementMode(v interface{}) error { + _, ok := v.(StorageTruthEnforcementMode) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + return nil +} diff --git a/x/audit/v1/types/params.pb.go b/x/audit/v1/types/params.pb.go index 96246a17..45e9a246 100644 --- a/x/audit/v1/types/params.pb.go +++ b/x/audit/v1/types/params.pb.go @@ -24,6 +24,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type StorageTruthEnforcementMode int32 + +const ( + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED StorageTruthEnforcementMode = 0 + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW StorageTruthEnforcementMode = 1 + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_SOFT StorageTruthEnforcementMode = 2 + StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_FULL StorageTruthEnforcementMode = 3 +) + +var StorageTruthEnforcementMode_name = map[int32]string{ + 0: "STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED", + 1: "STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW", + 2: "STORAGE_TRUTH_ENFORCEMENT_MODE_SOFT", + 3: "STORAGE_TRUTH_ENFORCEMENT_MODE_FULL", +} + +var StorageTruthEnforcementMode_value = map[string]int32{ + "STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED": 0, + "STORAGE_TRUTH_ENFORCEMENT_MODE_SHADOW": 1, + "STORAGE_TRUTH_ENFORCEMENT_MODE_SOFT": 2, + "STORAGE_TRUTH_ENFORCEMENT_MODE_FULL": 3, +} + +func (x StorageTruthEnforcementMode) String() string { + return proto.EnumName(StorageTruthEnforcementMode_name, int32(x)) +} + +func (StorageTruthEnforcementMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_3788ca0fc7eb9d86, []int{0} +} + // Params defines the parameters for the audit module. type Params struct { EpochLengthBlocks uint64 `protobuf:"varint,1,opt,name=epoch_length_blocks,json=epochLengthBlocks,proto3" json:"epoch_length_blocks,omitempty"` @@ -73,6 +104,26 @@ type Params struct { // Storage Challenge (SC) params. ScEnabled bool `protobuf:"varint,19,opt,name=sc_enabled,json=scEnabled,proto3" json:"sc_enabled,omitempty"` ScChallengersPerEpoch uint32 `protobuf:"varint,20,opt,name=sc_challengers_per_epoch,json=scChallengersPerEpoch,proto3" json:"sc_challengers_per_epoch,omitempty"` + // Storage-truth challenge shape params. + StorageTruthRecentBucketMaxBlocks uint64 `protobuf:"varint,21,opt,name=storage_truth_recent_bucket_max_blocks,json=storageTruthRecentBucketMaxBlocks,proto3" json:"storage_truth_recent_bucket_max_blocks,omitempty"` + StorageTruthOldBucketMinBlocks uint64 `protobuf:"varint,22,opt,name=storage_truth_old_bucket_min_blocks,json=storageTruthOldBucketMinBlocks,proto3" json:"storage_truth_old_bucket_min_blocks,omitempty"` + StorageTruthChallengeTargetDivisor uint32 `protobuf:"varint,23,opt,name=storage_truth_challenge_target_divisor,json=storageTruthChallengeTargetDivisor,proto3" json:"storage_truth_challenge_target_divisor,omitempty"` + StorageTruthCompoundRangesPerArtifact uint32 `protobuf:"varint,24,opt,name=storage_truth_compound_ranges_per_artifact,json=storageTruthCompoundRangesPerArtifact,proto3" json:"storage_truth_compound_ranges_per_artifact,omitempty"` + StorageTruthCompoundRangeLenBytes uint32 `protobuf:"varint,25,opt,name=storage_truth_compound_range_len_bytes,json=storageTruthCompoundRangeLenBytes,proto3" json:"storage_truth_compound_range_len_bytes,omitempty"` + // Storage-truth scoring and healing params. + StorageTruthMaxSelfHealOpsPerEpoch uint32 `protobuf:"varint,26,opt,name=storage_truth_max_self_heal_ops_per_epoch,json=storageTruthMaxSelfHealOpsPerEpoch,proto3" json:"storage_truth_max_self_heal_ops_per_epoch,omitempty"` + StorageTruthProbationEpochs uint32 `protobuf:"varint,27,opt,name=storage_truth_probation_epochs,json=storageTruthProbationEpochs,proto3" json:"storage_truth_probation_epochs,omitempty"` + StorageTruthNodeSuspicionDecayPerEpoch int64 `protobuf:"varint,28,opt,name=storage_truth_node_suspicion_decay_per_epoch,json=storageTruthNodeSuspicionDecayPerEpoch,proto3" json:"storage_truth_node_suspicion_decay_per_epoch,omitempty"` + StorageTruthReporterReliabilityDecayPerEpoch int64 `protobuf:"varint,29,opt,name=storage_truth_reporter_reliability_decay_per_epoch,json=storageTruthReporterReliabilityDecayPerEpoch,proto3" json:"storage_truth_reporter_reliability_decay_per_epoch,omitempty"` + StorageTruthTicketDeteriorationDecayPerEpoch int64 `protobuf:"varint,30,opt,name=storage_truth_ticket_deterioration_decay_per_epoch,json=storageTruthTicketDeteriorationDecayPerEpoch,proto3" json:"storage_truth_ticket_deterioration_decay_per_epoch,omitempty"` + StorageTruthNodeSuspicionThresholdWatch int64 `protobuf:"varint,31,opt,name=storage_truth_node_suspicion_threshold_watch,json=storageTruthNodeSuspicionThresholdWatch,proto3" json:"storage_truth_node_suspicion_threshold_watch,omitempty"` + StorageTruthNodeSuspicionThresholdProbation int64 `protobuf:"varint,32,opt,name=storage_truth_node_suspicion_threshold_probation,json=storageTruthNodeSuspicionThresholdProbation,proto3" json:"storage_truth_node_suspicion_threshold_probation,omitempty"` + StorageTruthNodeSuspicionThresholdPostpone int64 `protobuf:"varint,33,opt,name=storage_truth_node_suspicion_threshold_postpone,json=storageTruthNodeSuspicionThresholdPostpone,proto3" json:"storage_truth_node_suspicion_threshold_postpone,omitempty"` + StorageTruthReporterReliabilityLowTrustThreshold int64 `protobuf:"varint,34,opt,name=storage_truth_reporter_reliability_low_trust_threshold,json=storageTruthReporterReliabilityLowTrustThreshold,proto3" json:"storage_truth_reporter_reliability_low_trust_threshold,omitempty"` + StorageTruthReporterReliabilityIneligibleThreshold int64 `protobuf:"varint,35,opt,name=storage_truth_reporter_reliability_ineligible_threshold,json=storageTruthReporterReliabilityIneligibleThreshold,proto3" json:"storage_truth_reporter_reliability_ineligible_threshold,omitempty"` + StorageTruthTicketDeteriorationHealThreshold int64 `protobuf:"varint,36,opt,name=storage_truth_ticket_deterioration_heal_threshold,json=storageTruthTicketDeteriorationHealThreshold,proto3" json:"storage_truth_ticket_deterioration_heal_threshold,omitempty"` + // Storage-truth rollout gate. + StorageTruthEnforcementMode StorageTruthEnforcementMode `protobuf:"varint,37,opt,name=storage_truth_enforcement_mode,json=storageTruthEnforcementMode,proto3,enum=lumera.audit.v1.StorageTruthEnforcementMode" json:"storage_truth_enforcement_mode,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -248,59 +299,214 @@ func (m *Params) GetScChallengersPerEpoch() uint32 { return 0 } +func (m *Params) GetStorageTruthRecentBucketMaxBlocks() uint64 { + if m != nil { + return m.StorageTruthRecentBucketMaxBlocks + } + return 0 +} + +func (m *Params) GetStorageTruthOldBucketMinBlocks() uint64 { + if m != nil { + return m.StorageTruthOldBucketMinBlocks + } + return 0 +} + +func (m *Params) GetStorageTruthChallengeTargetDivisor() uint32 { + if m != nil { + return m.StorageTruthChallengeTargetDivisor + } + return 0 +} + +func (m *Params) GetStorageTruthCompoundRangesPerArtifact() uint32 { + if m != nil { + return m.StorageTruthCompoundRangesPerArtifact + } + return 0 +} + +func (m *Params) GetStorageTruthCompoundRangeLenBytes() uint32 { + if m != nil { + return m.StorageTruthCompoundRangeLenBytes + } + return 0 +} + +func (m *Params) GetStorageTruthMaxSelfHealOpsPerEpoch() uint32 { + if m != nil { + return m.StorageTruthMaxSelfHealOpsPerEpoch + } + return 0 +} + +func (m *Params) GetStorageTruthProbationEpochs() uint32 { + if m != nil { + return m.StorageTruthProbationEpochs + } + return 0 +} + +func (m *Params) GetStorageTruthNodeSuspicionDecayPerEpoch() int64 { + if m != nil { + return m.StorageTruthNodeSuspicionDecayPerEpoch + } + return 0 +} + +func (m *Params) GetStorageTruthReporterReliabilityDecayPerEpoch() int64 { + if m != nil { + return m.StorageTruthReporterReliabilityDecayPerEpoch + } + return 0 +} + +func (m *Params) GetStorageTruthTicketDeteriorationDecayPerEpoch() int64 { + if m != nil { + return m.StorageTruthTicketDeteriorationDecayPerEpoch + } + return 0 +} + +func (m *Params) GetStorageTruthNodeSuspicionThresholdWatch() int64 { + if m != nil { + return m.StorageTruthNodeSuspicionThresholdWatch + } + return 0 +} + +func (m *Params) GetStorageTruthNodeSuspicionThresholdProbation() int64 { + if m != nil { + return m.StorageTruthNodeSuspicionThresholdProbation + } + return 0 +} + +func (m *Params) GetStorageTruthNodeSuspicionThresholdPostpone() int64 { + if m != nil { + return m.StorageTruthNodeSuspicionThresholdPostpone + } + return 0 +} + +func (m *Params) GetStorageTruthReporterReliabilityLowTrustThreshold() int64 { + if m != nil { + return m.StorageTruthReporterReliabilityLowTrustThreshold + } + return 0 +} + +func (m *Params) GetStorageTruthReporterReliabilityIneligibleThreshold() int64 { + if m != nil { + return m.StorageTruthReporterReliabilityIneligibleThreshold + } + return 0 +} + +func (m *Params) GetStorageTruthTicketDeteriorationHealThreshold() int64 { + if m != nil { + return m.StorageTruthTicketDeteriorationHealThreshold + } + return 0 +} + +func (m *Params) GetStorageTruthEnforcementMode() StorageTruthEnforcementMode { + if m != nil { + return m.StorageTruthEnforcementMode + } + return StorageTruthEnforcementMode_STORAGE_TRUTH_ENFORCEMENT_MODE_UNSPECIFIED +} + func init() { + proto.RegisterEnum("lumera.audit.v1.StorageTruthEnforcementMode", StorageTruthEnforcementMode_name, StorageTruthEnforcementMode_value) proto.RegisterType((*Params)(nil), "lumera.audit.v1.Params") } func init() { proto.RegisterFile("lumera/audit/v1/params.proto", fileDescriptor_3788ca0fc7eb9d86) } var fileDescriptor_3788ca0fc7eb9d86 = []byte{ - // 715 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x4f, 0x13, 0x41, - 0x18, 0xc6, 0x59, 0x41, 0x84, 0x41, 0x84, 0x2e, 0x25, 0x6c, 0x40, 0x6b, 0xa3, 0x1e, 0x08, 0x89, - 0xad, 0x0d, 0x1a, 0xff, 0xc4, 0x13, 0xb5, 0x44, 0x13, 0xc0, 0x5a, 0x7b, 0xe2, 0x32, 0x99, 0xee, - 0xbe, 0xb4, 0x63, 0x77, 0x67, 0x86, 0x99, 0xd9, 0xa6, 0x70, 0xf6, 0x03, 0xf8, 0x11, 0xfc, 0x38, - 0x1e, 0x39, 0x7a, 0x34, 0x70, 0xf1, 0x63, 0x98, 0x99, 0xe9, 0x96, 0x62, 0x4b, 0xe0, 0xd2, 0xee, - 0xce, 0xf3, 0xfe, 0x9e, 0x67, 0xde, 0x77, 0x36, 0x83, 0x1e, 0xc6, 0x69, 0x02, 0x92, 0x94, 0x49, - 0x1a, 0x51, 0x5d, 0xee, 0x55, 0xca, 0x82, 0x48, 0x92, 0xa8, 0x92, 0x90, 0x5c, 0x73, 0x7f, 0xc9, - 0xa9, 0x25, 0xab, 0x96, 0x7a, 0x95, 0xf5, 0x1c, 0x49, 0x28, 0xe3, 0x65, 0xfb, 0xeb, 0x6a, 0xd6, - 0xf3, 0x6d, 0xde, 0xe6, 0xf6, 0xb1, 0x6c, 0x9e, 0xdc, 0xea, 0x93, 0xef, 0x0b, 0x68, 0xb6, 0x6e, - 0xad, 0xfc, 0x12, 0x5a, 0x01, 0xc1, 0xc3, 0x0e, 0x8e, 0x81, 0xb5, 0x75, 0x07, 0xb7, 0x62, 0x1e, - 0x76, 0x55, 0xe0, 0x15, 0xbd, 0xcd, 0x99, 0x46, 0xce, 0x4a, 0x7b, 0x56, 0xd9, 0xb1, 0x82, 0xbf, - 0x85, 0xdc, 0x22, 0x3e, 0x05, 0xc9, 0x71, 0x07, 0x68, 0xbb, 0xa3, 0x83, 0x3b, 0xb6, 0x7a, 0xc9, - 0x0a, 0x87, 0x20, 0xf9, 0x47, 0xbb, 0x6c, 0xbc, 0x05, 0x80, 0xc4, 0xc7, 0x29, 0x97, 0x69, 0x82, - 0x25, 0x08, 0x2e, 0xb5, 0x0a, 0xa6, 0x8b, 0xde, 0xe6, 0x62, 0x23, 0x67, 0xa4, 0x2f, 0x56, 0x69, - 0x38, 0xc1, 0x7f, 0x8f, 0x36, 0x12, 0xca, 0xb0, 0x90, 0xbc, 0x05, 0x58, 0x13, 0xd9, 0x06, 0xad, - 0xb0, 0x00, 0x89, 0xad, 0x71, 0x30, 0x63, 0xb9, 0xb5, 0x84, 0xb2, 0xba, 0xa9, 0x68, 0xba, 0x82, - 0x3a, 0xc8, 0x9a, 0x91, 0x2d, 0x4d, 0xfa, 0xd7, 0xd2, 0x77, 0x07, 0x34, 0xe9, 0x4f, 0xa4, 0x4b, - 0x68, 0x45, 0xc2, 0x71, 0x4a, 0x25, 0x44, 0x98, 0x0b, 0x60, 0xd8, 0xed, 0x75, 0xb6, 0x38, 0x6d, - 0xf6, 0x9a, 0x49, 0x9f, 0x05, 0xb0, 0xba, 0xdd, 0x6b, 0x19, 0xe5, 0xcd, 0x5e, 0x43, 0x91, 0xe2, - 0x23, 0x09, 0x60, 0x82, 0x42, 0x60, 0x3a, 0xb8, 0xe7, 0x9a, 0x4b, 0x28, 0xab, 0x8a, 0x74, 0x57, - 0x02, 0xd4, 0x9d, 0x90, 0x01, 0x09, 0x24, 0x57, 0x81, 0xb9, 0x21, 0xb0, 0x0f, 0xc9, 0x28, 0x50, - 0x41, 0xab, 0x06, 0x88, 0xa8, 0xea, 0x5e, 0x25, 0xe6, 0x2d, 0xe1, 0x27, 0x94, 0x7d, 0xa0, 0xaa, - 0x3b, 0x8a, 0x54, 0x51, 0x21, 0xe4, 0x4c, 0x41, 0x98, 0x6a, 0xda, 0x03, 0xd7, 0xb8, 0xc2, 0x9a, - 0x63, 0xc1, 0x95, 0x16, 0x9c, 0x41, 0x80, 0x2c, 0xbb, 0x31, 0x52, 0x65, 0xdb, 0x57, 0x4d, 0x5e, - 0x1f, 0x94, 0xf8, 0xaf, 0xd0, 0x5a, 0x17, 0x40, 0xe0, 0x98, 0x28, 0xed, 0x2c, 0x30, 0x30, 0x2d, - 0x29, 0xa8, 0x60, 0xc1, 0x9e, 0x73, 0xde, 0xc8, 0x7b, 0x44, 0x69, 0x8b, 0xd6, 0x9c, 0xe6, 0x1f, - 0xa0, 0x67, 0xf6, 0xb0, 0xcd, 0xdc, 0x86, 0x79, 0x58,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0xdc, 0x0e, 0x89, - 0x86, 0x03, 0xf3, 0x1f, 0x21, 0xa4, 0x42, 0x0c, 0x8c, 0xb4, 0x62, 0x88, 0x82, 0x95, 0xa2, 0xb7, - 0x39, 0xd7, 0x98, 0x57, 0x61, 0xcd, 0x2d, 0xf8, 0xaf, 0x51, 0xa0, 0x42, 0x1c, 0x76, 0x48, 0x6c, - 0x6e, 0x4f, 0x90, 0xa3, 0x07, 0x93, 0xb7, 0x81, 0xab, 0x2a, 0xac, 0x5e, 0xca, 0xd9, 0x01, 0xbc, - 0x9b, 0xf9, 0xfb, 0xf3, 0xb1, 0xb7, 0xb3, 0xf5, 0xeb, 0xbc, 0xe0, 0x9d, 0x9d, 0x17, 0xbc, 0x3f, - 0xe7, 0x05, 0xef, 0xc7, 0x45, 0x61, 0xea, 0xec, 0xa2, 0x30, 0xf5, 0xfb, 0xa2, 0x30, 0x75, 0xb8, - 0xdc, 0xbf, 0xbc, 0xf3, 0xf5, 0x89, 0x00, 0xd5, 0x9a, 0xb5, 0x37, 0xf7, 0xf6, 0xbf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xf4, 0x64, 0xdc, 0x58, 0x13, 0x06, 0x00, 0x00, + // 1280 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xdd, 0x72, 0x13, 0x37, + 0x14, 0x8e, 0x09, 0xa5, 0xa0, 0x16, 0x48, 0x96, 0xd0, 0x6c, 0x09, 0x18, 0x43, 0xf8, 0x09, 0x29, + 0xb5, 0x09, 0xb4, 0xa5, 0xed, 0xf4, 0x86, 0xf8, 0xa7, 0xc9, 0x34, 0x8e, 0x8d, 0xed, 0x0c, 0x53, + 0xa6, 0x1d, 0x8d, 0xbc, 0x7b, 0x6c, 0xab, 0xd9, 0x95, 0x16, 0x49, 0x6b, 0x12, 0x9e, 0xa2, 0x8f, + 0xd0, 0xc7, 0xe9, 0xf4, 0x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0x81, 0x8d, 0xb0, 0x7d, + 0xde, 0xf0, 0x56, 0x7d, 0xca, 0x9a, 0x1a, 0xd1, 0x89, 0x00, 0x4d, 0x10, 0x55, 0x1d, 0x36, 0x6c, + 0x72, 0x74, 0x26, 0xfb, 0xa3, 0x98, 0x4d, 0x8e, 0x4e, 0x65, 0x17, 0xd1, 0x35, 0x01, 0x6f, 0x42, + 0x2a, 0xc0, 0xc5, 0x3c, 0x00, 0x86, 0xa3, 0xb5, 0x5e, 0x28, 0x2c, 0xea, 0xb5, 0x26, 0xa1, 0x46, + 0x00, 0xac, 0x69, 0xd6, 0x5a, 0x42, 0x2b, 0x7a, 0xad, 0x4e, 0x10, 0xe2, 0x9e, 0x00, 0xd0, 0x46, + 0x0e, 0x30, 0x65, 0x7f, 0x1c, 0x25, 0xe7, 0x53, 0x56, 0x0e, 0xc2, 0x9a, 0x00, 0x68, 0x46, 0x81, + 0x84, 0xe0, 0x83, 0x3f, 0x4e, 0xb8, 0x98, 0x12, 0xea, 0xe0, 0x67, 0x09, 0x5b, 0xe8, 0xba, 0x26, + 0xb8, 0x54, 0x1e, 0x8e, 0x33, 0x2e, 0x19, 0x86, 0xe5, 0x53, 0x56, 0xa1, 0xf2, 0x30, 0x4b, 0x29, + 0xa3, 0xbc, 0xc3, 0x99, 0x04, 0x27, 0x54, 0x74, 0x08, 0x51, 0xe2, 0x12, 0x2b, 0x8e, 0x03, 0x2e, + 0x55, 0xc0, 0x19, 0xd8, 0xc8, 0x70, 0xd7, 0x32, 0x28, 0x93, 0xbe, 0xec, 0xf0, 0x66, 0x0c, 0xb1, + 0xbe, 0x46, 0xab, 0x87, 0x00, 0x01, 0xf6, 0x88, 0x54, 0x91, 0x04, 0x06, 0xa6, 0x04, 0x05, 0x69, + 0x7f, 0x62, 0xfa, 0xbc, 0xa2, 0xc3, 0x7b, 0x44, 0x2a, 0x43, 0xad, 0x46, 0x31, 0x6b, 0x1f, 0xdd, + 0x33, 0xcd, 0xd6, 0x75, 0x4b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, 0xce, 0x0e, 0xae, 0xee, 0xd7, + 0x1a, 0xad, 0x72, 0xb5, 0x5e, 0xdd, 0xef, 0xe0, 0x7a, 0xa3, 0x52, 0xc5, 0x07, 0xfb, 0xed, 0x66, + 0xb5, 0xbc, 0x5b, 0xdb, 0xad, 0x56, 0x96, 0x16, 0xac, 0x47, 0xe8, 0xfe, 0x0c, 0x7c, 0x7b, 0xe7, + 0x45, 0xa5, 0xf1, 0x6a, 0x29, 0x67, 0x3d, 0x44, 0xeb, 0xb3, 0xa0, 0x8d, 0x5a, 0x67, 0xe9, 0xdc, + 0x1c, 0xc0, 0xda, 0xc1, 0xde, 0xde, 0xd2, 0xe2, 0xf6, 0xe6, 0x9f, 0x27, 0xf9, 0xdc, 0xfb, 0x93, + 0x7c, 0xee, 0x9f, 0x93, 0x7c, 0xee, 0xf7, 0x0f, 0xf9, 0x85, 0xf7, 0x1f, 0xf2, 0x0b, 0x7f, 0x7f, + 0xc8, 0x2f, 0xbc, 0x5e, 0x3a, 0x1a, 0xbd, 0x1e, 0xa9, 0xe3, 0x00, 0x64, 0xf7, 0x82, 0x79, 0xc9, + 0x79, 0xf6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x95, 0x6d, 0xbb, 0x3e, 0x0d, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -387,6 +593,57 @@ func (this *Params) Equal(that interface{}) bool { if this.ScChallengersPerEpoch != that1.ScChallengersPerEpoch { return false } + if this.StorageTruthRecentBucketMaxBlocks != that1.StorageTruthRecentBucketMaxBlocks { + return false + } + if this.StorageTruthOldBucketMinBlocks != that1.StorageTruthOldBucketMinBlocks { + return false + } + if this.StorageTruthChallengeTargetDivisor != that1.StorageTruthChallengeTargetDivisor { + return false + } + if this.StorageTruthCompoundRangesPerArtifact != that1.StorageTruthCompoundRangesPerArtifact { + return false + } + if this.StorageTruthCompoundRangeLenBytes != that1.StorageTruthCompoundRangeLenBytes { + return false + } + if this.StorageTruthMaxSelfHealOpsPerEpoch != that1.StorageTruthMaxSelfHealOpsPerEpoch { + return false + } + if this.StorageTruthProbationEpochs != that1.StorageTruthProbationEpochs { + return false + } + if this.StorageTruthNodeSuspicionDecayPerEpoch != that1.StorageTruthNodeSuspicionDecayPerEpoch { + return false + } + if this.StorageTruthReporterReliabilityDecayPerEpoch != that1.StorageTruthReporterReliabilityDecayPerEpoch { + return false + } + if this.StorageTruthTicketDeteriorationDecayPerEpoch != that1.StorageTruthTicketDeteriorationDecayPerEpoch { + return false + } + if this.StorageTruthNodeSuspicionThresholdWatch != that1.StorageTruthNodeSuspicionThresholdWatch { + return false + } + if this.StorageTruthNodeSuspicionThresholdProbation != that1.StorageTruthNodeSuspicionThresholdProbation { + return false + } + if this.StorageTruthNodeSuspicionThresholdPostpone != that1.StorageTruthNodeSuspicionThresholdPostpone { + return false + } + if this.StorageTruthReporterReliabilityLowTrustThreshold != that1.StorageTruthReporterReliabilityLowTrustThreshold { + return false + } + if this.StorageTruthReporterReliabilityIneligibleThreshold != that1.StorageTruthReporterReliabilityIneligibleThreshold { + return false + } + if this.StorageTruthTicketDeteriorationHealThreshold != that1.StorageTruthTicketDeteriorationHealThreshold { + return false + } + if this.StorageTruthEnforcementMode != that1.StorageTruthEnforcementMode { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -409,6 +666,125 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.StorageTruthEnforcementMode != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthEnforcementMode)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xa8 + } + if m.StorageTruthTicketDeteriorationHealThreshold != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthTicketDeteriorationHealThreshold)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xa0 + } + if m.StorageTruthReporterReliabilityIneligibleThreshold != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthReporterReliabilityIneligibleThreshold)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x98 + } + if m.StorageTruthReporterReliabilityLowTrustThreshold != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthReporterReliabilityLowTrustThreshold)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x90 + } + if m.StorageTruthNodeSuspicionThresholdPostpone != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthNodeSuspicionThresholdPostpone)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x88 + } + if m.StorageTruthNodeSuspicionThresholdProbation != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthNodeSuspicionThresholdProbation)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x80 + } + if m.StorageTruthNodeSuspicionThresholdWatch != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthNodeSuspicionThresholdWatch)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf8 + } + if m.StorageTruthTicketDeteriorationDecayPerEpoch != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthTicketDeteriorationDecayPerEpoch)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf0 + } + if m.StorageTruthReporterReliabilityDecayPerEpoch != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthReporterReliabilityDecayPerEpoch)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe8 + } + if m.StorageTruthNodeSuspicionDecayPerEpoch != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthNodeSuspicionDecayPerEpoch)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe0 + } + if m.StorageTruthProbationEpochs != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthProbationEpochs)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + } + if m.StorageTruthMaxSelfHealOpsPerEpoch != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthMaxSelfHealOpsPerEpoch)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if m.StorageTruthCompoundRangeLenBytes != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthCompoundRangeLenBytes)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } + if m.StorageTruthCompoundRangesPerArtifact != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthCompoundRangesPerArtifact)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc0 + } + if m.StorageTruthChallengeTargetDivisor != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthChallengeTargetDivisor)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb8 + } + if m.StorageTruthOldBucketMinBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthOldBucketMinBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } + if m.StorageTruthRecentBucketMaxBlocks != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.StorageTruthRecentBucketMaxBlocks)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } if m.ScChallengersPerEpoch != 0 { i = encodeVarintParams(dAtA, i, uint64(m.ScChallengersPerEpoch)) i-- @@ -621,6 +997,57 @@ func (m *Params) Size() (n int) { if m.ScChallengersPerEpoch != 0 { n += 2 + sovParams(uint64(m.ScChallengersPerEpoch)) } + if m.StorageTruthRecentBucketMaxBlocks != 0 { + n += 2 + sovParams(uint64(m.StorageTruthRecentBucketMaxBlocks)) + } + if m.StorageTruthOldBucketMinBlocks != 0 { + n += 2 + sovParams(uint64(m.StorageTruthOldBucketMinBlocks)) + } + if m.StorageTruthChallengeTargetDivisor != 0 { + n += 2 + sovParams(uint64(m.StorageTruthChallengeTargetDivisor)) + } + if m.StorageTruthCompoundRangesPerArtifact != 0 { + n += 2 + sovParams(uint64(m.StorageTruthCompoundRangesPerArtifact)) + } + if m.StorageTruthCompoundRangeLenBytes != 0 { + n += 2 + sovParams(uint64(m.StorageTruthCompoundRangeLenBytes)) + } + if m.StorageTruthMaxSelfHealOpsPerEpoch != 0 { + n += 2 + sovParams(uint64(m.StorageTruthMaxSelfHealOpsPerEpoch)) + } + if m.StorageTruthProbationEpochs != 0 { + n += 2 + sovParams(uint64(m.StorageTruthProbationEpochs)) + } + if m.StorageTruthNodeSuspicionDecayPerEpoch != 0 { + n += 2 + sovParams(uint64(m.StorageTruthNodeSuspicionDecayPerEpoch)) + } + if m.StorageTruthReporterReliabilityDecayPerEpoch != 0 { + n += 2 + sovParams(uint64(m.StorageTruthReporterReliabilityDecayPerEpoch)) + } + if m.StorageTruthTicketDeteriorationDecayPerEpoch != 0 { + n += 2 + sovParams(uint64(m.StorageTruthTicketDeteriorationDecayPerEpoch)) + } + if m.StorageTruthNodeSuspicionThresholdWatch != 0 { + n += 2 + sovParams(uint64(m.StorageTruthNodeSuspicionThresholdWatch)) + } + if m.StorageTruthNodeSuspicionThresholdProbation != 0 { + n += 2 + sovParams(uint64(m.StorageTruthNodeSuspicionThresholdProbation)) + } + if m.StorageTruthNodeSuspicionThresholdPostpone != 0 { + n += 2 + sovParams(uint64(m.StorageTruthNodeSuspicionThresholdPostpone)) + } + if m.StorageTruthReporterReliabilityLowTrustThreshold != 0 { + n += 2 + sovParams(uint64(m.StorageTruthReporterReliabilityLowTrustThreshold)) + } + if m.StorageTruthReporterReliabilityIneligibleThreshold != 0 { + n += 2 + sovParams(uint64(m.StorageTruthReporterReliabilityIneligibleThreshold)) + } + if m.StorageTruthTicketDeteriorationHealThreshold != 0 { + n += 2 + sovParams(uint64(m.StorageTruthTicketDeteriorationHealThreshold)) + } + if m.StorageTruthEnforcementMode != 0 { + n += 2 + sovParams(uint64(m.StorageTruthEnforcementMode)) + } return n } @@ -1097,6 +1524,329 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthRecentBucketMaxBlocks", wireType) + } + m.StorageTruthRecentBucketMaxBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthRecentBucketMaxBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthOldBucketMinBlocks", wireType) + } + m.StorageTruthOldBucketMinBlocks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthOldBucketMinBlocks |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthChallengeTargetDivisor", wireType) + } + m.StorageTruthChallengeTargetDivisor = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthChallengeTargetDivisor |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthCompoundRangesPerArtifact", wireType) + } + m.StorageTruthCompoundRangesPerArtifact = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthCompoundRangesPerArtifact |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthCompoundRangeLenBytes", wireType) + } + m.StorageTruthCompoundRangeLenBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthCompoundRangeLenBytes |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthMaxSelfHealOpsPerEpoch", wireType) + } + m.StorageTruthMaxSelfHealOpsPerEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthMaxSelfHealOpsPerEpoch |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthProbationEpochs", wireType) + } + m.StorageTruthProbationEpochs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthProbationEpochs |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthNodeSuspicionDecayPerEpoch", wireType) + } + m.StorageTruthNodeSuspicionDecayPerEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthNodeSuspicionDecayPerEpoch |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 29: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthReporterReliabilityDecayPerEpoch", wireType) + } + m.StorageTruthReporterReliabilityDecayPerEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthReporterReliabilityDecayPerEpoch |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthTicketDeteriorationDecayPerEpoch", wireType) + } + m.StorageTruthTicketDeteriorationDecayPerEpoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthTicketDeteriorationDecayPerEpoch |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthNodeSuspicionThresholdWatch", wireType) + } + m.StorageTruthNodeSuspicionThresholdWatch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthNodeSuspicionThresholdWatch |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthNodeSuspicionThresholdProbation", wireType) + } + m.StorageTruthNodeSuspicionThresholdProbation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthNodeSuspicionThresholdProbation |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthNodeSuspicionThresholdPostpone", wireType) + } + m.StorageTruthNodeSuspicionThresholdPostpone = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthNodeSuspicionThresholdPostpone |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthReporterReliabilityLowTrustThreshold", wireType) + } + m.StorageTruthReporterReliabilityLowTrustThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthReporterReliabilityLowTrustThreshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 35: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthReporterReliabilityIneligibleThreshold", wireType) + } + m.StorageTruthReporterReliabilityIneligibleThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthReporterReliabilityIneligibleThreshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthTicketDeteriorationHealThreshold", wireType) + } + m.StorageTruthTicketDeteriorationHealThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthTicketDeteriorationHealThreshold |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageTruthEnforcementMode", wireType) + } + m.StorageTruthEnforcementMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StorageTruthEnforcementMode |= StorageTruthEnforcementMode(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/audit/v1/types/params_test.go b/x/audit/v1/types/params_test.go new file mode 100644 index 00000000..8271d204 --- /dev/null +++ b/x/audit/v1/types/params_test.go @@ -0,0 +1,52 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestDefaultParamsIncludeStorageTruthDefaults(t *testing.T) { + p := DefaultParams() + + require.Equal(t, DefaultStorageTruthRecentBucketMaxBlocks, p.StorageTruthRecentBucketMaxBlocks) + require.Equal(t, DefaultStorageTruthOldBucketMinBlocks, p.StorageTruthOldBucketMinBlocks) + require.Equal(t, DefaultStorageTruthChallengeTargetDivisor, p.StorageTruthChallengeTargetDivisor) + require.Equal(t, DefaultStorageTruthCompoundRangesPerArtifact, p.StorageTruthCompoundRangesPerArtifact) + require.Equal(t, DefaultStorageTruthCompoundRangeLenBytes, p.StorageTruthCompoundRangeLenBytes) + require.Equal(t, DefaultStorageTruthEnforcementMode, p.StorageTruthEnforcementMode) + require.NoError(t, p.Validate()) +} + +func TestParamsWithDefaultsSetsStorageTruthFields(t *testing.T) { + p := Params{} + p = p.WithDefaults() + + require.Equal(t, DefaultStorageTruthRecentBucketMaxBlocks, p.StorageTruthRecentBucketMaxBlocks) + require.Equal(t, DefaultStorageTruthOldBucketMinBlocks, p.StorageTruthOldBucketMinBlocks) + require.Equal(t, DefaultStorageTruthChallengeTargetDivisor, p.StorageTruthChallengeTargetDivisor) + require.Equal(t, DefaultStorageTruthMaxSelfHealOpsPerEpoch, p.StorageTruthMaxSelfHealOpsPerEpoch) + require.Equal(t, DefaultStorageTruthEnforcementMode, p.StorageTruthEnforcementMode) +} + +func TestParamsValidateStorageTruthFailures(t *testing.T) { + base := DefaultParams() + + p1 := base + p1.StorageTruthRecentBucketMaxBlocks = p1.StorageTruthOldBucketMinBlocks + require.ErrorContains(t, p1.Validate(), "storage_truth_recent_bucket_max_blocks must be < storage_truth_old_bucket_min_blocks") + + p2 := base + p2.StorageTruthNodeSuspicionThresholdWatch = 100 + p2.StorageTruthNodeSuspicionThresholdProbation = 90 + require.ErrorContains(t, p2.Validate(), "storage_truth_node_suspicion_threshold_watch must be <=") + + p3 := base + p3.StorageTruthReporterReliabilityLowTrustThreshold = -100 + p3.StorageTruthReporterReliabilityIneligibleThreshold = -10 + require.ErrorContains(t, p3.Validate(), "storage_truth_reporter_reliability_low_trust_threshold must be >=") + + p4 := base + p4.StorageTruthEnforcementMode = StorageTruthEnforcementMode(99) + require.ErrorContains(t, p4.Validate(), "storage_truth_enforcement_mode is invalid") +} diff --git a/x/audit/v1/types/query.pb.go b/x/audit/v1/types/query.pb.go index 1792184a..9aea906d 100644 --- a/x/audit/v1/types/query.pb.go +++ b/x/audit/v1/types/query.pb.go @@ -1384,1289 +1384,1468 @@ func (m *QueryHostReportsResponse) GetPagination() *query.PageResponse { return nil } -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "lumera.audit.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "lumera.audit.v1.QueryParamsResponse") - proto.RegisterType((*QueryEvidenceByIdRequest)(nil), "lumera.audit.v1.QueryEvidenceByIdRequest") - proto.RegisterType((*QueryEvidenceByIdResponse)(nil), "lumera.audit.v1.QueryEvidenceByIdResponse") - proto.RegisterType((*QueryEvidenceBySubjectRequest)(nil), "lumera.audit.v1.QueryEvidenceBySubjectRequest") - proto.RegisterType((*QueryEvidenceBySubjectResponse)(nil), "lumera.audit.v1.QueryEvidenceBySubjectResponse") - proto.RegisterType((*QueryEvidenceByActionRequest)(nil), "lumera.audit.v1.QueryEvidenceByActionRequest") - proto.RegisterType((*QueryEvidenceByActionResponse)(nil), "lumera.audit.v1.QueryEvidenceByActionResponse") - proto.RegisterType((*QueryCurrentEpochRequest)(nil), "lumera.audit.v1.QueryCurrentEpochRequest") - proto.RegisterType((*QueryCurrentEpochResponse)(nil), "lumera.audit.v1.QueryCurrentEpochResponse") - proto.RegisterType((*QueryEpochAnchorRequest)(nil), "lumera.audit.v1.QueryEpochAnchorRequest") - proto.RegisterType((*QueryEpochAnchorResponse)(nil), "lumera.audit.v1.QueryEpochAnchorResponse") - proto.RegisterType((*QueryCurrentEpochAnchorRequest)(nil), "lumera.audit.v1.QueryCurrentEpochAnchorRequest") - proto.RegisterType((*QueryCurrentEpochAnchorResponse)(nil), "lumera.audit.v1.QueryCurrentEpochAnchorResponse") - proto.RegisterType((*QueryAssignedTargetsRequest)(nil), "lumera.audit.v1.QueryAssignedTargetsRequest") - proto.RegisterType((*QueryAssignedTargetsResponse)(nil), "lumera.audit.v1.QueryAssignedTargetsResponse") - proto.RegisterType((*QueryEpochReportRequest)(nil), "lumera.audit.v1.QueryEpochReportRequest") - proto.RegisterType((*QueryEpochReportResponse)(nil), "lumera.audit.v1.QueryEpochReportResponse") - proto.RegisterType((*QueryEpochReportsByReporterRequest)(nil), "lumera.audit.v1.QueryEpochReportsByReporterRequest") - proto.RegisterType((*QueryEpochReportsByReporterResponse)(nil), "lumera.audit.v1.QueryEpochReportsByReporterResponse") - proto.RegisterType((*QueryStorageChallengeReportsRequest)(nil), "lumera.audit.v1.QueryStorageChallengeReportsRequest") - proto.RegisterType((*StorageChallengeReport)(nil), "lumera.audit.v1.StorageChallengeReport") - proto.RegisterType((*QueryStorageChallengeReportsResponse)(nil), "lumera.audit.v1.QueryStorageChallengeReportsResponse") - proto.RegisterType((*QueryHostReportsRequest)(nil), "lumera.audit.v1.QueryHostReportsRequest") - proto.RegisterType((*HostReportEntry)(nil), "lumera.audit.v1.HostReportEntry") - proto.RegisterType((*QueryHostReportsResponse)(nil), "lumera.audit.v1.QueryHostReportsResponse") +type QueryNodeSuspicionStateRequest struct { + SupernodeAccount string `protobuf:"bytes,1,opt,name=supernode_account,json=supernodeAccount,proto3" json:"supernode_account,omitempty"` } -func init() { proto.RegisterFile("lumera/audit/v1/query.proto", fileDescriptor_e98945621bbc9485) } - -var fileDescriptor_e98945621bbc9485 = []byte{ - // 1500 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4d, 0x68, 0x5c, 0x55, - 0x14, 0xce, 0xcd, 0xc4, 0x36, 0x39, 0x69, 0x9b, 0xe4, 0xb6, 0x34, 0x93, 0x97, 0x3a, 0x0d, 0xaf, - 0xa5, 0x4d, 0x63, 0x33, 0xcf, 0xf4, 0xcf, 0x9f, 0x96, 0xda, 0x4c, 0x4d, 0x9b, 0x60, 0x4b, 0xd3, - 0x19, 0x7f, 0x50, 0x28, 0x8f, 0x97, 0xf7, 0xae, 0x33, 0x23, 0xc9, 0x7b, 0xd3, 0x77, 0xef, 0x04, - 0x87, 0x10, 0x17, 0x76, 0x2f, 0x82, 0xb8, 0x10, 0xdc, 0x49, 0x45, 0xa4, 0xa0, 0x8b, 0x8a, 0x0a, - 0xee, 0xdc, 0x74, 0x59, 0xea, 0x46, 0x04, 0x45, 0x5a, 0xc1, 0x6d, 0xc1, 0xbd, 0xca, 0xbb, 0x3f, - 0x33, 0xf3, 0x7e, 0xe6, 0xaf, 0xa4, 0x22, 0xba, 0x09, 0x33, 0xf7, 0x9c, 0x73, 0xef, 0x77, 0xce, - 0xf9, 0xee, 0x99, 0xfb, 0x05, 0x26, 0x57, 0xab, 0x6b, 0xc4, 0xb7, 0x0c, 0xab, 0xea, 0x94, 0x99, - 0xb1, 0x3e, 0x67, 0x5c, 0xaf, 0x12, 0xbf, 0x96, 0xad, 0xf8, 0x1e, 0xf3, 0xf0, 0x88, 0x30, 0x66, - 0xb9, 0x31, 0xbb, 0x3e, 0xa7, 0x8d, 0x59, 0x6b, 0x65, 0xd7, 0x33, 0xf8, 0x5f, 0xe1, 0xa3, 0xed, - 0x29, 0x7a, 0x45, 0x8f, 0x7f, 0x34, 0x82, 0x4f, 0x72, 0x75, 0x5f, 0xd1, 0xf3, 0x8a, 0x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, 0xde, 0xcf, 0xa0, 0x5f, 0xef, - 0x67, 0xd0, 0xfb, 0x0f, 0x32, 0x7d, 0x77, 0x1f, 0x64, 0xfa, 0x7e, 0x7c, 0x90, 0xe9, 0x7b, 0x63, - 0xf4, 0xed, 0xc6, 0x36, 0xac, 0x56, 0x21, 0x74, 0x65, 0x1b, 0xff, 0x37, 0xf9, 0xf1, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x07, 0xb6, 0x06, 0x74, 0x5c, 0x18, 0x00, 0x00, +func (m *QueryNodeSuspicionStateRequest) Reset() { *m = QueryNodeSuspicionStateRequest{} } +func (m *QueryNodeSuspicionStateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNodeSuspicionStateRequest) ProtoMessage() {} +func (*QueryNodeSuspicionStateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{26} +} +func (m *QueryNodeSuspicionStateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeSuspicionStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeSuspicionStateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryNodeSuspicionStateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeSuspicionStateRequest.Merge(m, src) +} +func (m *QueryNodeSuspicionStateRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeSuspicionStateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeSuspicionStateRequest.DiscardUnknown(m) } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +var xxx_messageInfo_QueryNodeSuspicionStateRequest proto.InternalMessageInfo -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // EvidenceById queries a single evidence record by id. - EvidenceById(ctx context.Context, in *QueryEvidenceByIdRequest, opts ...grpc.CallOption) (*QueryEvidenceByIdResponse, error) - // EvidenceBySubject queries evidence records by subject address. - EvidenceBySubject(ctx context.Context, in *QueryEvidenceBySubjectRequest, opts ...grpc.CallOption) (*QueryEvidenceBySubjectResponse, error) - // EvidenceByAction queries evidence records by action id. - EvidenceByAction(ctx context.Context, in *QueryEvidenceByActionRequest, opts ...grpc.CallOption) (*QueryEvidenceByActionResponse, error) - // CurrentEpoch returns the current derived epoch boundaries at the current chain height. - CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) - // EpochAnchor returns the persisted epoch anchor for the given epoch_id. - EpochAnchor(ctx context.Context, in *QueryEpochAnchorRequest, opts ...grpc.CallOption) (*QueryEpochAnchorResponse, error) - // CurrentEpochAnchor returns the persisted epoch anchor for the current epoch. - CurrentEpochAnchor(ctx context.Context, in *QueryCurrentEpochAnchorRequest, opts ...grpc.CallOption) (*QueryCurrentEpochAnchorResponse, error) - // AssignedTargets returns the prober -> targets assignment for a given supernode_account. - // If filter_by_epoch_id is false, it returns the assignments for the current epoch. - AssignedTargets(ctx context.Context, in *QueryAssignedTargetsRequest, opts ...grpc.CallOption) (*QueryAssignedTargetsResponse, error) - // EpochReport returns the submitted epoch report for (epoch_id, supernode_account). - EpochReport(ctx context.Context, in *QueryEpochReportRequest, opts ...grpc.CallOption) (*QueryEpochReportResponse, error) - // EpochReportsByReporter returns epoch reports submitted by the given reporter across epochs. - EpochReportsByReporter(ctx context.Context, in *QueryEpochReportsByReporterRequest, opts ...grpc.CallOption) (*QueryEpochReportsByReporterResponse, error) - // StorageChallengeReports returns all reports that include storage-challenge observations about the given supernode_account. - StorageChallengeReports(ctx context.Context, in *QueryStorageChallengeReportsRequest, opts ...grpc.CallOption) (*QueryStorageChallengeReportsResponse, error) - // HostReports returns host reports submitted by the given supernode_account across epochs. - HostReports(ctx context.Context, in *QueryHostReportsRequest, opts ...grpc.CallOption) (*QueryHostReportsResponse, error) +func (m *QueryNodeSuspicionStateRequest) GetSupernodeAccount() string { + if m != nil { + return m.SupernodeAccount + } + return "" } -type queryClient struct { - cc grpc1.ClientConn +type QueryNodeSuspicionStateResponse struct { + State NodeSuspicionState `protobuf:"bytes,1,opt,name=state,proto3" json:"state"` } -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *QueryNodeSuspicionStateResponse) Reset() { *m = QueryNodeSuspicionStateResponse{} } +func (m *QueryNodeSuspicionStateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNodeSuspicionStateResponse) ProtoMessage() {} +func (*QueryNodeSuspicionStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{27} } - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryNodeSuspicionStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNodeSuspicionStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNodeSuspicionStateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryNodeSuspicionStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNodeSuspicionStateResponse.Merge(m, src) +} +func (m *QueryNodeSuspicionStateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNodeSuspicionStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNodeSuspicionStateResponse.DiscardUnknown(m) } -func (c *queryClient) EvidenceById(ctx context.Context, in *QueryEvidenceByIdRequest, opts ...grpc.CallOption) (*QueryEvidenceByIdResponse, error) { - out := new(QueryEvidenceByIdResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceById", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryNodeSuspicionStateResponse proto.InternalMessageInfo + +func (m *QueryNodeSuspicionStateResponse) GetState() NodeSuspicionState { + if m != nil { + return m.State } - return out, nil + return NodeSuspicionState{} } -func (c *queryClient) EvidenceBySubject(ctx context.Context, in *QueryEvidenceBySubjectRequest, opts ...grpc.CallOption) (*QueryEvidenceBySubjectResponse, error) { - out := new(QueryEvidenceBySubjectResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceBySubject", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QueryReporterReliabilityStateRequest struct { + ReporterSupernodeAccount string `protobuf:"bytes,1,opt,name=reporter_supernode_account,json=reporterSupernodeAccount,proto3" json:"reporter_supernode_account,omitempty"` } -func (c *queryClient) EvidenceByAction(ctx context.Context, in *QueryEvidenceByActionRequest, opts ...grpc.CallOption) (*QueryEvidenceByActionResponse, error) { - out := new(QueryEvidenceByActionResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceByAction", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryReporterReliabilityStateRequest) Reset() { *m = QueryReporterReliabilityStateRequest{} } +func (m *QueryReporterReliabilityStateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryReporterReliabilityStateRequest) ProtoMessage() {} +func (*QueryReporterReliabilityStateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{28} +} +func (m *QueryReporterReliabilityStateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReporterReliabilityStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReporterReliabilityStateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryReporterReliabilityStateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReporterReliabilityStateRequest.Merge(m, src) +} +func (m *QueryReporterReliabilityStateRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryReporterReliabilityStateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReporterReliabilityStateRequest.DiscardUnknown(m) } -func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { - out := new(QueryCurrentEpochResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/CurrentEpoch", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryReporterReliabilityStateRequest proto.InternalMessageInfo + +func (m *QueryReporterReliabilityStateRequest) GetReporterSupernodeAccount() string { + if m != nil { + return m.ReporterSupernodeAccount } - return out, nil + return "" } -func (c *queryClient) EpochAnchor(ctx context.Context, in *QueryEpochAnchorRequest, opts ...grpc.CallOption) (*QueryEpochAnchorResponse, error) { - out := new(QueryEpochAnchorResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochAnchor", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QueryReporterReliabilityStateResponse struct { + State ReporterReliabilityState `protobuf:"bytes,1,opt,name=state,proto3" json:"state"` } -func (c *queryClient) CurrentEpochAnchor(ctx context.Context, in *QueryCurrentEpochAnchorRequest, opts ...grpc.CallOption) (*QueryCurrentEpochAnchorResponse, error) { - out := new(QueryCurrentEpochAnchorResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/CurrentEpochAnchor", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryReporterReliabilityStateResponse) Reset() { *m = QueryReporterReliabilityStateResponse{} } +func (m *QueryReporterReliabilityStateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryReporterReliabilityStateResponse) ProtoMessage() {} +func (*QueryReporterReliabilityStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{29} +} +func (m *QueryReporterReliabilityStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryReporterReliabilityStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryReporterReliabilityStateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryReporterReliabilityStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryReporterReliabilityStateResponse.Merge(m, src) +} +func (m *QueryReporterReliabilityStateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryReporterReliabilityStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryReporterReliabilityStateResponse.DiscardUnknown(m) } -func (c *queryClient) AssignedTargets(ctx context.Context, in *QueryAssignedTargetsRequest, opts ...grpc.CallOption) (*QueryAssignedTargetsResponse, error) { - out := new(QueryAssignedTargetsResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/AssignedTargets", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryReporterReliabilityStateResponse proto.InternalMessageInfo + +func (m *QueryReporterReliabilityStateResponse) GetState() ReporterReliabilityState { + if m != nil { + return m.State } - return out, nil + return ReporterReliabilityState{} } -func (c *queryClient) EpochReport(ctx context.Context, in *QueryEpochReportRequest, opts ...grpc.CallOption) (*QueryEpochReportResponse, error) { - out := new(QueryEpochReportResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochReport", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil +type QueryTicketDeteriorationStateRequest struct { + TicketId string `protobuf:"bytes,1,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` } -func (c *queryClient) EpochReportsByReporter(ctx context.Context, in *QueryEpochReportsByReporterRequest, opts ...grpc.CallOption) (*QueryEpochReportsByReporterResponse, error) { - out := new(QueryEpochReportsByReporterResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochReportsByReporter", in, out, opts...) - if err != nil { - return nil, err +func (m *QueryTicketDeteriorationStateRequest) Reset() { *m = QueryTicketDeteriorationStateRequest{} } +func (m *QueryTicketDeteriorationStateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTicketDeteriorationStateRequest) ProtoMessage() {} +func (*QueryTicketDeteriorationStateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{30} +} +func (m *QueryTicketDeteriorationStateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTicketDeteriorationStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTicketDeteriorationStateRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTicketDeteriorationStateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTicketDeteriorationStateRequest.Merge(m, src) +} +func (m *QueryTicketDeteriorationStateRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTicketDeteriorationStateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTicketDeteriorationStateRequest.DiscardUnknown(m) } -func (c *queryClient) StorageChallengeReports(ctx context.Context, in *QueryStorageChallengeReportsRequest, opts ...grpc.CallOption) (*QueryStorageChallengeReportsResponse, error) { - out := new(QueryStorageChallengeReportsResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/StorageChallengeReports", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryTicketDeteriorationStateRequest proto.InternalMessageInfo + +func (m *QueryTicketDeteriorationStateRequest) GetTicketId() string { + if m != nil { + return m.TicketId } - return out, nil + return "" } -func (c *queryClient) HostReports(ctx context.Context, in *QueryHostReportsRequest, opts ...grpc.CallOption) (*QueryHostReportsResponse, error) { - out := new(QueryHostReportsResponse) - err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/HostReports", in, out, opts...) - if err != nil { - return nil, err +type QueryTicketDeteriorationStateResponse struct { + State TicketDeteriorationState `protobuf:"bytes,1,opt,name=state,proto3" json:"state"` +} + +func (m *QueryTicketDeteriorationStateResponse) Reset() { *m = QueryTicketDeteriorationStateResponse{} } +func (m *QueryTicketDeteriorationStateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTicketDeteriorationStateResponse) ProtoMessage() {} +func (*QueryTicketDeteriorationStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{31} +} +func (m *QueryTicketDeteriorationStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTicketDeteriorationStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTicketDeteriorationStateResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return out, nil +} +func (m *QueryTicketDeteriorationStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTicketDeteriorationStateResponse.Merge(m, src) +} +func (m *QueryTicketDeteriorationStateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTicketDeteriorationStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTicketDeteriorationStateResponse.DiscardUnknown(m) } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // EvidenceById queries a single evidence record by id. - EvidenceById(context.Context, *QueryEvidenceByIdRequest) (*QueryEvidenceByIdResponse, error) - // EvidenceBySubject queries evidence records by subject address. - EvidenceBySubject(context.Context, *QueryEvidenceBySubjectRequest) (*QueryEvidenceBySubjectResponse, error) - // EvidenceByAction queries evidence records by action id. - EvidenceByAction(context.Context, *QueryEvidenceByActionRequest) (*QueryEvidenceByActionResponse, error) - // CurrentEpoch returns the current derived epoch boundaries at the current chain height. - CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) - // EpochAnchor returns the persisted epoch anchor for the given epoch_id. - EpochAnchor(context.Context, *QueryEpochAnchorRequest) (*QueryEpochAnchorResponse, error) - // CurrentEpochAnchor returns the persisted epoch anchor for the current epoch. - CurrentEpochAnchor(context.Context, *QueryCurrentEpochAnchorRequest) (*QueryCurrentEpochAnchorResponse, error) - // AssignedTargets returns the prober -> targets assignment for a given supernode_account. - // If filter_by_epoch_id is false, it returns the assignments for the current epoch. - AssignedTargets(context.Context, *QueryAssignedTargetsRequest) (*QueryAssignedTargetsResponse, error) - // EpochReport returns the submitted epoch report for (epoch_id, supernode_account). - EpochReport(context.Context, *QueryEpochReportRequest) (*QueryEpochReportResponse, error) - // EpochReportsByReporter returns epoch reports submitted by the given reporter across epochs. - EpochReportsByReporter(context.Context, *QueryEpochReportsByReporterRequest) (*QueryEpochReportsByReporterResponse, error) - // StorageChallengeReports returns all reports that include storage-challenge observations about the given supernode_account. - StorageChallengeReports(context.Context, *QueryStorageChallengeReportsRequest) (*QueryStorageChallengeReportsResponse, error) - // HostReports returns host reports submitted by the given supernode_account across epochs. - HostReports(context.Context, *QueryHostReportsRequest) (*QueryHostReportsResponse, error) +var xxx_messageInfo_QueryTicketDeteriorationStateResponse proto.InternalMessageInfo + +func (m *QueryTicketDeteriorationStateResponse) GetState() TicketDeteriorationState { + if m != nil { + return m.State + } + return TicketDeteriorationState{} } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +type QueryHealOpRequest struct { + HealOpId uint64 `protobuf:"varint,1,opt,name=heal_op_id,json=healOpId,proto3" json:"heal_op_id,omitempty"` } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +func (m *QueryHealOpRequest) Reset() { *m = QueryHealOpRequest{} } +func (m *QueryHealOpRequest) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpRequest) ProtoMessage() {} +func (*QueryHealOpRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{32} } -func (*UnimplementedQueryServer) EvidenceById(ctx context.Context, req *QueryEvidenceByIdRequest) (*QueryEvidenceByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EvidenceById not implemented") +func (m *QueryHealOpRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) EvidenceBySubject(ctx context.Context, req *QueryEvidenceBySubjectRequest) (*QueryEvidenceBySubjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EvidenceBySubject not implemented") +func (m *QueryHealOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedQueryServer) EvidenceByAction(ctx context.Context, req *QueryEvidenceByActionRequest) (*QueryEvidenceByActionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EvidenceByAction not implemented") +func (m *QueryHealOpRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpRequest.Merge(m, src) } -func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") +func (m *QueryHealOpRequest) XXX_Size() int { + return m.Size() } -func (*UnimplementedQueryServer) EpochAnchor(ctx context.Context, req *QueryEpochAnchorRequest) (*QueryEpochAnchorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochAnchor not implemented") +func (m *QueryHealOpRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpRequest.DiscardUnknown(m) } -func (*UnimplementedQueryServer) CurrentEpochAnchor(ctx context.Context, req *QueryCurrentEpochAnchorRequest) (*QueryCurrentEpochAnchorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentEpochAnchor not implemented") + +var xxx_messageInfo_QueryHealOpRequest proto.InternalMessageInfo + +func (m *QueryHealOpRequest) GetHealOpId() uint64 { + if m != nil { + return m.HealOpId + } + return 0 } -func (*UnimplementedQueryServer) AssignedTargets(ctx context.Context, req *QueryAssignedTargetsRequest) (*QueryAssignedTargetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AssignedTargets not implemented") + +type QueryHealOpResponse struct { + HealOp HealOp `protobuf:"bytes,1,opt,name=heal_op,json=healOp,proto3" json:"heal_op"` } -func (*UnimplementedQueryServer) EpochReport(ctx context.Context, req *QueryEpochReportRequest) (*QueryEpochReportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochReport not implemented") + +func (m *QueryHealOpResponse) Reset() { *m = QueryHealOpResponse{} } +func (m *QueryHealOpResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpResponse) ProtoMessage() {} +func (*QueryHealOpResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{33} } -func (*UnimplementedQueryServer) EpochReportsByReporter(ctx context.Context, req *QueryEpochReportsByReporterRequest) (*QueryEpochReportsByReporterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochReportsByReporter not implemented") +func (m *QueryHealOpResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (*UnimplementedQueryServer) StorageChallengeReports(ctx context.Context, req *QueryStorageChallengeReportsRequest) (*QueryStorageChallengeReportsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StorageChallengeReports not implemented") +func (m *QueryHealOpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } -func (*UnimplementedQueryServer) HostReports(ctx context.Context, req *QueryHostReportsRequest) (*QueryHostReportsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HostReports not implemented") +func (m *QueryHealOpResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpResponse.Merge(m, src) } - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +func (m *QueryHealOpResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryHealOpResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpResponse.DiscardUnknown(m) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) +var xxx_messageInfo_QueryHealOpResponse proto.InternalMessageInfo + +func (m *QueryHealOpResponse) GetHealOp() HealOp { + if m != nil { + return m.HealOp } - return interceptor(ctx, in, info, handler) + return HealOp{} } -func _Query_EvidenceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEvidenceByIdRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EvidenceById(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EvidenceById", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EvidenceById(ctx, req.(*QueryEvidenceByIdRequest)) - } - return interceptor(ctx, in, info, handler) +type QueryHealOpsByTicketRequest struct { + TicketId string `protobuf:"bytes,1,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func _Query_EvidenceBySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEvidenceBySubjectRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EvidenceBySubject(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EvidenceBySubject", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EvidenceBySubject(ctx, req.(*QueryEvidenceBySubjectRequest)) +func (m *QueryHealOpsByTicketRequest) Reset() { *m = QueryHealOpsByTicketRequest{} } +func (m *QueryHealOpsByTicketRequest) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpsByTicketRequest) ProtoMessage() {} +func (*QueryHealOpsByTicketRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{34} +} +func (m *QueryHealOpsByTicketRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHealOpsByTicketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpsByTicketRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryHealOpsByTicketRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpsByTicketRequest.Merge(m, src) +} +func (m *QueryHealOpsByTicketRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryHealOpsByTicketRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpsByTicketRequest.DiscardUnknown(m) } -func _Query_EvidenceByAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEvidenceByActionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EvidenceByAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EvidenceByAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EvidenceByAction(ctx, req.(*QueryEvidenceByActionRequest)) +var xxx_messageInfo_QueryHealOpsByTicketRequest proto.InternalMessageInfo + +func (m *QueryHealOpsByTicketRequest) GetTicketId() string { + if m != nil { + return m.TicketId } - return interceptor(ctx, in, info, handler) + return "" } -func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCurrentEpochRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CurrentEpoch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/CurrentEpoch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) +func (m *QueryHealOpsByTicketRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_EpochAnchor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochAnchorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochAnchor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EpochAnchor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochAnchor(ctx, req.(*QueryEpochAnchorRequest)) - } - return interceptor(ctx, in, info, handler) +type QueryHealOpsByTicketResponse struct { + HealOps []HealOp `protobuf:"bytes,1,rep,name=heal_ops,json=healOps,proto3" json:"heal_ops"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func _Query_CurrentEpochAnchor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCurrentEpochAnchorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CurrentEpochAnchor(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/CurrentEpochAnchor", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CurrentEpochAnchor(ctx, req.(*QueryCurrentEpochAnchorRequest)) +func (m *QueryHealOpsByTicketResponse) Reset() { *m = QueryHealOpsByTicketResponse{} } +func (m *QueryHealOpsByTicketResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpsByTicketResponse) ProtoMessage() {} +func (*QueryHealOpsByTicketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{35} +} +func (m *QueryHealOpsByTicketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHealOpsByTicketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpsByTicketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) +} +func (m *QueryHealOpsByTicketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpsByTicketResponse.Merge(m, src) +} +func (m *QueryHealOpsByTicketResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryHealOpsByTicketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpsByTicketResponse.DiscardUnknown(m) } -func _Query_AssignedTargets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAssignedTargetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AssignedTargets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/AssignedTargets", +var xxx_messageInfo_QueryHealOpsByTicketResponse proto.InternalMessageInfo + +func (m *QueryHealOpsByTicketResponse) GetHealOps() []HealOp { + if m != nil { + return m.HealOps } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AssignedTargets(ctx, req.(*QueryAssignedTargetsRequest)) + return nil +} + +func (m *QueryHealOpsByTicketResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination } - return interceptor(ctx, in, info, handler) + return nil } -func _Query_EpochReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochReport(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EpochReport", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochReport(ctx, req.(*QueryEpochReportRequest)) - } - return interceptor(ctx, in, info, handler) +type QueryHealOpsByStatusRequest struct { + Status HealOpStatus `protobuf:"varint,1,opt,name=status,proto3,enum=lumera.audit.v1.HealOpStatus" json:"status,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func _Query_EpochReportsByReporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochReportsByReporterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochReportsByReporter(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/EpochReportsByReporter", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochReportsByReporter(ctx, req.(*QueryEpochReportsByReporterRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *QueryHealOpsByStatusRequest) Reset() { *m = QueryHealOpsByStatusRequest{} } +func (m *QueryHealOpsByStatusRequest) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpsByStatusRequest) ProtoMessage() {} +func (*QueryHealOpsByStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{36} } - -func _Query_StorageChallengeReports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryStorageChallengeReportsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).StorageChallengeReports(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/StorageChallengeReports", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).StorageChallengeReports(ctx, req.(*QueryStorageChallengeReportsRequest)) - } - return interceptor(ctx, in, info, handler) +func (m *QueryHealOpsByStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } - -func _Query_HostReports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryHostReportsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HostReports(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.audit.v1.Query/HostReports", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HostReports(ctx, req.(*QueryHostReportsRequest)) +func (m *QueryHealOpsByStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpsByStatusRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return interceptor(ctx, in, info, handler) } - -var Query_serviceDesc = _Query_serviceDesc -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.audit.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "EvidenceById", - Handler: _Query_EvidenceById_Handler, - }, - { - MethodName: "EvidenceBySubject", - Handler: _Query_EvidenceBySubject_Handler, - }, - { - MethodName: "EvidenceByAction", - Handler: _Query_EvidenceByAction_Handler, - }, - { - MethodName: "CurrentEpoch", - Handler: _Query_CurrentEpoch_Handler, - }, - { - MethodName: "EpochAnchor", - Handler: _Query_EpochAnchor_Handler, - }, - { - MethodName: "CurrentEpochAnchor", - Handler: _Query_CurrentEpochAnchor_Handler, - }, - { - MethodName: "AssignedTargets", - Handler: _Query_AssignedTargets_Handler, - }, - { - MethodName: "EpochReport", - Handler: _Query_EpochReport_Handler, - }, - { - MethodName: "EpochReportsByReporter", - Handler: _Query_EpochReportsByReporter_Handler, - }, - { - MethodName: "StorageChallengeReports", - Handler: _Query_StorageChallengeReports_Handler, - }, - { - MethodName: "HostReports", - Handler: _Query_HostReports_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lumera/audit/v1/query.proto", +func (m *QueryHealOpsByStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpsByStatusRequest.Merge(m, src) } - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (m *QueryHealOpsByStatusRequest) XXX_Size() int { + return m.Size() } - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *QueryHealOpsByStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpsByStatusRequest.DiscardUnknown(m) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +var xxx_messageInfo_QueryHealOpsByStatusRequest proto.InternalMessageInfo + +func (m *QueryHealOpsByStatusRequest) GetStatus() HealOpStatus { + if m != nil { + return m.Status + } + return HealOpStatus_HEAL_OP_STATUS_UNSPECIFIED } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *QueryHealOpsByStatusRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination } - return dAtA[:n], nil + return nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type QueryHealOpsByStatusResponse struct { + HealOps []HealOp `protobuf:"bytes,1,rep,name=heal_ops,json=healOps,proto3" json:"heal_ops"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) +func (m *QueryHealOpsByStatusResponse) Reset() { *m = QueryHealOpsByStatusResponse{} } +func (m *QueryHealOpsByStatusResponse) String() string { return proto.CompactTextString(m) } +func (*QueryHealOpsByStatusResponse) ProtoMessage() {} +func (*QueryHealOpsByStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e98945621bbc9485, []int{37} +} +func (m *QueryHealOpsByStatusResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryHealOpsByStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryHealOpsByStatusResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) if err != nil { - return 0, err + return nil, err } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + return b[:n], nil } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil } - -func (m *QueryEvidenceByIdRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (m *QueryHealOpsByStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryHealOpsByStatusResponse.Merge(m, src) } - -func (m *QueryEvidenceByIdRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *QueryHealOpsByStatusResponse) XXX_Size() int { + return m.Size() } - -func (m *QueryEvidenceByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EvidenceId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EvidenceId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil +func (m *QueryHealOpsByStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryHealOpsByStatusResponse.DiscardUnknown(m) } -func (m *QueryEvidenceByIdResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} +var xxx_messageInfo_QueryHealOpsByStatusResponse proto.InternalMessageInfo -func (m *QueryEvidenceByIdResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *QueryHealOpsByStatusResponse) GetHealOps() []HealOp { + if m != nil { + return m.HealOps + } + return nil } -func (m *QueryEvidenceByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) +func (m *QueryHealOpsByStatusResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return nil } -func (m *QueryEvidenceBySubjectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "lumera.audit.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "lumera.audit.v1.QueryParamsResponse") + proto.RegisterType((*QueryEvidenceByIdRequest)(nil), "lumera.audit.v1.QueryEvidenceByIdRequest") + proto.RegisterType((*QueryEvidenceByIdResponse)(nil), "lumera.audit.v1.QueryEvidenceByIdResponse") + proto.RegisterType((*QueryEvidenceBySubjectRequest)(nil), "lumera.audit.v1.QueryEvidenceBySubjectRequest") + proto.RegisterType((*QueryEvidenceBySubjectResponse)(nil), "lumera.audit.v1.QueryEvidenceBySubjectResponse") + proto.RegisterType((*QueryEvidenceByActionRequest)(nil), "lumera.audit.v1.QueryEvidenceByActionRequest") + proto.RegisterType((*QueryEvidenceByActionResponse)(nil), "lumera.audit.v1.QueryEvidenceByActionResponse") + proto.RegisterType((*QueryCurrentEpochRequest)(nil), "lumera.audit.v1.QueryCurrentEpochRequest") + proto.RegisterType((*QueryCurrentEpochResponse)(nil), "lumera.audit.v1.QueryCurrentEpochResponse") + proto.RegisterType((*QueryEpochAnchorRequest)(nil), "lumera.audit.v1.QueryEpochAnchorRequest") + proto.RegisterType((*QueryEpochAnchorResponse)(nil), "lumera.audit.v1.QueryEpochAnchorResponse") + proto.RegisterType((*QueryCurrentEpochAnchorRequest)(nil), "lumera.audit.v1.QueryCurrentEpochAnchorRequest") + proto.RegisterType((*QueryCurrentEpochAnchorResponse)(nil), "lumera.audit.v1.QueryCurrentEpochAnchorResponse") + proto.RegisterType((*QueryAssignedTargetsRequest)(nil), "lumera.audit.v1.QueryAssignedTargetsRequest") + proto.RegisterType((*QueryAssignedTargetsResponse)(nil), "lumera.audit.v1.QueryAssignedTargetsResponse") + proto.RegisterType((*QueryEpochReportRequest)(nil), "lumera.audit.v1.QueryEpochReportRequest") + proto.RegisterType((*QueryEpochReportResponse)(nil), "lumera.audit.v1.QueryEpochReportResponse") + proto.RegisterType((*QueryEpochReportsByReporterRequest)(nil), "lumera.audit.v1.QueryEpochReportsByReporterRequest") + proto.RegisterType((*QueryEpochReportsByReporterResponse)(nil), "lumera.audit.v1.QueryEpochReportsByReporterResponse") + proto.RegisterType((*QueryStorageChallengeReportsRequest)(nil), "lumera.audit.v1.QueryStorageChallengeReportsRequest") + proto.RegisterType((*StorageChallengeReport)(nil), "lumera.audit.v1.StorageChallengeReport") + proto.RegisterType((*QueryStorageChallengeReportsResponse)(nil), "lumera.audit.v1.QueryStorageChallengeReportsResponse") + proto.RegisterType((*QueryHostReportsRequest)(nil), "lumera.audit.v1.QueryHostReportsRequest") + proto.RegisterType((*HostReportEntry)(nil), "lumera.audit.v1.HostReportEntry") + proto.RegisterType((*QueryHostReportsResponse)(nil), "lumera.audit.v1.QueryHostReportsResponse") + proto.RegisterType((*QueryNodeSuspicionStateRequest)(nil), "lumera.audit.v1.QueryNodeSuspicionStateRequest") + proto.RegisterType((*QueryNodeSuspicionStateResponse)(nil), "lumera.audit.v1.QueryNodeSuspicionStateResponse") + proto.RegisterType((*QueryReporterReliabilityStateRequest)(nil), "lumera.audit.v1.QueryReporterReliabilityStateRequest") + proto.RegisterType((*QueryReporterReliabilityStateResponse)(nil), "lumera.audit.v1.QueryReporterReliabilityStateResponse") + proto.RegisterType((*QueryTicketDeteriorationStateRequest)(nil), "lumera.audit.v1.QueryTicketDeteriorationStateRequest") + proto.RegisterType((*QueryTicketDeteriorationStateResponse)(nil), "lumera.audit.v1.QueryTicketDeteriorationStateResponse") + proto.RegisterType((*QueryHealOpRequest)(nil), "lumera.audit.v1.QueryHealOpRequest") + proto.RegisterType((*QueryHealOpResponse)(nil), "lumera.audit.v1.QueryHealOpResponse") + proto.RegisterType((*QueryHealOpsByTicketRequest)(nil), "lumera.audit.v1.QueryHealOpsByTicketRequest") + proto.RegisterType((*QueryHealOpsByTicketResponse)(nil), "lumera.audit.v1.QueryHealOpsByTicketResponse") + proto.RegisterType((*QueryHealOpsByStatusRequest)(nil), "lumera.audit.v1.QueryHealOpsByStatusRequest") + proto.RegisterType((*QueryHealOpsByStatusResponse)(nil), "lumera.audit.v1.QueryHealOpsByStatusResponse") } -func (m *QueryEvidenceBySubjectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func init() { proto.RegisterFile("lumera/audit/v1/query.proto", fileDescriptor_e98945621bbc9485) } + +var fileDescriptor_e98945621bbc9485 = []byte{ + // 1957 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5a, 0x5d, 0x6c, 0x14, 0xd7, + 0x15, 0xf6, 0xb5, 0x8d, 0x7f, 0xae, 0xc1, 0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x36, 0x4d, 0xf4, 0x35, 0x0c, 0x6f, 0x29, 0x45, 0x5f, 0x43, 0x41, + 0xef, 0xd7, 0xfa, 0x1b, 0x8e, 0xb7, 0x37, 0xee, 0x1b, 0x8e, 0x3a, 0xd1, 0xe7, 0xcc, 0xff, 0x79, + 0x81, 0xd3, 0xe6, 0x28, 0x12, 0xb8, 0xaf, 0xc5, 0x8b, 0x04, 0xee, 0xef, 0xb8, 0xa4, 0x25, 0x02, + 0xfc, 0x67, 0x68, 0xa1, 0x1d, 0xe0, 0xb4, 0x2d, 0x94, 0xb7, 0xe9, 0xff, 0xab, 0xa9, 0xe9, 0x27, + 0xcf, 0x13, 0xe0, 0xe9, 0xf3, 0x04, 0xf8, 0xf4, 0x79, 0x02, 0xfc, 0xe9, 0x45, 0xa2, 0xe3, 0xe9, + 0x8b, 0x44, 0xc7, 0x07, 0x2f, 0x12, 0x1d, 0xbf, 0x1e, 0xfe, 0x9d, 0x27, 0x9f, 0x2a, 0x25, 0x6c, + 0x67, 0x7b, 0xc8, 0x3f, 0x93, 0x38, 0xf5, 0x4d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xa8, 0x22, + 0x87, 0x5c, 0x22, 0x00, 0x00, } -func (m *QueryEvidenceBySubjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.SubjectAddress) > 0 { - i -= len(m.SubjectAddress) - copy(dAtA[i:], m.SubjectAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SubjectAddress))) - i-- - dAtA[i] = 0xa +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // EvidenceById queries a single evidence record by id. + EvidenceById(ctx context.Context, in *QueryEvidenceByIdRequest, opts ...grpc.CallOption) (*QueryEvidenceByIdResponse, error) + // EvidenceBySubject queries evidence records by subject address. + EvidenceBySubject(ctx context.Context, in *QueryEvidenceBySubjectRequest, opts ...grpc.CallOption) (*QueryEvidenceBySubjectResponse, error) + // EvidenceByAction queries evidence records by action id. + EvidenceByAction(ctx context.Context, in *QueryEvidenceByActionRequest, opts ...grpc.CallOption) (*QueryEvidenceByActionResponse, error) + // CurrentEpoch returns the current derived epoch boundaries at the current chain height. + CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) + // EpochAnchor returns the persisted epoch anchor for the given epoch_id. + EpochAnchor(ctx context.Context, in *QueryEpochAnchorRequest, opts ...grpc.CallOption) (*QueryEpochAnchorResponse, error) + // CurrentEpochAnchor returns the persisted epoch anchor for the current epoch. + CurrentEpochAnchor(ctx context.Context, in *QueryCurrentEpochAnchorRequest, opts ...grpc.CallOption) (*QueryCurrentEpochAnchorResponse, error) + // AssignedTargets returns the prober -> targets assignment for a given supernode_account. + // If filter_by_epoch_id is false, it returns the assignments for the current epoch. + AssignedTargets(ctx context.Context, in *QueryAssignedTargetsRequest, opts ...grpc.CallOption) (*QueryAssignedTargetsResponse, error) + // EpochReport returns the submitted epoch report for (epoch_id, supernode_account). + EpochReport(ctx context.Context, in *QueryEpochReportRequest, opts ...grpc.CallOption) (*QueryEpochReportResponse, error) + // EpochReportsByReporter returns epoch reports submitted by the given reporter across epochs. + EpochReportsByReporter(ctx context.Context, in *QueryEpochReportsByReporterRequest, opts ...grpc.CallOption) (*QueryEpochReportsByReporterResponse, error) + // StorageChallengeReports returns all reports that include storage-challenge observations about the given supernode_account. + StorageChallengeReports(ctx context.Context, in *QueryStorageChallengeReportsRequest, opts ...grpc.CallOption) (*QueryStorageChallengeReportsResponse, error) + // HostReports returns host reports submitted by the given supernode_account across epochs. + HostReports(ctx context.Context, in *QueryHostReportsRequest, opts ...grpc.CallOption) (*QueryHostReportsResponse, error) + // NodeSuspicionState returns storage-truth node suspicion state for a supernode account. + NodeSuspicionState(ctx context.Context, in *QueryNodeSuspicionStateRequest, opts ...grpc.CallOption) (*QueryNodeSuspicionStateResponse, error) + // ReporterReliabilityState returns storage-truth reporter reliability state for a reporter account. + ReporterReliabilityState(ctx context.Context, in *QueryReporterReliabilityStateRequest, opts ...grpc.CallOption) (*QueryReporterReliabilityStateResponse, error) + // TicketDeteriorationState returns storage-truth ticket deterioration state for a ticket id. + TicketDeteriorationState(ctx context.Context, in *QueryTicketDeteriorationStateRequest, opts ...grpc.CallOption) (*QueryTicketDeteriorationStateResponse, error) + // HealOp returns a single storage-truth heal operation by id. + HealOp(ctx context.Context, in *QueryHealOpRequest, opts ...grpc.CallOption) (*QueryHealOpResponse, error) + // HealOpsByTicket returns storage-truth heal operations for a ticket id. + HealOpsByTicket(ctx context.Context, in *QueryHealOpsByTicketRequest, opts ...grpc.CallOption) (*QueryHealOpsByTicketResponse, error) + // HealOpsByStatus returns storage-truth heal operations filtered by status. + HealOpsByStatus(ctx context.Context, in *QueryHealOpsByStatusRequest, opts ...grpc.CallOption) (*QueryHealOpsByStatusResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryEvidenceBySubjectResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) EvidenceById(ctx context.Context, in *QueryEvidenceByIdRequest, opts ...grpc.CallOption) (*QueryEvidenceByIdResponse, error) { + out := new(QueryEvidenceByIdResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceById", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryEvidenceBySubjectResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) EvidenceBySubject(ctx context.Context, in *QueryEvidenceBySubjectRequest, opts ...grpc.CallOption) (*QueryEvidenceBySubjectResponse, error) { + out := new(QueryEvidenceBySubjectResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceBySubject", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryEvidenceBySubjectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 +func (c *queryClient) EvidenceByAction(ctx context.Context, in *QueryEvidenceByActionRequest, opts ...grpc.CallOption) (*QueryEvidenceByActionResponse, error) { + out := new(QueryEvidenceByActionResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EvidenceByAction", in, out, opts...) + if err != nil { + return nil, err } - if len(m.Evidence) > 0 { - for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + return out, nil +} + +func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { + out := new(QueryCurrentEpochResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/CurrentEpoch", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryEvidenceByActionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) EpochAnchor(ctx context.Context, in *QueryEpochAnchorRequest, opts ...grpc.CallOption) (*QueryEpochAnchorResponse, error) { + out := new(QueryEpochAnchorResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochAnchor", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryEvidenceByActionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) CurrentEpochAnchor(ctx context.Context, in *QueryCurrentEpochAnchorRequest, opts ...grpc.CallOption) (*QueryCurrentEpochAnchorResponse, error) { + out := new(QueryCurrentEpochAnchorResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/CurrentEpochAnchor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryEvidenceByActionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 +func (c *queryClient) AssignedTargets(ctx context.Context, in *QueryAssignedTargetsRequest, opts ...grpc.CallOption) (*QueryAssignedTargetsResponse, error) { + out := new(QueryAssignedTargetsResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/AssignedTargets", in, out, opts...) + if err != nil { + return nil, err } - if len(m.ActionId) > 0 { - i -= len(m.ActionId) - copy(dAtA[i:], m.ActionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ActionId))) - i-- - dAtA[i] = 0xa + return out, nil +} + +func (c *queryClient) EpochReport(ctx context.Context, in *QueryEpochReportRequest, opts ...grpc.CallOption) (*QueryEpochReportResponse, error) { + out := new(QueryEpochReportResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochReport", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryEvidenceByActionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) EpochReportsByReporter(ctx context.Context, in *QueryEpochReportsByReporterRequest, opts ...grpc.CallOption) (*QueryEpochReportsByReporterResponse, error) { + out := new(QueryEpochReportsByReporterResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/EpochReportsByReporter", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryEvidenceByActionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) StorageChallengeReports(ctx context.Context, in *QueryStorageChallengeReportsRequest, opts ...grpc.CallOption) (*QueryStorageChallengeReportsResponse, error) { + out := new(QueryStorageChallengeReportsResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/StorageChallengeReports", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (m *QueryEvidenceByActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Evidence) > 0 { - for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } +func (c *queryClient) HostReports(ctx context.Context, in *QueryHostReportsRequest, opts ...grpc.CallOption) (*QueryHostReportsResponse, error) { + out := new(QueryHostReportsResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/HostReports", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryCurrentEpochRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) NodeSuspicionState(ctx context.Context, in *QueryNodeSuspicionStateRequest, opts ...grpc.CallOption) (*QueryNodeSuspicionStateResponse, error) { + out := new(QueryNodeSuspicionStateResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/NodeSuspicionState", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil + return out, nil } -func (m *QueryCurrentEpochResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) ReporterReliabilityState(ctx context.Context, in *QueryReporterReliabilityStateRequest, opts ...grpc.CallOption) (*QueryReporterReliabilityStateResponse, error) { + out := new(QueryReporterReliabilityStateResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/ReporterReliabilityState", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochEndHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochEndHeight)) - i-- - dAtA[i] = 0x18 - } - if m.EpochStartHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochStartHeight)) - i-- - dAtA[i] = 0x10 - } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x8 +func (c *queryClient) TicketDeteriorationState(ctx context.Context, in *QueryTicketDeteriorationStateRequest, opts ...grpc.CallOption) (*QueryTicketDeteriorationStateResponse, error) { + out := new(QueryTicketDeteriorationStateResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/TicketDeteriorationState", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryEpochAnchorRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) HealOp(ctx context.Context, in *QueryHealOpRequest, opts ...grpc.CallOption) (*QueryHealOpResponse, error) { + out := new(QueryHealOpResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/HealOp", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryEpochAnchorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return out, nil } -func (m *QueryEpochAnchorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x8 +func (c *queryClient) HealOpsByTicket(ctx context.Context, in *QueryHealOpsByTicketRequest, opts ...grpc.CallOption) (*QueryHealOpsByTicketResponse, error) { + out := new(QueryHealOpsByTicketResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/HealOpsByTicket", in, out, opts...) + if err != nil { + return nil, err } - return len(dAtA) - i, nil + return out, nil } -func (m *QueryEpochAnchorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) +func (c *queryClient) HealOpsByStatus(ctx context.Context, in *QueryHealOpsByStatusRequest, opts ...grpc.CallOption) (*QueryHealOpsByStatusResponse, error) { + out := new(QueryHealOpsByStatusResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Query/HealOpsByStatus", in, out, opts...) if err != nil { return nil, err } - return dAtA[:n], nil + return out, nil } -func (m *QueryEpochAnchorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // EvidenceById queries a single evidence record by id. + EvidenceById(context.Context, *QueryEvidenceByIdRequest) (*QueryEvidenceByIdResponse, error) + // EvidenceBySubject queries evidence records by subject address. + EvidenceBySubject(context.Context, *QueryEvidenceBySubjectRequest) (*QueryEvidenceBySubjectResponse, error) + // EvidenceByAction queries evidence records by action id. + EvidenceByAction(context.Context, *QueryEvidenceByActionRequest) (*QueryEvidenceByActionResponse, error) + // CurrentEpoch returns the current derived epoch boundaries at the current chain height. + CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) + // EpochAnchor returns the persisted epoch anchor for the given epoch_id. + EpochAnchor(context.Context, *QueryEpochAnchorRequest) (*QueryEpochAnchorResponse, error) + // CurrentEpochAnchor returns the persisted epoch anchor for the current epoch. + CurrentEpochAnchor(context.Context, *QueryCurrentEpochAnchorRequest) (*QueryCurrentEpochAnchorResponse, error) + // AssignedTargets returns the prober -> targets assignment for a given supernode_account. + // If filter_by_epoch_id is false, it returns the assignments for the current epoch. + AssignedTargets(context.Context, *QueryAssignedTargetsRequest) (*QueryAssignedTargetsResponse, error) + // EpochReport returns the submitted epoch report for (epoch_id, supernode_account). + EpochReport(context.Context, *QueryEpochReportRequest) (*QueryEpochReportResponse, error) + // EpochReportsByReporter returns epoch reports submitted by the given reporter across epochs. + EpochReportsByReporter(context.Context, *QueryEpochReportsByReporterRequest) (*QueryEpochReportsByReporterResponse, error) + // StorageChallengeReports returns all reports that include storage-challenge observations about the given supernode_account. + StorageChallengeReports(context.Context, *QueryStorageChallengeReportsRequest) (*QueryStorageChallengeReportsResponse, error) + // HostReports returns host reports submitted by the given supernode_account across epochs. + HostReports(context.Context, *QueryHostReportsRequest) (*QueryHostReportsResponse, error) + // NodeSuspicionState returns storage-truth node suspicion state for a supernode account. + NodeSuspicionState(context.Context, *QueryNodeSuspicionStateRequest) (*QueryNodeSuspicionStateResponse, error) + // ReporterReliabilityState returns storage-truth reporter reliability state for a reporter account. + ReporterReliabilityState(context.Context, *QueryReporterReliabilityStateRequest) (*QueryReporterReliabilityStateResponse, error) + // TicketDeteriorationState returns storage-truth ticket deterioration state for a ticket id. + TicketDeteriorationState(context.Context, *QueryTicketDeteriorationStateRequest) (*QueryTicketDeteriorationStateResponse, error) + // HealOp returns a single storage-truth heal operation by id. + HealOp(context.Context, *QueryHealOpRequest) (*QueryHealOpResponse, error) + // HealOpsByTicket returns storage-truth heal operations for a ticket id. + HealOpsByTicket(context.Context, *QueryHealOpsByTicketRequest) (*QueryHealOpsByTicketResponse, error) + // HealOpsByStatus returns storage-truth heal operations filtered by status. + HealOpsByStatus(context.Context, *QueryHealOpsByStatusRequest) (*QueryHealOpsByStatusResponse, error) } -func (m *QueryEpochAnchorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { } -func (m *QueryCurrentEpochAnchorRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } - -func (m *QueryCurrentEpochAnchorRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (*UnimplementedQueryServer) EvidenceById(ctx context.Context, req *QueryEvidenceByIdRequest) (*QueryEvidenceByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvidenceById not implemented") +} +func (*UnimplementedQueryServer) EvidenceBySubject(ctx context.Context, req *QueryEvidenceBySubjectRequest) (*QueryEvidenceBySubjectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvidenceBySubject not implemented") +} +func (*UnimplementedQueryServer) EvidenceByAction(ctx context.Context, req *QueryEvidenceByActionRequest) (*QueryEvidenceByActionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvidenceByAction not implemented") +} +func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") +} +func (*UnimplementedQueryServer) EpochAnchor(ctx context.Context, req *QueryEpochAnchorRequest) (*QueryEpochAnchorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EpochAnchor not implemented") +} +func (*UnimplementedQueryServer) CurrentEpochAnchor(ctx context.Context, req *QueryCurrentEpochAnchorRequest) (*QueryCurrentEpochAnchorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentEpochAnchor not implemented") +} +func (*UnimplementedQueryServer) AssignedTargets(ctx context.Context, req *QueryAssignedTargetsRequest) (*QueryAssignedTargetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssignedTargets not implemented") +} +func (*UnimplementedQueryServer) EpochReport(ctx context.Context, req *QueryEpochReportRequest) (*QueryEpochReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EpochReport not implemented") +} +func (*UnimplementedQueryServer) EpochReportsByReporter(ctx context.Context, req *QueryEpochReportsByReporterRequest) (*QueryEpochReportsByReporterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EpochReportsByReporter not implemented") +} +func (*UnimplementedQueryServer) StorageChallengeReports(ctx context.Context, req *QueryStorageChallengeReportsRequest) (*QueryStorageChallengeReportsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StorageChallengeReports not implemented") +} +func (*UnimplementedQueryServer) HostReports(ctx context.Context, req *QueryHostReportsRequest) (*QueryHostReportsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HostReports not implemented") +} +func (*UnimplementedQueryServer) NodeSuspicionState(ctx context.Context, req *QueryNodeSuspicionStateRequest) (*QueryNodeSuspicionStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NodeSuspicionState not implemented") +} +func (*UnimplementedQueryServer) ReporterReliabilityState(ctx context.Context, req *QueryReporterReliabilityStateRequest) (*QueryReporterReliabilityStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReporterReliabilityState not implemented") +} +func (*UnimplementedQueryServer) TicketDeteriorationState(ctx context.Context, req *QueryTicketDeteriorationStateRequest) (*QueryTicketDeteriorationStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TicketDeteriorationState not implemented") +} +func (*UnimplementedQueryServer) HealOp(ctx context.Context, req *QueryHealOpRequest) (*QueryHealOpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HealOp not implemented") +} +func (*UnimplementedQueryServer) HealOpsByTicket(ctx context.Context, req *QueryHealOpsByTicketRequest) (*QueryHealOpsByTicketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HealOpsByTicket not implemented") +} +func (*UnimplementedQueryServer) HealOpsByStatus(ctx context.Context, req *QueryHealOpsByStatusRequest) (*QueryHealOpsByStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HealOpsByStatus not implemented") } -func (m *QueryCurrentEpochAnchorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) } -func (m *QueryCurrentEpochAnchorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryCurrentEpochAnchorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryCurrentEpochAnchorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) +func _Query_EvidenceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEvidenceByIdRequest) + if err := dec(in); err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).EvidenceById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EvidenceById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EvidenceById(ctx, req.(*QueryEvidenceByIdRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAssignedTargetsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_EvidenceBySubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEvidenceBySubjectRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryAssignedTargetsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAssignedTargetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FilterByEpochId { - i-- - if m.FilterByEpochId { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 + if interceptor == nil { + return srv.(QueryServer).EvidenceBySubject(ctx, in) } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EvidenceBySubject", } - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0xa + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EvidenceBySubject(ctx, req.(*QueryEvidenceBySubjectRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *QueryAssignedTargetsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_EvidenceByAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEvidenceByActionRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil -} - -func (m *QueryAssignedTargetsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if interceptor == nil { + return srv.(QueryServer).EvidenceByAction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EvidenceByAction", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EvidenceByAction(ctx, req.(*QueryEvidenceByActionRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryAssignedTargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TargetSupernodeAccounts) > 0 { - for iNdEx := len(m.TargetSupernodeAccounts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TargetSupernodeAccounts[iNdEx]) - copy(dAtA[i:], m.TargetSupernodeAccounts[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TargetSupernodeAccounts[iNdEx]))) - i-- - dAtA[i] = 0x22 - } +func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentEpochRequest) + if err := dec(in); err != nil { + return nil, err } - if len(m.RequiredOpenPorts) > 0 { - dAtA10 := make([]byte, len(m.RequiredOpenPorts)*10) - var j9 int - for _, num := range m.RequiredOpenPorts { - for num >= 1<<7 { - dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j9++ - } - dAtA10[j9] = uint8(num) - j9++ - } - i -= j9 - copy(dAtA[i:], dAtA10[:j9]) - i = encodeVarintQuery(dAtA, i, uint64(j9)) - i-- - dAtA[i] = 0x1a + if interceptor == nil { + return srv.(QueryServer).CurrentEpoch(ctx, in) } - if m.EpochStartHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochStartHeight)) - i-- - dAtA[i] = 0x10 + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/CurrentEpoch", } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x8 + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) } - return len(dAtA) - i, nil + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_EpochAnchor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEpochAnchorRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).EpochAnchor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EpochAnchor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EpochAnchor(ctx, req.(*QueryEpochAnchorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_CurrentEpochAnchor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentEpochAnchorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentEpochAnchor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/CurrentEpochAnchor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentEpochAnchor(ctx, req.(*QueryCurrentEpochAnchorRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0x12 +func _Query_AssignedTargets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAssignedTargetsRequest) + if err := dec(in); err != nil { + return nil, err } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x8 + if interceptor == nil { + return srv.(QueryServer).AssignedTargets(ctx, in) } - return len(dAtA) - i, nil + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/AssignedTargets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AssignedTargets(ctx, req.(*QueryAssignedTargetsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { +func _Query_EpochReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEpochReportRequest) + if err := dec(in); err != nil { return nil, err } - return dAtA[:n], nil + if interceptor == nil { + return srv.(QueryServer).EpochReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EpochReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EpochReport(ctx, req.(*QueryEpochReportRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func _Query_EpochReportsByReporter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEpochReportsByReporterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EpochReportsByReporter(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/EpochReportsByReporter", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EpochReportsByReporter(ctx, req.(*QueryEpochReportsByReporterRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Report.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) +func _Query_StorageChallengeReports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStorageChallengeReportsRequest) + if err := dec(in); err != nil { + return nil, err } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if interceptor == nil { + return srv.(QueryServer).StorageChallengeReports(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/StorageChallengeReports", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).StorageChallengeReports(ctx, req.(*QueryStorageChallengeReportsRequest)) + } + return interceptor(ctx, in, info, handler) } -func (m *QueryEpochReportsByReporterRequest) Marshal() (dAtA []byte, err error) { +func _Query_HostReports_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHostReportsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HostReports(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/HostReports", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HostReports(ctx, req.(*QueryHostReportsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NodeSuspicionState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNodeSuspicionStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NodeSuspicionState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/NodeSuspicionState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NodeSuspicionState(ctx, req.(*QueryNodeSuspicionStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ReporterReliabilityState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReporterReliabilityStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReporterReliabilityState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/ReporterReliabilityState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReporterReliabilityState(ctx, req.(*QueryReporterReliabilityStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TicketDeteriorationState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTicketDeteriorationStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TicketDeteriorationState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/TicketDeteriorationState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TicketDeteriorationState(ctx, req.(*QueryTicketDeteriorationStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_HealOp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHealOpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HealOp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/HealOp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HealOp(ctx, req.(*QueryHealOpRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_HealOpsByTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHealOpsByTicketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HealOpsByTicket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/HealOpsByTicket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HealOpsByTicket(ctx, req.(*QueryHealOpsByTicketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_HealOpsByStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryHealOpsByStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).HealOpsByStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Query/HealOpsByStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).HealOpsByStatus(ctx, req.(*QueryHealOpsByStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var Query_serviceDesc = _Query_serviceDesc +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lumera.audit.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "EvidenceById", + Handler: _Query_EvidenceById_Handler, + }, + { + MethodName: "EvidenceBySubject", + Handler: _Query_EvidenceBySubject_Handler, + }, + { + MethodName: "EvidenceByAction", + Handler: _Query_EvidenceByAction_Handler, + }, + { + MethodName: "CurrentEpoch", + Handler: _Query_CurrentEpoch_Handler, + }, + { + MethodName: "EpochAnchor", + Handler: _Query_EpochAnchor_Handler, + }, + { + MethodName: "CurrentEpochAnchor", + Handler: _Query_CurrentEpochAnchor_Handler, + }, + { + MethodName: "AssignedTargets", + Handler: _Query_AssignedTargets_Handler, + }, + { + MethodName: "EpochReport", + Handler: _Query_EpochReport_Handler, + }, + { + MethodName: "EpochReportsByReporter", + Handler: _Query_EpochReportsByReporter_Handler, + }, + { + MethodName: "StorageChallengeReports", + Handler: _Query_StorageChallengeReports_Handler, + }, + { + MethodName: "HostReports", + Handler: _Query_HostReports_Handler, + }, + { + MethodName: "NodeSuspicionState", + Handler: _Query_NodeSuspicionState_Handler, + }, + { + MethodName: "ReporterReliabilityState", + Handler: _Query_ReporterReliabilityState_Handler, + }, + { + MethodName: "TicketDeteriorationState", + Handler: _Query_TicketDeteriorationState_Handler, + }, + { + MethodName: "HealOp", + Handler: _Query_HealOp_Handler, + }, + { + MethodName: "HealOpsByTicket", + Handler: _Query_HealOpsByTicket_Handler, + }, + { + MethodName: "HealOpsByStatus", + Handler: _Query_HealOpsByStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "lumera/audit/v1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2676,54 +2855,20 @@ func (m *QueryEpochReportsByReporterRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryEpochReportsByReporterRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEpochReportsByReporterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.FilterByEpochId { - i-- - if m.FilterByEpochId { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 - } - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *QueryEpochReportsByReporterResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2733,46 +2878,30 @@ func (m *QueryEpochReportsByReporterResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryEpochReportsByReporterResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEpochReportsByReporterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Reports) > 0 { - for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryStorageChallengeReportsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceByIdRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2782,54 +2911,25 @@ func (m *QueryStorageChallengeReportsRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryStorageChallengeReportsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceByIdRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStorageChallengeReportsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.FilterByEpochId { - i-- - if m.FilterByEpochId { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 - } - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + if m.EvidenceId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EvidenceId)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *StorageChallengeReport) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceByIdResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2839,55 +2939,30 @@ func (m *StorageChallengeReport) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StorageChallengeReport) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceByIdResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *StorageChallengeReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.PortStates) > 0 { - dAtA16 := make([]byte, len(m.PortStates)*10) - var j15 int - for _, num := range m.PortStates { - for num >= 1<<7 { - dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j15++ - } - dAtA16[j15] = uint8(num) - j15++ + { + size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i -= j15 - copy(dAtA[i:], dAtA16[:j15]) - i = encodeVarintQuery(dAtA, i, uint64(j15)) - i-- - dAtA[i] = 0x22 - } - if m.ReportHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ReportHeight)) - i-- - dAtA[i] = 0x18 - } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 - } - if len(m.ReporterSupernodeAccount) > 0 { - i -= len(m.ReporterSupernodeAccount) - copy(dAtA[i:], m.ReporterSupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ReporterSupernodeAccount))) - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryStorageChallengeReportsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceBySubjectRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2897,12 +2972,12 @@ func (m *QueryStorageChallengeReportsResponse) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryStorageChallengeReportsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceBySubjectRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStorageChallengeReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceBySubjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2919,24 +2994,17 @@ func (m *QueryStorageChallengeReportsResponse) MarshalToSizedBuffer(dAtA []byte) i-- dAtA[i] = 0x12 } - if len(m.Reports) > 0 { - for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if len(m.SubjectAddress) > 0 { + i -= len(m.SubjectAddress) + copy(dAtA[i:], m.SubjectAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SubjectAddress))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryHostReportsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceBySubjectResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2946,26 +3014,16 @@ func (m *QueryHostReportsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryHostReportsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceBySubjectResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryHostReportsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceBySubjectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.FilterByEpochId { - i-- - if m.FilterByEpochId { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -2976,24 +3034,26 @@ func (m *QueryHostReportsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0xa + if len(m.Evidence) > 0 { + for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *HostReportEntry) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceByActionRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3003,40 +3063,39 @@ func (m *HostReportEntry) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HostReportEntry) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceByActionRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HostReportEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceByActionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.HostReport.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.ReportHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ReportHeight)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.EpochId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + if len(m.ActionId) > 0 { + i -= len(m.ActionId) + copy(dAtA[i:], m.ActionId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ActionId))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryHostReportsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryEvidenceByActionResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3046,12 +3105,12 @@ func (m *QueryHostReportsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryHostReportsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryEvidenceByActionResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryHostReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryEvidenceByActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3068,10 +3127,10 @@ func (m *QueryHostReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x12 } - if len(m.Reports) > 0 { - for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Evidence) > 0 { + for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3085,452 +3144,2888 @@ func (m *QueryHostReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryCurrentEpochRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n + +func (m *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *QueryEvidenceByIdRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EvidenceId != 0 { - n += 1 + sovQuery(uint64(m.EvidenceId)) +func (m *QueryCurrentEpochResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *QueryEvidenceByIdResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Evidence.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEvidenceBySubjectRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SubjectAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.EpochEndHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochEndHeight)) + i-- + dAtA[i] = 0x18 } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.EpochStartHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochStartHeight)) + i-- + dAtA[i] = 0x10 } - return n + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *QueryEvidenceBySubjectResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Evidence) > 0 { - for _, e := range m.Evidence { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryEpochAnchorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *QueryEvidenceByActionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ActionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryEpochAnchorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEvidenceByActionResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEpochAnchorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Evidence) > 0 { - for _, e := range m.Evidence { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryCurrentEpochRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryEpochAnchorResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryCurrentEpochResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) - } - if m.EpochStartHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochStartHeight)) - } - if m.EpochEndHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochEndHeight)) - } - return n +func (m *QueryEpochAnchorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryEpochAnchorRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEpochAnchorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) + { + size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryEpochAnchorResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryCurrentEpochAnchorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.Anchor.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryCurrentEpochAnchorRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n +func (m *QueryCurrentEpochAnchorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCurrentEpochAnchorResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryCurrentEpochAnchorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Anchor.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return len(dAtA) - i, nil } -func (m *QueryAssignedTargetsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryCurrentEpochAnchorResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryCurrentEpochAnchorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentEpochAnchorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) - } - if m.FilterByEpochId { - n += 2 + { + size, err := m.Anchor.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryAssignedTargetsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryAssignedTargetsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) - } - if m.EpochStartHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochStartHeight)) - } - if len(m.RequiredOpenPorts) > 0 { - l = 0 - for _, e := range m.RequiredOpenPorts { - l += sovQuery(uint64(e)) - } - n += 1 + sovQuery(uint64(l)) + l - } - if len(m.TargetSupernodeAccounts) > 0 { - for _, s := range m.TargetSupernodeAccounts { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - return n + return dAtA[:n], nil } -func (m *QueryEpochReportRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAssignedTargetsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssignedTargetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l + if m.FilterByEpochId { + i-- + if m.FilterByEpochId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 } - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryEpochReportResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryAssignedTargetsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.Report.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryEpochReportsByReporterRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAssignedTargetsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAssignedTargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.TargetSupernodeAccounts) > 0 { + for iNdEx := len(m.TargetSupernodeAccounts) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TargetSupernodeAccounts[iNdEx]) + copy(dAtA[i:], m.TargetSupernodeAccounts[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TargetSupernodeAccounts[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) + if len(m.RequiredOpenPorts) > 0 { + dAtA10 := make([]byte, len(m.RequiredOpenPorts)*10) + var j9 int + for _, num := range m.RequiredOpenPorts { + for num >= 1<<7 { + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + dAtA10[j9] = uint8(num) + j9++ + } + i -= j9 + copy(dAtA[i:], dAtA10[:j9]) + i = encodeVarintQuery(dAtA, i, uint64(j9)) + i-- + dAtA[i] = 0x1a } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.EpochStartHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochStartHeight)) + i-- + dAtA[i] = 0x10 } - if m.FilterByEpochId { - n += 2 + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *QueryEpochReportsByReporterResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Reports) > 0 { - for _, e := range m.Reports { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) +func (m *QueryEpochReportRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *QueryStorageChallengeReportsRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryEpochReportRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEpochReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0x12 } if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.FilterByEpochId { - n += 2 + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *StorageChallengeReport) Size() (n int) { - if m == nil { - return 0 +func (m *QueryEpochReportResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryEpochReportResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEpochReportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ReporterSupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) - } - if m.ReportHeight != 0 { - n += 1 + sovQuery(uint64(m.ReportHeight)) - } - if len(m.PortStates) > 0 { - l = 0 - for _, e := range m.PortStates { - l += sovQuery(uint64(e)) + { + size, err := m.Report.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - n += 1 + sovQuery(uint64(l)) + l + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryStorageChallengeReportsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryEpochReportsByReporterRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryEpochReportsByReporterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEpochReportsByReporterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.Reports) > 0 { - for _, e := range m.Reports { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.FilterByEpochId { + i-- + if m.FilterByEpochId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } + i-- + dAtA[i] = 0x20 } if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return n + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryHostReportsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryEpochReportsByReporterResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryEpochReportsByReporterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEpochReportsByReporterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) + if len(m.Reports) > 0 { + for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *QueryStorageChallengeReportsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryStorageChallengeReportsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageChallengeReportsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if m.FilterByEpochId { - n += 2 + i-- + if m.FilterByEpochId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } - return n + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *HostReportEntry) Size() (n int) { - if m == nil { - return 0 +func (m *StorageChallengeReport) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *StorageChallengeReport) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StorageChallengeReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.EpochId != 0 { - n += 1 + sovQuery(uint64(m.EpochId)) + if len(m.PortStates) > 0 { + dAtA16 := make([]byte, len(m.PortStates)*10) + var j15 int + for _, num := range m.PortStates { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + i -= j15 + copy(dAtA[i:], dAtA16[:j15]) + i = encodeVarintQuery(dAtA, i, uint64(j15)) + i-- + dAtA[i] = 0x22 } if m.ReportHeight != 0 { - n += 1 + sovQuery(uint64(m.ReportHeight)) + i = encodeVarintQuery(dAtA, i, uint64(m.ReportHeight)) + i-- + dAtA[i] = 0x18 } - l = m.HostReport.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.ReporterSupernodeAccount) > 0 { + i -= len(m.ReporterSupernodeAccount) + copy(dAtA[i:], m.ReporterSupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ReporterSupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *QueryHostReportsResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryStorageChallengeReportsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *QueryStorageChallengeReportsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryStorageChallengeReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } if len(m.Reports) > 0 { - for _, e := range m.Reports { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryHostReportsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHostReportsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHostReportsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FilterByEpochId { + i-- + if m.FilterByEpochId { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HostReportEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HostReportEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HostReportEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.HostReport.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.ReportHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ReportHeight)) + i-- + dAtA[i] = 0x10 + } + if m.EpochId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryHostReportsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHostReportsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHostReportsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Reports) > 0 { + for iNdEx := len(m.Reports) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Reports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryNodeSuspicionStateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodeSuspicionStateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeSuspicionStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupernodeAccount) > 0 { + i -= len(m.SupernodeAccount) + copy(dAtA[i:], m.SupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryNodeSuspicionStateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryNodeSuspicionStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNodeSuspicionStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryReporterReliabilityStateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryReporterReliabilityStateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReporterReliabilityStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ReporterSupernodeAccount) > 0 { + i -= len(m.ReporterSupernodeAccount) + copy(dAtA[i:], m.ReporterSupernodeAccount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ReporterSupernodeAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryReporterReliabilityStateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryReporterReliabilityStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryReporterReliabilityStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryTicketDeteriorationStateRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTicketDeteriorationStateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTicketDeteriorationStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTicketDeteriorationStateResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTicketDeteriorationStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTicketDeteriorationStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryHealOpRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HealOpId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.HealOpId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryHealOpResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.HealOp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryHealOpsByTicketRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpsByTicketRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpsByTicketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryHealOpsByTicketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpsByTicketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpsByTicketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.HealOps) > 0 { + for iNdEx := len(m.HealOps) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HealOps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryHealOpsByStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpsByStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpsByStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryHealOpsByStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryHealOpsByStatusResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryHealOpsByStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.HealOps) > 0 { + for iNdEx := len(m.HealOps) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HealOps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryEvidenceByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EvidenceId != 0 { + n += 1 + sovQuery(uint64(m.EvidenceId)) + } + return n +} + +func (m *QueryEvidenceByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Evidence.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryEvidenceBySubjectRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SubjectAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEvidenceBySubjectResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEvidenceByActionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ActionId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEvidenceByActionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentEpochRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentEpochResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.EpochStartHeight != 0 { + n += 1 + sovQuery(uint64(m.EpochStartHeight)) + } + if m.EpochEndHeight != 0 { + n += 1 + sovQuery(uint64(m.EpochEndHeight)) + } + return n +} + +func (m *QueryEpochAnchorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + return n +} + +func (m *QueryEpochAnchorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Anchor.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryCurrentEpochAnchorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentEpochAnchorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Anchor.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAssignedTargetsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.FilterByEpochId { + n += 2 + } + return n +} + +func (m *QueryAssignedTargetsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.EpochStartHeight != 0 { + n += 1 + sovQuery(uint64(m.EpochStartHeight)) + } + if len(m.RequiredOpenPorts) > 0 { + l = 0 + for _, e := range m.RequiredOpenPorts { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + if len(m.TargetSupernodeAccounts) > 0 { + for _, s := range m.TargetSupernodeAccounts { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryEpochReportRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryEpochReportResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Report.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryEpochReportsByReporterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.FilterByEpochId { + n += 2 + } + return n +} + +func (m *QueryEpochReportsByReporterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reports) > 0 { + for _, e := range m.Reports { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStorageChallengeReportsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.FilterByEpochId { + n += 2 + } + return n +} + +func (m *StorageChallengeReport) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ReporterSupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.ReportHeight != 0 { + n += 1 + sovQuery(uint64(m.ReportHeight)) + } + if len(m.PortStates) > 0 { + l = 0 + for _, e := range m.PortStates { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } + return n +} + +func (m *QueryStorageChallengeReportsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reports) > 0 { + for _, e := range m.Reports { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHostReportsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.FilterByEpochId { + n += 2 + } + return n +} + +func (m *HostReportEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EpochId != 0 { + n += 1 + sovQuery(uint64(m.EpochId)) + } + if m.ReportHeight != 0 { + n += 1 + sovQuery(uint64(m.ReportHeight)) + } + l = m.HostReport.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryHostReportsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reports) > 0 { + for _, e := range m.Reports { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryNodeSuspicionStateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryNodeSuspicionStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryReporterReliabilityStateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ReporterSupernodeAccount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryReporterReliabilityStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryTicketDeteriorationStateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTicketDeteriorationStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.State.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryHealOpRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HealOpId != 0 { + n += 1 + sovQuery(uint64(m.HealOpId)) + } + return n +} + +func (m *QueryHealOpResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.HealOp.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryHealOpsByTicketRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHealOpsByTicketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.HealOps) > 0 { + for _, e := range m.HealOps { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHealOpsByStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryHealOpsByStatusResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.HealOps) > 0 { + for _, e := range m.HealOps { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceByIdRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceId", wireType) + } + m.EvidenceId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EvidenceId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceByIdResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceBySubjectRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceBySubjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceBySubjectResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceBySubjectResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceBySubjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Evidence = append(m.Evidence, Evidence{}) + if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceByActionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceByActionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEvidenceByActionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEvidenceByActionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEvidenceByActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Evidence = append(m.Evidence, Evidence{}) + if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentEpochRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCurrentEpochResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochStartHeight", wireType) + } + m.EpochStartHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochStartHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochEndHeight", wireType) + } + m.EpochEndHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochEndHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEpochAnchorRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEpochAnchorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEpochAnchorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryEpochAnchorResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryEpochAnchorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEpochAnchorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCurrentEpochAnchorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3553,10 +6048,10 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCurrentEpochAnchorRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCurrentEpochAnchorRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3580,7 +6075,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCurrentEpochAnchorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3603,15 +6098,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCurrentEpochAnchorResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCurrentEpochAnchorResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3638,7 +6133,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3663,7 +6158,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceByIdRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAssignedTargetsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3686,17 +6181,49 @@ func (m *QueryEvidenceByIdRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceByIdRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssignedTargetsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssignedTargetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) } - m.EvidenceId = 0 + m.EpochId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3706,11 +6233,31 @@ func (m *QueryEvidenceByIdRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EvidenceId |= uint64(b&0x7F) << shift + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3732,7 +6279,7 @@ func (m *QueryEvidenceByIdRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceByIdResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3755,17 +6302,131 @@ func (m *QueryEvidenceByIdResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceByIdResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAssignedTargetsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAssignedTargetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochStartHeight", wireType) + } + m.EpochStartHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochStartHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RequiredOpenPorts = append(m.RequiredOpenPorts, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.RequiredOpenPorts) == 0 { + m.RequiredOpenPorts = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RequiredOpenPorts = append(m.RequiredOpenPorts, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredOpenPorts", wireType) + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetSupernodeAccounts", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3775,24 +6436,23 @@ func (m *QueryEvidenceByIdResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if postIndex > l { + return io.ErrUnexpectedEOF } + m.TargetSupernodeAccounts = append(m.TargetSupernodeAccounts, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3815,7 +6475,7 @@ func (m *QueryEvidenceByIdResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { +func (m *QueryEpochReportRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3838,17 +6498,17 @@ func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceBySubjectRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochReportRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceBySubjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) } - var stringLen uint64 + m.EpochId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3858,29 +6518,16 @@ func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.EpochId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3890,27 +6537,23 @@ func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3933,7 +6576,7 @@ func (m *QueryEvidenceBySubjectRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceBySubjectResponse) Unmarshal(dAtA []byte) error { +func (m *QueryEpochReportResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3956,49 +6599,15 @@ func (m *QueryEvidenceBySubjectResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceBySubjectResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochReportResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceBySubjectResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Evidence = append(m.Evidence, Evidence{}) - if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Report", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4025,10 +6634,7 @@ func (m *QueryEvidenceBySubjectResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Report.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4053,7 +6659,7 @@ func (m *QueryEvidenceBySubjectResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { +func (m *QueryEpochReportsByReporterRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4076,15 +6682,15 @@ func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceByActionRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochReportsByReporterRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceByActionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochReportsByReporterRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4112,9 +6718,28 @@ func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ActionId = string(dAtA[iNdEx:postIndex]) + m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -4150,6 +6775,26 @@ func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4171,7 +6816,7 @@ func (m *QueryEvidenceByActionRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEvidenceByActionResponse) Unmarshal(dAtA []byte) error { +func (m *QueryEpochReportsByReporterResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4194,15 +6839,15 @@ func (m *QueryEvidenceByActionResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEvidenceByActionResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryEpochReportsByReporterResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEvidenceByActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryEpochReportsByReporterResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4229,8 +6874,8 @@ func (m *QueryEvidenceByActionResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Evidence = append(m.Evidence, Evidence{}) - if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Reports = append(m.Reports, EpochReport{}) + if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4291,7 +6936,7 @@ func (m *QueryEvidenceByActionResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error { +func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4314,63 +6959,45 @@ func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryStorageChallengeReportsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryStorageChallengeReportsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) } @@ -4389,11 +7016,11 @@ func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { break } } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochStartHeight", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - m.EpochStartHeight = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4403,16 +7030,33 @@ func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochStartHeight |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochEndHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) } - m.EpochEndHeight = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4422,11 +7066,12 @@ func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochEndHeight |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4448,7 +7093,7 @@ func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochAnchorRequest) Unmarshal(dAtA []byte) error { +func (m *StorageChallengeReport) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4471,13 +7116,45 @@ func (m *QueryEpochAnchorRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochAnchorRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StorageChallengeReport: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochAnchorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StorageChallengeReport: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReporterSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReporterSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) } @@ -4496,6 +7173,94 @@ func (m *QueryEpochAnchorRequest) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReportHeight", wireType) + } + m.ReportHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReportHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType == 0 { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PortStates = append(m.PortStates, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.PortStates) == 0 { + m.PortStates = make([]PortState, 0, elementCount) + } + for iNdEx < postIndex { + var v PortState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PortState(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PortStates = append(m.PortStates, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field PortStates", wireType) + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4517,7 +7282,7 @@ func (m *QueryEpochAnchorRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochAnchorResponse) Unmarshal(dAtA []byte) error { +func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4540,15 +7305,15 @@ func (m *QueryEpochAnchorResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochAnchorResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryStorageChallengeReportsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochAnchorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryStorageChallengeReportsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4575,113 +7340,14 @@ func (m *QueryEpochAnchorResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Reports = append(m.Reports, StorageChallengeReport{}) + if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCurrentEpochAnchorRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochAnchorRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochAnchorRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCurrentEpochAnchorResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochAnchorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochAnchorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4708,7 +7374,10 @@ func (m *QueryCurrentEpochAnchorResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Anchor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4733,7 +7402,7 @@ func (m *QueryCurrentEpochAnchorResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAssignedTargetsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4756,10 +7425,10 @@ func (m *QueryAssignedTargetsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAssignedTargetsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHostReportsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAssignedTargetsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHostReportsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4814,6 +7483,42 @@ func (m *QueryAssignedTargetsRequest) Unmarshal(dAtA []byte) error { } } case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) } @@ -4854,7 +7559,7 @@ func (m *QueryAssignedTargetsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { +func (m *HostReportEntry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4877,10 +7582,10 @@ func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAssignedTargetsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: HostReportEntry: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAssignedTargetsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HostReportEntry: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4904,9 +7609,9 @@ func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochStartHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReportHeight", wireType) } - m.EpochStartHeight = 0 + m.ReportHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4916,92 +7621,133 @@ func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochStartHeight |= int64(b&0x7F) << shift + m.ReportHeight |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostReport", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery } - m.RequiredOpenPorts = append(m.RequiredOpenPorts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if packedLen < 0 { - return ErrInvalidLengthQuery + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthQuery + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.HostReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHostReportsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHostReportsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHostReportsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.RequiredOpenPorts) == 0 { - m.RequiredOpenPorts = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RequiredOpenPorts = append(m.RequiredOpenPorts, v) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field RequiredOpenPorts", wireType) } - case 4: + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reports = append(m.Reports, HostReportEntry{}) + if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetSupernodeAccounts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5011,23 +7757,27 @@ func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.TargetSupernodeAccounts = append(m.TargetSupernodeAccounts, string(dAtA[iNdEx:postIndex])) + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5050,7 +7800,7 @@ func (m *QueryAssignedTargetsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochReportRequest) Unmarshal(dAtA []byte) error { +func (m *QueryNodeSuspicionStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5073,32 +7823,13 @@ func (m *QueryEpochReportRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochReportRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNodeSuspicionStateRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNodeSuspicionStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) - } - m.EpochId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) } @@ -5151,7 +7882,7 @@ func (m *QueryEpochReportRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochReportResponse) Unmarshal(dAtA []byte) error { +func (m *QueryNodeSuspicionStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5174,15 +7905,15 @@ func (m *QueryEpochReportResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochReportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryNodeSuspicionStateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryNodeSuspicionStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Report", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5209,7 +7940,7 @@ func (m *QueryEpochReportResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Report.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5234,7 +7965,7 @@ func (m *QueryEpochReportResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochReportsByReporterRequest) Unmarshal(dAtA []byte) error { +func (m *QueryReporterReliabilityStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5257,15 +7988,15 @@ func (m *QueryEpochReportsByReporterRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochReportsByReporterRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryReporterReliabilityStateRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochReportsByReporterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryReporterReliabilityStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReporterSupernodeAccount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5293,83 +8024,8 @@ func (m *QueryEpochReportsByReporterRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) - } - m.EpochId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ReporterSupernodeAccount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5391,7 +8047,7 @@ func (m *QueryEpochReportsByReporterRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryEpochReportsByReporterResponse) Unmarshal(dAtA []byte) error { +func (m *QueryReporterReliabilityStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5414,49 +8070,15 @@ func (m *QueryEpochReportsByReporterResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryEpochReportsByReporterResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryReporterReliabilityStateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochReportsByReporterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryReporterReliabilityStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reports = append(m.Reports, EpochReport{}) - if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5483,10 +8105,7 @@ func (m *QueryEpochReportsByReporterResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5511,7 +8130,7 @@ func (m *QueryEpochReportsByReporterResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTicketDeteriorationStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5534,15 +8153,15 @@ func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStorageChallengeReportsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTicketDeteriorationStateRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStorageChallengeReportsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTicketDeteriorationStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5570,30 +8189,61 @@ func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) + m.TicketId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err } - m.EpochId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery } - case 3: + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTicketDeteriorationStateResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTicketDeteriorationStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTicketDeteriorationStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5620,18 +8270,65 @@ func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} + if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 4: + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryHealOpRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryHealOpRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryHealOpRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealOpId", wireType) } - var v int + m.HealOpId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5641,12 +8338,11 @@ func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.HealOpId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5668,7 +8364,7 @@ func (m *QueryStorageChallengeReportsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *StorageChallengeReport) Unmarshal(dAtA []byte) error { +func (m *QueryHealOpResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5691,17 +8387,17 @@ func (m *StorageChallengeReport) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StorageChallengeReport: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHealOpResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StorageChallengeReport: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHealOpResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReporterSupernodeAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealOp", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5711,131 +8407,25 @@ func (m *StorageChallengeReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.ReporterSupernodeAccount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) - } - m.EpochId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportHeight", wireType) - } - m.ReportHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReportHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType == 0 { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PortStates = append(m.PortStates, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.PortStates) == 0 { - m.PortStates = make([]PortState, 0, elementCount) - } - for iNdEx < postIndex { - var v PortState - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PortState(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PortStates = append(m.PortStates, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field PortStates", wireType) + if err := m.HealOp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5857,7 +8447,7 @@ func (m *StorageChallengeReport) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryHealOpsByTicketRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5880,17 +8470,17 @@ func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStorageChallengeReportsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHealOpsByTicketRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStorageChallengeReportsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHealOpsByTicketRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5900,25 +8490,23 @@ func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Reports = append(m.Reports, StorageChallengeReport{}) - if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TicketId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -5950,7 +8538,7 @@ func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pagination == nil { - m.Pagination = &query.PageResponse{} + m.Pagination = &query.PageRequest{} } if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -5977,7 +8565,7 @@ func (m *QueryStorageChallengeReportsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryHealOpsByTicketResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6000,17 +8588,17 @@ func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryHostReportsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHealOpsByTicketResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryHostReportsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHealOpsByTicketResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealOps", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6020,44 +8608,27 @@ func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) + m.HealOps = append(m.HealOps, HealOp{}) + if err := m.HealOps[len(m.HealOps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) - } - m.EpochId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -6087,32 +8658,12 @@ func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pagination == nil { - m.Pagination = &query.PageRequest{} + m.Pagination = &query.PageResponse{} } if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilterByEpochId", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FilterByEpochId = bool(v != 0) default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -6134,7 +8685,7 @@ func (m *QueryHostReportsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *HostReportEntry) Unmarshal(dAtA []byte) error { +func (m *QueryHealOpsByStatusRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6157,17 +8708,17 @@ func (m *HostReportEntry) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HostReportEntry: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHealOpsByStatusRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HostReportEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHealOpsByStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.EpochId = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6177,33 +8728,14 @@ func (m *HostReportEntry) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift + m.Status |= HealOpStatus(b&0x7F) << shift if b < 0x80 { break } } case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportHeight", wireType) - } - m.ReportHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReportHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostReport", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6230,7 +8762,10 @@ func (m *HostReportEntry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.HostReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6255,7 +8790,7 @@ func (m *HostReportEntry) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryHostReportsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryHealOpsByStatusResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6278,15 +8813,15 @@ func (m *QueryHostReportsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryHostReportsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryHealOpsByStatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryHostReportsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryHealOpsByStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reports", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealOps", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6313,8 +8848,8 @@ func (m *QueryHostReportsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Reports = append(m.Reports, HostReportEntry{}) - if err := m.Reports[len(m.Reports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.HealOps = append(m.HealOps, HealOp{}) + if err := m.HealOps[len(m.HealOps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/audit/v1/types/query.pb.gw.go b/x/audit/v1/types/query.pb.gw.go index c6d74dd6..f1b42845 100644 --- a/x/audit/v1/types/query.pb.gw.go +++ b/x/audit/v1/types/query.pb.gw.go @@ -703,6 +703,372 @@ func local_request_Query_HostReports_0(ctx context.Context, marshaler runtime.Ma } +func request_Query_NodeSuspicionState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeSuspicionStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["supernode_account"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supernode_account") + } + + protoReq.SupernodeAccount, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supernode_account", err) + } + + msg, err := client.NodeSuspicionState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NodeSuspicionState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNodeSuspicionStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["supernode_account"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supernode_account") + } + + protoReq.SupernodeAccount, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supernode_account", err) + } + + msg, err := server.NodeSuspicionState(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ReporterReliabilityState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporterReliabilityStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["reporter_supernode_account"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reporter_supernode_account") + } + + protoReq.ReporterSupernodeAccount, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reporter_supernode_account", err) + } + + msg, err := client.ReporterReliabilityState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ReporterReliabilityState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryReporterReliabilityStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["reporter_supernode_account"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reporter_supernode_account") + } + + protoReq.ReporterSupernodeAccount, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reporter_supernode_account", err) + } + + msg, err := server.ReporterReliabilityState(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TicketDeteriorationState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTicketDeteriorationStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ticket_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ticket_id") + } + + protoReq.TicketId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ticket_id", err) + } + + msg, err := client.TicketDeteriorationState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TicketDeteriorationState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTicketDeteriorationStateRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ticket_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ticket_id") + } + + protoReq.TicketId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ticket_id", err) + } + + msg, err := server.TicketDeteriorationState(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_HealOp_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["heal_op_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "heal_op_id") + } + + protoReq.HealOpId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "heal_op_id", err) + } + + msg, err := client.HealOp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_HealOp_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["heal_op_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "heal_op_id") + } + + protoReq.HealOpId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "heal_op_id", err) + } + + msg, err := server.HealOp(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_HealOpsByTicket_0 = &utilities.DoubleArray{Encoding: map[string]int{"ticket_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_HealOpsByTicket_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpsByTicketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ticket_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ticket_id") + } + + protoReq.TicketId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ticket_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HealOpsByTicket_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.HealOpsByTicket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_HealOpsByTicket_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpsByTicketRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["ticket_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "ticket_id") + } + + protoReq.TicketId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "ticket_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HealOpsByTicket_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.HealOpsByTicket(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_HealOpsByStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{"status": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_HealOpsByStatus_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpsByStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, HealOpStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = HealOpStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HealOpsByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.HealOpsByStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_HealOpsByStatus_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryHealOpsByStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["status"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "status") + } + + e, err = runtime.Enum(val, HealOpStatus_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "status", err) + } + + protoReq.Status = HealOpStatus(e) + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HealOpsByStatus_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.HealOpsByStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -985,6 +1351,144 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_NodeSuspicionState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_NodeSuspicionState_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NodeSuspicionState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ReporterReliabilityState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ReporterReliabilityState_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ReporterReliabilityState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TicketDeteriorationState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TicketDeteriorationState_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TicketDeteriorationState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_HealOp_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOpsByTicket_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_HealOpsByTicket_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOpsByTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOpsByStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_HealOpsByStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOpsByStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1266,6 +1770,126 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_NodeSuspicionState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_NodeSuspicionState_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NodeSuspicionState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ReporterReliabilityState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ReporterReliabilityState_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ReporterReliabilityState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TicketDeteriorationState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TicketDeteriorationState_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TicketDeteriorationState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOp_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_HealOp_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOpsByTicket_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_HealOpsByTicket_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOpsByTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_HealOpsByStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_HealOpsByStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_HealOpsByStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1293,6 +1917,18 @@ var ( pattern_Query_StorageChallengeReports_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "storage_challenge_reports", "supernode_account"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_HostReports_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "host_reports", "supernode_account"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_NodeSuspicionState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "node_suspicion_state", "supernode_account"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ReporterReliabilityState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "reporter_reliability_state", "reporter_supernode_account"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TicketDeteriorationState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "ticket_deterioration_state", "ticket_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_HealOp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"LumeraProtocol", "lumera", "audit", "v1", "heal_op", "heal_op_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_HealOpsByTicket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"LumeraProtocol", "lumera", "audit", "v1", "heal_ops", "by_ticket", "ticket_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_HealOpsByStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"LumeraProtocol", "lumera", "audit", "v1", "heal_ops", "by_status", "status"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1319,4 +1955,16 @@ var ( forward_Query_StorageChallengeReports_0 = runtime.ForwardResponseMessage forward_Query_HostReports_0 = runtime.ForwardResponseMessage + + forward_Query_NodeSuspicionState_0 = runtime.ForwardResponseMessage + + forward_Query_ReporterReliabilityState_0 = runtime.ForwardResponseMessage + + forward_Query_TicketDeteriorationState_0 = runtime.ForwardResponseMessage + + forward_Query_HealOp_0 = runtime.ForwardResponseMessage + + forward_Query_HealOpsByTicket_0 = runtime.ForwardResponseMessage + + forward_Query_HealOpsByStatus_0 = runtime.ForwardResponseMessage ) diff --git a/x/audit/v1/types/tx.pb.go b/x/audit/v1/types/tx.pb.go index 6784b86b..804c668b 100644 --- a/x/audit/v1/types/tx.pb.go +++ b/x/audit/v1/types/tx.pb.go @@ -346,6 +346,368 @@ func (m *MsgSubmitEvidenceResponse) GetEvidenceId() uint64 { return 0 } +type MsgSubmitStorageRecheckEvidence struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + EpochId uint64 `protobuf:"varint,2,opt,name=epoch_id,json=epochId,proto3" json:"epoch_id,omitempty"` + ChallengedSupernodeAccount string `protobuf:"bytes,3,opt,name=challenged_supernode_account,json=challengedSupernodeAccount,proto3" json:"challenged_supernode_account,omitempty"` + TicketId string `protobuf:"bytes,4,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + ChallengedResultTranscriptHash string `protobuf:"bytes,5,opt,name=challenged_result_transcript_hash,json=challengedResultTranscriptHash,proto3" json:"challenged_result_transcript_hash,omitempty"` + RecheckTranscriptHash string `protobuf:"bytes,6,opt,name=recheck_transcript_hash,json=recheckTranscriptHash,proto3" json:"recheck_transcript_hash,omitempty"` + RecheckResultClass StorageProofResultClass `protobuf:"varint,7,opt,name=recheck_result_class,json=recheckResultClass,proto3,enum=lumera.audit.v1.StorageProofResultClass" json:"recheck_result_class,omitempty"` + Details string `protobuf:"bytes,8,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *MsgSubmitStorageRecheckEvidence) Reset() { *m = MsgSubmitStorageRecheckEvidence{} } +func (m *MsgSubmitStorageRecheckEvidence) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitStorageRecheckEvidence) ProtoMessage() {} +func (*MsgSubmitStorageRecheckEvidence) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{6} +} +func (m *MsgSubmitStorageRecheckEvidence) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitStorageRecheckEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitStorageRecheckEvidence.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitStorageRecheckEvidence) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitStorageRecheckEvidence.Merge(m, src) +} +func (m *MsgSubmitStorageRecheckEvidence) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitStorageRecheckEvidence) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitStorageRecheckEvidence.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitStorageRecheckEvidence proto.InternalMessageInfo + +func (m *MsgSubmitStorageRecheckEvidence) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgSubmitStorageRecheckEvidence) GetEpochId() uint64 { + if m != nil { + return m.EpochId + } + return 0 +} + +func (m *MsgSubmitStorageRecheckEvidence) GetChallengedSupernodeAccount() string { + if m != nil { + return m.ChallengedSupernodeAccount + } + return "" +} + +func (m *MsgSubmitStorageRecheckEvidence) GetTicketId() string { + if m != nil { + return m.TicketId + } + return "" +} + +func (m *MsgSubmitStorageRecheckEvidence) GetChallengedResultTranscriptHash() string { + if m != nil { + return m.ChallengedResultTranscriptHash + } + return "" +} + +func (m *MsgSubmitStorageRecheckEvidence) GetRecheckTranscriptHash() string { + if m != nil { + return m.RecheckTranscriptHash + } + return "" +} + +func (m *MsgSubmitStorageRecheckEvidence) GetRecheckResultClass() StorageProofResultClass { + if m != nil { + return m.RecheckResultClass + } + return StorageProofResultClass_STORAGE_PROOF_RESULT_CLASS_UNSPECIFIED +} + +func (m *MsgSubmitStorageRecheckEvidence) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +type MsgSubmitStorageRecheckEvidenceResponse struct { +} + +func (m *MsgSubmitStorageRecheckEvidenceResponse) Reset() { + *m = MsgSubmitStorageRecheckEvidenceResponse{} +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitStorageRecheckEvidenceResponse) ProtoMessage() {} +func (*MsgSubmitStorageRecheckEvidenceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{7} +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitStorageRecheckEvidenceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitStorageRecheckEvidenceResponse.Merge(m, src) +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitStorageRecheckEvidenceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitStorageRecheckEvidenceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitStorageRecheckEvidenceResponse proto.InternalMessageInfo + +type MsgClaimHealComplete struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + HealOpId uint64 `protobuf:"varint,2,opt,name=heal_op_id,json=healOpId,proto3" json:"heal_op_id,omitempty"` + TicketId string `protobuf:"bytes,3,opt,name=ticket_id,json=ticketId,proto3" json:"ticket_id,omitempty"` + HealManifestHash string `protobuf:"bytes,4,opt,name=heal_manifest_hash,json=healManifestHash,proto3" json:"heal_manifest_hash,omitempty"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *MsgClaimHealComplete) Reset() { *m = MsgClaimHealComplete{} } +func (m *MsgClaimHealComplete) String() string { return proto.CompactTextString(m) } +func (*MsgClaimHealComplete) ProtoMessage() {} +func (*MsgClaimHealComplete) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{8} +} +func (m *MsgClaimHealComplete) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimHealComplete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimHealComplete.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgClaimHealComplete) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimHealComplete.Merge(m, src) +} +func (m *MsgClaimHealComplete) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimHealComplete) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimHealComplete.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimHealComplete proto.InternalMessageInfo + +func (m *MsgClaimHealComplete) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgClaimHealComplete) GetHealOpId() uint64 { + if m != nil { + return m.HealOpId + } + return 0 +} + +func (m *MsgClaimHealComplete) GetTicketId() string { + if m != nil { + return m.TicketId + } + return "" +} + +func (m *MsgClaimHealComplete) GetHealManifestHash() string { + if m != nil { + return m.HealManifestHash + } + return "" +} + +func (m *MsgClaimHealComplete) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +type MsgClaimHealCompleteResponse struct { +} + +func (m *MsgClaimHealCompleteResponse) Reset() { *m = MsgClaimHealCompleteResponse{} } +func (m *MsgClaimHealCompleteResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimHealCompleteResponse) ProtoMessage() {} +func (*MsgClaimHealCompleteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{9} +} +func (m *MsgClaimHealCompleteResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimHealCompleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimHealCompleteResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgClaimHealCompleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimHealCompleteResponse.Merge(m, src) +} +func (m *MsgClaimHealCompleteResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimHealCompleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimHealCompleteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimHealCompleteResponse proto.InternalMessageInfo + +type MsgSubmitHealVerification struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + HealOpId uint64 `protobuf:"varint,2,opt,name=heal_op_id,json=healOpId,proto3" json:"heal_op_id,omitempty"` + Verified bool `protobuf:"varint,3,opt,name=verified,proto3" json:"verified,omitempty"` + VerificationHash string `protobuf:"bytes,4,opt,name=verification_hash,json=verificationHash,proto3" json:"verification_hash,omitempty"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (m *MsgSubmitHealVerification) Reset() { *m = MsgSubmitHealVerification{} } +func (m *MsgSubmitHealVerification) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitHealVerification) ProtoMessage() {} +func (*MsgSubmitHealVerification) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{10} +} +func (m *MsgSubmitHealVerification) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitHealVerification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitHealVerification.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitHealVerification) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitHealVerification.Merge(m, src) +} +func (m *MsgSubmitHealVerification) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitHealVerification) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitHealVerification.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitHealVerification proto.InternalMessageInfo + +func (m *MsgSubmitHealVerification) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgSubmitHealVerification) GetHealOpId() uint64 { + if m != nil { + return m.HealOpId + } + return 0 +} + +func (m *MsgSubmitHealVerification) GetVerified() bool { + if m != nil { + return m.Verified + } + return false +} + +func (m *MsgSubmitHealVerification) GetVerificationHash() string { + if m != nil { + return m.VerificationHash + } + return "" +} + +func (m *MsgSubmitHealVerification) GetDetails() string { + if m != nil { + return m.Details + } + return "" +} + +type MsgSubmitHealVerificationResponse struct { +} + +func (m *MsgSubmitHealVerificationResponse) Reset() { *m = MsgSubmitHealVerificationResponse{} } +func (m *MsgSubmitHealVerificationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSubmitHealVerificationResponse) ProtoMessage() {} +func (*MsgSubmitHealVerificationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4b5ba410ad359f63, []int{11} +} +func (m *MsgSubmitHealVerificationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSubmitHealVerificationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSubmitHealVerificationResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSubmitHealVerificationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSubmitHealVerificationResponse.Merge(m, src) +} +func (m *MsgSubmitHealVerificationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSubmitHealVerificationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSubmitHealVerificationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSubmitHealVerificationResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "lumera.audit.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lumera.audit.v1.MsgUpdateParamsResponse") @@ -353,53 +715,82 @@ func init() { proto.RegisterType((*MsgSubmitEpochReportResponse)(nil), "lumera.audit.v1.MsgSubmitEpochReportResponse") proto.RegisterType((*MsgSubmitEvidence)(nil), "lumera.audit.v1.MsgSubmitEvidence") proto.RegisterType((*MsgSubmitEvidenceResponse)(nil), "lumera.audit.v1.MsgSubmitEvidenceResponse") + proto.RegisterType((*MsgSubmitStorageRecheckEvidence)(nil), "lumera.audit.v1.MsgSubmitStorageRecheckEvidence") + proto.RegisterType((*MsgSubmitStorageRecheckEvidenceResponse)(nil), "lumera.audit.v1.MsgSubmitStorageRecheckEvidenceResponse") + proto.RegisterType((*MsgClaimHealComplete)(nil), "lumera.audit.v1.MsgClaimHealComplete") + proto.RegisterType((*MsgClaimHealCompleteResponse)(nil), "lumera.audit.v1.MsgClaimHealCompleteResponse") + proto.RegisterType((*MsgSubmitHealVerification)(nil), "lumera.audit.v1.MsgSubmitHealVerification") + proto.RegisterType((*MsgSubmitHealVerificationResponse)(nil), "lumera.audit.v1.MsgSubmitHealVerificationResponse") } func init() { proto.RegisterFile("lumera/audit/v1/tx.proto", fileDescriptor_4b5ba410ad359f63) } var fileDescriptor_4b5ba410ad359f63 = []byte{ - // 652 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x8e, 0xd3, 0xf4, 0x47, 0x5e, 0x4a, 0x4b, 0x4f, 0x95, 0xea, 0xb8, 0xc5, 0x0d, 0x91, 0x90, - 0xa2, 0x88, 0x26, 0x6a, 0x40, 0x0c, 0x15, 0x4b, 0x8d, 0x90, 0xe8, 0x50, 0x81, 0x5c, 0x58, 0xba, - 0x98, 0x8b, 0x7d, 0x72, 0x8c, 0x6a, 0x9f, 0x75, 0x77, 0x89, 0xda, 0x0d, 0x31, 0x32, 0xb1, 0xf0, - 0x3f, 0x20, 0xb1, 0x74, 0x80, 0x89, 0x7f, 0xa0, 0x63, 0xc5, 0xc4, 0x84, 0x50, 0x3b, 0xf4, 0xdf, - 0x40, 0xbe, 0xb3, 0x93, 0x62, 0x97, 0x16, 0xb1, 0x44, 0xbe, 0xf7, 0x7d, 0xdf, 0xbb, 0xef, 0x7d, - 0x79, 0x36, 0xe8, 0x07, 0xc3, 0x90, 0x30, 0xdc, 0xc5, 0x43, 0x2f, 0x10, 0xdd, 0xd1, 0x66, 0x57, - 0x1c, 0x76, 0x62, 0x46, 0x05, 0x45, 0x8b, 0x0a, 0xe9, 0x48, 0xa4, 0x33, 0xda, 0x34, 0x96, 0x70, - 0x18, 0x44, 0xb4, 0x2b, 0x7f, 0x15, 0xc7, 0x58, 0xf6, 0xa9, 0x4f, 0xe5, 0x63, 0x37, 0x79, 0x4a, - 0xab, 0x2b, 0x2e, 0xe5, 0x21, 0xe5, 0xdd, 0x90, 0xfb, 0x49, 0xc7, 0x90, 0xfb, 0x29, 0x50, 0x57, - 0x80, 0xa3, 0x14, 0xea, 0x90, 0x42, 0xab, 0x79, 0x1f, 0xea, 0x5a, 0x05, 0xae, 0xe5, 0xc1, 0x18, - 0x33, 0x1c, 0x66, 0x52, 0x33, 0x8f, 0x92, 0x51, 0xe0, 0x91, 0xc8, 0x25, 0x0a, 0x6f, 0x7e, 0xd3, - 0x60, 0x71, 0x97, 0xfb, 0xaf, 0x62, 0x0f, 0x0b, 0xf2, 0x42, 0x2a, 0xd1, 0x23, 0xa8, 0xe2, 0xa1, - 0x18, 0x50, 0x16, 0x88, 0x23, 0x5d, 0x6b, 0x68, 0xad, 0xaa, 0xa5, 0x7f, 0xff, 0xb2, 0xb1, 0x9c, - 0x7a, 0xda, 0xf6, 0x3c, 0x46, 0x38, 0xdf, 0x13, 0x2c, 0x88, 0x7c, 0x7b, 0x42, 0x45, 0x5b, 0x30, - 0xa3, 0xee, 0xd6, 0xcb, 0x0d, 0xad, 0x55, 0xeb, 0xad, 0x74, 0x72, 0x29, 0x75, 0xd4, 0x05, 0x56, - 0xf5, 0xe4, 0xe7, 0x7a, 0xe9, 0xd3, 0xc5, 0x71, 0x5b, 0xb3, 0x53, 0xc5, 0xd6, 0xc3, 0x77, 0x17, - 0xc7, 0xed, 0x49, 0xaf, 0xf7, 0x17, 0xc7, 0xed, 0xbb, 0xa9, 0xf5, 0xc3, 0x89, 0xf9, 0x9c, 0xd3, - 0x66, 0x1d, 0x56, 0x72, 0x25, 0x9b, 0xf0, 0x98, 0x46, 0x9c, 0x34, 0x3f, 0x97, 0x61, 0x79, 0x97, - 0xfb, 0x7b, 0x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x55, 0xec, 0x26, 0x49, 0x24, 0x7f, - 0x69, 0x25, 0x31, 0x60, 0xcf, 0xa9, 0xc2, 0x8e, 0x87, 0x0c, 0x98, 0x0b, 0x89, 0xc0, 0x1e, 0x16, - 0x58, 0x9f, 0x56, 0x58, 0x76, 0xce, 0xe5, 0xf6, 0x18, 0xea, 0x85, 0x58, 0xb2, 0xd0, 0xd0, 0x3a, - 0xd4, 0xc6, 0x3e, 0x03, 0x4f, 0x46, 0x54, 0xb1, 0x21, 0x2b, 0xed, 0x78, 0xbd, 0xaf, 0x65, 0x98, - 0xda, 0xe5, 0x3e, 0xda, 0x87, 0xf9, 0x3f, 0x5e, 0xc0, 0x46, 0x61, 0x92, 0xdc, 0x96, 0x1b, 0xad, - 0x9b, 0x18, 0x63, 0x13, 0x01, 0x2c, 0x15, 0xdf, 0x81, 0x7b, 0x57, 0xc9, 0x0b, 0x34, 0x63, 0xe3, - 0x9f, 0x68, 0xe3, 0xab, 0x5e, 0xc3, 0x42, 0x6e, 0x41, 0x9a, 0xd7, 0x34, 0x48, 0x39, 0x46, 0xfb, - 0x66, 0x4e, 0x76, 0x83, 0x31, 0xfd, 0x36, 0xf9, 0x68, 0x58, 0xed, 0x93, 0x33, 0x53, 0x3b, 0x3d, - 0x33, 0xb5, 0x5f, 0x67, 0xa6, 0xf6, 0xe1, 0xdc, 0x2c, 0x9d, 0x9e, 0x9b, 0xa5, 0x1f, 0xe7, 0x66, - 0x69, 0xff, 0xf6, 0xa5, 0x8f, 0x45, 0xb2, 0x1a, 0xbc, 0x3f, 0x23, 0xbf, 0x73, 0x0f, 0x7e, 0x07, - 0x00, 0x00, 0xff, 0xff, 0x08, 0x61, 0x98, 0x8b, 0xcc, 0x05, 0x00, 0x00, + // 1013 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x4e, 0xe3, 0x46, + 0x18, 0xc7, 0x24, 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83, 0xcc, 0xa7, 0xff, 0x4b, 0xe3, 0x29, 0xe3, 0xfa, + 0x3d, 0xa8, 0xa7, 0x23, 0x66, 0x19, 0x74, 0x10, 0x22, 0x12, 0x60, 0x0b, 0x19, 0xd0, 0x34, 0xf1, + 0x20, 0x10, 0xf3, 0x5b, 0xed, 0x6d, 0xbc, 0x7a, 0xbe, 0x53, 0x4b, 0x72, 0x98, 0xe6, 0xcd, 0x34, + 0xea, 0x28, 0xc0, 0x51, 0xc2, 0xdf, 0x13, 0xf4, 0x48, 0x56, 0xe6, 0x9a, 0x4f, 0x11, 0xcb, 0xc8, + 0x2a, 0x0c, 0x7d, 0x4b, 0xee, 0x83, 0xed, 0x4c, 0x6e, 0x82, 0xe8, 0xc0, 0x63, 0x06, 0x23, 0x30, + 0xa0, 0x26, 0x71, 0x43, 0x66, 0x38, 0x90, 0x3a, 0xb1, 0xde, 0xda, 0x08, 0xa8, 0x73, 0xdc, 0x93, + 0x14, 0x76, 0x00, 0xa9, 0x23, 0x3f, 0x04, 0x35, 0x22, 0x84, 0x2a, 0x04, 0x98, 0xe7, 0x01, 0xde, + 0x8f, 0xdd, 0x39, 0xde, 0x31, 0x58, 0x4b, 0x78, 0x71, 0x7e, 0xd3, 0x83, 0x94, 0x2a, 0x0b, 0x7c, + 0x82, 0x9a, 0x93, 0xce, 0xd7, 0x63, 0x82, 0xf1, 0xa9, 0x28, 0x64, 0x3f, 0xc2, 0xeb, 0x72, 0x1c, + 0x25, 0x63, 0x93, 0x15, 0xb0, 0x60, 0x21, 0x06, 0x5d, 0x8f, 0x2a, 0x15, 0x5e, 0x43, 0xb2, 0xcc, + 0xcd, 0xcc, 0xa7, 0xe0, 0x93, 0x5b, 0x36, 0x3d, 0x3d, 0x76, 0x7f, 0x4b, 0xfc, 0x12, 0xdb, 0xf7, + 0xa0, 0xeb, 0x1f, 0x20, 0xe8, 0xed, 0x63, 0x3f, 0xf4, 0x10, 0xbb, 0xdb, 0x54, 0xd4, 0x01, 0x70,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0x5e, 0xd9, 0x89, 0xc7, 0x45, 0x3e, 0x03, 0x1f, 0x4c, 0x38, + 0x2a, 0x53, 0xd4, 0xcb, 0x63, 0xd5, 0xee, 0x9b, 0x63, 0x93, 0xcc, 0xea, 0xdc, 0x4f, 0xd1, 0xb7, + 0x5c, 0xaf, 0xf5, 0xe2, 0x52, 0x93, 0x5e, 0x5e, 0x6a, 0xd2, 0x3f, 0x97, 0x9a, 0xf4, 0xcb, 0x95, + 0x36, 0xf3, 0xf2, 0x4a, 0x9b, 0xf9, 0xeb, 0x4a, 0x9b, 0x39, 0xbe, 0x97, 0xf9, 0x86, 0x8b, 0x5e, + 0x6c, 0x7a, 0x32, 0xcf, 0x3f, 0x3f, 0xbf, 0xf8, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x95, 0x74, 0xb8, + 0x10, 0x63, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -420,6 +811,12 @@ type MsgClient interface { SubmitEpochReport(ctx context.Context, in *MsgSubmitEpochReport, opts ...grpc.CallOption) (*MsgSubmitEpochReportResponse, error) // SubmitEvidence defines the SubmitEvidence RPC. SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) + // SubmitStorageRecheckEvidence defines the storage-truth recheck submission path. + SubmitStorageRecheckEvidence(ctx context.Context, in *MsgSubmitStorageRecheckEvidence, opts ...grpc.CallOption) (*MsgSubmitStorageRecheckEvidenceResponse, error) + // ClaimHealComplete defines the healer claim path for a chain-tracked heal op. + ClaimHealComplete(ctx context.Context, in *MsgClaimHealComplete, opts ...grpc.CallOption) (*MsgClaimHealCompleteResponse, error) + // SubmitHealVerification defines the verifier submission path for a chain-tracked heal op. + SubmitHealVerification(ctx context.Context, in *MsgSubmitHealVerification, opts ...grpc.CallOption) (*MsgSubmitHealVerificationResponse, error) } type msgClient struct { @@ -457,6 +854,33 @@ func (c *msgClient) SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, o return out, nil } +func (c *msgClient) SubmitStorageRecheckEvidence(ctx context.Context, in *MsgSubmitStorageRecheckEvidence, opts ...grpc.CallOption) (*MsgSubmitStorageRecheckEvidenceResponse, error) { + out := new(MsgSubmitStorageRecheckEvidenceResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Msg/SubmitStorageRecheckEvidence", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClaimHealComplete(ctx context.Context, in *MsgClaimHealComplete, opts ...grpc.CallOption) (*MsgClaimHealCompleteResponse, error) { + out := new(MsgClaimHealCompleteResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Msg/ClaimHealComplete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SubmitHealVerification(ctx context.Context, in *MsgSubmitHealVerification, opts ...grpc.CallOption) (*MsgSubmitHealVerificationResponse, error) { + out := new(MsgSubmitHealVerificationResponse) + err := c.cc.Invoke(ctx, "/lumera.audit.v1.Msg/SubmitHealVerification", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module @@ -465,6 +889,12 @@ type MsgServer interface { SubmitEpochReport(context.Context, *MsgSubmitEpochReport) (*MsgSubmitEpochReportResponse, error) // SubmitEvidence defines the SubmitEvidence RPC. SubmitEvidence(context.Context, *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) + // SubmitStorageRecheckEvidence defines the storage-truth recheck submission path. + SubmitStorageRecheckEvidence(context.Context, *MsgSubmitStorageRecheckEvidence) (*MsgSubmitStorageRecheckEvidenceResponse, error) + // ClaimHealComplete defines the healer claim path for a chain-tracked heal op. + ClaimHealComplete(context.Context, *MsgClaimHealComplete) (*MsgClaimHealCompleteResponse, error) + // SubmitHealVerification defines the verifier submission path for a chain-tracked heal op. + SubmitHealVerification(context.Context, *MsgSubmitHealVerification) (*MsgSubmitHealVerificationResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -480,6 +910,15 @@ func (*UnimplementedMsgServer) SubmitEpochReport(ctx context.Context, req *MsgSu func (*UnimplementedMsgServer) SubmitEvidence(ctx context.Context, req *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitEvidence not implemented") } +func (*UnimplementedMsgServer) SubmitStorageRecheckEvidence(ctx context.Context, req *MsgSubmitStorageRecheckEvidence) (*MsgSubmitStorageRecheckEvidenceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitStorageRecheckEvidence not implemented") +} +func (*UnimplementedMsgServer) ClaimHealComplete(ctx context.Context, req *MsgClaimHealComplete) (*MsgClaimHealCompleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimHealComplete not implemented") +} +func (*UnimplementedMsgServer) SubmitHealVerification(ctx context.Context, req *MsgSubmitHealVerification) (*MsgSubmitHealVerificationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SubmitHealVerification not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -539,25 +978,91 @@ func _Msg_SubmitEvidence_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -var Msg_serviceDesc = _Msg_serviceDesc -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.audit.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "SubmitEpochReport", - Handler: _Msg_SubmitEpochReport_Handler, - }, - { - MethodName: "SubmitEvidence", - Handler: _Msg_SubmitEvidence_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, +func _Msg_SubmitStorageRecheckEvidence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitStorageRecheckEvidence) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitStorageRecheckEvidence(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Msg/SubmitStorageRecheckEvidence", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitStorageRecheckEvidence(ctx, req.(*MsgSubmitStorageRecheckEvidence)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ClaimHealComplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimHealComplete) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimHealComplete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Msg/ClaimHealComplete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimHealComplete(ctx, req.(*MsgClaimHealComplete)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SubmitHealVerification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSubmitHealVerification) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SubmitHealVerification(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/lumera.audit.v1.Msg/SubmitHealVerification", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SubmitHealVerification(ctx, req.(*MsgSubmitHealVerification)) + } + return interceptor(ctx, in, info, handler) +} + +var Msg_serviceDesc = _Msg_serviceDesc +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "lumera.audit.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + { + MethodName: "SubmitEpochReport", + Handler: _Msg_SubmitEpochReport_Handler, + }, + { + MethodName: "SubmitEvidence", + Handler: _Msg_SubmitEvidence_Handler, + }, + { + MethodName: "SubmitStorageRecheckEvidence", + Handler: _Msg_SubmitStorageRecheckEvidence_Handler, + }, + { + MethodName: "ClaimHealComplete", + Handler: _Msg_ClaimHealComplete_Handler, + }, + { + MethodName: "SubmitHealVerification", + Handler: _Msg_SubmitHealVerification_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, Metadata: "lumera/audit/v1/tx.proto", } @@ -790,6 +1295,265 @@ func (m *MsgSubmitEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *MsgSubmitStorageRecheckEvidence) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitStorageRecheckEvidence) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitStorageRecheckEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintTx(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x42 + } + if m.RecheckResultClass != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.RecheckResultClass)) + i-- + dAtA[i] = 0x38 + } + if len(m.RecheckTranscriptHash) > 0 { + i -= len(m.RecheckTranscriptHash) + copy(dAtA[i:], m.RecheckTranscriptHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.RecheckTranscriptHash))) + i-- + dAtA[i] = 0x32 + } + if len(m.ChallengedResultTranscriptHash) > 0 { + i -= len(m.ChallengedResultTranscriptHash) + copy(dAtA[i:], m.ChallengedResultTranscriptHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChallengedResultTranscriptHash))) + i-- + dAtA[i] = 0x2a + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0x22 + } + if len(m.ChallengedSupernodeAccount) > 0 { + i -= len(m.ChallengedSupernodeAccount) + copy(dAtA[i:], m.ChallengedSupernodeAccount) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChallengedSupernodeAccount))) + i-- + dAtA[i] = 0x1a + } + if m.EpochId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.EpochId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitStorageRecheckEvidenceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitStorageRecheckEvidenceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitStorageRecheckEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgClaimHealComplete) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgClaimHealComplete) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimHealComplete) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintTx(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.HealManifestHash) > 0 { + i -= len(m.HealManifestHash) + copy(dAtA[i:], m.HealManifestHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.HealManifestHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.TicketId) > 0 { + i -= len(m.TicketId) + copy(dAtA[i:], m.TicketId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TicketId))) + i-- + dAtA[i] = 0x1a + } + if m.HealOpId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.HealOpId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimHealCompleteResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgClaimHealCompleteResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimHealCompleteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSubmitHealVerification) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitHealVerification) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitHealVerification) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Details) > 0 { + i -= len(m.Details) + copy(dAtA[i:], m.Details) + i = encodeVarintTx(dAtA, i, uint64(len(m.Details))) + i-- + dAtA[i] = 0x2a + } + if len(m.VerificationHash) > 0 { + i -= len(m.VerificationHash) + copy(dAtA[i:], m.VerificationHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationHash))) + i-- + dAtA[i] = 0x22 + } + if m.Verified { + i-- + if m.Verified { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.HealOpId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.HealOpId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSubmitHealVerificationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSubmitHealVerificationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSubmitHealVerificationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -898,13 +1662,783 @@ func (m *MsgSubmitEvidenceResponse) Size() (n int) { return n } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitStorageRecheckEvidence) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.EpochId != 0 { + n += 1 + sovTx(uint64(m.EpochId)) + } + l = len(m.ChallengedSupernodeAccount) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ChallengedResultTranscriptHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.RecheckTranscriptHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.RecheckResultClass != 0 { + n += 1 + sovTx(uint64(m.RecheckResultClass)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitStorageRecheckEvidenceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgClaimHealComplete) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.HealOpId != 0 { + n += 1 + sovTx(uint64(m.HealOpId)) + } + l = len(m.TicketId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.HealManifestHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgClaimHealCompleteResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSubmitHealVerification) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.HealOpId != 0 { + n += 1 + sovTx(uint64(m.HealOpId)) + } + if m.Verified { + n += 2 + } + l = len(m.VerificationHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Details) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSubmitHealVerificationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitEpochReport: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitEpochReport: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostReport", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.HostReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageChallengeObservations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageChallengeObservations = append(m.StorageChallengeObservations, &StorageChallengeObservation{}) + if err := m.StorageChallengeObservations[len(m.StorageChallengeObservations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitEpochReportResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitEpochReportResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitEpochReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitEvidence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitEvidence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceType", wireType) + } + m.EvidenceType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EvidenceType |= EvidenceType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ActionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitEvidenceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitEvidenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EvidenceId", wireType) + } + m.EvidenceId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EvidenceId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSubmitStorageRecheckEvidence) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -914,28 +2448,143 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowTx } - if iNdEx >= l { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSubmitStorageRecheckEvidence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSubmitStorageRecheckEvidence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + } + m.EpochId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EpochId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChallengedSupernodeAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.ChallengedSupernodeAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TicketId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChallengedResultTranscriptHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -963,13 +2612,13 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Authority = string(dAtA[iNdEx:postIndex]) + m.ChallengedResultTranscriptHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RecheckTranscriptHash", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -979,24 +2628,74 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.RecheckTranscriptHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RecheckResultClass", wireType) + } + m.RecheckResultClass = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RecheckResultClass |= StorageProofResultClass(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1019,7 +2718,7 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitStorageRecheckEvidenceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1042,10 +2741,10 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSubmitStorageRecheckEvidenceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSubmitStorageRecheckEvidenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1069,7 +2768,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { +func (m *MsgClaimHealComplete) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1092,10 +2791,10 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitEpochReport: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaimHealComplete: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEpochReport: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgClaimHealComplete: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1132,9 +2831,9 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealOpId", wireType) } - m.EpochId = 0 + m.HealOpId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1144,16 +2843,16 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochId |= uint64(b&0x7F) << shift + m.HealOpId |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostReport", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TicketId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1163,30 +2862,29 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.HostReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.TicketId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageChallengeObservations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HealManifestHash", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1196,25 +2894,55 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.StorageChallengeObservations = append(m.StorageChallengeObservations, &StorageChallengeObservation{}) - if err := m.StorageChallengeObservations[len(m.StorageChallengeObservations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.HealManifestHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Details = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1237,7 +2965,7 @@ func (m *MsgSubmitEpochReport) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitEpochReportResponse) Unmarshal(dAtA []byte) error { +func (m *MsgClaimHealCompleteResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1260,10 +2988,10 @@ func (m *MsgSubmitEpochReportResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitEpochReportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgClaimHealCompleteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEpochReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgClaimHealCompleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1287,7 +3015,7 @@ func (m *MsgSubmitEpochReportResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitHealVerification) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1310,10 +3038,10 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitEvidence: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSubmitHealVerification: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEvidence: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSubmitHealVerification: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1349,10 +3077,10 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubjectAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HealOpId", wireType) } - var stringLen uint64 + m.HealOpId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1362,29 +3090,16 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.HealOpId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubjectAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Verified", wireType) } - m.EvidenceType = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1394,14 +3109,15 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EvidenceType |= EvidenceType(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.Verified = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerificationHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1429,11 +3145,11 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ActionId = string(dAtA[iNdEx:postIndex]) + m.VerificationHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1461,7 +3177,7 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Metadata = string(dAtA[iNdEx:postIndex]) + m.Details = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1484,7 +3200,7 @@ func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSubmitHealVerificationResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1507,31 +3223,12 @@ func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitEvidenceResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSubmitHealVerificationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitEvidenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSubmitHealVerificationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceId", wireType) - } - m.EvidenceId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EvidenceId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])