batchbuilder

package
v1.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

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