{"modulePath":"github.com/chainbing/node","version":"v0.0.0-20220110094656-e04c47b4d7c8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package batchbuilder\n\n## Types\n\n```go\ntype BatchBuilder struct {\n\t// contains filtered or unexported fields\n}\n```\nBatchBuilder implements the batch builder type, which contains the functionalities\n\n```go\nfunc NewBatchBuilder(dbpath string, synchronizerStateDB *statedb.StateDB, batchNum common.BatchNum,\n\tnLevels uint64) (*BatchBuilder, error)\n```\nNewBatchBuilder constructs a new BatchBuilder, and executes the bb.Reset method\n\n```go\nfunc (bb *BatchBuilder) BuildBatch(coordIdxs []common.Idx, configBatch *ConfigBatch, l1usertxs,\n\tl1coordinatortxs []common.L1Tx, pooll2txs []common.PoolL2Tx) (*common.ZKInputs, error)\n```\nBuildBatch takes the transactions and returns the common.ZKInputs of the next batch\n\n```go\nfunc (bb *BatchBuilder) LocalStateDB() *statedb.LocalStateDB\n```\nLocalStateDB returns the underlying LocalStateDB\n\n```go\nfunc (bb *BatchBuilder) Reset(batchNum common.BatchNum, fromSynchronizer bool) error\n```\nReset 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.\n\n```go\ntype ConfigBatch struct {\n\tTxProcessorConfig txprocessor.Config\n}\n```\nConfigBatch contains the batch configuration\n\n```go\ntype ConfigCircuit struct {\n\tTxsMax       uint64\n\tL1TxsMax     uint64\n\tSMTLevelsMax uint64\n}\n```\nConfigCircuit contains the circuit configuration\n\n","path":"github.com/chainbing/node/batchbuilder","name":"batchbuilder","synopsis":"","isRedistributable":true}
