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
Method
from_block_info
Creates [AttributesDeposited] from the given data.
src/derive/stages/attributes.rs:327
Method
from_config
Creates a new [Runner] from a [Config] and registers the SIGINT signal handler.
src/runner/mod.rs:38
Method
from_config
Creates a new [Driver] from the given [Config]
src/driver/mod.rs:72
Method
from_data
Converts a sequence of bytes into a [Frame]
src/derive/stages/batcher_transactions.rs:115
Method
from_env
Creates an engine api from environment variables
src/engine/api.rs:85
Method
from_hex
Creates an instance of JwtSecret. The provided `secret` must be a valid hexadecimal string of length 64.
src/engine/auth.rs:31
Method
from_json
Read and parse the [ChainConfig] from a JSON file path
src/config/mod.rs:271
Method
from_network_name
Generates a [ChainConfig] instance from a given network name.
src/config/mod.rs:278
Method
from_single_head
Creates a new fork choice state with the given head block hash. The safe and finalized block hashes are set to the head block hash.
src/engine/fork.rs:36
Method
from_str
(s: &str)
src/config/mod.rs:28
Method
get_head_info
Fetches the latest finalized L2 block
src/driver/info.rs:46
Method
get_payload
(&self, _payload_id: PayloadId)
src/engine/mock_engine.rs:40
Method
handle
Handles received gossipsub messages. Ping messages are ignored. Reports back to [libp2p::gossipsub] to apply peer scoring and forward the message to o
src/network/service/mod.rs:206
Method
handle
Checks validity of a block received via p2p gossip, and sends to the block update channel if valid.
src/network/handlers/block_handler.rs:40
Function
init
Configure logging telemetry with a global handler.
src/telemetry/logging.rs:23
Function
main
()
bin/magi.rs:16
Function
main
()
bin/network.rs:13
Method
new
Creates a new ChainWatcher and begins the monitoring task. Errors if the rpc url in the config is invalid.
src/l1/chain_watcher.rs:106
Method
new
Create a new blob fetcher with the given config.
src/l1/blob_fetcher.rs:34
Method
new
Creates a new [Service]
src/network/service/mod.rs:36
Method
new
Creates a new [BlockHandler] and opens a channel
src/network/handlers/block_handler.rs:78
Method
new
Creates a new [`EngineApi`] with a base url and secret.
src/engine/api.rs:38
Method
new
Creates a new [EngineDriver] and builds the [EngineApi] client
src/driver/engine_driver.rs:255
Method
new
Creates a new [Pipeline] and initializes Batcher Transactions, [Channels], [Batches], and [Attributes]
src/derive/mod.rs:57
Method
new
Creates a new [State] and fetches and caches a range of L2 blocks.
src/derive/state.rs:35
Method
new
Creates a new Batcher Transactions.
src/derive/stages/batcher_transactions.rs:45
Method
new
Creates new [Attributes] and sets the `epoch_hash` to the current L1 safe epoch block hash.
src/derive/stages/attributes.rs:55
Method
new
Creates a new [Channels] instance
src/derive/stages/channels.rs:46
Method
new
Creates a new [Batches] instance
src/derive/stages/batches.rs:63
Method
new
Creates a new [Config], based on a config TOML and/or CLI flags. If a setting exists in the TOML and is also passed via CLI, the CLI will take priori
src/config/mod.rs:81
Method
new_payload
(&self, _execution_payload: ExecutionPayload)
src/engine/mock_engine.rs:36
Method
next
Receives new [BatcherTransactionMessage] messages from the channel and adds these to the deque. Pops and returns the first deque element.
src/derive/stages/batcher_transactions.rs:28
Method
next
Iterates over the next BlockInput and returns the [PayLoadAttributes](struct@PayloadAttributes) from this block.
src/derive/stages/attributes.rs:36
Method
on_event
( &self, event: &tracing::Event<'_>, _ctx: tracing_subscriber::layer::Context<'_, S>,
src/telemetry/logging.rs:136
Method
optimism
[ChainConfig] for Optimism
src/config/mod.rs:307
Method
optimism_sepolia
[ChainConfig] for Optimism Sepolia
src/config/mod.rs:356
Method
output_at_block
Returns the L2 output information for a given block. See the [Optimism spec](https://specs.optimism.io/protocol/rollup-node.html?highlight=rpc#l2-outp
src/rpc/mod.rs:55
Method
peek
Returns a reference to the pending [PayloadAttributes]. If none are pending, it will call `self.next()` to advance to the next block and return those
src/derive/mod.rs:80
Method
purge
Resets the state and updates the safe head with the given parameters. ``current_epoch_num`` is set to 0. ``l1_info`` & ``l1_hashes`` mappings are cl
src/derive/state.rs:111
Method
purge
Resets itself by clearing the channel and deque
src/derive/stages/batcher_transactions.rs:36
Method
purge
Purges the Block Input iterator, and sets the epoch_hash to the [safe_epoch](State::safe_epoch) hash.
src/derive/stages/attributes.rs:46
Method
purge
Clears the iterator, `pending_channels` & `frame_bank`
src/derive/stages/channels.rs:37
Method
purge
Clears the channels iterator, batches mapping & pending block inputs
src/derive/stages/batches.rs:54
Method
random
Generates a random [`JwtSecret`]
src/engine/auth.rs:52
Method
record_bool
(&mut self, _: &tracing::field::Field, value: bool)
src/telemetry/logging.rs:104
Method
record_debug
(&mut self, _: &tracing::field::Field, value: &dyn std::fmt::Debug)
src/telemetry/logging.rs:120
Method
record_error
( &mut self, _: &tracing::field::Field, value: &(dyn std::error::Error + 'static),
src/telemetry/logging.rs:112
Method
record_f64
(&mut self, _: &tracing::field::Field, value: f64)
src/telemetry/logging.rs:92
Method
record_i64
(&mut self, _: &tracing::field::Field, value: i64)
src/telemetry/logging.rs:96
Method
record_str
(&mut self, _: &tracing::field::Field, value: &str)
src/telemetry/logging.rs:108
Method
record_u64
(&mut self, _: &tracing::field::Field, value: u64)
src/telemetry/logging.rs:100
Method
rlp_append
Converts a [DepositedTransaction] to RLP bytes and appends to the stream.
src/derive/stages/attributes.rs:280
Method
rollup_config
Returns the rollup configuration options.
src/rpc/mod.rs:94
Method
serialize
(&self, serializer: S)
src/common/mod.rs:128
Method
set_keypair
Sets the keypair for [Service]
src/network/service/mod.rs:52
Function
should_convert_from_a_block_to_head_info
()
src/driver/types.rs:134
Function
should_fail_conversion_from_a_block_to_head_info_if_missing_l1_deposited_tx
( )
src/driver/types.rs:88
Method
start
Starts the chain watcher at the given block numbers
src/l1/chain_watcher.rs:117
Function
test_attributes_match
()
src/derive/mod.rs:117
Function
test_chain_config_from_name
()
src/config/mod.rs:847
Function
test_chain_config_to_external_chain_config
()
src/config/mod.rs:687
Function
test_chain_config_unknown_chain
()
src/config/mod.rs:926
Function
test_channel_timeout
()
src/derive/stages/channels.rs:375
Function
test_decode
()
src/derive/stages/span_batch.rs:475
Function
test_decode_tx
()
src/derive/stages/batcher_transactions.rs:166
Function
test_engine_api
()
src/engine/mod.rs:37
Function
test_engine_get_payload
()
src/engine/api.rs:265
Function
test_from_block_hash_to_execution_paylaod
()
src/engine/payload.rs:181
Function
test_get_batcher_transactions
()
src/l1/chain_watcher.rs:573
Function
test_get_head_info_empty_block
()
src/driver/info.rs:187
Function
test_get_head_info_fails
()
src/driver/info.rs:179
Function
test_get_head_info_valid_block
()
src/driver/info.rs:195
Function
test_head_info_from_l2_block_hash
()
src/driver/types.rs:220
Function
test_new_driver_from_finalized_head
()
src/driver/mod.rs:387
Function
test_push_multi_channel_frame
()
src/derive/stages/channels.rs:289
Function
test_push_single_channel_frame
()
src/derive/stages/channels.rs:269
Function
test_push_tx
()
src/derive/stages/batcher_transactions.rs:180
Function
test_read_external_chain_from_json
()
src/config/mod.rs:760
Function
test_ready_channel
()
src/derive/stages/channels.rs:324
Function
test_ready_channel_still_pending
()
src/derive/stages/channels.rs:355
Function
test_run_server
()
src/rpc/mod.rs:183
Method
try_from
(log: Log)
src/l1/config_updates.rs:20
Method
try_from
(value: &Block<Transaction>)
src/l1/l1_info.rs:42
Method
try_from
Convert an [Enr] to a Network Address.
src/network/service/types.rs:27
Method
try_from
Converts a slice of RLP encoded bytes to Op Stack Enr Data.
src/network/service/discovery.rs:97
Method
try_from
Converts a [Block] to an [ExecutionPayload]
src/engine/payload.rs:57
Method
try_from
Converts a [Block] to [BlockInfo]
src/common/mod.rs:63
Method
try_from
Converts the emitted L1 deposit event log into [UserDeposited]
src/derive/stages/attributes.rs:396
Method
try_from_bedrock
Bedrock Binary Format ```md +---------+--------------------------+ | Bytes | Field | +---------+--------------------------+ | 4
src/common/attributes_deposited.rs:68
Method
try_from_bedrock_block
Returns `HeadInfo` consisting of the L2 block, the L1 epoch block it belongs to, and the L2 block's position in the epoch. This function is used when
src/driver/types.rs:38
Method
try_from_ecotone
Ecotone Binary Format ```md +---------+--------------------------+ | Bytes | Field | +---------+--------------------------+ | 4
src/common/attributes_deposited.rs:140
Method
try_from_ecotone_block
Returns `HeadInfo` consisting of the L2 block, the L1 epoch block it belongs to, and the L2 block's position in the epoch. This function is used when
src/driver/types.rs:57
Method
try_from_l2_block
Returns the head info from the given L2 block and the system config. The config is used to check whether the block is subject to the Ecotone hardfork
src/driver/types.rs:25
Method
update_finalized
Updates the [EngineDriver] finalized head & epoch
src/driver/engine_driver.rs:70
Method
valid
Valid returns if the given claims are valid.
src/engine/auth.rs:105
Function
version
()
src/version/mod.rs:41
Method
version
Returns details about the Magi version of the node.
src/rpc/mod.rs:101
← previous
201–297 of 297, ranked by callers