runcfg

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSignerGracePeriod = 3 * time.Hour

DefaultSignerGracePeriod is how long the node continues to accept blocks from a previous unsafe block signer after detecting a signer rotation on L1. The grace period ends early if a block from the new signer is verified. The 3-hour value is picked arbitrarily: long enough to give operators time to complete a key rotation across infrastructure, but short enough to stop accepting payloads from a retired signer within a reasonable window.

Variables

View Source
var UnsafeBlockSignerAddressSystemConfigStorageSlot = common.HexToHash("0x65a7ed542fb37fe237fdfbdd70b31598523fe5b32879e307bae27a0bd9581c08")

UnsafeBlockSignerAddressSystemConfigStorageSlot is the storage slot identifier of the unsafeBlockSigner `address` storage value in the SystemConfig L1 contract. Computed as `keccak256("systemconfig.unsafeblocksigner")`

Functions

This section is empty.

Types

type ReadonlyRuntimeConfig

type ReadonlyRuntimeConfig interface {
	P2PSequencerAddress() common.Address
}

type RuntimeCfgL1Source

type RuntimeCfgL1Source interface {
	ReadStorageAt(ctx context.Context, address common.Address, storageSlot common.Hash, blockHash common.Hash) (common.Hash, error)
}

type RuntimeConfig

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

RuntimeConfig maintains runtime-configurable options. These options are loaded based on initial loading + updates for every subsequent L1 block. Only the *latest* values are maintained however, the runtime config has no concept of chain history, does not require any archive data, and may be out of sync with the rollup derivation process.

func NewRuntimeConfig

func NewRuntimeConfig(log log.Logger, l1Client RuntimeCfgL1Source, rollupCfg *rollup.Config) *RuntimeConfig

func (*RuntimeConfig) ConfirmCurrentSigner added in v1.17.0

func (r *RuntimeConfig) ConfirmCurrentSigner()

ConfirmCurrentSigner is called on every validly-signed block to confirm the current signer is in use. If a grace period is active (i.e. a previous signer is still being accepted), the previous signer is cleared.

func (*RuntimeConfig) Load

func (r *RuntimeConfig) Load(ctx context.Context, l1Ref eth.L1BlockRef) error

Load resets the runtime configuration by fetching the latest config data from L1 at the given L1 block. Load is safe to call concurrently, but will lock the runtime configuration modifications only, and will thus not block other Load calls with possibly alternative L1 block views.

func (*RuntimeConfig) P2PSequencerAddress

func (r *RuntimeConfig) P2PSequencerAddress() common.Address

func (*RuntimeConfig) PreviousP2PSequencerAddress added in v1.17.0

func (r *RuntimeConfig) PreviousP2PSequencerAddress() common.Address

Jump to

Keyboard shortcuts

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