Skip to content

Commit

Permalink
base coord setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed Dec 10, 2024
1 parent 2535388 commit 76942aa
Show file tree
Hide file tree
Showing 14 changed files with 852 additions and 182 deletions.
5 changes: 5 additions & 0 deletions sequencer/batchbuilder/batchbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ func (bb *BatchBuilder) Reset(batchNum common.BatchNum, fromSynchronizer bool) e
//TODO: Check and Update this reseting functionality
// return tracerr.Wrap(bb.localStateDB.Reset(batchNum, fromSynchronizer))
}

// LocalStateDB returns the underlying LocalStateDB
func (bb *BatchBuilder) LocalStateDB() *statedb.LocalStateDB {
return bb.localStateDB
}
24 changes: 15 additions & 9 deletions sequencer/common/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ type Batch struct {
BatchNum BatchNum `meddler:"batch_num"`
EthTxHash ethCommon.Hash `meddler:"eth_tx_hash"`
// Ethereum block in which the batch is forged
EthBlockNum int64 `meddler:"eth_block_num"`
ForgerAddr ethCommon.Address `meddler:"forger_addr"`
StateRoot *big.Int `meddler:"state_root,bigint"`
NumAccounts int `meddler:"num_accounts"`
LastIdx int64 `meddler:"last_idx"`
ExitRoot *big.Int `meddler:"exit_root,bigint"`
GasUsed uint64 `meddler:"gas_used"`
GasPrice *big.Int `meddler:"gas_price,bigint"`
EtherPriceUSD float64 `meddler:"ether_price_usd"`
EthBlockNum int64 `meddler:"eth_block_num"`
ForgerAddr ethCommon.Address `meddler:"forger_addr"`

// TODO: implement
StateRoot *big.Int `meddler:"state_root,bigint"`
// AccountStateRoot *big.Int `meddler:"state_root,bigint"`
// VouchStateRoot *big.Int `meddler:"state_root,bigint"`
// ScoreStateRoot *big.Int `meddler:"state_root,bigint"`

NumAccounts int `meddler:"num_accounts"`
LastIdx int64 `meddler:"last_idx"`
ExitRoot *big.Int `meddler:"exit_root,bigint"`
GasUsed uint64 `meddler:"gas_used"`
GasPrice *big.Int `meddler:"gas_price,bigint"`
EtherPriceUSD float64 `meddler:"ether_price_usd"`
// ForgeL1TxsNum is optional, Only when the batch forges L1 txs. Identifier that corresponds
// to the group of L1 txs forged in the current batch.
ForgeL1TxsNum *int64 `meddler:"forge_l1_txs_num"`
Expand Down
Loading

0 comments on commit 76942aa

Please sign in to comment.