Documentation ¶
Index ¶
Constants ¶
const ( // MaxTxsPerPayloadLength defines the maximum number of transactions that // can // be included in a payload. MaxTxsPerPayloadLength = 1048576 // MaxBytesPerTxLength defines the maximum number of bytes that can be // included // in a transaction. MaxBytesPerTxLength = 1073741824 // MaxWithdrawalsPerPayloadLength defines the // maximum number of withdrawals that can be included in a payload. MaxWithdrawalsPerPayload = 16 )
const (
HashRootLength = 32
)
Variables ¶
var ErrInvalidBufferSize = errors.New("invalid buffer size")
ErrInvalidBufferSize indicates that the provided buffer size is invalid.
Functions ¶
This section is empty.
Types ¶
type Epoch ¶
type Epoch = uint64
Epoch represents a single epoch. We don't really use epochs in BeaconKit. But we keep them around for compatibility with the Ethereum 2.0 spec.
type ExecutionAddress ¶
ExecutionAddress represents an address on the execution layer which is derived via secp256k1 w/recovery bit.
type ExecutionHash ¶
ExecutionHash represents a hash on the execution layer which is currently a Keccak256 hash.
type HashRoot ¶
type HashRoot [HashRootLength]byte
HashRoot is a 32-byte root of a hash tree structure.
type SSZEpoch ¶
type SSZEpoch Epoch
func (SSZEpoch) HashTreeRoot ¶
HashTreeRoot return the merklized epoch, represented as bytes in little endian, padded on the right side with zeroed bytes to a total of 32 bytes.
type SSZUInt256 ¶
type SSZUInt256 []byte
SSZUInt256 represents a ssz-able uint64.
func (*SSZUInt256) Big ¶
func (s *SSZUInt256) Big() *big.Int
Big converts an SSZUInt256 to a big.Int.
func (SSZUInt256) MarshalJSON ¶
func (s SSZUInt256) MarshalJSON() ([]byte, error)
MarshalJSON marshals a SSZUInt256 to JSON, it flips the endianness before encoding it to hex.
func (*SSZUInt256) UInt256 ¶
func (s *SSZUInt256) UInt256() *uint256.Int
UInt256 converts an SSZUInt256 to a uint256.Int.
func (*SSZUInt256) UnmarshalJSON ¶
func (s *SSZUInt256) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals a SSZUInt256 from JSON by decoding the hex string and flipping the endianness.
type ValidatorIndex ¶
type ValidatorIndex = uint64
ValidatorIndex represents a validator index in the beacon chain.