Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// ChainID is the ID of the chain the sequencer is running for.
ChainID []byte
// SPAddr is the address of the shared publisher in host:port format.
SPAddr string
// PeerAddrs is a map of chainID to host:port for other sequencers.
// The chainID can be in decimal or hex format and will be normalized.
PeerAddrs map[string]string
// Log is the logger to use. If not provided, a no-op logger is used.
Log zerolog.Logger
// BaseConsensus is an optional existing 2PC coordinator. If nil, a default follower is created.
BaseConsensus consensus.Coordinator
// SPClientConfig is an optional override for the shared publisher client config.
SPClientConfig *tcp.ClientConfig
// P2PServerConfig is an optional override for the P2P server config.
// If nil, tcp.DefaultServerConfig() is used.
P2PServerConfig *transport.Config
// P2PListenAddr is an optional P2P listen address, overriding P2PServerConfig.ListenAddr.
P2PListenAddr string
// SlotDuration is the duration of a slot. Defaults to 12 s.
SlotDuration time.Duration
// SlotSealCutover is the fraction of the slot after which it should be sealed. Defaults to 2/3.
SlotSealCutover float64
}
Config holds inputs to wire a sequencer with SBCP and P2P CIRC.
type Runtime ¶
type Runtime struct {
// Coordinator is the sequencer coordinator.
Coordinator sequencer.Coordinator
// SPClient is the client for the shared publisher.
SPClient transport.Client
// P2PServer is the P2P server for CIRC.
P2PServer transport.Server
// Peers is a map of hex chainID key to peer client.
Peers map[string]transport.Client
// contains filtered or unexported fields
}
Runtime exposes the wired components and lifecycle.
Click to show internal directories.
Click to hide internal directories.