-
Notifications
You must be signed in to change notification settings - Fork 767
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
Error: NetworkKeyNotFound #5211
Comments
ok found this polkadot-sdk/substrate/client/cli/src/error.rs Lines 84 to 93 in 6daa939
it should log those messages it also runs fine when there is a session key present, which doesn't make a lot of sense. it should always log the warning when there isn't a network key? |
It means that your node was missing the network key which is meant to be generated once and persisted across restarts, this was introduced for polkadot authorities to prevent accidental change of it, but we concurred here #4957 that is desirable for any type of authorities as well. It is weird |
Fix for this: #5214 |
The errors on polkadot-parachain are not printed with their full display context(what is marked with `#[error(`) because main returns plain Result and the error will be shown in its Debug format, that's not consistent with how the polkadot binary behave and is not user friendly since it does not tell them why they got the error. Fix it by using `color_eyre` as polkadot already does it. Fixes: #5211 ## Output before ``` Error: NetworkKeyNotFound("/acala/data/Collator2/chains/mandala-tc9/network/secret_ed25519") ``` ## Output after ``` Error: 0: Starting an authorithy without network key in /home/alexggh/.local/share/polkadot-parachain/chains/asset-hub-kusama/network/secret_ed25519. This is not a safe operation because other authorities in the network may depend on your node having a stable identity. Otherwise these other authorities may not being able to reach you. If it is the first time running your node you could use one of the following methods: 1. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --base-path <YOUR_BASE_PATH> 2. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --file <YOUR_PATH_TO_NODE_KEY> 3. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --default-base-path 4. [Unsafe] Pass --unsafe-force-node-key-generation and make sure you remove it for subsequent node restarts ``` --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
The errors on polkadot-parachain are not printed with their full display context(what is marked with `#[error(`) because main returns plain Result and the error will be shown in its Debug format, that's not consistent with how the polkadot binary behave and is not user friendly since it does not tell them why they got the error. Fix it by using `color_eyre` as polkadot already does it. Fixes: paritytech#5211 ## Output before ``` Error: NetworkKeyNotFound("/acala/data/Collator2/chains/mandala-tc9/network/secret_ed25519") ``` ## Output after ``` Error: 0: Starting an authorithy without network key in /home/alexggh/.local/share/polkadot-parachain/chains/asset-hub-kusama/network/secret_ed25519. This is not a safe operation because other authorities in the network may depend on your node having a stable identity. Otherwise these other authorities may not being able to reach you. If it is the first time running your node you could use one of the following methods: 1. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --base-path <YOUR_BASE_PATH> 2. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --file <YOUR_PATH_TO_NODE_KEY> 3. [Preferred] Separately generate the key with: <NODE_BINARY> key generate-node-key --default-base-path 4. [Unsafe] Pass --unsafe-force-node-key-generation and make sure you remove it for subsequent node restarts ``` --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
I encountered the same error, and tried the suggestions in the PR #5214 :
We are on |
@ozgunozerk Can you copy paste the commandline your are using for generating the keys and starting the node ? |
@alexggh thanks a lot for the fast response! This one for the
-> And this one for the
-> I also tried running the node executable by only providing
-> |
Left you an example with a command that should unblock you. Long story short you are starting with your command two things a parachain collator and stuff to connect to the relay-chain what comes after |
using
parity/polkadot-parachain:1.15.0
I was trying to purge the node and I simply deleted
/acala/data/Collator2/chains/mandala-tc9
but now getting this error.Looks like it errored when no collator key found but it shouldn't be a fatal issue?
The text was updated successfully, but these errors were encountered: