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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 32 additions & 10 deletions proto/vaas/provider/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package vaas.provider.v1;
option go_package = "github.com/allinbits/vaas/x/vaas/provider/types";

import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "vaas/v1/shared_consumer.proto";
import "vaas/v1/wire.proto";
import "vaas/provider/v1/provider.proto";
Expand Down Expand Up @@ -38,22 +39,43 @@ message GenesisState {
//
// Note this type is only used internally to the provider VAAS module.
message ConsumerState {
// ChainID defines the chain ID for the consumer chain
string chain_id = 1;
// ConsumerID is the internal numeric consumer id.
uint64 consumer_id = 1;
// ChainID is the external chain identifier of the consumer chain (e.g.
// "atomone-1"), as supplied by the consumer owner at registration.
string chain_id = 2;
// ClientID defines the IBC client ID for the consumer chain.
string client_id = 2;
// InitalHeight defines the initial block height for the consumer chain
uint64 initial_height = 3;
string client_id = 3;
// InitialHeight defines the initial block height for the consumer chain
uint64 initial_height = 4;
// ConsumerGenesis defines the initial consumer chain genesis states
vaas.v1.ConsumerGenesisState consumer_genesis = 4
vaas.v1.ConsumerGenesisState consumer_genesis = 5
[ (gogoproto.nullable) = false ];
// PendingValsetChanges defines the pending validator set changes for the
// consumer chain
repeated vaas.v1.ValidatorSetChangePacketData
pending_valset_changes = 5 [ (gogoproto.nullable) = false ];
repeated string slash_downtime_ack = 6;
repeated vaas.v1.ValidatorSetChangePacketData pending_valset_changes = 6 [ (gogoproto.nullable) = false ];
repeated string slash_downtime_ack = 7;
// the phase of the consumer chain
ConsumerPhase phase = 7;
ConsumerPhase phase = 8;
// OwnerAddress is the bech32 address that authorises owner-only operations
// (UpdateConsumer, RemoveConsumer, key assignment, etc.) on the consumer.
// Always non-empty for any existing consumer record; set at REGISTERED.
string owner_address = 9;
// Metadata is the owner-supplied descriptor (name/description/repo).
// Preserved through DELETED so block explorers can show information
// about removed chains without an archive node.
vaas.provider.v1.ConsumerMetadata metadata = 10;
// InitParams are the owner-supplied launch parameters: spawn time,
// initial height, genesis hash, binary hash, etc. Preserved through
// DELETED for the same explorer reason. Carries the spawn_time used
// to re-derive the keeper's spawn-time queue, and the initial_height
// used to re-derive equivocation_evidence_min_height, at InitGenesis.
vaas.provider.v1.ConsumerInitializationParameters init_params = 11;
// RemovalTime is the wall-clock time at which a STOPPED consumer is
// scheduled to transition to DELETED. Set only when phase == STOPPED;
// absent otherwise. Used to re-derive the keeper's removal-time queue.
google.protobuf.Timestamp removal_time = 12
[ (gogoproto.stdtime) = true ];
}

// ValsetUpdateIdToHeight defines the genesis information for the mapping
Expand Down
15 changes: 7 additions & 8 deletions proto/vaas/provider/v1/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,28 @@ message KeyAssignmentReplacement {
}

// Used to serialize the ValidatorConsumerPubKey index from key assignment
// ValidatorConsumerPubKey: (chainID, providerAddr consAddr) -> consumerKey
// ValidatorConsumerPubKey: (consumerID, providerAddr consAddr) -> consumerKey
// tmprotocrypto.PublicKey
message ValidatorConsumerPubKey {
string chain_id = 1;
uint64 consumer_id = 1;
bytes provider_addr = 2;
tendermint.crypto.PublicKey consumer_key = 3;
}

// Used to serialize the ValidatorConsumerAddr index from key assignment
// ValidatorByConsumerAddr: (chainID, consumerAddr consAddr) -> providerAddr
// ValidatorByConsumerAddr: (consumerID, consumerAddr consAddr) -> providerAddr
// consAddr
message ValidatorByConsumerAddr {
string chain_id = 1;
uint64 consumer_id = 1;
bytes consumer_addr = 2;
bytes provider_addr = 3;
}

// Used to serialize the ConsumerAddrsToPrune index from key assignment
// ConsumerAddrsToPrune: (chainID, pruneTs time.Time) -> consumerAddrs
// ConsumerAddrsToPrune: (consumerID, pruneTs time.Time) -> consumerAddrs
// AddressList
message ConsumerAddrsToPrune {
string chain_id = 1;
uint64 consumer_id = 1;
google.protobuf.Timestamp prune_ts = 2
[ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ];
AddressList consumer_addrs = 3;
Expand Down Expand Up @@ -170,8 +170,7 @@ message ConsumerInitializationParameters {
}

// ConsumerIds contains consumer ids of chains
// Used so we can easily (de)serialize slices of strings
message ConsumerIds { repeated string ids = 1; }
message ConsumerIds { repeated uint64 ids = 1; }

// ConsumerPhase indicates the phases of a consumer chain according to ADR 019
enum ConsumerPhase {
Expand Down
20 changes: 10 additions & 10 deletions proto/vaas/provider/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ service Query {
}

message QueryConsumerGenesisRequest {
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryConsumerGenesisResponse {
Expand Down Expand Up @@ -137,7 +137,7 @@ message Chain {
string phase = 3;
// The metadata of the consumer chain
ConsumerMetadata metadata = 4 [(gogoproto.nullable) = false ];
string consumer_id = 5;
uint64 consumer_id = 5;
// Infraction parameters for slashing and jailing
InfractionParameters infraction_parameters = 6;
// The deterministic provider-side account that must be funded
Expand All @@ -151,7 +151,7 @@ message QueryValidatorConsumerAddrRequest {
// The consensus address of the validator on the provider chain
string provider_address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
// The id of the consumer chain
string consumer_id = 2;
uint64 consumer_id = 2;
}

message QueryValidatorConsumerAddrResponse {
Expand All @@ -165,7 +165,7 @@ message QueryValidatorProviderAddrRequest {
// The consensus address of the validator on the consumer chain
string consumer_address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
// The id of the consumer chain
string consumer_id = 2;
uint64 consumer_id = 2;
}

message QueryValidatorProviderAddrResponse {
Expand All @@ -175,7 +175,7 @@ message QueryValidatorProviderAddrResponse {

message QueryAllPairsValConsAddrByConsumerRequest {
// The id of the consumer chain
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryAllPairsValConsAddrByConsumerResponse {
Expand All @@ -197,7 +197,7 @@ message QueryParamsResponse {
}

message QueryConsumerValidatorsRequest {
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryConsumerValidatorsValidator {
Expand Down Expand Up @@ -246,15 +246,15 @@ message QueryConsumerIdFromClientIdRequest {

message QueryConsumerIdFromClientIdResponse {
// the consumer id of the chain associated with this client id
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryConsumerChainRequest {
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryConsumerChainResponse {
string consumer_id = 1;
uint64 consumer_id = 1;
string chain_id = 2;
string owner_address = 3;
string phase = 4;
Expand All @@ -270,7 +270,7 @@ message QueryConsumerChainResponse {
}

message QueryConsumerGenesisTimeRequest {
string consumer_id = 1;
uint64 consumer_id = 1;
}

message QueryConsumerGenesisTimeResponse {
Expand Down
12 changes: 6 additions & 6 deletions proto/vaas/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message MsgAssignConsumerKey {
option (gogoproto.goproto_getters) = false;

// the consumer id of the consumer chain to assign a consensus public key to
string consumer_id = 1;
uint64 consumer_id = 1;
// The validator address on the provider
string provider_addr = 2 [(gogoproto.moretags) = "yaml:\"address\""];
// The consensus public key to use on the consumer.
Expand All @@ -60,7 +60,7 @@ message MsgSubmitConsumerMisbehaviour {
// two conflicting IBC headers
ibc.lightclients.tendermint.v1.Misbehaviour misbehaviour = 2;
// the consumer id of the consumer chain where the misbehaviour occurred
string consumer_id = 3;
uint64 consumer_id = 3;
}

message MsgSubmitConsumerMisbehaviourResponse {}
Expand All @@ -79,7 +79,7 @@ message MsgSubmitConsumerDoubleVoting {
// The light client header of the infraction block
ibc.lightclients.tendermint.v1.Header infraction_block_header = 3;
// the consumer id of the consumer chain where the double-voting took place
string consumer_id = 4;
uint64 consumer_id = 4;
}

message MsgSubmitConsumerDoubleVotingResponse {}
Expand All @@ -103,7 +103,7 @@ message MsgRemoveConsumer {
option (cosmos.msg.v1.signer) = "owner";

// the consumer id of the consumer chain to be stopped
string consumer_id = 1;
uint64 consumer_id = 1;
// the address of the owner of the consumer chain to be stopped
string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
Expand Down Expand Up @@ -132,7 +132,7 @@ message MsgCreateConsumer {

// MsgCreateConsumerResponse defines response type for MsgCreateConsumer
message MsgCreateConsumerResponse {
string consumer_id = 1;
uint64 consumer_id = 1;
}

// MsgUpdateConsumer defines the message used to modify a consumer chain.
Expand All @@ -143,7 +143,7 @@ message MsgUpdateConsumer {
string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// the consumer id of the consumer chain to be updated
string consumer_id = 2;
uint64 consumer_id = 2;

// the new owner of the consumer when updated
string new_owner_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
Expand Down
Loading
Loading