sequencing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorRollupIdMismatch = errors.New("rollup id mismatch")

ErrorRollupIdMismatch is returned when the rollup id does not match

Functions

This section is empty.

Types

type BatchQueue

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

BatchQueue ...

func NewBatchQueue

func NewBatchQueue() *BatchQueue

NewBatchQueue creates a new TransactionQueue

func (*BatchQueue) AddBatch

func (bq *BatchQueue) AddBatch(batch sequencing.Batch)

AddBatch adds a new transaction to the queue

func (*BatchQueue) Next

func (bq *BatchQueue) Next() *sequencing.Batch

Next ...

type Sequencer

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

Sequencer implements go-sequencing interface using celestia backend

func NewSequencer

func NewSequencer(daAddress, daAuthToken string, daNamespace []byte, batchTime time.Duration) (*Sequencer, error)

NewSequencer ...

func (*Sequencer) GetNextBatch

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

GetNextBatch implements sequencing.Sequencer.

func (*Sequencer) SubmitRollupTransaction

func (c *Sequencer) SubmitRollupTransaction(ctx context.Context, rollupId []byte, tx []byte) error

SubmitRollupTransaction implements sequencing.Sequencer.

func (*Sequencer) VerifyBatch

func (c *Sequencer) VerifyBatch(ctx context.Context, batchHash sequencing.Hash) (bool, error)

VerifyBatch implements sequencing.Sequencer.

type TransactionQueue

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

TransactionQueue is a queue of transactions

func NewTransactionQueue

func NewTransactionQueue() *TransactionQueue

NewTransactionQueue creates a new TransactionQueue

func (*TransactionQueue) AddTransaction

func (tq *TransactionQueue) AddTransaction(tx sequencing.Tx)

AddTransaction adds a new transaction to the queue

func (*TransactionQueue) GetNextBatch

func (tq *TransactionQueue) GetNextBatch(max uint64) sequencing.Batch

GetNextBatch extracts a batch of transactions from the queue

Jump to

Keyboard shortcuts

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