Skip to content

Commit

Permalink
fix: treat JSON errors as CCC error (scroll-tech#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored and achmand committed Aug 13, 2024
1 parent 40fdee9 commit cf79a9e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rollup/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (p *Pipeline) encodeStage(traces <-chan *BlockCandidate) <-chan *BlockCandi
trace.RustTrace = circuitcapacitychecker.MakeRustTrace(trace.LastTrace, buffer)
if trace.RustTrace == nil {
log.Error("making rust trace", "txHash", trace.LastTrace.Transactions[0].TxHash)
return
// ignore the error here, CCC stage will catch it and treat it as a CCC error
}
}
encodeTimer.UpdateSince(encodeStart)
Expand Down Expand Up @@ -431,7 +431,11 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
var accRows *types.RowConsumption
var err error
if candidate != nil && p.ccc != nil {
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
if candidate.RustTrace != nil {
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
} else {
err = errors.New("no rust trace")
}
lastTxn := candidate.Txs[candidate.Txs.Len()-1]
cccTimer.UpdateSince(cccStart)
if err != nil {
Expand Down

0 comments on commit cf79a9e

Please sign in to comment.