syntax = "proto3"; package dymensionxyz.dymension.rollapp; option go_package = "github.com/dymensionxyz/dymension/v3/x/rollapp/types"; import "gogoproto/gogo.proto"; import "dymension/rollapp/block_descriptor.proto"; import "dymension/rollapp/state_status.proto"; // StateInfoIndex is the data used for indexing and retrieving a StateInfo // it updated and saved with every UpdateState in StateInfo. // We use the this structure also for: // 1. LatestStateInfoIndex which defines the rollapps' current (latest) index of the last UpdateState // 2. LatestFinalizedStateIndex which defines the rollapps' current (latest) index of the latest StateInfo that was finalized message StateInfoIndex { // rollappId is the rollapp that the sequencer belongs to and asking to update // it used to identify the what rollapp a StateInfo belongs // The rollappId follows the same standard as cosmos chain_id string rollappId = 1; // index is a sequential increasing number, updating on each // state update used for indexing to a specific state info, the first index is 1 uint64 index = 2; } // StateInfo defines a rollapps' state. message StateInfo { // stateInfoIndex defines what rollapp the state belongs to // and in which index it can be referenced StateInfoIndex stateInfoIndex = 1 [(gogoproto.nullable) = false]; // sequencer is the bech32-encoded address of the sequencer sent the update string sequencer = 2; // startHeight is the block height of the first block in the batch uint64 startHeight = 3; // numBlocks is the number of blocks included in this batch update uint64 numBlocks = 4; // DAPath is the description of the location on the DA layer string DAPath = 5; // version is the version of the rollapp uint64 version = 6; // creationHeight is the height at which the UpdateState took place uint64 creationHeight = 7; // status is the status of the state update StateStatus status = 8; // BDs is a list of block description objects (one per block) // the list must be ordered by height, starting from startHeight to startHeight+numBlocks-1 BlockDescriptors BDs = 9 [(gogoproto.nullable) = false]; } // StateInfoSummary is a compact representation of StateInfo message StateInfoSummary { // stateInfoIndex defines what rollapp the state belongs to // and in which index it can be referenced StateInfoIndex stateInfoIndex = 1 [(gogoproto.nullable) = false]; // status is the status of the state update StateStatus status = 2; // creationHeight is the height at which the UpdateState took place uint64 creationHeight = 3; } // BlockHeightToFinalizationQueue defines a map from block height to list of states to finalized message BlockHeightToFinalizationQueue { // finalizationHeight is the block height that the state should be finalized uint64 finalizationHeight = 1; // finalizationQueue is a list of states that are waiting to be finalized // when the block height becomes finalizationHeight repeated StateInfoIndex finalizationQueue = 2 [(gogoproto.nullable) = false]; }