Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - Variables
 - type BlobFetcher
 - type BlobHint
 - type BlockHeaderHint
 - type CachingOracle
 - func (o *CachingOracle) GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob
 - func (o *CachingOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
 - func (o *CachingOracle) Precompile(address common.Address, input []byte, requiredGas uint64) ([]byte, bool)
 - func (o *CachingOracle) ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Receipts)
 - func (o *CachingOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
 
- type Oracle
 - type OracleL1Client
 - func (o *OracleL1Client) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
 - func (o *OracleL1Client) InfoAndTxsByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, types.Transactions, error)
 - func (o *OracleL1Client) InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
 - func (o *OracleL1Client) L1BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L1BlockRef, error)
 - func (o *OracleL1Client) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error)
 - func (o *OracleL1Client) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
 
- type PrecompileHint
 - type PrecompileHintV2
 - type PreimageOracle
 - func (p *PreimageOracle) GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob
 - func (p *PreimageOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
 - func (p *PreimageOracle) Precompile(address common.Address, input []byte, requiredGas uint64) ([]byte, bool)
 - func (p *PreimageOracle) ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Receipts)
 - func (p *PreimageOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
 
- type ReceiptsHint
 - type TransactionsHint
 
Constants ¶
      View Source
      
  
const ( HintL1BlockHeader = "l1-block-header" HintL1Transactions = "l1-transactions" HintL1Receipts = "l1-receipts" HintL1Blob = "l1-blob" HintL1Precompile = "l1-precompile" HintL1PrecompileV2 = "l1-precompile-v2" )
Variables ¶
      View Source
      
  
    var ( ErrNotFound = ethereum.NotFound ErrUnknownLabel = errors.New("unknown label") )
      View Source
      
  
    var InvalidHashesLengthError = errors.New("invalid hashes length")
    
      View Source
      
  
var RootsOfUnity *[4096]fr.Element
    Functions ¶
This section is empty.
Types ¶
type BlobFetcher ¶ added in v1.5.1
type BlobFetcher struct {
	// contains filtered or unexported fields
}
    func NewBlobFetcher ¶ added in v1.5.1
func NewBlobFetcher(logger log.Logger, oracle Oracle) *BlobFetcher
func (*BlobFetcher) GetBlobs ¶ added in v1.5.1
func (b *BlobFetcher) GetBlobs(ctx context.Context, ref eth.L1BlockRef, hashes []eth.IndexedBlobHash) ([]*eth.Blob, error)
GetBlobs fetches blobs that were confirmed in the given L1 block with the given indexed blob hashes.
type BlockHeaderHint ¶
func (BlockHeaderHint) Hint ¶
func (l BlockHeaderHint) Hint() string
type CachingOracle ¶
type CachingOracle struct {
	// contains filtered or unexported fields
}
    CachingOracle is an implementation of Oracle that delegates to another implementation, adding caching of all results
func NewCachingOracle ¶
func NewCachingOracle(oracle Oracle) *CachingOracle
func (*CachingOracle) GetBlob ¶ added in v1.5.1
func (o *CachingOracle) GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob
func (*CachingOracle) HeaderByBlockHash ¶
func (o *CachingOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
func (*CachingOracle) Precompile ¶ added in v1.7.2
func (*CachingOracle) ReceiptsByBlockHash ¶
func (*CachingOracle) TransactionsByBlockHash ¶
func (o *CachingOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
type Oracle ¶
type Oracle interface {
	// HeaderByBlockHash retrieves the block header with the given hash.
	HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
	// TransactionsByBlockHash retrieves the transactions from the block with the given hash.
	TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
	// ReceiptsByBlockHash retrieves the receipts from the block with the given hash.
	ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Receipts)
	// GetBlob retrieves the blob with the given hash.
	GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob
	// Precompile retrieves the result and success indicator of a precompile call for the given input.
	Precompile(precompileAddress common.Address, input []byte, requiredGas uint64) ([]byte, bool)
}
    type OracleL1Client ¶
type OracleL1Client struct {
	// contains filtered or unexported fields
}
    func NewOracleL1Client ¶
func (*OracleL1Client) FetchReceipts ¶
func (*OracleL1Client) InfoAndTxsByHash ¶
func (o *OracleL1Client) InfoAndTxsByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, types.Transactions, error)
func (*OracleL1Client) InfoByHash ¶
func (*OracleL1Client) L1BlockRefByHash ¶
func (o *OracleL1Client) L1BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L1BlockRef, error)
func (*OracleL1Client) L1BlockRefByLabel ¶
func (o *OracleL1Client) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error)
func (*OracleL1Client) L1BlockRefByNumber ¶
func (o *OracleL1Client) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
type PrecompileHint ¶ added in v1.7.2
type PrecompileHint []byte
func (PrecompileHint) Hint ¶ added in v1.7.2
func (l PrecompileHint) Hint() string
type PrecompileHintV2 ¶ added in v1.9.1
type PrecompileHintV2 []byte
func (PrecompileHintV2) Hint ¶ added in v1.9.1
func (l PrecompileHintV2) Hint() string
type PreimageOracle ¶
type PreimageOracle struct {
	// contains filtered or unexported fields
}
    PreimageOracle implements Oracle using by interfacing with the pure preimage.Oracle to fetch pre-images to decode into the requested data.
func NewPreimageOracle ¶
func NewPreimageOracle(raw preimage.Oracle, hint preimage.Hinter) *PreimageOracle
func (*PreimageOracle) GetBlob ¶ added in v1.5.1
func (p *PreimageOracle) GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob
func (*PreimageOracle) HeaderByBlockHash ¶
func (p *PreimageOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
func (*PreimageOracle) Precompile ¶ added in v1.7.2
func (*PreimageOracle) ReceiptsByBlockHash ¶
func (*PreimageOracle) TransactionsByBlockHash ¶
func (p *PreimageOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
type ReceiptsHint ¶
func (ReceiptsHint) Hint ¶
func (l ReceiptsHint) Hint() string
type TransactionsHint ¶
func (TransactionsHint) Hint ¶
func (l TransactionsHint) Hint() string
 Click to show internal directories. 
   Click to hide internal directories.