Skip to content

Conversation

@mvadari
Copy link
Collaborator

@mvadari mvadari commented Nov 24, 2025

High Level Overview of Change

This PR adds all the Wasmi integration code and the host functions specified in XLS-102. It also adds tests for all of this.

Note for reviewers: 10k lines of this PR are just WASM-compiled test fixtures, and another 4k lines are WASM test fixture source code. So while this PR is still quite large, it's not as large as it seems on the surface.

Context of Change

This PR depends on #5999 and replaces #5791

It is part of an effort to split up the Smart Escrow work into smaller, more managable-to-review PRs.

XLS-102: XRPLF/XRPL-Standards#303

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

N/A

Test Plan

Several tests are added to this PR.

@mvadari mvadari added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Nov 24, 2025
@mvadari mvadari changed the title add WAMR dependency feat: add WASM host functions (Wasmi version) Nov 24, 2025
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 95.88437% with 84 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.1%. Comparing base (500bb68) to head (c145598).

Files with missing lines Patch % Lines
src/xrpld/app/wasm/detail/HostFuncWrapper.cpp 94.0% 56 Missing ⚠️
src/xrpld/app/wasm/detail/WasmiVM.cpp 93.0% 23 Missing ⚠️
src/xrpld/app/wasm/HostFuncImpl.h 80.0% 4 Missing ⚠️
src/libxrpl/basics/Number.cpp 95.2% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           ripple/wasmi   #6075     +/-   ##
==============================================
+ Coverage          78.6%   79.1%   +0.5%     
==============================================
  Files               818     827      +9     
  Lines             68953   70993   +2040     
  Branches           8247    8304     +57     
==============================================
+ Hits              54166   56133   +1967     
- Misses            14787   14860     +73     
Files with missing lines Coverage Δ
include/xrpl/basics/Number.h 100.0% <ø> (ø)
include/xrpl/protocol/IOUAmount.h 100.0% <ø> (ø)
include/xrpl/protocol/TER.h 100.0% <ø> (ø)
src/libxrpl/protocol/IOUAmount.cpp 90.1% <100.0%> (+0.1%) ⬆️
src/libxrpl/protocol/TER.cpp 100.0% <ø> (ø)
src/xrpld/app/wasm/HostFunc.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/ParamsHelper.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/WasmVM.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/WasmiVM.h 100.0% <100.0%> (ø)
src/xrpld/app/wasm/detail/HostFuncImpl.cpp 100.0% <100.0%> (ø)
... and 5 more

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvadari mvadari marked this pull request as ready for review December 2, 2025 16:08
@mvadari mvadari requested a review from a team as a code owner December 2, 2025 16:08
@mvadari mvadari removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Dec 2, 2025
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.

5 participants