Documentation ¶
Index ¶
- Variables
- func SequenceSanityCheck(seq *etherman.SequenceBanana) error
- type BananaBatch
- func (b *BananaBatch) BatchNumber() uint64
- func (b BananaBatch) DeepCopy() seqsendertypes.Batch
- func (b *BananaBatch) ForcedBatchTimestamp() uint64
- func (b *BananaBatch) ForcedBlockHashL1() common.Hash
- func (b *BananaBatch) ForcedGlobalExitRoot() common.Hash
- func (b *BananaBatch) GlobalExitRoot() common.Hash
- func (b *BananaBatch) L1InfoTreeIndex() uint32
- func (b *BananaBatch) L2Data() []byte
- func (b *BananaBatch) LastCoinbase() common.Address
- func (b *BananaBatch) LastL2BLockTimestamp() uint64
- func (b *BananaBatch) SetL1InfoTreeIndex(index uint32)
- func (b *BananaBatch) SetL2Data(data []byte)
- func (b *BananaBatch) SetLastCoinbase(address common.Address)
- func (b *BananaBatch) SetLastL2BLockTimestamp(ts uint64)
- func (b *BananaBatch) String() string
- type BananaSequence
- func (b *BananaSequence) Batches() []seqsendertypes.Batch
- func (b *BananaSequence) FirstBatch() seqsendertypes.Batch
- func (b *BananaSequence) IndexL1InfoRoot() uint32
- func (b *BananaSequence) L1InfoRoot() common.Hash
- func (b *BananaSequence) L2Coinbase() common.Address
- func (b *BananaSequence) LastBatch() seqsendertypes.Batch
- func (b *BananaSequence) LastVirtualBatchNumber() uint64
- func (b *BananaSequence) Len() int
- func (b *BananaSequence) MaxSequenceTimestamp() uint64
- func (b *BananaSequence) SetLastVirtualBatchNumber(batchNumber uint64)
- func (b *BananaSequence) String() string
- type CondNewSequence
- type ConditionalNewSequenceMaxSize
- type ConditionalNewSequenceNumBatches
- type ElderberrySequence
- func (b *ElderberrySequence) Batches() []seqsendertypes.Batch
- func (b *ElderberrySequence) FirstBatch() seqsendertypes.Batch
- func (b *ElderberrySequence) IndexL1InfoRoot() uint32
- func (b *ElderberrySequence) L1InfoRoot() common.Hash
- func (b *ElderberrySequence) L2Coinbase() common.Address
- func (b *ElderberrySequence) LastBatch() seqsendertypes.Batch
- func (b *ElderberrySequence) LastVirtualBatchNumber() uint64
- func (b *ElderberrySequence) Len() int
- func (b *ElderberrySequence) MaxSequenceTimestamp() uint64
- func (b *ElderberrySequence) SetLastVirtualBatchNumber(batchNumber uint64)
- func (b *ElderberrySequence) String() string
- type TxBuilder
- type TxBuilderBananaBase
- func (t *TxBuilderBananaBase) CheckL1InfoTreeLeafCounterVsInitL1InfoMap(ctx context.Context, leafCounter uint32) error
- func (t *TxBuilderBananaBase) GetCounterL1InfoRoot(ctx context.Context, highestL1IndexInBatch uint32) (uint32, error)
- func (t *TxBuilderBananaBase) NewBatchFromL2Block(l2Block *datastream.L2Block) seqsendertypes.Batch
- func (t *TxBuilderBananaBase) NewSequence(ctx context.Context, batches []seqsendertypes.Batch, coinbase common.Address) (seqsendertypes.Sequence, error)
- type TxBuilderBananaValidium
- func (t *TxBuilderBananaValidium) BuildSequenceBatchesTx(ctx context.Context, sequences seqsendertypes.Sequence) (*types.Transaction, error)
- func (t *TxBuilderBananaValidium) NewSequenceIfWorthToSend(ctx context.Context, sequenceBatches []seqsendertypes.Batch, ...) (seqsendertypes.Sequence, error)
- func (t *TxBuilderBananaValidium) SetCondNewSeq(cond CondNewSequence) CondNewSequence
- func (t *TxBuilderBananaValidium) String() string
- type TxBuilderBananaZKEVM
- func (t *TxBuilderBananaZKEVM) BuildSequenceBatchesTx(ctx context.Context, sequences seqsendertypes.Sequence) (*types.Transaction, error)
- func (t *TxBuilderBananaZKEVM) NewSequenceIfWorthToSend(ctx context.Context, sequenceBatches []seqsendertypes.Batch, ...) (seqsendertypes.Sequence, error)
- func (t *TxBuilderBananaZKEVM) SetCondNewSeq(cond CondNewSequence) CondNewSequence
- func (t *TxBuilderBananaZKEVM) String() string
- type TxBuilderElderberryBase
- func (t *TxBuilderElderberryBase) NewBatchFromL2Block(l2Block *datastream.L2Block) seqsendertypes.Batch
- func (t *TxBuilderElderberryBase) NewSequence(ctx context.Context, batches []seqsendertypes.Batch, coinbase common.Address) (seqsendertypes.Sequence, error)
- func (t *TxBuilderElderberryBase) SetAuth(auth *bind.TransactOpts)
- type TxBuilderElderberryValidium
- func (t *TxBuilderElderberryValidium) BuildSequenceBatchesTx(ctx context.Context, sequences seqsendertypes.Sequence) (*types.Transaction, error)
- func (t *TxBuilderElderberryValidium) NewSequenceIfWorthToSend(ctx context.Context, sequenceBatches []seqsendertypes.Batch, ...) (seqsendertypes.Sequence, error)
- func (t *TxBuilderElderberryValidium) SetCondNewSeq(cond CondNewSequence) CondNewSequence
- func (t *TxBuilderElderberryValidium) String() string
- type TxBuilderElderberryZKEVM
- func (t *TxBuilderElderberryZKEVM) BuildSequenceBatchesTx(ctx context.Context, sequences seqsendertypes.Sequence) (*types.Transaction, error)
- func (t *TxBuilderElderberryZKEVM) NewSequenceIfWorthToSend(ctx context.Context, sequenceBatches []seqsendertypes.Batch, ...) (seqsendertypes.Sequence, error)
- func (t *TxBuilderElderberryZKEVM) SetCondNewSeq(cond CondNewSequence) CondNewSequence
- func (t *TxBuilderElderberryZKEVM) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrOversizedData when transaction input data is greater than a limit (DOS protection) ErrOversizedData = errors.New("oversized data") MaxTxSizeForL1Disabled = uint64(0) )
View Source
var MaxBatchesForL1Disabled = uint64(0)
Functions ¶
func SequenceSanityCheck ¶
func SequenceSanityCheck(seq *etherman.SequenceBanana) error
Types ¶
type BananaBatch ¶
func NewBananaBatch ¶
func NewBananaBatch(batch *etherman.Batch) *BananaBatch
func (*BananaBatch) BatchNumber ¶
func (b *BananaBatch) BatchNumber() uint64
func (BananaBatch) DeepCopy ¶
func (b BananaBatch) DeepCopy() seqsendertypes.Batch
func (*BananaBatch) ForcedBatchTimestamp ¶
func (b *BananaBatch) ForcedBatchTimestamp() uint64
func (*BananaBatch) ForcedBlockHashL1 ¶
func (b *BananaBatch) ForcedBlockHashL1() common.Hash
func (*BananaBatch) ForcedGlobalExitRoot ¶
func (b *BananaBatch) ForcedGlobalExitRoot() common.Hash
func (*BananaBatch) GlobalExitRoot ¶
func (b *BananaBatch) GlobalExitRoot() common.Hash
func (*BananaBatch) L1InfoTreeIndex ¶
func (b *BananaBatch) L1InfoTreeIndex() uint32
func (*BananaBatch) L2Data ¶
func (b *BananaBatch) L2Data() []byte
func (*BananaBatch) LastCoinbase ¶
func (b *BananaBatch) LastCoinbase() common.Address
func (*BananaBatch) LastL2BLockTimestamp ¶
func (b *BananaBatch) LastL2BLockTimestamp() uint64
func (*BananaBatch) SetL1InfoTreeIndex ¶
func (b *BananaBatch) SetL1InfoTreeIndex(index uint32)
func (*BananaBatch) SetL2Data ¶
func (b *BananaBatch) SetL2Data(data []byte)
func (*BananaBatch) SetLastCoinbase ¶
func (b *BananaBatch) SetLastCoinbase(address common.Address)
func (*BananaBatch) SetLastL2BLockTimestamp ¶
func (b *BananaBatch) SetLastL2BLockTimestamp(ts uint64)
func (*BananaBatch) String ¶
func (b *BananaBatch) String() string
type BananaSequence ¶
type BananaSequence struct {
etherman.SequenceBanana
}
func NewBananaSequence ¶
func NewBananaSequence(ult etherman.SequenceBanana) *BananaSequence
func (*BananaSequence) Batches ¶
func (b *BananaSequence) Batches() []seqsendertypes.Batch
func (*BananaSequence) FirstBatch ¶
func (b *BananaSequence) FirstBatch() seqsendertypes.Batch
func (*BananaSequence) IndexL1InfoRoot ¶
func (b *BananaSequence) IndexL1InfoRoot() uint32
func (*BananaSequence) L1InfoRoot ¶
func (b *BananaSequence) L1InfoRoot() common.Hash
func (*BananaSequence) L2Coinbase ¶
func (b *BananaSequence) L2Coinbase() common.Address
func (*BananaSequence) LastBatch ¶
func (b *BananaSequence) LastBatch() seqsendertypes.Batch
func (*BananaSequence) LastVirtualBatchNumber ¶
func (b *BananaSequence) LastVirtualBatchNumber() uint64
func (*BananaSequence) Len ¶
func (b *BananaSequence) Len() int
func (*BananaSequence) MaxSequenceTimestamp ¶
func (b *BananaSequence) MaxSequenceTimestamp() uint64
func (*BananaSequence) SetLastVirtualBatchNumber ¶
func (b *BananaSequence) SetLastVirtualBatchNumber(batchNumber uint64)
func (*BananaSequence) String ¶
func (b *BananaSequence) String() string
type CondNewSequence ¶
type CondNewSequence interface { // NewSequenceIfWorthToSend Return nil, nil if the sequence is not worth sending NewSequenceIfWorthToSend( ctx context.Context, txBuilder TxBuilder, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, ) (seqsendertypes.Sequence, error) }
type ConditionalNewSequenceMaxSize ¶
type ConditionalNewSequenceMaxSize struct {
// contains filtered or unexported fields
}
func NewConditionalNewSequenceMaxSize ¶
func NewConditionalNewSequenceMaxSize(maxTxSizeForL1 uint64) *ConditionalNewSequenceMaxSize
func (*ConditionalNewSequenceMaxSize) NewSequenceIfWorthToSend ¶
func (c *ConditionalNewSequenceMaxSize) NewSequenceIfWorthToSend( ctx context.Context, txBuilder TxBuilder, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, ) (seqsendertypes.Sequence, error)
type ConditionalNewSequenceNumBatches ¶
type ConditionalNewSequenceNumBatches struct {
// contains filtered or unexported fields
}
func NewConditionalNewSequenceNumBatches ¶
func NewConditionalNewSequenceNumBatches(maxBatchesForL1 uint64) *ConditionalNewSequenceNumBatches
func (*ConditionalNewSequenceNumBatches) NewSequenceIfWorthToSend ¶
func (c *ConditionalNewSequenceNumBatches) NewSequenceIfWorthToSend( ctx context.Context, txBuilder TxBuilder, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, ) (seqsendertypes.Sequence, error)
type ElderberrySequence ¶
type ElderberrySequence struct {
// contains filtered or unexported fields
}
func NewElderberrySequence ¶
func NewElderberrySequence(batches []seqsendertypes.Batch, l2Coinbase common.Address) *ElderberrySequence
func (*ElderberrySequence) Batches ¶
func (b *ElderberrySequence) Batches() []seqsendertypes.Batch
func (*ElderberrySequence) FirstBatch ¶
func (b *ElderberrySequence) FirstBatch() seqsendertypes.Batch
func (*ElderberrySequence) IndexL1InfoRoot ¶
func (b *ElderberrySequence) IndexL1InfoRoot() uint32
func (*ElderberrySequence) L1InfoRoot ¶
func (b *ElderberrySequence) L1InfoRoot() common.Hash
func (*ElderberrySequence) L2Coinbase ¶
func (b *ElderberrySequence) L2Coinbase() common.Address
func (*ElderberrySequence) LastBatch ¶
func (b *ElderberrySequence) LastBatch() seqsendertypes.Batch
func (*ElderberrySequence) LastVirtualBatchNumber ¶
func (b *ElderberrySequence) LastVirtualBatchNumber() uint64
func (*ElderberrySequence) Len ¶
func (b *ElderberrySequence) Len() int
func (*ElderberrySequence) MaxSequenceTimestamp ¶
func (b *ElderberrySequence) MaxSequenceTimestamp() uint64
func (*ElderberrySequence) SetLastVirtualBatchNumber ¶
func (b *ElderberrySequence) SetLastVirtualBatchNumber(batchNumber uint64)
func (*ElderberrySequence) String ¶
func (b *ElderberrySequence) String() string
type TxBuilder ¶
type TxBuilder interface { // Stringer interface fmt.Stringer // BuildSequenceBatchesTx Builds a sequence of batches transaction BuildSequenceBatchesTx(ctx context.Context, sequences seqsendertypes.Sequence) (*ethtypes.Transaction, error) // NewSequence Creates a new sequence NewSequence( ctx context.Context, batches []seqsendertypes.Batch, coinbase common.Address, ) (seqsendertypes.Sequence, error) // NewSequenceIfWorthToSend Creates a new sequence if it is worth sending NewSequenceIfWorthToSend( ctx context.Context, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, batchNumber uint64, ) (seqsendertypes.Sequence, error) // NewBatchFromL2Block Creates a new batch from the L2 block from a datastream NewBatchFromL2Block(l2Block *datastream.L2Block) seqsendertypes.Batch // SetCondNewSeq Allows to override the condition to send a new sequence, returns previous one SetCondNewSeq(cond CondNewSequence) CondNewSequence }
type TxBuilderBananaBase ¶
type TxBuilderBananaBase struct {
// contains filtered or unexported fields
}
func NewTxBuilderBananaBase ¶
func NewTxBuilderBananaBase( logger *log.Logger, rollupContract rollupBananaBaseContractor, gerContract globalExitRootBananaContractor, l1InfoTree l1InfoSyncer, ethClient l1Client, blockFinality *big.Int, opts bind.TransactOpts, ) *TxBuilderBananaBase
func (*TxBuilderBananaBase) CheckL1InfoTreeLeafCounterVsInitL1InfoMap ¶ added in v0.0.19
func (t *TxBuilderBananaBase) CheckL1InfoTreeLeafCounterVsInitL1InfoMap(ctx context.Context, leafCounter uint32) error
func (*TxBuilderBananaBase) GetCounterL1InfoRoot ¶ added in v0.0.19
func (t *TxBuilderBananaBase) GetCounterL1InfoRoot(ctx context.Context, highestL1IndexInBatch uint32) (uint32, error)
Returns CounterL1InfoRoot to use for this batch
func (*TxBuilderBananaBase) NewBatchFromL2Block ¶
func (t *TxBuilderBananaBase) NewBatchFromL2Block(l2Block *datastream.L2Block) seqsendertypes.Batch
func (*TxBuilderBananaBase) NewSequence ¶
func (t *TxBuilderBananaBase) NewSequence( ctx context.Context, batches []seqsendertypes.Batch, coinbase common.Address, ) (seqsendertypes.Sequence, error)
type TxBuilderBananaValidium ¶
type TxBuilderBananaValidium struct { TxBuilderBananaBase // contains filtered or unexported fields }
func NewTxBuilderBananaValidium ¶
func NewTxBuilderBananaValidium( logger *log.Logger, rollupContract rollupBananaValidiumContractor, gerContract globalExitRootBananaContractor, da dataavailability.SequenceSenderBanana, opts bind.TransactOpts, maxBatchesForL1 uint64, l1InfoTree l1InfoSyncer, ethClient l1Client, blockFinality *big.Int, ) *TxBuilderBananaValidium
func (*TxBuilderBananaValidium) BuildSequenceBatchesTx ¶
func (t *TxBuilderBananaValidium) BuildSequenceBatchesTx( ctx context.Context, sequences seqsendertypes.Sequence, ) (*types.Transaction, error)
func (*TxBuilderBananaValidium) NewSequenceIfWorthToSend ¶
func (t *TxBuilderBananaValidium) NewSequenceIfWorthToSend( ctx context.Context, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, batchNumber uint64, ) (seqsendertypes.Sequence, error)
func (*TxBuilderBananaValidium) SetCondNewSeq ¶
func (t *TxBuilderBananaValidium) SetCondNewSeq(cond CondNewSequence) CondNewSequence
SetCondNewSeq allow to override the default conditional for new sequence
func (*TxBuilderBananaValidium) String ¶
func (t *TxBuilderBananaValidium) String() string
type TxBuilderBananaZKEVM ¶
type TxBuilderBananaZKEVM struct { TxBuilderBananaBase // contains filtered or unexported fields }
func NewTxBuilderBananaZKEVM ¶
func NewTxBuilderBananaZKEVM( logger *log.Logger, rollupContract rollupBananaZKEVMContractor, gerContract globalExitRootBananaZKEVMContractor, opts bind.TransactOpts, maxTxSizeForL1 uint64, l1InfoTree l1InfoSyncer, ethClient l1Client, blockFinality *big.Int, ) *TxBuilderBananaZKEVM
func (*TxBuilderBananaZKEVM) BuildSequenceBatchesTx ¶
func (t *TxBuilderBananaZKEVM) BuildSequenceBatchesTx( ctx context.Context, sequences seqsendertypes.Sequence, ) (*types.Transaction, error)
func (*TxBuilderBananaZKEVM) NewSequenceIfWorthToSend ¶
func (t *TxBuilderBananaZKEVM) NewSequenceIfWorthToSend( ctx context.Context, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, batchNumber uint64, ) (seqsendertypes.Sequence, error)
func (*TxBuilderBananaZKEVM) SetCondNewSeq ¶
func (t *TxBuilderBananaZKEVM) SetCondNewSeq(cond CondNewSequence) CondNewSequence
SetCondNewSeq allow to override the default conditional for new sequence
func (*TxBuilderBananaZKEVM) String ¶
func (t *TxBuilderBananaZKEVM) String() string
type TxBuilderElderberryBase ¶
type TxBuilderElderberryBase struct {
// contains filtered or unexported fields
}
func NewTxBuilderElderberryBase ¶
func NewTxBuilderElderberryBase(logger *log.Logger, opts bind.TransactOpts) *TxBuilderElderberryBase
func (*TxBuilderElderberryBase) NewBatchFromL2Block ¶
func (t *TxBuilderElderberryBase) NewBatchFromL2Block(l2Block *datastream.L2Block) seqsendertypes.Batch
func (*TxBuilderElderberryBase) NewSequence ¶
func (t *TxBuilderElderberryBase) NewSequence( ctx context.Context, batches []seqsendertypes.Batch, coinbase common.Address, ) (seqsendertypes.Sequence, error)
func (*TxBuilderElderberryBase) SetAuth ¶
func (t *TxBuilderElderberryBase) SetAuth(auth *bind.TransactOpts)
SetAuth sets the auth for the tx builder
type TxBuilderElderberryValidium ¶
type TxBuilderElderberryValidium struct { TxBuilderElderberryBase // contains filtered or unexported fields }
func NewTxBuilderElderberryValidium ¶
func NewTxBuilderElderberryValidium( logger *log.Logger, zkevm contracts.RollupElderberryType, da dataavailability.SequenceSenderElderberry, opts bind.TransactOpts, maxBatchesForL1 uint64) *TxBuilderElderberryValidium
func (*TxBuilderElderberryValidium) BuildSequenceBatchesTx ¶
func (t *TxBuilderElderberryValidium) BuildSequenceBatchesTx( ctx context.Context, sequences seqsendertypes.Sequence, ) (*types.Transaction, error)
func (*TxBuilderElderberryValidium) NewSequenceIfWorthToSend ¶
func (t *TxBuilderElderberryValidium) NewSequenceIfWorthToSend( ctx context.Context, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, batchNumber uint64, ) (seqsendertypes.Sequence, error)
func (*TxBuilderElderberryValidium) SetCondNewSeq ¶
func (t *TxBuilderElderberryValidium) SetCondNewSeq(cond CondNewSequence) CondNewSequence
SetCondNewSeq allow to override the default conditional for new sequence
func (*TxBuilderElderberryValidium) String ¶
func (t *TxBuilderElderberryValidium) String() string
type TxBuilderElderberryZKEVM ¶
type TxBuilderElderberryZKEVM struct { TxBuilderElderberryBase // contains filtered or unexported fields }
func NewTxBuilderElderberryZKEVM ¶
func NewTxBuilderElderberryZKEVM( logger *log.Logger, zkevm rollupElderberryZKEVMContractor, opts bind.TransactOpts, maxTxSizeForL1 uint64, ) *TxBuilderElderberryZKEVM
func (*TxBuilderElderberryZKEVM) BuildSequenceBatchesTx ¶
func (t *TxBuilderElderberryZKEVM) BuildSequenceBatchesTx( ctx context.Context, sequences seqsendertypes.Sequence, ) (*types.Transaction, error)
func (*TxBuilderElderberryZKEVM) NewSequenceIfWorthToSend ¶
func (t *TxBuilderElderberryZKEVM) NewSequenceIfWorthToSend( ctx context.Context, sequenceBatches []seqsendertypes.Batch, l2Coinbase common.Address, batchNumber uint64, ) (seqsendertypes.Sequence, error)
func (*TxBuilderElderberryZKEVM) SetCondNewSeq ¶
func (t *TxBuilderElderberryZKEVM) SetCondNewSeq(cond CondNewSequence) CondNewSequence
SetCondNewSeq allow to override the default conditional for new sequence
func (*TxBuilderElderberryZKEVM) String ¶
func (t *TxBuilderElderberryZKEVM) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.