Skip to content
Open
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
36 changes: 36 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ publish = false
resolver = "3"
members = [
"crates/chainspec",
"crates/consensus",
"crates/evm",
"crates/payload/builder",
"crates/payload/types",
Expand Down Expand Up @@ -37,6 +38,7 @@ all = "warn"

[workspace.dependencies]
morph-chainspec = { path = "crates/chainspec", default-features = false }
morph-consensus = { path = "crates/consensus", default-features = false }
morph-evm = { path = "crates/evm", default-features = false }
morph-payload-builder = { path = "crates/payload/builder", default-features = false }
morph-payload-types = { path = "crates/payload/types", default-features = false }
Expand Down Expand Up @@ -90,6 +92,7 @@ reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", rev = "64
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "64909d3" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "64909d3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "64909d3" }
reth-zstd-compressors = { git = "https://github.com/paradigmxyz/reth", rev = "64909d3", default-features = false }

reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "64909d3", features = [
"std",
Expand All @@ -115,7 +118,7 @@ alloy-signer = "1.1.3"
alloy-signer-local = "1.1.3"
alloy-sol-types = "1.4.1"
alloy-transport = "1.1.3"

alloy-chains = { version = "0.2.5", default-features = false }
arbitrary = { version = "1.3", features = ["derive"] }
async-lock = "3.4.1"
async-trait = "0.1"
Expand Down
3 changes: 3 additions & 0 deletions crates/chainspec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ reth-cli = { workspace = true, optional = true }
reth-chainspec.workspace = true
reth-network-peers.workspace = true

alloy-chains.workspace = true
alloy-consensus.workspace = true
alloy-evm.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-eips.workspace = true
alloy-hardforks.workspace = true
alloy-serde.workspace = true

auto_impl.workspace = true
eyre = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
Expand Down
38 changes: 38 additions & 0 deletions crates/chainspec/res/genesis/hoodi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"config": {
"chainId": 2910,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"mergeNetsplitBlock": 0,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"shanghaiTime": 0,
"cancunTime": 0,
"bernoulliTime": 0,
"curieTime": 0,
"morph203Time": 0,
"viridianTime": 0,
"emeraldTime": 0,
"morph": {
"feeVaultAddress": "0x29107CB79Ef8f69fE1587F77e283d47E84c5202f",
"maxTxPayloadBytesPerBlock": 122880
}
},
"nonce": "0x0",
"timestamp": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {}
}

38 changes: 38 additions & 0 deletions crates/chainspec/res/genesis/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"config": {
"chainId": 2818,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"mergeNetsplitBlock": 0,
"terminalTotalDifficulty": 0,
"terminalTotalDifficultyPassed": true,
"shanghaiTime": 0,
"cancunTime": 0,
"bernoulliTime": 0,
"curieTime": 0,
"morph203Time": 0,
"viridianTime": 0,
"emeraldTime": 0,
"morph": {
"feeVaultAddress": "0x530000000000000000000000000000000000000a",
"maxTxPayloadBytesPerBlock": 122880
}
},
"nonce": "0x0",
"timestamp": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {}
}

27 changes: 27 additions & 0 deletions crates/chainspec/src/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//! Morph chainspec constants.
use alloy_primitives::{Address, address};

/// The transaction fee recipient on the L2.
pub const MORPH_FEE_VAULT_ADDRESS_HOODI: Address =
address!("29107CB79Ef8f69fE1587F77e283d47E84c5202f");

/// The transaction fee recipient on the L2.
pub const MORPH_FEE_VAULT_ADDRESS_MAINNET: Address =
address!("530000000000000000000000000000000000000a");

/// The maximum size in bytes of the tx payload for a block.
pub const MORPH_MAX_TX_PAYLOAD_BYTES_PER_BLOCK: usize = 120 * 1024;

/// The Morph Mainnet chain ID.
pub const MORPH_MAINNET_CHAIN_ID: u64 = 2818;

/// The Morph Hoodi (testnet) chain ID.
pub const MORPH_HOODI_CHAIN_ID: u64 = 2910;

/// The default L2 sequencer fee (0.001 Gwei = 1_000_000 wei).
/// The sequencer has the right to set any base fee below `MORPH_MAX_BASE_FEE`.
pub const MORPH_BASE_FEE: u64 = 1_000_000;

/// The maximum allowed L2 base fee (10 Gwei = 10_000_000_000 wei).
pub const MORPH_MAX_BASE_FEE: u64 = 10_000_000_000;
Loading