Skip to content

Commit

Permalink
change imstateroot handling in DS (0xPolygonHermez#3698)
Browse files Browse the repository at this point in the history
* change imstateroot handling in DS
  • Loading branch information
ToniRamirezM authored and Stefan-Ethernal committed Jun 26, 2024
1 parent fd1e64c commit e22e50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sequencer/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ func (s *Sequencer) sendDataToStreamer(chainID uint64) {
ImStateRoot: l2Transaction.ImStateRoot.Bytes(),
}

// Clear the state root if the ForkID is >= ETROG
// Clear the state root if the ForkID is > ETROG
// currently this is redundant as the current implementation of the sequencer
// leaves the ImStateRoot empty
if l2Block.ForkID >= state.FORKID_ETROG {
if l2Block.ForkID > state.FORKID_ETROG {
streamL2Transaction.ImStateRoot = common.Hash{}.Bytes()
}

Expand Down
4 changes: 2 additions & 2 deletions state/datastream.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ func GenerateDataStreamFile(ctx context.Context, streamServer *datastreamer.Stre
ImStateRoot: tx.StateRoot.Bytes(),
}

// Clear the state root if the ForkID is >= ETROG
if l2Block.ForkID >= FORKID_ETROG {
// Clear the state root if the ForkID is > ETROG
if l2Block.ForkID > FORKID_ETROG {
transaction.ImStateRoot = common.Hash{}.Bytes()
}

Expand Down

0 comments on commit e22e50f

Please sign in to comment.