Documentation ¶
Index ¶
- func GetAuthenticatedSender(chainID int64, tx *types.Transaction) (*gethcommon.Address, error)
- func GetTxSigner(tx *common.L2Tx) (gethcommon.Address, error)
- func LogMethodDuration(logger gethlog.Logger, stopWatch *measure.Stopwatch, msg string, args ...any)
- func VerifySignature(chainID int64, tx *types.Transaction) error
- type Batch
- func (b *Batch) Encode() ([]byte, error)
- func (b *Batch) Hash() common.L2BatchHash
- func (b *Batch) IsGenesis() bool
- func (b *Batch) Number() *big.Int
- func (b *Batch) NumberU64() uint64
- func (b *Batch) ResetHash()
- func (b *Batch) SeqNo() *big.Int
- func (b *Batch) Size() (int, error)
- func (b *Batch) ToExtBatch(transactionBlobCrypto crypto.DataEncryptionService, ...) (*common.ExtBatch, error)
- type Rollup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatedSender ¶
func GetAuthenticatedSender(chainID int64, tx *types.Transaction) (*gethcommon.Address, error)
GetAuthenticatedSender - Get sender and tx nonce from transaction
func GetTxSigner ¶ added in v0.22.0
func GetTxSigner(tx *common.L2Tx) (gethcommon.Address, error)
GetTxSigner returns the address that signed a transaction
func LogMethodDuration ¶
func LogMethodDuration(logger gethlog.Logger, stopWatch *measure.Stopwatch, msg string, args ...any)
LogMethodDuration - call only with "defer"
func VerifySignature ¶
func VerifySignature(chainID int64, tx *types.Transaction) error
VerifySignature - Checks that the L2Tx has a valid signature.
Types ¶
type Batch ¶
type Batch struct { Header *common.BatchHeader Transactions []*common.L2Tx // contains filtered or unexported fields }
Batch Data structure only for the internal use of the enclave since transactions are in clear
func DeterministicEmptyBatch ¶
func ToBatch ¶
func ToBatch(extBatch *common.ExtBatch, transactionBlobCrypto crypto.DataEncryptionService, compression compression.DataCompressionService) (*Batch, error)
func (*Batch) Hash ¶
func (b *Batch) Hash() common.L2BatchHash
Hash returns the keccak256 hash of b's header. The hash is computed on the first call and cached thereafter.
func (*Batch) IsGenesis ¶
IsGenesis indicates whether the batch is the genesis batch. todo (#718) - Change this to a check against a hardcoded genesis hash.
func (*Batch) ToExtBatch ¶
func (b *Batch) ToExtBatch(transactionBlobCrypto crypto.DataEncryptionService, compression compression.DataCompressionService) (*common.ExtBatch, error)
type Rollup ¶
type Rollup struct { Header *common.RollupHeader Batches []*Batch Blocks map[common.L1BlockHash]*types.Block // these are the blocks required during compression. The key is the hash // contains filtered or unexported fields }
Rollup - is an internal data structure useful during creation
func (*Rollup) Hash ¶
func (r *Rollup) Hash() common.L2BatchHash
Hash returns the keccak256 hash of b's header. The hash is computed on the first call and cached thereafter.