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

expose Kademlia replication factor in node CLI #14374

Closed
wants to merge 11 commits into from

Conversation

klbrvik
Copy link
Contributor

@klbrvik klbrvik commented Jun 14, 2023

What does it do?

Exposes setting Kademlia replication factor through node's CLI.

Why?

Default Kademlia replication factor is 20. In environments (testing for example) with less than 20 nodes AuthorityDiscovery fails to publish DHT records containing node's Multiaddrs. So to make AuthorityDiscovery work in test environments it's useful to have option to manually adjust Kademlia replication factor.

@bkchr bkchr requested a review from a team June 14, 2023 09:26
Copy link
Contributor

@altonen altonen left a comment

Choose a reason for hiding this comment

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

Please fix CI and add documentation for the flag, otherwise looks good

@altonen altonen added A0-please_review Pull request needs code review. 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 B1-note_worthy Changes should be noted in the release notes T0-node This PR/Issue is related to the topic “node”. labels Jun 14, 2023
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable-int
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2991543

@klbrvik
Copy link
Contributor Author

klbrvik commented Jun 14, 2023

Any insight in why CI is failing on completely unrelated things? Was CI changed in the meantime and never ran on latest polkadot-v0.9.41?

@altonen
Copy link
Contributor

altonen commented Jun 14, 2023

Can you merge master and see if that fixes the issue?

@klbrvik
Copy link
Contributor Author

klbrvik commented Jun 14, 2023

Can you merge master and see if that fixes the issue?

Merge master into polkadot-v0.9.41?

This branch is 5 commits ahead, 396 commits behind master.

There's a lot of conflicts I'm not comfortable resolving currently. Also 1298 files changed.

I can go ahead and fix stuff that's failing in this PR although it's not related to my changes towards the end of the week. Do you have any other alternatives maybe?

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

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

👍 minus previous comments about docs

@altonen
Copy link
Contributor

altonen commented Jun 15, 2023

@klbrvik

the changes you introduced were quite trivial so I'd just take a diff and apply it on top of Substrate master and open a new pull request.

@klbrvik
Copy link
Contributor Author

klbrvik commented Jun 15, 2023

@altonen will do that, but interested in seeing these changes in polkadot-v0.9.41 branch also. Are they going to land in polkadot-* branches?

Also generally is there strategy for taking master changes and applying them in polkadot-* branches? Haven't seen it described in READMEs if I'm not missing anything. Any hints are appreciated.

@altonen
Copy link
Contributor

altonen commented Jun 15, 2023

They're most likely going to land in polkadot 0.9.44 but I don't think they'll be backported to another other release. If you need them in 0.9.41, you'd have to do it yourself. That would most likely mean maintaining your own version of 0.9.41 that would point to a Substrate branch where you would've cherry-picked Kademlia changes.

@klbrvik
Copy link
Contributor Author

klbrvik commented Jun 15, 2023

Thanks @altonen. I'll close this PR then and open new pointing to master.

@klbrvik klbrvik closed this Jun 15, 2023
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. B1-note_worthy Changes should be noted in the 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 T0-node This PR/Issue is related to the topic “node”.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants