Documentation ¶
Index ¶
- Constants
- func CLIFlags() []cli.Flag
- type BaseConfig
- type BaseService
- func (b *BaseService) Chain() *core.BlockChain
- func (b *BaseService) Start(ctx context.Context, eg api.ErrGroup) error
- func (b *BaseService) SyncL2ChainToL1Head(ctx context.Context, start uint64) (uint64, error)
- func (b *BaseService) SyncLoop(ctx context.Context, start uint64, newBatchCh chan<- struct{})
- type L1Config
- type L2Config
- type SequencerConfig
- func (c SequencerConfig) GetAccountAddr() common.Address
- func (c SequencerConfig) GetClefEndpoint() string
- func (c SequencerConfig) GetDisseminationInterval() time.Duration
- func (c SequencerConfig) GetIsEnabled() bool
- func (c SequencerConfig) GetPassphrase() string
- func (c SequencerConfig) GetTxMgrCfg() txmgr.Config
- type SystemConfig
- type ValidatorConfig
- func (c ValidatorConfig) GetAccountAddr() common.Address
- func (c ValidatorConfig) GetClefEndpoint() string
- func (c ValidatorConfig) GetIsEnabled() bool
- func (c ValidatorConfig) GetPassphrase() string
- func (c ValidatorConfig) GetTxMgrCfg() txmgr.Config
- func (c ValidatorConfig) GetValidationInterval() time.Duration
Constants ¶
View Source
const (
CmdlineFlagName = "rollup.l1.endpoint"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseConfig ¶
type BaseService ¶
type BaseService struct { Config BaseConfig Eth api.ExecutionBackend ProofBackend proof.Backend L1Client client.L1BridgeClient L1Syncer *eth.EthSyncer Cancel context.CancelFunc Wg sync.WaitGroup }
TODO: delete.
func NewBaseService ¶
func NewBaseService(execBackend api.ExecutionBackend, proofBackend proof.Backend, l1Client client.L1BridgeClient, cfg BaseConfig) (*BaseService, error)
func (*BaseService) Chain ¶
func (b *BaseService) Chain() *core.BlockChain
func (*BaseService) SyncL2ChainToL1Head ¶
Sync to current L1 block head and commit blocks. `start` is the block number to start syncing from. Returns the last synced block number (inclusive).
type L1Config ¶
type L1Config struct { Endpoint string `toml:"endpoint,omitempty"` // L1 API endpoint ChainID uint64 `toml:"chainid,omitempty"` // L1 chain ID RollupGenesisBlock uint64 `toml:"rollup_genesis,omitempty"` // L1 Rollup genesis block SequencerInboxAddr common.Address `toml:"sequencer_inbox_addr,omitempty"` // L1 SequencerInbox contract address RollupAddr common.Address `toml:"rollup_addr,omitempty"` // L1 Rollup contract address }
L1 configuration
func (L1Config) GetChainID ¶
func (L1Config) GetEndpoint ¶
func (L1Config) GetRollupAddr ¶
func (L1Config) GetRollupGenesisBlock ¶
func (L1Config) GetSequencerInboxAddr ¶
type L2Config ¶
type L2Config struct { Endpoint string `toml:"endpoint,omitempty"` // L2 API endpoint ChainID uint64 `toml:"chainid,omitempty"` // L2 chain ID L1FeeOverhead int64 `toml:"l1_fee_overhead,omitempty"` // Gas cost of sequencing a tx L1FeeMultiplier float64 `toml:"l1_fee_multiplier,omitempty"` // Scalar value to increase L1 fee L1OracleAddress common.Address `toml:"l1_oracle_address,omitempty"` // L2 Address of the L1Oracle L1OracleBaseFeeSlot common.Hash `toml:"l1_oracle_base_fee_slot,omitempty"` // L1 basefee storage slot of the L1Oracle }
L2 configuration
func (L2Config) GetChainID ¶
func (L2Config) GetEndpoint ¶
func (L2Config) GetL1FeeMultiplier ¶
func (L2Config) GetL1FeeOverhead ¶
func (L2Config) GetL1OracleAddress ¶
func (L2Config) GetL1OracleBaseFeeSlot ¶
type SequencerConfig ¶
type SequencerConfig struct { // Whether this node is a sequencer IsEnabled bool `toml:"enabled,omitempty"` // The address of this sequencer AccountAddr common.Address `toml:"account_addr,omitempty"` // The Clef Endpoint used for signing txs ClefEndpoint string `toml:"clef_endpoint,omitempty"` // The passphrase of the sequencer account Passphrase string `toml:"passphrase,omitempty"` // Time between batch dissemination (DA) steps DisseminationInterval time.Duration `toml:"dissemination_interval,omitempty"` // Transaction manager configuration TxMgrCfg txmgr.Config `toml:"txmgr,omitempty"` }
Sequencer node configuration
func (SequencerConfig) GetAccountAddr ¶
func (c SequencerConfig) GetAccountAddr() common.Address
func (SequencerConfig) GetClefEndpoint ¶
func (c SequencerConfig) GetClefEndpoint() string
func (SequencerConfig) GetDisseminationInterval ¶
func (c SequencerConfig) GetDisseminationInterval() time.Duration
func (SequencerConfig) GetIsEnabled ¶
func (c SequencerConfig) GetIsEnabled() bool
func (SequencerConfig) GetPassphrase ¶
func (c SequencerConfig) GetPassphrase() string
func (SequencerConfig) GetTxMgrCfg ¶
func (c SequencerConfig) GetTxMgrCfg() txmgr.Config
type SystemConfig ¶
type SystemConfig struct { L1Config `toml:"l1,omitempty"` L2Config `toml:"l2,omitempty"` SequencerConfig `toml:"sequencer,omitempty"` ValidatorConfig `toml:"validator,omitempty"` }
func ParseSystemConfig ¶
func ParseSystemConfig(cliCtx *cli.Context) (*SystemConfig, error)
Parses all CLI flags and returns a full system config.
func (*SystemConfig) L1 ¶
func (c *SystemConfig) L1() L1Config
func (*SystemConfig) L2 ¶
func (c *SystemConfig) L2() L2Config
func (*SystemConfig) Sequencer ¶
func (c *SystemConfig) Sequencer() SequencerConfig
func (*SystemConfig) Validator ¶
func (c *SystemConfig) Validator() ValidatorConfig
type ValidatorConfig ¶
type ValidatorConfig struct { // Whether this node is a validator IsEnabled bool `toml:"enabled,omitempty"` // The address of this validator AccountAddr common.Address `toml:"account_addr,omitempty"` // The Clef Endpoint used for signing txs ClefEndpoint string `toml:"clef_endpoint,omitempty"` // The passphrase of the validator account Passphrase string `toml:"passphrase,omitempty"` // Time between validation steps ValidationInterval time.Duration `toml:"validation_interval,omitempty"` // Transaction manager configuration TxMgrCfg txmgr.Config `toml:"txmgr,omitempty"` }
func (ValidatorConfig) GetAccountAddr ¶
func (c ValidatorConfig) GetAccountAddr() common.Address
func (ValidatorConfig) GetClefEndpoint ¶
func (c ValidatorConfig) GetClefEndpoint() string
func (ValidatorConfig) GetIsEnabled ¶
func (c ValidatorConfig) GetIsEnabled() bool
func (ValidatorConfig) GetPassphrase ¶
func (c ValidatorConfig) GetPassphrase() string
func (ValidatorConfig) GetTxMgrCfg ¶
func (c ValidatorConfig) GetTxMgrCfg() txmgr.Config
func (ValidatorConfig) GetValidationInterval ¶
func (c ValidatorConfig) GetValidationInterval() time.Duration
Click to show internal directories.
Click to hide internal directories.