paritytech / substrate-debug-kit

A collection of debug tools, scripts and libraries on top of substrate.
GNU General Public License v3.0
95 stars 36 forks source link

offline-election deny access wss uri #31

Closed tylerztl closed 3 years ago

tylerztl commented 3 years ago

run the command:

cargo run --package offline-election --bin offline-election -- --uri wss://kusama-rpc.polkadot.io/ -vv staking --count 50 --reduce

output

Running `target/debug/offline-election --uri 'wss://kusama-rpc.polkadot.io/' -vv staking --count 50 --reduce`
thread 'main' panicked at 'Storage state_getPairs failed: Request(Error { code: InternalError, message: "Unknown error occurred", data: Some(String("UnsafeRpcCalled(UnsafeRpcError)")) })', /Users/zhangtailin/Workspace/paritytech/substrate-debug-kit/sub-storage/src/lib.rs:123:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
kianenigma commented 3 years ago

You need a node with unsafe RPCs exposed, sadly no (sane) public nodes do this.