l2_sync_incaberry

package
v0.6.6-RC4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncTrustedBatchesAction

type SyncTrustedBatchesAction struct {
	TrustedState TrustedState
	// contains filtered or unexported fields
}

SyncTrustedBatchesAction is the action that synchronizes the trusted state

func NewSyncTrustedStateExecutor

func NewSyncTrustedStateExecutor(zkEVMClient zkEVMClientInterface, state syncTrustedBatchesStateInterface, sync syncTrustedBatchesSynchronizerInterface) *SyncTrustedBatchesAction

NewSyncTrustedStateExecutor creates a new syncTrustedBatchesAction for incaberry

func (*SyncTrustedBatchesAction) CleanTrustedState

func (s *SyncTrustedBatchesAction) CleanTrustedState()

CleanTrustedState Clean cache of TrustedBatches and StateRoot

func (*SyncTrustedBatchesAction) GetCachedBatch added in v0.5.4

func (s *SyncTrustedBatchesAction) GetCachedBatch(batchNumber uint64) *state.Batch

GetCachedBatch implements syncinterfaces.SyncTrustedStateExecutor. Returns a cached batch

func (*SyncTrustedBatchesAction) SyncTrustedState

func (s *SyncTrustedBatchesAction) SyncTrustedState(ctx context.Context, latestSyncedBatch uint64, maximumBatchNumberToProcess uint64) error

SyncTrustedState synchronizes information from the trusted sequencer related to the trusted state when the node has all the information from l1 synchronized

type TrustedState

type TrustedState struct {
	LastTrustedBatches []*state.Batch
	LastStateRoot      *common.Hash
}

TrustedState contains the last trusted batches and stateRoot (cache)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL