types

package
v0.0.0-...-809f3dd Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateForkChoiceLatencyMetric      = "latency/update_fork_choice"
	NewPayloadLatencyMetric            = "latency/new_payload"
	GetPayloadLatencyMetric            = "latency/get_payload"
	SendTxsLatencyMetric               = "latency/send_txs"
	GasPerBlockMetric                  = "gas/per_block"
	GasPerSecondMetric                 = "gas/per_second"
	TransactionsPerBlockMetric         = "transactions/per_block"
	FlashblockProcessingDurationMetric = "reth_flashblocks_block_processing_duration"
	FlashblockSenderRecoveryMetric     = "reth_flashblocks_sender_recovery_duration"
	FlashblocksInBlockMetric           = "reth_flashblocks_flashblocks_in_block"
	FlashblockUpstreamMessagesMetric   = "reth_flashblocks_upstream_messages"
	FlashblockBundleStateCloneDuration = "reth_flashblocks_bundle_state_clone_duration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonKeyMetrics

type CommonKeyMetrics struct {
	AverageGasPerSecond float64 `json:"gasPerSecond"`
}

type IsthmusBlockType

type IsthmusBlockType struct{}

BasicBlockType implements what chain config would usually implement.

func (IsthmusBlockType) HasOptimismWithdrawalsRoot

func (b IsthmusBlockType) HasOptimismWithdrawalsRoot(blkTime uint64) bool

HasOptimismWithdrawalsRoot implements types.BlockType.

func (IsthmusBlockType) IsIsthmus

func (b IsthmusBlockType) IsIsthmus(blkTime uint64) bool

IsIsthmus implements types.BlockType.

type PayloadResult

type PayloadResult struct {
	// ExecutablePayloads are the execution payloads generated during the benchmark
	ExecutablePayloads []engine.ExecutableData

	// Flashblocks are the flashblock payloads collected during the benchmark (if available)
	Flashblocks map[uint64][]clientTypes.FlashblocksPayloadV1
}

PayloadResult contains the results from a sequencer benchmark run, including both the executable payloads and any flashblock payloads that were collected.

func (*PayloadResult) HasFlashblocks

func (p *PayloadResult) HasFlashblocks() bool

HasFlashblocks returns true if flashblock payloads were collected.

type RunParams

type RunParams struct {
	// NodeType is the type of node that's being benchmarked. Examples: geth, reth, nethermined, etc.
	NodeType string

	// ValidatorNodeType is the type of node used for validation. If empty, defaults to NodeType.
	ValidatorNodeType string

	// GasLimit is the gas limit for the benchmark run which is the maximum gas that the sequencer will include per block.
	GasLimit uint64

	// PayloadID is a reference to a transaction payload that will be sent to the sequencer.
	PayloadID string

	// BenchmarkRunID is a unique identifier for the benchmark run.
	BenchmarkRunID string

	// Name is the name of the benchmark run in the config file.
	Name string

	// Description is the description of the benchmark run in the config file.
	Description string

	// BlockTime is the time between blocks in the benchmark run.
	BlockTime time.Duration

	// Env is the environment variables for the benchmark run.
	Env map[string]string

	// NumBlocks is the number of blocks to run in the benchmark run.
	NumBlocks int

	// Tags are the tags for the benchmark run.
	Tags map[string]string

	// NodeArgs are the arguments to be passed to the node binary.
	NodeArgs []string

	// ClientBinPath is an optional override for the client binary path.
	ClientBinPath string
}

Params is the parameters for a single benchmark run.

func (RunParams) ClientOptions

func (p RunParams) ClientOptions(prevClientOptions config.ClientOptions) config.ClientOptions

ClientOptions applies any client customization options to the given client options.

func (RunParams) ToConfig

func (p RunParams) ToConfig() map[string]interface{}

type SequencerKeyMetrics

type SequencerKeyMetrics struct {
	CommonKeyMetrics
	AverageFCULatency        float64 `json:"forkChoiceUpdated"`
	AverageGetPayloadLatency float64 `json:"getPayload"`
	AverageSendTxsLatency    float64 `json:"sendTxs"`
}

func BlockMetricsToSequencerSummary

func BlockMetricsToSequencerSummary(metrics []metrics.BlockMetrics) *SequencerKeyMetrics

BlockMetricsToSequencerSummary converts block metrics to a sequencer summary.

type TestConfig

type TestConfig struct {
	Params     RunParams
	Config     config.Config
	Genesis    core.Genesis
	BatcherKey ecdsa.PrivateKey

	PrefundPrivateKey ecdsa.PrivateKey
	PrefundAmount     big.Int
	// contains filtered or unexported fields
}

TestConfig holds all configuration needed for a benchmark test

func (*TestConfig) BatcherAddr

func (c *TestConfig) BatcherAddr() common.Address

BatcherAddr returns the batcher address, computing it if necessary

type ValidatorKeyMetrics

type ValidatorKeyMetrics struct {
	CommonKeyMetrics
	AverageNewPayloadLatency            float64 `json:"newPayload"`
	AverageFlashblockProcessingDuration float64 `json:"flashblockProcessingDuration,omitempty"`
	AverageFlashblocksInBlock           float64 `json:"flashblocksInBlock,omitempty"`
}

func BlockMetricsToValidatorSummary

func BlockMetricsToValidatorSummary(metrics []metrics.BlockMetrics) *ValidatorKeyMetrics

BlockMetricsToValidatorSummary converts block metrics to a validator summary.

Jump to

Keyboard shortcuts

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