Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update rollapp proto to the current dymension main #1161

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Update rollapp proto to the current dymension main
  • Loading branch information
zale144 committed Oct 22, 2024
commit 3cfee9590bbd8387e5af8a92c2cf57c9812d23be
45 changes: 45 additions & 0 deletions proto/types/dymensionxyz/dymension/rollapp/genesis_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
syntax = "proto3";
package dymensionxyz.dymension.rollapp;

option go_package = "github.com/dymensionxyz/dymint/types/pb/dymensionxyz/dymension/rollapp";

import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "types/cosmos/msg/v1/msg.proto";

import "types/dymensionxyz/dymension/rollapp/metadata.proto";

message GenesisInfo {
// checksum used to verify integrity of the genesis file
string genesis_checksum = 1;
// unique bech32 prefix
string bech32_prefix = 2;
// native_denom is the base denom for the native token
DenomMetadata native_denom = 3 [ (gogoproto.nullable) = false ];
// initial_supply is the initial supply of the native token
string initial_supply = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];

// sealed indicates if the fields in this object are no longer updatable
bool sealed = 5;

GenesisAccounts genesis_accounts = 6 [ (gogoproto.nullable) = true ];
}

message GenesisAccounts {
repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ];
}


// GenesisAccount is a struct for the genesis account for the rollapp
message GenesisAccount {
// amount of coins to be sent to the genesis address
string amount = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// address is a bech-32 address of the genesis account
string address = 2;
}
75 changes: 35 additions & 40 deletions proto/types/dymensionxyz/dymension/rollapp/rollapp.proto
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
// This file is a modified copy of the rollapp module proto contract. Source:
// https://github.com/dymensionxyz/dymension/blob/f140cd1dd561cefb3e6562cbf4379b88cd16400d/proto/dymensionxyz/dymension/rollapp/.

syntax = "proto3";
package dymensionxyz.dymension.rollapp;

option go_package = "github.com/dymensionxyz/dymint/types/pb/dymensionxyz/dymension/rollapp";

import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "types/cosmos/msg/v1/msg.proto";

import "types/dymensionxyz/dymension/rollapp/state_info.proto";
import "types/dymensionxyz/dymension/rollapp/metadata.proto";
import "types/dymensionxyz/dymension/rollapp/genesis_info.proto";

// RollappGenesisState is a partial repr of the state the hub can expect the rollapp to be in upon genesis
// RollappGenesisState is a partial repr of the state the hub can expect the
// rollapp to be in upon genesis
message RollappGenesisState {
reserved 1;
// If true, then full usage of the canonical ibc transfer channel is enabled.
// Note: in v3.1.0 and prior this field marked the completion of the 'genesis event'
// Keeping and renaming the field enables a seamless upgrade https://www.notion.so/dymension/ADR-x-Genesis-Bridge-Phase-2-89769aa551b5440b9ed403a101775ce1?pvs=4#89698384d815435b87393dbe45bc5a74
// Note: in v3.1.0 and prior this field marked the completion of the 'genesis
// event' Keeping and renaming the field enables a seamless upgrade
// https://www.notion.so/dymension/ADR-x-Genesis-Bridge-Phase-2-89769aa551b5440b9ed403a101775ce1?pvs=4#89698384d815435b87393dbe45bc5a74
// to the new genesis transfer protocol
// Note: if this field is false, ibc transfers may still be allowed in one or either direction.
// Note: if this field is false, ibc transfers may still be allowed in one or
// either direction.
bool transfers_enabled = 2;
}

// Rollapp defines a rollapp object. First, the RollApp is created and then
// sequencers can be created and attached. The RollApp is identified by rollappId
// sequencers can be created and attached. The RollApp is identified by
// rollappId
message Rollapp {
// The unique identifier of the rollapp chain.
// The rollapp_id follows the same standard as cosmos chain_id.
Expand All @@ -33,22 +36,23 @@ message Rollapp {
string owner = 2;
// field numbers not to be reused
reserved 3 to 6;
// genesis_state is a partial repr of the state the hub can expect the rollapp to be in upon genesis
RollappGenesisState genesis_state = 7 [(gogoproto.nullable) = false];
// genesis_state is a partial repr of the state the hub can expect the rollapp
// to be in upon genesis
RollappGenesisState genesis_state = 7 [ (gogoproto.nullable) = false ];
// channel_id will be set to the canonical IBC channel of the rollapp.
string channel_id = 8;
// frozen is a boolean that indicates if the rollapp is frozen.
bool frozen = 9;
// registeredDenoms is a list of registered denom bases on this rollapp
repeated string registeredDenoms = 10;
// registeredDenoms is a set of registered denom bases on this rollapp
map<string, Empty> registered_denoms = 10;
// metadata is the rollapp metadata
RollappMetadata metadata = 11;
// genesis_info keeps immutable rollapp fields
GenesisInfo genesis_info = 12 [(gogoproto.nullable) = false];
// initial_sequencer is an option to preset one or more coma-separated bech32-encoded addresses of the
// sequencer(s) that are allowed to initially register and serve for this rollapp.
// if left empty, no sequencer is allowed to register.
// if set to "*" any sequencer can register.
GenesisInfo genesis_info = 12 [ (gogoproto.nullable) = false ];
// initial_sequencer is an option to preset one or more coma-separated
// bech32-encoded addresses of the sequencer(s) that are allowed to initially
// register and serve for this rollapp. if left empty, no sequencer is allowed
// to register. if set to "*" any sequencer can register.
string initial_sequencer = 13;

enum VMType {
Expand All @@ -58,30 +62,22 @@ message Rollapp {
}
// vm_type is the type of rollapp machine: EVM or WASM
VMType vm_type = 14;
// launched is a boolean that indicates that the Rollapp has been launched and the immutable fields are no longer updatable.
// launched is a boolean that indicates that the Rollapp has been launched and
// the immutable fields are no longer updatable.
bool launched = 15;
// LivenessEventHeight is the height of an upcoming liveness event (slash or jail)
// 0 means not set
int64 liveness_event_height = 16;
// The LastStateUpdateHeight HUB height when the last state update was received
int64 last_state_update_height = 17;
// pre_launch_time is the timestamp indicating the time before which the
// rollapp cannot be started.
// Set when creating IRO plan for the rollapp
google.protobuf.Timestamp pre_launch_time = 16 [ (gogoproto.stdtime) = true];
// LivenessEventHeight is the height on the HUB of an upcoming liveness event (slash or
// jail against the rollapp). 0 means not set
int64 liveness_event_height = 17;
// The LastStateUpdateHeight HUB height when the last state update was
// received
int64 last_state_update_height = 18;
}

message GenesisInfo {
// checksum used to verify integrity of the genesis file
string genesis_checksum = 1;
// unique bech32 prefix
string bech32_prefix = 2;
// native_denom is the base denom for the native token
DenomMetadata native_denom = 3;
// initial_supply is the initial supply of the native token
string initial_supply = 4 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
// sealed indicates if the fields in this object are no longer updatable
bool sealed = 5;
}
message Empty {}

// Rollapp summary is a compact representation of Rollapp
message RollappSummary {
Expand All @@ -92,7 +88,6 @@ message RollappSummary {
StateInfoIndex latestStateIndex = 2;
// Defines the index of the last rollapp UpdateState that was finalized.
StateInfoIndex latestFinalizedStateIndex = 3;
uint64 latestHeight = 4; // TODO:
uint64 latestHeight = 4; // TODO:
uint64 latestFinalizedHeight = 5; // TODO:
}

1 change: 1 addition & 0 deletions proto/types/dymensionxyz/dymension/rollapp/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "types/cosmos/msg/v1/msg.proto";
import "types/dymensionxyz/dymension/rollapp/block_descriptor.proto";
import "types/dymensionxyz/dymension/rollapp/rollapp.proto";
import "types/dymensionxyz/dymension/rollapp/metadata.proto";
import "types/dymensionxyz/dymension/rollapp/genesis_info.proto";
import "gogoproto/gogo.proto";

// MsgCreateRollapp creates a new rollapp chain on the hub.
Expand Down
Loading
Loading