Skip to content

Commit 533e4c0

Browse files
committed
Merge branch 'main' into sigp-audit-fixes
2 parents 02364f3 + e023016 commit 533e4c0

6 files changed

Lines changed: 213 additions & 199 deletions

File tree

config.example.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Some fields are optional and can be omitted, in which case the default value, if present, will be used.
33

44
# Chain spec ID. Supported values:
5-
# A network ID. Supported values: Mainnet, Holesky, Sepolia, Helder, Hoodi. Lower case values e.g. "mainnet" are also accepted
5+
# A network ID. Supported values: Mainnet, Holesky, Sepolia, Hoodi. Lower case values e.g. "mainnet" are also accepted
66
# A custom object, e.g., chain = { genesis_time_secs = 1695902400, path = "/path/to/spec.json" }, with a path to a chain spec file, either in .json format (e.g., as returned by the beacon endpoint /eth/v1/config/spec), or in .yml format (see examples in tests/data).
7-
# A custom object, e.g., chain = { genesis_time_secs = 1695902400, slot_time_secs = 12, genesis_fork_version = "0x01017000" }.
7+
# A custom object, e.g., chain = { genesis_time_secs = 1695902400, slot_time_secs = 12, genesis_fork_version = "0x01017000", chain_id = 17000 }.
88
chain = "Holesky"
99

1010
# Configuration for the PBS module

crates/common/src/config/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl CommitBoostConfig {
6868
let chain = match helper_config.chain {
6969
ChainLoader::Path { path, genesis_time_secs } => {
7070
// check if the file path is overridden by env var
71-
let (slot_time_secs, genesis_fork_version, fulu_fork_slot) =
71+
let (slot_time_secs, genesis_fork_version, fulu_fork_slot, chain_id) =
7272
if let Some(path) = load_optional_env_var(CHAIN_SPEC_ENV) {
7373
load_chain_from_file(path.parse()?)?
7474
} else {
@@ -79,6 +79,7 @@ impl CommitBoostConfig {
7979
slot_time_secs,
8080
genesis_fork_version,
8181
fulu_fork_slot,
82+
chain_id,
8283
}
8384
}
8485
ChainLoader::Known(known) => Chain::from(known),
@@ -87,13 +88,15 @@ impl CommitBoostConfig {
8788
slot_time_secs,
8889
genesis_fork_version,
8990
fulu_fork_slot,
91+
chain_id,
9092
} => {
9193
let genesis_fork_version: ForkVersion = genesis_fork_version.as_ref().try_into()?;
9294
Chain::Custom {
9395
genesis_time_secs,
9496
slot_time_secs,
9597
genesis_fork_version,
9698
fulu_fork_slot,
99+
chain_id,
97100
}
98101
}
99102
};

crates/common/src/signature.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ mod tests {
176176
assert_eq!(compute_domain(Chain::Mainnet, domain), Chain::Mainnet.builder_domain());
177177
assert_eq!(compute_domain(Chain::Holesky, domain), Chain::Holesky.builder_domain());
178178
assert_eq!(compute_domain(Chain::Sepolia, domain), Chain::Sepolia.builder_domain());
179-
assert_eq!(compute_domain(Chain::Helder, domain), Chain::Helder.builder_domain());
180179
assert_eq!(compute_domain(Chain::Hoodi, domain), Chain::Hoodi.builder_domain());
181180
}
182181
}

0 commit comments

Comments
 (0)