From 56926dcdf6ef3ccbf3da455b6da47f97c25f767a Mon Sep 17 00:00:00 2001 From: Matthias Wright Date: Tue, 17 Sep 2024 13:52:50 -0400 Subject: [PATCH] chore: add sgx shared pub key to genesis --- core/application/networks/localnet-example/genesis.toml | 1 + core/application/networks/testnet-stable/genesis.toml | 1 + core/application/src/config.rs | 1 + core/application/src/tests.rs | 2 ++ core/test-utils/src/e2e/genesis.rs | 2 ++ core/types/src/genesis.rs | 1 + 6 files changed, 8 insertions(+) diff --git a/core/application/networks/localnet-example/genesis.toml b/core/application/networks/localnet-example/genesis.toml index 1f48999b5..141639cdf 100644 --- a/core/application/networks/localnet-example/genesis.toml +++ b/core/application/networks/localnet-example/genesis.toml @@ -15,6 +15,7 @@ max_boost = 4 max_lock_time = 1460 # 1460 days(epoch) meaning 4 years supply_at_genesis = 1000000 # set to 1 million for testing, to be determined when initial allocations are set min_num_measurements = 2 +sgx_shared_pub_key = "03a3fe41244add26af1f820d2acb4ad22b158ff7b69ce41401bf932d7734eb5d49" protocol_fund_address = "0x2a8cf657769c264b0c7f88e3a716afdeaec1c318" governance_address = "0x2a8cf657769c264b0c7f88e3a716afdeaec1c318" diff --git a/core/application/networks/testnet-stable/genesis.toml b/core/application/networks/testnet-stable/genesis.toml index c5c2a1708..7ce7bb02a 100644 --- a/core/application/networks/testnet-stable/genesis.toml +++ b/core/application/networks/testnet-stable/genesis.toml @@ -15,6 +15,7 @@ max_boost = 4 max_lock_time = 1460 # 1460 days(epoch) meaning 4 years supply_at_genesis = 1000000 # set to 1 million for testing, to be determined when initial allocations are set min_num_measurements = 4 +sgx_shared_pub_key = "03a3fe41244add26af1f820d2acb4ad22b158ff7b69ce41401bf932d7734eb5d49" protocol_fund_address = "0x2a8cf657769c264b0c7f88e3a716afdeaec1c318" governance_address = "0x2a8cf657769c264b0c7f88e3a716afdeaec1c318" diff --git a/core/application/src/config.rs b/core/application/src/config.rs index 0ed670358..9878415cb 100644 --- a/core/application/src/config.rs +++ b/core/application/src/config.rs @@ -159,6 +159,7 @@ mod config_tests { genesis_path: None, ..Default::default() }; + println!("{:?}", config.genesis()); assert!(config.genesis().is_ok()); } diff --git a/core/application/src/tests.rs b/core/application/src/tests.rs index 3a33a1433..8398c2252 100644 --- a/core/application/src/tests.rs +++ b/core/application/src/tests.rs @@ -521,6 +521,8 @@ fn test_genesis() -> Genesis { // Set to 1 million for testing, to be determined when initial allocations are set supply_at_genesis: 1000000, min_num_measurements: 2, + sgx_shared_pub_key: "03a3fe41244add26af1f820d2acb4ad22b158ff7b69ce41401bf932d7734eb5d49" + .to_string(), protocol_fund_address: protocol_address, governance_address: protocol_address, node_info: genesis_nodes, diff --git a/core/test-utils/src/e2e/genesis.rs b/core/test-utils/src/e2e/genesis.rs index ae4a64b06..0ed8672fb 100644 --- a/core/test-utils/src/e2e/genesis.rs +++ b/core/test-utils/src/e2e/genesis.rs @@ -134,6 +134,8 @@ impl TestGenesisBuilder { max_lock_time: 1460, supply_at_genesis: 1000000, min_num_measurements: 2, + sgx_shared_pub_key: + "03a3fe41244add26af1f820d2acb4ad22b158ff7b69ce41401bf932d7734eb5d49".to_string(), protocol_fund_address: self.protocol_address, governance_address: self.protocol_address, node_info: self.nodes, diff --git a/core/types/src/genesis.rs b/core/types/src/genesis.rs index 6c2cc512e..0a12f726d 100644 --- a/core/types/src/genesis.rs +++ b/core/types/src/genesis.rs @@ -40,6 +40,7 @@ pub struct Genesis { pub max_boost: u16, pub max_lock_time: u64, pub min_num_measurements: u64, + pub sgx_shared_pub_key: String, pub node_info: Vec, pub service: Vec, pub account: Vec,