Skip to content

Commit

Permalink
feat(altda): UPSTREAM - multiframe altda channel to support large blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Oct 9, 2024
1 parent 1dafc7c commit 111e0f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion op-batcher/batcher/channel_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type ChannelConfig struct {
// UseBlobs indicates that this channel should be sent as a multi-blob
// transaction with one blob per frame.
UseBlobs bool

// TODO(samlaf): temporary thing... just testing this out. Not sure if this is the right approach
UseAltDA bool
}

// ChannelConfig returns a copy of the receiver.
Expand Down Expand Up @@ -93,7 +96,7 @@ func (cc *ChannelConfig) ReinitCompressorConfig() {
}

func (cc *ChannelConfig) MaxFramesPerTx() int {
if !cc.UseBlobs {
if !cc.UseBlobs && !cc.UseAltDA {
return 1
}
return cc.TargetNumFrames
Expand Down
4 changes: 0 additions & 4 deletions op-batcher/batcher/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,6 @@ func (l *BatchSubmitter) cancelBlockingTx(queue *txmgr.Queue[txRef], receiptsCh

// publishToAltDAAndL1 posts the txdata to the DA Provider and then sends the commitment to L1.
func (l *BatchSubmitter) publishToAltDAAndL1(txdata txData, queue *txmgr.Queue[txRef], receiptsCh chan txmgr.TxReceipt[txRef], daGroup *errgroup.Group) {
// sanity checks
if nf := len(txdata.frames); nf != 1 {
l.Log.Crit("Unexpected number of frames in calldata tx", "num_frames", nf)
}
if txdata.asBlob {
l.Log.Crit("Unexpected blob txdata with AltDA enabled")
}
Expand Down
1 change: 1 addition & 0 deletions op-batcher/batcher/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ func (bs *BatcherService) initChannelConfig(cfg *CLIConfig) error {
TargetNumFrames: cfg.TargetNumFrames,
SubSafetyMargin: cfg.SubSafetyMargin,
BatchType: cfg.BatchType,
UseAltDA: bs.UseAltDA,
}

switch cfg.DataAvailabilityType {
Expand Down

0 comments on commit 111e0f9

Please sign in to comment.