Documentation ¶
Overview ¶
Package blockchain implements common blockchain concepts and logic to store them for the Lisk protocol. Block, Transaction, Asset, Event are handled in this package.
Index ¶
- Constants
- Variables
- func CalculateEventRoot(events []*Event) ([]byte, error)
- func DBPrefixToBytes(prefix DBPrefix) []byte
- func NewStandardTransactionEventData(success bool) []byte
- func SortBlockByHeightAsc(blocks []*Block)
- func SortBlockByHeightDesc(blocks []*Block)
- func ValidateBlockSignature(publicKey, signature, chainID, signingBytes []byte) bool
- type AggregateCommit
- func (e *AggregateCommit) Decode(data []byte) error
- func (e *AggregateCommit) DecodeFromReader(reader *codec.Reader) error
- func (e *AggregateCommit) DecodeStrict(data []byte) error
- func (e *AggregateCommit) DecodeStrictFromReader(reader *codec.Reader) error
- func (c *AggregateCommit) Empty() bool
- func (e *AggregateCommit) Encode() []byte
- func (e *AggregateCommit) MustDecode(data []byte)
- type Block
- func (e *Block) Decode(data []byte) error
- func (e *Block) DecodeFromReader(reader *codec.Reader) error
- func (e *Block) DecodeStrict(data []byte) error
- func (e *Block) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *Block) Encode() []byte
- func (b *Block) Init()
- func (e *Block) MustDecode(data []byte)
- func (b *Block) Validate() error
- func (b *Block) ValidateGenesis() error
- type BlockAsset
- func (e *BlockAsset) Decode(data []byte) error
- func (e *BlockAsset) DecodeFromReader(reader *codec.Reader) error
- func (e *BlockAsset) DecodeStrict(data []byte) error
- func (e *BlockAsset) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *BlockAsset) Encode() []byte
- func (e *BlockAsset) MustDecode(data []byte)
- type BlockAssets
- type BlockHeader
- func (e *BlockHeader) Decode(data []byte) error
- func (e *BlockHeader) DecodeFromReader(reader *codec.Reader) error
- func (e *BlockHeader) DecodeStrict(data []byte) error
- func (e *BlockHeader) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *BlockHeader) Encode() []byte
- func (b *BlockHeader) Init()
- func (e *BlockHeader) MustDecode(data []byte)
- func (b *BlockHeader) Readonly() SealedBlockHeader
- func (b *BlockHeader) Sign(chainID, privateKey []byte)
- func (b *BlockHeader) SigningBytes() []byte
- func (b *BlockHeader) Validate() error
- func (b *BlockHeader) ValidateGenesis() error
- func (b *BlockHeader) VerifySignature(chainID, publicKey []byte) bool
- type Chain
- func (c *Chain) AddBlock(batch *db.Batch, block *Block, events []*Event, finalizedHeight uint32, ...) error
- func (c *Chain) ChainID() []byte
- func (c *Chain) DataAccess() *DataAccess
- func (c *Chain) GenesisBlockExist(block *Block) (bool, error)
- func (c *Chain) GetLastNBlocks(n int) ([]*Block, error)
- func (c *Chain) Init(genesisBlock *Block, db *db.DB)
- func (c *Chain) LastBlock() *Block
- func (c *Chain) PrepareCache() error
- func (c *Chain) RemoveBlock(batch *db.Batch, saveTemp bool) error
- type ChainConfig
- type DBPrefix
- type DataAccess
- func (d *DataAccess) Cache(block *Block) error
- func (d *DataAccess) Cached(height uint32) bool
- func (d *DataAccess) CachedLastBlock() *Block
- func (d *DataAccess) ClearTempBlocks()
- func (d *DataAccess) GetBlock(id []byte) (*Block, error)
- func (d *DataAccess) GetBlockByHeight(height uint32) (*Block, error)
- func (d *DataAccess) GetBlockHeader(id []byte) (*BlockHeader, error)
- func (d *DataAccess) GetBlockHeaderByHeight(height uint32) (*BlockHeader, error)
- func (d *DataAccess) GetBlockHeaders(ids [][]byte) ([]*BlockHeader, error)
- func (d *DataAccess) GetBlockHeadersByHeights(heights []uint32) ([]*BlockHeader, error)
- func (d *DataAccess) GetBlocksBetweenHeight(from, to uint32) ([]*Block, error)
- func (d *DataAccess) GetEvents(height uint32) ([]*Event, error)
- func (d *DataAccess) GetFinalizedHeight() (uint32, error)
- func (d *DataAccess) GetLastBlock() (*Block, error)
- func (d *DataAccess) GetLastBlockHeader() (*BlockHeader, error)
- func (d *DataAccess) GetTempBlocks() ([]*Block, error)
- func (d *DataAccess) GetTransaction(id []byte) (*Transaction, error)
- func (d *DataAccess) GetTransactions(ids [][]byte) ([]*Transaction, error)
- func (d *DataAccess) RemoveCache()
- type Event
- func (e *Event) Decode(data []byte) error
- func (e *Event) DecodeFromReader(reader *codec.Reader) error
- func (e *Event) DecodeStrict(data []byte) error
- func (e *Event) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *Event) Encode() []byte
- func (e *Event) KeyPairs() []EventKeyPair
- func (e *Event) MustDecode(data []byte)
- func (e *Event) UpdateID() []byte
- func (e *Event) Validate() error
- type EventKeyPair
- type Events
- type FrozenTransaction
- type RawBlock
- func (e *RawBlock) Decode(data []byte) error
- func (e *RawBlock) DecodeFromReader(reader *codec.Reader) error
- func (e *RawBlock) DecodeStrict(data []byte) error
- func (e *RawBlock) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *RawBlock) Encode() []byte
- func (e *RawBlock) MustDecode(data []byte)
- type ReadableBlockAssets
- type ReadableBlockHeader
- type SealedBlockHeader
- type SigningTransaction
- func (e *SigningTransaction) Decode(data []byte) error
- func (e *SigningTransaction) DecodeFromReader(reader *codec.Reader) error
- func (e *SigningTransaction) DecodeStrict(data []byte) error
- func (e *SigningTransaction) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *SigningTransaction) Encode() []byte
- func (e *SigningTransaction) MustDecode(data []byte)
- type StandardTransactionEvent
- func (e *StandardTransactionEvent) Decode(data []byte) error
- func (e *StandardTransactionEvent) DecodeFromReader(reader *codec.Reader) error
- func (e *StandardTransactionEvent) DecodeStrict(data []byte) error
- func (e *StandardTransactionEvent) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *StandardTransactionEvent) Encode() []byte
- func (e *StandardTransactionEvent) MustDecode(data []byte)
- type Transaction
- func (t *Transaction) Bytes() []byte
- func (t *Transaction) Copy() *Transaction
- func (e *Transaction) Decode(data []byte) error
- func (e *Transaction) DecodeFromReader(reader *codec.Reader) error
- func (e *Transaction) DecodeStrict(data []byte) error
- func (e *Transaction) DecodeStrictFromReader(reader *codec.Reader) error
- func (e *Transaction) Encode() []byte
- func (t *Transaction) Freeze() FrozenTransaction
- func (t *Transaction) GetSignature(chainID, privateKey []byte) []byte
- func (t *Transaction) Init()
- func (e *Transaction) MustDecode(data []byte)
- func (t *Transaction) SenderAddress() codec.Lisk32
- func (t *Transaction) SigningBytes() []byte
- func (t *Transaction) Size() int
- func (t *Transaction) Validate() error
- type WritableBlockAssets
Constants ¶
const ( EventMaxSizeBytes uint32 = 1024 EventTotalIndexLengthBytes uint32 = (eventIndexLengthBits + eventTopicIndexLengthBits) / 8 EventIDLengthBytes uint32 = 4 + EventTotalIndexLengthBytes )
const (
GenesisBlockVersion = 0
)
const (
MaxTransactionParamsSize = 14 * 1024
)
Variables ¶
var ( AddressLength = 20 IDLength = 32 )
var ( EventNameDefault = "commandExecutionResult" EventMaxTopicsPerEvent = uint32(math.Pow(binaryBase, float64(eventTopicIndexLengthBits))) MaxEventsPerBlock = uint32(math.Pow(binaryBase, float64(eventIndexLengthBits))) )
var ( TagBlockHeader = []byte("LSK_BH_") TagTransaction = []byte("LSK_TX_") )
Functions ¶
func CalculateEventRoot ¶
func DBPrefixToBytes ¶
DBPrefixToBytes aconverts prefix to slice.
func SortBlockByHeightAsc ¶
func SortBlockByHeightAsc(blocks []*Block)
SortBlockByHeightAsc sorts block with height asc.
func SortBlockByHeightDesc ¶
func SortBlockByHeightDesc(blocks []*Block)
SortBlockByHeightDesc sorts block with height desc.
func ValidateBlockSignature ¶
Types ¶
type AggregateCommit ¶
type AggregateCommit struct { Height uint32 `json:"height" fieldNumber:"1"` AggregationBits codec.Hex `json:"aggregationBits" fieldNumber:"2"` CertificateSignature codec.Hex `json:"certificateSignature" fieldNumber:"3"` }
func (*AggregateCommit) Decode ¶
func (e *AggregateCommit) Decode(data []byte) error
func (*AggregateCommit) DecodeFromReader ¶
func (e *AggregateCommit) DecodeFromReader(reader *codec.Reader) error
func (*AggregateCommit) DecodeStrict ¶
func (e *AggregateCommit) DecodeStrict(data []byte) error
func (*AggregateCommit) DecodeStrictFromReader ¶
func (e *AggregateCommit) DecodeStrictFromReader(reader *codec.Reader) error
func (*AggregateCommit) Empty ¶
func (c *AggregateCommit) Empty() bool
func (*AggregateCommit) Encode ¶
func (e *AggregateCommit) Encode() []byte
func (*AggregateCommit) MustDecode ¶
func (e *AggregateCommit) MustDecode(data []byte)
type Block ¶
type Block struct { Header *BlockHeader `fieldNumber:"1" json:"header"` Transactions []*Transaction `fieldNumber:"2" json:"transactions"` Assets []*BlockAsset `fieldNumber:"3" json:"assets"` }
Block is an envelope for header and payload.
func NewGenesisBlock ¶
func NewGenesisBlock(height, timestamp uint32, previoudBlockID codec.Hex, assets BlockAssets) *Block
NewGenesisBlock returns a valid genesis block but without validatorsHash and stateRoot.
func (*Block) DecodeStrict ¶
func (*Block) DecodeStrictFromReader ¶
func (*Block) Init ¶
func (b *Block) Init()
Init the calculated value if decoded directly without NewBlock.
func (*Block) MustDecode ¶
func (*Block) ValidateGenesis ¶
ValidateGenesis validates block specific for genesis.
type BlockAsset ¶
type BlockAsset struct { Module string `fieldNumber:"1" json:"module"` Data codec.Hex `fieldNumber:"2" json:"data"` }
func NewBlockAsset ¶
func NewBlockAsset(val []byte) (*BlockAsset, error)
func (*BlockAsset) Decode ¶
func (e *BlockAsset) Decode(data []byte) error
func (*BlockAsset) DecodeFromReader ¶
func (e *BlockAsset) DecodeFromReader(reader *codec.Reader) error
func (*BlockAsset) DecodeStrict ¶
func (e *BlockAsset) DecodeStrict(data []byte) error
func (*BlockAsset) DecodeStrictFromReader ¶
func (e *BlockAsset) DecodeStrictFromReader(reader *codec.Reader) error
func (*BlockAsset) Encode ¶
func (e *BlockAsset) Encode() []byte
func (*BlockAsset) MustDecode ¶
func (e *BlockAsset) MustDecode(data []byte)
type BlockAssets ¶
type BlockAssets []*BlockAsset
func (BlockAssets) GetRoot ¶
func (a BlockAssets) GetRoot() []byte
func (*BlockAssets) SetAsset ¶
func (a *BlockAssets) SetAsset(module string, data []byte)
func (*BlockAssets) Sort ¶
func (a *BlockAssets) Sort()
func (BlockAssets) Valid ¶
func (a BlockAssets) Valid() error
type BlockHeader ¶
type BlockHeader struct { ID codec.Hex `json:"id"` Version uint32 `json:"version" fieldNumber:"1"` Timestamp uint32 `json:"timestamp" fieldNumber:"2"` Height uint32 `json:"height" fieldNumber:"3"` PreviousBlockID codec.Hex `json:"previousBlockID" fieldNumber:"4"` GeneratorAddress codec.Lisk32 `json:"generatorAddress" fieldNumber:"5"` TransactionRoot codec.Hex `json:"transactionRoot" fieldNumber:"6"` AssetRoot codec.Hex `json:"assetRoot" fieldNumber:"7"` EventRoot codec.Hex `json:"eventRoot" fieldNumber:"8"` StateRoot codec.Hex `json:"stateRoot" fieldNumber:"9"` MaxHeightPrevoted uint32 `json:"maxHeightPrevoted" fieldNumber:"10"` MaxHeightGenerated uint32 `json:"maxHeightGenerated" fieldNumber:"11"` ImpliesMaxPrevotes bool `json:"impliesMaxPrevotes" fieldNumber:"12"` ValidatorsHash codec.Hex `json:"validatorsHash" fieldNumber:"13"` AggregateCommit *AggregateCommit `json:"aggregateCommit" fieldNumber:"14"` Signature codec.Hex `json:"signature" fieldNumber:"15"` }
BlockHeader holds general block header regardless of version.
func NewBlockHeader ¶
func NewBlockHeader(value []byte) (*BlockHeader, error)
NewBlockHeader create blockheader instance from encoded value.
func NewBlockHeaderWithValues ¶
func NewBlockHeaderWithValues( version uint32, timestamp uint32, height uint32, previousBlockID []byte, assetRoot []byte, stateRoot []byte, maxHeightPrevoted uint32, maxHeightPreviouslyForged uint32, transactionRoot []byte, generatorPublicKey []byte, validatorHash []byte, aggregateCommit *AggregateCommit, signature []byte, ) (*BlockHeader, error)
func (*BlockHeader) Decode ¶
func (e *BlockHeader) Decode(data []byte) error
func (*BlockHeader) DecodeFromReader ¶
func (e *BlockHeader) DecodeFromReader(reader *codec.Reader) error
func (*BlockHeader) DecodeStrict ¶
func (e *BlockHeader) DecodeStrict(data []byte) error
func (*BlockHeader) DecodeStrictFromReader ¶
func (e *BlockHeader) DecodeStrictFromReader(reader *codec.Reader) error
func (*BlockHeader) Encode ¶
func (e *BlockHeader) Encode() []byte
func (*BlockHeader) Init ¶
func (b *BlockHeader) Init()
func (*BlockHeader) MustDecode ¶
func (e *BlockHeader) MustDecode(data []byte)
func (*BlockHeader) Readonly ¶
func (b *BlockHeader) Readonly() SealedBlockHeader
func (*BlockHeader) Sign ¶
func (b *BlockHeader) Sign(chainID, privateKey []byte)
func (*BlockHeader) SigningBytes ¶
func (b *BlockHeader) SigningBytes() []byte
SigningBytes return signed part of the block header.
func (*BlockHeader) Validate ¶
func (b *BlockHeader) Validate() error
Validate block header property.
func (*BlockHeader) ValidateGenesis ¶
func (b *BlockHeader) ValidateGenesis() error
ValidateGenesis validates block header specific for genesis.
func (*BlockHeader) VerifySignature ¶
func (b *BlockHeader) VerifySignature(chainID, publicKey []byte) bool
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain holds information of a particular chain.
func (*Chain) AddBlock ¶
func (c *Chain) AddBlock(batch *db.Batch, block *Block, events []*Event, finalizedHeight uint32, removeTemp bool) error
AddBlock adds a block on top of the current chain.
func (*Chain) DataAccess ¶
func (c *Chain) DataAccess() *DataAccess
DataAccess returns access to DB.
func (*Chain) GenesisBlockExist ¶
GenesisBlockExist returns true if matching genesis block exist.
func (*Chain) GetLastNBlocks ¶
GetLastNBlock returns latest N blocks exists.
type ChainConfig ¶
type ChainConfig struct { ChainID codec.Hex MaxTransactionsLength uint32 MaxBlockCache int KeepEventsForHeights int }
ChainConfig is for config value of chain.
type DataAccess ¶
type DataAccess struct {
// contains filtered or unexported fields
}
DataAccess gives access to the blockchain data.
func NewDataAccess ¶
func NewDataAccess(db *db.DB, maxCacheSize, keepEventsForHeights int) *DataAccess
NewDataAccess returns new instance of data access.
func (*DataAccess) Cached ¶
func (d *DataAccess) Cached(height uint32) bool
func (*DataAccess) CachedLastBlock ¶
func (d *DataAccess) CachedLastBlock() *Block
CachedLastBlock returns the latest block without popping.
func (*DataAccess) ClearTempBlocks ¶
func (d *DataAccess) ClearTempBlocks()
ClearTempBlocks removes all temp blocks.
func (*DataAccess) GetBlock ¶
func (d *DataAccess) GetBlock(id []byte) (*Block, error)
GetBlock returns a block by id if exist.
func (*DataAccess) GetBlockByHeight ¶
func (d *DataAccess) GetBlockByHeight(height uint32) (*Block, error)
GetBlockByHeight returns block by height.
func (*DataAccess) GetBlockHeader ¶
func (d *DataAccess) GetBlockHeader(id []byte) (*BlockHeader, error)
GetBlockHeader returns block header if data exists.
func (*DataAccess) GetBlockHeaderByHeight ¶
func (d *DataAccess) GetBlockHeaderByHeight(height uint32) (*BlockHeader, error)
GetBlockHeaderByHeight returns block header with height.
func (*DataAccess) GetBlockHeaders ¶
func (d *DataAccess) GetBlockHeaders(ids [][]byte) ([]*BlockHeader, error)
GetBlockHeaders returns all block header with id if exist.
func (*DataAccess) GetBlockHeadersByHeights ¶
func (d *DataAccess) GetBlockHeadersByHeights(heights []uint32) ([]*BlockHeader, error)
GetBlockHeadersByHeights returns all block header with heights.
func (*DataAccess) GetBlocksBetweenHeight ¶
func (d *DataAccess) GetBlocksBetweenHeight(from, to uint32) ([]*Block, error)
GetBlocksBetweenHeight returns all block between the height.
func (*DataAccess) GetFinalizedHeight ¶
func (d *DataAccess) GetFinalizedHeight() (uint32, error)
func (*DataAccess) GetLastBlock ¶
func (d *DataAccess) GetLastBlock() (*Block, error)
GetLastBlock of the blockcchain.
func (*DataAccess) GetLastBlockHeader ¶
func (d *DataAccess) GetLastBlockHeader() (*BlockHeader, error)
GetLastBlockHeader returns last block header.
func (*DataAccess) GetTempBlocks ¶
func (d *DataAccess) GetTempBlocks() ([]*Block, error)
GetTempBlocks returns all temp block exisst.
func (*DataAccess) GetTransaction ¶
func (d *DataAccess) GetTransaction(id []byte) (*Transaction, error)
GetTransaction return transaction by id.
func (*DataAccess) GetTransactions ¶
func (d *DataAccess) GetTransactions(ids [][]byte) ([]*Transaction, error)
GetTransaction return transaction by id.
func (*DataAccess) RemoveCache ¶
func (d *DataAccess) RemoveCache()
RemoveCache removes last block from cache.
type Event ¶
type Event struct { ID codec.Hex `json:"id"` Module string `fieldNumber:"1" json:"module"` Name string `fieldNumber:"2" json:"name"` Data codec.Hex `fieldNumber:"3" json:"data"` Topics []codec.Hex `fieldNumber:"4" json:"topics"` Height uint32 `fieldNumber:"5" json:"height"` Index uint32 `fieldNumber:"6" json:"index"` }
func NewEventFromValues ¶
func (*Event) DecodeStrict ¶
func (*Event) DecodeStrictFromReader ¶
func (*Event) KeyPairs ¶
func (e *Event) KeyPairs() []EventKeyPair
func (*Event) MustDecode ¶
type FrozenTransaction ¶
type RawBlock ¶
type RawBlock struct { Header []byte `fieldNumber:"1"` Transactions [][]byte `fieldNumber:"2"` Assets [][]byte `fieldNumber:"3"` }
RawBlock represents a envelope of a block header.
func (*RawBlock) DecodeStrict ¶
func (*RawBlock) DecodeStrictFromReader ¶
func (*RawBlock) MustDecode ¶
type ReadableBlockAssets ¶
type ReadableBlockHeader ¶
type SealedBlockHeader ¶
type SigningTransaction ¶
type SigningTransaction struct { Module string `fieldNumber:"1"` Command string `fieldNumber:"2"` Nonce uint64 `fieldNumber:"3"` Fee uint64 `fieldNumber:"4"` SenderPublicKey []byte `fieldNumber:"5"` Params []byte `fieldNumber:"6"` }
SigningTransaction holds signed part of the transaction.
func (*SigningTransaction) Decode ¶
func (e *SigningTransaction) Decode(data []byte) error
func (*SigningTransaction) DecodeFromReader ¶
func (e *SigningTransaction) DecodeFromReader(reader *codec.Reader) error
func (*SigningTransaction) DecodeStrict ¶
func (e *SigningTransaction) DecodeStrict(data []byte) error
func (*SigningTransaction) DecodeStrictFromReader ¶
func (e *SigningTransaction) DecodeStrictFromReader(reader *codec.Reader) error
func (*SigningTransaction) Encode ¶
func (e *SigningTransaction) Encode() []byte
func (*SigningTransaction) MustDecode ¶
func (e *SigningTransaction) MustDecode(data []byte)
type StandardTransactionEvent ¶
type StandardTransactionEvent struct {
Success bool `fieldNumber:"1"`
}
func (*StandardTransactionEvent) Decode ¶
func (e *StandardTransactionEvent) Decode(data []byte) error
func (*StandardTransactionEvent) DecodeFromReader ¶
func (e *StandardTransactionEvent) DecodeFromReader(reader *codec.Reader) error
func (*StandardTransactionEvent) DecodeStrict ¶
func (e *StandardTransactionEvent) DecodeStrict(data []byte) error
func (*StandardTransactionEvent) DecodeStrictFromReader ¶
func (e *StandardTransactionEvent) DecodeStrictFromReader(reader *codec.Reader) error
func (*StandardTransactionEvent) Encode ¶
func (e *StandardTransactionEvent) Encode() []byte
func (*StandardTransactionEvent) MustDecode ¶
func (e *StandardTransactionEvent) MustDecode(data []byte)
type Transaction ¶
type Transaction struct { ID codec.Hex `json:"id"` Module string `json:"module" fieldNumber:"1"` Command string `json:"commandID" fieldNumber:"2"` Nonce uint64 `json:"nonce,string" fieldNumber:"3"` Fee uint64 `json:"fee,string" fieldNumber:"4"` SenderPublicKey codec.Hex `json:"senderPublicKey" fieldNumber:"5"` Params codec.Hex `json:"params" fieldNumber:"6"` Signatures []codec.Hex `json:"signatures" fieldNumber:"7"` // contains filtered or unexported fields }
Transaction holds general transaction.
func NewTransaction ¶
func NewTransaction(value []byte) (*Transaction, error)
NewTransaction creates instance from decoded value.
func (*Transaction) Copy ¶
func (t *Transaction) Copy() *Transaction
func (*Transaction) Decode ¶
func (e *Transaction) Decode(data []byte) error
func (*Transaction) DecodeFromReader ¶
func (e *Transaction) DecodeFromReader(reader *codec.Reader) error
func (*Transaction) DecodeStrict ¶
func (e *Transaction) DecodeStrict(data []byte) error
func (*Transaction) DecodeStrictFromReader ¶
func (e *Transaction) DecodeStrictFromReader(reader *codec.Reader) error
func (*Transaction) Encode ¶
func (e *Transaction) Encode() []byte
func (*Transaction) Freeze ¶
func (t *Transaction) Freeze() FrozenTransaction
Bytes return transaction in bytes.
func (*Transaction) GetSignature ¶
func (t *Transaction) GetSignature(chainID, privateKey []byte) []byte
func (*Transaction) Init ¶
func (t *Transaction) Init()
func (*Transaction) MustDecode ¶
func (e *Transaction) MustDecode(data []byte)
func (*Transaction) SenderAddress ¶
func (t *Transaction) SenderAddress() codec.Lisk32
func (*Transaction) SigningBytes ¶
func (t *Transaction) SigningBytes() []byte
SigningBytes return signed byte so the transaction.
func (*Transaction) Validate ¶
func (t *Transaction) Validate() error
Validate transaction statically.
type WritableBlockAssets ¶
type WritableBlockAssets interface { ReadableBlockAssets SetAsset(module string, data []byte) }