From 8a3363752f7db77796e8d07261506eeef18267a9 Mon Sep 17 00:00:00 2001 From: pwang200 <354723+pwang200@users.noreply.github.com> Date: Sun, 9 Aug 2026 14:41:56 -0400 Subject: [PATCH] trace host function refactor (#7920) --- include/xrpl/tx/wasm/HostFunc.h | 31 +- include/xrpl/tx/wasm/HostFuncImpl.h | 16 +- include/xrpl/tx/wasm/HostFuncWrapper.h | 16 +- include/xrpl/tx/wasm/WasmCommon.h | 12 + src/libxrpl/tx/wasm/HostFuncImpl.cpp | 7 + src/libxrpl/tx/wasm/HostFuncImplTrace.cpp | 72 -- src/libxrpl/tx/wasm/HostFuncWrapper.cpp | 492 ++++++----- src/libxrpl/tx/wasm/WasmVM.cpp | 8 +- src/test/app/HostFuncImpl_test.cpp | 314 +++++-- src/test/app/TestHostFunctions.h | 53 +- src/test/app/Wasm_test.cpp | 14 +- .../all_host_functions/Cargo.lock | 77 +- .../all_host_functions/Cargo.toml | 3 +- .../all_host_functions/src/lib.rs | 93 +- .../wasm_fixtures/codecov_tests/Cargo.lock | 77 +- .../wasm_fixtures/codecov_tests/Cargo.toml | 3 +- .../codecov_tests/src/host_bindings_loose.rs | 11 +- .../wasm_fixtures/codecov_tests/src/lib.rs | 428 +++++---- src/test/app/wasm_fixtures/fixtures.cpp | 816 +++++++++--------- 19 files changed, 1250 insertions(+), 1293 deletions(-) delete mode 100644 src/libxrpl/tx/wasm/HostFuncImplTrace.cpp diff --git a/include/xrpl/tx/wasm/HostFunc.h b/include/xrpl/tx/wasm/HostFunc.h index f318610488..96953fbf90 100644 --- a/include/xrpl/tx/wasm/HostFunc.h +++ b/include/xrpl/tx/wasm/HostFunc.h @@ -400,34 +400,11 @@ public: return std::unexpected(HostFunctionError::Unimplemented); } - [[nodiscard]] [[nodiscard]] virtual std::expected - trace(std::string_view const& msg, Slice const& data, bool asHex) const + // A no-op rather than Unimplemented: trace only writes to the local log. + // trace_wrap has already rendered the guest's buffer into `data`. + virtual void + trace(std::string_view const& msg, std::string_view const& data) const { - return std::unexpected(HostFunctionError::Unimplemented); - } - - [[nodiscard]] [[nodiscard]] virtual std::expected - traceNum(std::string_view const& msg, int64_t data) const - { - return std::unexpected(HostFunctionError::Unimplemented); - } - - [[nodiscard]] [[nodiscard]] virtual std::expected - traceAccount(std::string_view const& msg, AccountID const& account) const - { - return std::unexpected(HostFunctionError::Unimplemented); - } - - [[nodiscard]] [[nodiscard]] virtual std::expected - traceFloat(std::string_view const& msg, Slice const& data) const - { - return std::unexpected(HostFunctionError::Unimplemented); - } - - [[nodiscard]] [[nodiscard]] virtual std::expected - traceAmount(std::string_view const& msg, STAmount const& amount) const - { - return std::unexpected(HostFunctionError::Unimplemented); } [[nodiscard]] [[nodiscard]] virtual std::expected diff --git a/include/xrpl/tx/wasm/HostFuncImpl.h b/include/xrpl/tx/wasm/HostFuncImpl.h index 37ee4af5a8..569b151e29 100644 --- a/include/xrpl/tx/wasm/HostFuncImpl.h +++ b/include/xrpl/tx/wasm/HostFuncImpl.h @@ -241,20 +241,8 @@ public: std::expected getNFTSequence(uint256 const& nftId) const override; - std::expected - trace(std::string_view const& msg, Slice const& data, bool asHex) const override; - - std::expected - traceNum(std::string_view const& msg, int64_t data) const override; - - std::expected - traceAccount(std::string_view const& msg, AccountID const& account) const override; - - std::expected - traceFloat(std::string_view const& msg, Slice const& data) const override; - - std::expected - traceAmount(std::string_view const& msg, STAmount const& amount) const override; + void + trace(std::string_view const& msg, std::string_view const& data) const override; std::expected floatFromInt(int64_t x, int32_t mode) const override; diff --git a/include/xrpl/tx/wasm/HostFuncWrapper.h b/include/xrpl/tx/wasm/HostFuncWrapper.h index 1d04d7202a..4884c750f1 100644 --- a/include/xrpl/tx/wasm/HostFuncWrapper.h +++ b/include/xrpl/tx/wasm/HostFuncWrapper.h @@ -190,21 +190,11 @@ wasm_trap_t* getNFTTransferFee_wrap(WASM_SECONDARY_CB_PARAMS_LIST); using getNFTSequence_proto = int32_t(uint8_t const*, int32_t, uint8_t*, int32_t); wasm_trap_t* getNFTSequence_wrap(WASM_SECONDARY_CB_PARAMS_LIST); -using trace_proto = int32_t(uint8_t const*, int32_t, uint8_t const*, int32_t, int32_t); +// trace(msg_ptr, msg_len, data_type, data_ptr, data_len); data_type is a +// TraceDataType. +using trace_proto = void(uint8_t const*, int32_t, int32_t, uint8_t const*, int32_t); wasm_trap_t* trace_wrap(WASM_SECONDARY_CB_PARAMS_LIST); -using traceNum_proto = int32_t(uint8_t const*, int32_t, int64_t); -wasm_trap_t* traceNum_wrap(WASM_SECONDARY_CB_PARAMS_LIST); - -using traceAccount_proto = int32_t(uint8_t const*, int32_t, uint8_t const*, int32_t); -wasm_trap_t* traceAccount_wrap(WASM_SECONDARY_CB_PARAMS_LIST); - -using traceFloat_proto = int32_t(uint8_t const*, int32_t, uint8_t const*, int32_t); -wasm_trap_t* traceFloat_wrap(WASM_SECONDARY_CB_PARAMS_LIST); - -using traceAmount_proto = int32_t(uint8_t const*, int32_t, uint8_t const*, int32_t); -wasm_trap_t* traceAmount_wrap(WASM_SECONDARY_CB_PARAMS_LIST); - using floatFromInt_proto = int32_t(int64_t, uint8_t*, int32_t, int32_t); wasm_trap_t* floatFromInt_wrap(WASM_SECONDARY_CB_PARAMS_LIST); diff --git a/include/xrpl/tx/wasm/WasmCommon.h b/include/xrpl/tx/wasm/WasmCommon.h index 3e55777b7c..f73ca7c2d2 100644 --- a/include/xrpl/tx/wasm/WasmCommon.h +++ b/include/xrpl/tx/wasm/WasmCommon.h @@ -33,6 +33,18 @@ std::string_view inline constexpr hfErrInternal = "HfInternal"; std::string_view inline constexpr hfErrOutOfGas = "HfOutOfGas"; std::string_view inline constexpr wasmiTrapOutOfFuel = "OutOfFuel"; +// Guest ABI, mirrored in the wasm stdlib: append only, never renumber. Starts at +// 1 so a zeroed data_type is rejected rather than treated as Int64. +enum class TraceDataType : std::int32_t { + Int64 = 1, + Uint64, + Xfloat, + Account, + Amount, + AsHex, // raw bytes, hex-encoded by the host before printing + AsText, // bytes printed verbatim as text +}; + enum class HostFunctionError : int32_t { Unimplemented = -1, FieldNotFound = -2, diff --git a/src/libxrpl/tx/wasm/HostFuncImpl.cpp b/src/libxrpl/tx/wasm/HostFuncImpl.cpp index 2067062deb..c82690099a 100644 --- a/src/libxrpl/tx/wasm/HostFuncImpl.cpp +++ b/src/libxrpl/tx/wasm/HostFuncImpl.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace xrpl { @@ -49,4 +50,10 @@ WasmHostFunctionsImpl::computeSha512HalfHash(Slice const& data) const return hash; } +void +WasmHostFunctionsImpl::trace(std::string_view const& msg, std::string_view const& data) const +{ + log(msg, [&data] { return data; }); +} + } // namespace xrpl diff --git a/src/libxrpl/tx/wasm/HostFuncImplTrace.cpp b/src/libxrpl/tx/wasm/HostFuncImplTrace.cpp deleted file mode 100644 index 4e4058ea39..0000000000 --- a/src/libxrpl/tx/wasm/HostFuncImplTrace.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#ifdef _DEBUG -// #define DEBUG_OUTPUT 1 -#endif - -namespace xrpl { - -std::expected -WasmHostFunctionsImpl::trace(std::string_view const& msg, Slice const& data, bool asHex) const -{ - if (!asHex) - { - log(msg, [&data] { - return std::string_view(reinterpret_cast(data.data()), data.size()); - }); - } - else - { - log(msg, [&data] { - std::string hex; - hex.reserve(data.size() * 2); - boost::algorithm::hex(data.begin(), data.end(), std::back_inserter(hex)); - return hex; - }); - } - - return 0; -} - -std::expected -WasmHostFunctionsImpl::traceNum(std::string_view const& msg, int64_t data) const -{ - log(msg, [data] { return data; }); - return 0; -} - -std::expected -WasmHostFunctionsImpl::traceAccount(std::string_view const& msg, AccountID const& account) const -{ - log(msg, [&account] { return toBase58(account); }); - return 0; -} - -std::expected -WasmHostFunctionsImpl::traceFloat(std::string_view const& msg, Slice const& data) const -{ - log(msg, [&data] { return wasm_float::floatToString(data); }); - return 0; -} - -std::expected -WasmHostFunctionsImpl::traceAmount(std::string_view const& msg, STAmount const& amount) const -{ - log(msg, [&amount] { return amount.getFullText(); }); - return 0; -} - -} // namespace xrpl diff --git a/src/libxrpl/tx/wasm/HostFuncWrapper.cpp b/src/libxrpl/tx/wasm/HostFuncWrapper.cpp index ea5caec6cc..a6cd5fc1e3 100644 --- a/src/libxrpl/tx/wasm/HostFuncWrapper.cpp +++ b/src/libxrpl/tx/wasm/HostFuncWrapper.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #include #include +#include + #include #include @@ -31,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -544,8 +548,8 @@ HostFuncMain_wrap(WASM_CB_PARAMS_LIST) wasm_trap_t* getLedgerSqn_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int const index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t const index = 0; + auto& runtime = hf.getRT(); return returnResult(runtime, params, results, hf.getLedgerSqn(), index); } @@ -553,8 +557,8 @@ getLedgerSqn_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getParentLedgerTime_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int const index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t const index = 0; + auto& runtime = hf.getRT(); return returnResult(runtime, params, results, hf.getParentLedgerTime(), index); } @@ -562,8 +566,8 @@ getParentLedgerTime_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getParentLedgerHash_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int const index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t const index = 0; + auto& runtime = hf.getRT(); return returnResult(runtime, params, results, hf.getParentLedgerHash(), index); } @@ -571,8 +575,8 @@ getParentLedgerHash_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getBaseFee_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int const index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t const index = 0; + auto& runtime = hf.getRT(); return returnResult(runtime, params, results, hf.getBaseFee(), index); } @@ -580,8 +584,8 @@ getBaseFee_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* isAmendmentEnabled_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const slice = getDataSlice(runtime, params, index); if (!slice) @@ -605,8 +609,8 @@ isAmendmentEnabled_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* cacheLedgerObj_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const id = getDataUInt256(runtime, params, index); if (!id) @@ -622,8 +626,8 @@ cacheLedgerObj_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getTxField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const fname = getDataSField(runtime, params, index); if (!fname) @@ -635,8 +639,8 @@ getTxField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getCurrentLedgerObjField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const fname = getDataSField(runtime, params, index); if (!fname) @@ -648,8 +652,8 @@ getCurrentLedgerObjField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getLedgerObjField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const cache = getDataInt32(runtime, params, index); if (!cache) @@ -665,8 +669,8 @@ getLedgerObjField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getTxNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const locator = getDataLocator(runtime, params, index); if (!locator) @@ -678,8 +682,8 @@ getTxNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getCurrentLedgerObjNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const locator = getDataLocator(runtime, params, index); if (!locator) @@ -692,8 +696,8 @@ getCurrentLedgerObjNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getLedgerObjNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const cache = getDataInt32(runtime, params, index); if (!cache) @@ -710,8 +714,8 @@ getLedgerObjNestedField_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getTxArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const fname = getDataSField(runtime, params, index); if (!fname) @@ -723,8 +727,8 @@ getTxArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getCurrentLedgerObjArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const fname = getDataSField(runtime, params, index); if (!fname) @@ -736,8 +740,8 @@ getCurrentLedgerObjArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getLedgerObjArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const cache = getDataInt32(runtime, params, index); if (!cache) @@ -753,8 +757,8 @@ getLedgerObjArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getTxNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const locator = getDataLocator(runtime, params, index); if (!locator) @@ -766,8 +770,8 @@ getTxNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getCurrentLedgerObjNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const locator = getDataLocator(runtime, params, index); if (!locator) @@ -779,8 +783,8 @@ getCurrentLedgerObjNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getLedgerObjNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const cache = getDataInt32(runtime, params, index); if (!cache) @@ -797,8 +801,8 @@ getLedgerObjNestedArrayLen_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* updateData_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const bytes = getDataSlice(runtime, params, index); if (!bytes) @@ -810,8 +814,8 @@ updateData_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* checkSignature_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const message = getDataSlice(runtime, params, index); if (!message) @@ -832,8 +836,8 @@ checkSignature_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* computeSha512HalfHash_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const bytes = getDataSlice(runtime, params, index); if (!bytes) @@ -845,8 +849,8 @@ computeSha512HalfHash_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* accountKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -858,8 +862,8 @@ accountKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* ammKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const issue1 = getDataAsset(runtime, params, index); if (!issue1) @@ -876,8 +880,8 @@ ammKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* checkKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -893,8 +897,8 @@ checkKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* credentialKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const subj = getDataAccountID(runtime, params, index); if (!subj) @@ -915,8 +919,8 @@ credentialKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* delegateKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -933,8 +937,8 @@ delegateKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* depositPreauthKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -951,8 +955,8 @@ depositPreauthKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* didKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -964,8 +968,8 @@ didKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* escrowKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -981,8 +985,8 @@ escrowKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* trustLineKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc1 = getDataAccountID(runtime, params, index); if (!acc1) @@ -1007,8 +1011,8 @@ trustLineKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* mptokenIssuanceKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1025,8 +1029,8 @@ mptokenIssuanceKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* mptokenKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const slice = getDataSlice(runtime, params, index); if (!slice) @@ -1046,8 +1050,8 @@ mptokenKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* nftokenOfferKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1064,8 +1068,8 @@ nftokenOfferKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* offerKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1081,8 +1085,8 @@ offerKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* oracleKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1098,8 +1102,8 @@ oracleKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* paychannelKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1124,8 +1128,8 @@ paychannelKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* permissionedDomainKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1142,8 +1146,8 @@ permissionedDomainKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* signerListKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1155,8 +1159,8 @@ signerListKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* ticketKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1172,8 +1176,8 @@ ticketKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* vaultKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1189,8 +1193,8 @@ vaultKeylet_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFT_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const acc = getDataAccountID(runtime, params, index); if (!acc) @@ -1206,8 +1210,8 @@ getNFT_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFTIssuer_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const nftId = getDataUInt256(runtime, params, index); if (!nftId) @@ -1219,8 +1223,8 @@ getNFTIssuer_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFTTaxon_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const nftId = getDataUInt256(runtime, params, index); if (!nftId) @@ -1232,8 +1236,8 @@ getNFTTaxon_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFTFlags_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const nftId = getDataUInt256(runtime, params, index); if (!nftId) @@ -1245,8 +1249,8 @@ getNFTFlags_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFTTransferFee_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const nftId = getDataUInt256(runtime, params, index); if (!nftId) @@ -1258,8 +1262,8 @@ getNFTTransferFee_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* getNFTSequence_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t index = 0; + auto& runtime = hf.getRT(); auto const nftId = getDataUInt256(runtime, params, index); if (!nftId) @@ -1268,124 +1272,150 @@ getNFTSequence_wrap(WASM_SECONDARY_CB_PARAMS_LIST) return returnResult(runtime, params, results, hf.getNFTSequence(*nftId), index); } +// log() ignores the journal under DEBUG_OUTPUT, so the gate must not either. +static inline bool +traceActive([[maybe_unused]] HostFunctions const& hf) +{ +#ifdef DEBUG_OUTPUT + return true; +#else + return hf.getJournal().active(beast::Severity::Trace); +#endif +} + +// Not getDataUnsigned: that branches on pointer alignment, and trace must cost +// the same regardless of how the guest laid out its buffer. +template +static std::optional +traceInt(Slice const& data) +{ + static_assert(std::is_integral_v); + if (data.size() != sizeof(T)) + return std::nullopt; + + T x; + memcpy(&x, data.data(), sizeof(T)); + return adjustWasmEndianess(x); +} + +// std::nullopt means the buffer does not match the type. May throw. +static std::optional +traceFormat(TraceDataType type, Slice const& data) +{ + switch (type) + { + case TraceDataType::Int64: + if (auto const x = traceInt(data)) + return std::to_string(*x); + return std::nullopt; + + case TraceDataType::Uint64: + if (auto const x = traceInt(data)) + return std::to_string(*x); + return std::nullopt; + + case TraceDataType::Xfloat: + return wasm_float::floatToString(data); + + case TraceDataType::Account: + // Not getDataAccountID: it charges the transfer limit. + if (data.size() != AccountID::size()) + return std::nullopt; + return toBase58(AccountID::fromVoid(data.data())); + + case TraceDataType::Amount: { + auto serialIter = SerialIter(data); + STAmount const amount(serialIter, sfGeneric); // may throw + return amount.getFullText(); + } + + case TraceDataType::AsHex: { + std::string hex; + hex.reserve(data.size() * 2); + boost::algorithm::hex(data.begin(), data.end(), std::back_inserter(hex)); + return hex; + } + + case TraceDataType::AsText: + // An empty Slice has a null data(), which std::string may not take. + if (data.empty()) + return std::string(); + return std::string(reinterpret_cast(data.data()), data.size()); + } + + return std::nullopt; // unknown data_type +} + +// trace's only effect is this node's local log, so nothing observable may depend +// on the log level: gas is charged in mainCheck before this runs, no transfer +// limit is charged, and errors are logged rather than trapped. wasm_trap_t* trace_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + if (!traceActive(hf)) + return nullptr; - auto const msg = getDataString(runtime, params, index); - if (!msg) - return hfResult(results, msg.error()); - - auto const data = getDataSlice(runtime, params, index); - if (!data) - return hfResult(results, data.error()); - - if (msg->size() + data->size() > kMaxWasmDataLength) - return hfResult(results, HostFunctionError::DataFieldTooLarge); - - auto const asHex = getDataInt32(runtime, params, index); - if (!asHex) - return hfResult(results, asHex.error()); // LCOV_EXCL_LINE - - if (*asHex != 0 && *asHex != 1) - return hfResult(results, HostFunctionError::InvalidParams); - - return returnResult(runtime, params, results, hf.trace(*msg, *data, *asHex != 0), index); -} - -wasm_trap_t* -traceNum_wrap(WASM_SECONDARY_CB_PARAMS_LIST) -{ - int index = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); - - auto const msg = getDataString(runtime, params, index); - if (!msg) - return hfResult(results, msg.error()); - - auto const number = getDataInt64(runtime, params, index); - if (!number) - return hfResult(results, number.error()); // LCOV_EXCL_LINE - - return returnResult(runtime, params, results, hf.traceNum(*msg, *number), index); -} - -wasm_trap_t* -traceAccount_wrap(WASM_SECONDARY_CB_PARAMS_LIST) -{ - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); - - auto const msg = getDataString(runtime, params, i); - if (!msg) - return hfResult(results, msg.error()); - - auto const account = getDataAccountID(runtime, params, i); - if (!account) - return hfResult(results, account.error()); - - return returnResult(runtime, params, results, hf.traceAccount(*msg, *account), i); -} - -wasm_trap_t* -traceFloat_wrap(WASM_SECONDARY_CB_PARAMS_LIST) -{ - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); - - auto const msg = getDataString(runtime, params, i); - if (!msg) - return hfResult(results, msg.error()); - - auto const number = getDataSlice(runtime, params, i); - if (!number) - return hfResult(results, number.error()); - - return returnResult(runtime, params, results, hf.traceFloat(*msg, *number), i); -} - -wasm_trap_t* -traceAmount_wrap(WASM_SECONDARY_CB_PARAMS_LIST) -{ - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); - - auto const msg = getDataString(runtime, params, i); - if (!msg) - return hfResult(results, msg.error()); - - auto const amountSliceOpt = getDataSlice(runtime, params, i); - if (!amountSliceOpt) - return hfResult(results, amountSliceOpt.error()); - - auto const amountSlice = amountSliceOpt.value(); - auto serialIter = SerialIter(amountSlice); - - std::optional amount; try { - amount = STAmount(serialIter, sfGeneric); - } - catch (std::exception const&) - { - amount = std::nullopt; - } + int32_t index = 0; + auto& runtime = hf.getRT(); - if (!amount) - { - return hfResult(results, HostFunctionError::InvalidParams); - } + auto const msg = getDataString(runtime, params, index); + if (!msg) + { + hf.getJournal().trace() << "WasmTrace: invalid message"; + return nullptr; + } - return returnResult(runtime, params, results, hf.traceAmount(*msg, *amount), i); + auto const type = getDataInt32(runtime, params, index); + // LCOV_EXCL_START + if (!type) + { + hf.getJournal().trace() << "WasmTrace: invalid data type"; + return nullptr; + } + // LCOV_EXCL_STOP + + auto const data = getDataSlice(runtime, params, index); + if (!data) + { + hf.getJournal().trace() << "WasmTrace: invalid data"; + return nullptr; + } + + if (msg->size() + data->size() > kMaxWasmDataLength) + { + hf.getJournal().trace() << "WasmTrace: message and data too long"; + return nullptr; + } + + auto const text = traceFormat(static_cast(*type), *data); + if (!text) + { + hf.getJournal().trace() << "WasmTrace: data does not match the data type"; + return nullptr; + } + + hf.trace(*msg, *text); + } + catch (std::exception const& e) + { + hf.getJournal().trace() << "WasmTrace: error: " << e.what(); + } + // LCOV_EXCL_START + catch (...) + { + hf.getJournal().trace() << "WasmTrace: unknown error"; + } + // LCOV_EXCL_STOP + return nullptr; } wasm_trap_t* floatFromInt_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataInt64(runtime, params, i); if (!x) @@ -1403,8 +1433,8 @@ floatFromInt_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatFromUint_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataUInt64(runtime, params, i); if (!x) @@ -1422,8 +1452,8 @@ floatFromUint_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatFromSTAmount_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1454,8 +1484,8 @@ floatFromSTAmount_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatFromSTNumber_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1486,8 +1516,8 @@ floatFromSTNumber_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatToInt_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1505,8 +1535,8 @@ floatToInt_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatToMantExp_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1519,8 +1549,8 @@ floatToMantExp_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatFromMantExp_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const mant = getDataInt64(runtime, params, i); if (!mant) @@ -1542,8 +1572,8 @@ floatFromMantExp_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatCompare_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1559,8 +1589,8 @@ floatCompare_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatAdd_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1582,8 +1612,8 @@ floatAdd_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatSubtract_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1605,8 +1635,8 @@ floatSubtract_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatMultiply_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1628,8 +1658,8 @@ floatMultiply_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatDivide_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1651,8 +1681,8 @@ floatDivide_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatRoot_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1674,8 +1704,8 @@ floatRoot_wrap(WASM_SECONDARY_CB_PARAMS_LIST) wasm_trap_t* floatPower_wrap(WASM_SECONDARY_CB_PARAMS_LIST) { - int i = 0; - WasmRuntimeWrapper& runtime = hf.getRT(); + int32_t i = 0; + auto& runtime = hf.getRT(); auto const x = getDataSlice(runtime, params, i); if (!x) @@ -1757,7 +1787,7 @@ testGetDataIncrement() values[0] = WASM_I32_VAL(42); - int index = 0; + int32_t index = 0; auto const result = getDataInt32(runtime, ¶ms, index); if (!result || result.value() != 42 || index != 1) return false; @@ -1769,7 +1799,7 @@ testGetDataIncrement() values[0] = WASM_I64_VAL(1234); - int index = 0; + int32_t index = 0; auto const result = getDataInt64(runtime, ¶ms, index); if (!result || result.value() != 1234 || index != 1) return false; @@ -1781,7 +1811,7 @@ testGetDataIncrement() values[0] = WASM_I32_VAL(sfAccount.getCode()); - int index = 0; + int32_t index = 0; auto const result = getDataSField(runtime, ¶ms, index); if (!result || result.value().get() != sfAccount || index != 1) return false; @@ -1794,7 +1824,7 @@ testGetDataIncrement() values[0] = WASM_I32_VAL(0); values[1] = WASM_I32_VAL(3); - int index = 0; + int32_t index = 0; auto const result = getDataSlice(runtime, ¶ms, index); if (!result || result.value() != Slice(buffer.data(), 3) || index != 2) return false; @@ -1807,7 +1837,7 @@ testGetDataIncrement() values[0] = WASM_I32_VAL(0); values[1] = WASM_I32_VAL(5); - int index = 0; + int32_t index = 0; auto const result = getDataString(runtime, ¶ms, index); if (!result || result.value() != std::string_view(reinterpret_cast(buffer.data()), 5) || @@ -1826,7 +1856,7 @@ testGetDataIncrement() values[1] = WASM_I32_VAL(AccountID::size()); memcpy(&buffer[0], id.data(), AccountID::size()); - int index = 0; + int32_t index = 0; auto const result = getDataAccountID(runtime, ¶ms, index); if (!result || result.value() != id || index != 2) return false; @@ -1842,7 +1872,7 @@ testGetDataIncrement() values[1] = WASM_I32_VAL(Hash::size()); memcpy(&buffer[0], h1.data(), Hash::size()); - int index = 0; + int32_t index = 0; auto const result = getDataUInt256(runtime, ¶ms, index); if (!result || result.value() != h1 || index != 2) return false; @@ -1858,7 +1888,7 @@ testGetDataIncrement() values[1] = WASM_I32_VAL(Currency::size()); memcpy(&buffer[0], c.data(), Currency::size()); - int index = 0; + int32_t index = 0; auto const result = getDataCurrency(runtime, ¶ms, index); if (!result || result.value() != c || index != 2) return false; diff --git a/src/libxrpl/tx/wasm/WasmVM.cpp b/src/libxrpl/tx/wasm/WasmVM.cpp index 7eda08f42b..ed87f7c4ac 100644 --- a/src/libxrpl/tx/wasm/WasmVM.cpp +++ b/src/libxrpl/tx/wasm/WasmVM.cpp @@ -79,13 +79,9 @@ setCommonHostFunctions(HostFunctions& hfs, ImportVec& i) WASM_IMPORT_FUNC2(i, getNFTTaxon, "nft_taxon", hfs, 60); WASM_IMPORT_FUNC2(i, getNFTFlags, "nft_flags", hfs, 60); WASM_IMPORT_FUNC2(i, getNFTTransferFee, "nft_xfer_fee", hfs, 60); - WASM_IMPORT_FUNC2(i, getNFTSequence, "nft_serial", hfs, 60); + WASM_IMPORT_FUNC2(i, getNFTSequence, "nft_serial", hfs, 60); - WASM_IMPORT_FUNC (i, trace, hfs, 500); - WASM_IMPORT_FUNC2(i, traceNum, "trace_num", hfs, 500); - WASM_IMPORT_FUNC2(i, traceAccount, "trace_acct", hfs, 500); - WASM_IMPORT_FUNC2(i, traceFloat, "trace_xfloat", hfs, 500); - WASM_IMPORT_FUNC2(i, traceAmount, "trace_amt", hfs, 500); + WASM_IMPORT_FUNC (i, trace, hfs, 30); WASM_IMPORT_FUNC2(i, floatFromInt, "float_from_int", hfs, 100); WASM_IMPORT_FUNC2(i, floatFromUint, "float_from_uint", hfs, 130); diff --git a/src/test/app/HostFuncImpl_test.cpp b/src/test/app/HostFuncImpl_test.cpp index 8311aae638..8c0bf1ab60 100644 --- a/src/test/app/HostFuncImpl_test.cpp +++ b/src/test/app/HostFuncImpl_test.cpp @@ -360,6 +360,13 @@ ww(E&& e, P&& params, P&& result, Args... args) return HostFuncMain_wrap(std::forward(e), params.get(), result.get()); // NOLINT } +// ww() packs only integral args as wasm params, so the scoped enum needs widening. +constexpr int32_t +traceDataTypeToInt(TraceDataType t) +{ + return static_cast(t); +} + constexpr int64_t min64 = std::numeric_limits::min(); constexpr int64_t max64 = std::numeric_limits::max(); constexpr int32_t floatSize = 12; @@ -3440,32 +3447,45 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string data = "abc"; auto const slice = Slice(data.data(), data.size()); - // hfs.trace(msg, slice, false); + // AsText: data printed verbatim (was trace with as_hex = 0) { vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, slice.data(), slice.size()); - WasmValVec params(5), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace"), params, result, 0, msg.size(), 256, slice.size(), 0); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::AsText), + 256, + slice.size()); - if (BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0)) + if (BEAST_EXPECT(!trap)) { auto const messages = sink.messages().str(); BEAST_EXPECT(messages.contains(msg)); + BEAST_EXPECT(messages.contains(data)); } } - // hfs.trace(msg, slice, true); + // AsHex: host hex-encodes data (was trace with as_hex = 1) { vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, slice.data(), slice.size()); - WasmValVec params(5), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace"), params, result, 0, msg.size(), 256, slice.size(), 1); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::AsHex), + 256, + slice.size()); - if (BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0)) + if (BEAST_EXPECT(!trap)) { auto const messages = sink.messages().str(); std::string hex; @@ -3475,6 +3495,41 @@ struct HostFuncImpl_test : public beast::unit_test::Suite BEAST_EXPECT(messages.contains(hex)); } } + + // Unknown data_type: logged as invalid, never a trap + { + vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); + vrt.setBytes(256, slice.data(), slice.size()); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), params, result, 0, msg.size(), 9999, 256, slice.size()); + BEAST_EXPECT(!trap); + } + + // msg and data each fit, but their combined size exceeds + // kMaxWasmDataLength, so nothing is logged + { + std::string const longMsg(kMaxWasmDataLength, 'x'); + vrt.setBytes(0, reinterpret_cast(longMsg.data()), longMsg.size()); + vrt.setBytes(2048, slice.data(), slice.size()); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + longMsg.size(), + traceDataTypeToInt(TraceDataType::AsText), + 2048, + slice.size()); + + if (BEAST_EXPECT(!trap)) + { + auto const messages = sink.messages().str(); + BEAST_EXPECT(messages.contains("message and data too long")); + BEAST_EXPECT(!messages.contains(longMsg)); + } + } } { @@ -3496,15 +3551,20 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string data = "abc"; auto const slice = Slice(data.data(), data.size()); - // hfs.trace(msg, slice, false); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, slice.data(), slice.size()); - WasmValVec params(5), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace"), params, result, 0, msg.size(), 256, slice.size(), 0); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::AsText), + 256, + slice.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); auto const messages = sink.messages().str(); BEAST_EXPECT(messages.empty()); } @@ -3531,19 +3591,53 @@ struct HostFuncImpl_test : public beast::unit_test::Suite hfs.setRT(vrt); std::string const msg = "trace number"; - int64_t const num = 123456789; - // hfs.traceNum(msg, num); - vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); - WasmValVec params(3), result(1); - auto* trap = ww(&import.at("trace_num"), params, result, 0, msg.size(), num); + // adjustWasmEndianess is its own inverse, so writing the adjusted value + // lets the wrapper's adjustment recover it on either endianness. + auto const traceNum = [&](TraceDataType type, auto value) { + auto const wire = adjustWasmEndianess(value); + vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); + vrt.setBytes(256, reinterpret_cast(&wire), sizeof(wire)); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(type), + 256, + sizeof(wire)); - if (BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0)) + if (BEAST_EXPECT(!trap)) + { + auto const messages = sink.messages().str(); + BEAST_EXPECT(messages.contains(msg)); + BEAST_EXPECT(messages.contains(std::to_string(value))); + } + }; + + traceNum(TraceDataType::Int64, int64_t{123456789}); + traceNum(TraceDataType::Int64, int64_t{-42}); + // Above int64 max -- unreachable through the old trace_num + traceNum(TraceDataType::Uint64, std::numeric_limits::max()); + + // Wrong buffer length for the type: logged as invalid, no trap { - auto const messages = sink.messages().str(); - BEAST_EXPECT(messages.contains(msg)); - BEAST_EXPECT(messages.contains(std::to_string(num))); + std::int32_t const tooShort = 7; + vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); + vrt.setBytes(256, reinterpret_cast(&tooShort), sizeof(tooShort)); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Int64), + 256, + sizeof(tooShort)); + BEAST_EXPECT(!trap); } } @@ -3563,15 +3657,22 @@ struct HostFuncImpl_test : public beast::unit_test::Suite hfs.setRT(vrt); std::string const msg = "trace number"; - int64_t const num = 123456789; + auto const wire = adjustWasmEndianess(int64_t{123456789}); - // hfs.traceNum(msg, num); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); - WasmValVec params(3), result(1); - auto* trap = ww(&import.at("trace_num"), params, result, 0, msg.size(), num); + vrt.setBytes(256, reinterpret_cast(&wire), sizeof(wire)); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Int64), + 256, + sizeof(wire)); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); auto const messages = sink.messages().str(); BEAST_EXPECT(messages.empty()); } @@ -3600,15 +3701,20 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string const msg = "trace account"; auto const& accountId = env.master.id(); - // hfs.traceAccount(msg, env.master.id()); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, accountId.data(), accountId.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_acct"), params, result, 0, msg.size(), 256, accountId.size()); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Account), + 256, + accountId.size()); - if (BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0)) + if (BEAST_EXPECT(!trap)) { auto const messages = sink.messages().str(); BEAST_EXPECT(messages.contains(msg)); @@ -3634,15 +3740,20 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string msg = "trace account"; auto const& accountId = env.master.id(); - // hfs.traceAccount(msg, env.master.id()); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, accountId.data(), accountId.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_acct"), params, result, 0, msg.size(), 256, accountId.size()); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Account), + 256, + accountId.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); auto const messages = sink.messages().str(); BEAST_EXPECT(messages.empty()); } @@ -3671,22 +3782,21 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string const msg = "trace amount"; STAmount const amount = XRP(12345); { - // hfs.traceAmount(msg, amount); Bytes amountBytes = toBytes(amount); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, amountBytes.data(), amountBytes.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_amt"), + ww(&import.at("trace"), params, result, 0, msg.size(), + traceDataTypeToInt(TraceDataType::Amount), 256, amountBytes.size()); - if (BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0)) + if (BEAST_EXPECT(!trap)) { auto const messages = sink.messages().str(); BEAST_EXPECT(messages.contains(msg)); @@ -3700,22 +3810,21 @@ struct HostFuncImpl_test : public beast::unit_test::Suite env.close(); STAmount const iouAmount = env.master["USD"](100); { - // hfs.traceAmount(msg, iouAmount); Bytes amountBytes = toBytes(iouAmount); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, amountBytes.data(), amountBytes.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_amt"), + ww(&import.at("trace"), params, result, 0, msg.size(), + traceDataTypeToInt(TraceDataType::Amount), 256, amountBytes.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); } // MPT amount @@ -3724,22 +3833,21 @@ struct HostFuncImpl_test : public beast::unit_test::Suite Asset const mptAsset = Asset(mptId); STAmount const mptAmount(mptAsset, 123456); - // hfs.traceAmount(msg, mptAmount); Bytes amountBytes = toBytes(mptAmount); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, amountBytes.data(), amountBytes.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_amt"), + ww(&import.at("trace"), params, result, 0, msg.size(), + traceDataTypeToInt(TraceDataType::Amount), 256, amountBytes.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); } } @@ -3761,16 +3869,21 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string const msg = "trace amount"; STAmount const amount = XRP(12345); - // hfs.traceAmount(msg, amount); Bytes amountBytes = toBytes(amount); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, amountBytes.data(), amountBytes.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_amt"), params, result, 0, msg.size(), 256, amountBytes.size()); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Amount), + 256, + amountBytes.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); auto const messages = sink.messages().str(); BEAST_EXPECT(messages.empty()); } @@ -3882,33 +3995,37 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string const msg = "trace float"; { - // hfs.traceFloat(msg, makeSlice(invalid)); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, reinterpret_cast(invalid.data()), invalid.size()); - WasmValVec params(4), result(1); - auto* trap = ww( - &import.at("trace_xfloat"), params, result, 0, msg.size(), 256, invalid.size()); - - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); - } - - { - // hfs.traceFloat(msg, makeSlice(floatMaxExp)); - vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); - vrt.setBytes(256, floatMaxExp.data(), floatMaxExp.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_xfloat"), + ww(&import.at("trace"), params, result, 0, msg.size(), + traceDataTypeToInt(TraceDataType::Xfloat), + 256, + invalid.size()); + + BEAST_EXPECT(!trap); + } + + { + vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); + vrt.setBytes(256, floatMaxExp.data(), floatMaxExp.size()); + WasmValVec params(5), result(0); + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Xfloat), 256, floatMaxExp.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); } } @@ -3929,15 +4046,20 @@ struct HostFuncImpl_test : public beast::unit_test::Suite std::string const msg = "trace float"; - // hfs.traceFloat(msg, makeSlice(invalid)); vrt.setBytes(0, reinterpret_cast(msg.data()), msg.size()); vrt.setBytes(256, reinterpret_cast(invalid.data()), invalid.size()); - WasmValVec params(4), result(1); + WasmValVec params(5), result(0); auto* trap = - ww(&import.at("trace_xfloat"), params, result, 0, msg.size(), 256, invalid.size()); + ww(&import.at("trace"), + params, + result, + 0, + msg.size(), + traceDataTypeToInt(TraceDataType::Xfloat), + 256, + invalid.size()); - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + BEAST_EXPECT(!trap); auto const messages = sink.messages().str(); BEAST_EXPECT(messages.empty()); } @@ -6181,18 +6303,26 @@ struct HostFuncImpl_test : public beast::unit_test::Suite reinterpret_cast("dummy"), 5); // Empty data slice for trace { - WasmValVec params(5), result(1); - // trace(msg_ptr, msg_len, data_ptr, data_len, asHex) - auto* trap = ww(&import.at("trace"), params, result, 0, testMsg.size(), 100, 5, 0); + WasmValVec params(5), result(0); + // trace(msg_ptr, msg_len, data_type, data_ptr, data_len) -- returns nothing + auto* trap = + ww(&import.at("trace"), + params, + result, + 0, + testMsg.size(), + traceDataTypeToInt(TraceDataType::AsText), + 100, + 5); - // Should succeed even though message is >10 bytes, because trace only uses slices - // (no transfer limit check in getDataSlice) - BEAST_EXPECT(!trap) && BEAST_EXPECT(result[0].kind == WASM_I32) && - BEAST_EXPECT(result[0].of.i32 == 0); + // Should not trap even though the message is >10 bytes, because trace only reads + // slices (no transfer limit check in getDataSlice) and never charges the limit. + BEAST_EXPECT(!trap); } - // setData should return when transfer limit is exhausted - // After trace consumed overhead (1024 bytes), we have 10 - 1024 = negative limit left + // setData should return OutOfTransferLimit when the transfer limit is exhausted. + // trace left the limit untouched, so the next getTransferLimit() overhead (1024) + // takes 1034 down to 10 -- not enough for the 32-byte hash copy. { WasmValVec params(2), result(1); auto* trap = ww(&import.at("parent_ldgr_hash"), params, result, 500, 32); diff --git a/src/test/app/TestHostFunctions.h b/src/test/app/TestHostFunctions.h index a3ded89f33..5feeb25783 100644 --- a/src/test/app/TestHostFunctions.h +++ b/src/test/app/TestHostFunctions.h @@ -17,11 +17,8 @@ #include #include -#include - #include #include -#include #include #include @@ -382,54 +379,10 @@ public: #endif } - [[nodiscard]] std::expected - trace(std::string_view const& msg, Slice const& data, bool asHex) const override + void + trace(std::string_view const& msg, std::string_view const& data) const override { - if (!asHex) - { - log(msg, [&data] { - return std::string_view(reinterpret_cast(data.data()), data.size()); - }); - } - else - { - log(msg, [&data] { - std::string hex; - hex.reserve(data.size() * 2); - boost::algorithm::hex(data.begin(), data.end(), std::back_inserter(hex)); - return hex; - }); - } - - return 0; - } - - [[nodiscard]] std::expected - traceNum(std::string_view const& msg, int64_t data) const override - { - log(msg, [data] { return data; }); - return 0; - } - - [[nodiscard]] std::expected - traceAccount(std::string_view const& msg, AccountID const& account) const override - { - log(msg, [&account] { return toBase58(account); }); - return 0; - } - - [[nodiscard]] std::expected - traceFloat(std::string_view const& msg, Slice const& data) const override - { - log(msg, [&data] { return wasm_float::floatToString(data); }); - return 0; - } - - [[nodiscard]] std::expected - traceAmount(std::string_view const& msg, STAmount const& amount) const override - { - log(msg, [&amount] { return amount.getFullText(); }); - return 0; + log(msg, [&data] { return data; }); } [[nodiscard]] std::expected diff --git a/src/test/app/Wasm_test.cpp b/src/test/app/Wasm_test.cpp index 3a9f541153..c2a493de42 100644 --- a/src/test/app/Wasm_test.cpp +++ b/src/test/app/Wasm_test.cpp @@ -217,7 +217,7 @@ struct Wasm_test : public beast::unit_test::Suite auto re = engine.run( allHostFuncWasm, hfs, 1'000'000, escrowFunctionName, {}, imp, env.journal); - checkResult(re, 1, 27'617); + checkResult(re, 1, 30'760); env.close(); } @@ -239,7 +239,7 @@ struct Wasm_test : public beast::unit_test::Suite auto re = engine.run( allHostFuncWasm, hfs, 1'000'000, escrowFunctionName, {}, imp, env.journal); - checkResult(re, 1, 70'877); + checkResult(re, 1, 48'580); env.close(); } @@ -280,7 +280,7 @@ struct Wasm_test : public beast::unit_test::Suite { TestHostFunctions hfs(env); auto re = runEscrowWasm(allHFWasm, hfs, 100'000, escrowFunctionName, {}); - checkResult(re, 1, 70'877); + checkResult(re, 1, 48'580); } { @@ -304,7 +304,7 @@ struct Wasm_test : public beast::unit_test::Suite TestHostFunctions hfs(env); auto re = runEscrowWasm( allHFWasm, hfs, std::numeric_limits::max(), escrowFunctionName, {}); - checkResult(re, 1, 70'877); + checkResult(re, 1, 48'580); } { // fail because trying to access nonexistent field @@ -322,7 +322,7 @@ struct Wasm_test : public beast::unit_test::Suite FieldNotFoundHostFunctions hfs(env); auto re = runEscrowWasm(allHFWasm, hfs, 100'000, escrowFunctionName, {}); - checkResult(re, -201, 29'502); + checkResult(re, -201, 28'329); } { // fail because trying to allocate more than MAX_PAGES memory @@ -340,7 +340,7 @@ struct Wasm_test : public beast::unit_test::Suite OversizedFieldHostFunctions hfs(env); auto re = runEscrowWasm(allHFWasm, hfs, 100'000, escrowFunctionName, {}); - checkResult(re, -201, 29'502); + checkResult(re, -201, 28'329); } } @@ -356,7 +356,7 @@ struct Wasm_test : public beast::unit_test::Suite auto const codecovWasm = hexToBytes(kCodecovTestsWasmHex); TestHostFunctions hfs(env); - auto const allowance = 204'624; + auto const allowance = 125'667; auto re = runEscrowWasm(codecovWasm, hfs, allowance, escrowFunctionName, {}); checkResult(re, 1, allowance); diff --git a/src/test/app/wasm_fixtures/all_host_functions/Cargo.lock b/src/test/app/wasm_fixtures/all_host_functions/Cargo.lock index 48771d1506..5240e9b0f0 100644 --- a/src/test/app/wasm_fixtures/all_host_functions/Cargo.lock +++ b/src/test/app/wasm_fixtures/all_host_functions/Cargo.lock @@ -6,16 +6,17 @@ version = 4 name = "all_host_functions" version = "0.1.0" dependencies = [ - "xrpl-wasm-stdlib", + "xrpl-common-stdlib", + "xrpl-escrow-stdlib", ] [[package]] name = "block-buffer" -version = "0.10.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ - "generic-array", + "hybrid-array", ] [[package]] @@ -34,42 +35,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] -name = "cpufeatures" -version = "0.2.17" +name = "const-oid" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" dependencies = [ "libc", ] [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ - "generic-array", - "typenum", + "hybrid-array", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer", + "const-oid", "crypto-common", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "hybrid-array" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" dependencies = [ "typenum", - "version_check", ] [[package]] @@ -98,9 +104,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", "cpufeatures", @@ -109,9 +115,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -146,26 +152,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +name = "xrpl-common-stdlib" +version = "0.8.0" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" +dependencies = [ + "xrpl-macros", +] + +[[package]] +name = "xrpl-escrow-stdlib" +version = "0.1.0" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" +dependencies = [ + "xrpl-common-stdlib", +] [[package]] name = "xrpl-macros" version = "0.1.0" -source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=renames#9822d645870908a79d87a57b0244caa6359cb9cf" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" dependencies = [ "bs58", + "proc-macro2", "quote", "sha2", "syn", ] - -[[package]] -name = "xrpl-wasm-stdlib" -version = "0.8.0" -source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=renames#9822d645870908a79d87a57b0244caa6359cb9cf" -dependencies = [ - "xrpl-macros", -] diff --git a/src/test/app/wasm_fixtures/all_host_functions/Cargo.toml b/src/test/app/wasm_fixtures/all_host_functions/Cargo.toml index fb0c44562a..71ad3ba9c6 100644 --- a/src/test/app/wasm_fixtures/all_host_functions/Cargo.toml +++ b/src/test/app/wasm_fixtures/all_host_functions/Cargo.toml @@ -10,7 +10,8 @@ edition = "2024" crate-type = ["cdylib"] [dependencies] -xrpl-std = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-wasm-stdlib", branch = "renames" } +xrpl-std = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-common-stdlib", branch = "error-and-trace" } +xrpl-escrow = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-escrow-stdlib", branch = "error-and-trace" } [profile.dev] panic = "abort" diff --git a/src/test/app/wasm_fixtures/all_host_functions/src/lib.rs b/src/test/app/wasm_fixtures/all_host_functions/src/lib.rs index a40aa91d6a..586e950e39 100644 --- a/src/test/app/wasm_fixtures/all_host_functions/src/lib.rs +++ b/src/test/app/wasm_fixtures/all_host_functions/src/lib.rs @@ -25,10 +25,11 @@ extern crate std; // -700 to -799: Data Update Functions (1 function) // -use xrpl_std::core::current_tx::escrow_finish::EscrowFinish; -use xrpl_std::core::current_tx::traits::TransactionCommonFields; +use xrpl_escrow::current_tx::escrow_finish::EscrowFinish; +use xrpl_std::current_tx::traits::TransactionCommonFields; use xrpl_std::host; -use xrpl_std::host::trace::{trace, trace_account_buf, trace_data, trace_num, DataRepr}; +use xrpl_std::host::trace::TraceDataType; +use xrpl_std::host::trace::{trace, trace_acct_buf, trace_hex, trace_num}; use xrpl_std::sfield; #[unsafe(no_mangle)] @@ -131,7 +132,7 @@ fn test_ledger_header_functions() -> i32 { ); return -103; // Parent ledger hash test failed - should be exactly 32 bytes } - let _ = trace_data("Parent ledger hash:", &hash_buffer, DataRepr::AsHex); + let _ = trace_hex("Parent ledger hash:", &hash_buffer); let _ = trace("SUCCESS: Ledger header functions"); 0 @@ -160,7 +161,7 @@ fn test_transaction_data_functions() -> i32 { ); return -201; // Basic transaction field test failed } - let _ = trace_account_buf("Transaction Account:", &account_buffer); + let _ = trace_acct_buf("Transaction Account:", &account_buffer); // Test with Fee field (XRP amount - 8 bytes in new serialized format) // New format: XRP amounts are always 8 bytes (positive: value | cPositive flag, negative: just value) @@ -181,11 +182,7 @@ fn test_transaction_data_functions() -> i32 { return -202; // Fee field test failed - XRP amounts should be exactly 8 bytes } let _ = trace_num("Transaction Fee length:", fee_len as i64); - let _ = trace_data( - "Transaction Fee (serialized XRP amount):", - &fee_buffer, - DataRepr::AsHex, - ); + let _ = trace_hex("Transaction Fee (serialized XRP amount):", &fee_buffer); // Test with Sequence field (required, 4 bytes uint32) let mut seq_buffer = [0u8; 4]; @@ -204,7 +201,7 @@ fn test_transaction_data_functions() -> i32 { ); return -203; // Sequence field test failed } - let _ = trace_data("Transaction Sequence:", &seq_buffer, DataRepr::AsHex); + let _ = trace_hex("Transaction Sequence:", &seq_buffer); // NOTE: get_tx_field2() through get_tx_field6() have been deprecated. // Use get_tx_field() with appropriate parameters for all transaction field access. @@ -231,11 +228,7 @@ fn test_transaction_data_functions() -> i32 { // Expected - locator may not match transaction structure } else { let _ = trace_num("Nested field length:", nested_result as i64); - let _ = trace_data( - "Nested field:", - &nested_buffer[..nested_result as usize], - DataRepr::AsHex, - ); + let _ = trace_hex("Nested field:", &nested_buffer[..nested_result as usize]); } // Test 2.3: get_tx_array_len() - Get array length @@ -288,20 +281,18 @@ fn test_current_ledger_object_functions() -> i32 { "Current object balance length (XRP amount):", balance_result as i64, ); - let _ = trace_data( + let _ = trace_hex( "Current object balance (serialized XRP amount):", &balance_buffer, - DataRepr::AsHex, ); } else { let _ = trace_num( "Current object balance length (non-XRP amount):", balance_result as i64, ); - let _ = trace_data( + let _ = trace_hex( "Current object balance:", &balance_buffer[..balance_result as usize], - DataRepr::AsHex, ); } @@ -321,7 +312,7 @@ fn test_current_ledger_object_functions() -> i32 { current_account_result as i64, ); } else { - let _ = trace_account_buf("Current ledger object account:", ¤t_account_buffer); + let _ = trace_acct_buf("Current ledger object account:", ¤t_account_buffer); } // Test 3.2: get_current_ledger_obj_nested_field() - Nested field access @@ -345,10 +336,9 @@ fn test_current_ledger_object_functions() -> i32 { ); } else { let _ = trace_num("Current nested field length:", current_nested_result as i64); - let _ = trace_data( + let _ = trace_hex( "Current nested field:", ¤t_nested_buffer[..current_nested_result as usize], - DataRepr::AsHex, ); } @@ -505,20 +495,18 @@ fn test_any_ledger_object_functions() -> i32 { "Cached object balance length (XRP amount):", cached_balance_result as i64, ); - let _ = trace_data( + let _ = trace_hex( "Cached object balance (serialized XRP amount):", &cached_balance_buffer, - DataRepr::AsHex, ); } else { let _ = trace_num( "Cached object balance length (non-XRP amount):", cached_balance_result as i64, ); - let _ = trace_data( + let _ = trace_hex( "Cached object balance:", &cached_balance_buffer[..cached_balance_result as usize], - DataRepr::AsHex, ); } @@ -544,10 +532,9 @@ fn test_any_ledger_object_functions() -> i32 { ); } else { let _ = trace_num("Cached nested field length:", cached_nested_result as i64); - let _ = trace_data( + let _ = trace_hex( "Cached nested field:", &cached_nested_buffer[..cached_nested_result as usize], - DataRepr::AsHex, ); } @@ -604,7 +591,7 @@ fn test_keylet_generation_functions() -> i32 { ); return -501; // Account keylet generation failed } - let _ = trace_data("Account keylet:", &accountroot_id_buffer, DataRepr::AsHex); + let _ = trace_hex("Account keylet:", &accountroot_id_buffer); // Test 5.2: credential_keylet() - Generate keylet for credential let mut credential_keylet_buffer = [0u8; 32]; @@ -628,10 +615,9 @@ fn test_keylet_generation_functions() -> i32 { ); // This is expected to fail due to unusual parameter types } else { - let _ = trace_data( + let _ = trace_hex( "Credential keylet:", &credential_keylet_buffer[..credential_keylet_result as usize], - DataRepr::AsHex, ); } @@ -654,7 +640,7 @@ fn test_keylet_generation_functions() -> i32 { let _ = trace_num("ERROR: escrow_keylet failed:", escrow_keylet_result as i64); return -503; // Escrow keylet generation failed } - let _ = trace_data("Escrow keylet:", &escrow_keylet_buffer, DataRepr::AsHex); + let _ = trace_hex("Escrow keylet:", &escrow_keylet_buffer); // Test 5.4: oracle_keylet() - Generate keylet for oracle let mut oracle_keylet_buffer = [0u8; 32]; @@ -675,7 +661,7 @@ fn test_keylet_generation_functions() -> i32 { let _ = trace_num("ERROR: oracle_keylet failed:", oracle_keylet_result as i64); return -504; // Oracle keylet generation failed } - let _ = trace_data("Oracle keylet:", &oracle_keylet_buffer, DataRepr::AsHex); + let _ = trace_hex("Oracle keylet:", &oracle_keylet_buffer); let _ = trace("SUCCESS: Keylet generation functions"); 0 @@ -702,8 +688,8 @@ fn test_utility_functions() -> i32 { let _ = trace_num("ERROR: compute_sha512_half failed:", hash_result as i64); return -601; // SHA512 half computation failed } - let _ = trace_data("Input data:", test_data, DataRepr::AsHex); - let _ = trace_data("SHA512 half hash:", &hash_output, DataRepr::AsHex); + let _ = trace_hex("Input data:", test_data); + let _ = trace_hex("SHA512 half hash:", &hash_output); // Test 6.2: get_nft() - NFT data retrieval let escrow_finish = EscrowFinish; @@ -729,46 +715,25 @@ fn test_utility_functions() -> i32 { // This is expected - test account likely doesn't own the dummy NFT } else { let _ = trace_num("NFT data length:", nft_result as i64); - let _ = trace_data( - "NFT data:", - &nft_buffer[..nft_result as usize], - DataRepr::AsHex, - ); + let _ = trace_hex("NFT data:", &nft_buffer[..nft_result as usize]); } // Test 6.3: trace() - Debug logging with data let trace_message = b"Test trace message"; let trace_data_payload = b"payload"; - let trace_result = unsafe { + unsafe { host::trace( trace_message.as_ptr(), trace_message.len(), + TraceDataType::AsHex as i32, trace_data_payload.as_ptr(), trace_data_payload.len(), - 1, // as_hex = true ) }; - if trace_result < 0 { - let _ = trace_num("ERROR: trace() failed:", trace_result as i64); - return -603; // Trace function failed - } - let _ = trace_num("Trace function bytes written:", trace_result as i64); - // Test 6.4: trace_num() - Debug logging with number let test_number = 42i64; - let trace_num_result = trace_num("Test number trace", test_number); - - use xrpl_std::host::Result; - match trace_num_result { - Result::Ok(_) => { - let _ = trace_num("Trace_num function succeeded", 0); - } - Result::Err(_) => { - let _ = trace_num("ERROR: trace_num() failed:", -604); - return -604; // Trace number function failed - } - } + trace_num("Test number trace", test_number); let _ = trace("SUCCESS: Utility functions"); 0 @@ -789,11 +754,7 @@ fn test_data_update_functions() -> i32 { return -701; // Data update failed } - let _ = trace_data( - "Successfully updated ledger entry with:", - update_payload, - DataRepr::AsHex, - ); + let _ = trace_hex("Successfully updated ledger entry with:", update_payload); let _ = trace("SUCCESS: Data update functions"); 0 } diff --git a/src/test/app/wasm_fixtures/codecov_tests/Cargo.lock b/src/test/app/wasm_fixtures/codecov_tests/Cargo.lock index d7d91db071..899f278196 100644 --- a/src/test/app/wasm_fixtures/codecov_tests/Cargo.lock +++ b/src/test/app/wasm_fixtures/codecov_tests/Cargo.lock @@ -4,11 +4,11 @@ version = 4 [[package]] name = "block-buffer" -version = "0.10.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" dependencies = [ - "generic-array", + "hybrid-array", ] [[package]] @@ -30,46 +30,52 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" name = "codecov_tests" version = "0.0.1" dependencies = [ - "xrpl-wasm-stdlib", + "xrpl-common-stdlib", + "xrpl-escrow-stdlib", ] [[package]] -name = "cpufeatures" -version = "0.2.17" +name = "const-oid" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" dependencies = [ "libc", ] [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ - "generic-array", - "typenum", + "hybrid-array", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer", + "const-oid", "crypto-common", ] [[package]] -name = "generic-array" -version = "0.14.7" +name = "hybrid-array" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" dependencies = [ "typenum", - "version_check", ] [[package]] @@ -98,9 +104,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", "cpufeatures", @@ -109,9 +115,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.117" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -146,26 +152,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +name = "xrpl-common-stdlib" +version = "0.8.0" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" +dependencies = [ + "xrpl-macros", +] + +[[package]] +name = "xrpl-escrow-stdlib" +version = "0.1.0" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" +dependencies = [ + "xrpl-common-stdlib", +] [[package]] name = "xrpl-macros" version = "0.1.0" -source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=renames#9822d645870908a79d87a57b0244caa6359cb9cf" +source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=error-and-trace#b008b097237ce0d1a2dffc72ba39dd9fc50020a9" dependencies = [ "bs58", + "proc-macro2", "quote", "sha2", "syn", ] - -[[package]] -name = "xrpl-wasm-stdlib" -version = "0.8.0" -source = "git+https://github.com/ripple/xrpl-wasm-stdlib.git?branch=renames#9822d645870908a79d87a57b0244caa6359cb9cf" -dependencies = [ - "xrpl-macros", -] diff --git a/src/test/app/wasm_fixtures/codecov_tests/Cargo.toml b/src/test/app/wasm_fixtures/codecov_tests/Cargo.toml index 1cc49ac490..1e388a5154 100644 --- a/src/test/app/wasm_fixtures/codecov_tests/Cargo.toml +++ b/src/test/app/wasm_fixtures/codecov_tests/Cargo.toml @@ -15,4 +15,5 @@ opt-level = 's' panic = "abort" [dependencies] -xrpl-std = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-wasm-stdlib", branch = "renames" } +xrpl-std = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-common-stdlib", branch = "error-and-trace" } +xrpl-escrow = { git = "https://github.com/ripple/xrpl-wasm-stdlib.git", package = "xrpl-escrow-stdlib", branch = "error-and-trace" } diff --git a/src/test/app/wasm_fixtures/codecov_tests/src/host_bindings_loose.rs b/src/test/app/wasm_fixtures/codecov_tests/src/host_bindings_loose.rs index 6204dff0a2..7b42f747a8 100644 --- a/src/test/app/wasm_fixtures/codecov_tests/src/host_bindings_loose.rs +++ b/src/test/app/wasm_fixtures/codecov_tests/src/host_bindings_loose.rs @@ -43,5 +43,14 @@ unsafe extern "C" { out_buff_len: usize, ) -> i32; - pub fn trace_num(msg_read_ptr: i32, msg_read_len: i32, number: i64) -> i32; + // Same wasm functype as the real binding, so this is not a second import of + // host_lib.trace. Loose i32 pointers exercise the out-of-bounds path. + #[link_name = "trace"] + pub fn trace_loose( + msg_read_ptr: i32, + msg_read_len: i32, + data_type: i32, + data_read_ptr: i32, + data_read_len: i32, + ); } diff --git a/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs b/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs index 59f16155d2..02b38f633e 100644 --- a/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs +++ b/src/test/app/wasm_fixtures/codecov_tests/src/lib.rs @@ -4,19 +4,20 @@ extern crate std; use core::panic; -use xrpl_std::core::current_tx::escrow_finish::{get_current_escrow_finish, EscrowFinish}; -use xrpl_std::core::current_tx::traits::TransactionCommonFields; -use xrpl_std::core::keylets; -use xrpl_std::core::locator::Locator; -use xrpl_std::core::types::blob::DEFAULT_BLOB_SIZE; -use xrpl_std::core::types::issue::Issue; -use xrpl_std::core::types::issue::XrpIssue; -use xrpl_std::core::types::mpt_id::MptId; +use xrpl_escrow::current_tx::escrow_finish::{EscrowFinish, get_current_escrow_finish}; +use xrpl_std::current_tx::traits::TransactionCommonFields; +use xrpl_std::fields::locator::Locator; use xrpl_std::host; use xrpl_std::host::error_codes; +use xrpl_std::host::trace::TraceDataType; use xrpl_std::host::trace::{trace, trace_num as trace_number}; +use xrpl_std::ledger_entry_ids; use xrpl_std::sfield; -use xrpl_std::types::XRPL_CONTRACT_DATA_SIZE; +use xrpl_std::types::blob::DEFAULT_BLOB_SIZE; +use xrpl_std::types::contract_data::XRPL_CONTRACT_DATA_SIZE; +use xrpl_std::types::issue::Issue; +use xrpl_std::types::issue::XrpIssue; +use xrpl_std::types::mpt_id::MptId; mod host_bindings_loose; include!("host_bindings_loose.rs"); @@ -91,7 +92,7 @@ pub extern "C" fn escrow_finish() -> i32 { ); let tx: EscrowFinish = get_current_escrow_finish(); let account = tx.get_account().unwrap_or_panic(); // get_tx_field under the hood - let keylet = keylets::accountroot_id(&account).unwrap_or_panic(); // accountroot_id under the hood + let keylet = ledger_entry_ids::accountroot_id(&account).unwrap_or_panic(); // accountroot_id under the hood check_result( unsafe { host::cache_le(keylet.as_ptr(), keylet.len(), 0) }, 1, @@ -243,44 +244,35 @@ pub extern "C" fn escrow_finish() -> i32 { ) }); let message = "testing trace"; - check_result( - unsafe { - host::trace_acct( - message.as_ptr(), - message.len(), - account.0.as_ptr(), - account.0.len(), - ) - }, - 0, - "trace_acct", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Account as i32, + account.0.as_ptr(), + account.0.len(), + ) + }; let amount = &[0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F]; // 95 drops of XRP - check_result( - unsafe { - host::trace_amt( - message.as_ptr(), - message.len(), - amount.as_ptr(), - amount.len(), - ) - }, - 0, - "trace_amt", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Amount as i32, + amount.as_ptr(), + amount.len(), + ) + }; let amount = &[0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; // 0 drops of XRP - check_result( - unsafe { - host::trace_amt( - message.as_ptr(), - message.len(), - amount.as_ptr(), - amount.len(), - ) - }, - 0, - "trace_amt_zero", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Amount as i32, + amount.as_ptr(), + amount.len(), + ) + }; // ######################################## // Step #2: Test set_data edge cases @@ -589,18 +581,17 @@ pub extern "C" fn escrow_finish() -> i32 { ) }); - // string - check_result( - unsafe { - host_bindings_loose::trace_num( - locator.as_ptr() as i32 + 1_000_000_000, - locator.len() as i32, - 42, - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_num_oob_str", - ); + // Out-of-bounds message pointer; nothing to assert on now that trace is void. + let num_bytes = 42i64.to_le_bytes(); + unsafe { + host_bindings_loose::trace_loose( + locator.as_ptr() as i32 + 1_000_000_000, + locator.len() as i32, + TraceDataType::Int64 as i32, + num_bytes.as_ptr() as i32, + num_bytes.len() as i32, + ) + }; // ######################################## // Step #4: Test other host function edge cases @@ -798,44 +789,34 @@ pub extern "C" fn escrow_finish() -> i32 { "mptoken_id_too_big_slice_mptid", ) }); - check_result( - unsafe { - host::trace( - message.as_ptr(), - message.len(), - locator.as_ptr().wrapping_add(1_000_000_000), - locator.len(), - 0, - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_oob_slice", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::AsText as i32, + locator.as_ptr().wrapping_add(1_000_000_000), + locator.len(), + ) + }; let float: [u8; 8] = [0xD4, 0x83, 0x8D, 0x7E, 0xA4, 0xC6, 0x80, 0x00]; - check_result( - unsafe { - host::trace_xfloat( - message.as_ptr(), - message.len(), - float.as_ptr().wrapping_add(1_000_000_000), - float.len(), - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_xfloat_oob_slice", - ); - check_result( - unsafe { - host::trace_amt( - message.as_ptr(), - message.len(), - locator.as_ptr().wrapping_add(1_000_000_000), - locator.len(), - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_amt_oob_slice", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Xfloat as i32, + float.as_ptr().wrapping_add(1_000_000_000), + float.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Amount as i32, + locator.as_ptr().wrapping_add(1_000_000_000), + locator.len(), + ) + }; check_result( unsafe { host::float_cmp( @@ -1607,129 +1588,116 @@ pub extern "C" fn escrow_finish() -> i32 { "nft_uri_wrong_size_account_id", ) }); - check_result( - unsafe { - host::trace_acct( - message.as_ptr(), - message.len(), - locator.as_ptr(), - locator.len(), - ) - }, - error_codes::INVALID_PARAMS, - "trace_acct_wrong_size_account_id", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Account as i32, + locator.as_ptr(), + locator.len(), + ) + }; // invalid Currency was already tested above // invalid string - check_result( - unsafe { - host::trace( - message.as_ptr().wrapping_add(1_000_000_000), - message.len(), - uint256.as_ptr(), - uint256.len(), - 0, - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_oob_string", - ); - check_result( - unsafe { - host::trace_xfloat( - message.as_ptr().wrapping_add(1_000_000_000), - message.len(), - float.as_ptr(), - float.len(), - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_xfloat_oob_string", - ); - check_result( - unsafe { - host::trace_acct( - message.as_ptr().wrapping_add(1_000_000_000), - message.len(), - account.0.as_ptr(), - account.0.len(), - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_acct_oob_string", - ); - check_result( - unsafe { - host::trace_amt( - message.as_ptr().wrapping_add(1_000_000_000), - message.len(), - amount.as_ptr(), - amount.len(), - ) - }, - error_codes::POINTER_OUT_OF_BOUNDS, - "trace_amt_oob_string", - ); + unsafe { + host::trace( + message.as_ptr().wrapping_add(1_000_000_000), + message.len(), + TraceDataType::AsText as i32, + uint256.as_ptr(), + uint256.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr().wrapping_add(1_000_000_000), + message.len(), + TraceDataType::Xfloat as i32, + float.as_ptr(), + float.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr().wrapping_add(1_000_000_000), + message.len(), + TraceDataType::Account as i32, + account.0.as_ptr(), + account.0.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr().wrapping_add(1_000_000_000), + message.len(), + TraceDataType::Amount as i32, + amount.as_ptr(), + amount.len(), + ) + }; // trace too large - check_result( - unsafe { - host::trace( - locator.as_ptr(), - locator.len(), - locator.as_ptr(), - long_len, - 0, - ) - }, - error_codes::DATA_FIELD_TOO_LARGE, - "trace_too_long", - ); - check_result( - unsafe { host::trace_num(locator.as_ptr(), long_len, 1) }, - error_codes::DATA_FIELD_TOO_LARGE, - "trace_num_too_long", - ); - check_result( - unsafe { host::trace_xfloat(message.as_ptr(), long_len, float.as_ptr(), float.len()) }, - error_codes::DATA_FIELD_TOO_LARGE, - "trace_xfloat_too_long", - ); - check_result( - unsafe { - host::trace_acct( - message.as_ptr(), - long_len, - account.0.as_ptr(), - account.0.len(), - ) - }, - error_codes::DATA_FIELD_TOO_LARGE, - "trace_acct_too_long", - ); - check_result( - unsafe { host::trace_amt(message.as_ptr(), long_len, amount.as_ptr(), amount.len()) }, - error_codes::DATA_FIELD_TOO_LARGE, - "trace_amt_too_long", - ); + unsafe { + host::trace( + locator.as_ptr(), + locator.len(), + TraceDataType::AsText as i32, + locator.as_ptr(), + long_len, + ) + }; + let too_long_num = 1i64.to_le_bytes(); + unsafe { + host::trace( + locator.as_ptr(), + long_len, + TraceDataType::Int64 as i32, + too_long_num.as_ptr(), + too_long_num.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr(), + long_len, + TraceDataType::Xfloat as i32, + float.as_ptr(), + float.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr(), + long_len, + TraceDataType::Account as i32, + account.0.as_ptr(), + account.0.len(), + ) + }; + unsafe { + host::trace( + message.as_ptr(), + long_len, + TraceDataType::Amount as i32, + amount.as_ptr(), + amount.len(), + ) + }; // trace amount errors - check_result( - unsafe { - host::trace_amt( - message.as_ptr(), - message.len(), - locator.as_ptr(), - locator.len(), - ) - }, - error_codes::INVALID_PARAMS, - "trace_amt_wrong_length", - ); + unsafe { + host::trace( + message.as_ptr(), + message.len(), + TraceDataType::Amount as i32, + locator.as_ptr(), + locator.len(), + ) + }; // other misc errors @@ -1749,34 +1717,28 @@ pub extern "C" fn escrow_finish() -> i32 { "mptoken_id_mptid_wrong_length", ) }); - check_result( - unsafe { - host::trace( - message.as_ptr(), - message.len(), - locator.as_ptr(), - locator.len(), - 2, - ) - }, - error_codes::INVALID_PARAMS, - "trace_invalid_as_hex", - ); + // Unknown data_type: the host logs "invalid arguments" and returns. + unsafe { + host::trace( + message.as_ptr(), + message.len(), + 99, + locator.as_ptr(), + locator.len(), + ) + }; // ensure that the Slice index desync issue is fixed let empty: &[u8] = b""; - check_result( - unsafe { - host::trace_acct( - empty.as_ptr(), - empty.len(), - account.0.as_ptr(), - account.0.len(), - ) - }, - 0, - "trace_acct_check_desync", - ); + unsafe { + host::trace( + empty.as_ptr(), + empty.len(), + TraceDataType::Account as i32, + account.0.as_ptr(), + account.0.len(), + ) + }; 1 // <-- If we get here, finish the escrow. } diff --git a/src/test/app/wasm_fixtures/fixtures.cpp b/src/test/app/wasm_fixtures/fixtures.cpp index 6ff902717e..363da88f8d 100644 --- a/src/test/app/wasm_fixtures/fixtures.cpp +++ b/src/test/app/wasm_fixtures/fixtures.cpp @@ -20,178 +20,184 @@ extern std::string const kLedgerSqnWasmHex = "7565"; extern std::string const kAllHostFunctionsWasmHex = - "0061736d0100000001540c60027f7f017f60037f7f7f017f60047f7f7f7f017f60017f017f60067f7f7f7f7f7f017f" - "60037f7f7f0060057f7f7f7f7f017f60037f7f7e017f60087f7f7f7f7f7f7f7f017f60017f0060027f7f006000017f" - "02dc041a08686f73745f6c69620874785f6669656c64000108686f73745f6c69620974726163655f6e756d00070868" - "6f73745f6c6962057472616365000608686f73745f6c69620a6c6467725f696e646578000008686f73745f6c696210" - "706172656e745f6c6467725f74696d65000008686f73745f6c696210706172656e745f6c6467725f68617368000008" - "686f73745f6c69620874785f696e6e6572000208686f73745f6c69620a74785f6172725f6c656e000308686f73745f" - "6c69621074785f696e6e65725f6172725f6c656e000008686f73745f6c69620d686f6d655f6c655f6669656c640001" - "08686f73745f6c69620d686f6d655f6c655f696e6e6572000208686f73745f6c69620f686f6d655f6c655f6172725f" - "6c656e000308686f73745f6c696215686f6d655f6c655f696e6e65725f6172725f6c656e000008686f73745f6c6962" - "0863616368655f6c65000108686f73745f6c69620d63726564656e7469616c5f6964000808686f73745f6c69620965" - "7363726f775f6964000408686f73745f6c6962096f7261636c655f6964000408686f73745f6c69620b736861353132" - "5f68616c66000208686f73745f6c6962076e66745f757269000408686f73745f6c6962087365745f64617461000008" - "686f73745f6c6962086c655f6669656c64000208686f73745f6c6962086c655f696e6e6572000608686f73745f6c69" - "620a6c655f6172725f6c656e000008686f73745f6c6962106c655f696e6e65725f6172725f6c656e000108686f7374" - "5f6c69620e6163636f756e74726f6f745f6964000208686f73745f6c69620a74726163655f616363740002030c0b09" - "0a05050b05000101030005030100110619037f01418080c0000b7f0041af99c0000b7f0041b099c0000b073504066d" - "656d6f727902000d657363726f775f66696e697368001e0a5f5f646174615f656e6403010b5f5f686561705f626173" - "6503020a911e0b990101027f230041306b220124002000027f418180202001411c6a4114100022024114470440417f" - "20022002417f4e1b210241010c010b200020012f001c3b0001200041036a2001411e6a2d00003a0000200120012900" - "233703082001200141286a29000037000d200128001f21022000410d6a200129000d37000020002001290308370208" - "41000b3a000020002002360204200141306a24000b460020012d00004101460440418080c000410b20013402041001" - "000b20002001290001370000200041106a200141116a280000360000200041086a200141096a2900003700000b1900" - "200241094f0440000b20002002360204200020013602000b1900200241214f0440000b200020023602042000200136" - "02000ba91b01097f230041b0036b22002400418b80c000411b41014100410010021a41a680c0004119410141004100" - "10021a41e780c000412b41014100410010021a2000410036027002400240024002400240024002400240200041f000" - "6a220741041003220141004a0440419281c00041172000280270220141187420014180fe0371410874722001410876" - "4180fe037120014118767272ad10011a200041003602900120004190016a220341041004220141004c0d0141a981c0" - "004113200028029001220141187420014180fe03714108747220014108764180fe037120014118767272ad10011a20" - "0041c8016a22024200370300200041c0016a22054200370300200041b8016a22044200370300200042003703b00120" - "0041b0016a22064120100522014120470d0241bc81c000411320064120410110021a41cf81c0004120410141004100" - "10021a41dc82c000412e41014100410010021a200041a0016a410036020020004198016a4200370300200042003703" - "90014181802020034114100022014114470d03418a83c00041142003101f2000420037034841888018200041c8006a" - "22034108100022014108470d04419e83c0004117420810011a41b583c000412820034108410110021a200041003602" - "3041848008200041306a22034104100022014104470d0541dd83c000411520034104410110021a200041f4006a4100" - "36000020004100360071200041013a0070200242003703002005420037030020044200370300200042003703b00102" - "4020074108200641201006220141004e044041f283c00041142001ad10011a200041286a20062001101d418684c000" - "410d2000280228200028022c410110021a0c010b419384c00041292001ac10011a0b41bc84c00041154183803c1007" - "ac10011a41d184c00041134189803c1007ac10011a0240200041f0006a41081008220141004e044041e484c0004114" - "2001ad10011a0c010b41f884c000412d2001ac10011a0b41a585c000412341014100410010021a41de86c000413341" - "014100410010021a2000420037034841828018200041c8006a220141081009220341004c0d06200341084604404191" - "87c000412b420810011a41bc87c000412f20014108410110021a0c080b41eb87c000412f2003ad10011a200041206a" - "200041c8006a2003101c419a88c000411720002802202000280224410110021a0c070b41bf82c000411d2001ac1001" - "1a419b7f21020c070b419a82c00041252001ac10011a419a7f21020c060b41ef81c000412b2001ac10011a41997f21" - "020c050b41b486c000412a2001ac10011a41b77e21020c040b41f385c00041c1002001ac10011a41b67e21020c030b" - "41c885c000412b2001ac10011a41b57e21020c020b41b188c00041c5002003ac10011a0b200041a0016a4100360200" - "20004198016a4200370300200042003703900102404181802020004190016a220341141009220141004a044041f688" - "c000411e2003101f0c010b419489c00041332001ac10011a0b200041f4006a41003600002000410036007120004101" - "3a0070200041c8016a4200370300200041c0016a4200370300200041b8016a4200370300200042003703b001024020" - "0041f0006a4108200041b0016a22014120100a220341004e044041c789c000411c2003ad10011a200041186a200120" - "03101d41e389c00041152000280218200028021c410110021a0c010b41f889c00041392003ac10011a0b41b18ac000" - "41244183803c100bac10011a0240200041f0006a4108100c220141004e044041d58ac000411c2001ad10011a0c010b" - "41f18ac000413d2001ac10011a0b41ae8bc000412841014100410010021a41d68bc000412f41014100410010021a20" - "0041b0016a2203101a200041f0006a22012003101b200041a8016a4200370300200041a0016a420037030020004198" - "016a4200370300200042003703900102400240024002400240200120004190016a2203102022014120460440200341" - "204100100d220441004a044041858cc00041232004ad10011a200042003703302004200041306a2201410810212203" - "41004c0d022003410846044041a88cc000412a420810011a41d28cc000412e20014108410110021a0c060b41808dc0" - "00412e2003ad10011a200041106a200041306a2003101c41ae8dc000411620002802102000280214410110021a0c05" - "0b41e68fc000413c2004ac10011a200041c8016a4200370300200041c0016a4200370300200041b8016a4200370300" - "200042003703b0014101200041b0016a4120102122014100480d020c030b41ba92c000412e2001ac10011a41ef7c21" - "020c050b41c48dc000412b2003ac10011a0c020b41a290c00041c1002001ac10011a0b200041cc006a410036000020" - "004100360049200041013a00484101200041c8006a200041b0016a10222201410048044041e390c00041352001ac10" - "011a0b4101102322014100480440419891c00041322001ac10011a0b4101200041c8006a10242201410048044041ca" - "91c00041392001ac10011a0b418392c000413741014100410010021a0c010b200041cc006a41003600002000410036" - "0049200041013a0048200041c8016a4200370300200041c0016a4200370300200041b8016a42003703002000420037" - "03b00102402004200041c8006a200041b0016a22011022220341004e044041ef8dc000411b2003ad10011a20004108" - "6a20012003101d418a8ec00041142000280208200028020c410110021a0c010b419e8ec00041312003ac10011a0b41" - "cf8ec000412320041023ac10011a02402004200041c8006a1024220141004e044041f28ec000411b2001ad10011a0c" - "010b418d8fc00041352001ac10011a0b41c28fc000412441014100410010021a0b41e892c000412f41014100410010" - "021a200041b0016a2201101a200041306a22042001101b200041e0006a4200370300200041d8006a42003703002000" - "41d0006a420037030020004200370348024002400240024002402004200041c8006a22031020220141204604404197" - "93c000410f20034120410110021a20004188016a420037030020004180016a4200370300200041f8006a4200370300" - "200042003703700240200441142004411441a693c0004109200041f0006a22014120100e220341004a044020002001" - "2003101d41ae93c000411220002802002000280204410110021a0c010b41c093c000413c2003ac10011a0b200041a8" - "016a22064200370300200041a0016a2202420037030020004198016a22054200370300200042003703900120004180" - "808cc07e360268200041306a22034114200041e8006a410420004190016a22084120100f22014120470d0141fc93c0" - "00410e20084120410110021a200041c8016a4200370300200041c0016a4200370300200041b8016a42003703002000" - "42003703b001200041808080d00236026c20034114200041ec006a4104200041b0016a22044120101022014120470d" - "02418a94c000410e20044120410110021a419894c000412441014100410010021a419195c000412541014100410010" - "021a20004188016a420037030020004180016a4200370300200041f8006a42003703002000420037037041b695c000" - "4117200041f0006a22034120101122014120470d0341cd95c000410b41b695c0004117410110021a41d895c0004111" - "20034120410110021a2004101a200041c8006a22072004101b20064200370300200242003703002005420037030020" - "0042003703900102404100200422026b410371220320026a220520024d0d0020030440200321010340200241003a00" - "00200241016a2102200141016b22010d000b0b200341016b4107490d000340200241003a0000200241076a41003a00" - "00200241066a41003a0000200241056a41003a0000200241046a41003a0000200241036a41003a0000200241026a41" - "003a0000200241016a41003a0000200241086a22022005470d000b0b200541800220036b2201417c716a220220054b" - "0440034020054100360200200541046a22052002490d000b0b024020022001410371220120026a22034f0d00200122" - "0504400340200241003a0000200241016a2102200541016b22050d000b0b200141016b4107490d000340200241003a" - "0000200241076a41003a0000200241066a41003a0000200241056a41003a0000200241046a41003a0000200241036a" - "41003a0000200241026a41003a0000200241016a41003a0000200241086a22022003470d000b0b0240200741142008" - "412020044180021012220141004a044041e995c00041102001ad10011a20014181024f0d0641f995c0004109200420" - "01410110021a0c010b418296c000412e2001ac10011a0b41b096c000411241c296c00041074101100222014100480d" - "0541c996c000411d2001ad10011a41e696c0004111422a1001410048044041ad97c000411a42a47b10011a41a47b21" - "020c070b41f796c000411c420010011a41012102419397c000411a41014100410010021a41ff97c000412941014100" - "410010021a41a898c000412810132201412846044041d098c000412741a898c0004128410110021a41f798c000411e" - "41014100410010021a41bf80c000412841014100410010021a0c070b419599c000411a2001ac10011a41c37a21020c" - "060b41f494c000411d2001ac10011a418b7c21020c050b41d894c000411c2001ac10011a41897c21020c040b41bc94" - "c000411c2001ac10011a41887c21020c030b41dd97c00041222001ac10011a41a77b21020c020b000b41c797c00041" - "162001ac10011a41a57b21020b200041b0036a240020020b0d00200020012002411410191a0b0c0020004114200141" - "2010180b0e002000418280182001200210140b0e002000200141082002412010150b0a0020004183803c10160b0a00" - "20002001410810170b0bb9190100418080c0000baf196572726f725f636f64653d3d3d3d20484f53542046554e4354" - "494f4e532054455354203d3d3d54657374696e6720323620686f73742066756e6374696f6e73535543434553533a20" - "416c6c20686f73742066756e6374696f6e20746573747320706173736564212d2d2d2043617465676f727920313a20" - "4c6564676572204865616465722046756e6374696f6e73202d2d2d4c65646765722073657175656e6365206e756d62" - "65723a506172656e74206c65646765722074696d653a506172656e74206c656467657220686173683a535543434553" - "533a204c6564676572206865616465722066756e6374696f6e734552524f523a206765745f706172656e745f6c6564" - "6765725f686173682077726f6e67206c656e6774683a4552524f523a206765745f706172656e745f6c65646765725f" - "74696d65206661696c65643a4552524f523a206765745f6c65646765725f73716e206661696c65643a2d2d2d204361" - "7465676f727920323a205472616e73616374696f6e20446174612046756e6374696f6e73202d2d2d5472616e736163" - "74696f6e204163636f756e743a5472616e73616374696f6e20466565206c656e6774683a5472616e73616374696f6e" - "20466565202873657269616c697a65642058525020616d6f756e74293a5472616e73616374696f6e2053657175656e" - "63653a4e6573746564206669656c64206c656e6774683a4e6573746564206669656c643a494e464f3a206765745f74" - "785f6e65737465645f6669656c64206e6f74206170706c696361626c653a5369676e657273206172726179206c656e" - "6774683a4d656d6f73206172726179206c656e6774683a4e6573746564206172726179206c656e6774683a494e464f" - "3a206765745f74785f6e65737465645f61727261795f6c656e206e6f74206170706c696361626c653a535543434553" - "533a205472616e73616374696f6e20646174612066756e6374696f6e734552524f523a206765745f74785f6669656c" - "642853657175656e6365292077726f6e67206c656e6774683a4552524f523a206765745f74785f6669656c64284665" - "65292077726f6e67206c656e67746820286578706563746564203820627974657320666f7220585250293a4552524f" - "523a206765745f74785f6669656c64284163636f756e74292077726f6e67206c656e6774683a2d2d2d204361746567" - "6f727920333a2043757272656e74204c6564676572204f626a6563742046756e6374696f6e73202d2d2d4375727265" - "6e74206f626a6563742062616c616e6365206c656e677468202858525020616d6f756e74293a43757272656e74206f" - "626a6563742062616c616e6365202873657269616c697a65642058525020616d6f756e74293a43757272656e74206f" - "626a6563742062616c616e6365206c656e67746820286e6f6e2d58525020616d6f756e74293a43757272656e74206f" - "626a6563742062616c616e63653a494e464f3a206765745f63757272656e745f6c65646765725f6f626a5f6669656c" - "642842616c616e636529206661696c656420286d6179206265206578706563746564293a43757272656e74206c6564" - "676572206f626a656374206163636f756e743a494e464f3a206765745f63757272656e745f6c65646765725f6f626a" - "5f6669656c64284163636f756e7429206661696c65643a43757272656e74206e6573746564206669656c64206c656e" - "6774683a43757272656e74206e6573746564206669656c643a494e464f3a206765745f63757272656e745f6c656467" - "65725f6f626a5f6e65737465645f6669656c64206e6f74206170706c696361626c653a43757272656e74206f626a65" - "6374205369676e657273206172726179206c656e6774683a43757272656e74206e6573746564206172726179206c65" - "6e6774683a494e464f3a206765745f63757272656e745f6c65646765725f6f626a5f6e65737465645f61727261795f" - "6c656e206e6f74206170706c696361626c653a535543434553533a2043757272656e74206c6564676572206f626a65" - "63742066756e6374696f6e732d2d2d2043617465676f727920343a20416e79204c6564676572204f626a6563742046" - "756e6374696f6e73202d2d2d5375636365737366756c6c7920636163686564206f626a65637420696e20736c6f743a" - "436163686564206f626a6563742062616c616e6365206c656e677468202858525020616d6f756e74293a4361636865" - "64206f626a6563742062616c616e6365202873657269616c697a65642058525020616d6f756e74293a436163686564" - "206f626a6563742062616c616e6365206c656e67746820286e6f6e2d58525020616d6f756e74293a43616368656420" - "6f626a6563742062616c616e63653a494e464f3a206765745f6c65646765725f6f626a5f6669656c642842616c616e" - "636529206661696c65643a436163686564206e6573746564206669656c64206c656e6774683a436163686564206e65" - "73746564206669656c643a494e464f3a206765745f6c65646765725f6f626a5f6e65737465645f6669656c64206e6f" - "74206170706c696361626c653a436163686564206f626a656374205369676e657273206172726179206c656e677468" - "3a436163686564206e6573746564206172726179206c656e6774683a494e464f3a206765745f6c65646765725f6f62" - "6a5f6e65737465645f61727261795f6c656e206e6f74206170706c696361626c653a535543434553533a20416e7920" - "6c6564676572206f626a6563742066756e6374696f6e73494e464f3a2063616368655f6c65646765725f6f626a2066" - "61696c65642028657870656374656420776974682074657374206669787475726573293a494e464f3a206765745f6c" - "65646765725f6f626a5f6669656c64206661696c656420617320657870656374656420286e6f20636163686564206f" - "626a656374293a494e464f3a206765745f6c65646765725f6f626a5f6e65737465645f6669656c64206661696c6564" - "2061732065787065637465643a494e464f3a206765745f6c65646765725f6f626a5f61727261795f6c656e20666169" - "6c65642061732065787065637465643a494e464f3a206765745f6c65646765725f6f626a5f6e65737465645f617272" - "61795f6c656e206661696c65642061732065787065637465643a535543434553533a20416e79206c6564676572206f" - "626a6563742066756e6374696f6e732028696e7465726661636520746573746564294552524f523a206163636f756e" - "74726f6f745f6964206661696c656420666f722063616368696e6720746573743a2d2d2d2043617465676f72792035" - "3a204b65796c65742047656e65726174696f6e2046756e6374696f6e73202d2d2d4163636f756e74206b65796c6574" - "3a546573745479706543726564656e7469616c206b65796c65743a494e464f3a2063726564656e7469616c5f6b6579" - "6c6574206661696c656420286578706563746564202d20696e74657266616365206973737565293a457363726f7720" - "6b65796c65743a4f7261636c65206b65796c65743a535543434553533a204b65796c65742067656e65726174696f6e" - "2066756e6374696f6e734552524f523a206f7261636c655f6b65796c6574206661696c65643a4552524f523a206573" - "63726f775f6b65796c6574206661696c65643a4552524f523a206163636f756e74726f6f745f6964206661696c6564" - "3a2d2d2d2043617465676f727920363a205574696c6974792046756e6374696f6e73202d2d2d48656c6c6f2c205852" - "504c205741534d20776f726c6421496e70757420646174613a5348413531322068616c6620686173683a4e46542064" - "617461206c656e6774683a4e465420646174613a494e464f3a206765745f6e6674206661696c656420286578706563" - "746564202d206e6f2073756368204e4654293a54657374207472616365206d6573736167657061796c6f6164547261" - "63652066756e6374696f6e206279746573207772697474656e3a54657374206e756d62657220747261636554726163" - "655f6e756d2066756e6374696f6e20737563636565646564535543434553533a205574696c6974792066756e637469" - "6f6e734552524f523a2074726163655f6e756d2829206661696c65643a4552524f523a207472616365282920666169" - "6c65643a4552524f523a20636f6d707574655f7368613531325f68616c66206661696c65643a2d2d2d204361746567" - "6f727920373a2044617461205570646174652046756e6374696f6e73202d2d2d55706461746564206c656467657220" - "656e74727920646174612066726f6d205741534d20746573745375636365737366756c6c792075706461746564206c" - "656467657220656e74727920776974683a535543434553533a2044617461207570646174652066756e6374696f6e73" - "4552524f523a207570646174655f64617461206661696c65643a004d0970726f64756365727302086c616e67756167" - "65010452757374000c70726f6365737365642d6279010572757374631d312e38372e30202831373036376539616320" - "323032352d30352d303929002c0f7461726765745f6665617475726573022b0f6d757461626c652d676c6f62616c73" - "2b087369676e2d657874"; + "0061736d0100000001550c60027f7f017f60037f7f7f017f60047f7f7f7f017f60017f017f60067f7f7f7f7f7f017f" + "60037f7f7f0060057f7f7f7f7f0060087f7f7f7f7f7f7f7f017f60057f7f7f7f7f017f60017f0060027f7f00600001" + "7f02b1041808686f73745f6c69620874785f6669656c64000108686f73745f6c6962057472616365000608686f7374" + "5f6c69620a6c6467725f696e646578000008686f73745f6c696210706172656e745f6c6467725f74696d6500000868" + "6f73745f6c696210706172656e745f6c6467725f68617368000008686f73745f6c69620874785f696e6e6572000208" + "686f73745f6c69620a74785f6172725f6c656e000308686f73745f6c69621074785f696e6e65725f6172725f6c656e" + "000008686f73745f6c69620d686f6d655f6c655f6669656c64000108686f73745f6c69620d686f6d655f6c655f696e" + "6e6572000208686f73745f6c69620f686f6d655f6c655f6172725f6c656e000308686f73745f6c696215686f6d655f" + "6c655f696e6e65725f6172725f6c656e000008686f73745f6c69620863616368655f6c65000108686f73745f6c6962" + "0d63726564656e7469616c5f6964000708686f73745f6c696209657363726f775f6964000408686f73745f6c696209" + "6f7261636c655f6964000408686f73745f6c69620b7368613531325f68616c66000208686f73745f6c6962076e6674" + "5f757269000408686f73745f6c6962087365745f64617461000008686f73745f6c69620a6c655f6172725f6c656e00" + "0008686f73745f6c69620e6163636f756e74726f6f745f6964000208686f73745f6c6962106c655f696e6e65725f61" + "72725f6c656e000108686f73745f6c6962086c655f6669656c64000208686f73745f6c6962086c655f696e6e657200" + "08030b0a090a05050b000101030005030100110619037f01418080c0000b7f0041c698c0000b7f0041d098c0000b07" + "3504066d656d6f727902000d657363726f775f66696e697368001c0a5f5f646174615f656e6403010b5f5f68656170" + "5f6261736503020acf210a9d0101027f230041206b2201240020014200370310200142003703082001410036021820" + "00027f024041818020200141086a41141000220241004e0440200241144b0d01200241144704402000418180808078" + "36020441010c030b20002001280218360011200020012903103700092000200129030837000141000c020b20002002" + "36020441010c010b2000417336020441010b3a0000200141206a24000b5a01017f230041106b2202240020012d0000" + "41014604402002200134020437030841df97c000410b4101200241086a41081001000b200020012800113600102000" + "200129000937000820002001290001370000200241106a24000b1900200241214f0440000b20002002360204200020" + "013602000b1900200241094f0440000b20002002360204200020013602000bdd1e01077f230041c0036b2200240041" + "ea97c000411b4107410141001001418598c0004119410741014100100141b583c000412b4107410141001001200041" + "003602500240024002400240024002400240200041d0006a41041002220141004a044020002000280250220141ff81" + "fc0771410878200141187841ff81fc077172ad3703c00141e083c00041174101200041c0016a220241081001200041" + "003602800120004180016a41041003220141004c0d012000200028028001220141ff81fc0771410878200141187841" + "ff81fc077172ad3703c00141f783c00041134101200241081001200042003703d801200042003703d0012000420037" + "03c801200042003703c0012002412010042201412047044020002001ac3703a00141bd84c000412b4101200041a001" + "6a4108100141997f21030c080b418a84c00041134106200041c0016a220441201001419d84c0004120410741014100" + "100141aa85c000412e4107410141001001200041003602b001200042003703a801200042003703a001418180202000" + "41a0016a22024114100022014114470d0241d885c00041144104200241141001200042003703384188801820004138" + "6a22024108100022014108470d03200042083703c00141ec85c00041174101200441081001418386c0004128410620" + "02410810012000410036027841848008200041f8006a22024104100022014104470d0441ab86c00041154106200241" + "04100120004100360051200041013a005020004100360054200042003703d801200042003703d001200042003703c8" + "01200042003703c0010240200041d0006a4108200441201005220141004e044020002001ad3703800141c086c00041" + "14410120004180016a41081001200041306a20042001101a41d486c000410d41062000280230200028023410010c01" + "0b20002001ac3703800141e186c0004129410120004180016a410810010b20004183803c1006ac37038001418a87c0" + "004115410120004180016a22024108100120004189803c1006ac37038001419f87c000411341012002410810010240" + "200041d0006a41081007220141004e044020002001ad3703800141b287c000411441012002410810010c010b200020" + "01ac3703800141c687c000412d410120004180016a410810010b41f387c0004123410741014100100141e792c00041" + "3341074101410010012000420037033841828018200041386a220141081008220241004c0d05200241084604402000" + "42083703c001419a93c000412b4101200041c0016a4108100141c593c000412f41062001410810010c070b20002002" + "ad3703c00141f493c000412f4101200041c0016a41081001200041286a200041386a2002101b41a394c00041174106" + "2000280228200028022c10010c060b20002001ac3703c001418d85c000411d4101200041c0016a41081001419b7f21" + "030c060b20002001ac3703c00141e884c00041254101200041c0016a41081001419a7f21030c050b20002001ac3703" + "c001418289c000412a4101200041c0016a4108100141b77e21030c040b20002001ac3703c00141c188c00041c10041" + "01200041c0016a4108100141b67e21030c030b20002001ac3703c001419688c000412b4101200041c0016a41081001" + "41b57e21030c020b20002002ac3703c00141ba94c00041c5004101200041c0016a410810010b200041003602b00120" + "0042003703a801200042003703a001024041818020200041a0016a220241141008220141004a044041ff94c000411e" + "41042002411410010c010b20002001ac3703c001419d95c00041334101200041c0016a410810010b20004100360051" + "200041013a005020004100360054200042003703d801200042003703d001200042003703c801200042003703c00102" + "40200041d0006a4108200041c0016a220141201009220241004e044020002002ad3703800141d095c000411c410120" + "004180016a41081001200041206a20012002101a41ec95c000411541062000280220200028022410010c010b200020" + "02ac37038001418196c0004139410120004180016a410810010b20004183803c100aac3703800141ba96c000412441" + "0120004180016a2201410810010240200041d0006a4108100b220241004e044020002002ad3703800141de96c00041" + "1c41012001410810010c010b20002002ac3703800141fa96c000413d410120004180016a410810010b41b797c00041" + "28410741014100100141ac89c000412f4107410141001001200041c0016a2204101820004180016a22012004101920" + "0042003703b801200042003703b001200042003703a801200042003703a001024002400240024002402001200041a0" + "016a2202101d22014120460440200241204100100c220541004a044020002005ad3703c00141db89c0004123410120" + "0441081001200042003703782005200041f8006a22014108101e220241004c0d0220024108460440200042083703c0" + "0141fe89c000412a410120044108100141a88ac000412e41062001410810010c060b20002002ad3703c00141d68ac0" + "00412e4101200041c0016a41081001200041186a200041f8006a2002101b41848bc000411641062000280218200028" + "021c10010c050b20002005ac3703c00141bc8dc000413c4101200041c0016a220141081001200042003703d8012000" + "42003703d001200042003703c801200042003703c001410120014120101e22014100480d020c030b20002001ac3703" + "c001419090c000412e4101200041c0016a4108100141ef7c21030c050b20002002ac3703c001419a8bc000412b4101" + "200041c0016a410810010c020b20002001ac37035041f88dc00041c1004101200041d0006a410810010b2000410036" + "0039200041013a00382000410036003c4101200041386a200041c0016a101f2201410048044020002001ac37035041" + "b98ec00041354101200041d0006a410810010b410110202201410048044020002001ac37035041ee8ec00041324101" + "200041d0006a410810010b4101200041386a10212201410048044020002001ac37035041a08fc00041394101200041" + "d0006a410810010b41d98fc000413741074101410010010c010b20004100360039200041013a00382000410036003c" + "200042003703d801200042003703d001200042003703c801200042003703c00102402005200041386a200041c0016a" + "2201101f220241004e044020002002ad37035041c58bc000411b4101200041d0006a41081001200041106a20012002" + "101a41e08bc000411441062000280210200028021410010c010b20002002ac37035041f48bc00041314101200041d0" + "006a410810010b200020051020ac37035041a58cc00041234101200041d0006a22014108100102402005200041386a" + "1021220241004e044020002002ad37035041c88cc000411b41012001410810010c010b20002002ac37035041e38cc0" + "0041354101200041d0006a410810010b41988dc000412441074101410010010b41be90c000412f4107410141001001" + "200041c0016a22011018200041386a2204200110192000420037036820004200370360200042003703582000420037" + "0350024002402004200041d0006a2202101d2201412046044041ed90c000410f410620024120100120004200370398" + "012000420037039001200042003703880120004200370380010240200441142004411441fc90c00041092000418001" + "6a22014120100d220241004a0440200041086a20012002101a418491c000411241062000280208200028020c10010c" + "010b20002002ac3703c001419691c000413c4101200041c0016a410810010b200042003703b801200042003703b001" + "200042003703a801200042003703a00120004180808cc07e360270200041386a22044114200041f0006a4104200041" + "a0016a22024120100e22014120470d0141d291c000410e4106200241201001200042003703d801200042003703d001" + "200042003703c801200042003703c001200041808080d00236027420044114200041f4006a4104200041c0016a4120" + "100f2201412047044020002001ac370378419292c000411c4101200041f8006a4108100141887c21030c040b41e091" + "c000410e4106200041c0016a22044120100141ee91c00041244107410141001001418080c000412541074101410010" + "0120004200370398012000420037039001200042003703880120004200370380010240024041a580c0004117200041" + "80016a2202412010102201412046044041bc80c000410b410641a580c0004117100141c780c0004111410620024120" + "100120041018200041d0006a220620041019200042003703b801200042003703b001200042003703a8012000420037" + "03a00102404100200422036b410371220220036a220520034d0d0020020440200221010340200341003a0000200341" + "016a2103200141016b22010d000b0b200241016b4107490d000340200341003a0000200341076a41003a0000200341" + "066a41003a0000200341056a41003a0000200341046a41003a0000200341036a41003a0000200341026a41003a0000" + "200341016a41003a0000200341086a22032005470d000b0b200541800220026b2201417c716a220320054b04400340" + "20054100360200200541046a22052003490d000b0b024020032001410371220120036a22024f0d0020012205044003" + "40200341003a0000200341016a2103200541016b22050d000b0b200141016b4107490d000340200341003a00002003" + "41076a41003a0000200341066a41003a0000200341056a41003a0000200341046a41003a0000200341036a41003a00" + "00200341026a41003a0000200341016a41003a0000200341086a22032002470d000b0b20064114200041a0016a4120" + "20044180021011220141004c0d0120002001ad37033841d880c00041104101200041386a4108100120014181024f0d" + "0541e880c000410941062004200110010c020b20002001ac3703c00141e381c00041224101200041c0016a41081001" + "41a77b21030c050b20002001ac37033841f180c000412e4101200041386a410810010b419f81c0004112410641b181" + "c000410710012000422a3703384101210341b881c00041114101200041386a4108100141c981c000411a4107410141" + "001001418582c0004129410741014100100141ae82c000412810122201412847044020002001ac3703c001419b83c0" + "00411a4101200041c0016a4108100141c37a21030c040b41d682c0004127410641ae82c0004128100141fd82c00041" + "1e4107410141001001419e98c000412841074101410010010c030b20002001ac3703c00141ca92c000411d41012000" + "41c0016a41081001418b7c21030c020b20002001ac3703c00141ae92c000411c4101200041c0016a4108100141897c" + "21030c010b000b200041c0036a240020030b0c00200041142001412010140b0e002000418280182001200210160b0e" + "002000200141082002412010170b0a0020004183803c10130b0a0020002001410810150b0bd0180100418080c0000b" + "c6182d2d2d2043617465676f727920363a205574696c6974792046756e6374696f6e73202d2d2d48656c6c6f2c2058" + "52504c205741534d20776f726c6421496e70757420646174613a5348413531322068616c6620686173683a4e465420" + "64617461206c656e6774683a4e465420646174613a494e464f3a206765745f6e6674206661696c6564202865787065" + "63746564202d206e6f2073756368204e4654293a54657374207472616365206d6573736167657061796c6f61645465" + "7374206e756d626572207472616365535543434553533a205574696c6974792066756e6374696f6e734552524f523a" + "20636f6d707574655f7368613531325f68616c66206661696c65643a2d2d2d2043617465676f727920373a20446174" + "61205570646174652046756e6374696f6e73202d2d2d55706461746564206c656467657220656e7472792064617461" + "2066726f6d205741534d20746573745375636365737366756c6c792075706461746564206c656467657220656e7472" + "7920776974683a535543434553533a2044617461207570646174652066756e6374696f6e734552524f523a20757064" + "6174655f64617461206661696c65643a2d2d2d2043617465676f727920313a204c6564676572204865616465722046" + "756e6374696f6e73202d2d2d4c65646765722073657175656e6365206e756d6265723a506172656e74206c65646765" + "722074696d653a506172656e74206c656467657220686173683a535543434553533a204c6564676572206865616465" + "722066756e6374696f6e734552524f523a206765745f706172656e745f6c65646765725f686173682077726f6e6720" + "6c656e6774683a4552524f523a206765745f706172656e745f6c65646765725f74696d65206661696c65643a455252" + "4f523a206765745f6c65646765725f73716e206661696c65643a2d2d2d2043617465676f727920323a205472616e73" + "616374696f6e20446174612046756e6374696f6e73202d2d2d5472616e73616374696f6e204163636f756e743a5472" + "616e73616374696f6e20466565206c656e6774683a5472616e73616374696f6e20466565202873657269616c697a65" + "642058525020616d6f756e74293a5472616e73616374696f6e2053657175656e63653a4e6573746564206669656c64" + "206c656e6774683a4e6573746564206669656c643a494e464f3a206765745f74785f6e65737465645f6669656c6420" + "6e6f74206170706c696361626c653a5369676e657273206172726179206c656e6774683a4d656d6f73206172726179" + "206c656e6774683a4e6573746564206172726179206c656e6774683a494e464f3a206765745f74785f6e6573746564" + "5f61727261795f6c656e206e6f74206170706c696361626c653a535543434553533a205472616e73616374696f6e20" + "646174612066756e6374696f6e734552524f523a206765745f74785f6669656c642853657175656e6365292077726f" + "6e67206c656e6774683a4552524f523a206765745f74785f6669656c6428466565292077726f6e67206c656e677468" + "20286578706563746564203820627974657320666f7220585250293a4552524f523a206765745f74785f6669656c64" + "284163636f756e74292077726f6e67206c656e6774683a2d2d2d2043617465676f727920343a20416e79204c656467" + "6572204f626a6563742046756e6374696f6e73202d2d2d5375636365737366756c6c7920636163686564206f626a65" + "637420696e20736c6f743a436163686564206f626a6563742062616c616e6365206c656e677468202858525020616d" + "6f756e74293a436163686564206f626a6563742062616c616e6365202873657269616c697a65642058525020616d6f" + "756e74293a436163686564206f626a6563742062616c616e6365206c656e67746820286e6f6e2d58525020616d6f75" + "6e74293a436163686564206f626a6563742062616c616e63653a494e464f3a206765745f6c65646765725f6f626a5f" + "6669656c642842616c616e636529206661696c65643a436163686564206e6573746564206669656c64206c656e6774" + "683a436163686564206e6573746564206669656c643a494e464f3a206765745f6c65646765725f6f626a5f6e657374" + "65645f6669656c64206e6f74206170706c696361626c653a436163686564206f626a656374205369676e6572732061" + "72726179206c656e6774683a436163686564206e6573746564206172726179206c656e6774683a494e464f3a206765" + "745f6c65646765725f6f626a5f6e65737465645f61727261795f6c656e206e6f74206170706c696361626c653a5355" + "43434553533a20416e79206c6564676572206f626a6563742066756e6374696f6e73494e464f3a2063616368655f6c" + "65646765725f6f626a206661696c65642028657870656374656420776974682074657374206669787475726573293a" + "494e464f3a206765745f6c65646765725f6f626a5f6669656c64206661696c65642061732065787065637465642028" + "6e6f20636163686564206f626a656374293a494e464f3a206765745f6c65646765725f6f626a5f6e65737465645f66" + "69656c64206661696c65642061732065787065637465643a494e464f3a206765745f6c65646765725f6f626a5f6172" + "7261795f6c656e206661696c65642061732065787065637465643a494e464f3a206765745f6c65646765725f6f626a" + "5f6e65737465645f61727261795f6c656e206661696c65642061732065787065637465643a535543434553533a2041" + "6e79206c6564676572206f626a6563742066756e6374696f6e732028696e7465726661636520746573746564294552" + "524f523a206163636f756e74726f6f745f6964206661696c656420666f722063616368696e6720746573743a2d2d2d" + "2043617465676f727920353a204b65796c65742047656e65726174696f6e2046756e6374696f6e73202d2d2d416363" + "6f756e74206b65796c65743a546573745479706543726564656e7469616c206b65796c65743a494e464f3a20637265" + "64656e7469616c5f6b65796c6574206661696c656420286578706563746564202d20696e7465726661636520697373" + "7565293a457363726f77206b65796c65743a4f7261636c65206b65796c65743a535543434553533a204b65796c6574" + "2067656e65726174696f6e2066756e6374696f6e734552524f523a206f7261636c655f6b65796c6574206661696c65" + "643a4552524f523a20657363726f775f6b65796c6574206661696c65643a4552524f523a206163636f756e74726f6f" + "745f6964206661696c65643a2d2d2d2043617465676f727920333a2043757272656e74204c6564676572204f626a65" + "63742046756e6374696f6e73202d2d2d43757272656e74206f626a6563742062616c616e6365206c656e6774682028" + "58525020616d6f756e74293a43757272656e74206f626a6563742062616c616e6365202873657269616c697a656420" + "58525020616d6f756e74293a43757272656e74206f626a6563742062616c616e6365206c656e67746820286e6f6e2d" + "58525020616d6f756e74293a43757272656e74206f626a6563742062616c616e63653a494e464f3a206765745f6375" + "7272656e745f6c65646765725f6f626a5f6669656c642842616c616e636529206661696c656420286d617920626520" + "6578706563746564293a43757272656e74206c6564676572206f626a656374206163636f756e743a494e464f3a2067" + "65745f63757272656e745f6c65646765725f6f626a5f6669656c64284163636f756e7429206661696c65643a437572" + "72656e74206e6573746564206669656c64206c656e6774683a43757272656e74206e6573746564206669656c643a49" + "4e464f3a206765745f63757272656e745f6c65646765725f6f626a5f6e65737465645f6669656c64206e6f74206170" + "706c696361626c653a43757272656e74206f626a656374205369676e657273206172726179206c656e6774683a4375" + "7272656e74206e6573746564206172726179206c656e6774683a494e464f3a206765745f63757272656e745f6c6564" + "6765725f6f626a5f6e65737465645f61727261795f6c656e206e6f74206170706c696361626c653a53554343455353" + "3a2043757272656e74206c6564676572206f626a6563742066756e6374696f6e736572726f725f636f64653d3d3d3d" + "20484f53542046554e4354494f4e532054455354203d3d3d54657374696e6720323620686f73742066756e6374696f" + "6e73535543434553533a20416c6c20686f73742066756e6374696f6e2074657374732070617373656421004d097072" + "6f64756365727302086c616e6775616765010452757374000c70726f6365737365642d6279010572757374631d312e" + "39352e30202835393830373631366520323032362d30342d313429002c0f7461726765745f6665617475726573022b" + "0f6d757461626c652d676c6f62616c732b087369676e2d657874"; extern std::string const kAllKeyletsWasmHex = "0061736d0100000001500a60067f7f7f7f7f7f017f60047f7f7f7f017f60087f7f7f7f7f7f7f7f017f60047f7f7f7f" @@ -395,245 +401,233 @@ extern std::string const kAllKeyletsWasmHex = "5f6665617475726573022b0f6d757461626c652d676c6f62616c732b087369676e2d657874"; extern std::string const kCodecovTestsWasmHex = - "0061736d0100000001570b60067f7f7f7f7f7f017f60047f7f7f7f017f60027f7f017f60037f7f7f017f60077f7f7f" - "7f7f7f7f017f60057f7f7f7f7f017f60087f7f7f7f7f7f7f7f017f60017f017f60037f7f7e017f60047f7f7f7f0060" - "00017f02c60a3b08686f73745f6c6962057472616365000508686f73745f6c69620974726163655f6e756d00080868" - "6f73745f6c69620a6c6467725f696e646578000208686f73745f6c696210706172656e745f6c6467725f74696d6500" - "0208686f73745f6c696210706172656e745f6c6467725f68617368000208686f73745f6c696208626173655f666565" - "000208686f73745f6c696211616d656e646d656e745f656e61626c6564000208686f73745f6c69620874785f666965" - "6c64000308686f73745f6c69620e6163636f756e74726f6f745f6964000108686f73745f6c69620863616368655f6c" - "65000308686f73745f6c69620d686f6d655f6c655f6669656c64000308686f73745f6c6962086c655f6669656c6400" - "0108686f73745f6c69620874785f696e6e6572000108686f73745f6c69620d686f6d655f6c655f696e6e6572000108" - "686f73745f6c6962086c655f696e6e6572000508686f73745f6c69620a74785f6172725f6c656e000708686f73745f" - "6c69620f686f6d655f6c655f6172725f6c656e000708686f73745f6c69620a6c655f6172725f6c656e000208686f73" - "745f6c69621074785f696e6e65725f6172725f6c656e000208686f73745f6c696215686f6d655f6c655f696e6e6572" - "5f6172725f6c656e000208686f73745f6c6962106c655f696e6e65725f6172725f6c656e000308686f73745f6c6962" - "087365745f64617461000208686f73745f6c69620b7368613531325f68616c66000108686f73745f6c696209636865" - "636b5f736967000008686f73745f6c6962076e66745f757269000008686f73745f6c69620a6e66745f697373756572" - "000108686f73745f6c6962096e66745f7461786f6e000108686f73745f6c6962096e66745f666c616773000208686f" - "73745f6c69620c6e66745f786665725f666565000208686f73745f6c69620a6e66745f73657269616c000108686f73" - "745f6c69620a74726163655f61636374000108686f73745f6c69620974726163655f616d74000108686f73745f6c69" - "6208636865636b5f6964000008686f73745f6c69620f666c6f61745f66726f6d5f75696e74000508686f73745f6c69" - "620c74727573746c696e655f6964000608686f73745f6c696206616d6d5f6964000008686f73745f6c69620d637265" - "64656e7469616c5f6964000608686f73745f6c69620a6d70746f6b656e5f6964000008686f73745f6c69620c747261" - "63655f78666c6f6174000108686f73745f6c696209666c6f61745f636d70000108686f73745f6c696209666c6f6174" - "5f616464000408686f73745f6c696209666c6f61745f737562000408686f73745f6c69620a666c6f61745f6d756c74" - "000408686f73745f6c696209666c6f61745f646976000408686f73745f6c69620a666c6f61745f726f6f7400000868" - "6f73745f6c696209666c6f61745f706f77000008686f73745f6c696209657363726f775f6964000008686f73745f6c" - "69620f6d70745f69737375616e63655f6964000008686f73745f6c69620c6e66745f6f666665725f6964000008686f" - "73745f6c6962086f666665725f6964000008686f73745f6c6962096f7261636c655f6964000008686f73745f6c6962" - "0a7061796368616e5f6964000608686f73745f6c6962167065726d697373696f6e65645f646f6d61696e5f69640000" - "08686f73745f6c6962097469636b65745f6964000008686f73745f6c6962087661756c745f6964000008686f73745f" - "6c69620b64656c65676174655f6964000008686f73745f6c6962126465706f7369745f707265617574685f69640000" - "08686f73745f6c6962066469645f6964000108686f73745f6c69620a7369676e6572735f69640001030302090a0503" - "0100110619037f01418080c0000b7f0041cf9bc0000b7f0041d09bc0000b073504066d656d6f727902000d65736372" - "6f775f66696e697368003c0a5f5f646174615f656e6403010b5f5f686561705f6261736503020a8c2f024600024020" - "0020014704402002200341014100410010001a20004100480d01418b80c000410b2000ad1001000b200220032000ac" - "10011a0f0b418b80c000410b2000ac1001000bc22e020b7f017e23004190026b22002400419680c000412341014100" - "410010001a20004100360260200041e0006a220241041002410441888ac000410a103b200041003602602002410410" - "03410441928ac0004110103b200041f8006a22054200370300200041f0006a22014200370300200041e8006a220642" - "0037030020004200370360200241201004412041a28ac0004110103b20004100360260200241041005410441b28ac0" - "004108103b200041106a2208428182848890a0c08001370300200041186a2209428182848890a0c080013703002000" - "41206a220a428182848890a0c080013703002000428182848890a0c0800137030841b980c000410e1006410141c780" - "c0004111103b200041086a41201006410141c780c0004111103b418180202002411410072203411446044002402000" - "412e6a200041e2006a2d00003a0000200020002900673703e8012000200041ec006a2900003700ed01200020002f00" - "603b012c200020002903e8013703a801200020002900ed013700ad012000200028006336002f200041386a20002900" - "ad01370000200020002903a80137003320054200370300200142003703002006420037030020004200370360200041" - "2c6a2205411420024120100822034120470d00200041c2006a20002d00623a0000200041f0016a2207200041ef006a" - "290000220b370300200041cf006a200b370000200041d7006a200041f7006a290000370000200041df006a200041ff" - "006a2d00003a0000200020002f01603b01402000200028006336004320002000290067370047200041406b41204100" - "1009410141d880c0004108103b2001410036020020064200370300200042003703604181802020024114100a411441" - "ba8ac000410d103b20014100360200200642003703002000420037036041014181802020024114100b411441c78ac0" - "004108103b02404100200041e4006a22046b410371220320046a220120044d0d002003044020032106034020044100" - "3a0000200441016a2104200641016b22060d000b0b200341016b4107490d000340200441003a0000200441076a4100" - "3a0000200441066a41003a0000200441056a41003a0000200441046a41003a0000200441036a41003a000020044102" - "6a41003a0000200441016a41003a0000200441086a22042001470d000b0b2001413c20036b2203417c716a22042001" - "4b0440034020014100360200200141046a22012004490d000b0b024020042003410371220320046a22064f0d002003" - "220104400340200441003a0000200441016a2104200141016b22010d000b0b200341016b4107490d00034020044100" - "3a0000200441076a41003a0000200441066a41003a0000200441056a41003a0000200441046a41003a000020044103" - "6a41003a0000200441026a41003a0000200441016a41003a0000200441086a22042006470d000b0b200041043602a0" - "01200041818020360260200041f8016a2203410036020020074200370300200042003703e80120024104200041e801" - "6a22014114100c411441cf8ac0004108103b2003410036020020074200370300200042003703e801200220002802a0" - "0120014114100d411441d78ac000410d103b2003410036020020074200370300200042003703e80141012002200028" - "02a00120014114100e411441e48ac0004108103b4189803c100f412041e080c000410a103b4189803c1010412041ea" - "80c000410f103b41014189803c1011412041f980c000410a103b200220002802a00110124120418381c0004110103b" - "200220002802a00110134120419381c0004115103b4101200220002802a0011014412041a881c0004110103b200541" - "141015411441b881c0004108103b20004180026a220642003703002003420037030020074200370300200042003703" - "e801200220002802a001200141201016412041ec8ac000410b103b41c081c000410c41cc81c000410b41d781c00041" - "0e1017410141e581c0004109103b200041c0016a200a290300370300200041b8016a2009290300370300200041b001" - "6a2008290300370300200020002903083703a801200341003b010020074200370300200042003703e8012005411420" - "0041a8016a22044120200141121018411241f78ac0004107103b2003410036020020074200370300200042003703e8" - "0120044120200141141019411441fe8ac000410a103b200041003602e8012004412020014104101a410441888bc000" - "4109103b20044120101b410841ee81c0004109103b20044120101c410a41f781c000410c103b200041003602e80120" - "04412020014104101d410441918bc000410a103b418382c000410d20054114101e4100419082c000410a103b418382" - "c000410d419a82c0004108101f410041a282c0004109103b418382c000410d41ab82c0004108101f410041b382c000" - "410e103b417f41041004417141c182c0004118103b200041003602e8012001417f10044171419b8bc0004118103b20" - "0041ea016a41003a0000200041003b01e801200141031004417d41b38bc000411e103b200041003602e80120014180" - "94ebdc031004417341d18bc000411d103b4102100f416f41d982c0004119103b417f20002802a0011012417141f282" - "c0004118103b2002417f10124171418a83c0004118103b20024181081012417441a283c0004119103b200041e094eb" - "dc036a220820002802a0011012417341bb83c0004118103b2006420037030020034200370300200742003703002000" - "42003703e8012005411420084108200141201020417341ee8bc0004114103b20064200370300200342003703002007" - "4200370300200042003703e8012005411420054114200141201020417141828cc0004116103b200642003703002003" - "420037030020074200370300200042003703e801200841082001412041001021417341988cc0004117103b20064200" - "3703002003420037030020074200370300200042003703e801200220002802a0012001412041001021417141af8cc0" - "004120103b200820002802a00141011009417341d383c0004110103b200220002802a00141011009417141e383c000" - "4112103b200642003703002003420037030020074200370300200042003703e801200820002802a001200141201008" - "417341cf8cc0004116103b200642003703002003420037030020074200370300200042003703e801200220002802a0" - "01200141201008417141e58cc0004118103b200642003703002003420037030020074200370300200042003703e801" - "2005411420054114200820002802a001200141201022417341fd8cc000411d103b2006420037030020034200370300" - "20074200370300200042003703e8012005411420054114200220002802a0012001412010224171419a8dc000411f10" - "3b200642003703002003420037030020074200370300200042003703e80141bb9bc0004114200820002802a0012001" - "41201023417341b98dc0004115103b200642003703002003420037030020074200370300200042003703e80141bb9b" - "c0004114200220002802a001200141201023417141ce8dc000411b103b200642003703002003420037030020074200" - "370300200042003703e80141bb9bc000411441f583c0004114200141201023417141e98dc0004125103b2006420037" - "03002003420037030020074200370300200042003703e801418984c000412841bb9bc0004114200141201023417141" - "8e8ec0004121103b200041dc016a2000413c6a280100360200200041d4016a200041346a2901003702002000200029" - "012c3702cc01200041808080083602c801200041003b01e801200041c8016a2209411841bb9bc00041142001410210" - "23417141af8ec000410a103b200820002802a001422a1001417341b184c0004111103b200041003b01e80141022001" - "41021007416f41b98ec0004117103b200041003b01e801410220014102100a416f41d08ec000411c103b200041003b" - "01e8014101410220014102100b416f41ec8ec0004117103b4102100f416f41d982c0004119103b41021010416f41c2" - "84c000411e103b410141021011416f41e084c0004119103b41b980c0004181081006417441f984c000411f103b41b9" - "80c00041c10010064174419885c000411a103b200041003b01e801200241810820014102100c417441838fc0004116" - "103b200041003b01e801200241810820014102100d417441998fc000411b103b200041003b01e80141012002418108" - "20014102100e417441b48fc0004116103b20024181081012417441b285c000411e103b20024181081013417441d085" - "c0004123103b410120024181081014417441f385c000411e103b200241812010154174419186c0004116103b418382" - "c00041810841cc81c000410b41d781c000410e1017417441e581c0004109103b418382c000410d41cc81c000418108" - "41d781c000410e1017417441e581c0004109103b418382c000410d41cc81c000410b41d781c0004181081017417441" - "e581c0004109103b200041003b01e8012002418108200141021016417441ca8fc0004119103b200041003b01e80141" - "bb9bc00041810841bb9bc0004114200141021023417441e38fc0004114103b200041003b01e8012005411420054114" - "2002418108200141021024417441f78fc000411b103b200041003b01e8012009418108200541142001410210254174" - "419290c000411e103b418382c000410d200820002802a00141001000417341a786c000410f103b200042d487b6f4c7" - "d4b1c0003700e001418382c000410d200041e095ebdc036a220441081026417341b686c0004116103b418382c00041" - "0d200820002802a001101f417341cc86c0004113103b20044108200041e0016a220841081027417341df86c0004114" - "103b20084108200441081027417341f386c0004114103b200041003b01e80120044108200841082001410241001028" - "417341b090c0004114103b200041003b01e80120084108200441082001410241001028417341c490c0004114103b20" - "0041003b01e80120044108200841082001410241001029417341d890c0004114103b200041003b01e8012008410820" - "0441082001410241001029417341ec90c0004114103b200041003b01e8012004410820084108200141024100102a41" - "73418091c0004115103b200041003b01e8012008410820044108200141024100102a4173419591c0004115103b2000" - "41003b01e8012004410820084108200141024100102b417341aa91c0004114103b200041003b01e801200841082004" - "4108200141024100102b417341be91c0004114103b200041003b01e801200441084103200141024100102c417341d2" - "91c0004114103b200041003b01e801200441084103200141024100102d417341e691c0004113103b20064200370300" - "2003420037030020074200370300200042003703e801200541142005411420014120102e417141f991c000411b103b" - "200642003703002003420037030020074200370300200042003703e801200541142005411420014120102f41714194" - "92c0004121103b200642003703002003420037030020074200370300200042003703e8012005411420054114200141" - "201030417141b592c000411e103b200642003703002003420037030020074200370300200042003703e80120054114" - "20054114200141201031417141d392c000411a103b2006420037030020034200370300200742003703002000420037" - "03e8012005411420054114200141201032417141ed92c000411b103b20064200370300200342003703002007420037" - "0300200042003703e8012005411420054114200541142001412010334171418893c000411c103b2006420037030020" - "03420037030020074200370300200042003703e8012005411420054114200141201034417141a493c0004128103b20" - "0642003703002003420037030020074200370300200042003703e8012005411420054114200141201035417141cc93" - "c000411b103b200642003703002003420037030020074200370300200042003703e801200541142005411420014120" - "1036417141e793c000411a103b200220002802a001410010094171418787c000411b103b200041003b01e801200541" - "14200220002802a0012001410210184171418194c000411a103b200041003b01e801200220002802a0012001410210" - "194171419b94c000411d103b200041003b01e801200220002802a00120014102101a417141b894c000411c103b2002" - "20002802a001101b417141a287c000411c103b200220002802a001101c417141be87c000411f103b200041003602e8" - "01200220002802a00120014104101d417141d494c000411d103b200041003b01e801200220002802a0012001410210" - "08417141f194c0004124103b200041808080083602e801200041003b018e02200220002802a001200141042000418e" - "026a2203410210204171419595c000411e103b200041003b018e02200220002802a001220620054114200220062003" - "41021024417141b395c0004124103b200041003b018e0220054114200220002802a001220620022006200341021024" - "417141d795c0004124103b200041003b018e02200220002802a00120054114200341021037417141fb95c000412210" - "3b200041003b018e0220054114200220002802a0012003410210374171419d96c0004122103b200041003b018e0220" - "0220002802a00120054114200341021038417141bf96c0004129103b200041003b018e0220054114200220002802a0" - "01200341021038417141e896c0004129103b200041003b018e02200220002802a0012003410210394171419197c000" - "411c103b200041003b018e02200220002802a0012001410420034102102e417141ad97c000411f103b200041003b01" - "8e02200220002802a0012005411441f583c0004114200341021022417141cc97c0004123103b200041003b018e0220" - "054114200220002802a00141f583c0004114200341021022417141ef97c0004123103b200041003b018e0220022000" - "2802a0012001410420034102102f4171419298c0004125103b200041003b018e0220094118200220002802a0012003" - "41021025417141b798c0004120103b200041003b018e02200220002802a00120014104200341021030417141d798c0" - "004122103b200041003b018e02200220002802a00120014104200341021031417141f998c000411e103b200041003b" - "018e02200220002802a001200141042003410210324171419799c000411f103b200041003b018e02200220002802a0" - "012005411420014104200341021033417141b699c0004121103b200041003b018e0220054114200220002802a00120" - "014104200341021033417141d799c0004121103b200041003b018e02200220002802a0012001410420034102103441" - "7141f899c000412c103b200041003b018e02200220002802a00120034102103a417141a49ac0004120103b20004100" - "3b018e02200220002802a00120014104200341021035417141c49ac000411f103b200041003b018e02200220002802" - "a00120014104200341021036417141e39ac000411e103b200041003b018e02200220002802a00141dd87c000412020" - "0341021018417141819bc000411d103b418382c000410d200220002802a001101e417141fd87c0004120103b418396" - "abdd03410d41dd87c0004120410010004173419d88c0004110103b418396abdd03410d200841081026417341ad88c0" - "004117103b418396abdd03410d20054114101e417341c488c0004115103b418396abdd03410d41ab82c0004108101f" - "417341d988c0004114103b200220002802a001200241810841001000417441ed88c000410e103b2002418108420110" - "01417441fb88c0004112103b418382c0004181082008410810264174418d89c0004115103b418382c0004181082005" - "4114101e417441a289c0004113103b418382c00041810841ab82c0004108101f417441b589c0004112103b418382c0" - "00410d200220002802a001101f417141c789c0004116103b200041003b018e02200220002802a00120054114200341" - "0210254171419e9bc000411d103b418382c000410d200220002802a00141021000417141dd89c0004114103b410141" - "0020054114101e410041f189c0004117103b20004190026a240041010f0b0b418080c000410b417f20032003417f4e" - "1bac1001000b0ba61b0200418080c0000b89046572726f725f636f64653d54455354204641494c4544242424242420" - "5354415254494e47205741534d20455845435554494f4e202424242424746573745f616d656e646d656e74616d656e" - "646d656e745f656e61626c656463616368655f6c6574785f6172725f6c656e686f6d655f6c655f6172725f6c656e6c" - "655f6172725f6c656e74785f696e6e65725f6172725f6c656e686f6d655f6c655f696e6e65725f6172725f6c656e6c" - "655f696e6e65725f6172725f6c656e7365745f6461746174657374206d65737361676574657374207075626b657974" - "657374207369676e6174757265636865636b5f7369676e66745f666c6167736e66745f786665725f66656574657374" - "696e6720747261636574726163655f61636374400000000000005f74726163655f616d744000000000000000747261" - "63655f616d745f7a65726f706172656e745f6c6467725f686173685f6e65675f70747274785f6172725f6c656e5f69" - "6e76616c69645f736669656c6474785f696e6e65725f6172725f6c656e5f6e65675f70747274785f696e6e65725f61" - "72725f6c656e5f6e65675f6c656e74785f696e6e65725f6172725f6c656e5f746f6f5f6c6f6e6774785f696e6e6572" - "5f6172725f6c656e5f7074725f6f6f6263616368655f6c655f7074725f6f6f6263616368655f6c655f77726f6e675f" - "6c656e55534430303030303030303030303030303030300041b184c0000b8a1774726163655f6e756d5f6f6f625f73" - "7472686f6d655f6c655f6172725f6c656e5f696e76616c69645f736669656c646c655f6172725f6c656e5f696e7661" - "6c69645f736669656c64616d656e646d656e745f656e61626c65645f746f6f5f6269675f736c696365616d656e646d" - "656e745f656e61626c65645f746f6f5f6c6f6e6774785f696e6e65725f6172725f6c656e5f746f6f5f6269675f736c" - "696365686f6d655f6c655f696e6e65725f6172725f6c656e5f746f6f5f6269675f736c6963656c655f696e6e65725f" - "6172725f6c656e5f746f6f5f6269675f736c6963657365745f646174615f746f6f5f6269675f736c69636574726163" - "655f6f6f625f736c69636574726163655f78666c6f61745f6f6f625f736c69636574726163655f616d745f6f6f625f" - "736c696365666c6f61745f636d705f6f6f625f736c69636531666c6f61745f636d705f6f6f625f736c696365326361" - "6368655f6c655f77726f6e675f73697a655f75696e743235366e66745f666c6167735f77726f6e675f73697a655f75" - "696e743235366e66745f786665725f6665655f77726f6e675f73697a655f75696e7432353630303030303030303030" - "3030303030303030303030303030303030303030303174726163655f616363745f77726f6e675f73697a655f616363" - "6f756e745f696474726163655f6f6f625f737472696e6774726163655f78666c6f61745f6f6f625f737472696e6774" - "726163655f616363745f6f6f625f737472696e6774726163655f616d745f6f6f625f737472696e6774726163655f74" - "6f6f5f6c6f6e6774726163655f6e756d5f746f6f5f6c6f6e6774726163655f78666c6f61745f746f6f5f6c6f6e6774" - "726163655f616363745f746f6f5f6c6f6e6774726163655f616d745f746f6f5f6c6f6e6774726163655f616d745f77" - "726f6e675f6c656e67746874726163655f696e76616c69645f61735f68657874726163655f616363745f636865636b" - "5f646573796e636c6467725f696e646578706172656e745f6c6467725f74696d65706172656e745f6c6467725f6861" - "7368626173655f666565686f6d655f6c655f6669656c646c655f6669656c6474785f696e6e6572686f6d655f6c655f" - "696e6e65726c655f696e6e65727368613531325f68616c666e66745f7572696e66745f6973737565726e66745f7461" - "786f6e6e66745f73657269616c706172656e745f6c6467725f686173685f6e65675f6c656e706172656e745f6c6467" - "725f686173685f6275665f746f6f5f736d616c6c706172656e745f6c6467725f686173685f6c656e5f746f6f5f6c6f" - "6e67636865636b5f69645f6f6f625f6c656e5f753332636865636b5f69645f77726f6e675f6c656e5f753332666c6f" - "61745f66726f6d5f75696e745f6c656e5f6f6f62666c6f61745f66726f6d5f75696e745f77726f6e675f6c656e5f75" - "696e7436346163636f756e74726f6f745f69645f6c656e5f6f6f626163636f756e74726f6f745f69645f77726f6e67" - "5f6c656e74727573746c696e655f69645f6c656e5f6f6f625f63757272656e637974727573746c696e655f69645f77" - "726f6e675f6c656e5f63757272656e6379616d6d5f69645f6c656e5f6f6f625f617373657432616d6d5f69645f6c65" - "6e5f77726f6e675f6c656e5f617373657432616d6d5f69645f6c656e5f77726f6e675f6e6f6e5f7872705f63757272" - "656e63795f6c656e616d6d5f69645f6c656e5f77726f6e675f7872705f63757272656e63795f6c656e616d6d5f6964" - "5f6d707474785f6669656c645f696e76616c69645f736669656c64686f6d655f6c655f6669656c645f696e76616c69" - "645f736669656c646c655f6669656c645f696e76616c69645f736669656c6474785f696e6e65725f746f6f5f626967" - "5f736c696365686f6d655f6c655f696e6e65725f746f6f5f6269675f736c6963656c655f696e6e65725f746f6f5f62" - "69675f736c6963657368613531325f68616c665f746f6f5f6269675f736c696365616d6d5f69645f746f6f5f626967" - "5f736c69636563726564656e7469616c5f69645f746f6f5f6269675f736c6963656d70746f6b656e5f69645f746f6f" - "5f6269675f736c6963655f6d70746964666c6f61745f6164645f6f6f625f736c69636531666c6f61745f6164645f6f" - "6f625f736c69636532666c6f61745f7375625f6f6f625f736c69636531666c6f61745f7375625f6f6f625f736c6963" - "6532666c6f61745f6d756c745f6f6f625f736c69636531666c6f61745f6d756c745f6f6f625f736c69636532666c6f" - "61745f6469765f6f6f625f736c69636531666c6f61745f6469765f6f6f625f736c69636532666c6f61745f726f6f74" - "5f6f6f625f736c696365666c6f61745f706f775f6f6f625f736c696365657363726f775f69645f77726f6e675f7369" - "7a655f75696e7433326d70745f69737375616e63655f69645f77726f6e675f73697a655f75696e7433326e66745f6f" - "666665725f69645f77726f6e675f73697a655f75696e7433326f666665725f69645f77726f6e675f73697a655f7569" - "6e7433326f7261636c655f69645f77726f6e675f73697a655f75696e7433327061796368616e5f69645f77726f6e67" - "5f73697a655f75696e7433327065726d697373696f6e65645f646f6d61696e5f69645f77726f6e675f73697a655f75" - "696e7433327469636b65745f69645f77726f6e675f73697a655f75696e7433327661756c745f69645f77726f6e675f" - "73697a655f75696e7433326e66745f7572695f77726f6e675f73697a655f75696e743235366e66745f697373756572" - "5f77726f6e675f73697a655f75696e743235366e66745f7461786f6e5f77726f6e675f73697a655f75696e74323536" - "6e66745f73657269616c5f77726f6e675f73697a655f75696e743235366163636f756e74726f6f745f69645f77726f" - "6e675f73697a655f6163636f756e745f6964636865636b5f69645f77726f6e675f73697a655f6163636f756e745f69" - "6463726564656e7469616c5f69645f77726f6e675f73697a655f6163636f756e745f69643163726564656e7469616c" - "5f69645f77726f6e675f73697a655f6163636f756e745f69643264656c65676174655f69645f77726f6e675f73697a" - "655f6163636f756e745f69643164656c65676174655f69645f77726f6e675f73697a655f6163636f756e745f696432" - "6465706f7369745f707265617574685f69645f77726f6e675f73697a655f6163636f756e745f6964316465706f7369" - "745f707265617574685f69645f77726f6e675f73697a655f6163636f756e745f6964326469645f69645f77726f6e67" - "5f73697a655f6163636f756e745f6964657363726f775f69645f77726f6e675f73697a655f6163636f756e745f6964" - "74727573746c696e655f69645f77726f6e675f73697a655f6163636f756e745f69643174727573746c696e655f6964" - "5f77726f6e675f73697a655f6163636f756e745f6964326d70745f69737375616e63655f69645f77726f6e675f7369" - "7a655f6163636f756e745f69646d70746f6b656e5f69645f77726f6e675f73697a655f6163636f756e745f69646e66" - "745f6f666665725f69645f77726f6e675f73697a655f6163636f756e745f69646f666665725f69645f77726f6e675f" - "73697a655f6163636f756e745f69646f7261636c655f69645f77726f6e675f73697a655f6163636f756e745f696470" - "61796368616e5f69645f77726f6e675f73697a655f6163636f756e745f6964317061796368616e5f69645f77726f6e" - "675f73697a655f6163636f756e745f6964327065726d697373696f6e65645f646f6d61696e5f69645f77726f6e675f" - "73697a655f6163636f756e745f69647369676e6572735f69645f77726f6e675f73697a655f6163636f756e745f6964" - "7469636b65745f69645f77726f6e675f73697a655f6163636f756e745f69647661756c745f69645f77726f6e675f73" - "697a655f6163636f756e745f69646e66745f7572695f77726f6e675f73697a655f6163636f756e745f69646d70746f" - "6b656e5f69645f6d707469645f77726f6e675f6c656e677468004d0970726f64756365727302086c616e6775616765" - "010452757374000c70726f6365737365642d6279010572757374631d312e38372e3020283137303637653961632032" - "3032352d30352d303929002c0f7461726765745f6665617475726573022b0f6d757461626c652d676c6f62616c732b" - "087369676e2d657874"; + "0061736d01000000015c0c60067f7f7f7f7f7f017f60027f7f017f60047f7f7f7f017f60037f7f7f017f60077f7f7f" + "7f7f7f7f017f60087f7f7f7f7f7f7f7f017f60057f7f7f7f7f017f60017f017f60057f7f7f7f7f0060047f7f7f7f00" + "60017f006000017f02ee093708686f73745f6c6962057472616365000808686f73745f6c69620a6c6467725f696e64" + "6578000108686f73745f6c696210706172656e745f6c6467725f74696d65000108686f73745f6c696210706172656e" + "745f6c6467725f68617368000108686f73745f6c696208626173655f666565000108686f73745f6c696211616d656e" + "646d656e745f656e61626c6564000108686f73745f6c69620874785f6669656c64000308686f73745f6c69620e6163" + "636f756e74726f6f745f6964000208686f73745f6c69620863616368655f6c65000308686f73745f6c69620d686f6d" + "655f6c655f6669656c64000308686f73745f6c6962086c655f6669656c64000208686f73745f6c69620874785f696e" + "6e6572000208686f73745f6c69620d686f6d655f6c655f696e6e6572000208686f73745f6c6962086c655f696e6e65" + "72000608686f73745f6c69620a74785f6172725f6c656e000708686f73745f6c69620f686f6d655f6c655f6172725f" + "6c656e000708686f73745f6c69620a6c655f6172725f6c656e000108686f73745f6c69621074785f696e6e65725f61" + "72725f6c656e000108686f73745f6c696215686f6d655f6c655f696e6e65725f6172725f6c656e000108686f73745f" + "6c6962106c655f696e6e65725f6172725f6c656e000308686f73745f6c6962087365745f64617461000108686f7374" + "5f6c69620b7368613531325f68616c66000208686f73745f6c696209636865636b5f736967000008686f73745f6c69" + "62076e66745f757269000008686f73745f6c69620a6e66745f697373756572000208686f73745f6c6962096e66745f" + "7461786f6e000208686f73745f6c6962096e66745f666c616773000108686f73745f6c69620c6e66745f786665725f" + "666565000108686f73745f6c69620a6e66745f73657269616c000208686f73745f6c696208636865636b5f69640000" + "08686f73745f6c69620f666c6f61745f66726f6d5f75696e74000608686f73745f6c69620c74727573746c696e655f" + "6964000508686f73745f6c696206616d6d5f6964000008686f73745f6c69620d63726564656e7469616c5f69640005" + "08686f73745f6c69620a6d70746f6b656e5f6964000008686f73745f6c696209666c6f61745f636d70000208686f73" + "745f6c696209666c6f61745f616464000408686f73745f6c696209666c6f61745f737562000408686f73745f6c6962" + "0a666c6f61745f6d756c74000408686f73745f6c696209666c6f61745f646976000408686f73745f6c69620a666c6f" + "61745f726f6f74000008686f73745f6c696209666c6f61745f706f77000008686f73745f6c696209657363726f775f" + "6964000008686f73745f6c69620f6d70745f69737375616e63655f6964000008686f73745f6c69620c6e66745f6f66" + "6665725f6964000008686f73745f6c6962086f666665725f6964000008686f73745f6c6962096f7261636c655f6964" + "000008686f73745f6c69620a7061796368616e5f6964000508686f73745f6c6962167065726d697373696f6e65645f" + "646f6d61696e5f6964000008686f73745f6c6962097469636b65745f6964000008686f73745f6c6962087661756c74" + "5f6964000008686f73745f6c69620b64656c65676174655f6964000008686f73745f6c6962126465706f7369745f70" + "7265617574685f6964000008686f73745f6c6962066469645f6964000208686f73745f6c69620a7369676e6572735f" + "69640002030403090a0b05030100110619037f01418080c0000b7f0041da98c0000b7f0041e098c0000b073504066d" + "656d6f727902000d657363726f775f66696e69736800390a5f5f646174615f656e6403010b5f5f686561705f626173" + "6503020ac32e037201017f230041106b22042400024002402000200147044020022003410741014100100020004100" + "480d0120042000ad3703080c020b20042000ac370308200220034101200441086a41081000200441106a24000f0b20" + "042000ac3703080b418080c000410b4101200441086a41081000000b2801017f230041106b2201240020012000ac37" + "030841be91c000410b4101200141086a41081000000ba42d02087f017e230041a0026b2200240041c991c000412341" + "0741014100100020004100360260200041e0006a220141041001410441a090c000410a103720004100360260200141" + "041002410441908bc00041101037200042003703782000420037037020004200370368200042003703602001412010" + "03412041f180c0004110103720004100360260200141041004410441ff83c000410810372000428182848890a0c080" + "013703202000428182848890a0c080013703182000428182848890a0c080013703102000428182848890a0c0800137" + "030841ec91c000410e1005410141fa91c00041111037200041086a41201005410141fa91c000411110372000410036" + "02702000420037036820004200370360024002404181802020014114100622014100480d00200141144b0440417321" + "010c010b20014114460d0141818080807821010b20011038000b2000200029006c3700fd01200020002900673703f8" + "01200020002d00623a002e200020002f01603b012c2000200028006336002f200020002903f8013700332000200029" + "00fd013700382000420037037820004200370370200042003703682000420037036002402000412c6a4114200041e0" + "006a4120100722014120470440200141004e0d0120011038000b200020002d00623a0042200020002f01603b014020" + "00200029006f22083703800220002000280063360043200020002900673700472000200837004f2000200029007737" + "0057200020002d007f3a005f200041406b4120410010084101418b92c0004108103720004100360270200042003703" + "682000420037036041818020200041e0006a220241141009411441d38dc000410d1037200041003602702000420037" + "03682000420037036041014181802020024114100a4114418784c0004108103702404100200041e4006a22046b4103" + "71220320046a220120044d0d0020030440200321050340200441003a0000200441016a2104200541016b22050d000b" + "0b200341016b4107490d000340200441003a0000200441076a41003a0000200441066a41003a0000200441056a4100" + "3a0000200441046a41003a0000200441036a41003a0000200441026a41003a0000200441016a41003a000020044108" + "6a22042001470d000b0b2001413c20036b2203417c716a220420014b0440034020014100360200200141046a220120" + "04490d000b0b024020042003410371220320046a22054f0d002003220104400340200441003a0000200441016a2104" + "200141016b22010d000b0b200341016b4107490d000340200441003a0000200441076a41003a0000200441066a4100" + "3a0000200441056a41003a0000200441046a41003a0000200441036a41003a0000200441026a41003a000020044101" + "6a41003a0000200441086a22042005470d000b0b200041043602a00120004181802036026020004100360288022000" + "420037038002200042003703f80120024104200041f8016a22014114100b411441a280c00041081037200041003602" + "88022000420037038002200042003703f801200220002802a00120014114100c411441d084c000410d103720004100" + "360288022000420037038002200042003703f8014101200220002802a00120014114100d411441b08dc00041081037" + "4189803c100e4120419392c000410a10374189803c100f4120419d92c000410f103741014189803c1010412041ac92" + "c000410a1037200220002802a0011011412041b692c00041101037200220002802a0011012412041c692c000411510" + "374101200220002802a0011013412041db92c000411010372000412c6a220341141014411441eb92c0004108103720" + "0042003703900220004200370388022000420037038002200042003703f801200220002802a0012001412010154120" + "418f84c000410b103741f392c000410c41ff92c000410b418a93c000410e10164101419893c0004109103720002000" + "2903203703c001200020002903183703b801200020002903103703b001200020002903083703a801200041003b0188" + "022000420037038002200042003703f80120034114200041a8016a22054120200141121017411241d18fc000410710" + "3720004100360288022000420037038002200042003703f80120054120200141141018411441ac8fc000410a103720" + "0041003602f801200541202001410410194104419790c0004109103720054120101a410841a193c000410910372005" + "4120101b410a41aa93c000410c1037200041003602f8012005412020014104101c410441ba83c000410a103741b693" + "c000410d410420034114100041b693c000410d410541c393c0004108100041b693c000410d410541cb93c000410810" + "00417f41041003417141d393c00041181037200041003602f8012001417f1003417141a888c0004118103720004100" + "3a00fa01200041003b01f801200141031003417d41e790c000411e1037200041003602f8012001418094ebdc031003" + "417341bd8ec000411d10374102100e416f41eb93c00041191037417f20002802a00110114171418494c00041181037" + "2002417f10114171419c94c0004118103720024181081011417441b494c00041191037200041e094ebdc036a220420" + "002802a0011011417341cd94c000411810372000420037039002200042003703880220004200370380022000420037" + "03f801200341142004410820014120101d417341cc8cc0004114103720004200370390022000420037038802200042" + "0037038002200042003703f801200341142003411420014120101d417141918ec00041161037200042003703900220" + "004200370388022000420037038002200042003703f80120044108200141204100101e4173418b80c0004117103720" + "0042003703900220004200370388022000420037038002200042003703f801200220002802a001200141204100101e" + "417141a485c00041201037200420002802a00141011008417341e594c00041101037200220002802a0014101100841" + "7141f594c00041121037200042003703900220004200370388022000420037038002200042003703f8012004200028" + "02a001200141201007417341a78ec00041161037200042003703900220004200370388022000420037038002200042" + "003703f801200220002802a0012001412010074171418e83c000411810372000420037039002200042003703880220" + "00420037038002200042003703f8012003411420034114200420002802a00120014120101f4173418591c000411d10" + "37200042003703900220004200370388022000420037038002200042003703f8012003411420034114200220002802" + "a00120014120101f4171419581c000411f103720004200370390022000420037038802200042003703800220004200" + "3703f80141c698c0004114200420002802a001200141201020417341dc8ac000411510372000420037039002200042" + "00370388022000420037038002200042003703f80141c698c0004114200220002802a0012001412010204171418e89" + "c000411b1037200042003703900220004200370388022000420037038002200042003703f80141c698c00041144187" + "95c0004114200141201020417141a38ac0004125103720004200370390022000420037038802200042003703800220" + "0042003703f801419b95c000412841c698c00041142001412010204171418887c000412110372000200028013c3602" + "dc01200020002901343702d4012000200029012c3702cc01200041808080083602c801200041003b01f801200041c8" + "016a2207411841c698c0004114200141021020417141be80c000410a10372000422a3703e001200420002802a00141" + "01200041e0016a41081000200041003b01f8014102200141021006416f41b481c00041171037200041003b01f80141" + "02200141021009416f41f68ec000411c1037200041003b01f8014101410220014102100a416f41b586c00041171037" + "4102100e416f41eb93c000411910374102100f416f41c395c000411e1037410141021010416f41e195c00041191037" + "41ec91c0004181081005417441fa95c000411f103741ec91c00041c10010054174419996c000411a1037200041003b" + "01f801200241810820014102100b417441a987c00041161037200041003b01f801200241810820014102100c417441" + "aa90c000411b1037200041003b01f8014101200241810820014102100d417441db88c0004116103720024181081011" + "417441b396c000411e103720024181081012417441d196c00041231037410120024181081013417441f496c000411e" + "1037200241810810144174419297c0004116103741b693c00041810841ff92c000410b418a93c000410e1016417441" + "9893c0004109103741b693c000410d41ff92c000418108418a93c000410e10164174419893c0004109103741b693c0" + "00410d41ff92c000410b418a93c00041810810164174419893c00041091037200041003b01f8012002418108200141" + "021015417441c483c00041191037200041003b01f80141c698c00041810841c698c0004114200141021020417441dd" + "82c00041141037200041003b01f80120034114200341142002418108200141021021417441cc86c000411b10372000" + "41003b01f801200741810820034114200141021022417441c389c000411e103741b693c000410d4107200420002802" + "a0011000200042d487b6f4c7d4b1c0003700ec0141b693c000410d4103200041ec95ebdc036a22054108100041b693" + "c000410d4105200420002802a001100020054108200041ec016a220441081023417341a897c0004114103720044108" + "200541081023417341bc97c00041141037200041003b01f80120054108200441082001410241001024417341e08dc0" + "0041141037200041003b01f801200441082005410820014102410010244173418181c00041141037200041003b01f8" + "0120054108200441082001410241001025417341aa80c00041141037200041003b01f8012004410820054108200141" + "0241001025417341e08cc00041141037200041003b01f80120054108200441082001410241001026417341bb84c000" + "41151037200041003b01f80120044108200541082001410241001026417341c98bc00041151037200041003b01f801" + "20054108200441082001410241001027417341a683c00041141037200041003b01f801200441082005410820014102" + "41001027417341c88ac00041141037200041003b01f80120054108410320014102410010284173419488c000411410" + "37200041003b01f8012005410841032001410241001029417341ff85c0004113103720004200370390022000420037" + "0388022000420037038002200042003703f801200341142003411420014120102a417141c088c000411b1037200042" + "003703900220004200370388022000420037038002200042003703f801200341142003411420014120102b417141bc" + "82c00041211037200042003703900220004200370388022000420037038002200042003703f8012003411420034114" + "20014120102c417141928dc000411e1037200042003703900220004200370388022000420037038002200042003703" + "f801200341142003411420014120102d417141928fc000411a10372000420037039002200042003703880220004200" + "37038002200042003703f801200341142003411420014120102e417141b88dc000411b103720004200370390022000" + "4200370388022000420037038002200042003703f80120034114200341142003411420014120102f417141a291c000" + "411c1037200042003703900220004200370388022000420037038002200042003703f8012003411420034114200141" + "201030417141ef81c00041281037200042003703900220004200370388022000420037038002200042003703f80120" + "03411420034114200141201031417141b68fc000411b10372000420037039002200042003703880220004200370380" + "02200042003703f8012003411420034114200141201032417141a989c000411a1037200220002802a0014100100841" + "7141d097c000411b1037200041003b01f80120034114200220002802a001200141021017417141de87c000411a1037" + "200041003b01f801200220002802a001200141021018417141e285c000411d1037200041003b01f801200220002802" + "a001200141021019417141da8ec000411c1037200220002802a001101a417141eb97c000411c1037200220002802a0" + "01101b4171418798c000411f1037200041003602f801200220002802a00120014104101c417141f48dc000411d1037" + "200041003b01f801200220002802a001200141021007417141ff89c00041241037200041808080083602f401200041" + "003b01f801200220002802a001200041f4016a2205410420014102101d417141f48cc000411e1037200041003b01f8" + "01200220002802a00122062003411420022006200141021021417141dd84c00041241037200041003b01f801200341" + "14200220002802a001220620022006200141021021417141cb81c00041241037200041003b01f801200220002802a0" + "0120034114200141021033417141dd83c00041221037200041003b01f80120034114200220002802a0012001410210" + "33417141de8bc00041221037200041003b01f801200220002802a00120034114200141021034417141c880c0004129" + "1037200041003b01f80120034114200220002802a001200141021034417141a08bc00041291037200041003b01f801" + "200220002802a001200141021035417141f887c000411c1037200041003b01f801200220002802a001200541042001" + "4102102a417141f18ac000411f1037200041003b01f801200220002802a00120034114418795c00041142001410210" + "1f4171419286c00041231037200041003b01f80120034114200220002802a001418795c000411420014102101f4171" + "418185c00041231037200041003b01f801200220002802a0012005410420014102102b4171419782c0004125103720" + "0041003b01f80120074118200220002802a001200141021022417141ac8cc00041201037200041003b01f801200220" + "002802a0012005410420014102102c417141c590c00041221037200041003b01f801200220002802a0012005410420" + "014102102d417141e189c000411e1037200041003b01f801200220002802a0012005410420014102102e417141bf87" + "c000411f1037200041003b01f801200220002802a001200341142005410420014102102f417141e786c00041211037" + "200041003b01f80120034114200220002802a0012005410420014102102f4171419a84c00041211037200041003b01" + "f801200220002802a00120054104200141021030417141808cc000412c1037200041003b01f801200220002802a001" + "200141021036417141f78fc00041201037200041003b01f801200220002802a00120054104200141021031417141d8" + "8fc000411f1037200041003b01f801200220002802a00120054104200141021032417141c485c000411e1037200041" + "003b01f801200220002802a00141a698c0004120200141021017417141f182c000411d103741b693c000410d410420" + "0220002802a001100041b6a7abdd03410d410741a698c0004120100041b6a7abdd03410d410320044108100041b6a7" + "abdd03410d410420034114100041b6a7abdd03410d410541cb93c00041081000200220002802a00141072002418108" + "1000200042013703f8012002418108410120014108100041b693c000418108410320044108100041b693c000418108" + "410420034114100041b693c000418108410541cb93c0004108100041b693c000410d4105200220002802a001100020" + "0041003b019e02200220002802a001200341142000419e026a41021022417141f188c000411d103741b693c000410d" + "41e300200220002802a0011000410141004104200341141000200041a0026a240041010f0b000b0bb1180200418080" + "c0000b9b1554455354204641494c4544666c6f61745f66726f6d5f75696e745f6c656e5f6f6f6274785f696e6e6572" + "666c6f61745f7375625f6f6f625f736c69636531616d6d5f69645f6d70746465706f7369745f707265617574685f69" + "645f77726f6e675f73697a655f6163636f756e745f696431706172656e745f6c6467725f68617368666c6f61745f61" + "64645f6f6f625f736c6963653274727573746c696e655f69645f77726f6e675f6c656e5f63757272656e637974785f" + "6669656c645f696e76616c69645f736669656c6463726564656e7469616c5f69645f77726f6e675f73697a655f6163" + "636f756e745f6964327065726d697373696f6e65645f646f6d61696e5f69645f77726f6e675f73697a655f75696e74" + "33326d70745f69737375616e63655f69645f77726f6e675f73697a655f6163636f756e745f69646d70745f69737375" + "616e63655f69645f77726f6e675f73697a655f75696e743332616d6d5f69645f746f6f5f6269675f736c6963656e66" + "745f7572695f77726f6e675f73697a655f6163636f756e745f69646163636f756e74726f6f745f69645f77726f6e67" + "5f6c656e666c6f61745f6469765f6f6f625f736c696365316e66745f73657269616c7368613531325f68616c665f74" + "6f6f5f6269675f736c69636564656c65676174655f69645f77726f6e675f73697a655f6163636f756e745f69643162" + "6173655f6665656c655f6669656c647368613531325f68616c667061796368616e5f69645f77726f6e675f73697a65" + "5f6163636f756e745f696432666c6f61745f6d756c745f6f6f625f736c69636531686f6d655f6c655f696e6e657263" + "726564656e7469616c5f69645f77726f6e675f73697a655f6163636f756e745f69643174727573746c696e655f6964" + "5f77726f6e675f73697a655f6163636f756e745f696432666c6f61745f66726f6d5f75696e745f77726f6e675f6c65" + "6e5f75696e7436347661756c745f69645f77726f6e675f73697a655f6163636f756e745f69646e66745f6973737565" + "725f77726f6e675f73697a655f75696e74323536666c6f61745f706f775f6f6f625f736c69636574727573746c696e" + "655f69645f77726f6e675f73697a655f6163636f756e745f6964316c655f6669656c645f696e76616c69645f736669" + "656c6463726564656e7469616c5f69645f746f6f5f6269675f736c6963657061796368616e5f69645f77726f6e675f" + "73697a655f6163636f756e745f696431616d6d5f69645f6c656e5f77726f6e675f7872705f63757272656e63795f6c" + "656e74785f696e6e65725f746f6f5f6269675f736c6963656f7261636c655f69645f77726f6e675f73697a655f6163" + "636f756e745f69646e66745f7572695f77726f6e675f73697a655f75696e743235366469645f69645f77726f6e675f" + "73697a655f6163636f756e745f6964666c6f61745f726f6f745f6f6f625f736c696365706172656e745f6c6467725f" + "686173685f6e65675f6c656e657363726f775f69645f77726f6e675f73697a655f75696e7433326c655f696e6e6572" + "5f746f6f5f6269675f736c6963656d70746f6b656e5f69645f6d707469645f77726f6e675f6c656e677468616d6d5f" + "69645f6c656e5f77726f6e675f6c656e5f6173736574327661756c745f69645f77726f6e675f73697a655f75696e74" + "33326d70746f6b656e5f69645f746f6f5f6269675f736c6963655f6d707469646f666665725f69645f77726f6e675f" + "73697a655f6163636f756e745f69646163636f756e74726f6f745f69645f77726f6e675f73697a655f6163636f756e" + "745f6964616d6d5f69645f6c656e5f77726f6e675f6e6f6e5f7872705f63757272656e63795f6c656e666c6f61745f" + "6469765f6f6f625f736c69636532616d6d5f69645f6c656e5f6f6f625f617373657432657363726f775f69645f7772" + "6f6e675f73697a655f6163636f756e745f6964706172656e745f6c6467725f74696d656465706f7369745f70726561" + "7574685f69645f77726f6e675f73697a655f6163636f756e745f696432666c6f61745f6d756c745f6f6f625f736c69" + "63653264656c65676174655f69645f77726f6e675f73697a655f6163636f756e745f6964327065726d697373696f6e" + "65645f646f6d61696e5f69645f77726f6e675f73697a655f6163636f756e745f69646d70746f6b656e5f69645f7772" + "6f6e675f73697a655f6163636f756e745f6964636865636b5f69645f6f6f625f6c656e5f753332666c6f61745f7375" + "625f6f6f625f736c69636532636865636b5f69645f77726f6e675f73697a655f6163636f756e745f69646e66745f6f" + "666665725f69645f77726f6e675f73697a655f75696e7433326c655f696e6e65726f7261636c655f69645f77726f6e" + "675f73697a655f75696e743332686f6d655f6c655f6669656c64666c6f61745f6164645f6f6f625f736c696365316e" + "66745f73657269616c5f77726f6e675f73697a655f75696e74323536636865636b5f69645f77726f6e675f6c656e5f" + "7533326163636f756e74726f6f745f69645f6c656e5f6f6f62706172656e745f6c6467725f686173685f6c656e5f74" + "6f6f5f6c6f6e676e66745f7461786f6e5f77726f6e675f73697a655f75696e74323536686f6d655f6c655f6669656c" + "645f696e76616c69645f736669656c646f666665725f69645f77726f6e675f73697a655f75696e7433326e66745f69" + "73737565727469636b65745f69645f77726f6e675f73697a655f75696e7433326e66745f7572697469636b65745f69" + "645f77726f6e675f73697a655f6163636f756e745f69647369676e6572735f69645f77726f6e675f73697a655f6163" + "636f756e745f69646e66745f7461786f6e6c6467725f696e646578686f6d655f6c655f696e6e65725f746f6f5f6269" + "675f736c6963656e66745f6f666665725f69645f77726f6e675f73697a655f6163636f756e745f6964706172656e74" + "5f6c6467725f686173685f6275665f746f6f5f736d616c6c74727573746c696e655f69645f6c656e5f6f6f625f6375" + "7272656e63797061796368616e5f69645f77726f6e675f73697a655f75696e7433326572726f725f636f64653d2424" + "242424205354415254494e47205741534d20455845435554494f4e202424242424746573745f616d656e646d656e74" + "616d656e646d656e745f656e61626c656463616368655f6c6574785f6172725f6c656e686f6d655f6c655f6172725f" + "6c656e6c655f6172725f6c656e74785f696e6e65725f6172725f6c656e686f6d655f6c655f696e6e65725f6172725f" + "6c656e6c655f696e6e65725f6172725f6c656e7365745f6461746174657374206d6573736167657465737420707562" + "6b657974657374207369676e6174757265636865636b5f7369676e66745f666c6167736e66745f786665725f666565" + "74657374696e67207472616365400000000000005f4000000000000000706172656e745f6c6467725f686173685f6e" + "65675f70747274785f6172725f6c656e5f696e76616c69645f736669656c6474785f696e6e65725f6172725f6c656e" + "5f6e65675f70747274785f696e6e65725f6172725f6c656e5f6e65675f6c656e74785f696e6e65725f6172725f6c65" + "6e5f746f6f5f6c6f6e6774785f696e6e65725f6172725f6c656e5f7074725f6f6f6263616368655f6c655f7074725f" + "6f6f6263616368655f6c655f77726f6e675f6c656e55534430303030303030303030303030303030300041c395c000" + "0b8303686f6d655f6c655f6172725f6c656e5f696e76616c69645f736669656c646c655f6172725f6c656e5f696e76" + "616c69645f736669656c64616d656e646d656e745f656e61626c65645f746f6f5f6269675f736c696365616d656e64" + "6d656e745f656e61626c65645f746f6f5f6c6f6e6774785f696e6e65725f6172725f6c656e5f746f6f5f6269675f73" + "6c696365686f6d655f6c655f696e6e65725f6172725f6c656e5f746f6f5f6269675f736c6963656c655f696e6e6572" + "5f6172725f6c656e5f746f6f5f6269675f736c6963657365745f646174615f746f6f5f6269675f736c696365666c6f" + "61745f636d705f6f6f625f736c69636531666c6f61745f636d705f6f6f625f736c6963653263616368655f6c655f77" + "726f6e675f73697a655f75696e743235366e66745f666c6167735f77726f6e675f73697a655f75696e743235366e66" + "745f786665725f6665655f77726f6e675f73697a655f75696e74323536303030303030303030303030303030303030" + "3030303030303030303030303031004d0970726f64756365727302086c616e6775616765010452757374000c70726f" + "6365737365642d6279010572757374631d312e39352e30202835393830373631366520323032362d30342d31342900" + "2c0f7461726765745f6665617475726573022b0f6d757461626c652d676c6f62616c732b087369676e2d657874"; extern std::string const kBadAlignWasmHex = "0061736d01000000011b046000017f60057f7f7f7f7f017f60067f7f7f7f7f7f017f60000002260203656e760f666c"