Documentation ¶
Index ¶
- Variables
- type CriticalErrorHandler
- type EthermanGetLatestBatchNumber
- type EventLogInterface
- type StateBeginTransactionInterface
- type StateGetBatchByNumberInterface
- type SyncTrustedStateExecutor
- type SynchronizerFlushIDManager
- type ZKEVMClientGlobalExitRootGetter
- type ZKEVMClientInterface
- type ZKEVMClientTrustedBatchesGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingSyncFromL1 is returned when we are behind expected L1 sync, so must be done from L1 ErrMissingSyncFromL1 = errors.New("must sync from L1") // ErrFatalDesyncFromL1 is returned when trusted node and permissionless node have different data ErrFatalDesyncFromL1 = errors.New("fatal situation: the TrustedNode have another data!. Halt or do something") )
Functions ¶
This section is empty.
Types ¶
type CriticalErrorHandler ¶
type CriticalErrorHandler interface { // CriticalError is called when a critical error occurs. The error is passed in as a parameter. // this function could be blocking or non-blocking, depending on the implementation. CriticalError(ctx context.Context, err error) }
CriticalErrorHandler is an interface for handling critical errors. Before that class this was called Halt()
type EventLogInterface ¶
EventLogInterface write an event to the event log database
type StateBeginTransactionInterface ¶
type StateBeginTransactionInterface interface {
BeginStateTransaction(ctx context.Context) (pgx.Tx, error)
}
StateInterface contains the methods required to interact with the state.
type SyncTrustedStateExecutor ¶
type SyncTrustedStateExecutor interface { // SyncTrustedState syncs the trusted state with the permissionless state // if returns error ErrMissingSyncFromL1 then must force a L1 sync SyncTrustedState(ctx context.Context, latestSyncedBatch uint64) error // CleanTrustedState clean cache of Batches and StateRoot CleanTrustedState() }
SyncTrustedStateExecutor is the interface that class that synchronize permissionless with a trusted node
type SynchronizerFlushIDManager ¶
type SynchronizerFlushIDManager interface { PendingFlushID(flushID uint64, proverID string) CheckFlushID(dbTx pgx.Tx) error }
SynchronizerFlushIDManager is a interface with the methods to manage the flushID
type ZKEVMClientGlobalExitRootGetter ¶
type ZKEVMClientGlobalExitRootGetter interface {
ExitRootsByGER(ctx context.Context, globalExitRoot common.Hash) (*types.ExitRoots, error)
}
ZkEVMClientInterface contains the methods required to interact with zkEVM-RPC for obtain GlobalExitRoot information
type ZKEVMClientInterface ¶
type ZKEVMClientInterface interface { ZKEVMClientTrustedBatchesGetter ZKEVMClientGlobalExitRootGetter }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.