substrate-debug-kit icon indicating copy to clipboard operation
substrate-debug-kit copied to clipboard

offline-election block in get_candidates and then loop print ws closed error

Open yrong opened this issue 4 years ago • 3 comments

run this command

run --package offline-election --bin offline-election -- --uri wss://cc1.darwinia.network --network darwinia staking

and blocked here for 10 secs and then loop print error as following

[2020-12-03T08:53:48Z ERROR] Client Error: Inner(Ws(Closed))
[2020-12-03T08:53:48Z ERROR] Client Error: Inner(Ws(Closed))
....

yrong avatar Dec 03 '20 08:12 yrong

notice issue and seems similar

@AurevoirXavier @HackFisher

will this hack work?

https://github.com/darwinia-network/bridger/commit/d70d76ce5f26fd0d7baaa6f06ff3f5163556f0ed

yrong avatar Dec 03 '20 09:12 yrong

Yes, works. But that hack kind dirty & ugly.

aurexav avatar Dec 03 '20 09:12 aurexav

@AurevoirXavier notice that this lib use state_getPairs to get all validators https://github.com/paritytech/substrate-debug-kit/blob/22f804bbdbaa3c7068baf33e950bbcf0e04f3d90/offline-election/src/subcommands/staking.rs#L37 and take too long to timeout, will it better to use state_getKeysPaged instead?

yrong avatar Dec 03 '20 14:12 yrong