Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSynchronizer ¶
type ClientSynchronizer struct {
// contains filtered or unexported fields
}
ClientSynchronizer connects L1 and L2
func (*ClientSynchronizer) Stop ¶
func (s *ClientSynchronizer) Stop()
Stop function stops the synchronizer
func (*ClientSynchronizer) Sync ¶
func (s *ClientSynchronizer) Sync() error
Sync function will read the last state synced and will continue from that point. Sync() will read blockchain events to detect rollup updates
type Config ¶
type Config struct { // SyncInterval is the delay interval between reading new rollup information SyncInterval types.Duration `mapstructure:"SyncInterval"` // SyncChunkSize is the number of blocks to sync on each chunk SyncChunkSize uint64 `mapstructure:"SyncChunkSize"` // TrustedSequencerURL is the rpc url to connect and sync the trusted state TrustedSequencerURL string `mapstructure:"TrustedSequencerURL"` }
Config represents the configuration of the synchronizer
type Synchronizer ¶
type Synchronizer interface { Sync() error Stop() }
Synchronizer connects L1 and L2
func NewSynchronizer ¶
func NewSynchronizer( isTrustedSequencer bool, ethMan ethermanInterface, st stateInterface, pool poolInterface, ethTxManager ethTxManager, zkEVMClient zkEVMClientInterface, eventLog *event.EventLog, genesis state.Genesis, cfg Config) (Synchronizer, error)
NewSynchronizer creates and initializes an instance of Synchronizer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.