Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

More timely block import notifications #306

Merged
merged 5 commits into from
Jul 13, 2018
Merged

More timely block import notifications #306

merged 5 commits into from
Jul 13, 2018

Conversation

gavofyork
Copy link
Member

No description provided.

@gavofyork gavofyork requested a review from tomusdrw July 12, 2018 14:04
@gavofyork gavofyork added the A0-please_review Pull request needs code review. label Jul 12, 2018
@gavofyork gavofyork requested a review from arkpar July 12, 2018 14:04
@@ -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!()
Copy link
Contributor

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?

Copy link
Contributor

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 ?

Copy link
Contributor

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.

Copy link
Contributor

@gnunicorn gnunicorn left a 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.

@@ -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);
Copy link
Contributor

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 ;) ?

Copy link
Member

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.

@arkpar arkpar added A5-grumble and removed A0-please_review Pull request needs code review. labels Jul 12, 2018
@gavofyork gavofyork added A0-please_review Pull request needs code review. and removed A5-grumble labels Jul 12, 2018
@pomomoh
Copy link

pomomoh commented Jul 13, 2018

Requesting voice in the Riot Technical channel: id: pomomoh

@@ -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 },
Copy link
Contributor

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?

Copy link
Member Author

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.

@gavofyork gavofyork added A8-looksgood and removed A0-please_review Pull request needs code review. labels Jul 13, 2018
@gavofyork gavofyork merged commit 42550d0 into master Jul 13, 2018
@gavofyork gavofyork deleted the gav-timely-notes branch July 13, 2018 10:13
lamafab pushed a commit to lamafab/substrate that referenced this pull request Jun 16, 2020
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this pull request Apr 21, 2021
* done

* bump spec

* fix types
liuchengxu added a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* 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
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants