Documentation ¶
Overview ¶
package synchronizer This file contains common struct definitions and functions used by L1 sync. l1DataMessage : struct to hold L1 rollup info data package send from producer to consumer
This packages could contain data or control information. - data is a real rollup info - control send actions to consumer
Constructors: - newL1PackageDataControl: create a l1PackageData with only control information - newL1PackageData: create a l1PackageData with data and control information
Index ¶
- func NewL1RollupInfoConsumer(cfg ConfigConsumer, synchronizer synchronizerProcessBlockRangeInterface, ...) *l1RollupInfoConsumer
- type ConfigConsumer
- type ConfigProducer
- type L1ParallelEthermanInterface
- type L1ParallelEthermanInterfaceMock
- func (_m *L1ParallelEthermanInterfaceMock) EXPECT() *L1ParallelEthermanInterfaceMock_Expecter
- func (_m *L1ParallelEthermanInterfaceMock) EthBlockByNumber(ctx context.Context, blockNumber uint64) (*types.Block, error)
- func (_m *L1ParallelEthermanInterfaceMock) GetLatestBatchNumber() (uint64, error)
- func (_m *L1ParallelEthermanInterfaceMock) GetLatestVerifiedBatchNum() (uint64, error)
- func (_m *L1ParallelEthermanInterfaceMock) GetRollupInfoByBlockRange(ctx context.Context, fromBlock uint64, toBlock *uint64) ([]etherman.Block, map[common.Hash][]etherman.Order, error)
- func (_m *L1ParallelEthermanInterfaceMock) GetTrustedSequencerURL() (string, error)
- func (_m *L1ParallelEthermanInterfaceMock) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (_m *L1ParallelEthermanInterfaceMock) VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error)
- type L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Return(_a0 *types.Block, _a1 error) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Run(run func(ctx context.Context, blockNumber uint64)) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) RunAndReturn(run func(context.Context, uint64) (*types.Block, error)) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
- type L1ParallelEthermanInterfaceMock_Expecter
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) EthBlockByNumber(ctx interface{}, blockNumber interface{}) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetLatestBatchNumber() *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetLatestVerifiedBatchNum() *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetRollupInfoByBlockRange(ctx interface{}, fromBlock interface{}, toBlock interface{}) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetTrustedSequencerURL() *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
- func (_e *L1ParallelEthermanInterfaceMock_Expecter) VerifyGenBlockNumber(ctx interface{}, genBlockNumber interface{}) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
- type L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Return(_a0 uint64, _a1 error) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Run(run func()) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) RunAndReturn(run func() (uint64, error)) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
- type L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call) Return(_a0 uint64, _a1 error) *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call) Run(run func()) *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call) RunAndReturn(run func() (uint64, error)) *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
- type L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Return(_a0 []etherman.Block, _a1 map[common.Hash][]etherman.Order, _a2 error) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock *uint64)) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) RunAndReturn(...) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
- type L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call) Return(_a0 string, _a1 error) *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call) Run(run func()) *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
- func (_c *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call) RunAndReturn(run func() (string, error)) *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
- type L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Return(_a0 *types.Header, _a1 error) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Header, error)) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
- type L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Return(_a0 bool, _a1 error) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Run(run func(ctx context.Context, genBlockNumber uint64)) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
- func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) RunAndReturn(run func(context.Context, uint64) (bool, error)) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
- type L1RollupInfoProducer
- type L1SyncMessage
- type L1SyncOrchestration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewL1RollupInfoConsumer ¶
func NewL1RollupInfoConsumer(cfg ConfigConsumer, synchronizer synchronizerProcessBlockRangeInterface, ch chan L1SyncMessage) *l1RollupInfoConsumer
NewL1RollupInfoConsumer creates a new l1RollupInfoConsumer
Types ¶
type ConfigConsumer ¶
type ConfigConsumer struct { ApplyAfterNumRollupReceived int AceptableInacctivityTime time.Duration }
ConfigConsumer configuration for L1 sync parallel consumer
type ConfigProducer ¶
type ConfigProducer struct { // SyncChunkSize is the number of blocks to be retrieved in each request SyncChunkSize uint64 // TtlOfLastBlockOnL1 is the time to wait before ask for a new last block on L1 TtlOfLastBlockOnL1 time.Duration // TimeoutForRequestLastBlockOnL1 is the timeout for request a new last block on L1 TimeoutForRequestLastBlockOnL1 time.Duration // NumOfAllowedRetriesForRequestLastBlockOnL1 is the number of retries for request a new last block on L1 NumOfAllowedRetriesForRequestLastBlockOnL1 int //TimeOutMainLoop timeout for main loop if no is synchronized yet, this time is a safeguard because is not needed TimeOutMainLoop time.Duration //TimeForShowUpStatisticsLog how ofter we show a log with statistics, 0 means disabled TimeForShowUpStatisticsLog time.Duration // MinTimeBetweenRetriesForRollupInfo is the minimum time between retries for rollup info MinTimeBetweenRetriesForRollupInfo time.Duration }
ConfigProducer : configuration for producer
func (*ConfigProducer) String ¶
func (cfg *ConfigProducer) String() string
type L1ParallelEthermanInterface ¶
type L1ParallelEthermanInterface interface { HeaderByNumber(ctx context.Context, number *big.Int) (*ethTypes.Header, error) GetRollupInfoByBlockRange(ctx context.Context, fromBlock uint64, toBlock *uint64) ([]etherman.Block, map[common.Hash][]etherman.Order, error) EthBlockByNumber(ctx context.Context, blockNumber uint64) (*ethTypes.Block, error) GetLatestBatchNumber() (uint64, error) GetTrustedSequencerURL() (string, error) VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error) GetLatestVerifiedBatchNum() (uint64, error) }
L1ParallelEthermanInterface is an interface for the etherman package
type L1ParallelEthermanInterfaceMock ¶
L1ParallelEthermanInterfaceMock is an autogenerated mock type for the L1ParallelEthermanInterface type
func NewL1ParallelEthermanInterfaceMock ¶
func NewL1ParallelEthermanInterfaceMock(t interface { mock.TestingT Cleanup(func()) }) *L1ParallelEthermanInterfaceMock
NewL1ParallelEthermanInterfaceMock creates a new instance of L1ParallelEthermanInterfaceMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*L1ParallelEthermanInterfaceMock) EXPECT ¶
func (_m *L1ParallelEthermanInterfaceMock) EXPECT() *L1ParallelEthermanInterfaceMock_Expecter
func (*L1ParallelEthermanInterfaceMock) EthBlockByNumber ¶
func (_m *L1ParallelEthermanInterfaceMock) EthBlockByNumber(ctx context.Context, blockNumber uint64) (*types.Block, error)
EthBlockByNumber provides a mock function with given fields: ctx, blockNumber
func (*L1ParallelEthermanInterfaceMock) GetLatestBatchNumber ¶
func (_m *L1ParallelEthermanInterfaceMock) GetLatestBatchNumber() (uint64, error)
GetLatestBatchNumber provides a mock function with given fields:
func (*L1ParallelEthermanInterfaceMock) GetLatestVerifiedBatchNum ¶
func (_m *L1ParallelEthermanInterfaceMock) GetLatestVerifiedBatchNum() (uint64, error)
GetLatestVerifiedBatchNum provides a mock function with given fields:
func (*L1ParallelEthermanInterfaceMock) GetRollupInfoByBlockRange ¶
func (_m *L1ParallelEthermanInterfaceMock) GetRollupInfoByBlockRange(ctx context.Context, fromBlock uint64, toBlock *uint64) ([]etherman.Block, map[common.Hash][]etherman.Order, error)
GetRollupInfoByBlockRange provides a mock function with given fields: ctx, fromBlock, toBlock
func (*L1ParallelEthermanInterfaceMock) GetTrustedSequencerURL ¶
func (_m *L1ParallelEthermanInterfaceMock) GetTrustedSequencerURL() (string, error)
GetTrustedSequencerURL provides a mock function with given fields:
func (*L1ParallelEthermanInterfaceMock) HeaderByNumber ¶
func (_m *L1ParallelEthermanInterfaceMock) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
HeaderByNumber provides a mock function with given fields: ctx, number
func (*L1ParallelEthermanInterfaceMock) VerifyGenBlockNumber ¶
func (_m *L1ParallelEthermanInterfaceMock) VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error)
VerifyGenBlockNumber provides a mock function with given fields: ctx, genBlockNumber
type L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call ¶
L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EthBlockByNumber'
func (*L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Return ¶
func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Return(_a0 *types.Block, _a1 error) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
func (*L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Run ¶
func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) Run(run func(ctx context.Context, blockNumber uint64)) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
func (*L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call) RunAndReturn(run func(context.Context, uint64) (*types.Block, error)) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
type L1ParallelEthermanInterfaceMock_Expecter ¶
type L1ParallelEthermanInterfaceMock_Expecter struct {
// contains filtered or unexported fields
}
func (*L1ParallelEthermanInterfaceMock_Expecter) EthBlockByNumber ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) EthBlockByNumber(ctx interface{}, blockNumber interface{}) *L1ParallelEthermanInterfaceMock_EthBlockByNumber_Call
EthBlockByNumber is a helper method to define mock.On call
- ctx context.Context
- blockNumber uint64
func (*L1ParallelEthermanInterfaceMock_Expecter) GetLatestBatchNumber ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetLatestBatchNumber() *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
GetLatestBatchNumber is a helper method to define mock.On call
func (*L1ParallelEthermanInterfaceMock_Expecter) GetLatestVerifiedBatchNum ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetLatestVerifiedBatchNum() *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
GetLatestVerifiedBatchNum is a helper method to define mock.On call
func (*L1ParallelEthermanInterfaceMock_Expecter) GetRollupInfoByBlockRange ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetRollupInfoByBlockRange(ctx interface{}, fromBlock interface{}, toBlock interface{}) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
GetRollupInfoByBlockRange is a helper method to define mock.On call
- ctx context.Context
- fromBlock uint64
- toBlock *uint64
func (*L1ParallelEthermanInterfaceMock_Expecter) GetTrustedSequencerURL ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) GetTrustedSequencerURL() *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
GetTrustedSequencerURL is a helper method to define mock.On call
func (*L1ParallelEthermanInterfaceMock_Expecter) HeaderByNumber ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
HeaderByNumber is a helper method to define mock.On call
- ctx context.Context
- number *big.Int
func (*L1ParallelEthermanInterfaceMock_Expecter) VerifyGenBlockNumber ¶
func (_e *L1ParallelEthermanInterfaceMock_Expecter) VerifyGenBlockNumber(ctx interface{}, genBlockNumber interface{}) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
VerifyGenBlockNumber is a helper method to define mock.On call
- ctx context.Context
- genBlockNumber uint64
type L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call ¶
L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBatchNumber'
func (*L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Return ¶
func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Return(_a0 uint64, _a1 error) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
func (*L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Run ¶
func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) Run(run func()) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
func (*L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call) RunAndReturn(run func() (uint64, error)) *L1ParallelEthermanInterfaceMock_GetLatestBatchNumber_Call
type L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call ¶
L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVerifiedBatchNum'
func (*L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call) RunAndReturn(run func() (uint64, error)) *L1ParallelEthermanInterfaceMock_GetLatestVerifiedBatchNum_Call
type L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call ¶
L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRollupInfoByBlockRange'
func (*L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Return ¶
func (_c *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Return(_a0 []etherman.Block, _a1 map[common.Hash][]etherman.Order, _a2 error) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
func (*L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Run ¶
func (_c *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock *uint64)) *L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call
func (*L1ParallelEthermanInterfaceMock_GetRollupInfoByBlockRange_Call) RunAndReturn ¶
type L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call ¶
L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTrustedSequencerURL'
func (*L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call) RunAndReturn(run func() (string, error)) *L1ParallelEthermanInterfaceMock_GetTrustedSequencerURL_Call
type L1ParallelEthermanInterfaceMock_HeaderByNumber_Call ¶
L1ParallelEthermanInterfaceMock_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber'
func (*L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Return ¶
func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Return(_a0 *types.Header, _a1 error) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
func (*L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Run ¶
func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
func (*L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Header, error)) *L1ParallelEthermanInterfaceMock_HeaderByNumber_Call
type L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call ¶
L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyGenBlockNumber'
func (*L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Return ¶
func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Return(_a0 bool, _a1 error) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
func (*L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Run ¶
func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) Run(run func(ctx context.Context, genBlockNumber uint64)) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
func (*L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) RunAndReturn ¶
func (_c *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call) RunAndReturn(run func(context.Context, uint64) (bool, error)) *L1ParallelEthermanInterfaceMock_VerifyGenBlockNumber_Call
type L1RollupInfoProducer ¶
type L1RollupInfoProducer struct {
// contains filtered or unexported fields
}
L1RollupInfoProducer is the object that retrieves data from L1
func NewL1DataRetriever ¶
func NewL1DataRetriever(cfg ConfigProducer, ethermans []L1ParallelEthermanInterface, outgoingChannel chan L1SyncMessage) *L1RollupInfoProducer
NewL1DataRetriever creates a new object
func (*L1RollupInfoProducer) Abort ¶
func (l *L1RollupInfoProducer) Abort()
Abort stop inmediatly the current process
func (*L1RollupInfoProducer) Reset ¶
func (l *L1RollupInfoProducer) Reset(startingBlockNumber uint64)
Reset reset the object and stop the current process. Set first block to be retrieved
func (*L1RollupInfoProducer) Start ¶
func (l *L1RollupInfoProducer) Start(ctx context.Context) error
Start a producer
func (*L1RollupInfoProducer) Stop ¶
func (l *L1RollupInfoProducer) Stop()
Stop stop the current process sending a stop command to the process queue so it stops when finish to process all packages in queue
type L1SyncMessage ¶
type L1SyncMessage struct {
// contains filtered or unexported fields
}
L1SyncMessage : struct to hold L1 rollup info data package It could contain data or control information, or both. A control package is used to send actions to consumer or to notify that producer is fully synced.
type L1SyncOrchestration ¶
type L1SyncOrchestration struct {
// contains filtered or unexported fields
}
L1SyncOrchestration is the object that coordinates the producer and the consumer process.
func NewL1SyncOrchestration ¶
func NewL1SyncOrchestration(ctx context.Context, producer l1RollupProducerInterface, consumer l1RollupConsumerInterface) *L1SyncOrchestration
NewL1SyncOrchestration create a new L1 sync orchestration object
func (*L1SyncOrchestration) Abort ¶
func (l *L1SyncOrchestration) Abort()
Abort stop inmediatly the current process
func (*L1SyncOrchestration) IsProducerRunning ¶
func (l *L1SyncOrchestration) IsProducerRunning() bool
IsProducerRunning return true if producer is running
func (*L1SyncOrchestration) Reset ¶
func (l *L1SyncOrchestration) Reset(startingBlockNumber uint64)
Reset set a new starting point and cancel current process if any
Source Files ¶
- block_range.go
- l1_common.go
- l1_data_message.go
- l1_etherman_interface.go
- l1_filter_send_orderer_results_to_synchronizer.go
- l1_live_block_ranges.go
- l1_rollup_info_consumer.go
- l1_rollup_info_consumer_statistics.go
- l1_rollup_info_producer.go
- l1_rollup_info_producer_statistics.go
- l1_sync_orchestration.go
- l1_syncstatus.go
- l1_worker_etherman.go
- l1_workers.go
- l1_workers_decorator_limit_retries_by_time.go
- mock_l1_parallel_etherman_interface.go
- mock_l1_rollup_consumer_interface.go
- mock_l1_rollup_producer_interface.go
- mock_synchronizer_process_block_range_interface.go
- mock_worker.go
- mock_workers_interface.go