Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIConfig ¶
type CLIConfig struct { // L1EthRpc is the HTTP provider URL for L1. L1EthRpc string // RollupRpc is the HTTP provider URL for the rollup node. RollupRpc string // L2OOAddress is the L2OutputOracle contract address. L2OOAddress string // PollInterval is the delay between querying L2 for more transaction // and creating a new batch. PollInterval time.Duration // NumConfirmations is the number of confirmations which we will wait after // appending new batches. NumConfirmations uint64 // SafeAbortNonceTooLowCount is the number of ErrNonceTooLowObservations // required to give up on a tx at a particular nonce without receiving // confirmation. SafeAbortNonceTooLowCount uint64 // ResubmissionTimeout is time we will wait before resubmitting a // transaction. ResubmissionTimeout time.Duration // Mnemonic is the HD seed used to derive the wallet private keys for both // the sequence and proposer. Must be used in conjunction with // SequencerHDPath and ProposerHDPath. Mnemonic string // L2OutputHDPath is the derivation path used to obtain the private key for // the l2output transactions. L2OutputHDPath string // PrivateKey is the private key used for l2output transactions. PrivateKey string RPCConfig oprpc.CLIConfig // AllowNonFinalized can be set to true to propose outputs // for L2 blocks derived from non-finalized L1 data. AllowNonFinalized bool LogConfig oplog.CLIConfig MetricsConfig opmetrics.CLIConfig PprofConfig oppprof.CLIConfig // SignerConfig contains the client config for op-signer service SignerConfig opsigner.CLIConfig }
CLIConfig is a well typed config that is parsed from the CLI params. This also contains config options for auxiliary services. It is transformed into a `Config` before the L2 output submitter is started.
type Config ¶
type Config struct { L2OutputOracleAddr common.Address PollInterval time.Duration TxManagerConfig txmgr.Config L1Client *ethclient.Client RollupClient *sources.RollupClient AllowNonFinalized bool From common.Address SignerFnFactory opcrypto.SignerFactory }
Config contains the well typed fields that are used to initialize the output submitter. It is intended for programmatic use.
type L2OutputSubmitter ¶
type L2OutputSubmitter struct {
// contains filtered or unexported fields
}
L2OutputSubmitter is responsible for proposing outputs
func NewL2OutputSubmitter ¶
NewL2OutputSubmitter creates a new L2 Output Submitter
func NewL2OutputSubmitterFromCLIConfig ¶
func NewL2OutputSubmitterFromCLIConfig(cfg CLIConfig, l log.Logger, m metrics.Metricer) (*L2OutputSubmitter, error)
NewL2OutputSubmitterFromCLIConfig creates a new L2 Output Submitter given the CLI Config
func (*L2OutputSubmitter) FetchNextOutputInfo ¶
func (l *L2OutputSubmitter) FetchNextOutputInfo(ctx context.Context) (*eth.OutputResponse, bool, error)
FetchNextOutputInfo gets the block number of the next proposal. It returns: the next block number, if the proposal should be made, error
func (*L2OutputSubmitter) ProposeL2OutputTxData ¶
func (l *L2OutputSubmitter) ProposeL2OutputTxData(output *eth.OutputResponse) ([]byte, error)
ProposeL2OutputTxData creates the transaction data for the ProposeL2Output function
func (*L2OutputSubmitter) Start ¶
func (l *L2OutputSubmitter) Start() error
func (*L2OutputSubmitter) Stop ¶
func (l *L2OutputSubmitter) Stop()