Documentation
¶
Index ¶
- func BeaconBlockDirectory(network string, slot phase0.Slot) string
- func BeaconStateDirectory(network string, slot phase0.Slot) string
- func CreateBeaconBadBlobFileName(node string, network string, slot phase0.Slot, blockRoot string, index uint64) string
- func CreateBeaconBadBlockFileName(node string, network string, slot phase0.Slot, blockRoot string) string
- func CreateExecutionBadBlockFileName(node string, network string, blockHash string) string
- func ExecutionBlockTraceDirectory(network string, blockNumber uint64) string
- func ExecutionBlockTraceIdentity(blockHash, dedupKey string) string
- func ExecutionPayloadEnvelopeDirectory(network string, slot phase0.Slot) string
- func New(ctx context.Context, log logrus.FieldLogger, config *Config) (*agent, error)
- type BeaconBadBlobRequest
- type BeaconBadBlockRequest
- type BeaconBlockRequest
- type BeaconStateRequest
- type Config
- type ExecutionBadBlockRequest
- type ExecutionBlockTraceRequest
- type ExecutionPayloadEnvelopeRequest
- type FetchTimeouts
- type Metrics
- func (m *Metrics) AddFetchedBytes(queue Queue, agentName string, bytes int64)
- func (m *Metrics) AddStoredBytes(queue Queue, agentName string, bytes int64)
- func (m *Metrics) IncrementArtifactUnsupported(queue Queue, agentName string)
- func (m *Metrics) IncrementBlobCreated(queue Queue, agentName string)
- func (m *Metrics) IncrementBlobReused(queue Queue, agentName string)
- func (m *Metrics) IncrementFlightAbandoned(queue Queue, agentName string)
- func (m *Metrics) IncrementItemDropped(queue Queue, agentName, reason string)
- func (m *Metrics) IncrementItemExported(queue Queue, agentName string)
- func (m *Metrics) IncrementItemRetried(queue Queue, agentName, reason string)
- func (m *Metrics) IncrementItemSkipped(queue Queue, agentName string)
- func (m *Metrics) IncrementLengthUnverified(queue Queue, agentName string)
- func (m *Metrics) IncrementPayloadMismatch(queue Queue, agentName string)
- func (m *Metrics) IncrementPayloadVerified(queue Queue, agentName string)
- func (m *Metrics) IncrementTransferIncomplete(queue Queue, agentName string)
- func (m *Metrics) ObserveQueueItemProcessingTime(queue Queue, duration time.Duration, agentName string)
- func (m *Metrics) ObserveQueueWaitTime(queue Queue, duration time.Duration, agentName string)
- func (m *Metrics) ServeMetrics(ctx context.Context, addr string)
- func (m *Metrics) SetQueueSize(queue Queue, count int, agentName string)
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeaconBlockDirectory ¶ added in v0.1.0
func BeaconStateDirectory ¶ added in v0.1.0
func CreateBeaconBadBlobFileName ¶ added in v0.0.16
func CreateBeaconBadBlockFileName ¶ added in v0.0.16
func ExecutionBlockTraceDirectory ¶ added in v0.1.0
func ExecutionBlockTraceIdentity ¶ added in v0.1.0
ExecutionBlockTraceIdentity names a trace inside its directory. A trace is only reproducible from the client that produced it and the parameters it was asked for, all of which its dedup key carries and its block hash does not. Both belong in the location: two dedup keys that happen to produce identical bytes must still land on two objects, because collecting either one would otherwise empty the other's rows.
func ExecutionPayloadEnvelopeDirectory ¶ added in v0.1.0
Types ¶
type BeaconBadBlobRequest ¶ added in v0.0.16
type BeaconBadBlobRequest struct {
Path string
// contains filtered or unexported fields
}
type BeaconBadBlockRequest ¶ added in v0.0.16
type BeaconBadBlockRequest struct {
Path string
// contains filtered or unexported fields
}
type BeaconBlockRequest ¶ added in v0.0.16
type BeaconStateRequest ¶
type Config ¶
type Config struct {
LoggingLevel string `yaml:"logging" default:"info"`
MetricsAddr string `yaml:"metricsAddr" default:":9090"`
PProfAddr *string `yaml:"pprofAddr"`
// ShutdownTimeoutSeconds bounds how long we wait for in-flight fetches and
// uploads to finish after a shutdown signal. Anything still running when it
// expires is abandoned; the store-then-index write order makes that safe.
// Keep it strictly below the orchestrator's termination grace period, or the
// process is killed mid-drain and the wait achieves nothing.
ShutdownTimeoutSeconds int `yaml:"shutdownTimeoutSeconds" default:"10"`
// FetchTimeouts bounds one fetch attempt per artifact kind. States are the
// largest artifact by far, so their value decides whether a distant agent
// can capture them at all.
FetchTimeouts FetchTimeouts `yaml:"fetchTimeouts"`
// The name of the agent
Name string `yaml:"name"`
// Ethereum configuration
Ethereum ethereum.Config `yaml:"ethereum"`
// Indexer configuration
Indexer *indexer.Config `yaml:"indexer"`
// Store configuration
Store *store.Config `yaml:"store"`
}
func (*Config) ShutdownTimeout ¶ added in v0.1.0
ShutdownTimeout is how long the agent waits for its queue workers after its context is cancelled, before abandoning whatever is still running.
type ExecutionBadBlockRequest ¶ added in v0.0.16
type ExecutionBadBlockRequest struct {
// contains filtered or unexported fields
}
type ExecutionBlockTraceRequest ¶
type ExecutionBlockTraceRequest struct {
BlockID string
// contains filtered or unexported fields
}
ExecutionBlockTraceRequest identifies the beacon block whose execution payload should be traced. It carries no execution block hash or number: resolving those can block on a builder revealing a payload, so it happens on the queue worker rather than in the beacon event callback that queues it.
type ExecutionPayloadEnvelopeRequest ¶ added in v0.1.0
type FetchTimeouts ¶ added in v0.1.0
type FetchTimeouts struct {
BeaconStateSeconds int `yaml:"beaconStateSeconds" default:"30"`
BeaconBlockSeconds int `yaml:"beaconBlockSeconds" default:"30"`
ExecutionPayloadEnvelopeSeconds int `yaml:"executionPayloadEnvelopeSeconds" default:"60"`
ExecutionBlockTraceSeconds int `yaml:"executionBlockTraceSeconds" default:"60"`
ExecutionBadBlockSeconds int `yaml:"executionBadBlockSeconds" default:"60"`
}
FetchTimeouts bounds a single fetch attempt per artifact kind. The defaults suit an agent deployed near its node, where even a state transfer is sub-second. A WAN link needs minutes for states: a 73 MB devnet state at 2 MB/s is already past the default before it finishes. Keep values under the artifact's availability window (~6 minutes for states on the tightest clients) or the fetch outlives the data it is fetching.
func (FetchTimeouts) BeaconBlock ¶ added in v0.1.0
func (f FetchTimeouts) BeaconBlock() time.Duration
func (FetchTimeouts) BeaconState ¶ added in v0.1.0
func (f FetchTimeouts) BeaconState() time.Duration
func (FetchTimeouts) ExecutionBadBlock ¶ added in v0.1.0
func (f FetchTimeouts) ExecutionBadBlock() time.Duration
func (FetchTimeouts) ExecutionBlockTrace ¶ added in v0.1.0
func (f FetchTimeouts) ExecutionBlockTrace() time.Duration
func (FetchTimeouts) ExecutionPayloadEnvelope ¶ added in v0.1.0
func (f FetchTimeouts) ExecutionPayloadEnvelope() time.Duration
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func GetMetricsInstance ¶ added in v0.0.17
func (*Metrics) AddFetchedBytes ¶ added in v0.1.0
AddFetchedBytes records raw bytes read from a node, whether or not they were stored.
func (*Metrics) AddStoredBytes ¶ added in v0.1.0
AddStoredBytes records compressed bytes handed to the store. A payload that was hashed against one somebody else had already stored contributes nothing, which is the whole point of measuring it separately.
func (*Metrics) IncrementArtifactUnsupported ¶ added in v0.1.0
func (*Metrics) IncrementBlobCreated ¶ added in v0.1.0
func (*Metrics) IncrementBlobReused ¶ added in v0.1.0
func (*Metrics) IncrementFlightAbandoned ¶ added in v0.1.0
IncrementFlightAbandoned records a caller that stopped waiting on another node's upload. A rising count means the fleet is collapsing less work than it could, which is a symptom of slow nodes rather than of this agent.
func (*Metrics) IncrementItemDropped ¶ added in v0.1.0
func (*Metrics) IncrementItemExported ¶ added in v0.0.11
func (*Metrics) IncrementItemRetried ¶ added in v0.1.1
func (*Metrics) IncrementItemSkipped ¶ added in v0.0.30
func (*Metrics) IncrementLengthUnverified ¶ added in v0.1.0
IncrementLengthUnverified records a payload the completeness gate could not be applied to, which HTTP/2, chunked encoding and transparent decompression all produce.
func (*Metrics) IncrementPayloadMismatch ¶ added in v0.1.0
func (*Metrics) IncrementPayloadVerified ¶ added in v0.1.0
func (*Metrics) IncrementTransferIncomplete ¶ added in v0.1.0
func (*Metrics) ObserveQueueItemProcessingTime ¶
func (*Metrics) ObserveQueueWaitTime ¶ added in v0.1.0
func (*Metrics) ServeMetrics ¶ added in v0.0.17
type Queue ¶
type Queue string
var ( BeaconStateQueue Queue = "beacon_state" BeaconBlockQueue Queue = "beacon_block" ExecutionPayloadEnvelopeQueue Queue = "execution_payload_envelope" BeaconBadBlockQueue Queue = "beacon_bad_block" BeaconBadBlobQueue Queue = "beacon_bad_blob" ExecutionBlockTraceQueue Queue = "execution_block_trace" ExecutionBadBlockQueue Queue = "execution_bad_block" )