chore: upstream stf to main (#20286)

Co-authored-by: testinginprod <98415576+testinginprod@users.noreply.github.com>
This commit is contained in:
Marko
2024-05-08 14:50:52 +00:00
committed by GitHub
co-authored by testinginprod
parent 03d70aac05
commit 83c4b9bfb4
37 changed files with 3117 additions and 10 deletions
+66
View File
@@ -0,0 +1,66 @@
package app
import (
"time"
appmodulev2 "cosmossdk.io/core/appmodule/v2"
"cosmossdk.io/core/event"
"cosmossdk.io/core/transaction"
)
type QueryRequest struct {
Height int64
Path string
Data []byte
}
type QueryResponse struct {
Height int64
Value []byte
}
type BlockRequest[T any] struct {
Height uint64
Time time.Time
Hash []byte
ChainId string
AppHash []byte
Txs []T
ConsensusMessages []transaction.Type
}
type BlockResponse struct {
Apphash []byte
ConsensusMessagesResponse []transaction.Type
ValidatorUpdates []appmodulev2.ValidatorUpdate
PreBlockEvents []event.Event
BeginBlockEvents []event.Event
TxResults []TxResult
EndBlockEvents []event.Event
}
type RequestInitChain struct {
Time time.Time
ChainId string
Validators []appmodulev2.ValidatorUpdate
AppStateBytes []byte
InitialHeight int64
}
type ResponseInitChain struct {
Validators []appmodulev2.ValidatorUpdate
AppHash []byte
}
type TxResult struct {
Events []event.Event
Resp []transaction.Type
Error error
Code uint32
Data []byte
Log string
Info string
GasWanted uint64
GasUsed uint64
Codespace string
}
+21
View File
@@ -0,0 +1,21 @@
package app
import (
"github.com/cosmos/gogoproto/jsonpb"
gogoproto "github.com/cosmos/gogoproto/proto"
)
// MsgInterfaceProtoName defines the protobuf name of the cosmos Msg interface
const MsgInterfaceProtoName = "cosmos.base.v1beta1.Msg"
type ProtoCodec interface {
Marshal(v gogoproto.Message) ([]byte, error)
Unmarshal(data []byte, v gogoproto.Message) error
Name() string
}
type InterfaceRegistry interface {
jsonpb.AnyResolver
ListImplementations(ifaceTypeURL string) []string
ListAllInterfaces() []string
}
+6
View File
@@ -0,0 +1,6 @@
package app
var (
RuntimeIdentity = []byte("runtime")
ConsensusIdentity = []byte("consensus")
)