Skip to content

Conversation

clostao
Copy link
Member

@clostao clostao commented Aug 11, 2025

Description

Solves #3671 by making the thread in which the subspace-gateway's PieceValidator lives panic when the jsonrpsee call returns the jsonrpsee::core::client::Error::RestartNeeded error.

Why this solution?

I implemented the check in SegmentCommitmentPieceValidator since it would have required to update the interface of PieceValidator to implement it in an upper layer and this component is used uniquely by the gateway where this logic applies.

Tests

I've tested on taurus staging files gateway being able to replicate the error and correctly checked that the error is managed correctly.

image

Close #3671

Code contributor checklist:

@clostao clostao requested a review from teor2345 August 11, 2025 17:41
Copy link

🛡️ Immunefi PR Reviews

We noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

Copy link
Member

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

This works because our processes exit on panic, even if it's not in the main task or thread:

set_exit_on_panic();

(Our runtimes unwind on WASM panics, because that's a substrate requirement to return an error to the node.)

@teor2345 teor2345 added this pull request to the merge queue Aug 11, 2025
Merged via the queue into main with commit 2c46baa Aug 11, 2025
13 checks passed
@teor2345 teor2345 deleted the panic-restart-needed branch August 11, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make gateway reconnect or exit on RPC failure
2 participants