Skip to content

Commit d71cf97

Browse files
omerfirmak0xmountaintop
authored andcommitted
fix: treat JSON errors as CCC error (#922)
1 parent ac044ca commit d71cf97

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rollup/pipeline/pipeline.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func (p *Pipeline) encodeStage(traces <-chan *BlockCandidate) <-chan *BlockCandi
396396
trace.RustTrace = circuitcapacitychecker.MakeRustTrace(trace.LastTrace, buffer)
397397
if trace.RustTrace == nil {
398398
log.Error("making rust trace", "txHash", trace.LastTrace.Transactions[0].TxHash)
399-
return
399+
// ignore the error here, CCC stage will catch it and treat it as a CCC error
400400
}
401401
}
402402
encodeTimer.UpdateSince(encodeStart)
@@ -465,7 +465,11 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
465465
var accRows *types.RowConsumption
466466
var err error
467467
if candidate != nil && p.ccc != nil {
468-
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
468+
if candidate.RustTrace != nil {
469+
accRows, err = p.ccc.ApplyTransactionRustTrace(candidate.RustTrace)
470+
} else {
471+
err = errors.New("no rust trace")
472+
}
469473
lastTxn := candidate.Txs[candidate.Txs.Len()-1]
470474
cccTimer.UpdateSince(cccStart)
471475
if err != nil {

0 commit comments

Comments
 (0)