common

package
v0.0.0-...-3bf369e Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBrokenCommitment = errors.New("proposed and committed payloads differ")
)

Functions

func VerifyCommitmentForPayloadHashes

func VerifyCommitmentForPayloadHashes(relayPayload *types.BidTrace, proposedPayloadHash string) bool

VerifyCommitmentForPayloadHashes uses the relay and the proposed payloads to determine if the two are not the same and returns the according boolean. Note that in the current implementation, the most common issue leading to a broken commitment is the de-synchronization of the beacon client, as it might not have the proposed payload yet.

Types

type BaseConfiguration

type BaseConfiguration struct {
	DC *data.TransparencyClient
	EC *EthClient
}

BaseConfiguration holds the clients able to query the Relay Data Transparency API and the Beacon Chain.

func BaseConfigurationFromViper

func BaseConfigurationFromViper(v *viper.Viper) *BaseConfiguration

BaseConfigurationFromViper creates a new BaseConfiguration using the bound cobra flags and viper keys.

type EthClient

type EthClient struct {
	// contains filtered or unexported fields
}

func NewEthClient

func NewEthClient(baseURL string) *EthClient

func (*EthClient) GetPartialBeaconBellatrixBlock

func (c *EthClient) GetPartialBeaconBellatrixBlock(slot uint64) (*PartialBeaconBellatrixBlock, error)

type PartialBeaconBellatrixBlock

type PartialBeaconBellatrixBlock struct {
	Body struct {
		ExecutionPayload struct {
			BlockHash string `json:"block_hash"`
		} `json:"execution_payload"`
	} `json:"body"`
}

Jump to

Keyboard shortcuts

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