package
0.0.0-20201217075903-aecdb050f89d
Repository: https://github.com/lvbin2012/neuralchain.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
BytesToBloom converts a byte slice to a bloom filter.
No description provided by the author
CopyHeader creates a deep copy of a block header to prevent side effects from modifying a header variable.
No description provided by the author
No description provided by the author
EncodeNonce converts the given integer to a block nonce.
ExtractTendermintExtra extracts all values of the TendermintExtra from the header.
No description provided by the author
MakeSigner returns a Signer based on the given chain config and block number.
NewBlock creates a new block.
NewBlockWithHeader creates a block with the given header data.
NewContractCreation create new instance of the tx with contract creation.
TODO: add new message with gas payer so user can use neut_call with enterprise contract.
NewModifyProvidersTransaction create a new transaction to add/remove provider.
No description provided by the author
NewReceipt creates a barebone transaction receipt, copying the init fields.
No description provided by the author
NewTransactionsByPriceAndNonce creates a transaction set that can retrieve price sorted transactions in a nonce-honouring way.
No description provided by the author
Provider returns the address derived from the signature (V, R, S) using secp256k1 If there is no provider signature, it will return nil address pointer and nill error.
ProviderSignTx signs the transaction using the given signer and private key.
Sender returns the address derived from the signature (V, R, S) using secp256k1 elliptic curve and an error if it failed deriving or upon an incorrect signature.
SignTx signs the transaction using the given signer and private key.
TendermintFilteredHeader returns a filtered header which some information (like seal, committed seals) are clean to fulfill the Tendermint hash rules.
TxDifference returns a new set which is the difference between a and b.
# Constants
No description provided by the author
BloomBitLength represents the number of bits used in a header log bloom.
BloomByteLength represents the number of bytes used in a header log bloom.
No description provided by the author
ReceiptStatusFailed is the status code of a transaction if execution failed.
ReceiptStatusSuccessful is the status code of a transaction if execution succeeded.
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
ErrEmptyOwner is returned if owner is 0.
ErrEmptyProvider is returned if provider is 0.
No description provided by the author
ErrInvalidExtraDataType is returned if extra data type is invalid.
No description provided by the author
ErrInvalidTendermintHeaderExtra is returned if the length of extra-data is less than 32 bytes.
ErrOwnerRequired is returned if the transaction to create contract with a provider but not contains an owner.
ErrRedundantProviderSignature is returned if the transaction create contract or modify provider but have a provider signature.
TendermintDigest to identify whether the block is from Tendermint consensus engineTODO: Add digest for our consensus, Digest represents a hash of "".
TendermintExtraSeal Fixed number of extra-data bytes reserved for validator seal Each seal is exactly 65 bytes.
TendermintExtraVanity Fixed number of extra-data bytes reserved for validator vanity A Tendermint's Header.Extra is : <normal ExtraData> + 0x00 til first 32 bytes + n.
# Structs
No description provided by the author
Block represents an entire block in the NeuralChain blockchain.
Body is a simple (mutable, non-safe) data container for storing and moving a block's data contents (transactions and uncles) together.
CreateAccountOption contain extra parameter for Account creation.
Header represents a block header in the NeuralChain blockchain.
Log represents a contract log event.
Message is a fully derived transaction and implements core.Message
NOTE: In a future PR this will be removed.
ModifyProvidersMsg is info about adding or removing provider for enterprise contract.
No description provided by the author
Receipt represents the results of a transaction.
TendermintExtra extra data for Tendermint consensus.
No description provided by the author
TransactionExtraData is info about special transaction.
TransactionsByPriceAndNonce represents a set of transactions that can return transactions in a profit-maximizing sorted order, while supporting removing entire batches of transactions for non-executable accounts.
# Interfaces
No description provided by the author
Signer encapsulates transaction signature handling.
# Type aliases
No description provided by the author
A BlockNonce is a 64-bit hash which proves (combined with the mix-hash) that a sufficient amount of computation has been carried out on a block.
No description provided by the author
Bloom represents a 2048 bit bloom filter.
LogForStorage is a wrapper around a Log that flattens and parses the entire content of a log including non-consensus fields.
ReceiptForStorage is a wrapper around a Receipt that flattens and parses the entire content of a receipt, as opposed to only the consensus fields originally.
Receipts is a wrapper around a Receipt array to implement DerivableList.
[deprecated by neut/63] StorageBlock defines the RLP encoding of a Block stored in the state database.
Transactions is a Transaction slice type for basic sorting.
No description provided by the author
TxByNonce implements the sort interface to allow sorting a list of transactions by their nonces.
TxByPrice implements both the sort and the heap interface, making it useful for all at once sorting as well as individually adding and removing elements.