-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
660 additions
and
285 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
///! Copyright (c) 2022 MASSA LABS <[email protected]> | ||
//! Copyright (c) 2022 MASSA LABS <[email protected]> | ||
///! This file provides structures representing changes to the asynchronous message pool | ||
//! This file provides structures representing changes to the asynchronous message pool | ||
use std::ops::Bound::Included; | ||
|
||
use crate::{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
{ | ||
"P12UbyLJDS7zimGWf3LTHe8hYY67RdLke1iDRZqJbQQLHQSKPW8j": { | ||
"149.202.86.103:31244": "Tcp" | ||
"listeners": { | ||
"149.202.86.103:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
|
||
}, | ||
"P12vxrYTQzS5TRzxLfFNYxn6PyEsphKWkdqx2mVfEuvJ9sPF43uq": { | ||
"149.202.89.125:31244": "Tcp" | ||
"listeners": { | ||
"149.202.89.125:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P12rPDBmpnpnbECeAKDjbmeR19dYjAUwyLzsa8wmYJnkXLCNF28E": { | ||
"158.69.120.215:31244": "Tcp" | ||
"listeners": { | ||
"158.69.120.215:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P1XxexKa3XNzvmakNmPawqFrE9Z2NFhfq1AhvV1Qx4zXq5p1Bp9": { | ||
"158.69.23.120:31244": "Tcp" | ||
"listeners": { | ||
"158.69.23.120:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P1qxuqNnx9kyAMYxUfsYiv2gQd5viiBX126SzzexEdbbWd2vQKu": { | ||
"198.27.74.5:31244": "Tcp" | ||
"listeners": { | ||
"198.27.74.5:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P1hdgsVsd4zkNp8cF1rdqqG6JPRQasAmx12QgJaJHBHFU1fRHEH": { | ||
"198.27.74.52:31244": "Tcp" | ||
"listeners": { | ||
"198.27.74.52:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P1gEdBVEbRFbBxBtrjcTDDK9JPbJFDay27uiJRE3vmbFAFDKNh7": { | ||
"54.36.174.177:31244": "Tcp" | ||
"listeners": { | ||
"54.36.174.177:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
}, | ||
"P13Ykon8Zo73PTKMruLViMMtE2rEG646JQ4sCcee2DnopmVM3P5": { | ||
"51.75.60.228:31244": "Tcp" | ||
"listeners": { | ||
"51.75.60.228:31244": "Tcp" | ||
}, | ||
"category": "Bootstrap" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// Copyright (c) 2022 MASSA LABS <[email protected]> | ||
|
||
//! Build here the default node settings from the configuration file toml | ||
use std::path::PathBuf; | ||
use std::{collections::HashMap, path::PathBuf}; | ||
|
||
use massa_bootstrap::IpType; | ||
use massa_models::{config::build_massa_settings, node::NodeId}; | ||
use massa_protocol_exports::PeerCategoryInfo; | ||
use massa_time::MassaTime; | ||
use serde::Deserialize; | ||
use std::net::{IpAddr, SocketAddr}; | ||
|
@@ -124,6 +125,7 @@ pub struct Settings { | |
pub protocol: ProtocolSettings, | ||
pub consensus: ConsensusSettings, | ||
pub api: APISettings, | ||
pub network: NetworkSettings, | ||
pub bootstrap: BootstrapSettings, | ||
pub pool: PoolSettings, | ||
pub execution: ExecutionSettings, | ||
|
@@ -163,6 +165,13 @@ pub struct ConsensusSettings { | |
pub broadcast_filled_blocks_channel_capacity: usize, | ||
} | ||
|
||
// TODO: Remove one date. Kept for retro compatibility. | ||
#[derive(Debug, Deserialize, Clone)] | ||
pub struct NetworkSettings { | ||
/// Ip seen by others. If none the bind ip is used | ||
pub routable_ip: Option<IpAddr>, | ||
} | ||
|
||
/// Protocol Configuration, read from toml user configuration file | ||
#[derive(Debug, Deserialize, Clone)] | ||
pub struct ProtocolSettings { | ||
|
@@ -214,14 +223,18 @@ pub struct ProtocolSettings { | |
pub routable_ip: Option<IpAddr>, | ||
/// Time threshold to have a connection to a node | ||
pub connect_timeout: MassaTime, | ||
/// Max number of connection in | ||
pub max_incoming_connections: usize, | ||
/// Max number of connection out | ||
pub max_outgoing_connections: usize, | ||
/// Number of tester threads | ||
pub thread_tester_count: u8, | ||
/// Number of bytes we can read/write by seconds in a connection (must be a 10 multiple) | ||
pub read_write_limit_bytes_per_second: u64, | ||
/// try connection timer | ||
pub try_connection_timer: MassaTime, | ||
/// Timeout connection | ||
pub timeout_connection: MassaTime, | ||
/// Peers limits per category | ||
pub peers_categories: HashMap<String, PeerCategoryInfo>, | ||
/// Limits for default category | ||
pub default_category_info: PeerCategoryInfo, | ||
} | ||
|
||
/// gRPC settings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.