Light Client: subxt API will do nothing after smoldot thread panic.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 489
- Forks
- 293
- Avg merge
- 18h 35m
- Merged PRs (30d)
- 3
Description
Here is the example:
let mut sub = edge
.api()
.await
.blocks()
.subscribe_finalized()
.await
.unwrap();
while let Ok(block) = sub.next().await.unwrap() {
}
After several blocks had been subscribed, smoldot thread reported an error:
thread 'smoldot-light-2' panicked at /home/gitlab-workspaces/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smoldot-light-0.14.0/src/runtime_service.rs:472:34: called `Result::unwrap()` on an `Err` value: ()
But let Ok(block) = sub.next().await.unwrap() will keep blocking there without panic, so there is no way to handle this kind of underlying error and causing the program stuck forever.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the light-client subscription example in the issue and trace how the smoldot thread failure reaches sub.next(). Determine where the underlying error is lost and how the subscription signals termination. Done means a smoldot failure no longer leaves the subscription blocked forever and can be handled by the caller.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100