Documentation ¶
Index ¶
- Variables
- type ClosingBatchParameters
- type ClosingSignalCh
- type Config
- type DBManagerCfg
- type DbManagerMock
- func (_m *DbManagerMock) BeginStateTransaction(ctx context.Context) (pgx.Tx, error)
- func (_m *DbManagerMock) CloseBatch(ctx context.Context, params ClosingBatchParameters) error
- func (_m *DbManagerMock) CountReorgs(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *DbManagerMock) CreateFirstBatch(ctx context.Context, sequencerAddress common.Address) state.ProcessingContext
- func (_m *DbManagerMock) DeleteTransactionFromPool(ctx context.Context, txHash common.Hash) error
- func (_m *DbManagerMock) FlushMerkleTree(ctx context.Context) error
- func (_m *DbManagerMock) GetBalanceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
- func (_m *DbManagerMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *DbManagerMock) GetDefaultMinGasPriceAllowed() uint64
- func (_m *DbManagerMock) GetForcedBatch(ctx context.Context, forcedBatchNumber uint64, dbTx pgx.Tx) (*state.ForcedBatch, error)
- func (_m *DbManagerMock) GetForcedBatchesSince(ctx context.Context, forcedBatchNumber uint64, maxBlockNumber uint64, ...) ([]*state.ForcedBatch, error)
- func (_m *DbManagerMock) GetForkIDByBatchNumber(batchNumber uint64) uint64
- func (_m *DbManagerMock) GetGasPrices(ctx context.Context) (pool.GasPrices, error)
- func (_m *DbManagerMock) GetL1AndL2GasPrice() (uint64, uint64)
- func (_m *DbManagerMock) GetLastBatch(ctx context.Context) (*state.Batch, error)
- func (_m *DbManagerMock) GetLastBatchNumber(ctx context.Context) (uint64, error)
- func (_m *DbManagerMock) GetLastBlock(ctx context.Context, dbTx pgx.Tx) (*state.Block, error)
- func (_m *DbManagerMock) GetLastClosedBatch(ctx context.Context) (*state.Batch, error)
- func (_m *DbManagerMock) GetLastL2BlockHeader(ctx context.Context, dbTx pgx.Tx) (*types.Header, error)
- func (_m *DbManagerMock) GetLastNBatches(ctx context.Context, numBatches uint) ([]*state.Batch, error)
- func (_m *DbManagerMock) GetLastTrustedForcedBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *DbManagerMock) GetLatestGer(ctx context.Context, maxBlockNumber uint64) (state.GlobalExitRoot, time.Time, error)
- func (_m *DbManagerMock) GetLatestVirtualBatchTimestamp(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
- func (_m *DbManagerMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, ...) (*big.Int, error)
- func (_m *DbManagerMock) GetStoredFlushID(ctx context.Context) (uint64, string, error)
- func (_m *DbManagerMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64) ([]types.Transaction, []uint8, error)
- func (_m *DbManagerMock) GetWIPBatch(ctx context.Context) (*WipBatch, error)
- func (_m *DbManagerMock) IsBatchClosed(ctx context.Context, batchNum uint64) (bool, error)
- func (_m *DbManagerMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error
- func (_m *DbManagerMock) ProcessForcedBatch(ForcedBatchNumber uint64, request state.ProcessRequest) (*state.ProcessBatchResponse, error)
- func (_m *DbManagerMock) StoreProcessedTxAndDeleteFromPool(ctx context.Context, tx transactionToStore) error
- func (_m *DbManagerMock) UpdateTxStatus(ctx context.Context, hash common.Hash, newStatus pool.TxStatus, isWIP bool, ...) error
- type DbTxMock
- func (_m *DbTxMock) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *DbTxMock) BeginFunc(ctx context.Context, f func(pgx.Tx) error) error
- func (_m *DbTxMock) Commit(ctx context.Context) error
- func (_m *DbTxMock) Conn() *pgx.Conn
- func (_m *DbTxMock) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
- func (_m *DbTxMock) LargeObjects() pgx.LargeObjects
- func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
- func (_m *DbTxMock) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error)
- func (_m *DbTxMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
- func (_m *DbTxMock) Rollback(ctx context.Context) error
- func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
- type EthermanMock
- func (_m *EthermanMock) BuildSequenceBatchesTxData(sender common.Address, sequences []types.Sequence, l2CoinBase common.Address) (*common.Address, []byte, error)
- func (_m *EthermanMock) EstimateGasSequenceBatches(sender common.Address, sequences []types.Sequence, l2CoinBase common.Address) (*coretypes.Transaction, error)
- func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error)
- func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error)
- func (_m *EthermanMock) GetLatestBlockNumber(ctx context.Context) (uint64, error)
- func (_m *EthermanMock) GetLatestBlockTimestamp(ctx context.Context) (uint64, error)
- func (_m *EthermanMock) GetSendSequenceFee(numBatches uint64) (*big.Int, error)
- func (_m *EthermanMock) TrustedSequencer() (common.Address, error)
- type FinalizerCfg
- type L2ReorgEvent
- type PoolMock
- func (_m *PoolMock) DeleteFailedTransactionsOlderThan(ctx context.Context, date time.Time) error
- func (_m *PoolMock) DeleteTransactionByHash(ctx context.Context, hash common.Hash) error
- func (_m *PoolMock) DeleteTransactionsByHashes(ctx context.Context, hashes []common.Hash) error
- func (_m *PoolMock) GetDefaultMinGasPriceAllowed() uint64
- func (_m *PoolMock) GetGasPrices(ctx context.Context) (pool.GasPrices, error)
- func (_m *PoolMock) GetL1AndL2GasPrice() (uint64, uint64)
- func (_m *PoolMock) GetNonWIPPendingTxs(ctx context.Context) ([]pool.Transaction, error)
- func (_m *PoolMock) GetTxZkCountersByHash(ctx context.Context, hash common.Hash) (*state.ZKCounters, error)
- func (_m *PoolMock) MarkWIPTxsAsPending(ctx context.Context) error
- func (_m *PoolMock) UpdateTxStatus(ctx context.Context, hash common.Hash, newStatus pool.TxStatus, isWIP bool, ...) error
- func (_m *PoolMock) UpdateTxWIPStatus(ctx context.Context, hash common.Hash, isWIP bool) error
- type Sequencer
- type StateMock
- func (_m *StateMock) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *StateMock) BeginStateTransaction(ctx context.Context) (pgx.Tx, error)
- func (_m *StateMock) CloseBatch(ctx context.Context, receipt state.ProcessingReceipt, dbTx pgx.Tx) error
- func (_m *StateMock) CountReorgs(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) ExecuteBatch(ctx context.Context, batch state.Batch, updateMerkleTree bool, dbTx pgx.Tx) (*executor.ProcessBatchResponse, error)
- func (_m *StateMock) FlushMerkleTree(ctx context.Context) error
- func (_m *StateMock) GetBalanceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
- func (_m *StateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetDSBatches(ctx context.Context, firstBatchNumber uint64, lastBatchNumber uint64, ...) ([]*state.DSBatch, error)
- func (_m *StateMock) GetDSGenesisBlock(ctx context.Context, dbTx pgx.Tx) (*state.DSL2Block, error)
- func (_m *StateMock) GetDSL2Blocks(ctx context.Context, firstBatchNumber uint64, lastBatchNumber uint64, ...) ([]*state.DSL2Block, error)
- func (_m *StateMock) GetDSL2Transactions(ctx context.Context, firstL2Block uint64, lastL2Block uint64, dbTx pgx.Tx) ([]*state.DSL2Transaction, error)
- func (_m *StateMock) GetForcedBatch(ctx context.Context, forcedBatchNumber uint64, dbTx pgx.Tx) (*state.ForcedBatch, error)
- func (_m *StateMock) GetForcedBatchesSince(ctx context.Context, forcedBatchNumber uint64, maxBlockNumber uint64, ...) ([]*state.ForcedBatch, error)
- func (_m *StateMock) GetForkIDByBatchNumber(batchNumber uint64) uint64
- func (_m *StateMock) GetLastBatch(ctx context.Context, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastBlock(ctx context.Context, dbTx pgx.Tx) (*state.Block, error)
- func (_m *StateMock) GetLastClosedBatch(ctx context.Context, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetLastL2Block(ctx context.Context, dbTx pgx.Tx) (*types.Block, error)
- func (_m *StateMock) GetLastL2BlockHeader(ctx context.Context, dbTx pgx.Tx) (*types.Header, error)
- func (_m *StateMock) GetLastNBatches(ctx context.Context, numBatches uint, dbTx pgx.Tx) ([]*state.Batch, error)
- func (_m *StateMock) GetLastStateRoot(ctx context.Context, dbTx pgx.Tx) (common.Hash, error)
- func (_m *StateMock) GetLastTrustedForcedBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastVirtualBatchNum(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLatestGer(ctx context.Context, maxBlockNumber uint64) (state.GlobalExitRoot, time.Time, error)
- func (_m *StateMock) GetLatestGlobalExitRoot(ctx context.Context, maxBlockNumber uint64, dbTx pgx.Tx) (state.GlobalExitRoot, time.Time, error)
- func (_m *StateMock) GetLatestVirtualBatchTimestamp(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
- func (_m *StateMock) GetNonceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
- func (_m *StateMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, ...) (*big.Int, error)
- func (_m *StateMock) GetStoredFlushID(ctx context.Context) (uint64, string, error)
- func (_m *StateMock) GetTimeForLatestBatchVirtualization(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
- func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]types.Transaction, []uint8, error)
- func (_m *StateMock) GetTxsOlderThanNL1Blocks(ctx context.Context, nL1Blocks uint64, dbTx pgx.Tx) ([]common.Hash, error)
- func (_m *StateMock) IsBatchClosed(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (bool, error)
- func (_m *StateMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error
- func (_m *StateMock) ProcessBatch(ctx context.Context, request state.ProcessRequest, updateMerkleTree bool) (*state.ProcessBatchResponse, error)
- func (_m *StateMock) ProcessSequencerBatch(ctx context.Context, batchNumber uint64, batchL2Data []byte, ...) (*state.ProcessBatchResponse, error)
- func (_m *StateMock) StoreTransaction(ctx context.Context, batchNumber uint64, ...) (*types.Header, error)
- func (_m *StateMock) UpdateBatchL2Data(ctx context.Context, batchNumber uint64, batchL2Data []byte, dbTx pgx.Tx) error
- func (_m *StateMock) UpdateBatchL2DataAndLER(ctx context.Context, batchNumber uint64, batchL2Data []byte, ...) error
- type StreamServerCfg
- type TxTracker
- type WipBatch
- type Worker
- func (w *Worker) AddForcedTx(txHash common.Hash, addr common.Address)
- func (w *Worker) AddPendingTxToStore(txHash common.Hash, addr common.Address)
- func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (replacedTx *TxTracker, dropReason error)
- func (w *Worker) DeleteForcedTx(txHash common.Hash, addr common.Address)
- func (w *Worker) DeletePendingTxToStore(txHash common.Hash, addr common.Address)
- func (w *Worker) DeleteTx(txHash common.Hash, addr common.Address)
- func (w *Worker) ExpireTransactions(maxTime time.Duration) []*TxTracker
- func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker
- func (w *Worker) HandleL2Reorg(txHashes []common.Hash)
- func (w *Worker) MoveTxToNotReady(txHash common.Hash, from common.Address, actualNonce *uint64, ...) []*TxTracker
- func (w *Worker) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error)
- func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.InfoReadWrite) []*TxTracker
- func (w *Worker) UpdateTxZKCounters(txHash common.Hash, addr common.Address, counters state.ZKCounters)
- type WorkerMock
- func (_m *WorkerMock) AddForcedTx(txHash common.Hash, addr common.Address)
- func (_m *WorkerMock) AddPendingTxToStore(txHash common.Hash, addr common.Address)
- func (_m *WorkerMock) AddTxTracker(ctx context.Context, txTracker *TxTracker) (*TxTracker, error)
- func (_m *WorkerMock) DeleteForcedTx(txHash common.Hash, addr common.Address)
- func (_m *WorkerMock) DeletePendingTxToStore(txHash common.Hash, addr common.Address)
- func (_m *WorkerMock) DeleteTx(txHash common.Hash, from common.Address)
- func (_m *WorkerMock) GetBestFittingTx(resources state.BatchResources) *TxTracker
- func (_m *WorkerMock) HandleL2Reorg(txHashes []common.Hash)
- func (_m *WorkerMock) MoveTxToNotReady(txHash common.Hash, from common.Address, actualNonce *uint64, ...) []*TxTracker
- func (_m *WorkerMock) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error)
- func (_m *WorkerMock) UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.InfoReadWrite) []*TxTracker
- func (_m *WorkerMock) UpdateTxZKCounters(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrExpiredTransaction happens when the transaction is expired ErrExpiredTransaction = errors.New("transaction expired") // ErrEffectiveGasPriceReprocess happens when the effective gas price requires reexecution ErrEffectiveGasPriceReprocess = errors.New("effective gas price requires reprocessing the transaction") // ErrDuplicatedNonce is returned when adding a new tx to the worker and there is an existing tx // with the same nonce and higher gasPrice (in this case we keep the existing tx) ErrDuplicatedNonce = errors.New("duplicated nonce") // ErrReplacedTransaction is returned when an existing tx is replaced by a new tx with the same nonce and higher gasPrice ErrReplacedTransaction = errors.New("replaced transaction") // ErrGetBatchByNumber happens when we get an error trying to get a batch by number (GetBatchByNumber) ErrGetBatchByNumber = errors.New("get batch by number error") // ErrDecodeBatchL2Data happens when we get an error trying to decode BatchL2Data (DecodeTxs) ErrDecodeBatchL2Data = errors.New("decoding BatchL2Data error") // ErrProcessBatch happens when we get an error trying to process (executor) a batch ErrProcessBatch = errors.New("processing batch error") // ErrProcessBatchOOC happens when we get an OOC when processing (executor) a batch ErrProcessBatchOOC = errors.New("processing batch OOC") // ErrStateRootNoMatch happens when the SR returned for a full batch processing (sanity check) doesn't match // the SR calculated when filling a batch tx by tx ErrStateRootNoMatch = errors.New("state root no match") // ErrExecutorError happens when we got an executor error when processing a batch ErrExecutorError = errors.New("executor error") )
Functions ¶
This section is empty.
Types ¶
type ClosingBatchParameters ¶
type ClosingBatchParameters struct { BatchNumber uint64 StateRoot common.Hash LocalExitRoot common.Hash AccInputHash common.Hash Txs []types.Transaction BatchResources state.BatchResources ClosingReason state.ClosingReason EffectivePercentages []uint8 }
ClosingBatchParameters contains the necessary parameters to close a batch
type ClosingSignalCh ¶
type ClosingSignalCh struct { ForcedBatchCh chan state.ForcedBatch GERCh chan common.Hash L2ReorgCh chan L2ReorgEvent }
ClosingSignalCh is a struct that contains all the channels that are used to receive batch closing signals
type Config ¶
type Config struct { // WaitPeriodPoolIsEmpty is the time the sequencer waits until // trying to add new txs to the state WaitPeriodPoolIsEmpty types.Duration `mapstructure:"WaitPeriodPoolIsEmpty"` // BlocksAmountForTxsToBeDeleted is blocks amount after which txs will be deleted from the pool BlocksAmountForTxsToBeDeleted uint64 `mapstructure:"BlocksAmountForTxsToBeDeleted"` // FrequencyToCheckTxsForDelete is frequency with which txs will be checked for deleting FrequencyToCheckTxsForDelete types.Duration `mapstructure:"FrequencyToCheckTxsForDelete"` // TxLifetimeCheckTimeout is the time the sequencer waits to check txs lifetime TxLifetimeCheckTimeout types.Duration `mapstructure:"TxLifetimeCheckTimeout"` // MaxTxLifetime is the time a tx can be in the sequencer/worker memory MaxTxLifetime types.Duration `mapstructure:"MaxTxLifetime"` // Finalizer's specific config properties Finalizer FinalizerCfg `mapstructure:"Finalizer"` // DBManager's specific config properties DBManager DBManagerCfg `mapstructure:"DBManager"` // StreamServerCfg is the config for the stream server StreamServer StreamServerCfg `mapstructure:"StreamServer"` }
Config represents the configuration of a sequencer
type DBManagerCfg ¶
type DBManagerCfg struct { PoolRetrievalInterval types.Duration `mapstructure:"PoolRetrievalInterval"` L2ReorgRetrievalInterval types.Duration `mapstructure:"L2ReorgRetrievalInterval"` }
DBManagerCfg contains the DBManager's configuration properties
type DbManagerMock ¶
DbManagerMock is an autogenerated mock type for the dbManagerInterface type
func NewDbManagerMock ¶
func NewDbManagerMock(t interface { mock.TestingT Cleanup(func()) }) *DbManagerMock
NewDbManagerMock creates a new instance of DbManagerMock. 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 (*DbManagerMock) BeginStateTransaction ¶
BeginStateTransaction provides a mock function with given fields: ctx
func (*DbManagerMock) CloseBatch ¶
func (_m *DbManagerMock) CloseBatch(ctx context.Context, params ClosingBatchParameters) error
CloseBatch provides a mock function with given fields: ctx, params
func (*DbManagerMock) CountReorgs ¶
CountReorgs provides a mock function with given fields: ctx, dbTx
func (*DbManagerMock) CreateFirstBatch ¶
func (_m *DbManagerMock) CreateFirstBatch(ctx context.Context, sequencerAddress common.Address) state.ProcessingContext
CreateFirstBatch provides a mock function with given fields: ctx, sequencerAddress
func (*DbManagerMock) DeleteTransactionFromPool ¶
DeleteTransactionFromPool provides a mock function with given fields: ctx, txHash
func (*DbManagerMock) FlushMerkleTree ¶
func (_m *DbManagerMock) FlushMerkleTree(ctx context.Context) error
FlushMerkleTree provides a mock function with given fields: ctx
func (*DbManagerMock) GetBalanceByStateRoot ¶
func (_m *DbManagerMock) GetBalanceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
GetBalanceByStateRoot provides a mock function with given fields: ctx, address, root
func (*DbManagerMock) GetBatchByNumber ¶
func (_m *DbManagerMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
GetBatchByNumber provides a mock function with given fields: ctx, batchNumber, dbTx
func (*DbManagerMock) GetDefaultMinGasPriceAllowed ¶ added in v0.0.990
func (_m *DbManagerMock) GetDefaultMinGasPriceAllowed() uint64
GetDefaultMinGasPriceAllowed provides a mock function with given fields:
func (*DbManagerMock) GetForcedBatch ¶ added in v0.0.990
func (_m *DbManagerMock) GetForcedBatch(ctx context.Context, forcedBatchNumber uint64, dbTx pgx.Tx) (*state.ForcedBatch, error)
GetForcedBatch provides a mock function with given fields: ctx, forcedBatchNumber, dbTx
func (*DbManagerMock) GetForcedBatchesSince ¶
func (_m *DbManagerMock) GetForcedBatchesSince(ctx context.Context, forcedBatchNumber uint64, maxBlockNumber uint64, dbTx pgx.Tx) ([]*state.ForcedBatch, error)
GetForcedBatchesSince provides a mock function with given fields: ctx, forcedBatchNumber, maxBlockNumber, dbTx
func (*DbManagerMock) GetForkIDByBatchNumber ¶ added in v0.0.990
func (_m *DbManagerMock) GetForkIDByBatchNumber(batchNumber uint64) uint64
GetForkIDByBatchNumber provides a mock function with given fields: batchNumber
func (*DbManagerMock) GetGasPrices ¶ added in v0.0.990
GetGasPrices provides a mock function with given fields: ctx
func (*DbManagerMock) GetL1AndL2GasPrice ¶ added in v0.4.0
func (_m *DbManagerMock) GetL1AndL2GasPrice() (uint64, uint64)
GetL1AndL2GasPrice provides a mock function with given fields:
func (*DbManagerMock) GetLastBatch ¶
GetLastBatch provides a mock function with given fields: ctx
func (*DbManagerMock) GetLastBatchNumber ¶
func (_m *DbManagerMock) GetLastBatchNumber(ctx context.Context) (uint64, error)
GetLastBatchNumber provides a mock function with given fields: ctx
func (*DbManagerMock) GetLastBlock ¶
GetLastBlock provides a mock function with given fields: ctx, dbTx
func (*DbManagerMock) GetLastClosedBatch ¶
GetLastClosedBatch provides a mock function with given fields: ctx
func (*DbManagerMock) GetLastL2BlockHeader ¶
func (_m *DbManagerMock) GetLastL2BlockHeader(ctx context.Context, dbTx pgx.Tx) (*types.Header, error)
GetLastL2BlockHeader provides a mock function with given fields: ctx, dbTx
func (*DbManagerMock) GetLastNBatches ¶
func (_m *DbManagerMock) GetLastNBatches(ctx context.Context, numBatches uint) ([]*state.Batch, error)
GetLastNBatches provides a mock function with given fields: ctx, numBatches
func (*DbManagerMock) GetLastTrustedForcedBatchNumber ¶
func (_m *DbManagerMock) GetLastTrustedForcedBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
GetLastTrustedForcedBatchNumber provides a mock function with given fields: ctx, dbTx
func (*DbManagerMock) GetLatestGer ¶
func (_m *DbManagerMock) GetLatestGer(ctx context.Context, maxBlockNumber uint64) (state.GlobalExitRoot, time.Time, error)
GetLatestGer provides a mock function with given fields: ctx, maxBlockNumber
func (*DbManagerMock) GetLatestVirtualBatchTimestamp ¶
func (_m *DbManagerMock) GetLatestVirtualBatchTimestamp(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
GetLatestVirtualBatchTimestamp provides a mock function with given fields: ctx, dbTx
func (*DbManagerMock) GetStorageAt ¶ added in v0.4.3
func (_m *DbManagerMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, root common.Hash) (*big.Int, error)
GetStorageAt provides a mock function with given fields: ctx, address, position, root
func (*DbManagerMock) GetStoredFlushID ¶ added in v0.0.990
GetStoredFlushID provides a mock function with given fields: ctx
func (*DbManagerMock) GetTransactionsByBatchNumber ¶
func (_m *DbManagerMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64) ([]types.Transaction, []uint8, error)
GetTransactionsByBatchNumber provides a mock function with given fields: ctx, batchNumber
func (*DbManagerMock) GetWIPBatch ¶
func (_m *DbManagerMock) GetWIPBatch(ctx context.Context) (*WipBatch, error)
GetWIPBatch provides a mock function with given fields: ctx
func (*DbManagerMock) IsBatchClosed ¶
IsBatchClosed provides a mock function with given fields: ctx, batchNum
func (*DbManagerMock) OpenBatch ¶
func (_m *DbManagerMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error
OpenBatch provides a mock function with given fields: ctx, processingContext, dbTx
func (*DbManagerMock) ProcessForcedBatch ¶
func (_m *DbManagerMock) ProcessForcedBatch(ForcedBatchNumber uint64, request state.ProcessRequest) (*state.ProcessBatchResponse, error)
ProcessForcedBatch provides a mock function with given fields: ForcedBatchNumber, request
func (*DbManagerMock) StoreProcessedTxAndDeleteFromPool ¶ added in v0.0.990
func (_m *DbManagerMock) StoreProcessedTxAndDeleteFromPool(ctx context.Context, tx transactionToStore) error
StoreProcessedTxAndDeleteFromPool provides a mock function with given fields: ctx, tx
type DbTxMock ¶
DbTxMock is an autogenerated mock type for the Tx type
func NewDbTxMock ¶
NewDbTxMock creates a new instance of DbTxMock. 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 (*DbTxMock) CopyFrom ¶
func (_m *DbTxMock) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
CopyFrom provides a mock function with given fields: ctx, tableName, columnNames, rowSrc
func (*DbTxMock) Exec ¶
func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
Exec provides a mock function with given fields: ctx, sql, arguments
func (*DbTxMock) LargeObjects ¶
func (_m *DbTxMock) LargeObjects() pgx.LargeObjects
LargeObjects provides a mock function with given fields:
func (*DbTxMock) Prepare ¶
func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
Prepare provides a mock function with given fields: ctx, name, sql
func (*DbTxMock) QueryFunc ¶
func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, f func(pgx.QueryFuncRow) error) (pgconn.CommandTag, error)
QueryFunc provides a mock function with given fields: ctx, sql, args, scans, f
type EthermanMock ¶
EthermanMock is an autogenerated mock type for the etherman type
func NewEthermanMock ¶
func NewEthermanMock(t interface { mock.TestingT Cleanup(func()) }) *EthermanMock
NewEthermanMock creates a new instance of EthermanMock. 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 (*EthermanMock) BuildSequenceBatchesTxData ¶
func (_m *EthermanMock) BuildSequenceBatchesTxData(sender common.Address, sequences []types.Sequence, l2CoinBase common.Address) (*common.Address, []byte, error)
BuildSequenceBatchesTxData provides a mock function with given fields: sender, sequences, l2CoinBase
func (*EthermanMock) EstimateGasSequenceBatches ¶
func (_m *EthermanMock) EstimateGasSequenceBatches(sender common.Address, sequences []types.Sequence, l2CoinBase common.Address) (*coretypes.Transaction, error)
EstimateGasSequenceBatches provides a mock function with given fields: sender, sequences, l2CoinBase
func (*EthermanMock) GetLastBatchTimestamp ¶
func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error)
GetLastBatchTimestamp provides a mock function with given fields:
func (*EthermanMock) GetLatestBatchNumber ¶
func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error)
GetLatestBatchNumber provides a mock function with given fields:
func (*EthermanMock) GetLatestBlockNumber ¶
func (_m *EthermanMock) GetLatestBlockNumber(ctx context.Context) (uint64, error)
GetLatestBlockNumber provides a mock function with given fields: ctx
func (*EthermanMock) GetLatestBlockTimestamp ¶
func (_m *EthermanMock) GetLatestBlockTimestamp(ctx context.Context) (uint64, error)
GetLatestBlockTimestamp provides a mock function with given fields: ctx
func (*EthermanMock) GetSendSequenceFee ¶
func (_m *EthermanMock) GetSendSequenceFee(numBatches uint64) (*big.Int, error)
GetSendSequenceFee provides a mock function with given fields: numBatches
func (*EthermanMock) TrustedSequencer ¶
func (_m *EthermanMock) TrustedSequencer() (common.Address, error)
TrustedSequencer provides a mock function with given fields:
type FinalizerCfg ¶
type FinalizerCfg struct { // GERDeadlineTimeout is the time the finalizer waits after receiving closing signal to update Global Exit Root GERDeadlineTimeout types.Duration `mapstructure:"GERDeadlineTimeout"` // ForcedBatchDeadlineTimeout is the time the finalizer waits after receiving closing signal to process Forced Batches ForcedBatchDeadlineTimeout types.Duration `mapstructure:"ForcedBatchDeadlineTimeout"` // SleepDuration is the time the finalizer sleeps between each iteration, if there are no transactions to be processed SleepDuration types.Duration `mapstructure:"SleepDuration"` // ResourcePercentageToCloseBatch is the percentage window of the resource left out for the batch to be closed ResourcePercentageToCloseBatch uint32 `mapstructure:"ResourcePercentageToCloseBatch"` // GERFinalityNumberOfBlocks is number of blocks to consider GER final GERFinalityNumberOfBlocks uint64 `mapstructure:"GERFinalityNumberOfBlocks"` // ClosingSignalsManagerWaitForCheckingL1Timeout is used by the closing signals manager to wait for its operation ClosingSignalsManagerWaitForCheckingL1Timeout types.Duration `mapstructure:"ClosingSignalsManagerWaitForCheckingL1Timeout"` // ClosingSignalsManagerWaitForCheckingGER is used by the closing signals manager to wait for its operation ClosingSignalsManagerWaitForCheckingGER types.Duration `mapstructure:"ClosingSignalsManagerWaitForCheckingGER"` // ClosingSignalsManagerWaitForCheckingL1Timeout is used by the closing signals manager to wait for its operation ClosingSignalsManagerWaitForCheckingForcedBatches types.Duration `mapstructure:"ClosingSignalsManagerWaitForCheckingForcedBatches"` // ForcedBatchesFinalityNumberOfBlocks is number of blocks to consider GER final ForcedBatchesFinalityNumberOfBlocks uint64 `mapstructure:"ForcedBatchesFinalityNumberOfBlocks"` // TimestampResolution is the resolution of the timestamp used to close a batch TimestampResolution types.Duration `mapstructure:"TimestampResolution"` // StopSequencerOnBatchNum specifies the batch number where the Sequencer will stop to process more transactions and generate new batches. The Sequencer will halt after it closes the batch equal to this number StopSequencerOnBatchNum uint64 `mapstructure:"StopSequencerOnBatchNum"` // SequentialReprocessFullBatch indicates if the reprocess of a closed batch (sanity check) must be done in a // sequential way (instead than in parallel) SequentialReprocessFullBatch bool `mapstructure:"SequentialReprocessFullBatch"` }
FinalizerCfg contains the finalizer's configuration properties
type L2ReorgEvent ¶
L2ReorgEvent is the event that is triggered when a reorg happens in the L2
type PoolMock ¶
PoolMock is an autogenerated mock type for the txPool type
func NewPoolMock ¶
NewPoolMock creates a new instance of PoolMock. 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 (*PoolMock) DeleteFailedTransactionsOlderThan ¶ added in v0.4.0
DeleteFailedTransactionsOlderThan provides a mock function with given fields: ctx, date
func (*PoolMock) DeleteTransactionByHash ¶
DeleteTransactionByHash provides a mock function with given fields: ctx, hash
func (*PoolMock) DeleteTransactionsByHashes ¶
DeleteTransactionsByHashes provides a mock function with given fields: ctx, hashes
func (*PoolMock) GetDefaultMinGasPriceAllowed ¶ added in v0.0.990
GetDefaultMinGasPriceAllowed provides a mock function with given fields:
func (*PoolMock) GetGasPrices ¶ added in v0.0.990
GetGasPrices provides a mock function with given fields: ctx
func (*PoolMock) GetL1AndL2GasPrice ¶ added in v0.4.0
GetL1AndL2GasPrice provides a mock function with given fields:
func (*PoolMock) GetNonWIPPendingTxs ¶
GetNonWIPPendingTxs provides a mock function with given fields: ctx
func (*PoolMock) GetTxZkCountersByHash ¶
func (_m *PoolMock) GetTxZkCountersByHash(ctx context.Context, hash common.Hash) (*state.ZKCounters, error)
GetTxZkCountersByHash provides a mock function with given fields: ctx, hash
func (*PoolMock) MarkWIPTxsAsPending ¶
MarkWIPTxsAsPending provides a mock function with given fields: ctx
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
Sequencer represents a sequencer
type StateMock ¶
StateMock is an autogenerated mock type for the stateInterface type
func NewStateMock ¶
NewStateMock creates a new instance of StateMock. 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 (*StateMock) BeginStateTransaction ¶
BeginStateTransaction provides a mock function with given fields: ctx
func (*StateMock) CloseBatch ¶
func (_m *StateMock) CloseBatch(ctx context.Context, receipt state.ProcessingReceipt, dbTx pgx.Tx) error
CloseBatch provides a mock function with given fields: ctx, receipt, dbTx
func (*StateMock) CountReorgs ¶
CountReorgs provides a mock function with given fields: ctx, dbTx
func (*StateMock) ExecuteBatch ¶
func (_m *StateMock) ExecuteBatch(ctx context.Context, batch state.Batch, updateMerkleTree bool, dbTx pgx.Tx) (*executor.ProcessBatchResponse, error)
ExecuteBatch provides a mock function with given fields: ctx, batch, updateMerkleTree, dbTx
func (*StateMock) FlushMerkleTree ¶
FlushMerkleTree provides a mock function with given fields: ctx
func (*StateMock) GetBalanceByStateRoot ¶
func (_m *StateMock) GetBalanceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
GetBalanceByStateRoot provides a mock function with given fields: ctx, address, root
func (*StateMock) GetBatchByNumber ¶
func (_m *StateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
GetBatchByNumber provides a mock function with given fields: ctx, batchNumber, dbTx
func (*StateMock) GetDSBatches ¶ added in v0.4.0
func (_m *StateMock) GetDSBatches(ctx context.Context, firstBatchNumber uint64, lastBatchNumber uint64, readWIPBatch bool, dbTx pgx.Tx) ([]*state.DSBatch, error)
GetDSBatches provides a mock function with given fields: ctx, firstBatchNumber, lastBatchNumber, readWIPBatch, dbTx
func (*StateMock) GetDSGenesisBlock ¶ added in v0.0.990
GetDSGenesisBlock provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetDSL2Blocks ¶ added in v0.0.990
func (_m *StateMock) GetDSL2Blocks(ctx context.Context, firstBatchNumber uint64, lastBatchNumber uint64, dbTx pgx.Tx) ([]*state.DSL2Block, error)
GetDSL2Blocks provides a mock function with given fields: ctx, firstBatchNumber, lastBatchNumber, dbTx
func (*StateMock) GetDSL2Transactions ¶ added in v0.0.990
func (_m *StateMock) GetDSL2Transactions(ctx context.Context, firstL2Block uint64, lastL2Block uint64, dbTx pgx.Tx) ([]*state.DSL2Transaction, error)
GetDSL2Transactions provides a mock function with given fields: ctx, firstL2Block, lastL2Block, dbTx
func (*StateMock) GetForcedBatch ¶
func (_m *StateMock) GetForcedBatch(ctx context.Context, forcedBatchNumber uint64, dbTx pgx.Tx) (*state.ForcedBatch, error)
GetForcedBatch provides a mock function with given fields: ctx, forcedBatchNumber, dbTx
func (*StateMock) GetForcedBatchesSince ¶
func (_m *StateMock) GetForcedBatchesSince(ctx context.Context, forcedBatchNumber uint64, maxBlockNumber uint64, dbTx pgx.Tx) ([]*state.ForcedBatch, error)
GetForcedBatchesSince provides a mock function with given fields: ctx, forcedBatchNumber, maxBlockNumber, dbTx
func (*StateMock) GetForkIDByBatchNumber ¶ added in v0.0.990
GetForkIDByBatchNumber provides a mock function with given fields: batchNumber
func (*StateMock) GetLastBatch ¶
GetLastBatch provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastBatchNumber ¶
GetLastBatchNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastBlock ¶
GetLastBlock provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastClosedBatch ¶
GetLastClosedBatch provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastL2Block ¶
GetLastL2Block provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastL2BlockHeader ¶
GetLastL2BlockHeader provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastNBatches ¶
func (_m *StateMock) GetLastNBatches(ctx context.Context, numBatches uint, dbTx pgx.Tx) ([]*state.Batch, error)
GetLastNBatches provides a mock function with given fields: ctx, numBatches, dbTx
func (*StateMock) GetLastStateRoot ¶
GetLastStateRoot provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastTrustedForcedBatchNumber ¶
func (_m *StateMock) GetLastTrustedForcedBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
GetLastTrustedForcedBatchNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastVirtualBatchNum ¶
GetLastVirtualBatchNum provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLatestGer ¶
func (_m *StateMock) GetLatestGer(ctx context.Context, maxBlockNumber uint64) (state.GlobalExitRoot, time.Time, error)
GetLatestGer provides a mock function with given fields: ctx, maxBlockNumber
func (*StateMock) GetLatestGlobalExitRoot ¶
func (_m *StateMock) GetLatestGlobalExitRoot(ctx context.Context, maxBlockNumber uint64, dbTx pgx.Tx) (state.GlobalExitRoot, time.Time, error)
GetLatestGlobalExitRoot provides a mock function with given fields: ctx, maxBlockNumber, dbTx
func (*StateMock) GetLatestVirtualBatchTimestamp ¶
func (_m *StateMock) GetLatestVirtualBatchTimestamp(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
GetLatestVirtualBatchTimestamp provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetNonceByStateRoot ¶
func (_m *StateMock) GetNonceByStateRoot(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
GetNonceByStateRoot provides a mock function with given fields: ctx, address, root
func (*StateMock) GetStorageAt ¶ added in v0.4.3
func (_m *StateMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, root common.Hash) (*big.Int, error)
GetStorageAt provides a mock function with given fields: ctx, address, position, root
func (*StateMock) GetStoredFlushID ¶ added in v0.0.990
GetStoredFlushID provides a mock function with given fields: ctx
func (*StateMock) GetTimeForLatestBatchVirtualization ¶
func (_m *StateMock) GetTimeForLatestBatchVirtualization(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
GetTimeForLatestBatchVirtualization provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetTransactionsByBatchNumber ¶
func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]types.Transaction, []uint8, error)
GetTransactionsByBatchNumber provides a mock function with given fields: ctx, batchNumber, dbTx
func (*StateMock) GetTxsOlderThanNL1Blocks ¶
func (_m *StateMock) GetTxsOlderThanNL1Blocks(ctx context.Context, nL1Blocks uint64, dbTx pgx.Tx) ([]common.Hash, error)
GetTxsOlderThanNL1Blocks provides a mock function with given fields: ctx, nL1Blocks, dbTx
func (*StateMock) IsBatchClosed ¶
IsBatchClosed provides a mock function with given fields: ctx, batchNum, dbTx
func (*StateMock) OpenBatch ¶
func (_m *StateMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error
OpenBatch provides a mock function with given fields: ctx, processingContext, dbTx
func (*StateMock) ProcessBatch ¶
func (_m *StateMock) ProcessBatch(ctx context.Context, request state.ProcessRequest, updateMerkleTree bool) (*state.ProcessBatchResponse, error)
ProcessBatch provides a mock function with given fields: ctx, request, updateMerkleTree
func (*StateMock) ProcessSequencerBatch ¶
func (_m *StateMock) ProcessSequencerBatch(ctx context.Context, batchNumber uint64, batchL2Data []byte, caller metrics.CallerLabel, dbTx pgx.Tx) (*state.ProcessBatchResponse, error)
ProcessSequencerBatch provides a mock function with given fields: ctx, batchNumber, batchL2Data, caller, dbTx
func (*StateMock) StoreTransaction ¶
func (_m *StateMock) StoreTransaction(ctx context.Context, batchNumber uint64, processedTx *state.ProcessTransactionResponse, coinbase common.Address, timestamp uint64, egpLog *state.EffectiveGasPriceLog, dbTx pgx.Tx) (*types.Header, error)
StoreTransaction provides a mock function with given fields: ctx, batchNumber, processedTx, coinbase, timestamp, egpLog, dbTx
func (*StateMock) UpdateBatchL2Data ¶
func (_m *StateMock) UpdateBatchL2Data(ctx context.Context, batchNumber uint64, batchL2Data []byte, dbTx pgx.Tx) error
UpdateBatchL2Data provides a mock function with given fields: ctx, batchNumber, batchL2Data, dbTx
func (*StateMock) UpdateBatchL2DataAndLER ¶ added in v0.4.3
func (_m *StateMock) UpdateBatchL2DataAndLER(ctx context.Context, batchNumber uint64, batchL2Data []byte, localExitRoot common.Hash, dbTx pgx.Tx) error
UpdateBatchL2DataAndLER provides a mock function with given fields: ctx, batchNumber, batchL2Data, localExitRoot, dbTx
type StreamServerCfg ¶ added in v0.0.990
type StreamServerCfg struct { // Port to listen on Port uint16 `mapstructure:"Port"` // Filename of the binary data file Filename string `mapstructure:"Filename"` // Enabled is a flag to enable/disable the data streamer Enabled bool `mapstructure:"Enabled"` // Log is the log configuration Log log.Config `mapstructure:"Log"` }
StreamServerCfg contains the data streamer's configuration properties
type TxTracker ¶
type TxTracker struct { Hash common.Hash HashStr string From common.Address FromStr string Nonce uint64 Gas uint64 // To check if it fits into a batch GasPrice *big.Int Cost *big.Int // Cost = Amount + Benefit BatchResources state.BatchResources // To check if it fits into a batch RawTx []byte ReceivedAt time.Time // To check if it has been in the txSortedList for too long IP string // IP of the tx sender FailedReason *string // FailedReason is the reason why the tx failed, if it failed EffectiveGasPrice *big.Int IsLastExecution bool EGPLog state.EffectiveGasPriceLog L1GasPrice uint64 L2GasPrice uint64 }
TxTracker is a struct that contains all the tx data needed to be managed by the worker
type WipBatch ¶
type WipBatch struct {
// contains filtered or unexported fields
}
WipBatch represents a work-in-progress batch.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker represents the worker component of the sequencer
func NewWorker ¶
func NewWorker(state stateInterface, constraints state.BatchConstraintsCfg) *Worker
NewWorker creates an init a worker
func (*Worker) AddForcedTx ¶ added in v0.0.990
AddForcedTx adds a forced tx to the addrQueue
func (*Worker) AddPendingTxToStore ¶ added in v0.0.990
AddPendingTxToStore adds a tx to the addrQueue list of pending txs to store in the DB (trusted state)
func (*Worker) AddTxTracker ¶
func (w *Worker) AddTxTracker(ctx context.Context, tx *TxTracker) (replacedTx *TxTracker, dropReason error)
AddTxTracker adds a new Tx to the Worker
func (*Worker) DeleteForcedTx ¶ added in v0.0.990
DeleteForcedTx deletes a forced tx from the addrQueue
func (*Worker) DeletePendingTxToStore ¶ added in v0.0.990
DeletePendingTxToStore delete a tx from the addrQueue list of pending txs to store in the DB (trusted state)
func (*Worker) ExpireTransactions ¶
ExpireTransactions deletes old txs
func (*Worker) GetBestFittingTx ¶
func (w *Worker) GetBestFittingTx(resources state.BatchResources) *TxTracker
GetBestFittingTx gets the most efficient tx that fits in the available batch resources
func (*Worker) HandleL2Reorg ¶
HandleL2Reorg handles the L2 reorg signal
func (*Worker) MoveTxToNotReady ¶
func (w *Worker) MoveTxToNotReady(txHash common.Hash, from common.Address, actualNonce *uint64, actualBalance *big.Int) []*TxTracker
MoveTxToNotReady move a tx to not ready after it fails to execute
func (*Worker) NewTxTracker ¶
func (w *Worker) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error)
NewTxTracker creates and inits a TxTracker
func (*Worker) UpdateAfterSingleSuccessfulTxExecution ¶
func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.InfoReadWrite) []*TxTracker
UpdateAfterSingleSuccessfulTxExecution updates the touched addresses after execute on Executor a successfully tx
func (*Worker) UpdateTxZKCounters ¶ added in v0.0.990
func (w *Worker) UpdateTxZKCounters(txHash common.Hash, addr common.Address, counters state.ZKCounters)
UpdateTxZKCounters updates the ZKCounter of a tx
type WorkerMock ¶
WorkerMock is an autogenerated mock type for the workerInterface type
func NewWorkerMock ¶
func NewWorkerMock(t interface { mock.TestingT Cleanup(func()) }) *WorkerMock
NewWorkerMock creates a new instance of WorkerMock. 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 (*WorkerMock) AddForcedTx ¶ added in v0.0.990
func (_m *WorkerMock) AddForcedTx(txHash common.Hash, addr common.Address)
AddForcedTx provides a mock function with given fields: txHash, addr
func (*WorkerMock) AddPendingTxToStore ¶ added in v0.0.990
func (_m *WorkerMock) AddPendingTxToStore(txHash common.Hash, addr common.Address)
AddPendingTxToStore provides a mock function with given fields: txHash, addr
func (*WorkerMock) AddTxTracker ¶
AddTxTracker provides a mock function with given fields: ctx, txTracker
func (*WorkerMock) DeleteForcedTx ¶ added in v0.0.990
func (_m *WorkerMock) DeleteForcedTx(txHash common.Hash, addr common.Address)
DeleteForcedTx provides a mock function with given fields: txHash, addr
func (*WorkerMock) DeletePendingTxToStore ¶ added in v0.0.990
func (_m *WorkerMock) DeletePendingTxToStore(txHash common.Hash, addr common.Address)
DeletePendingTxToStore provides a mock function with given fields: txHash, addr
func (*WorkerMock) DeleteTx ¶
func (_m *WorkerMock) DeleteTx(txHash common.Hash, from common.Address)
DeleteTx provides a mock function with given fields: txHash, from
func (*WorkerMock) GetBestFittingTx ¶
func (_m *WorkerMock) GetBestFittingTx(resources state.BatchResources) *TxTracker
GetBestFittingTx provides a mock function with given fields: resources
func (*WorkerMock) HandleL2Reorg ¶
func (_m *WorkerMock) HandleL2Reorg(txHashes []common.Hash)
HandleL2Reorg provides a mock function with given fields: txHashes
func (*WorkerMock) MoveTxToNotReady ¶
func (_m *WorkerMock) MoveTxToNotReady(txHash common.Hash, from common.Address, actualNonce *uint64, actualBalance *big.Int) []*TxTracker
MoveTxToNotReady provides a mock function with given fields: txHash, from, actualNonce, actualBalance
func (*WorkerMock) NewTxTracker ¶
func (_m *WorkerMock) NewTxTracker(tx types.Transaction, counters state.ZKCounters, ip string) (*TxTracker, error)
NewTxTracker provides a mock function with given fields: tx, counters, ip
func (*WorkerMock) UpdateAfterSingleSuccessfulTxExecution ¶
func (_m *WorkerMock) UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.InfoReadWrite) []*TxTracker
UpdateAfterSingleSuccessfulTxExecution provides a mock function with given fields: from, touchedAddresses
func (*WorkerMock) UpdateTxZKCounters ¶ added in v0.0.990
func (_m *WorkerMock) UpdateTxZKCounters(txHash common.Hash, from common.Address, ZKCounters state.ZKCounters)
UpdateTxZKCounters provides a mock function with given fields: txHash, from, ZKCounters