-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move bootstrap node into collator #727
base: develop
Are you sure you want to change the base?
Conversation
e22fdc2
to
858e03a
Compare
I am wondering. We already have a peerid which is derived from the provider's address. If I am not mistaken. That peerid is later used in deals etc. How is the p2p peer id used? I imagine those two peerid should be the same? |
Sooo. I was thinking about the retrieval. Currently the p2p network and polkadot parachain store different peer ids for the same provider. That means that our custom p2p network only knows how to map the p2p peer id to the multiaddress. The idea for "retrieval name resolver" was that we fetch the peer id for a specific deal from the chain. But that currently wouldn't work because the one stored on the chain is different from the one used by the custom p2p network. Please correct me if I am wrong. |
@cernicc The Peer ID on chain and the Peer ID in the P2P network are both derived from the same ED25519 private key. When the storage provider first registers on-chain they create an ED25519 private key, derive the Peer ID using the polka-storage-client and register themselves on-chain with this Peer ID. Basically the Peer ID on-chain is something that is generated externally and is the same that the storage provider uses to register within the P2P network |
9ba91a2
to
067fc01
Compare
067fc01
to
ffe5666
Compare
looks great. Should we update the documentation for p2p_key to specify that it is used both for on–chain registration and for the custom P2P network? This may reduce any confusion about why two different peer IDs aren’t generated Also I like the approach of making the p2p arguments optional except when running as an authority. Perhaps we could have clap enforce these conditionally (if possible) to give users immediate feedback rather than only at runtime? |
run-testnet: | ||
openssl genpkey -algorithm ED25519 -out /tmp/private.pem |
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.
nit: maybe we should prefix this /tmp/polka-storage/private.pem, to avoid potential conflicts with different software.
Description
Move the P2P bootstrap node from the polka-storage-provider-server into the collator. All the examples have been updated to reflect this change.
The zombienet setup has been updated to include the p2p key and the p2p listen address.