@@ -658,31 +658,27 @@ func (l *BatchSubmitter) sendTransaction(txdata txData, queue *txmgr.Queue[txRef
658658 return nil
659659 }
660660
661- var candidate * txmgr.TxCandidate
662- if txdata .asBlob {
663- if candidate , err = l .blobTxCandidate (txdata ); err != nil {
664- // We could potentially fall through and try a calldata tx instead, but this would
665- // likely result in the chain spending more in gas fees than it is tuned for, so best
666- // to just fail. We do not expect this error to trigger unless there is a serious bug
667- // or configuration issue.
668- return fmt .Errorf ("could not create blob tx candidate: %w" , err )
669- }
670- } else {
671- // sanity check
672- if nf := len (txdata .frames ); nf > l .ChannelConfig .ChannelConfig ().TargetNumFrames {
673- l .Log .Crit ("Unexpected number of frames in calldata tx" , "num_frames" , nf )
674- }
675- candidate , err = l .celestiaTxCandidate (txdata .CallData ())
661+ // force celestia tx candidate, multiframe is set by UseBlobs which is not affected
662+ txdata .asBlob = false
663+ // sanity check
664+ if nf := len (txdata .frames ); nf > l .ChannelConfig .ChannelConfig ().TargetNumFrames {
665+ l .Log .Crit ("Unexpected number of frames in calldata tx" , "num_frames" , nf )
666+ }
667+ candidate , err := l .celestiaTxCandidate (txdata .CallData ())
668+ if err != nil {
669+ l .Log .Error ("celestia: blob submission failed" , "err" , err )
670+ candidate , err = l .fallbackTxCandidate (txdata )
676671 if err != nil {
677- l .Log .Error ("celestia: blob submission failed" , "err" , err )
678- candidate , err = l .fallbackTxCandidate (txdata )
679- if err != nil {
680- l .Log .Error ("celestia: fallback failed" , "err" , err )
681- l .recordFailedTx (txdata .ID (), err )
682- return nil
683- }
672+ l .Log .Error ("celestia: fallback failed" , "err" , err )
673+ l .recordFailedTx (txdata .ID (), err )
674+ return nil
684675 }
685676 }
677+ // restore asBlob for cancellation in case of blobdata fallback
678+ if len (candidate .Blobs ) > 0 {
679+ txdata .asBlob = true
680+ }
681+ l .Log .Info ("tx candidate" , "ID" , txdata .ID (), "len(txdata.frames)" , len (txdata .frames ), "txdata.asBlob" , txdata .asBlob )
686682
687683 l .sendTx (txdata , false , candidate , queue , receiptsCh )
688684 return nil
0 commit comments