-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rpc] Simplify error response from execute_transaction_block of trans…
…action_execution_api (#12989) ## Description Overall simplify execution-side errors on `execute_transaction_block` RPC method by informing the caller how to resolve in the error message and reducing the data we put into the `data` field. 1. (modify) QuorumDriverError::InvalidUserSignature, ::ObjectsDoubleUsed, NonRecoverableTransactionError are now considered client errors 2. (new) ::TimeoutBeforeFinality, as a transient error -32000 4. (modify) For NonRecoverableTransactionError, populate 'data' field with vector of error strings. Previously, we dump Vec<(SuiError, StakeUnit, Vec<ConciseAuthorityPublicKeyBytes>)> which just becomes a huge object. Transient errors are filtered out, unless they are the only error in the data field, in which case we return a generic error string and ask the caller to just try again. 6. (new) For ObjectsDoubleUsed error response, populate the `data` field with a map of transaction -> vec(object_ref) 7. unit testing to verify conversion ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [x] 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 All transaction execution errors from execute_transaction_block of client-fault will now return a -32002 error code. If you encounter this error code, there is most likely something at fault in your transaction inputs. Previously, when executing a transaction fails on the rpc, you would receive a, "Transaction has non recoverable errors from at least 1/3 of validators" after failing to execute a transaction. You will now receive an improved error message, "Transaction execution failed due to issues with transaction inputs, please review the errors and try again: {errors}". {errors} is a string list of actionable errors. Upon remediation, you should be able to successfully retry your transaction. --------- Co-authored-by: Lu Zhang <8418040+longbowlu@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
334 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f786180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sui-typescript-docs – ./sdk/docs
sui-typescript-docs.vercel.app
sui-typescript-docs-git-main-mysten-labs.vercel.app
sui-typescript-docs-mysten-labs.vercel.app
f786180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 Validators 500/s Owned Transactions Benchmark Results
4 Validators 500/s Shared Transactions Benchmark Results
20 Validators 50/s Owned Transactions Benchmark Results
20 Validators 50/s Shared Transactions Benchmark Results
Narwhal Benchmark Results