Skip to content

Commit

Permalink
enabled TIER1 peer discovery in all envs (#7759)
Browse files Browse the repository at this point in the history
Validators are already adding their public IPs to the configs (some correctly, some incorrectly) and this PR enables broadcasting this information to the network. It will allow us to monitor whether broadcasting works and check whether validators have correctly configured their public IPs. So far TIER1 peer discovery has been enabled in shardnet (while it still existed) and no regression has been observed.

The TIER1 connections are still not established, the relevant code will be merged in another PR (possibly protected with a separate feature flag, and this flag will be renamed accordingly).
  • Loading branch information
pompon0 authored Oct 4, 2022
1 parent 7dd2aee commit 43b5930
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

* Stabilize `account_id_in_function_call_permission` feature: enforcing validity
of account ids in function call permission.
* Enable TIER1 peer discovery. Validator nodes are now exchanging the [public addresses
set in config](https://github.com/near/nearcore/blob/301fb493ea4f6d9b75d7dac7f2b52d00a1b2b709/chain/network/src/config_json.rs#L162).
The TIER1 connections support (direct connections between validators) based on
this discovery mechanism will be added soon.

### Non-protocol Changes

Expand Down
9 changes: 2 additions & 7 deletions nearcore/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,8 @@ impl NearConfig {
network_key_pair.secret_key,
validator_signer.clone(),
config.archive,
match genesis.config.chain_id.as_ref() {
"mainnet" | "testnet" | "betanet" => {
near_network::config::Features { enable_tier1: false }
}
// shardnet and all test setups.
"shardnet" | _ => near_network::config::Features { enable_tier1: true },
},
// Enable tier1 (currently tier1 discovery only).
near_network::config::Features { enable_tier1: true },
)?,
telemetry_config: config.telemetry,
#[cfg(feature = "json_rpc")]
Expand Down

0 comments on commit 43b5930

Please sign in to comment.