Skip to content

Commit

Permalink
fix: treat JSON errors as CCC error (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Jul 25, 2024
1 parent df3713e commit e3bfb5f
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 e3bfb5f

Please sign in to comment.