Versions in this module Expand all Collapse all v1 v1.0.0 Jul 13, 2019 Changes in this version + const BloomBitLength + const BloomByteLength + const EvmTx + const InvalidTxType + const ReceiptStatusFailed + const ReceiptStatusSuccessful + var Bloom9 = bloom9 + var EmptyHash = common.Hash + var EmptyTrieHash = new(trie.Trie).Hash() + var ErrInvalidNetworkId = errors.New("invalid network id for signer") + var ErrInvalidSig = errors.New("invalid transaction v, r, s values") + func BloomLookup(bin Bloom, topic bytesBacked) bool + func CalculateMerkleRoot(list interface{}) (h common.Hash) + func DeriveSha(list DerivableList) common.Hash + func LogsBloom(logs []*Log) *big.Int + func Sender(signer Signer, tx *EvmTransaction) (account.Recipient, error) + type Bloom [BloomByteLength]byte + func BytesToBloom(b []byte) Bloom + func CreateBloom(receipts Receipts) Bloom + func (b *Bloom) Add(d *big.Int) + func (b *Bloom) SetBytes(d []byte) + func (b *Bloom) UnmarshalText(input []byte) error + func (b Bloom) Big() *big.Int + func (b Bloom) Bytes() []byte + func (b Bloom) MarshalText() ([]byte, error) + func (b Bloom) Test(test *big.Int) bool + func (b Bloom) TestBytes(test []byte) bool + type ChainMask struct + Value uint32 + func NewChainMask(value uint32) *ChainMask + func (c *ChainMask) ContainBranch(branch account.Branch) bool + func (c *ChainMask) ContainFullShardId(fullShardId uint32) bool + func (c *ChainMask) GetMask() uint32 + func (c *ChainMask) HasOverlap(value uint32) bool + type CrossShardTransactionDeposit struct + From account.Address + GasPrice *serialize.Uint256 + To account.Address + TxHash common.Hash + Value *serialize.Uint256 + type CrossShardTransactionDepositList struct + TXList []*CrossShardTransactionDeposit + type DerivableList interface + Bytes func(i int) []byte + Len func() int + type EIP155Signer struct + func NewEIP155Signer(networkId uint32) EIP155Signer + func (s EIP155Signer) Equal(s2 Signer) bool + func (s EIP155Signer) Hash(tx *EvmTransaction) common.Hash + func (s EIP155Signer) Sender(tx *EvmTransaction) (account.Recipient, error) + func (s EIP155Signer) SignatureValues(tx *EvmTransaction, sig []byte) (R, S, V *big.Int, err error) + type EvmTransaction struct + FromShardsize uint32 + ToShardsize uint32 + func NewEvmContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, ...) *EvmTransaction + func NewEvmTransaction(nonce uint64, to account.Recipient, amount *big.Int, gasLimit uint64, ...) *EvmTransaction + func SignTx(tx *EvmTransaction, s Signer, prv *ecdsa.PrivateKey) (*EvmTransaction, error) + func (e *EvmTransaction) SetGas(data uint64) + func (e *EvmTransaction) SetNonce(data uint64) + func (e *EvmTransaction) SetVRS(v, r, s *big.Int) + func (tx *EvmTransaction) AsMessage(s Signer) (Message, error) + func (tx *EvmTransaction) CheckNonce() bool + func (tx *EvmTransaction) Cost() *big.Int + func (tx *EvmTransaction) Data() []byte + func (tx *EvmTransaction) DecodeRLP(s *rlp.Stream) error + func (tx *EvmTransaction) EncodeRLP(w io.Writer) error + func (tx *EvmTransaction) FromChainID() uint32 + func (tx *EvmTransaction) FromFullShardId() uint32 + func (tx *EvmTransaction) FromFullShardKey() uint32 + func (tx *EvmTransaction) FromShardID() uint32 + func (tx *EvmTransaction) FromShardSize() uint32 + func (tx *EvmTransaction) Gas() uint64 + func (tx *EvmTransaction) GasPrice() *big.Int + func (tx *EvmTransaction) Hash() common.Hash + func (tx *EvmTransaction) IsCrossShard() bool + func (tx *EvmTransaction) NetworkId() uint32 + func (tx *EvmTransaction) Nonce() uint64 + func (tx *EvmTransaction) RawSignatureValues() (*big.Int, *big.Int, *big.Int) + func (tx *EvmTransaction) SetFromShardSize(shardSize uint32) error + func (tx *EvmTransaction) SetToShardSize(shardSize uint32) error + func (tx *EvmTransaction) Size() common.StorageSize + func (tx *EvmTransaction) To() *account.Recipient + func (tx *EvmTransaction) ToChainID() uint32 + func (tx *EvmTransaction) ToFullShardId() uint32 + func (tx *EvmTransaction) ToFullShardKey() uint32 + func (tx *EvmTransaction) ToShardID() uint32 + func (tx *EvmTransaction) ToShardSize() uint32 + func (tx *EvmTransaction) Value() *big.Int + func (tx *EvmTransaction) Version() uint32 + func (tx *EvmTransaction) WithSignature(signer Signer, sig []byte) (*EvmTransaction, error) + type IBlock interface + CoinbaseAmount func() *big.Int + Content func() []IHashable + GetSize func() common.StorageSize + GetTrackingData func() []byte + Hash func() common.Hash + IHeader func() IHeader + NumberU64 func() uint64 + WithMingResult func(nonce uint64, mixDigest common.Hash) IBlock + type IHashable interface + Hash func() common.Hash + type IHeader interface + GetCoinbase func() account.Address + GetCoinbaseAmount func() *big.Int + GetDifficulty func() *big.Int + GetExtra func() []byte + GetMixDigest func() common.Hash + GetNonce func() uint64 + GetParentHash func() common.Hash + GetTime func() uint64 + GetTotalDifficulty func() *big.Int + Hash func() common.Hash + NumberU64 func() uint64 + SealHash func() common.Hash + SetCoinbase func(account.Address) + SetDifficulty func(*big.Int) + SetExtra func([]byte) + SetNonce func(uint64) + type Log struct + BlockHash common.Hash + BlockNumber uint64 + Data []byte + Index uint32 + Recipient account.Recipient + Removed bool + Topics []common.Hash + TxHash common.Hash + TxIndex uint32 + func (l *Log) DecodeRLP(s *rlp.Stream) error + func (l *Log) EncodeRLP(w io.Writer) error + type LogForStorage Log + func (l *LogForStorage) DecodeRLP(s *rlp.Stream) error + func (l *LogForStorage) EncodeRLP(w io.Writer) error + type Message struct + func NewMessage(from common.Address, to *common.Address, nonce uint64, amount *big.Int, ...) Message + func (m Message) CheckNonce() bool + func (m Message) Data() []byte + func (m Message) From() common.Address + func (m Message) FromFullShardKey() uint32 + func (m Message) Gas() uint64 + func (m Message) GasPrice() *big.Int + func (m Message) IsCrossShard() bool + func (m Message) Nonce() uint64 + func (m Message) To() *common.Address + func (m Message) ToFullShardKey() uint32 + func (m Message) TxHash() common.Hash + func (m Message) Value() *big.Int + type MinorBlock struct + ReceivedAt time.Time + ReceivedFrom interface{} + func NewMinorBlock(header *MinorBlockHeader, meta *MinorBlockMeta, txs []*Transaction, ...) *MinorBlock + func NewMinorBlockWithHeader(header *MinorBlockHeader, meta *MinorBlockMeta) *MinorBlock + func (b *MinorBlock) Bloom() Bloom + func (b *MinorBlock) Branch() account.Branch + func (b *MinorBlock) Coinbase() account.Address + func (b *MinorBlock) CoinbaseAmount() *big.Int + func (b *MinorBlock) Content() []IHashable + func (b *MinorBlock) CrossShardGasUsed() *big.Int + func (b *MinorBlock) Deserialize(bb *serialize.ByteBuffer) error + func (b *MinorBlock) Difficulty() *big.Int + func (b *MinorBlock) Extra() []byte + func (b *MinorBlock) GasLimit() *big.Int + func (b *MinorBlock) GasUsed() *big.Int + func (b *MinorBlock) GetMetaData() *MinorBlockMeta + func (b *MinorBlock) GetSize() common.StorageSize + func (b *MinorBlock) GetTrackingData() []byte + func (b *MinorBlock) GetTransactions() Transactions + func (b *MinorBlock) Hash() common.Hash + func (b *MinorBlock) Header() *MinorBlockHeader + func (b *MinorBlock) IHeader() IHeader + func (b *MinorBlock) Meta() *MinorBlockMeta + func (b *MinorBlock) MetaHash() common.Hash + func (b *MinorBlock) MixDigest() common.Hash + func (b *MinorBlock) Nonce() uint64 + func (b *MinorBlock) Number() uint64 + func (b *MinorBlock) NumberU64() uint64 + func (b *MinorBlock) ParentHash() common.Hash + func (b *MinorBlock) PrevRootBlockHash() common.Hash + func (b *MinorBlock) ReceiptHash() common.Hash + func (b *MinorBlock) Root() common.Hash + func (b *MinorBlock) Serialize(w *[]byte) error + func (b *MinorBlock) Size() common.StorageSize + func (b *MinorBlock) Time() uint64 + func (b *MinorBlock) TrackingData() []byte + func (b *MinorBlock) Transaction(hash common.Hash) *Transaction + func (b *MinorBlock) Transactions() Transactions + func (b *MinorBlock) TxHash() common.Hash + func (b *MinorBlock) Version() uint32 + func (b *MinorBlock) WithBody(transactions []*Transaction, trackingData []byte) *MinorBlock + func (b *MinorBlock) WithMingResult(nonce uint64, mixDigest common.Hash) IBlock + func (b *MinorBlock) WithSeal(header *MinorBlockHeader) *MinorBlock + func (h *MinorBlock) AddTx(tx *Transaction) + func (h *MinorBlock) CreateBlockToAppend(createTime *uint64, difficulty *big.Int, address *account.Address, ...) *MinorBlock + func (m *MinorBlock) Finalize(receipts Receipts, rootHash common.Hash, gasUsed *big.Int, ...) + type MinorBlockHeader struct + Bloom Bloom + Branch account.Branch + Coinbase account.Address + CoinbaseAmount *serialize.Uint256 + Difficulty *big.Int + Extra []byte + GasLimit *serialize.Uint256 + MetaHash common.Hash + MixDigest common.Hash + Nonce uint64 + Number uint64 + ParentHash common.Hash + PrevRootBlockHash common.Hash + Time uint64 + Version uint32 + func CopyMinorBlockHeader(h *MinorBlockHeader) *MinorBlockHeader + func (h *MinorBlockHeader) GetBloom() Bloom + func (h *MinorBlockHeader) GetBranch() account.Branch + func (h *MinorBlockHeader) GetCoinbase() account.Address + func (h *MinorBlockHeader) GetCoinbaseAmount() *big.Int + func (h *MinorBlockHeader) GetDifficulty() *big.Int + func (h *MinorBlockHeader) GetExtra() []byte + func (h *MinorBlockHeader) GetGasLimit() *big.Int + func (h *MinorBlockHeader) GetMetaHash() common.Hash + func (h *MinorBlockHeader) GetMixDigest() common.Hash + func (h *MinorBlockHeader) GetNonce() uint64 + func (h *MinorBlockHeader) GetParentHash() common.Hash + func (h *MinorBlockHeader) GetPrevRootBlockHash() common.Hash + func (h *MinorBlockHeader) GetTime() uint64 + func (h *MinorBlockHeader) GetTotalDifficulty() *big.Int + func (h *MinorBlockHeader) Hash() common.Hash + func (h *MinorBlockHeader) NumberU64() uint64 + func (h *MinorBlockHeader) SealHash() common.Hash + func (h *MinorBlockHeader) SetCoinbase(addr account.Address) + func (h *MinorBlockHeader) SetDifficulty(difficulty *big.Int) + func (h *MinorBlockHeader) SetExtra(data []byte) + func (h *MinorBlockHeader) SetNonce(nonce uint64) + func (h *MinorBlockHeader) Size() common.StorageSize + type MinorBlockHeaders []*MinorBlockHeader + func MinorHeaderDifference(a, b MinorBlockHeaders) MinorBlockHeaders + func (s MinorBlockHeaders) Bytes(i int) []byte + func (s MinorBlockHeaders) Len() int + func (s MinorBlockHeaders) Swap(i, j int) + type MinorBlockMeta struct + CrossShardGasUsed *serialize.Uint256 + GasUsed *serialize.Uint256 + ReceiptHash common.Hash + Root common.Hash + TxHash common.Hash + func CopyMinorBlockMeta(m *MinorBlockMeta) *MinorBlockMeta + func (m *MinorBlockMeta) Hash() common.Hash + type Receipt struct + Bloom Bloom + ContractAddress account.Recipient + ContractFullShardId uint32 + CumulativeGasUsed uint64 + GasUsed uint64 + Logs []*Log + PostState []byte + Status uint64 + TxHash common.Hash + func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt + func (r *Receipt) DecodeRLP(s *rlp.Stream) error + func (r *Receipt) Deserialize(bb *serialize.ByteBuffer) error + func (r *Receipt) EncodeRLP(w io.Writer) error + func (r *Receipt) GetPrevGasUsed() uint64 + func (r *Receipt) Serialize(w *[]byte) error + func (r *Receipt) Size() common.StorageSize + type ReceiptForStorage Receipt + func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error + func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error + type Receipts []*Receipt + func (r Receipts) Bytes(i int) []byte + func (r Receipts) Len() int + type RootBlock struct + ReceivedAt time.Time + ReceivedFrom interface{} + func NewRootBlock(header *RootBlockHeader, mbHeaders MinorBlockHeaders, trackingdata []byte) *RootBlock + func NewRootBlockWithHeader(header *RootBlockHeader) *RootBlock + func (b *RootBlock) AddMinorBlockHeader(header *MinorBlockHeader) + func (b *RootBlock) Coinbase() account.Address + func (b *RootBlock) CoinbaseAmount() *big.Int + func (b *RootBlock) Content() []IHashable + func (b *RootBlock) Deserialize(bb *serialize.ByteBuffer) error + func (b *RootBlock) Difficulty() *big.Int + func (b *RootBlock) ExtendMinorBlockHeaderList(headers []*MinorBlockHeader) + func (b *RootBlock) Extra() []byte + func (b *RootBlock) Finalize(coinbaseAmount *big.Int, coinbaseAddress *account.Address) *RootBlock + func (b *RootBlock) GetSize() common.StorageSize + func (b *RootBlock) GetTrackingData() []byte + func (b *RootBlock) Hash() common.Hash + func (b *RootBlock) Header() *RootBlockHeader + func (b *RootBlock) IHeader() IHeader + func (b *RootBlock) MinorBlockHeader(hash common.Hash) *MinorBlockHeader + func (b *RootBlock) MinorBlockHeaders() MinorBlockHeaders + func (b *RootBlock) MinorHeaderHash() common.Hash + func (b *RootBlock) MixDigest() common.Hash + func (b *RootBlock) Nonce() uint64 + func (b *RootBlock) Number() uint32 + func (b *RootBlock) NumberU64() uint64 + func (b *RootBlock) ParentHash() common.Hash + func (b *RootBlock) Serialize(w *[]byte) error + func (b *RootBlock) Signature() [65]byte + func (b *RootBlock) Size() common.StorageSize + func (b *RootBlock) Time() uint64 + func (b *RootBlock) TotalDifficulty() *big.Int + func (b *RootBlock) TrackingData() []byte + func (b *RootBlock) Version() uint32 + func (b *RootBlock) WithBody(minorBlockHeaders MinorBlockHeaders, trackingdata []byte) *RootBlock + func (b *RootBlock) WithMingResult(nonce uint64, mixDigest common.Hash) IBlock + func (b *RootBlock) WithSeal(header *RootBlockHeader) *RootBlock + type RootBlockHeader struct + Coinbase account.Address + CoinbaseAmount *serialize.Uint256 + Difficulty *big.Int + Extra []byte + MinorHeaderHash common.Hash + MixDigest common.Hash + Nonce uint64 + Number uint32 + ParentHash common.Hash + Signature [65]byte + Time uint64 + ToTalDifficulty *big.Int + Version uint32 + func CopyRootBlockHeader(h *RootBlockHeader) *RootBlockHeader + func (h *RootBlockHeader) CreateBlockToAppend(createTime *uint64, difficulty *big.Int, address *account.Address, ...) *RootBlock + func (h *RootBlockHeader) GetCoinbase() account.Address + func (h *RootBlockHeader) GetCoinbaseAmount() *big.Int + func (h *RootBlockHeader) GetDifficulty() *big.Int + func (h *RootBlockHeader) GetExtra() []byte + func (h *RootBlockHeader) GetMixDigest() common.Hash + func (h *RootBlockHeader) GetNonce() uint64 + func (h *RootBlockHeader) GetParentHash() common.Hash + func (h *RootBlockHeader) GetTime() uint64 + func (h *RootBlockHeader) GetTotalDifficulty() *big.Int + func (h *RootBlockHeader) Hash() common.Hash + func (h *RootBlockHeader) NumberU64() uint64 + func (h *RootBlockHeader) SealHash() common.Hash + func (h *RootBlockHeader) SetCoinbase(addr account.Address) + func (h *RootBlockHeader) SetDifficulty(difficulty *big.Int) + func (h *RootBlockHeader) SetExtra(data []byte) + func (h *RootBlockHeader) SetNonce(nonce uint64) + func (h *RootBlockHeader) SignWithPrivateKey(prv *ecdsa.PrivateKey) error + func (h *RootBlockHeader) Size() common.StorageSize + type Signer interface + Equal func(Signer) bool + Hash func(tx *EvmTransaction) common.Hash + Sender func(tx *EvmTransaction) (account.Recipient, error) + SignatureValues func(tx *EvmTransaction, sig []byte) (r, s, v *big.Int, err error) + func MakeSigner(networkId uint32) Signer + type Transaction struct + EvmTx *EvmTransaction + TxType uint8 + func (tx *Transaction) Deserialize(bb *serialize.ByteBuffer) error + func (tx *Transaction) Hash() (h common.Hash) + func (tx *Transaction) Sender(signer Signer) (account.Recipient, error) + func (tx *Transaction) Serialize(w *[]byte) error + type Transactions []*Transaction + func TxDifference(a, b Transactions) Transactions + func (s Transactions) Bytes(i int) []byte + func (s Transactions) Len() int + func (s Transactions) Swap(i, j int) + type TransactionsByPriceAndNonce struct + func NewTransactionsByPriceAndNonce(signer Signer, txs map[account.Recipient]Transactions) (*TransactionsByPriceAndNonce, error) + func (t *TransactionsByPriceAndNonce) Peek() *Transaction + func (t *TransactionsByPriceAndNonce) Pop() + func (t *TransactionsByPriceAndNonce) Shift() error + type TxByNonce Transactions + func (s TxByNonce) Len() int + func (s TxByNonce) Less(i, j int) bool + func (s TxByNonce) Swap(i, j int) + type TxByPrice Transactions + func (s *TxByPrice) Pop() interface{} + func (s *TxByPrice) Push(x interface{}) + func (s TxByPrice) Len() int + func (s TxByPrice) Less(i, j int) bool + func (s TxByPrice) Swap(i, j int)