-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Input validation
- Currently most of our Runtime APIs do not validate the incoming input and throws generic
Runtime: Unreachableerror. In most of the cases, when we receive the input, we decode it to the desired type and expect it to be encoded correctly. For instance, in/api/others.tsin functionsystem_accountNoncewe decode input toAccountIdlike this
const account = AccountId.fromU8Array(input).result.
which does not assume the case when input might be encoded incorrectly.
TO-DO
- Implement new function/tool that validates each input incoming to the runtime and returns corresponding error code and message.
Metadata
Metadata
Assignees
Labels
No labels