oasisprotocol / oasisprotocol/oasis-sdk
runtime-sdk: not-module-specific error type desired
Open
Nobody has claimed this yet.
c:runtime-sdk
enhancement
- Dominant language
- Rust
- Stars
- 90
- Forks
- 35
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 5
Description
imported from a discussion on slack:
- more and more formerly centralized services done in the dispatcher are now becoming module-controlled
- we used to have these processes use modules::core::Error as their error type
- when we expanded stuff out to modules, we kept that error type as is
- modules do whatever, and we ended up adding a bunch of wrappers in modules::core::Error to handle whatever other complaints come from modules
- to break out of this practice of making more and more wrappers in modules::core::Error, we'd need a more general error type
- RuntimeError (the module-code-message tuple from the oasis-core side) is general enough, but lacks the abort-ness information
- module::CallResult can retain abort-ness information, but it's coupled into a Result-like enum, and it's hardcoded to have a cbor::Value payload on the Ok branch
- I guess Box would be fine, but eh, extra allocations
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 by comparing the requirements for modules::core::Error, RuntimeError, and module::CallResult described in the issue. Determine how a general error type can retain abort information without a fixed cbor::Value payload or additional wrappers. Done means the runtime SDK has an agreed implementation direction that addresses these trade-offs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100