-
Notifications
You must be signed in to change notification settings - Fork 2.6k
More timely block import notifications #306
Conversation
substrate/telemetry/src/lib.rs
Outdated
@@ -58,7 +58,7 @@ pub fn init_telemetry(config: TelemetryConfig) -> slog_scope::GlobalLoggerGuard | |||
first_time: true, // ensures that on_connect will be called. | |||
} | |||
).fuse() | |||
).build().fuse(), o!() | |||
).chan_size(262144).overflow_strategy(slog_async::OverflowStrategy::DropAndReport).build().fuse(), o!() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this number mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
256kb of buffer length to store info in before dropping entries, I suppose, @pepyakin ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure. Can we leave a comment? Just a lil bit wary about magic numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a line wrapping requested.
substrate/client/src/client.rs
Outdated
@@ -335,6 +335,7 @@ impl<B, E, Block> Client<B, E, Block> where | |||
|
|||
let is_new_best = header.number() == &(self.backend.blockchain().info()?.best_number + One::one()); | |||
trace!("Imported {}, (#{}), best={}, origin={:?}", hash, header.number(), is_new_best, origin); | |||
telemetry!("block.import"; "height" => { let n: u64 = header.number().as_(); n }, "best" => ?hash, "is_new_best" => is_new_best, "origin" => ?origin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we please wrap this 158char line ;) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be called after import_lock
is released in import_block
.
Requesting voice in the Riot Technical channel: id: pomomoh |
substrate/client/src/client.rs
Outdated
@@ -300,6 +300,11 @@ impl<B, E, Block> Client<B, E, Block> where | |||
*self.importing_block.write() = Some(hash); | |||
let result = self.execute_and_import_block(origin, hash, header, justification, body); | |||
*self.importing_block.write() = None; | |||
telemetry!("block.import"; | |||
"height" => { let n: u64 = header.number().as_(); n }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't:
"height" => header.number().as_::<u64>(),
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no - as_
doesn't take a generic param: the trait does.
* done * bump spec * fix types
* Only accept these intentions with a related TrusteeEntity - Fixes paritytech#292 - also change MAX trustee intentions from 16 to 15 * Skip set_validators when the validator set stays the same Fixes paritytech#295 * Enforce these punished to be inactive on new session instead of new era Fixes paritytech#294 * Make items in the punish list unique - Fixes paritytech#307 - Also refactor a bit in genesis_config.rs - Return if the count of candidates less than minimal validator count on enforce_inactive. * Store trustee_count and minimum_trustee_count in Runtime - also tweak some parameters. * Add new event: EnforceValidatorsInactive * Rebuild wasm * Build wasm
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
macOS 12 signing fix
No description provided.