executor

package
Version: v1.65.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcTreeProve

func CalcTreeProve(db dbm.KV, exec, symbol, rootHash, leaf string) (*mixTy.CommitTreeProve, error)

1. 首先在当前tree查找 2. 如果提供了rootHash,则根据roothash+leaf查找,否则全局遍历查找

func GetName

func GetName() string

GetName return paracross name

func GetPaymentPubKey

func GetPaymentPubKey(db dbm.KV, addr string) (*mixTy.NoteAccountKey, error)

func Init

func Init(name string, cfg *types.Chain33Config, sub []byte)

Init paracross exec register

func InitExecType

func InitExecType()

InitExecType ...

func NewMixTxTable

func NewMixTxTable(kvdb db.KV) *table.Table

NewStageTable 新建表

func VerifyCommitValues

func VerifyCommitValues(inputs []*mixTy.TransferInputCircuit, outputs []*mixTy.TransferOutputCircuit, txFee uint64) bool

Types

type Mix

type Mix struct {
	drivers.DriverBase
}

Mix exec

func (*Mix) CheckTx

func (m *Mix) CheckTx(tx *types.Transaction, index int) error

CheckTx check transaction

func (*Mix) ExecDelLocal_Authorize

func (m *Mix) ExecDelLocal_Authorize(payload *mixTy.MixAuthorizeAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Authorize asset withdraw local db process

func (*Mix) ExecDelLocal_Config

func (m *Mix) ExecDelLocal_Config(payload *mixTy.MixConfigAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Config asset withdraw local db process

func (*Mix) ExecDelLocal_Deposit

func (m *Mix) ExecDelLocal_Deposit(payload *mixTy.MixDepositAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Deposit asset withdraw local db process

func (*Mix) ExecDelLocal_Transfer

func (m *Mix) ExecDelLocal_Transfer(payload *mixTy.MixTransferAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Transfer asset transfer local db process

func (*Mix) ExecDelLocal_Withdraw

func (m *Mix) ExecDelLocal_Withdraw(payload *mixTy.MixWithdrawAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Withdraw asset withdraw local db process

func (*Mix) ExecLocal_Authorize

func (m *Mix) ExecLocal_Authorize(payload *mixTy.MixAuthorizeAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Authorize asset withdraw local db process

func (*Mix) ExecLocal_Config

func (m *Mix) ExecLocal_Config(payload *mixTy.MixConfigAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Config asset withdraw local db process

func (*Mix) ExecLocal_Deposit

func (m *Mix) ExecLocal_Deposit(payload *mixTy.MixDepositAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Deposit asset withdraw local db process

func (*Mix) ExecLocal_Transfer

func (m *Mix) ExecLocal_Transfer(payload *mixTy.MixTransferAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Transfer asset transfer local db process

func (*Mix) ExecLocal_Withdraw

func (m *Mix) ExecLocal_Withdraw(payload *mixTy.MixWithdrawAction, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)

ExecLocal_Withdraw asset withdraw local db process

func (*Mix) Exec_Authorize

func (m *Mix) Exec_Authorize(payload *mixTy.MixAuthorizeAction, tx *types.Transaction, index int) (*types.Receipt, error)

func (*Mix) Exec_Config

func (m *Mix) Exec_Config(payload *mixTy.MixConfigAction, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Commit consensus commit tx exec process

func (*Mix) Exec_Deposit

func (m *Mix) Exec_Deposit(payload *mixTy.MixDepositAction, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Deposit ...

func (*Mix) Exec_Transfer

func (m *Mix) Exec_Transfer(payload *mixTy.MixTransferAction, tx *types.Transaction, index int) (*types.Receipt, error)

func (*Mix) Exec_Withdraw

func (m *Mix) Exec_Withdraw(payload *mixTy.MixWithdrawAction, tx *types.Transaction, index int) (*types.Receipt, error)

Exec_Withdraw ...

func (*Mix) GetDriverName

func (m *Mix) GetDriverName() string

GetDriverName return paracross driver name

func (*Mix) Query_GetLeavesList

func (m *Mix) Query_GetLeavesList(in *mixTy.TreeInfoReq) (types.Message, error)

Query_GetTreeList query paracross title

func (*Mix) Query_GetRootList

func (m *Mix) Query_GetRootList(in *mixTy.TreeInfoReq) (types.Message, error)

Query_GetRootList query title

func (*Mix) Query_GetTreePath

func (m *Mix) Query_GetTreePath(in *mixTy.TreeInfoReq) (types.Message, error)

Query_GetTreePath 根据leaf获取path 证明和roothash

func (*Mix) Query_GetTreeStatus

func (m *Mix) Query_GetTreeStatus(in *mixTy.TreeInfoReq) (types.Message, error)

func (*Mix) Query_ListMixTxs

func (m *Mix) Query_ListMixTxs(in *mixTy.MixTxListReq) (types.Message, error)

Query_ListMixTxs 批量查询

func (*Mix) Query_PaymentPubKey

func (m *Mix) Query_PaymentPubKey(addr *types.ReqString) (types.Message, error)

Query_PaymentPubKey 批量查询

func (*Mix) Query_TokenFeeAddr

func (m *Mix) Query_TokenFeeAddr(req *mixTy.TokenTxFeeAddrReq) (types.Message, error)

Query_TokenFeeAddr 私对私token转账,代扣地址查询, 需预先转账主代币到相应资产地址下面才能完成私对私的转账,代扣地址coins不能提回

func (*Mix) Query_VerifyProof

func (m *Mix) Query_VerifyProof(req *mixTy.VerifyProofInfo) (types.Message, error)

Query_VerifyProof 批量查询

type MixTxRow

type MixTxRow struct {
	*mix.LocalMixTx
}

MixRow table meta 结构

func NewMixTxRow

func NewMixTxRow() *MixTxRow

NewMixTxRow 新建一个meta 结构

func (*MixTxRow) CreateRow

func (r *MixTxRow) CreateRow() *table.Row

CreateRow 新建数据行(注意index 数据一定也要保存到数据中,不能就保存heightindex)

func (*MixTxRow) Get

func (r *MixTxRow) Get(key string) ([]byte, error)

Get 按照indexName 查询 indexValue

func (*MixTxRow) SetPayload

func (r *MixTxRow) SetPayload(data types.Message) error

SetPayload 设置数据

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL