Documentation ¶
Index ¶
- Constants
- func DefaultAnteHandler(tx Tx, manager AccountManager) error
- func DefaultBeginBlocker(base *BaseApp, req types.RequestBeginBlock) types.ResponseBeginBlock
- func DefaultEndBlocker(base *BaseApp, req types.RequestEndBlock) types.ResponseEndBlock
- func DefaultInitChainer(base *BaseApp, req types.RequestInitChain) types.ResponseInitChain
- type AccountManager
- type AnteHandler
- type AppStateStore
- type BaseApp
- func (app *BaseApp) AppVersion() string
- func (app *BaseApp) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
- func (app *BaseApp) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
- func (app *BaseApp) Commit() types.ResponseCommit
- func (app *BaseApp) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx
- func (app *BaseApp) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
- func (app *BaseApp) Info(req types.RequestInfo) types.ResponseInfo
- func (app *BaseApp) InitChain(req types.RequestInitChain) (res types.ResponseInitChain)
- func (app *BaseApp) LastBlockHeight() int64
- func (app *BaseApp) LastCommitID() CommitID
- func (app *BaseApp) Logger() log.Logger
- func (app *BaseApp) Name() string
- func (app *BaseApp) Query(req types.RequestQuery) types.ResponseQuery
- func (app *BaseApp) SetOption(_ types.RequestSetOption) types.ResponseSetOption
- type BeginBlocker
- type CommitID
- type Committer
- type Context
- func (c Context) BlockHeader() types.Header
- func (c Context) BlockHeight() int64
- func (c Context) BlockTime() time.Time
- func (c Context) ChainID() string
- func (c Context) ConsensusParams() *types.ConsensusParams
- func (c Context) Context() context.Context
- func (c Context) IsCheckTx() bool
- func (c Context) IsReCheckTx() bool
- func (c Context) Logger() log.Logger
- func (c Context) TxBytes() []byte
- func (c Context) Value(key interface{}) interface{}
- func (c Context) VoteInfos() []types.VoteInfo
- func (c Context) WithBlockHeader(header types.Header) Context
- func (c Context) WithBlockHeight(height int64) Context
- func (c Context) WithBlockTime(newTime time.Time) Context
- func (c Context) WithChainID(chainID string) Context
- func (c Context) WithConsensusParams(params *types.ConsensusParams) Context
- func (c Context) WithContext(ctx context.Context) Context
- func (c Context) WithIsCheckTx(isCheckTx bool) Context
- func (c Context) WithIsReCheckTx(isRecheckTx bool) Context
- func (c Context) WithLogger(logger log.Logger) Context
- func (c Context) WithProposer(addr []byte) Context
- func (c Context) WithTxBytes(txBytes []byte) Context
- func (c Context) WithValue(key, value interface{}) Context
- func (c Context) WithVoteInfos(voteInfo []types.VoteInfo) Context
- type ContractCaller
- type EndBlocker
- type InitChainer
- type PeerFilter
- type Transaction
- func (t *Transaction) GetArgs() [][]byte
- func (t *Transaction) GetContractName() string
- func (t *Transaction) GetFunctionName() string
- func (t *Transaction) GetSignBytes() []byte
- func (t *Transaction) GetSignature() []byte
- func (t *Transaction) GetSigner() crypto.Address
- func (t *Transaction) GetStringArgs() []string
- func (t *Transaction) ValidateBasic() error
- type Tx
- type TxDecoder
Constants ¶
const (
ValidatorSetChangePrefix = "val:"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultAnteHandler ¶
func DefaultAnteHandler(tx Tx, manager AccountManager) error
func DefaultBeginBlocker ¶
func DefaultBeginBlocker(base *BaseApp, req types.RequestBeginBlock) types.ResponseBeginBlock
func DefaultEndBlocker ¶
func DefaultEndBlocker(base *BaseApp, req types.RequestEndBlock) types.ResponseEndBlock
func DefaultInitChainer ¶
func DefaultInitChainer(base *BaseApp, req types.RequestInitChain) types.ResponseInitChain
Types ¶
type AccountManager ¶
type AnteHandler ¶
type AnteHandler func(tx Tx, manager AccountManager) error
type AppStateStore ¶
type AppStateStore struct {
// contains filtered or unexported fields
}
func (*AppStateStore) Commit ¶
func (ass *AppStateStore) Commit(lastCommitHash []byte) CommitID
func (*AppStateStore) LastCommitID ¶
func (ass *AppStateStore) LastCommitID() CommitID
func (*AppStateStore) Set ¶
func (ass *AppStateStore) Set(key, value []byte) error
type BaseApp ¶
type BaseApp struct { types.BaseApplication // contains filtered or unexported fields }
func NewBaseApp ¶
func NewBaseApp(name string, caller ContractCaller, manager AccountManager, dir string) *BaseApp
func (*BaseApp) AppVersion ¶
AppVersion returns the application's version string.
func (*BaseApp) BeginBlock ¶
func (app *BaseApp) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
func (*BaseApp) CheckTx ¶
func (app *BaseApp) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx
func (*BaseApp) Commit ¶
func (app *BaseApp) Commit() types.ResponseCommit
func (*BaseApp) DeliverTx ¶
func (app *BaseApp) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx
func (*BaseApp) EndBlock ¶
func (app *BaseApp) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
func (*BaseApp) Info ¶
func (app *BaseApp) Info(req types.RequestInfo) types.ResponseInfo
func (*BaseApp) InitChain ¶
func (app *BaseApp) InitChain(req types.RequestInitChain) (res types.ResponseInitChain)
func (*BaseApp) LastBlockHeight ¶
LastBlockHeight returns the last committed block height.
func (*BaseApp) LastCommitID ¶
LastCommitID returns the last CommitID of the multistore.
func (*BaseApp) Query ¶
func (app *BaseApp) Query(req types.RequestQuery) types.ResponseQuery
func (*BaseApp) SetOption ¶
func (app *BaseApp) SetOption(_ types.RequestSetOption) types.ResponseSetOption
type BeginBlocker ¶
type BeginBlocker func(base *BaseApp, req types.RequestBeginBlock) types.ResponseBeginBlock
BeginBlocker runs code before the transactions in a block
Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g. BFT timestamps rather than block height for any periodic BeginBlock logic
type Committer ¶
type Committer interface { Set([]byte, []byte) error Get([]byte) ([]byte, error) Commit([]byte) CommitID LastCommitID() CommitID }
something that can persist to disk
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (Context) BlockHeader ¶
func (Context) BlockHeight ¶
func (Context) ConsensusParams ¶
func (c Context) ConsensusParams() *types.ConsensusParams
func (Context) IsReCheckTx ¶
func (Context) Value ¶
func (c Context) Value(key interface{}) interface{}
Value is deprecated, provided for backwards compatibility Please use
ctx.Context().Value(key)
instead of
ctx.Value(key)
func (Context) WithBlockHeight ¶
func (Context) WithChainID ¶
func (Context) WithConsensusParams ¶
func (c Context) WithConsensusParams(params *types.ConsensusParams) Context
func (Context) WithIsCheckTx ¶
func (Context) WithIsReCheckTx ¶
WithIsRecheckTx called with true will also set true on checkTx in order to enforce the invariant that if recheckTx = true then checkTx = true as well.
func (Context) WithProposer ¶
func (Context) WithTxBytes ¶
type ContractCaller ¶
type ContractCaller interface { // CallContract sends message to the specified contract container and waits for response CallContract(cId string, args [][]byte) (*pb.ContractOutput, error) // QueryContractList gets all installed contacts QueryContractList() []string }
ContractCaller chats with contracts
type EndBlocker ¶
type EndBlocker func(base *BaseApp, req types.RequestEndBlock) types.ResponseEndBlock
EndBlocker runs code after the transactions in a block and return updates to the validator set
Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g. BFT timestamps rather than block height for any periodic EndBlock logic
type InitChainer ¶
type InitChainer func(base *BaseApp, req types.RequestInitChain) types.ResponseInitChain
InitChainer initializes application state at genesis
type PeerFilter ¶
type PeerFilter func(info string) types.ResponseQuery
PeerFilter responds to p2p filtering queries from Tendermint
type Transaction ¶
type Transaction struct { Contract string Args [][]byte Function string PubKey crypto.PubKey Signature []byte }
func (*Transaction) GetArgs ¶
func (t *Transaction) GetArgs() [][]byte
func (*Transaction) GetContractName ¶
func (t *Transaction) GetContractName() string
func (*Transaction) GetFunctionName ¶
func (t *Transaction) GetFunctionName() string
func (*Transaction) GetSignBytes ¶
func (t *Transaction) GetSignBytes() []byte
func (*Transaction) GetSignature ¶
func (t *Transaction) GetSignature() []byte
func (*Transaction) GetSigner ¶
func (t *Transaction) GetSigner() crypto.Address
func (*Transaction) GetStringArgs ¶
func (t *Transaction) GetStringArgs() []string
func (*Transaction) ValidateBasic ¶
func (t *Transaction) ValidateBasic() error
type Tx ¶
type Tx interface { // Gets the Tx's contract name GetContractName() string // Get the Tx's function name GetFunctionName() string GetArgs() [][]byte GetStringArgs() []string // ValidateBasic does a simple and lightweight validation check that doesn't // require access to any other information. ValidateBasic() error GetSignBytes() []byte // GetSignature the canonical byte representation of the Tx. GetSignature() []byte // GetSigner returns the address of signer that must sign. GetSigner() crypto.Address }
Transactions objects must fulfill the Tx