Documentation ¶
Index ¶
- type Header
- func (h *Header) Bloom() ethtypes.Bloom
- func (h *Header) Coinbase() common.Address
- func (h *Header) Copy() blockif.Header
- func (h *Header) CrossLinks() []byte
- func (h *Header) DecodeRLP(s *rlp.Stream) error
- func (h *Header) EncodeRLP(w io.Writer) error
- func (h *Header) Epoch() *big.Int
- func (h *Header) Extra() []byte
- func (h *Header) GasLimit() uint64
- func (h *Header) GasUsed() uint64
- func (h *Header) GetShardState() (shard.State, error)
- func (h *Header) Hash() common.Hash
- func (h *Header) IncomingReceiptHash() common.Hash
- func (h *Header) LastCommitBitmap() []byte
- func (h *Header) LastCommitSignature() [96]byte
- func (h *Header) Logger(logger *zerolog.Logger) *zerolog.Logger
- func (h Header) MarshalJSON() ([]byte, error)
- func (h *Header) MixDigest() common.Hash
- func (h *Header) Number() *big.Int
- func (h *Header) OutgoingReceiptHash() common.Hash
- func (h *Header) ParentHash() common.Hash
- func (h *Header) ReceiptHash() common.Hash
- func (h *Header) Root() common.Hash
- func (h *Header) SetBloom(newBloom ethtypes.Bloom)
- func (h *Header) SetCoinbase(newCoinbase common.Address)
- func (h *Header) SetCrossLinks(newCrossLinks []byte)
- func (h *Header) SetEpoch(newEpoch *big.Int)
- func (h *Header) SetExtra(newExtra []byte)
- func (h *Header) SetGasLimit(newGasLimit uint64)
- func (h *Header) SetGasUsed(newGasUsed uint64)
- func (h *Header) SetIncomingReceiptHash(newIncomingReceiptHash common.Hash)
- func (h *Header) SetLastCommitBitmap(newLastCommitBitmap []byte)
- func (h *Header) SetLastCommitSignature(newLastCommitSignature [96]byte)
- func (h *Header) SetMixDigest(newMixDigest common.Hash)
- func (h *Header) SetNumber(newNumber *big.Int)
- func (h *Header) SetOutgoingReceiptHash(newOutgoingReceiptHash common.Hash)
- func (h *Header) SetParentHash(newParentHash common.Hash)
- func (h *Header) SetReceiptHash(newReceiptHash common.Hash)
- func (h *Header) SetRoot(newRoot common.Hash)
- func (h *Header) SetShardID(newShardID uint32)
- func (h *Header) SetShardState(newShardState []byte)
- func (h *Header) SetShardStateHash(newShardStateHash common.Hash)
- func (h *Header) SetSlashes(newSlashes []byte)
- func (h *Header) SetTime(newTime *big.Int)
- func (h *Header) SetTxHash(newTxHash common.Hash)
- func (h *Header) SetVdf(newVdf []byte)
- func (h *Header) SetViewID(newViewID *big.Int)
- func (h *Header) SetVrf(newVrf []byte)
- func (h *Header) ShardID() uint32
- func (h *Header) ShardState() []byte
- func (h *Header) ShardStateHash() common.Hash
- func (h *Header) Size() common.StorageSize
- func (h *Header) Slashes() []byte
- func (h *Header) Time() *big.Int
- func (h *Header) TxHash() common.Hash
- func (h *Header) UnmarshalJSON(input []byte) error
- func (h *Header) Vdf() []byte
- func (h *Header) ViewID() *big.Int
- func (h *Header) Vrf() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header is the V2 block header.
func (*Header) Bloom ¶
Bloom is the Bloom filter that indexes accounts and topics logged by smart contract transactions (executions) in this block.
func (*Header) Coinbase ¶
Coinbase is the address of the node that proposed this block and all transactions in it.
func (*Header) CrossLinks ¶
CrossLinks is the RLP-encoded form of non-beacon block headers chosen to be canonical by the beacon committee. This field is present only on beacon chain block headers.
The returned slice is a copy; the caller may do anything with it.
func (*Header) Epoch ¶
Epoch is the epoch number of this block.
The returned instance is a copy; the caller may do anything with it.
func (*Header) Extra ¶
Extra is the extra data field of this block.
The returned slice is a copy; the caller may do anything with it.
func (*Header) GetShardState ¶
GetShardState returns the deserialized shard state object.
func (*Header) Hash ¶
Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding.
func (*Header) IncomingReceiptHash ¶
IncomingReceiptHash is the ingress transaction receipt trie hash.
func (*Header) LastCommitBitmap ¶
LastCommitBitmap is the signatory bitmap of the previous block. Bit positions index into committee member array.
The returned slice is a copy; the caller may do anything with it.
func (*Header) LastCommitSignature ¶
LastCommitSignature is the FBFT commit group signature for the last block.
func (Header) MarshalJSON ¶
func (*Header) MixDigest ¶
MixDigest is the mixhash.
This field is a remnant from Ethereum, and Intelchain does not use it and always zeroes it out.
func (*Header) Number ¶
Number is the block number.
The returned instance is a copy; the caller may do anything with it.
func (*Header) OutgoingReceiptHash ¶
OutgoingReceiptHash is the egress transaction receipt trie hash.
func (*Header) ParentHash ¶
ParentHash is the header hash of the parent block. For the genesis block which has no parent by definition, this field is zeroed out.
func (*Header) ReceiptHash ¶
ReceiptHash is the same-shard transaction receipt trie hash.
func (*Header) SetCoinbase ¶
SetCoinbase sets the coinbase address field.
func (*Header) SetCrossLinks ¶
SetCrossLinks sets the RLP-encoded form of non-beacon block headers chosen to be canonical by the beacon committee.
It stores a copy; the caller may freely modify the original.
func (*Header) SetEpoch ¶
SetEpoch sets the epoch number of this block.
It stores a copy; the caller may freely modify the original.
func (*Header) SetExtra ¶
SetExtra sets the extra data field of this block.
It stores a copy; the caller may freely modify the original.
func (*Header) SetGasLimit ¶
SetGasLimit sets the gas limit for transactions in this block.
func (*Header) SetGasUsed ¶
SetGasUsed sets the amount of gas used by transactions in this block.
func (*Header) SetIncomingReceiptHash ¶
SetIncomingReceiptHash sets the ingress transaction receipt trie hash.
func (*Header) SetLastCommitBitmap ¶
SetLastCommitBitmap sets the signatory bitmap of the previous block.
It stores a copy; the caller may freely modify the original.
func (*Header) SetLastCommitSignature ¶
SetLastCommitSignature sets the FBFT commit group signature for the last block.
func (*Header) SetMixDigest ¶
SetMixDigest sets the mixhash of this block.
func (*Header) SetNumber ¶
SetNumber sets the block number.
It stores a copy; the caller may freely modify the original.
func (*Header) SetOutgoingReceiptHash ¶
SetOutgoingReceiptHash sets the egress transaction receipt trie hash.
func (*Header) SetParentHash ¶
SetParentHash sets the parent hash field.
func (*Header) SetReceiptHash ¶
SetReceiptHash sets the same-shard transaction receipt trie hash.
func (*Header) SetShardID ¶
SetShardID sets the shard ID to which this block belongs.
func (*Header) SetShardState ¶
SetShardState sets the RLP-encoded form of shard state
It stores a copy; the caller may freely modify the original.
func (*Header) SetShardStateHash ¶
SetShardStateHash sets the shard state hash.
func (*Header) SetTime ¶
SetTime sets the UNIX timestamp of this block.
It stores a copy; the caller may freely modify the original.
func (*Header) SetVdf ¶
SetVdf sets the output of the VDF for the epoch.
It stores a copy; the caller may freely modify the original.
func (*Header) SetViewID ¶
SetViewID sets the view ID in which the block was originally proposed.
It stores a copy; the caller may freely modify the original.
func (*Header) SetVrf ¶
SetVrf sets the output of the VRF for the epoch.
It stores a copy; the caller may freely modify the original.
func (*Header) ShardState ¶
ShardState is the RLP-encoded form of shard state (list of committees) for the next epoch.
The returned slice is a copy; the caller may do anything with it.
func (*Header) ShardStateHash ¶
ShardStateHash is the shard state hash.
func (*Header) Size ¶
func (h *Header) Size() common.StorageSize
Size returns the approximate memory used by all internal contents. It is used to approximate and limit the memory consumption of various caches.
func (*Header) Time ¶
Time is the UNIX timestamp of this block.
The returned instance is a copy; the caller may do anything with it.
func (*Header) UnmarshalJSON ¶
func (*Header) Vdf ¶
Vdf is the output of the VDF for the epoch.
The returned slice is a copy; the caller may do anything with it.