Compare commits

...

24 Commits

Author SHA1 Message Date
tequ
17f8ae3ffa Merge branch 'dev' into cli-definitions-output 2026-04-29 11:16:16 +09:00
tequ
8cd8d05b77 Merge remote-tracking branch 'upstream/dev' into cli-definitions-output 2026-04-29 10:46:53 +09:00
tequ
ea835da1f4 Merge branch 'dev' into cli-definitions-output 2026-04-24 14:24:24 +09:00
Alloy Networks
cd00ed72d8 change build instructions url 2026-04-24 11:12:28 +10:00
tequ
05a3e04f2d Fix BEAST_ENHANCED_LOGGING not working and restore original behavior 2026-04-24 11:11:40 +10:00
tequ
66f7294120 Test: hint build_test_hooks.sh when hook wasm is empty in hso() 2026-04-24 11:10:46 +10:00
Nicholas Dudfield
7f6ac75617 Revert "chore: use improved levelization script with threading and argparse"
This reverts commit 5c1d7d9ae9.
2026-04-24 11:09:19 +10:00
Nicholas Dudfield
4150f0383c chore: use improved levelization script with threading and argparse 2026-04-24 11:09:19 +10:00
Nicholas Dudfield
25123b370a chore: replace levelization shell script with python
Backport of XRPLF/rippled#6325. The python version runs ~80x faster.
2026-04-24 11:09:19 +10:00
tequ
f90ed41802 enable ccache direct_mode 2026-04-24 11:06:51 +10:00
tequ
8c4c158d3a output ccache configuration in release-builder 2026-04-24 11:06:51 +10:00
tequ
2d2951875d fix: typo SignersListSet 2026-04-24 11:05:20 +10:00
tequ
9bfca63574 Update util_keylet fee test 2026-04-24 11:00:31 +10:00
tequ
1ba444ae7f Updated tests to align with the changes merged into the dev branch. 2026-04-24 11:00:31 +10:00
tequ
f96d9b6e51 Add tests for Hooks fee 2026-04-24 11:00:31 +10:00
tequ
4bfd1966da actions/upload-artifact@v7 2026-03-09 23:30:35 +09:00
tequ
0e0a46b2af ci: remove conditional check for GCC 13 in server definitions export 2026-03-09 18:42:49 +09:00
tequ
47a12fe33b ci: export server definitions JSON artifact from workflow 2026-03-09 18:30:19 +09:00
tequ
4403c4f427 Add --definitions CLI flag to output static server definitions without starting server 2026-03-09 18:16:40 +09:00
tequ
8cfee6c8a3 Merge fixAMMClawbackRounding amendment into featureAMMClawback amendment 2026-02-25 19:07:45 +10:00
yinyiqian1
8673599d2b fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance. This was fixed for `AMMWithdraw` in `fixAMMv1_1` by adjusting the LPTokenBalance to be the same as the trustline balance. Since `AMMClawback` is also performing a withdrawal, we need to adjust LPTokenBalance as well in `AMMClawback.`

This change includes:
1. Refactored `verifyAndAdjustLPTokenBalance` function in `AMMUtils`, which both`AMMWithdraw` and `AMMClawback` call to adjust LPTokenBalance.
2. Added the unit test `testLastHolderLPTokenBalance` to test the scenario.
3. Modify the existing unit tests for `fixAMMClawbackRounding`.
2026-02-25 19:07:45 +10:00
tequ
ec65e622aa Merge fixAMMv1_3 amendment into featureAMM amendment 2026-02-25 16:20:43 +10:00
Gregory Tsipenyuk
65837f49e1 fix: Add AMMv1_3 amendment (#5203)
* Add AMM bid/create/deposit/swap/withdraw/vote invariants:
  - Deposit, Withdrawal invariants: `sqrt(asset1Balance * asset2Balance) >= LPTokens`.
  - Bid: `sqrt(asset1Balance * asset2Balance) > LPTokens` and the pool balances don't change.
  - Create: `sqrt(asset1Balance * assetBalance2) == LPTokens`.
  - Swap: `asset1BalanceAfter * asset2BalanceAfter >= asset1BalanceBefore * asset2BalanceBefore`
     and `LPTokens` don't change.
  - Vote: `LPTokens` and pool balances don't change.
  - All AMM and swap transactions: amounts and tokens are greater than zero, except on withdrawal if all tokens
    are withdrawn.
* Add AMM deposit and withdraw rounding to ensure AMM invariant:
  - On deposit, tokens out are rounded downward and deposit amount is rounded upward.
  - On withdrawal, tokens in are rounded upward and withdrawal amount is rounded downward.
* Add Order Book Offer invariant to verify consumed amounts. Consumed amounts are less than the offer.
* Fix Bid validation. `AuthAccount` can't have duplicate accounts or the submitter account.
2026-02-25 16:20:43 +10:00
RichardAH
e5b21f026e Merge pull request #692 from Xahau/sync-2.4.0-rebased
Sync: Ripple(d) 2.4.0
2026-02-24 16:07:09 +10:00
4 changed files with 34 additions and 1 deletions

View File

@@ -464,3 +464,16 @@ jobs:
verbose: true
plugins: noop
use_oidc: true
- name: Export server definitions
if: matrix.job_type == 'build' && matrix.compiler_id == 'gcc-13-libstdcxx'
run: |
${{ env.build_dir }}/rippled --definitions | python3 -m json.tool > server_definitions.json
- name: Upload server definitions
if: matrix.job_type == 'build' && matrix.compiler_id == 'gcc-13-libstdcxx'
uses: actions/upload-artifact@v7
with:
name: server-definitions
path: server_definitions.json
archive: false

View File

@@ -24,6 +24,7 @@
#include <xrpld/core/TimeKeeper.h>
#include <xrpld/net/RPCCall.h>
#include <xrpld/rpc/RPCHandler.h>
#include <xrpld/rpc/handlers/Handlers.h>
#include <xrpl/basics/Log.h>
#include <xrpl/basics/StringUtilities.h>
#include <xrpl/basics/contract.h>
@@ -387,7 +388,8 @@ run(int argc, char** argv)
po::value<std::string>(),
"Specify the range of present ledgers for testing purposes. Min and "
"max values are comma separated.")(
"version", "Display the build version.");
"version", "Display the build version.")(
"definitions", "Output server definitions as JSON and exit.");
po::options_description data("Ledger/Data Options");
data.add_options()("import", importText.c_str())(
@@ -529,6 +531,13 @@ run(int argc, char** argv)
return 0;
}
if (vm.count("definitions"))
{
auto defs = getStaticServerDefinitions();
std::cout << Json::FastWriter().write(defs);
return 0;
}
#ifndef ENABLE_TESTS
if (vm.count("unittest") || vm.count("unittest-child"))
{

View File

@@ -129,6 +129,8 @@ doRipplePathFind(RPC::JsonContext&);
Json::Value
doServerDefinitions(RPC::JsonContext&);
Json::Value
getStaticServerDefinitions();
Json::Value
doServerInfo(RPC::JsonContext&); // for humans
Json::Value
doServerState(RPC::JsonContext&); // for machines

View File

@@ -523,6 +523,15 @@ public:
}
};
Json::Value
getStaticServerDefinitions()
{
static const Definitions defs{};
Json::Value ret = defs();
ret[jss::hash] = to_string(defs.getHash());
return ret;
}
Json::Value
doServerDefinitions(RPC::JsonContext& context)
{