Skip to content

Commit

Permalink
fix batcher commitment encoding and invalid comm logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tchardin committed Mar 12, 2024
1 parent 644ddea commit 767af5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion op-batcher/batcher/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,14 @@ func (l *BatchSubmitter) sendTransaction(ctx context.Context, txdata txData, que
data := txdata.CallData()
// if plasma DA is enabled we post the txdata to the DA Provider and replace it with the commitment.
if l.Config.UsePlasma {
data, err = l.PlasmaDA.SetInput(ctx, data)
comm, err := l.PlasmaDA.SetInput(ctx, data)
if err != nil {
l.Log.Error("Failed to post input to Plasma DA", "error", err)
// requeue frame if we fail to post to the DA Provider so it can be retried
l.recordFailedTx(txdata, err)
return nil
}
data = comm.Encode()
}
candidate = l.calldataTxCandidate(data)
}
Expand Down
2 changes: 1 addition & 1 deletion op-node/rollup/derive/plasma_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (s *PlasmaDataSource) Next(ctx context.Context) (eth.Data, error) {
// validate batcher inbox data is a commitment.
comm, err := plasma.DecodeKeccak256(data)
if err != nil {
s.log.Warn("invalid commitment", "data", fmt.Sprintf("%x", data), "err", err)
s.log.Warn("invalid commitment", "commitment", data, "err", err)
return s.Next(ctx)
}
s.comm = comm
Expand Down

0 comments on commit 767af5a

Please sign in to comment.