Commit Graph

13795 Commits

Author SHA1 Message Date
Denis Angell
004ab91023 refactor: replace hand-rolled lexicalCast (#4473)
Replace hand-rolled code with std::from_chars for better
maintainability.

The C++ std::from_chars function is intended to be as fast as possible,
so it is unlikely to be slower than the code it replaces. This change is
a net gain because it reduces the amount of hand-rolled code.
2025-06-15 23:07:35 +09:00
Shawn Xie
1a600b34b3 XLS-39 Clawback: (#4553)
Introduces:
* AccountRoot flag: lsfAllowClawback
* New Clawback transaction
* More info on clawback spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-39d-clawback
2025-06-15 23:07:32 +09:00
Howard Hinnant
72bf49baca refactor: remove TypedField's move constructor (#4567)
Apply a minor cleanup in `TypedField`:
* Remove a non-working and unused move constructor.
* Constrain the remaining constructor to not be overly generic enough as
  to be used as a copy or move constructor.
2025-06-15 23:06:45 +09:00
drlongle
4796e07aaa Add RPC/WS ports to server_info (#4427)
Enhance the /crawl endpoint by publishing WebSocket/RPC ports in the
server_info response. The function processing requests to the /crawl
endpoint actually calls server_info internally, so this change enables a
server to advertise its WebSocket/RPC port(s) to peers via the /crawl
endpoint. `grpc` and `peer` ports are included as well.

The new `ports` array contains objects, each containing a `port` for the
listening port (number string), and an array `protocol` listing the
supported protocol(s).

This allows crawlers to build a richer topology without needing to
port-scan nodes. For non-admin users (including peers), the info about
*admin* ports is excluded.

Also increase test coverage for RPC ServerInfo.

Fix #2837.
2025-06-15 23:06:45 +09:00
Scott Schurr
2086c47d1d fixReducedOffersV1: prevent offers from blocking order books: (#4512)
Curtail the occurrence of order books that are blocked by reduced offers
with the implementation of the fixReducedOffersV1 amendment.

This commit identifies three ways in which offers can be reduced:

1. A new offer can be partially crossed by existing offers, so the new
   offer is reduced when placed in the ledger.

2. An in-ledger offer can be partially crossed by a new offer in a
   transaction. So the in-ledger offer is reduced by the new offer.

3. An in-ledger offer may be under-funded. In this case the in-ledger
   offer is scaled down to match the available funds.

Reduced offers can block order books if the effective quality of the
reduced offer is worse than the quality of the original offer (from the
perspective of the taker). It turns out that, for small values, the
quality of the reduced offer can be significantly affected by the
rounding mode used during scaling computations.

This commit adjusts some rounding modes so that the quality of a reduced
offer is always at least as good (from the taker's perspective) as the
original offer.

The amendment is titled fixReducedOffersV1 because additional ways of
producing reduced offers may come to light. Therefore, there may be a
future need for a V2 amendment.
2025-06-15 23:06:42 +09:00
Ed Hennis
fb6734f589 Enable the Beta RPC API (v2) for all unit tests: (#4573)
* Enable api_version 2, which is currently in beta. It is expected to be
  marked stable by the next stable release.
* This does not change any defaults.
* The only existing tests changed were one that set the same flag, which
  was now redundant, and a couple that tested versioning explicitly.
2025-06-15 23:05:35 +09:00
Denis Angell
551fc9f9e1 Add Conan Building For Development (#432) 2025-05-14 14:00:20 +10:00
RichardAH
8173ef558c Sus pat (#507) 2025-05-01 17:23:56 +10:00
RichardAH
59b071f38c remove false positives from sus pat finder (#506) 2025-05-01 09:54:41 +10:00
Denis Angell
648062fd56 fix warnings (#505) 2025-04-30 11:51:58 +02:00
tequ
3fd3be1220 Suppress build warning introduced in Catalogue (#499) 2025-04-29 08:25:55 +10:00
tequ
79887d1181 Supress logs for Catalogue_test, Import_test (#495) 2025-04-24 17:46:09 +10:00
Denis Angell
18e0585249 fix: ledger_index (#498) 2025-04-24 16:45:01 +10:00
tequ
ec50bfd5ef Remove #ifndef DEBUG guards and exception handling wrappers (#496) 2025-04-24 16:38:14 +10:00
Denis Angell
b0e511ad92 patch remarks (#497) 2025-04-24 16:36:57 +10:00
tequ
9c332dd59f Add tests for SetRemarks (#491) 2025-04-18 09:34:44 +10:00
tequ
85004a2adc Update clang-format workflow (#490) 2025-04-17 16:16:59 +10:00
RichardAH
ca2509684c Remarks amendment (#301)
Co-authored-by: Denis Angell <dangell@transia.co>
2025-04-16 08:42:04 +10:00
tequ
1125d17798 fixRewardClaimFlags (#487) 2025-04-15 20:08:19 +10:00
tequ
f20977914b HookCanEmit (#392) 2025-04-15 13:32:35 +10:00
Niq Dudfield
a3419bfa58 feat(catalogue): add cli commands and fix file_size (#486)
* feat(catalogue): add cli commands and fix file_size

* feat(catalogue): add cli commands and fix file_size

* feat(catalogue): fix tests

* feat(catalogue): fix tests

* feat(catalogue): use formatBytesIEC

* feat: add file_size_estimated

* feat: add file_size_estimated

* feat: add file_size_estimated
2025-04-15 08:50:15 +10:00
tequ
110b6c1a7b Update sfcodes script (#479) 2025-04-10 09:44:31 +10:00
tequ
c169cb5091 Update CHooks build script (#465) 2025-04-09 20:22:34 +10:00
tequ
3ae474b29b Add xpop_slot test (#470) 2025-04-09 20:20:23 +10:00
tequ
cbfc790f9b feat: Run unittests in parallel with Github Actions (#483)
Implement parallel execution for unit tests using Github Actions to improve CI pipeline efficiency and reduce build times.
2025-04-04 19:32:47 +02:00
Niq Dudfield
5307bedc5c Fix missing includes in Catalogue.cpp for non-unity builds (#485) 2025-04-04 12:53:45 +10:00
Niq Dudfield
ebd2583e94 Fix using using Status with rpcError (#484) 2025-04-01 21:00:13 +10:00
RichardAH
515a77379b Catalogue (#443) 2025-04-01 16:47:48 +10:00
Niq Dudfield
c795abd6e2 Fix ServerDefinitions_test regression intro in #475 (#477) 2025-03-19 12:32:27 +10:00
Niq Dudfield
f66c0d6dc3 Prevent dangling reference in getHash() (#475)
Replace temporary uint256 with static variable when returning fallback hash
to avoid returning a const reference to a local temporary object.
2025-03-18 18:37:18 +10:00
Niq Dudfield
224684ab8f CI Release Builder (#455) 2025-03-11 13:19:28 +01:00
RichardAH
b3abe703f4 Touch Amendment (#294) 2025-03-06 08:25:42 +01:00
Niq Dudfield
0f13043db1 fix: remove negative rate test failing on MacOS (#452) 2025-03-03 13:12:13 +01:00
Denis Angell
ca908cb0f4 [fix] github runner (#451)
Co-authored-by: Niq Dudfield <ndudfield@gmail.com>
2025-03-03 09:55:51 +01:00
tequ
9a6d6e2930 Enhance shell script error handling and debugging on GHA (#447) 2025-02-24 10:33:21 +01:00
tequ
8fa3eb39ac Fix Error handling on build action (#412) 2025-02-24 18:16:21 +10:00
tequ
c293570248 Fixed not to use a large fixed range in the magic_enum. (#436) 2025-02-24 17:46:42 +10:00
Richard Holland
d1f1307b9f debug gh builds 2025-02-06 15:21:37 +11:00
Wietse Wind
938f462b1c Update build-in-docker.yml 2025-02-05 08:23:49 +01:00
Richard Holland
fcc36ebe09 Revert "debug account tx tests under release builder"
This reverts commit da8df63be3.

Revert "add strict filtering to account_tx api (#429)"

This reverts commit 317bd4bc6e.
2025-02-05 14:59:33 +11:00
Richard Holland
14128148f9 debug account tx tests under release builder 2025-02-04 17:02:17 +11:00
RichardAH
610bc2834f add strict filtering to account_tx api (#429) 2025-02-03 17:56:08 +10:00
RichardAH
d0ba15c964 fix20250131 (#428)
Co-authored-by: Denis Angell <dangell@transia.co>
2025-02-03 10:33:19 +10:00
Wietse Wind
c56d26046a Artifact v4 continue on error 2025-02-01 08:58:13 +01:00
Wietse Wind
9e10a77f23 Update artifact 2025-02-01 08:57:48 +01:00
Wietse Wind
4ca823c71c Update artifact 2025-02-01 08:57:25 +01:00
tequ
814d662bfd Fix HookResult(ExitType) when accept() is not called (#415) 2025-01-22 13:33:59 +10:00
tequ
f58487875a Update boost link for build-full.sh (#421) 2025-01-22 08:38:12 +10:00
tequ
8e446662b1 Add space to trace_float log (#424) 2025-01-22 08:34:33 +10:00
tequ
290f316760 add URITokenIssuer to account_flags for account_info (#404) 2024-12-16 16:10:01 +10:00