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

Light client errors: node-template --light #9352

Closed
nuke-web3 opened this issue Jul 14, 2021 · 7 comments
Closed

Light client errors: node-template --light #9352

nuke-web3 opened this issue Jul 14, 2021 · 7 comments

Comments

@nuke-web3
Copy link
Contributor

The substrate binary works as expected with --dev --light but the node template gives the error:

Error: Service(Client(Backend("Unexpected database type. Expected: light")))

Also reported that a local chainspec used with the node template doesn't work as expected:

Currently I've got a chain spec generated using node-template build-spec --chain validator_spec.json --disable-default-bootnode > entry_spec.json that i generated from the validators, which runs fine on the validators.. but when I try to use it to run a light client to connect to the entrypoint nodes I get an error

Verification failed.... "Could not fetch authorities at ....: InvalidAuthoritiesSet

Note they are using the https://github.com/substrate-developer-hub/substrate-node-template, not the included one directly here, and if any changes resolve these issues here, the devhub team will pull those into this repo on the next release.

@hirschenberger
Copy link
Contributor

I can't reproduce it, works with both templates.

But I have an Idea what the problem is, you may have a full-node db from an old run in the database directory. Light and full clients share a common dir but are not compatible. Just purge the chain with purge-chain --dev or delete the db-dir.

There's an issue #6880 and I also have a PR, which unfortunately nobody reviewed yet :-( #8658 that stores the database in a role-specific subdirectory.

@shibshib
Copy link

shibshib commented Nov 7, 2021

@hirschenberger sorry just checked in on this issue again. We abandoned using light clients at the time and now we're trying again. I've tried deleting the db but i still get a bunch of verification errors when it tries to talk to my bootnodes.

@shibshib
Copy link

shibshib commented Nov 7, 2021

We got past the point of "unexpected database type". Now our errors are purely as follows:

2021-11-07 03:02:31.349  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWDWw2Ph2JLHFxNUAhLpgGf2HAE2BHjXkoaj7HS9HapKnc, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"
2021-11-07 03:02:31.357  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWLBsaS4uf6eEXeAFZAjQt3hqtf6aMs5ssqNTqnL94CGhS, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"
2021-11-07 03:02:31.357  WARN tokio-runtime-worker sync: 💔 Error importing block 0xa9aac66538572a5d9a27c24c0d496859d6a1eee3e00639a35c68b54c082e16fd: Err(UnknownParent)
2021-11-07 03:02:31.370  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWASPUokJTdXKKYvBhkcX4JxNVfaN9WUqZuoL33NJQEu7A, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"
2021-11-07 03:02:31.465  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWJimaLxH7xo9f3duzDCy9uJnJw9vyf51ydnGtJDYSGyWJ, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"
2021-11-07 03:02:31.475  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWHcFQXU36b7hfV29EC59roDHr53mkaekz1hJp65MVgjpU, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"
2021-11-07 03:02:31.476  WARN tokio-runtime-worker sync: 💔 Error importing block 0xa9aac66538572a5d9a27c24c0d496859d6a1eee3e00639a35c68b54c082e16fd: Err(UnknownParent)
2021-11-07 03:02:31.594  WARN tokio-runtime-worker sync: 💔 Verification failed for block 0xc13b443bcd2e730d4c53f19bc0bed6a99dbdbfaed4906466f3659929c449966e received from peer: 12D3KooWJksrNL9dzBWqw8od4ZAUUjd5khfUZWpPF4sAKdBhAppB, "Could not fetch authorities at 0x882d79eb05d3665b7717089d87f94d3d9a51eba60fcad2407217b05e733edf0c: InvalidAuthoritiesSet"

Our client is based off of the substrate-template-node and we are using this command to run it:

subtensor/target/release/node-subtensor --chain subtensor/specs/nakamotoSpecRaw.json --rpc-external --ws-external --rpc-cors all --rpc-methods=Unsafe --no-mdns -lbdebug=trace --light

@hirschenberger
Copy link
Contributor

@shibshib Sorry, I think I can't help yo here. Your issue seems unrelated to the OP's issue.
Maybe open your own or ask in the Matrix chats to get help.

@bkchr
Copy link
Member

bkchr commented Nov 7, 2021

Light client support was recently removed anyway from Substrate for the moment. So, I will going to close this issue.

We still support the networking protocol and will also bring native support in Substrate at some point.

@bkchr bkchr closed this as completed Nov 7, 2021
@shibshib
Copy link

shibshib commented Nov 8, 2021

Thanks @bkchr @hirschenberger , in this case do you have any recommendation for running a light client on Substrate?

@bkchr
Copy link
Member

bkchr commented Nov 8, 2021

@shibshib if you are using Polkadot. You can use smoldot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants