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

Substrate companion: Authority discovery multiple peer ids #4295

Merged
merged 8 commits into from
Nov 17, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Nov 15, 2021

Authority discovery before had a fixed mapping from PeerId to
AuthorityId. This wasn't correct, as a PeerId can actually map to
multiple AuthorityIds. The linked Substrate pr fixes this.

paritytech/substrate#10259

skip check-dependent-cumulus

Authority discovery before had a fixed mapping from `PeerId` to
`AuthorityId`. This wasn't correct, as a `PeerId` can actually map to
multiple `AuthorityId`s. The linked Substrate pr fixes this.

paritytech/substrate#10259
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Nov 15, 2021
@bkchr bkchr requested a review from ordian November 15, 2021 20:26
authorities.insert(authority, peer);
if let Some(authority_ids) = maybe_authority {
authority_ids.into_iter().for_each(|a| {
authorities.insert(a, peer);
Copy link
Member

@ordian ordian Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code here and the signature of authorities: &mut HashMap<AuthorityDiscoveryId, PeerId> still assumes one PeerId per AuthorityDiscoveryId. Should we also change it here and in gossip-support?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it's not critical here, only used for prioritizing propagation to our group (priority_peers).

@bkchr
Copy link
Member Author

bkchr commented Nov 17, 2021

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Merge cancelled due to error. Error: Checks failed for 91c21cb

@bkchr bkchr merged commit 7ea6595 into master Nov 17, 2021
@bkchr bkchr deleted the bkchr-authority-discovery-multiple-peer-ids branch November 17, 2021 10:35
ordian added a commit that referenced this pull request Nov 20, 2021
* master: (38 commits)
  Replicate Rob's PR (#4337)
  Companion for Taskmanager: Remove `clean_shutdown` (#4336)
  prefer code upgrades in inherent filtering (#4334)
  remove provisioner checks (#4254)
  Log para inherent inputs (#4331)
  Dispute spam protection (#4134)
  Dependabot: Ignore sub-tokens (#4328)
  export hrmp config (#4324)
  Add missing license header (#4321)
  Use non-empty validation code (#4322)
  fix pallet-xcm extrinsic doc comments (#4317)
  prepare worker: Catch unexpected unwinds (#4304)
  Enable BEEFY explicitly (#4320)
  Bump serde_json from 1.0.70 to 1.0.71 (#4316)
  Bump strum from 0.22.0 to 0.23.0 (#4308)
  Remove sort_unstable_by (#4314)
  Bump tokio from 1.13.0 to 1.14.0 (#4298)
  Substrate companion: Authority discovery multiple peer ids (#4295)
  Companion for substrate#9878 (#3949)
  move paras inherent filtering to runtime (#4028)
  ...
bkchr added a commit that referenced this pull request Nov 30, 2021
* Substrate companion: Authority discovery multiple peer ids

Authority discovery before had a fixed mapping from `PeerId` to
`AuthorityId`. This wasn't correct, as a `PeerId` can actually map to
multiple `AuthorityId`s. The linked Substrate pr fixes this.

paritytech/substrate#10259

* Update node/network/availability-distribution/src/requester/mod.rs

* Update node/network/collator-protocol/src/validator_side/mod.rs

* Update node/network/statement-distribution/src/tests.rs

* Update guide

* Adapt to Substrate pr

* Update Substrate
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants