chore: upstream runtime/v2 (#20320)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Matt Kocubinski
2024-05-14 12:43:28 +00:00
committed by GitHub
co-authored by Julien Robert
parent b4f8815426
commit 7ae23e287a
37 changed files with 5864 additions and 66 deletions
+3
View File
@@ -15,3 +15,6 @@ type HasGenesis interface {
InitGenesis(ctx context.Context, data json.RawMessage) error
ExportGenesis(ctx context.Context) (json.RawMessage, error)
}
type HasABCIGenesis interface {
InitGenesis(ctx context.Context, data json.RawMessage) ([]ValidatorUpdate, error)
}
+1 -3
View File
@@ -3,11 +3,9 @@ package appmodule
import (
gogoproto "github.com/cosmos/gogoproto/proto"
protov2 "google.golang.org/protobuf/proto"
"google.golang.org/protobuf/runtime/protoiface"
)
// Message aliases protoiface.MessageV1 for convenience.
type Message = protoiface.MessageV1
type Message = gogoproto.Message
func messageName[M Message]() string {
switch m := any(*new(M)).(type) {
+6 -1
View File
@@ -1,4 +1,4 @@
package appmodule
package context
// ExecMode defines the execution mode which can be set on a Context.
type ExecMode uint8
@@ -14,3 +14,8 @@ const (
ExecModeVerifyVoteExtension
ExecModeFinalize
)
const (
ExecModeKey = iota
CometInfoKey
)
+3 -3
View File
@@ -1,11 +1,11 @@
package transaction
import (
"github.com/cosmos/gogoproto/proto"
gogoproto "github.com/cosmos/gogoproto/proto"
)
type (
Msg = proto.Message
Msg = gogoproto.Message
Identity = []byte
)
@@ -22,7 +22,7 @@ type Tx interface {
// Hash returns the unique identifier for the Tx.
Hash() [32]byte
// GetMessages returns the list of state transitions of the Tx.
GetMessages() []Msg
GetMessages() ([]Msg, error)
// GetSenders returns the tx state transition sender.
GetSenders() ([]Identity, error) // TODO reduce this to a single identity if accepted
// GetGasLimit returns the gas limit of the tx. Must return math.MaxUint64 for infinite gas