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

Handle ExecutionResult and ValidationResult separately in Wasm executor #1887

Closed
MitchTurner opened this issue May 8, 2024 · 0 comments · Fixed by #2199
Closed

Handle ExecutionResult and ValidationResult separately in Wasm executor #1887

MitchTurner opened this issue May 8, 2024 · 0 comments · Fixed by #2199
Assignees

Comments

@MitchTurner
Copy link
Member

MitchTurner commented May 8, 2024

Because of the way we are doing serialization, we are returning an ExecutionResult from "validate" on the wasm executor. We should be able to handle more cases.

See convo:
#1886 (comment)

Include good integ tests to show that this works :)

@rymnc rymnc self-assigned this Sep 2, 2024
@rymnc rymnc removed their assignment Sep 12, 2024
@xgreenx xgreenx self-assigned this Sep 12, 2024
xgreenx added a commit that referenced this issue Sep 17, 2024
…2199)

Closes #1887
Closes FuelLabs/fuel-vm#797
Related #2114
Related #2133

This PR contains several small breaking changes to the WASM interface:
- Get the module to execute WASM byte code from the storage first, an
fallback to the built-in version in the case of the
`FUEL_ALWAYS_USE_WASM`.
- Added `host_v1` with a new `peek_next_txs_size` method, that accepts
`tx_number_limit` and `size_limit`.
- Added new variant of the return type to pass the validation result. It
removes block serialization and deserialization and should improve
performance.
- Added a V1 execution result type that uses `JSONError` instead of
postcard serialized error. It adds flexibility of how variants of the
error can be managed. More information about it in
FuelLabs/fuel-vm#797. The change also moves
`TooManyOutputs` error to the top. It shows that `JSONError` works as
expected.
- Use a WASM generated bytecode for the local testnet since we always
want to use the latest version compatible with native execution.

## Checklist
- [x] Breaking changes are clearly marked as such in the PR description
and changelog
- [x] New behavior is reflected in tests

### Before requesting review
- [x] I have reviewed the code myself
- [x] I have created follow-up issues caused by this PR and linked them
here
    - #2198
    - #2200

---------

Co-authored-by: Rafał Chabowski <[email protected]>
Co-authored-by: Hannes Karppila <[email protected]>
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 a pull request may close this issue.

3 participants