MCPcopy Create free account

hub / github.com/a16z/magi / functions

Functions297 in github.com/a16z/magi

↓ 28 callersFunctionaddr
Converts a [str] to an [Address]
src/config/mod.rs:509
↓ 15 callersFunctionconvert_hash
Converts [Bytes32] into [H256]
src/network/handlers/block_handler.rs:383
↓ 13 callersMethodget_block_with_txs
Fetches a block with transactions
src/driver/info.rs:33
↓ 11 callersMethodremove
Removes a pending channel from the bank
src/derive/stages/channels.rs:125
↓ 10 callersFunctionhash
Converts a [str] to a [B256].
src/config/mod.rs:514
↓ 10 callersMethodpush_frame
Pushes a frame into the correct pending channel
src/derive/stages/channels.rs:62
↓ 8 callersMethodget_block
(&self, block_num: u64)
src/l1/chain_watcher.rs:400
↓ 7 callersMethodbuild
Build and returns a [Version] struct
src/version/mod.rs:14
↓ 7 callersMethodepoch_by_number
Returns an epoch by number. Same as the first L1 block number in the epoch's sequencing window.
src/derive/state.rs:85
↓ 5 callersFunctioncreate_stage
()
src/derive/stages/channels.rs:403
↓ 5 callersMethodstart
Runs the Driver
src/driver/mod.rs:134
↓ 5 callersFunctiontake_data
Splits a byte slice at the specified index (length) into a tuple of 2 byte slices
src/derive/stages/span_batch.rs:112
↓ 4 callersFunctiondecode_bitlist
Decodes a bitlist into boolean values and returns a tuple of booleans + the original bitlist.
src/derive/stages/span_batch.rs:117
↓ 4 callersMethodforkchoice_updated
Sends an `engine_forkchoiceUpdatedV2` (V3 post Ecotone) message to the engine.
src/engine/api.rs:210
↓ 4 callersMethodgenerate_claims
Generate claims constructs a [`Claims`] instance. ## Panics This function will panic if the system time is before the UNIX_EPOCH.
src/engine/auth.rs:68
↓ 4 callersMethodupdate_safe_head
Updates the current `safe_head` & `safe_epoch`. Also updates the current `unsafe_head` to the given `new_head` if `reorg_unsafe` is `true`, or if the
src/driver/engine_driver.rs:177
↓ 3 callersMethodblock_inputs
Returns a BlockInput vector for this batch. Contains all L2 block in the batch.
src/derive/stages/span_batch.rs:62
↓ 3 callersMethodcheck_shutdown
Exits if a SIGINT signal is received
src/runner/mod.rs:224
↓ 3 callersFunctionconvert_address
Converts [VecAddress] into [Address]
src/network/handlers/block_handler.rs:388
↓ 3 callersFunctionconvert_byte_list
Converts an [ssz_rs::List] of bytes into [Bytes]
src/network/handlers/block_handler.rs:398
↓ 3 callersFunctionconvert_byte_vector
Converts an [ssz_rs::Vector] of bytes into [Bytes]
src/network/handlers/block_handler.rs:393
↓ 3 callersFunctionconvert_err
Converts a generic error to a [jsonrpsee::core::error] if one exists
src/rpc/mod.rs:107
↓ 3 callersFunctionconvert_tx_list
Converts [ssz_rs::List] of [Transaction] into a vector of [RawTransaction]
src/network/handlers/block_handler.rs:411
↓ 3 callersFunctionconvert_uint
Converts a [U256] into [ethers::types::U64]
src/network/handlers/block_handler.rs:403
↓ 3 callersMethodcreate_forkchoice_state
Creates a [ForkchoiceState]: - `head_block` = `unsafe_head` - `safe_block` = `safe_head` - `finalized_block` = `finalized_head`
src/driver/engine_driver.rs:199
↓ 3 callersMethodencode
Encodes the [`Claims`] in a [jsonwebtoken::Header] String format.
src/engine/auth.rs:78
↓ 3 callersMethodfetch_ready_channel
Fetch the completed channel if it is ready
src/derive/stages/channels.rs:93
↓ 3 callersFunctioninit
Starts the metrics server on port 9200
src/telemetry/metrics.rs:20
↓ 3 callersMethodl1_info_by_hash
Returns a cached L1 block by block hash
src/derive/state.rs:55
↓ 3 callersFunctionmock_provider
(block: Option<Block<Transaction>>)
src/driver/info.rs:89
↓ 3 callersMethodnext
Returns the pending [PayloadAttributes]. If none exist it will call `Attributes::next()` to advance to the next block and return those attributes inst
src/derive/mod.rs:46
↓ 3 callersFunctionoptimism_config
()
src/driver/info.rs:148
↓ 3 callersMethodpost
Helper to construct a post request through the client
src/engine/api.rs:115
↓ 3 callersMethodstart_driver
Creates and starts the [Driver] which handles the derivation sync process.
src/runner/mod.rs:211
↓ 3 callersMethodupdate_forkchoice
Sends a `ForkChoiceUpdated` message to the [Engine] with the current `Forkchoice State` and no payload.
src/driver/engine_driver.rs:160
↓ 2 callersMethodadd_handler
Adds a handler to [Service]
src/network/service/mod.rs:46
↓ 2 callersMethodbase_body
Construct base body
src/engine/api.rs:104
↓ 2 callersFunctionbuild_subscriber
Subscriber Composer Builds a subscriber with multiple layers into a [tracing](https://crates.io/crates/tracing) subscriber and initializes it as the
src/telemetry/logging.rs:49
↓ 2 callersMethodcheck_shutdown
Checks for shutdown signal and shuts down if received
src/driver/mod.rs:154
↓ 2 callersFunctiondecode_field_element
( output_pos: &mut usize, input_pos: &mut usize, blob: &[u8], output: &mut [u8], )
src/l1/blob_encoding.rs:79
↓ 2 callersFunctiondecode_u256
Decodes a U256 from an arbitrary slice of bytes
src/derive/stages/span_batch.rs:449
↓ 2 callersFunctiondecode_uvarint_list
Decodes transaction nonces in the batch into a U64 vector
src/derive/stages/span_batch.rs:293
↓ 2 callersFunctiongenerate_http_provider
(url: &str)
src/l1/chain_watcher.rs:520
↓ 2 callersMethodget_batcher_transactions
Given a block, return a list of [`BatcherTransactionData`] containing either the calldata or the decoded blob data for each batcher transaction in the
src/l1/chain_watcher.rs:446
↓ 2 callersFunctionget_l1_start_block
Retrieves the L1 start block number. If an overflow occurs during subtraction, the function returns the genesis block #0.
src/driver/mod.rs:367
↓ 2 callersMethodis_ecotone_activation_block
Returns true if the block is the first block subject to the Ecotone hardfork
src/config/mod.rs:294
↓ 2 callersFunctionis_epoch_boundary
Returns `true` if the L2 block is the first in an epoch (sequence number 0)
src/runner/mod.rs:235
↓ 2 callersMethodl2_info_by_timestamp
Returns a cached L2 block by block timestamp
src/derive/state.rs:67
↓ 2 callersMethodnew_payload
Sends an `engine_newPayloadV2` (V3 post Ecotone) message to the engine.
src/engine/api.rs:226
↓ 2 callersMethodprocess_attributes
Initiates validation & production of a new block: - Sends the [PayloadAttributes] to the engine via `engine_forkchoiceUpdatedV2` (V3 post Ecotone) and
src/driver/engine_driver.rs:96
↓ 2 callersMethodprocess_incoming
Receives new [BatcherTransactionMessage] messages from the channel and adds these to the end of the deque.
src/derive/stages/batcher_transactions.rs:53
↓ 2 callersMethodpurge
Resets the state of `self.attributes` by calling `Attributes::purge()`
src/derive/mod.rs:90
↓ 2 callersMethodpush_batcher_transactions
Sends Batcher Transactions & the L1 block they were received in to the Batcher Transactions receiver.
src/derive/mod.rs:72
↓ 2 callersMethodpush_payload
Sends the given [ExecutionPayload] to the [Engine] via `NewPayload`
src/driver/engine_driver.rs:150
↓ 2 callersFunctionreassemble_bytes
(output_pos: &mut usize, encoded_byte: [u8; 4], output: &mut [u8])
src/l1/blob_encoding.rs:100
↓ 2 callersMethodrecv_from_channel
Asynchronously receives from the block update channel. Returns `None` if the channel contains no messages.
src/l1/chain_watcher.rs:163
↓ 2 callersFunctionrun_server
Starts the Magi RPC server
src/rpc/mod.rs:129
↓ 2 callersMethodshutdown
Shuts down the driver
src/driver/mod.rs:149
↓ 2 callersFunctionstart
Starts the [Discv5] discovery service and continually tries to find new peers. Returns a [Receiver] to receive [Peer] structs
src/network/service/discovery.rs:19
↓ 2 callersFunctionstart_watcher
( l1_start_block: u64, l2_start_block: u64, config: Arc<Config>, )
src/l1/chain_watcher.rs:531
↓ 2 callersMethodsynced
True if there are no unfinalized blocks
src/driver/mod.rs:360
↓ 2 callersMethodtimestamp
Returns the batch timestamp
src/derive/stages/batches.rs:464
↓ 2 callersMethodtopics
The gossip topics accepted for new blocks
src/network/handlers/block_handler.rs:71
↓ 2 callersMethodupdate_l1_info
Inserts data from the ``l1_info`` parameter into ``l1_hashes`` & ``l1_info`` maps. This also updates ``current_epoch_num`` to the block number of the
src/derive/state.rs:96
↓ 1 callersMethodadvance
Attempts to advance the execution node forward using either L1 info or blocks received on the p2p network.
src/driver/mod.rs:170
↓ 1 callersMethodadvance_safe_head
Attempts to advance the execution node forward one L1 block using derived L1 data. Errors if the most recent PayloadAttributes from the pipeline does
src/driver/mod.rs:184
↓ 1 callersMethodadvance_unsafe_head
Collects unsafe blocks received via p2p gossip and updates the forkchoice with the first available unsafe block.
src/driver/mod.rs:230
↓ 1 callersMethodas_inputs
Returns a Block Input vector of the blocks in a batch.
src/derive/stages/batches.rs:472
↓ 1 callersMethodassemble
Assembles the pending channel into channel data
src/derive/stages/channels.rs:192
↓ 1 callersMethodawait_engine_ready
Loops until the [EngineApi] is online and receives a response from the engine.
src/driver/mod.rs:161
↓ 1 callersMethodbatch_status
Returns the validity of a [Batch]
src/derive/stages/batches.rs:181
↓ 1 callersMethodbatcher_hash
Encodes batch sender as a [B256].
src/config/mod.rs:213
↓ 1 callersMethodblock_at
Fetches the L2 block for a given timestamp from the L2 Execution Client
src/driver/engine_driver.rs:208
↓ 1 callersMethodblock_valid
Determines if a block is valid. True if the block is less than 1 minute old, and correctly signed by the unsafe block signer.
src/network/handlers/block_handler.rs:99
↓ 1 callersFunctionbootnodes
Default bootnodes to use. Currently consists of 2 Base bootnodes & 1 Optimism bootnode.
src/network/service/discovery.rs:122
↓ 1 callersMethodbuild_payload
Sends [PayloadAttributes] via a `ForkChoiceUpdated` message to the [Engine] and returns the [ExecutionPayload] sent by the Execution Client.
src/driver/engine_driver.rs:130
↓ 1 callersMethodchallenge_sync
Fast challenge mode - currently unsupported
src/runner/mod.rs:85
↓ 1 callersMethodcheck_reorg
(&self)
src/l1/chain_watcher.rs:362
↓ 1 callersMethodcheckpoint_sync
Checkpoint sync mode. Syncs the execution client to a given checkpoint block, and then begins the normal derivation sync process via the [Driver] Not
src/runner/mod.rs:102
↓ 1 callersFunctioncompute_l2_output_root
Computes the L2 output root. Refer to the [Optimism Spec](https://specs.optimism.io/protocol/proposals.html#l2-output-commitment-construction) for det
src/rpc/mod.rs:113
↓ 1 callersFunctioncreate_disc
Generates an [Enr] and creates a [Discv5] service struct
src/network/service/discovery.rs:68
↓ 1 callersFunctioncreate_swarm
Creates the libp2p [Swarm]
src/network/service/mod.rs:124
↓ 1 callersFunctiondecode_address
Decodes arbitrary slice of bytes into an [Address]
src/derive/stages/span_batch.rs:425
↓ 1 callersFunctiondecode_batches
Attempts to decode channel data into a [Batch] vector
src/derive/stages/batches.rs:408
↓ 1 callersFunctiondecode_blob_data
Encodes a blob of data into a byte array
src/l1/blob_encoding.rs:10
↓ 1 callersFunctiondecode_block_tx_counts
Decodes the number of transactions in the batch into a U64 vector
src/derive/stages/span_batch.rs:136
↓ 1 callersFunctiondecode_post_ecotone_block_msg
Decodes a sequence of bytes to an [ExecutionPayloadEnvelope]. The Ecotone V3 block topic encoding includes the parent beacon block root as described i
src/network/handlers/block_handler.rs:147
↓ 1 callersFunctiondecode_signatures
Decodes transaction `R` & `S` signature fields in the batch into a (U256, U256) vector
src/derive/stages/span_batch.rs:432
↓ 1 callersFunctiondecode_tos
Decodes transaction `To` fields in the batch into an [Address] vector
src/derive/stages/span_batch.rs:412
↓ 1 callersFunctiondecode_transactions
Decodes transactions in a batch and returns a [RawTransaction] vector
src/derive/stages/span_batch.rs:149
↓ 1 callersFunctiondecode_tx_data
Decodes EIP-2718 `TransactionType` formatted transactions in the batch into a [TxData] vector
src/derive/stages/span_batch.rs:307
↓ 1 callersMethodderive_attributes
Processes a given Block Input and returns [PayloadAttributes] for the block. Calls `derive_transactions` to generate the raw transactions
src/derive/stages/attributes.rs:75
↓ 1 callersMethodderive_attributes_deposited
Derives the attributes deposited transaction for a given block and converts this to a [RawTransaction].
src/derive/stages/attributes.rs:155
↓ 1 callersMethodderive_transactions
Derives the deposited transactions and all other L2 user transactions from a given block. Deposited txs include: - L1 Attributes Deposited (exists as
src/derive/stages/attributes.rs:119
↓ 1 callersMethodderive_user_deposited
Derives the user deposited txs for the current epoch, and returns a [RawTransaction] vector
src/derive/stages/attributes.rs:168
↓ 1 callersMethodencode
Encodes [AttributesDeposited] into `setL1BlockValues` transaction calldata, including the selector.
src/derive/stages/attributes.rs:348
↓ 1 callersMethodengine_ready
Sends a `ForkchoiceUpdated` message to check if the [Engine] is ready.
src/driver/engine_driver.rs:83
↓ 1 callersMethodequal
Returns if the provided JWT token is equal to the JWT secret.
src/engine/auth.rs:59
↓ 1 callersMethodfast_sync
Fast sync mode - currently unsupported
src/runner/mod.rs:79
↓ 1 callersMethodfetch_beacon_genesis_timestamp
Fetch the genesis timestamp from the beacon chain.
src/l1/blob_fetcher.rs:98
next →1–100 of 297, ranked by callers