Documentation
¶
Index ¶
- Variables
- type DummySequencer
- func (d *DummySequencer) GetNextBatch(ctx context.Context, req sequencing.GetNextBatchRequest) (*sequencing.GetNextBatchResponse, error)
- func (d *DummySequencer) SubmitRollupTransaction(ctx context.Context, req sequencing.SubmitRollupTransactionRequest) (*sequencing.SubmitRollupTransactionResponse, error)
- func (d *DummySequencer) VerifyBatch(ctx context.Context, req sequencing.VerifyBatchRequest) (*sequencing.VerifyBatchResponse, error)
- type MultiRollupSequencer
- func (d *MultiRollupSequencer) GetNextBatch(ctx context.Context, req sequencing.GetNextBatchRequest) (*sequencing.GetNextBatchResponse, error)
- func (d *MultiRollupSequencer) SubmitRollupTransaction(ctx context.Context, req sequencing.SubmitRollupTransactionRequest) (*sequencing.SubmitRollupTransactionResponse, error)
- func (d *MultiRollupSequencer) VerifyBatch(ctx context.Context, req sequencing.VerifyBatchRequest) (*sequencing.VerifyBatchResponse, error)
- type RollupData
- type TransactionQueue
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRollupId = errors.New("invalid rollup id")
ErrInvalidRollupId is returned when the rollup id is invalid
Functions ¶
This section is empty.
Types ¶
type DummySequencer ¶
type DummySequencer struct {
// contains filtered or unexported fields
}
DummySequencer is a dummy sequencer for testing that serves a single rollup
func NewDummySequencer ¶
func NewDummySequencer(rollupId []byte) *DummySequencer
NewDummySequencer creates a new DummySequencer
func (*DummySequencer) GetNextBatch ¶
func (d *DummySequencer) GetNextBatch(ctx context.Context, req sequencing.GetNextBatchRequest) (*sequencing.GetNextBatchResponse, error)
GetNextBatch implements sequencing.Sequencer.
func (*DummySequencer) SubmitRollupTransaction ¶
func (d *DummySequencer) SubmitRollupTransaction(ctx context.Context, req sequencing.SubmitRollupTransactionRequest) (*sequencing.SubmitRollupTransactionResponse, error)
SubmitRollupTransaction implements sequencing.Sequencer.
func (*DummySequencer) VerifyBatch ¶
func (d *DummySequencer) VerifyBatch(ctx context.Context, req sequencing.VerifyBatchRequest) (*sequencing.VerifyBatchResponse, error)
VerifyBatch implements sequencing.Sequencer.
type MultiRollupSequencer ¶ added in v0.3.0
type MultiRollupSequencer struct {
// contains filtered or unexported fields
}
MultiRollupSequencer is a sequencer for testing that serves multiple rollups
func NewMultiRollupSequencer ¶ added in v0.3.0
func NewMultiRollupSequencer() *MultiRollupSequencer
NewMultiRollupSequencer creates a new MultiRollupSequencer
func (*MultiRollupSequencer) GetNextBatch ¶ added in v0.3.0
func (d *MultiRollupSequencer) GetNextBatch(ctx context.Context, req sequencing.GetNextBatchRequest) (*sequencing.GetNextBatchResponse, error)
GetNextBatch implements sequencing.Sequencer.
func (*MultiRollupSequencer) SubmitRollupTransaction ¶ added in v0.3.0
func (d *MultiRollupSequencer) SubmitRollupTransaction(ctx context.Context, req sequencing.SubmitRollupTransactionRequest) (*sequencing.SubmitRollupTransactionResponse, error)
SubmitRollupTransaction implements sequencing.Sequencer.
func (*MultiRollupSequencer) VerifyBatch ¶ added in v0.3.0
func (d *MultiRollupSequencer) VerifyBatch(ctx context.Context, req sequencing.VerifyBatchRequest) (*sequencing.VerifyBatchResponse, error)
VerifyBatch implements sequencing.Sequencer.
type RollupData ¶ added in v0.3.0
type RollupData struct {
// contains filtered or unexported fields
}
RollupData holds the data for a specific rollup, including its transaction queue, last batch hash, and seen batches.
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(maxBytes uint64) *sequencing.Batch
GetNextBatch extracts a batch of transactions from the queue