Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Consensus 2.0] propagate errors from Core to upstream #16355

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

akichidis
Copy link
Contributor

@akichidis akichidis commented Feb 23, 2024

Description

Propagates the errors from Core to upstream components (namely CoreThread) to handle. When the error is a Shutdown one then we close the core loop and exit, otherwise we panic as it is deemed a fatal one. Since we are doing this I've also propagated an error from the commit observer to follow a uniform approach.

Test Plan

CI


If your changes are not user-facing and do not break anything, you can skip the following section. Otherwise, please briefly describe what has changed under the Release Notes section.

Type of Change (Check all that apply)

  • protocol change
  • user-visible impact
  • breaking change for a client SDKs
  • breaking change for FNs (FN binary must upgrade)
  • breaking change for validators or node operators (must upgrade binaries)
  • breaking change for on-chain data layout
  • necessitate either a data wipe or data migration

Release notes

Copy link

vercel bot commented Feb 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-core ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 0:46am
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 0:46am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:46am
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:46am
mysten-ui ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:46am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2024 0:46am

Copy link
Contributor

@mwtian mwtian left a comment

Choose a reason for hiding this comment

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

Nice. I'm thinking of handling errors in the following ways:

  • Shutdown: propagate to core thread and shut it down.
  • Storage errors: ok to panic at lower level since usually there is no way to retry.
  • Client network errors: retry request.
  • Peer request validation errors: return error to peers.
  • Transaction submission failures: return error to Sui.

@akichidis
Copy link
Contributor Author

Nice. I'm thinking of handling errors in the following ways:

  • Shutdown: propagate to core thread and shut it down.
  • Storage errors: ok to panic at lower level since usually there is no way to retry.
  • Client network errors: retry request.
  • Peer request validation errors: return error to peers.
  • Transaction submission failures: return error to Sui.

Agreed with all the above.

Regarding this:
| Storage errors: ok to panic at lower level since usually there is no way to retry.
don't know if by lower level you mean the storage layer it's own, but if that's the case then yes we could make the Store API handle all the errors internally and panic - no reason to propagate those upstream.

@akichidis akichidis merged commit f4b1618 into main Feb 27, 2024
41 checks passed
@akichidis akichidis deleted the akichidis/mysticeti-15 branch February 27, 2024 13:34
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request May 30, 2024
)

## Description 

Propagates the errors from Core to upstream components (namely
CoreThread) to handle. When the error is a `Shutdown` one then we close
the core loop and exit, otherwise we panic as it is deemed a fatal one.
Since we are doing this I've also propagated an error from the commit
observer to follow a uniform approach.

## Test Plan 

CI

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
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.

2 participants