bellatrix

package
v0.4.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconBlock

type BeaconBlock struct {
	Slot          uint64           `json:"slot,string"`
	ProposerIndex uint64           `json:"proposer_index,string"`
	ParentRoot    types.Root       `json:"parent_root" ssz-size:"32"`
	StateRoot     types.Root       `json:"state_root" ssz-size:"32"`
	Body          *BeaconBlockBody `json:"body"`
}

BeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L46

type BeaconBlockBody

type BeaconBlockBody struct {
	RandaoReveal      types.Signature              `json:"randao_reveal" ssz-size:"96"`
	Eth1Data          *types.Eth1Data              `json:"eth1_data"`
	Graffiti          types.Hash                   `json:"graffiti" ssz-size:"32"`
	ProposerSlashings []*types.ProposerSlashing    `json:"proposer_slashings" ssz-max:"16"`
	AttesterSlashings []*types.AttesterSlashing    `json:"attester_slashings" ssz-max:"2"`
	Attestations      []*types.Attestation         `json:"attestations" ssz-max:"128"`
	Deposits          []*types.Deposit             `json:"deposits" ssz-max:"16"`
	VoluntaryExits    []*types.SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
	SyncAggregate     *types.SyncAggregate         `json:"sync_aggregate"`
	ExecutionPayload  *ExecutionPayload            `json:"execution_payload"`
}

BeaconBlockBody https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L38

type BlockBidAndTrace

type BlockBidAndTrace struct {
	Trace   *types.SignedBidTrace
	Bid     GetHeaderResponse
	Payload GetPayloadResponse
}

func (*BlockBidAndTrace) BidValue

func (bbat *BlockBidAndTrace) BidValue() types.U256Str

func (*BlockBidAndTrace) BuilderPubkey added in v0.4.1

func (bbat *BlockBidAndTrace) BuilderPubkey() (pub types.PublicKey)

func (*BlockBidAndTrace) ExecutionHeaderHash added in v0.4.11

func (bbat *BlockBidAndTrace) ExecutionHeaderHash() (types.Hash, error)

func (*BlockBidAndTrace) ExecutionPayload

func (bbat *BlockBidAndTrace) ExecutionPayload() structs.ExecutionPayload

func (*BlockBidAndTrace) ToDeliveredTrace

func (bbat *BlockBidAndTrace) ToDeliveredTrace(slot uint64) (dt structs.DeliveredTrace, err error)

type BuilderBid

type BuilderBid struct {
	BellatrixHeader *ExecutionPayloadHeader `json:"header"`
	BellatrixValue  types.U256Str           `json:"value" ssz-size:"32"`
	BellatrixPubkey types.PublicKey         `json:"pubkey" ssz-size:"48"`
}

BuilderBid https://github.com/ethereum/builder-specs/pull/2/files#diff-b37cbf48e8754483e30e7caaadc5defc8c3c6e1aaf3273ee188d787b7c75d993

func (*BuilderBid) GetTree

func (b *BuilderBid) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BuilderBid object

func (*BuilderBid) HashTreeRoot

func (b *BuilderBid) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BuilderBid object

func (*BuilderBid) HashTreeRootWith

func (b *BuilderBid) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BuilderBid object with a hasher

func (*BuilderBid) Pubkey

func (b *BuilderBid) Pubkey() types.PublicKey

func (*BuilderBid) Value

func (b *BuilderBid) Value() types.U256Str

type ExecutionPayload

type ExecutionPayload struct {
	EpParentHash    types.Hash      `json:"parent_hash" ssz-size:"32"`
	EpFeeRecipient  types.Address   `json:"fee_recipient" ssz-size:"20"`
	EpStateRoot     types.Root      `json:"state_root" ssz-size:"32"`
	EpReceiptsRoot  types.Root      `json:"receipts_root" ssz-size:"32"`
	EpLogsBloom     types.Bloom     `json:"logs_bloom" ssz-size:"256"`
	EpRandom        types.Hash      `json:"prev_randao" ssz-size:"32"`
	EpBlockNumber   uint64          `json:"block_number,string"`
	EpGasLimit      uint64          `json:"gas_limit,string"`
	EpGasUsed       uint64          `json:"gas_used,string"`
	EpTimestamp     uint64          `json:"timestamp,string"`
	EpExtraData     types.ExtraData `json:"extra_data" ssz-max:"32"`
	EpBaseFeePerGas types.U256Str   `json:"base_fee_per_gas" ssz-max:"32"`
	EpBlockHash     types.Hash      `json:"block_hash" ssz-size:"32"`
	EpTransactions  []hexutil.Bytes `json:"transactions" ssz-max:"1048576,1073741824" ssz-size:"?,?"`
}

ExecutionPayload https://github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/beacon-chain.md#executionpayload

func (*ExecutionPayload) BaseFeePerGas

func (ep *ExecutionPayload) BaseFeePerGas() types.U256Str

func (*ExecutionPayload) BlockHash

func (ep *ExecutionPayload) BlockHash() types.Hash

func (*ExecutionPayload) BlockNumber

func (ep *ExecutionPayload) BlockNumber() uint64

func (*ExecutionPayload) ExtraData

func (ep *ExecutionPayload) ExtraData() types.ExtraData

func (*ExecutionPayload) FeeRecipient

func (ep *ExecutionPayload) FeeRecipient() types.Address

func (*ExecutionPayload) GasLimit

func (ep *ExecutionPayload) GasLimit() uint64

func (*ExecutionPayload) GasUsed

func (ep *ExecutionPayload) GasUsed() uint64

func (*ExecutionPayload) LogsBloom

func (ep *ExecutionPayload) LogsBloom() types.Bloom

func (*ExecutionPayload) ParentHash

func (ep *ExecutionPayload) ParentHash() types.Hash

func (*ExecutionPayload) Random

func (ep *ExecutionPayload) Random() types.Hash

func (*ExecutionPayload) ReceiptsRoot

func (ep *ExecutionPayload) ReceiptsRoot() types.Root

func (*ExecutionPayload) StateRoot

func (ep *ExecutionPayload) StateRoot() types.Root

func (*ExecutionPayload) Timestamp

func (ep *ExecutionPayload) Timestamp() uint64

func (*ExecutionPayload) Transactions

func (ep *ExecutionPayload) Transactions() []hexutil.Bytes

type ExecutionPayloadHeader

type ExecutionPayloadHeader struct {
	types.ExecutionPayloadHeader
}

func (*ExecutionPayloadHeader) GetBlockHash

func (eph *ExecutionPayloadHeader) GetBlockHash() types.Hash

func (*ExecutionPayloadHeader) GetBlockNumber

func (eph *ExecutionPayloadHeader) GetBlockNumber() uint64

func (*ExecutionPayloadHeader) GetParentHash

func (eph *ExecutionPayloadHeader) GetParentHash() types.Hash

type GetHeaderResponse

type GetHeaderResponse struct {
	BellatrixVersion types.VersionString `json:"version"`
	BellatrixData    SignedBuilderBid    `json:"data"`
}

GetHeaderResponse is the response payload from the getHeader request: https://github.com/ethereum/builder-specs/pull/2/files#diff-c80f52e38c99b1049252a99215450a29fd248d709ffd834a9480c98a233bf32c

func (*GetHeaderResponse) Data

func (*GetHeaderResponse) Version

func (g *GetHeaderResponse) Version() types.VersionString

type GetPayloadResponse

type GetPayloadResponse struct {
	BellatrixVersion types.VersionString `json:"version"`
	BellatrixData    ExecutionPayload    `json:"data"`
}

func (*GetPayloadResponse) Data

type SignedBeaconBlock

type SignedBeaconBlock struct {
	BellatrixMessage   *BeaconBlock    `json:"message"`
	BellatrixSignature types.Signature `json:"signature" ssz-size:"96"`
}

SignedBeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L55

func (*SignedBeaconBlock) Signature

func (s *SignedBeaconBlock) Signature() types.Signature

type SignedBlindedBeaconBlock

type SignedBlindedBeaconBlock struct {
	SRaw       []byte                   `json:"-"`
	SMessage   types.BlindedBeaconBlock `json:"message"`
	SSignature types.Signature          `json:"signature" ssz-size:"96"`
}

SignedBlindedBeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L83

func (*SignedBlindedBeaconBlock) BlockHash

func (s *SignedBlindedBeaconBlock) BlockHash() types.Hash

func (*SignedBlindedBeaconBlock) BlockNumber

func (s *SignedBlindedBeaconBlock) BlockNumber() uint64

func (*SignedBlindedBeaconBlock) ComputeSigningRoot

func (b *SignedBlindedBeaconBlock) ComputeSigningRoot(d types.Domain) ([32]byte, error)

func (*SignedBlindedBeaconBlock) ExecutionHeaderHash added in v0.4.11

func (s *SignedBlindedBeaconBlock) ExecutionHeaderHash() (types.Hash, error)

func (*SignedBlindedBeaconBlock) Loggable added in v0.4.16

func (b *SignedBlindedBeaconBlock) Loggable() map[string]any

func (*SignedBlindedBeaconBlock) ParentRoot

func (s *SignedBlindedBeaconBlock) ParentRoot() types.Root

func (*SignedBlindedBeaconBlock) ProposerIndex

func (s *SignedBlindedBeaconBlock) ProposerIndex() uint64

func (*SignedBlindedBeaconBlock) Raw added in v0.4.17

func (b *SignedBlindedBeaconBlock) Raw() []byte

func (*SignedBlindedBeaconBlock) Signature

func (s *SignedBlindedBeaconBlock) Signature() types.Signature

func (*SignedBlindedBeaconBlock) Slot

func (s *SignedBlindedBeaconBlock) Slot() uint64

func (*SignedBlindedBeaconBlock) StateRoot

func (s *SignedBlindedBeaconBlock) StateRoot() types.Root

func (*SignedBlindedBeaconBlock) ToBeaconBlock

func (s *SignedBlindedBeaconBlock) ToBeaconBlock(executionPayload structs.ExecutionPayload) (structs.SignedBeaconBlock, error)

func (*SignedBlindedBeaconBlock) ToPayloadKey

func (s *SignedBlindedBeaconBlock) ToPayloadKey(pk types.PublicKey) (payK structs.PayloadKey, err error)

func (*SignedBlindedBeaconBlock) Validate

func (b *SignedBlindedBeaconBlock) Validate() bool

type SignedBuilderBid

type SignedBuilderBid struct {
	BellatrixMessage   *BuilderBid     `json:"message"`
	BellatrixSignature types.Signature `json:"signature" ssz-size:"96"`
}

func (*SignedBuilderBid) Signature

func (s *SignedBuilderBid) Signature() types.Signature

func (*SignedBuilderBid) Validate

func (b *SignedBuilderBid) Validate() bool

func (*SignedBuilderBid) Value

func (s *SignedBuilderBid) Value() types.U256Str

type SubmitBlockRequest

type SubmitBlockRequest struct {
	BellatrixRaw              []byte           `json:"-"`
	BellatrixSignature        types.Signature  `json:"signature" ssz-size:"96"`
	BellatrixMessage          types.BidTrace   `json:"message"`
	BellatrixExecutionPayload ExecutionPayload `json:"execution_payload"`
}

BuilderSubmitBlockRequest spec: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#fa719683d4ae4a57bc3bf60e138b0dc6

func (*SubmitBlockRequest) BlockHash

func (b *SubmitBlockRequest) BlockHash() types.Hash

func (*SubmitBlockRequest) BuilderPubkey

func (b *SubmitBlockRequest) BuilderPubkey() types.PublicKey

func (*SubmitBlockRequest) ComputeSigningRoot

func (b *SubmitBlockRequest) ComputeSigningRoot(d types.Domain) ([32]byte, error)

func (*SubmitBlockRequest) NumTx

func (b *SubmitBlockRequest) NumTx() uint64

func (*SubmitBlockRequest) ParentHash added in v0.4.3

func (b *SubmitBlockRequest) ParentHash() types.Hash

func (*SubmitBlockRequest) PreparePayloadContents

func (s *SubmitBlockRequest) PreparePayloadContents(sk *bls.SecretKey, pubkey *types.PublicKey, domain types.Domain) (cbs structs.CompleteBlockstruct, err error)

func (*SubmitBlockRequest) ProposerFeeRecipient

func (b *SubmitBlockRequest) ProposerFeeRecipient() types.Address

func (*SubmitBlockRequest) ProposerPubkey

func (b *SubmitBlockRequest) ProposerPubkey() types.PublicKey

func (*SubmitBlockRequest) Random

func (b *SubmitBlockRequest) Random() types.Hash

func (*SubmitBlockRequest) Raw added in v0.4.17

func (b *SubmitBlockRequest) Raw() []byte

func (*SubmitBlockRequest) Signature

func (b *SubmitBlockRequest) Signature() types.Signature

func (*SubmitBlockRequest) Slot

func (b *SubmitBlockRequest) Slot() uint64

func (*SubmitBlockRequest) Timestamp

func (b *SubmitBlockRequest) Timestamp() uint64

func (*SubmitBlockRequest) ToPayloadKey

func (s *SubmitBlockRequest) ToPayloadKey() structs.PayloadKey

func (*SubmitBlockRequest) TraceBlockHash added in v0.4.3

func (b *SubmitBlockRequest) TraceBlockHash() types.Hash

func (*SubmitBlockRequest) TraceParentHash added in v0.4.3

func (b *SubmitBlockRequest) TraceParentHash() types.Hash

func (*SubmitBlockRequest) Validate

func (b *SubmitBlockRequest) Validate() bool

func (*SubmitBlockRequest) Value

func (b *SubmitBlockRequest) Value() types.U256Str

func (*SubmitBlockRequest) Withdrawals

func (b *SubmitBlockRequest) Withdrawals() structs.Withdrawals

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL