Crate op_alloy_protocol Copy item path Source Expand description BatchReader Batch Reader provides a function that iteratively consumes batches from the reader.
The L1Inclusion block is also provided at creation time.
Warning: the batch reader can read every batch-type.
The caller of the batch-reader should filter the results. BatchTransaction BatchTransaction is a set of Frame s that can be Into::into Bytes .
if the size exceeds the desired threshold. BatchWithInclusionBlock A batch with its inclusion block. BlockInfo Block Header Info BrotliCompressor The brotli compressor. Channel A Channel is a set of batches that are split into at least one, but possibly multiple frames. ChannelOut ChannelOut constructs a channel from compressed, encoded batch data.Config Configuration for the compressor itself. ExecutingMessage Solidity event, emitted when a cross chain message is being executed. Frame A channel frame is a segment of a channel’s data. FrameIter An iterator over encoded frames. L1BlockInfoBedrock Represents the fields within a Bedrock L1 block info transaction. L1BlockInfoEcotone Represents the fields within an Ecotone L1 block info transaction. L1BlockInfoInterop Represents the fields within an Interop L1 block info transaction. L2BlockInfo L2 Block Header Info MessageIdentifier A MessageIdentifier
uniquely represents a log that is emitted from a chain within
the broader dependency set. It is included in the calldata of a transaction sent to the
CrossL2Inbox contract. MessagePayload A MessagePayload
is the raw payload of an initiating message. RatioCompressor Ratio Compressor RawSpanBatch Raw Span Batch ShadowCompressor Shadow Compressor SingleBatch Represents a single batch: a single encoded L2 block SpanBatch Container of the inputs required to build a span of L2 blocks in derived form. SpanBatchBits Type for span batch bits. SpanBatchEip1559TransactionData The transaction data for an EIP-1559 transaction within a span batch. SpanBatchEip2930TransactionData The transaction data for an EIP-2930 transaction within a span batch. SpanBatchEip7702TransactionData The transaction data for an EIP-7702 transaction within a span batch. SpanBatchElement A single batch element is similar to the SingleBatch type
but does not contain the parent hash and epoch hash since spans
do not contain this data for every block in the span. SpanBatchLegacyTransactionData The transaction data for a legacy transaction within a span batch. SpanBatchPayload Span Batch Payload SpanBatchPrefix Span Batch Prefix SpanBatchTransactions This struct contains the decoded information for transactions in a span batch. ZlibCompressor The ZLIB compressor. Batch A Batch. BatchDecodingError An error decoding a batch. BatchEncodingError An error encoding a batch. BatchType The Batch Type. BatchValidity Batch Validity BlockInfoError An error type for parsing L1 block info transactions. BrotliCompressionError A Brotli Compression Error. BrotliDecompressionError A frame decompression error. BrotliLevel The brotli encoding level used in Optimism. ChannelError An error returned when adding a frame to a channel. ChannelOutError An error returned by the ChannelOut when adding single batches. CompressionAlgo The compression algorithm type. CompressorError An error returned by the compressor. CompressorType The type of compressor to use. DecodeError An error decoding an L1 block info transaction. DepositError An TxDeposit
validation error. FrameDecodingError A frame decoding error. FrameParseError Frame parsing error. FromBlockError An error that can occur when converting an OP Block to L2BlockInfo . L1BlockInfoTx The L1BlockInfoTx enum contains variants for the different versions of the L1 block info
transaction on OP Stack chains. OpBlockConversionError An error encountered during OP Block conversion. SafetyLevel The safety level of a message. SpanBatchError Span Batch Errors SpanBatchTransactionData The typed transaction data for a transaction within a span batch. SpanDecodingError Decoding Error VariantCompressor The channel compressor wraps the brotli and zlib compressor types,
implementing the ChannelCompressor trait itself. CHANNEL_ID_LENGTH CHANNEL_ID_LENGTH is the length of the channel ID.DEPOSIT_EVENT_ABI Deposit log event abi signature. DEPOSIT_EVENT_ABI_HASH Deposit event abi hash. DEPOSIT_EVENT_VERSION_0 The initial version of the deposit event log. DERIVATION_VERSION_0 The version of the derivation pipeline. FJORD_MAX_RLP_BYTES_PER_CHANNEL FJORD_MAX_RLP_BYTES_PER_CHANNEL is the maximum amount of bytes that will be read from
a channel when the Fjord Hardfork is activated. This limit is set when decoding the RLP.FRAME_OVERHEAD Count the tagging info as 200 in terms of buffer size. MAX_FRAME_LEN Frames cannot be larger than 1MB. MAX_RLP_BYTES_PER_CHANNEL MAX_RLP_BYTES_PER_CHANNEL is the maximum amount of bytes that will be read from
a channel. This limit is set when decoding the RLP.MAX_SPAN_BATCH_ELEMENTS MAX_SPAN_BATCH_ELEMENTS is the maximum number of blocks, transactions in total,
or transaction per block allowed in a span batch. SINGLE_BATCH_TYPE The single batch type identifier. SPAN_BATCH_TYPE The span batch type identifier. BatchValidationProvider Describes the functionality of a data source that fetches safe blocks. ChannelCompressor Channel Compressor CompressorWriter Compressor Writer calculate_tx_l1_cost_bedrock Calculate the gas cost of a transaction based on L1 block data posted on L2 post-bedrock. calculate_tx_l1_cost_bedrock_empty_scalars Calculate the gas cost of a transaction based on L1 block data posted on L2 post-ecotone.
This is a special case where the gas cost function uses the bedrock gas cost function,
but the data gas is calculated using the ecotone data gas function. calculate_tx_l1_cost_ecotone Calculate the gas cost of a transaction based on L1 block data posted on L2, post-Ecotone. calculate_tx_l1_cost_fjord Calculate the gas cost of a transaction based on L1 block data posted on L2, post-Fjord. calculate_tx_l1_cost_regolith Calculate the gas cost of a transaction based on L1 block data posted on L2 post-regolith. closing_deposit_context_tx Create a TxDeposit for closing the deposit context. This deposit transaction, after
interop activation, always is placed last in the deposit section of the block. compress_zlib Method to compress data using ZLIB. data_gas_bedrock Calculate the data gas for posting the transaction on L1. data_gas_fjord Calculate the data gas for posting the transaction on L1. data_gas_regolith Calculate the data gas for posting the transaction on L1. decode_deposit Derives a deposit transaction from an EVM log event emitted by the deposit contract. decompress_brotli Decompresses the given bytes data using the Brotli decompressor implemented
in the brotli
crate. decompress_zlib Method to decompress data using ZLIB. flz_compress_len Returns the length of the data after compression through FastLZ. read_tx_data Reads transaction data from a reader. starts_with_2718_deposit Returns if the given value
is a deposit transaction. to_system_config Converts the OpBlock to a partial SystemConfig . tx_estimated_size_fjord Calculate the estimated compressed transaction size in bytes, scaled by 1e6.
This value is computed based on the following formula:
max(minTransactionSize, intercept + fastlzCoef*fastlzSize) ChannelId ChannelId is an opaque identifier for a channel.CompressorResult The result from compressing data.