chore: upstream stf to main (#20286)
Co-authored-by: testinginprod <98415576+testinginprod@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package app
|
||||
|
||||
var (
|
||||
RuntimeIdentity = []byte("runtime")
|
||||
ConsensusIdentity = []byte("consensus")
|
||||
)
|
||||
Reference in New Issue
Block a user