Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/a16z/magi
/ functions
Functions
297 in github.com/a16z/magi
⨍
Functions
297
◇
Types & classes
90
↓ 1 callers
Method
fetch_beacon_spec
Fetch the beacon chain spec.
src/l1/blob_fetcher.rs:113
↓ 1 callers
Method
fetch_blob_sidecars
Fetch the blob sidecars for a given slot.
src/l1/blob_fetcher.rs:84
↓ 1 callers
Method
fill_bank
Pull the next batcher transaction from the BatcherTransactions stage
src/derive/stages/channels.rs:84
↓ 1 callers
Method
filter_inputs
Returns Block Input elements that are newer than the current `safe_head`.
src/derive/stages/batches.rs:173
↓ 1 callers
Method
full_sync
Full sync mode. Syncs via L1 block derivation from the latest finalized block the execution client has synced to. Otherwise syncs from genesis
src/runner/mod.rs:93
↓ 1 callers
Method
get_deposits
(&mut self, block_num: u64)
src/l1/chain_watcher.rs:407
↓ 1 callers
Function
get_ecotone_upgrade_transactions
Return the generated Ecotone upgrade RLP-encoded transactions as defined in the [specs]. [specs]: https://specs.optimism.io/protocol/derivation.html#
src/derive/ecotone_upgrade.rs:11
↓ 1 callers
Function
get_expected_hashes
(block_num: u64)
src/derive/mod.rs:183
↓ 1 callers
Method
get_finalized
(&self)
src/l1/chain_watcher.rs:373
↓ 1 callers
Method
get_head
(&self)
src/l1/chain_watcher.rs:389
↓ 1 callers
Method
get_payload
Sends an `engine_getPayloadV2` (V3 post Ecotone) message to the engine.
src/engine/api.rs:233
↓ 1 callers
Function
get_rolling_file_appender
Get a rolling file appender for the given directory, rotation and file name prefix.
src/telemetry/logging.rs:235
↓ 1 callers
Function
get_rotation_strategy
Get the rotation strategy from the given string. Defaults to rotating daily.
src/telemetry/logging.rs:220
↓ 1 callers
Method
get_slot_from_time
Given a timestamp, return the slot number at which the timestamp was included in the beacon chain. This method uses a cached genesis timestamp and se
src/l1/blob_fetcher.rs:49
↓ 1 callers
Function
get_tx_hashes
(txs: &[RawTransaction])
src/derive/mod.rs:194
↓ 1 callers
Method
handle_attributes
Initiates validation & production of a new L2 block from the given [PayloadAttributes] and updates the forkchoice
src/driver/engine_driver.rs:39
↓ 1 callers
Method
handle_next_block_update
Ingests the next update from the block update channel
src/driver/mod.rs:267
↓ 1 callers
Method
handle_unsafe_payload
Instructs the engine to create a block and updates the forkchoice, based on a payload received via p2p gossip.
src/driver/engine_driver.rs:55
↓ 1 callers
Method
has_invalid_transactions
If any transactions are empty or deposited transaction types.
src/derive/stages/single_batch.rs:47
↓ 1 callers
Method
is_available
Calls the engine to verify it's available to receive requests
src/engine/api.rs:177
↓ 1 callers
Method
is_complete
Checks if we have seen the last frame for this channel
src/derive/stages/channels.rs:182
↓ 1 callers
Method
is_ecotone_but_not_first_block
Returns true if Ecotone hardfork is active but the block is not the first block subject to the hardfork. Ecotone activation at genesis does not count.
src/config/mod.rs:300
↓ 1 callers
Method
is_timed_out
Checks if the channel has timed out
src/derive/stages/channels.rs:187
↓ 1 callers
Method
is_valid_batcher_transaction
(&self, tx: &Transaction)
src/l1/chain_watcher.rs:510
↓ 1 callers
Function
is_valid_node
Returns `true` if a node [Enr] contains an `opstack` key and is on the same network.
src/network/service/discovery.rs:57
↓ 1 callers
Method
jwt_secret
(&self)
bin/magi.rs:91
↓ 1 callers
Method
jwt_secret_from_file
(&self)
bin/magi.rs:95
↓ 1 callers
Method
l1_inclusion_block
The highest L1 inclusion block of frames in the channel.
src/derive/stages/channels.rs:201
↓ 1 callers
Method
l1_info_by_number
Returns a cached L1 block by block number
src/derive/state.rs:60
↓ 1 callers
Function
l2_refs
Returns the L2 blocks from the given ``head_num`` - (``max_seq_drift`` / ``blocktime``) to ``head_num``. If the lookback period is before the genesis
src/derive/state.rs:164
↓ 1 callers
Method
next
Processes frames until there are either none left or a channel is ready
src/derive/stages/channels.rs:27
↓ 1 callers
Method
next
Attempts to decode batches in the next channel and returns a Block Input.
src/derive/stages/batches.rs:41
↓ 1 callers
Method
process_frames
Processes frames until there are either none left or a channel is ready
src/derive/stages/channels.rs:106
↓ 1 callers
Method
prune
Removes keys from ``l1_info`` & ``l1_hashes`` mappings if older than ``self.safe_epoch.number`` - ``seq_window_size``. Removes keys from the ``l2_ref
src/derive/state.rs:133
↓ 1 callers
Method
prune
Prunes channels to the max size
src/derive/stages/channels.rs:141
↓ 1 callers
Method
reorg
Sets the [EngineDriver] unsafe & safe heads, and safe epoch to the current finalized head & epoch.
src/driver/engine_driver.rs:76
↓ 1 callers
Method
restart
Resets the chain watcher at the given block numbers
src/l1/chain_watcher.rs:135
↓ 1 callers
Method
run
Begins the syncing process
src/runner/mod.rs:69
↓ 1 callers
Function
should_skip
True if transactions in [PayloadAttributes] are not the same as those in a fetched L2 [Block]
src/driver/engine_driver.rs:220
↓ 1 callers
Method
signature_message
The expected message that should be signed by the unsafe block signer.
src/network/handlers/block_handler.rs:183
↓ 1 callers
Method
single_batch_status
Returns the validity of a Single Batch.
src/derive/stages/batches.rs:189
↓ 1 callers
Method
skip_attributes
Updates the forkchoice by sending `engine_forkchoiceUpdatedV2` (v3 post Ecotone) to the engine with no payload.
src/driver/engine_driver.rs:116
↓ 1 callers
Method
span_batch_status
Returns the validity of a Span Batch.
src/derive/stages/batches.rs:272
↓ 1 callers
Method
start
Starts the Discv5 peer discovery & libp2p services and continually listens for new peers and messages to handle
src/network/service/mod.rs:59
↓ 1 callers
Method
start_epoch_num
Returns the L1 origin number of the last L2 block in the batch
src/derive/stages/span_batch.rs:100
↓ 1 callers
Method
to_config
(self)
bin/magi.rs:84
↓ 1 callers
Method
total_size
Gets the total size of all pending channels
src/derive/stages/channels.rs:133
↓ 1 callers
Method
try_ingest_block
(&mut self)
src/l1/chain_watcher.rs:232
↓ 1 callers
Method
try_next
Initiates the process of building a channel from channel frames. Decodes batches from the built channel and inserts them into the batches mapping. C
src/derive/stages/batches.rs:87
↓ 1 callers
Method
try_recv_from_channel
Attempts to receive a message from the block update channel. Returns an error if the channel contains no messages.
src/l1/chain_watcher.rs:152
↓ 1 callers
Method
try_start_networking
Begins p2p networking if fully synced with no unfinalized blocks
src/driver/mod.rs:342
↓ 1 callers
Method
update_finalized
Updates the current finalized L2 block in the [EngineDriver] based on their inclusion in finalized L1 blocks
src/driver/mod.rs:324
↓ 1 callers
Method
update_metrics
Updates Prometheus metrics
src/driver/mod.rs:353
↓ 1 callers
Method
update_safe_head
Sets ``safe_head`` & ``safe_epoch`` to the given parameters. Also inserts these details into ``l2_refs``.
src/derive/state.rs:122
↓ 1 callers
Method
update_sequence_number
Sets the current sequence number. If `self.epoch_hash` != `batch_epoch_hash` this is set to 0; otherwise it increments by 1. Also sets `self.epoch_ha
src/derive/stages/attributes.rs:188
↓ 1 callers
Method
update_state_head
Updates the [State] `safe_head`
src/driver/mod.rs:255
↓ 1 callers
Method
update_system_config
(&mut self)
src/l1/chain_watcher.rs:298
↓ 1 callers
Function
valid_block
()
src/driver/info.rs:119
↓ 1 callers
Method
with_checkpoint_hash
Sets the `checkpoint_hash` if running in checkpoint [SyncMode]
src/runner/mod.rs:63
↓ 1 callers
Method
with_full_epoch
Returns the Block Input with full [Epoch] details.
src/derive/stages/block_input.rs:30
↓ 1 callers
Method
with_sync_mode
Sets the [SyncMode]
src/runner/mod.rs:57
Method
auth_url_from_addr
Constructs the base engine api url for the given address
src/engine/api.rs:72
Method
base
[ChainConfig] for Base
src/config/mod.rs:405
Method
base_sepolia
[ChainConfig] for Base Sepolia
src/config/mod.rs:451
Method
block_input
Returns a Block Input instance for this batch. Represents a single L2 block.
src/derive/stages/single_batch.rs:54
Method
check_secret
Returns if the provided secret matches the secret used to authenticate with the engine api.
src/engine/api.rs:80
Function
compute_message_id
Computes the message ID of a `gossipsub` message
src/network/service/mod.rs:97
Function
construct_valid_raw_claims
()
src/engine/auth.rs:120
Function
construct_valid_secret_claims
()
src/engine/auth.rs:132
Method
decode
Decodes RLP encoded bytes into [RawTransaction] bytes
src/common/mod.rs:115
Method
decode
Decodes a sequence of bytes into a Span Batch
src/derive/stages/span_batch.rs:36
Method
decode
Decodes RLP bytes into a [SingleBatch]
src/derive/stages/single_batch.rs:29
Function
decode_from_bytes_bedrock
()
src/common/attributes_deposited.rs:208
Function
decode_from_bytes_ecotone
()
src/common/attributes_deposited.rs:232
Function
decode_pre_ecotone_block_msg
Decodes a sequence of bytes to an [ExecutionPayloadEnvelope]
src/network/handlers/block_handler.rs:118
Method
default
Defaults to the Optimism [ChainConfig]
src/config/mod.rs:191
Function
default_blocktime
Returns default blocktime of 2 (seconds).
src/config/mod.rs:519
Function
default_head_info
()
src/driver/info.rs:93
Method
default_jwt_secret
()
bin/magi.rs:103
Method
deserialize
(deserializer: D)
src/common/mod.rs:134
Function
deserialize_blob_bytes
(deserializer: D)
src/l1/blob_fetcher.rs:132
Function
deserialize_string_to_u64
(deserializer: D)
src/l1/blob_fetcher.rs:124
Method
drop
(&mut self)
src/l1/chain_watcher.rs:96
Function
encode_secret
()
src/engine/auth.rs:139
Method
epoch_by_hash
Returns an epoch from an L1 block hash
src/derive/state.rs:76
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/engine/auth.rs:87
Method
fmt
Formatted as: {name}{version}-{meta}
src/version/mod.rs:31
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/common/mod.rs:122
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/config/mod.rs:40
Method
forkchoice_updated
( &self, _forkchoice_state: ForkchoiceState, payload_attributes: Option<PayloadAttribu
src/engine/mock_engine.rs:24
Method
from
Converts [ping::Event] to [Event]
src/network/service/mod.rs:230
Method
from
Converts a Network Address to a [Multiaddr]
src/network/service/types.rs:37
Method
from
Converts Op Stack Enr data to a vector of bytes.
src/network/service/discovery.rs:108
Method
from
Returns the Keccak256 hash of a sequence of bytes
src/network/handlers/block_handler.rs:176
Method
from
Converts a [Provider] to a [HeadInfoFetcher]
src/driver/info.rs:25
Method
from
(value: BlockInfo)
src/common/mod.rs:46
Method
from
Converts [AttributesDeposited] to a [DepositedTransaction]
src/derive/stages/attributes.rs:222
Method
from
Converts a [PendingChannel] to a [Channel]
src/derive/stages/channels.rs:247
Method
from
(value: ChainConfig)
src/config/mod.rs:240
Method
from
(value: Cli)
bin/magi.rs:116
← previous
next →
101–200 of 297, ranked by callers