Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions book/src/building/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ the `alloy-consensus` types should be used instead.

## Block

[`op-alloy-consensus`][consensus] exports an Optimism block type, [`OpBlock`][block].
[`op-alloy-consensus`][consensus] exports an Optimism block type, [`OpBlock`][op-block].

This type simply re-uses the `alloy-consensus` block type, with `OpTxEnvelope`
as the type of transactions in the block.
Expand Down Expand Up @@ -81,19 +81,4 @@ are the following.
- [`Hardforks::fjord_txs()`][fjord]


<!-- Links -->

[deposit]: https://specs.optimism.io/protocol/deposits.html
[alloy]: https://github.com/alloy-rs/alloy
[fjord]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html#method.fjord_txs
[ecotone]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html#method.ecotone_txs
[hardforks]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html
[odr]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/struct.OpDepositReceipt.html
[ore]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpReceiptEnvelope.html
[block]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/type.OpBlock.html
[ty]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxType.html
[specs]: https://specs.optimism.io/protocol/deposits.html
[tx-envelope]: https://docs.rs/alloy-consensus/latest/alloy_consensus/transaction/enum.TxEnvelope.html
[envelope]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxEnvelope.html
[2718]: https://eips.ethereum.org/EIPS/eip-2718
[consensus]: https://crates.io/crates/op-alloy-consensus
{{#include ../links.md}}
4 changes: 2 additions & 2 deletions book/src/building/genesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The genesis crate contains types related to chain genesis.

This section contains in-depth sections on building with [`op-alloy-genesis`][op-alloy-genesis] crate types.
This section contains in-depth sections on building with [`op-alloy-genesis`][genesis] crate types.

- [The Rollup Config](./rollup-config.md)
- [The System Config](./system-config.md)

<!-- Links -->

[op-alloy-genesis]: https://crates.io/crates/op-alloy-genesis
{{#include ../../links.md}}
9 changes: 4 additions & 5 deletions book/src/building/genesis/rollup-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Rollup configurations are a consensus construct used to configure an Optimism Consensus client.
When an OP Stack chain is deployed into production or consensus nodes are configured to sync the chain,
certain consensus parameters can be configured. These parameters are defined in the [OP Stack specs][config].
certain consensus parameters can be configured. These parameters are defined in the
[OP Stack specs][spec-configurability].

Consensus parameters are consumed by OP Stack software through the `RollupConfig` type defined in the
[`op-alloy-genesis`][genesis] crate.
Expand Down Expand Up @@ -30,9 +31,7 @@ the following.
- `BASE_MAINNET_CONFIG`
- `BASE_SEPOLIA_CONFIG`


<!-- Links -->

[rcid]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/fn.rollup_config_from_chain_id.html
[rc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/struct.RollupConfig.html
[genesis]: https://crates.io/crates/op-alloy-genesis
[config]: https://specs.optimism.io/protocol/configurability.html
{{#include ../../links.md}}
36 changes: 17 additions & 19 deletions book/src/building/genesis/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,27 @@ The system configuration is a set of configurable chain parameters
defined in a contract on L1. These parameters can be changed through
the system config contract, emitting events that are picked up by
the [rollup node derivation process][derivation]. To dive deeper
into the System Config, visit the [OP Stack Specifications][specs].
into the System Config, visit the
[OP Stack Specifications][system-config-specs].

## `SystemConfig` Type

The [`SystemConfig`][sc] type is defined in [`op-alloy-genesis`][genesis].
The [`SystemConfig`][system-config] type is defined in
[`op-alloy-genesis`][genesis].

Parameters defined in the [`SystemConfig`][sc] are expected to be updated
through L1 receipts, using the [`update_with_receipts`][update] method.
Parameters defined in the [`SystemConfig`][system-config] are expected to be
updated through L1 receipts, using the [`update_with_receipts`][update] method.

## Holocene Updates

The [Holocene Hardfork][holocene] introduced an update to the [`SystemConfig`][sc]
type, adding EIP-1559 parameters to the config.

The [`SystemConfig`][sc] type in [`op-alloy-genesis`][genesis] provides a method
called [`eip_1559_params`][eip] that returns the EIP-1559 parameters encoded as
a [`B64`][b64].

[holocene]: https://specs.optimism.io/protocol/holocene/overview.html
[b64]: https://docs.rs/alloy-primitives/latest/alloy_primitives/aliases/type.B64.html
[eip]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.eip_1559_params
[update]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.update_with_receipts
[sc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html
[specs]: https://specs.optimism.io/protocol/system-config.html#system-config
[derivation]: https://specs.optimism.io/protocol/derivation.html
[genesis]: https://crates.io/crates/op-alloy-genesis
The [Holocene Hardfork][holocene] introduced an update to the
[`SystemConfig`][system-config] type, adding EIP-1559 parameters to the config.

The [`SystemConfig`][system-config] type in [`op-alloy-genesis`][genesis] provides
a method called [`eip_1559_params`][eip] that returns the EIP-1559 parameters
encoded as a [`B64`][b64].


<!-- Links -->

{{#include ../../links.md}}
9 changes: 4 additions & 5 deletions book/src/building/rollup-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Rollup configurations are a consensus construct used to configure an Optimism Consensus client.
When an OP Stack chain is deployed into production or consensus nodes are configured to sync the chain,
certain consensus parameters can be configured. These parameters are defined in the [OP Stack specs][config].
certain consensus parameters can be configured. These parameters are defined in the
[OP Stack specs][spec-configurability].

Consensus parameters are consumed by OP Stack software through the `RollupConfig` type defined in the
[`op-alloy-genesis`][genesis] crate.
Expand Down Expand Up @@ -30,9 +31,7 @@ the following.
- `BASE_MAINNET_CONFIG`
- `BASE_SEPOLIA_CONFIG`


<!-- Links -->

[rcid]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/fn.rollup_config_from_chain_id.html
[rc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/struct.RollupConfig.html
[genesis]: https://crates.io/crates/op-alloy-genesis
[config]: https://specs.optimism.io/protocol/configurability.html
{{#include ../links.md}}
52 changes: 45 additions & 7 deletions book/src/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,63 @@
[op-alloy-rpc-types-engine]: https://crates.io/crates/op-alloy-rpc-types-engine
[op-alloy-rpc-types]: https://crates.io/crates/op-alloy-rpc-types

<!-- External -->
<!-- op-alloy-genesis -->

[op-stack]: https://github.com/ethereum-optimism/optimism
[op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon
[cannon-rs]: https://github.com/anton-rs/cannon-rs
[asterisc]: https://github.com/ethereum-optimism/asterisc
[genesis]: https://crates.io/crates/op-alloy-genesis
[rc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/struct.RollupConfig.html
[rcid]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/fn.rollup_config_from_chain_id.html
[eip]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.eip_1559_params
[update]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.update_with_receipts
[system-config]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html


<!-- op-alloy-consensus -->

[consensus]: https://crates.io/crates/op-alloy-consensus
[odr]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/struct.OpDepositReceipt.html
[ore]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpReceiptEnvelope.html
[op-block]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/type.OpBlock.html
[ty]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxType.html
[envelope]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxEnvelope.html

<!-- Hardforks -->

[holocene]: https://specs.optimism.io/protocol/holocene/overview.html
[hardforks]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html
[fjord]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html#method.fjord_txs
[ecotone]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html#method.ecotone_txs

<!-- OP Stack Specs -->

[specs]: https://specs.optimism.io/protocol/deposits.html
[deposit]: https://specs.optimism.io/protocol/deposits.html
[derivation]: https://specs.optimism.io/protocol/derivation.html
[fp-specs]: https://specs.optimism.io/experimental/fault-proof/index.html
[spec-configurability]: https://specs.optimism.io/protocol/configurability.html
[system-config-specs]: https://specs.optimism.io/protocol/system-config.html#system-config
[fpp-specs]: https://specs.optimism.io/experimental/fault-proof/index.html#fault-proof-program
[preimage-specs]: https://specs.optimism.io/experimental/fault-proof/index.html#pre-image-oracle
[cannon-specs]: https://specs.optimism.io/experimental/fault-proof/cannon-fault-proof-vm.html#cannon-fault-proof-virtual-machine
[l2-output-root]: https://specs.optimism.io/protocol/proposals.html#l2-output-commitment-construction
[op-succinct]: https://github.com/succinctlabs/op-succinct


<!-- External -->

[revm]: https://github.com/bluealloy/revm
[2718]: https://eips.ethereum.org/EIPS/eip-2718
[cannon-rs]: https://github.com/anton-rs/cannon-rs
[asterisc]: https://github.com/ethereum-optimism/asterisc
[op-stack]: https://github.com/ethereum-optimism/optimism
[op-succinct]: https://github.com/succinctlabs/op-succinct
[op-program]: https://github.com/ethereum-optimism/optimism/tree/develop/op-program
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon

<!-- Alloy -->

[alloy]: https://github.com/alloy-rs/alloy
[op-alloy]: https://github.com/alloy-rs/op-alloy
[b64]: https://docs.rs/alloy-primitives/latest/alloy_primitives/aliases/type.B64.html
[tx-envelope]: https://docs.rs/alloy-consensus/latest/alloy_consensus/transaction/enum.TxEnvelope.html

<!-- Kona links -->

Expand Down