Commit Graph

120 Commits

Author SHA1 Message Date
Mayukha Vadari
ca331d2dba Merge upstream/ripple/smart-escrow into xrplf/smart-contracts
Upstream rewrote the wasm VM and host-function system (Rust `crates/`
bridged via cxx), collapsed `transactions.macro` onto `TxSettings`, and
moved invariant running from `ApplyContext` to `Transactor`. This merge
resolves those conflicts and the breaks that carried no conflict marker.

Conflict resolutions of note:
- transactions.macro: took upstream's 5-argument `TxSettings` form and
  re-expressed our `emitable` column as `TxSettings::emittance`, a new
  scoped `Emittance` enum in TxSettings.h. `Emitable.cpp` and the
  transaction code generator read the new member.
- sfields.macro: upstream claimed UINT32 75-80, so `sfParameterFlag`
  moves from 80 to 86. The amendment is not live, so no wire break.
- HostFunc.h: took upstream's version, which drops `floatRoot`, and
  re-added the 15 contract virtuals. `setDataNestedObjectField`'s
  parameters are renamed to `(account, key, nestedKey, value)` to match
  the implementation; the wire order is unchanged.
- WasmCommon.h: `SubmitTxnFailure` (-21) and `InvalidState` (-22) join
  upstream's enum and the Rust `host_errors!` table. `Success` is gone;
  the helpers that compared against it now return `expected<void, ...>`.
- Transactor.cpp: kept the emitted-transaction pass, now using
  `checkInvariants(result, fee, InvariantScope::ProtocolOnly)`.

Breaks with no conflict marker:
- `Emitable.cpp` used the 8-argument TRANSACTION macro.
- `STTx::getSeqValue` is gone; use `getSeqProxy().value()`.
- `NetworkOPsImp::subLock_` is now `streamLock_`, held with `scoped_lock`.
- The `LedgerEntryHelpers` namespace is now `ledger_entry_helpers`.
- `keylet::vault` takes a `SeqProxy`. The three contract `ledger_entry`
  parsers were copy-pasted from the vault one and returned vault keylets;
  they now build contract, contract source and contract data keylets from
  their own fields. `contract_hash` is added to jss.

The 15 contract host functions still register through the deleted C++
wrapper layer, so contract bytecode does not run yet. Porting them to the
Rust-declared ABI is the next commit.
2026-09-15 15:37:08 -04:00
Mayukha Vadari
824997df60 feat: Add sponsorship, loanBroker, and loan keylet host functions (#8195) 2026-09-15 12:40:32 -04:00
Sergey Kuznetsov
4eac5dbd3b Fix coverage flags. Update AGENTS.md. Add crates/README.md 2026-09-10 16:28:50 +01:00
Sergey Kuznetsov
97b272be23 Merge develop 2026-09-10 16:10:13 +01:00
Sergey Kuznetsov
9403736199 ci: Exclude Rust unit tests from code coverage (#8203) 2026-09-10 11:38:25 +00:00
Sergey Kuznetsov
646c7ed494 refactor: Generate code to register host functions in wasm vm (#8206) 2026-09-10 11:27:40 +01:00
TimothyBanks
daecad43c9 chore: Upgrade to Wasmi 2.0 2026-09-08 09:58:32 -04:00
Timothy Banks
e9074726cd Merge pull request #8114 from XRPLF/timothybanks/port-wat-based-tests
feat: Port wat based wasm tests to new wasm design
2026-09-08 09:31:01 -04:00
TimothyBanks
a1ea8d3a6e chore: Address review comments 2026-09-02 17:03:47 -04:00
Sergey Kuznetsov
ae87e88690 refactor: Use temINVALID_BYTECODE istead of temBAD_WASM (#8156) 2026-09-02 11:41:36 +01:00
TimothyBanks
0ffeb86491 chore: Merge upstream branch 2026-09-01 13:41:40 -04:00
TimothyBanks
fe38635dd0 chore: Addressing code review code comments 2026-09-01 12:31:03 -04:00
Mayukha Vadari
74ec538296 feat: Remove float_root (#8110) 2026-08-31 11:19:39 -04:00
TimothyBanks
37128fb8bd fix: Add benchmark tests for host functions 2026-08-26 15:25:10 -04:00
TimothyBanks
7e3ac18345 fix: Remove orphaned files 2026-08-25 19:46:50 -04:00
TimothyBanks
d1cf8c2214 fix: Port rest of wasm tests over to new design 2026-08-25 19:34:14 -04:00
TimothyBanks
b6cb3c9591 chore: Merge upstream 2026-08-25 15:06:22 -04:00
TimothyBanks
17a00ed449 fix: Add host function tests on new wasm design 2026-08-24 18:52:35 -04:00
Sergey Kuznetsov
a0794738a6 refactor: Wasm vm redesign (#8012)
Co-authored-by: TimothyBanks <tbanks@ripple.com>
2026-08-24 15:22:39 +01:00
TimothyBanks
31d8267c2e chore: merge upstream in branch 2026-08-21 20:10:04 -04:00
TimothyBanks
bb90d20511 fix: Correct failing tests 2026-08-21 15:32:36 -04:00
Sergey Kuznetsov
b57ead1a8a Fix review comments 2026-08-21 18:42:10 +01:00
Sergey Kuznetsov
27859c1f6f Improve docs 2026-08-21 18:10:30 +01:00
Sergey Kuznetsov
e4baece501 Fix review comments 2026-08-21 17:52:34 +01:00
TimothyBanks
21f1a3e1f7 fix: Correct failing tests 2026-08-21 11:57:35 -04:00
Sergey Kuznetsov
e3ceab3f49 Fix clang-tidy and formatting 2026-08-21 15:28:11 +01:00
Sergey Kuznetsov
4300c5d7d6 Limit vm table size 2026-08-21 15:03:38 +01:00
Sergey Kuznetsov
ddaa958754 Fix write_into 2026-08-21 11:58:36 +01:00
TimothyBanks
9f5e08de66 chore: upgrade wasmi to 2.0.0-beta.10 2026-08-20 18:26:15 -04:00
Sergey Kuznetsov
2851ff46ab Fixes after merge 2026-08-20 16:40:37 +01:00
Sergey Kuznetsov
000fcf88bd Remove hello world crate 2026-08-20 16:21:39 +01:00
Sergey Kuznetsov
0c759f6cbd Merge wasmi-host-functions 2026-08-20 15:41:14 +01:00
dependabot[bot]
3b1c9e4320 chore: [DEPENDABOT] Bump cxx from 1.0.198 to 1.0.199 in /crates in the rust-dependencies group across 1 directory (#8050)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-20 13:12:14 +00:00
Sergey Kuznetsov
17d7bceadd Update comments 2026-08-19 16:08:02 +01:00
Sergey Kuznetsov
f370289733 chore: Rust-C++ cmake and CI integration (#7034) 2026-08-19 14:30:06 +00:00
Sergey Kuznetsov
37e2f23ee6 Fix review comments 2026-08-17 15:33:47 +01:00
TimothyBanks
e863db5061 feat: Porting wasm host function tests to new design 2026-08-15 19:41:32 -04:00
Sergey Kuznetsov
2605b4a78b Fix clippy and doc test errors 2026-08-12 11:57:19 +01:00
Sergey Kuznetsov
00488bf0b5 Check total 2026-08-12 11:21:35 +01:00
TimothyBanks
694fbb7ce3 fix: Merge upstream branch 2026-08-11 15:57:15 -04:00
TimothyBanks
b67a896bff fix: Merge upstream branch 2026-08-11 14:51:40 -04:00
Sergey Kuznetsov
ecc2f07ea3 Add internal fatal error code 2026-08-11 17:39:47 +01:00
TimothyBanks
0749043d09 feat: Clean up a few errant host function signatures 2026-08-11 12:03:39 -04:00
Sergey Kuznetsov
95526371b0 Update error codes 2026-08-11 16:45:06 +01:00
TimothyBanks
97f32869df feat: Hook up float host functions 2026-08-11 10:10:41 -04:00
Sergey Kuznetsov
454c651c44 Move macros in a separate file 2026-08-11 14:57:25 +01:00
Sergey Kuznetsov
91a23fc92c Update trace method 2026-08-11 14:47:30 +01:00
TimothyBanks
7d52867e3c feat: Hook up nft_uri, nft_issuer, nft_taxon, nft_flags, nft_xfer_fee, nft_serial host functions 2026-08-11 09:44:00 -04:00
TimothyBanks
98cf3a0532 feat: Hook up set_data host function 2026-08-10 21:58:24 -04:00
TimothyBanks
98abdef208 feat: Hook up vault_id host function 2026-08-10 21:49:46 -04:00