Skip to content
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

Docs: "ZN without ZN" #1864

Open
kianenigma opened this issue Sep 9, 2024 · 1 comment
Open

Docs: "ZN without ZN" #1864

kianenigma opened this issue Sep 9, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@kianenigma
Copy link

What are exactly the tricks that ZN does under the hood? are these documented somewhere?

for example, I can't get a rococo local spec to run locally with

$ polkadot --chain rococo-local.json --tmp --bob --validator --unsafe-force-node-key-generation --insecure-validator-i-know-what-i-do
$ polkadot --tmp --chain rococo-local.json --validator --unsafe-force-node-key-generation --insecure-validator-i-know-what-i-do --alice --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWBtdHddFucYNhaY6rA8K5qFYhwjFqv8Ue9mxL3PHpBfwW

but it works with ZN, so I assume it is doing more magic under the hood.

As a user, I like the abstraction, but I also would like to know what is going on.

@pepoviola pepoviola self-assigned this Sep 9, 2024
@pepoviola pepoviola added the documentation Improvements or additions to documentation label Sep 9, 2024
@turuslan
Copy link

turuslan commented Dec 4, 2024

Hello.

--tmp creates new directory without $DATA/chains/$CHAIN/network/secret_ed25519 file.
--unsafe-force-node-key-generation generates new libp2p private key.
Peer id is public key which is derived from private key.
Peer id is passed to --bootnodes (or chainspec json) and checked.

Please check if peer id from Local node identity is matches one passed to --bootnodes.

Zombienet generates libp2p private key and passes it to --node-key.
This way peer id is predictable and doesn't change.
You can see --node-key and other flags in zombienet_data/alice.yaml.

zombienet spawn --dir zombienet_data --provider native network.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants