mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Update testnet configs, change on-disk format (#1799)
## Issue Addressed
- Related to #1691
## Proposed Changes
- Add `DEPOSIT_CHAIN_ID` and `DEPOSIT_NETWORK_ID` to `config.yaml`.
- Pass the `DEPOSIT_NETWORK_ID` to the `eth1::Service`.
- Remove the unused `MAX_EPOCHS_PER_CROSSLINK` from the `altona` and `medalla` configs (see [spec commit](2befe90032 (diff-efb845ac2ebd4aafbc23df40f47ce25699255064e99d36d0406d0a14ca7953ec))).
- Change from compressing the whole testnet directory, to only compressing the genesis state file. This is the only file we need to compress and *not* compressing the others makes them work nicely with git.
- We can modify the boot nodes, configs, etc. without incurring an eternal binary-blob cost on our git history.
- This change is backwards compatible (i.e., non-breaking).
## Additional Info
NA
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
//! https://github.com/sigp/lighthouse/pull/605
|
||||
//!
|
||||
use eth2_config::{
|
||||
include_altona_file, include_medalla_file, include_spadina_file, include_zinken_file, unique_id,
|
||||
include_altona_file, include_medalla_file, include_spadina_file, include_zinken_file,
|
||||
testnets_dir,
|
||||
};
|
||||
|
||||
use enr::{CombinedKey, Enr};
|
||||
@@ -26,7 +27,6 @@ pub const YAML_CONFIG_FILE: &str = "config.yaml";
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct HardcodedNet {
|
||||
pub unique_id: &'static str,
|
||||
pub name: &'static str,
|
||||
pub genesis_is_known: bool,
|
||||
pub yaml_config: &'static [u8],
|
||||
@@ -41,7 +41,6 @@ macro_rules! define_net {
|
||||
use eth2_config::$mod::ETH2_NET_DIR;
|
||||
|
||||
HardcodedNet {
|
||||
unique_id: ETH2_NET_DIR.unique_id,
|
||||
name: ETH2_NET_DIR.name,
|
||||
genesis_is_known: ETH2_NET_DIR.genesis_is_known,
|
||||
yaml_config: $include_file!("../", "config.yaml"),
|
||||
@@ -259,8 +258,14 @@ mod tests {
|
||||
#[test]
|
||||
fn hard_coded_nets_work() {
|
||||
for net in HARDCODED_NETS {
|
||||
let config = Eth2TestnetConfig::<E>::from_hardcoded_net(net).unwrap();
|
||||
assert_eq!(config.genesis_state.is_some(), net.genesis_is_known);
|
||||
let config =
|
||||
Eth2TestnetConfig::<E>::from_hardcoded_net(net).expect(&format!("{:?}", net.name));
|
||||
assert_eq!(
|
||||
config.genesis_state.is_some(),
|
||||
net.genesis_is_known,
|
||||
"{:?}",
|
||||
net.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user