batchbuilder

package
v0.0.0-...-e04c47b Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: AGPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchBuilder

type BatchBuilder struct {
	// contains filtered or unexported fields
}

BatchBuilder implements the batch builder type, which contains the functionalities

func NewBatchBuilder

func NewBatchBuilder(dbpath string, synchronizerStateDB *statedb.StateDB, batchNum common.BatchNum,
	nLevels uint64) (*BatchBuilder, error)

NewBatchBuilder constructs a new BatchBuilder, and executes the bb.Reset method

func (*BatchBuilder) BuildBatch

func (bb *BatchBuilder) BuildBatch(coordIdxs []common.Idx, configBatch *ConfigBatch, l1usertxs,
	l1coordinatortxs []common.L1Tx, pooll2txs []common.PoolL2Tx) (*common.ZKInputs, error)

BuildBatch takes the transactions and returns the common.ZKInputs of the next batch

func (*BatchBuilder) LocalStateDB

func (bb *BatchBuilder) LocalStateDB() *statedb.LocalStateDB

LocalStateDB returns the underlying LocalStateDB

func (*BatchBuilder) Reset

func (bb *BatchBuilder) Reset(batchNum common.BatchNum, fromSynchronizer bool) error

Reset tells the BatchBuilder to reset it's internal state to the required `batchNum`. If `fromSynchronizer` is true, the BatchBuilder must take a copy of the rollup state from the Synchronizer at that `batchNum`, otherwise it can just roll back the internal copy.

type ConfigBatch

type ConfigBatch struct {
	TxProcessorConfig txprocessor.Config
}

ConfigBatch contains the batch configuration

type ConfigCircuit

type ConfigCircuit struct {
	TxsMax       uint64
	L1TxsMax     uint64
	SMTLevelsMax uint64
}

ConfigCircuit contains the circuit configuration

Jump to

Keyboard shortcuts

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