-
Notifications
You must be signed in to change notification settings - Fork 3
refactor(modules): replace sequencer by rollkitmngr #114
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
base: main
Are you sure you want to change the base?
Changes from all commits
d4624eb
44af907
b4d54c8
c8d602f
b5ece31
677e4dd
0489cfb
625c408
349d75f
7d85e9b
ceb94f9
834a98d
ad73f1b
5d9a3c1
cee674b
b3bec46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
syntax = "proto3"; | ||
package rollkitsdk.rollkitmngr.v1; | ||
|
||
import "amino/amino.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "rollkitsdk/rollkitmngr/v1/types.proto"; | ||
|
||
option go_package = "github.com/rollkit/go-execution-abci/modules/rollkitmngr/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
// IsMigrating queries the sequencer changes. | ||
rpc IsMigrating(QueryIsMigratingRequest) returns (QueryIsMigratingResponse) { | ||
option (google.api.http).get = "/rollkit/rollkitmngr/v1/is_migrating"; | ||
} | ||
|
||
// Sequencer queries the sequencer. | ||
rpc Sequencer(QuerySequencerRequest) returns (QuerySequencerResponse) { | ||
option (google.api.http).get = "/rollkit/rollkitmngr/v1/sequencer"; | ||
} | ||
|
||
// Attesters queries the list of attesters. | ||
rpc Attesters(QueryAttestersRequest) returns (QueryAttestersResponse) { | ||
option (google.api.http).get = "/rollkit/rollkitmngr/v1/attesters"; | ||
} | ||
} | ||
|
||
// QueryIsMigratingRequest is request type for the Query/IsMigrating RPC method. | ||
message QueryIsMigratingRequest {} | ||
|
||
// QueryIsMigratingResponse is response type for the Query/IsMigrating RPC method. | ||
message QueryIsMigratingResponse { | ||
// is_migrating indicates whether the chain is migrating to rollkit. | ||
bool is_migrating = 1; | ||
|
||
// start_block_height is the block height at which the migration will start. | ||
uint64 start_block_height = 2; | ||
|
||
// end_block_height is the block height at which the migration will end. | ||
uint64 end_block_height = 3; | ||
} | ||
|
||
// QuerySequencerRequest is request type for the Query/Sequencer RPC method. | ||
message QuerySequencerRequest {} | ||
|
||
// QuerySequencerResponse is response type for the Query/Sequencer RPC method. | ||
message QuerySequencerResponse { | ||
// sequencer is the requested sequencer. | ||
Sequencer sequencer = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; | ||
} | ||
|
||
// QueryAttestersRequest is request type for the Query/Attesters RPC method. | ||
message QueryAttestersRequest {} | ||
|
||
// QueryAttestersResponse is response type for the Query/Attesters RPC method. | ||
message QueryAttestersResponse { | ||
// attesters is the list of attesters. | ||
repeated Attester attesters = 1 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
syntax = "proto3"; | ||
package rollkitsdk.rollkitmngr.v1; | ||
|
||
import "amino/amino.proto"; | ||
import "cosmos/msg/v1/msg.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "rollkitsdk/rollkitmngr/v1/types.proto"; | ||
|
||
option go_package = "github.com/rollkit/go-execution-abci/modules/rollkitmngr/types"; | ||
|
||
// Msg defines the Msg service. | ||
service Msg { | ||
option (cosmos.msg.v1.service) = true; | ||
|
||
// MigrateToRollkit defines a (governance) operation for the migration to rollkit. The authority defaults to the x/gov module account. | ||
rpc MigrateToRollkit(MsgMigrateToRollkit) returns (MsgMigrateToRollkitResponse); | ||
|
||
// EditAttesters defines a governance operation to edit the list of attesters. | ||
rpc EditAttesters(MsgEditAttesters) returns (MsgEditAttestersResponse); | ||
} | ||
|
||
// MsgMigrateToRollkit is the Msg/MsgMigrateToRollkit request type. | ||
message MsgMigrateToRollkit { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
option (amino.name) = "rollkitmngr/v1/MsgMigrateToRollkit"; | ||
|
||
// authority is the address that controls the module (defaults to x/gov unless | ||
// overwritten). | ||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
|
||
// block height that trigger the rollkit migration. | ||
// When IBC is enabled, the migration can take several blocks to complete. | ||
// This is the block height at which the migration will be triggered. | ||
uint64 block_height = 2; | ||
|
||
// sequencer is the pubkey that will become new sequencer. | ||
Sequencer sequencer = 3 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
|
||
// attesters is the list of attesters that will attest to blocks. | ||
repeated Attester attesters = 4 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
} | ||
|
||
// MsgMigrateToRollkitResponse defines the response structure for executing a | ||
// MsgRollkitMigrate message. | ||
message MsgMigrateToRollkitResponse {}; | ||
|
||
// MsgEditAttesters is the Msg/EditAttesters request type. | ||
message MsgEditAttesters { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
option (amino.name) = "rollkitmngr/v1/MsgEditAttesters"; | ||
|
||
// authority is the address that controls the module (defaults to x/gov unless | ||
// overwritten). | ||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
|
||
// attesters is the list of attesters to add or remove. | ||
repeated Attester attesters = 2 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
} | ||
|
||
// MsgEditAttestersResponse defines the response structure for executing a | ||
// MsgEditAttesters message. | ||
message MsgEditAttestersResponse {}; |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,48 @@ | ||||||
syntax = "proto3"; | ||||||
package rollkitsdk.rollkitmngr.v1; | ||||||
|
||||||
import "amino/amino.proto"; | ||||||
import "gogoproto/gogo.proto"; | ||||||
import "cosmos_proto/cosmos.proto"; | ||||||
import "google/protobuf/any.proto"; | ||||||
|
||||||
option go_package = "github.com/rollkit/go-execution-abci/modules/rollkitmngr/types"; | ||||||
|
||||||
// RollkitMigration defines the migration state from cometbft to rollkit. | ||||||
message RollkitMigration { | ||||||
// block height that trigger the rollkit migration. | ||||||
// When IBC is enabled, the migration can take several blocks to complete. | ||||||
// This is the block height at which the migration will be triggered. | ||||||
uint64 block_height = 2; | ||||||
|
||||||
// sequencer is the pubkey that will become new sequencer. | ||||||
Sequencer sequencer = 3 | ||||||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||||||
|
||||||
// attesters is the list of attesters that will attest to blocks. | ||||||
repeated Attester attesters = 4 | ||||||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||||||
} | ||||||
|
||||||
// Sequencer defines a sequence of instructions to be executed. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update misleading comment for Sequencer message. The comment "defines a sequence of instructions to be executed" is misleading. In blockchain context, a sequencer is typically an entity that orders transactions, not a sequence of instructions. -// Sequencer defines a sequence of instructions to be executed.
+// Sequencer defines an entity responsible for ordering and producing blocks. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
message Sequencer { | ||||||
// name is the human-readable name of the sequencer. | ||||||
string name = 1; | ||||||
|
||||||
// consensus_pubkey is the consensus public key of the sequencer, as a | ||||||
// Protobuf Any. | ||||||
google.protobuf.Any consensus_pubkey = 2 | ||||||
[ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; | ||||||
} | ||||||
|
||||||
|
||||||
// Attester defines an attester that can attest to blocks. | ||||||
message Attester { | ||||||
// name is the human-readable name of the attester. | ||||||
string name = 1; | ||||||
|
||||||
// consensus_pubkey is the consensus public key of the attester, as a | ||||||
// Protobuf Any. | ||||||
google.protobuf.Any consensus_pubkey = 2 | ||||||
[ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey" ]; | ||||||
} |
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.