diff --git a/sequencer/coordinator/coordinator.go b/sequencer/coordinator/coordinator.go index 5e50174..5ca3ced 100644 --- a/sequencer/coordinator/coordinator.go +++ b/sequencer/coordinator/coordinator.go @@ -176,11 +176,14 @@ type Config struct { } type fromBatch struct { - BatchNum common.BatchNum - ForgerAddr ethCommon.Address - AccountStateRoot *big.Int - VouchStateRoot *big.Int - ScoreStateRoot *big.Int + BatchNum common.BatchNum + ForgerAddr ethCommon.Address + + // TODO: implement + StateRoot *big.Int + // AccountStateRoot *big.Int + // VouchStateRoot *big.Int + // ScoreStateRoot *big.Int } // Coordinator implements the Coordinator type @@ -264,11 +267,14 @@ func NewCoordinator(cfg Config, c := Coordinator{ pipelineNum: 0, pipelineFromBatch: fromBatch{ - BatchNum: 0, - ForgerAddr: ethCommon.Address{}, - AccountStateRoot: big.NewInt(0), - VouchStateRoot: big.NewInt(0), - ScoreStateRoot: big.NewInt(0), + BatchNum: 0, + ForgerAddr: ethCommon.Address{}, + + // TODO: implement + StateRoot: big.NewInt(0), + // AccountStateRoot: big.NewInt(0), + // VouchStateRoot: big.NewInt(0), + // ScoreStateRoot: big.NewInt(0), }, prover: prover, consts: *scConsts, @@ -465,6 +471,7 @@ func (c *Coordinator) syncStats(ctx context.Context, stats *synchronizer.Stats) ForgerAddr: stats.Sync.LastBatch.ForgerAddr, // TODO: implement + StateRoot: stats.Sync.LastBatch.StateRoot, // AccountStateRoot: stats.Sync.LastBatch.AccountStateRoot, // VouchStateRoot: stats.Sync.LastBatch.VouchStateRoot, // ScoreStateRoot: stats.Sync.LastBatch.ScoreStateRoot, @@ -472,9 +479,12 @@ func (c *Coordinator) syncStats(ctx context.Context, stats *synchronizer.Stats) if c.lastNonFailedBatchNum > fromBatch.BatchNum { fromBatch.BatchNum = c.lastNonFailedBatchNum fromBatch.ForgerAddr = c.cfg.ForgerAddress - fromBatch.AccountStateRoot = big.NewInt(0) - fromBatch.VouchStateRoot = big.NewInt(0) - fromBatch.ScoreStateRoot = big.NewInt(0) + + // TODO: implement + fromBatch.StateRoot = big.NewInt(0) + // fromBatch.AccountStateRoot = big.NewInt(0) + // fromBatch.VouchStateRoot = big.NewInt(0) + // fromBatch.ScoreStateRoot = big.NewInt(0) } var err error diff --git a/sequencer/synchronizer/synchronizer.go b/sequencer/synchronizer/synchronizer.go index 36e2a0b..ebd0d6c 100644 --- a/sequencer/synchronizer/synchronizer.go +++ b/sequencer/synchronizer/synchronizer.go @@ -807,7 +807,7 @@ func (s *Synchronizer) rollupSync(ethBlock *common.Block) (*common.RollupData, e ForgerAddr: *sender, // TODO: add AccountStateRoot, VouchStateRoot, ScoreStateRoot to Rollup - // StateRoot: forgeBatchArgs.NewStRoot, + StateRoot: forgeBatchArgs.NewStRoot, NumAccounts: len(batchData.CreatedAccounts), LastIdx: forgeBatchArgs.NewLastIdx, ExitRoot: forgeBatchArgs.NewExitRoot, diff --git a/sequencer/test/ethClient.go b/sequencer/test/ethClient.go index f341356..604292d 100644 --- a/sequencer/test/ethClient.go +++ b/sequencer/test/ethClient.go @@ -852,8 +852,7 @@ func (c *Client) CtlAddBlocks(blocks []common.BlockData) (err error) { NewLastIdx: batch.Batch.LastIdx, // TODO: add AccountStateRoot, VouchStateRoot, ScoreStateRoot to Rollup - // NewStRoot: batch.Batch.StateRoot, - + NewStRoot: batch.Batch.StateRoot, NewExitRoot: batch.Batch.ExitRoot, L1CoordinatorTxs: batch.L1CoordinatorTxs, L1CoordinatorTxsAuths: auths,