Skip to content

Conversation

@oleks-rip
Copy link
Collaborator

High Level Overview of Change

Don't do anything if severity level lower then trace

Type of Change

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

@oleks-rip oleks-rip requested review from mvadari and pwang200 December 8, 2025 21:35
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.5%. Comparing base (881087d) to head (90b44c7).

Additional details and impacted files

Impacted file tree graph

@@                     Coverage Diff                     @@
##           ripple/wasmi-host-functions   #6127   +/-   ##
===========================================================
  Coverage                         79.5%   79.5%           
===========================================================
  Files                              848     848           
  Lines                            73417   73433   +16     
  Branches                          8401    8402    +1     
===========================================================
+ Hits                             58387   58400   +13     
- Misses                           15030   15033    +3     
Files with missing lines Coverage Δ
src/xrpld/app/wasm/detail/HostFuncImpl.cpp 100.0% <100.0%> (ø)
src/xrpld/app/wasm/detail/WasmiVM.cpp 93.0% <100.0%> (+<0.1%) ⬆️

... and 4 files with indirect coverage changes

Impacted file tree graph

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

@tHiSiShEaTh
Copy link

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review. ✅ Project coverage is 79.5%. Comparing base (881087d) to head (77d40cd).

Files with missing lines Patch % Lines
src/xrpld/app/wasm/detail/HostFuncImpl.cpp 50.0% 5 Missing ⚠️
Additional details and impacted files
🚀 New features to boost your workflow:

S. N.

}

// env test logs don't check severity, so we add it.
class SuiteJournalSink2 : public SuiteJournalSink
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to rewrite this - you can use test::StreamSink.

Copy link
Collaborator Author

@oleks-rip oleks-rip Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, StreamSink is not from base Sink hierarchy

testGetNFTFlags();
testGetNFTTransferFee();
testGetNFTSerial();
// testGetLedgerSqn();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should all be uncommented - I assume left over from testing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment on lines 439 to 440
if (!getJournal().active(beast::severities::kTrace))
return 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause consensus issues. You need to return the same value regardless of what the trace level is.

Copy link
Collaborator Author

@oleks-rip oleks-rip Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is perfectly correct - if you writing something you should know that nothing were written because of config/settings.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On an actual network, different nodes will have different log settings. They will return different values based on those log settings. Depending on the WASM code, this could result in different results in the WASM execution. Different transaction results mean consensus breaks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

{
std::uint32_t idx{0};
auto reply = wsc.getMsg(100ms);
auto reply = wsc.getMsg(200ms);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated fix and should be separate (and probably to develop if this is to fix that flaky test)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You right, it is not actually a fix. Next time it can takes 300ms. Removed

@oleks-rip oleks-rip requested a review from mvadari December 10, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants