turboflakes / crunch

Crunch is a command-line interface (CLI) and Matrix Bot to claim staking rewards every Era for Substrate-based chains
https://turboflakes.io
Apache License 2.0
64 stars 22 forks source link

Errors on paseo and kusama #42

Closed stakeworld closed 6 months ago

stakeworld commented 6 months ago

Hi,

After updating to the latest version of crunch (0.15.0) kusama doesn't accept the rpc schema and throws an error. Strangely polkadot seems to be working with the same url schema:

May 22 11:03:27 worker05 crunch[810467]: [2024-05-22T09:03:27Z INFO crunch::crunch] Connected to Kusama network using wss://ksm-rpc.stakeworld.io:443 * Substrate node Parity Polkadot v1.12.0-b4016902ac7 May 22 11:04:57 worker05 crunch[810467]: [2024-05-22T09:04:57Z ERROR crunch::crunch] RPC error: relative URL without a base

kusama env file: CRUNCH_SUBSTRATE_WS_URL=wss://ksm-rpc.stakeworld.io:443 polkadot env: CRUNCH_SUBSTRATE_WS_URL=wss://dot-rpc.stakeworld.io:443

[2024-05-22T14:29:28Z INFO crunch::crunch] Connected to Polkadot network using wss://dot-rpc.stakeworld.io:443 * Substrate node Parity Polkadot v1.12.0-b4016902ac7 [2024-05-22T14:29:28Z INFO crunch::runtimes::polkadot] Inspect and crunch unclaimed payout rewards [2024-05-22T14:29:29Z INFO crunch::runtimes::polkadot] 2 stashes loaded from 'config.stashes'

Also paseo seems to be crashing, I think already a little longer, related to activating async backing a while ago?

[2024-05-22T14:01:44Z INFO crunch::crunch] Connected to Paseo Testnet network using wss://pas-rpc.stakeworld.io:443 * Substrate node Parity Polkadot v1.12.0-b4016902ac7 thread 'async-std/runtime' panicked at src/crunch.rs:351:18: internal error: entered unreachable code note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.7.0/src/task.rs:452:45: task has failed

paulormart commented 6 months ago

Hi @stakeworld, both of these issues should be already fixed on the main branch.

The first issue occurred because CRUNCH_SUBSTRATE_PEOPLE_WS_URL was not defined, but should no longer be the case. You can opt-in if you want to use identity or not, if CRUNCH_SUBSTRATE_PEOPLE_WS_URL is not defined crunch will just skip fetching identities.

Paseo is also fixed. Ill issue a new release soon.