based_sequencer

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

based-sequencer

Based sequencer that implements go-sequencing interface

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasedSequencer

type BasedSequencer struct {
	// contains filtered or unexported fields
}

BasedSequencer implements go-sequencing API with based sequencing logic.

All transactions are passed directly to DA to be saved in a namespace. Each transaction is submitted as separate blob. When batch is requested DA blocks are scanned to read all blobs from given namespace at given height.

func NewSequencer

func NewSequencer(da da.DA) *BasedSequencer

NewSequencer initializes a BasedSequencer with the provided DA implementation.

func (*BasedSequencer) GetNextBatch

func (b *BasedSequencer) GetNextBatch(ctx context.Context, lastBatchHash sequencing.Hash) (*sequencing.Batch, time.Time, error)

GetNextBatch reads data from namespace in DA and builds transactions batches.

func (*BasedSequencer) SubmitRollupTransaction

func (b *BasedSequencer) SubmitRollupTransaction(ctx context.Context, rollupId sequencing.RollupId, tx sequencing.Tx) error

SubmitRollupTransaction submits a transaction directly to DA, as a single blob.

func (*BasedSequencer) VerifyBatch

func (b *BasedSequencer) VerifyBatch(ctx context.Context, batchHash sequencing.Hash) (bool, error)

VerifyBatch ensures data-availability of a batch in DA.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL