Struct massa_node::settings::ProtocolSettings
source · pub struct ProtocolSettings {Show 40 fields
pub ask_block_timeout: MassaTime,
pub max_blocks_kept_for_propagation: usize,
pub max_block_propagation_time: MassaTime,
pub block_propagation_tick: MassaTime,
pub max_known_blocks_size: usize,
pub max_node_known_blocks_size: usize,
pub max_node_wanted_blocks_size: usize,
pub max_known_ops_size: usize,
pub asked_operations_buffer_capacity: usize,
pub max_node_known_ops_size: usize,
pub max_known_endorsements_size: usize,
pub max_node_known_endorsements_size: usize,
pub max_simultaneous_ask_blocks_per_node: usize,
pub max_send_wait: MassaTime,
pub operation_batch_buffer_capacity: usize,
pub operation_announcement_buffer_capacity: usize,
pub operation_batch_proc_period: MassaTime,
pub operation_announcement_interval: MassaTime,
pub max_operations_per_message: u64,
pub max_ops_kept_for_propagation: usize,
pub max_operations_propagation_time: MassaTime,
pub max_endorsements_propagation_time: MassaTime,
pub initial_peers_file: PathBuf,
pub keypair_file: PathBuf,
pub bind: SocketAddr,
pub routable_ip: Option<IpAddr>,
pub connect_timeout: MassaTime,
pub thread_tester_count: u8,
pub read_write_limit_bytes_per_second: u64,
pub try_connection_timer: MassaTime,
pub try_connection_timer_same_peer: MassaTime,
pub unban_everyone_timer: MassaTime,
pub timeout_connection: MassaTime,
pub message_timeout: MassaTime,
pub tester_timeout: MassaTime,
pub max_in_connections: usize,
pub peers_categories: HashMap<String, PeerCategoryInfo>,
pub default_category_info: PeerCategoryInfo,
pub test_oldest_peer_cooldown: MassaTime,
pub rate_limit: u64,
}
Expand description
Protocol Configuration, read from toml user configuration file
Fields§
§ask_block_timeout: MassaTime
after ask_block_timeout
milliseconds we try to ask a block to another node
max_blocks_kept_for_propagation: usize
Max known blocks we keep during their propagation
max_block_propagation_time: MassaTime
Time during which a block is expected to propagate
block_propagation_tick: MassaTime
Block propagation tick interval, useful for propagating blocks quickly to newly connected peers.
max_known_blocks_size: usize
max known blocks our node keeps in its knowledge cache
max_node_known_blocks_size: usize
max cache size for which blocks a foreign node knows about
max_node_wanted_blocks_size: usize
max wanted blocks per node kept in memory
max_known_ops_size: usize
max known operations current node kept in memory
asked_operations_buffer_capacity: usize
size of the buffer of asked operations
max_node_known_ops_size: usize
max known operations of foreign nodes we keep in memory (by node)
max_known_endorsements_size: usize
max known endorsements by our node that we kept in memory
max_node_known_endorsements_size: usize
max known endorsements of foreign nodes we keep in memory (by node)
max_simultaneous_ask_blocks_per_node: usize
we ask for the same block max_simultaneous_ask_blocks_per_node
times at the same time
max_send_wait: MassaTime
Max wait time for sending a Network or Node event.
operation_batch_buffer_capacity: usize
Maximum number of batches in the memory buffer. Dismiss the new batches if overflow
operation_announcement_buffer_capacity: usize
Maximum number of operations in the announcement buffer. Immediately announce if overflow.
operation_batch_proc_period: MassaTime
Start processing batches in the buffer each operation_batch_proc_period
in millisecond
operation_announcement_interval: MassaTime
Interval at which operations are announced in batches.
max_operations_per_message: u64
Maximum of operations sent in one message.
max_ops_kept_for_propagation: usize
MAx number of operations kept for propagation
max_operations_propagation_time: MassaTime
Time threshold after which operation are not propagated
max_endorsements_propagation_time: MassaTime
Time threshold after which operation are not propagated
initial_peers_file: PathBuf
Path for initial peers
keypair_file: PathBuf
Keypair
bind: SocketAddr
Ip we are bind to listen to
routable_ip: Option<IpAddr>
Ip seen by others. If none the bind ip is used
connect_timeout: MassaTime
Time threshold to have a connection to a node
thread_tester_count: u8
Number of tester threads
read_write_limit_bytes_per_second: u64
Number of bytes we can read/write by seconds in a connection (must be a 10 multiple)
try_connection_timer: MassaTime
try connection timer
try_connection_timer_same_peer: MassaTime
try connection timer for the same peer
unban_everyone_timer: MassaTime
periodically unban every peer
timeout_connection: MassaTime
Timeout connection
message_timeout: MassaTime
Message timeout
tester_timeout: MassaTime
Timeout for the tester operations
max_in_connections: usize
Nb in connections
peers_categories: HashMap<String, PeerCategoryInfo>
Peers limits per category
default_category_info: PeerCategoryInfo
Limits for default category
test_oldest_peer_cooldown: MassaTime
Cooldown before testing again an old peer
rate_limit: u64
Rate limitation to apply to the data stream (per second)
Trait Implementations§
source§impl Clone for ProtocolSettings
impl Clone for ProtocolSettings
source§fn clone(&self) -> ProtocolSettings
fn clone(&self) -> ProtocolSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtocolSettings
impl Debug for ProtocolSettings
source§impl<'de> Deserialize<'de> for ProtocolSettings
impl<'de> Deserialize<'de> for ProtocolSettings
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ProtocolSettings
impl RefUnwindSafe for ProtocolSettings
impl Send for ProtocolSettings
impl Sync for ProtocolSettings
impl Unpin for ProtocolSettings
impl UnwindSafe for ProtocolSettings
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.