rollmint icon indicating copy to clipboard operation
rollmint copied to clipboard

Modify DA Interface to use SubmitBlobs from SubmitBlocks

Open Manav-Aggarwal opened this issue 1 year ago • 7 comments

Need to change the below method across the DA interfaces and implementations:

SubmitBlocks(ctx context.Context, blocks []*types.Block)

to have this signature:

SubmitBlobs(ctx context.Context, blobs []*blob.Blob)

Currently, the block to blob conversion happens before submitting the blob to a DA layer. We'd like to instead do this conversion before even calling SubmitBlobs. This will be useful in https://github.com/rollkit/rollkit/pull/858 which will require the SignedHeader and data in different blobs and potentially even separate namespaces.

Note that the block to blob conversation should happen in manager.go.

Manav-Aggarwal avatar Jul 18 '23 20:07 Manav-Aggarwal

@Manav-Aggarwal Do we need to change signature of SubmitBlock in DA interface?

chandiniv1 avatar Jul 24 '23 10:07 chandiniv1

Yes both the interface and implementation should use SubmitBlobs as part of this issue.

Manav-Aggarwal avatar Aug 14 '23 15:08 Manav-Aggarwal

@Manav-Aggarwal would like to take this up!

Chirag018 avatar Sep 05 '23 18:09 Chirag018

Thanks @Chirag018! Just assigned it to you and added some more context.

Manav-Aggarwal avatar Sep 06 '23 19:09 Manav-Aggarwal

Hey @Manav-Aggarwal, sorry for working on this a little late.

I had a few doubts,

In the manager.go file, the submitBlocksToDA function where we will be modifying the changes, do we also need to modify the function name?

func (m *Manager) submitBlocksToDA(ctx context.Context) error {
	submitted := false
	backoff := initialBackoff
	for attempt := 1; ctx.Err() == nil && !submitted && attempt <= maxSubmitAttempts; attempt++ {
		res := m.dalc.SubmitBlocks(ctx, m.pendingBlocks.getPendingBlocks())

Chirag018 avatar Oct 02 '23 18:10 Chirag018

@Chirag018 No worries. Yes, the function name can be modified here if the block-to-blob conversion happens outside of it. Otherwise, it can stay the same.

Manav-Aggarwal avatar Oct 02 '23 18:10 Manav-Aggarwal

Hi @Manav-Aggarwal, does this issue still open?

ThanhNhann avatar Mar 07 '24 08:03 ThanhNhann

Will be part of #829

Manav-Aggarwal avatar Jun 24 '24 16:06 Manav-Aggarwal