Documentation ¶
Index ¶
- Variables
- func Auto(ctx context.Context, metrics Metricer, client client.RPC, log log.Logger, ...) error
- func BuildBlock(ctx context.Context, client client.RPC, status *StatusData, ...) (*engine.ExecutableData, error)
- func Copy(ctx context.Context, copyFrom client.RPC, copyTo client.RPC) error
- func DialClient(ctx context.Context, endpoint string, jwtSecret [32]byte) (client.RPC, error)
- func RawJSONInteraction(ctx context.Context, client client.RPC, method string, args []string, ...) error
- func SetForkchoice(ctx context.Context, client client.RPC, ...) error
- type BlockBuildingSettings
- type Metricer
- type Metrics
- type PayloadAttributesV2
- type RPCBlock
- type StatusData
Constants ¶
This section is empty.
Variables ¶
View Source
var Namespace = "op_node"
Functions ¶
func BuildBlock ¶
func BuildBlock(ctx context.Context, client client.RPC, status *StatusData, settings *BlockBuildingSettings) (*engine.ExecutableData, error)
func Copy ¶
Copy takes the forkchoice state of copyFrom, and applies it to copyTo, and inserts the head-block. The destination engine should then start syncing to this new chain if it has peers to do so.
func DialClient ¶
func RawJSONInteraction ¶
Types ¶
type BlockBuildingSettings ¶
type Metrics ¶
type Metrics struct { BlockFails prometheus.Counter BlockHash prometheus.Gauge BlockNum prometheus.Gauge BlockTime prometheus.Gauge BlockTxs prometheus.Gauge BlockGas prometheus.Gauge BlockBaseFee prometheus.Gauge }
func NewMetrics ¶
func NewMetrics(procName string, registry *prometheus.Registry) *Metrics
func (*Metrics) RecordBlockFail ¶
func (r *Metrics) RecordBlockFail()
type PayloadAttributesV2 ¶
type PayloadAttributesV2 struct { Timestamp uint64 `json:"timestamp"` Random common.Hash `json:"prevRandao"` SuggestedFeeRecipient common.Address `json:"suggestedFeeRecipient"` Withdrawals []*types.Withdrawal `json:"withdrawals"` }
func (PayloadAttributesV2) MarshalJSON ¶
func (p PayloadAttributesV2) MarshalJSON() ([]byte, error)
type RPCBlock ¶
type RPCBlock struct { types.Header Transactions []*types.Transaction `json:"transactions"` }
type StatusData ¶
type StatusData struct { Head eth.L1BlockRef `json:"head"` Safe eth.L1BlockRef `json:"safe"` Finalized eth.L1BlockRef `json:"finalized"` Txs uint64 `json:"txs"` Gas uint64 `json:"gas"` StateRoot common.Hash `json:"stateRoot"` BaseFee *big.Int `json:"baseFee"` }
Click to show internal directories.
Click to hide internal directories.