Commit Graph

13235 Commits

Author SHA1 Message Date
Olek
8d55192f0c fix: Switch Permissioned Domain to Supported::yes (#5287)
Switch Permissioned Domain feature's supported flag from Supported::no to Supported::yes for it to be votable.
2025-02-24 20:52:41 +00:00
Bart
2de83f36ae docs: Clarifies default port of hosts (#5290)
The current comment in the example cfg file incorrectly mentions both "may" and "must". This change fixes this comment to clarify that the default port of hosts is 2459 and that specifying it is therefore optional. It further sets the default port to 2459 instead of the legacy 51235.
2025-02-24 20:52:41 +00:00
Mark Travis
87ba6ba2d8 Log proposals and validations (#5291)
Adds detailed log messages for each validation and proposal received from the network.
2025-02-24 20:52:41 +00:00
Ed Hennis
51f427c4e8 Reduce duplicate peer traffic for ledger data (#5126)
- Drop duplicate outgoing TMGetLedger messages per peer
  - Allow a retry after 30s in case of peer or network congestion.
  - Addresses RIPD-1870
  - (Changes levelization. That is not desirable, and will need to be fixed.)
- Drop duplicate incoming TMGetLedger messages per peer
  - Allow a retry after 15s in case of peer or network congestion.
  - The requestCookie is ignored when computing the hash, thus increasing
    the chances of detecting duplicate messages.
  - With duplicate messages, keep track of the different requestCookies
    (or lack of cookie). When work is finally done for a given request,
    send the response to all the peers that are waiting on the request,
    sending one message per peer, including all the cookies and
    a "directResponse" flag indicating the data is intended for the
    sender, too.
  - Addresses RIPD-1871
- Drop duplicate incoming TMLedgerData messages
  - Addresses RIPD-1869
- Improve logging related to ledger acquisition
- Class "CanProcess" to keep track of processing of distinct items

---------

Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
2025-02-24 20:52:41 +00:00
Bart
6a3c6dd8a3 Support canonical ledger entry names (#5271)
This change enhances the filtering in the ledger, ledger_data, and account_objects methods by also supporting filtering by the canonical name of the LedgerEntryType using case-insensitive matching.
2025-02-24 20:52:41 +00:00
Darius Tumas
f82b56605e chore: Update XRPL Foundation public key (#5289)
Following the XRPL Foundation UNL migration a new set of keys was generated.
2025-02-24 20:52:41 +00:00
Ed Hennis
aa0aa44cf4 refactor: Change recursive_mutex to mutex in DatabaseRotatingImp (#5276)
Rewrites the code so that the lock is not held during the callback. Instead it locks twice, once before, and once after. This is safe due to the structure of the code, but is checked after the second lock. This allows mutex_ to be changed back to a regular mutex.
2025-02-24 20:52:41 +00:00
Bart
4a1ef3d42f fix: Replace charge() by fee_.update() in OnMessage functions (#5269)
In PeerImpl.cpp, if the function is a message handler (onMessage) or called directly from a message handler, then it should use fee_, since when the handler returns (OnMessageEnd) then the charge function is called. If the function is not a message handler, such as a job queue item, it should remain charge.
2025-02-24 20:52:41 +00:00
Elliot Lee
87b13184b1 docs: ensure build_type and CMAKE_BUILD_TYPE match (#5274) 2025-02-24 20:52:41 +00:00
code0xff
cdae348a4b chore: Fix small typos in protocol files (#5279) 2025-02-24 20:52:41 +00:00
Ed Hennis
b7057b5fba chore: Rename missing-commits job, and combine nix job files (#5268)
- Rename the job in missing-commits.yml from "check" to "up_to_date",
  because other jobs named "check" prevent merges, but this one should
  not prevent merges. How else are branches going to get caught up?
- Move the job in instrumentation.yml to nix.yml, but keep it entirely
  independent.
2025-02-24 20:52:41 +00:00
Ed Hennis
e96fb0ce55 docs: Add a summary of the git commit message rules (#5283) 2025-02-24 20:52:41 +00:00
Olek
359565b377 fix: Amendment to add transaction flag checking functionality for Credentials (#5250)
CredentialCreate / CredentialAccept / CredentialDelete transactions will check sfFlags field in preflight() when the amendment is enabled.
2025-02-24 20:52:41 +00:00
Donovan Hide
0376c7af60 fix: Omit superfluous setCurrentThreadName call in GRPCServer.cpp (#5280) 2025-02-24 20:52:41 +00:00
Bronek Kozicki
f5dac74afb fix: Do not allow creating Permissioned Domains if credentials are not enabled (#5275)
If the permissioned domains amendment XLS-80 is enabled before credentials XLS-70, then the permissioned domain users will not be able to match any credentials. The changes here prevent the creation of any permissioned domain objects if credentials are not enabled.
2025-02-24 20:52:41 +00:00
Mayukha Vadari
c92bd4a817 fix: issues in simulate RPC (#5265)
Make `simulate` RPC easier to use:
* Prevent the use of `seed`, `secret`, `seed_hex`, and `passphrase` fields (to avoid confusing with the signing methods).
* Add autofilling of the `NetworkID` field.
2025-02-24 20:52:41 +00:00
Bart
6b16569273 Updates Conan dependencies (#5256)
This PR updates several Conan dependencies:
* boost
* date
* libarchive
* libmysqlclient
* libpq
* lz4
* onetbb
* openssl
* sqlite3
* zlib
* zstd
2025-02-24 20:52:41 +00:00
Shawn Xie
7fdfbc7b87 Amendment fixFrozenLPTokenTransfer (#5227)
Prohibits LPToken holders from sending LPToken to others if they have been frozen by one of the assets in AMM pool.
2025-02-24 20:52:41 +00:00
Ed Hennis
463e62e64b Improve git commit hash lookup (#5225)
- Also get the branch name.
- Use rev-parse instead of describe to get a clean hash.
- Return the git hash and branch name in server_info for admin
  connections.
- Include git hash and branch name on separate lines in --version.
2025-02-24 20:52:41 +00:00
Vlad
ffc88d703b Add deep freeze feature (XLS-77d) (#5187)
- spec: XRPLF/XRPL-Standards#220
- amendment: "DeepFreeze"
- implemented deep freeze spec to allow token issuers to prevent currency holders from being able to acquire more of these tokens.
- in combination with normal freeze, deep freeze effectively prevents any balance trust line balance change of a currency holder (except direct issuer <-> holder payments).
- added 2 new invariant checks to verify that deep freeze cannot be enacted without normal freeze and transfer is not frozen.
- made some fixes to existing freeze handling.

Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
2025-02-24 20:52:41 +00:00
Ed Hennis
0613024aac Set version to 2.4.0-b3 2025-02-24 20:52:41 +00:00
Mayukha Vadari
b991d24070 Add RPC "simulate" to execute a dry run of a transaction (#5069)
- Spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate
- Also update signing methods to autofill fees better and properly handle transactions that require a non-standard fee.
2025-02-24 20:52:41 +00:00
Olek
f3d39ec680 Fix CI unit tests (#5196)
- Add retries for rpc client
- Add dynamic port allocation for rpc servers
2025-02-24 20:52:41 +00:00
Michael Legleux
1d0acf1490 Update secp256k1 library to 0.6.0 (#5254) 2025-02-24 20:52:41 +00:00
Ed Hennis
a331a172c6 chore: Update Visual Studio CI to VS 2022, and add VS Debug builds (#5240)
* Debug builds do not run tests, because they take too long.
2025-02-24 20:52:40 +00:00
Bronek Kozicki
1a341cb9cb Add [validator_list_threshold] to validators.txt to improve UNL security (#5112) 2025-02-24 20:52:40 +00:00
Bronek Kozicki
1b043fcc7b Switch from assert to XRPL_ASSERT (#5245) 2025-02-24 20:52:40 +00:00
tequ
e742a6f9fc Add missing space character to a log message (#5251) 2025-02-24 20:52:40 +00:00
Bronek Kozicki
4d837884cf Cleanup API-CHANGELOG.md (#5207) 2025-02-24 20:52:40 +00:00
Ed Hennis
7f55b38377 test: Unit tests to recreate invalid index logic error (#5242)
* One hits the global cache, one does not.
* Also some extra checking.

Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
2025-02-24 20:52:40 +00:00
Ed Hennis
cf96bd6058 Update branch management and merge / release processes (#5215)
* Has more steps, but allows merges to develop to continue when a
  beta / RC is pending, increasing developer velocity.
* Add a CI job to check that no reverse merges have been missed.
* Add some useful scripts in bin/git:
  * Set up upstreams as expected for safer pushes
  * Squash a bunch of branches
  * Set the version number
2025-02-24 20:52:40 +00:00
Sergey Kuznetsov
1718790820 fix: Error consistency in LedgerEntry::parsePermissionedDomains() (#5252)
Update errors for parsing permissioned domains in the LedgerEntry handler to make them consistent with other parsers.
2025-02-24 20:52:40 +00:00
Ed Hennis
7c8ead9c3c Set version to 2.4.0-b2 2025-02-24 20:52:40 +00:00
Ed Hennis
6bc78370ba fix: Use consistent CMake settings for all modules (#5228)
* Resolves an issue introduced in #5111, which inadvertently removed the
  -Wno-maybe-uninitialized compiler option from some xrpl.libxrpl
  modules. This resulted in new "may be used uninitialized" build
  warnings, first noticed in the "protocol" module. When compiling with
  derr=TRUE, those warnings became errors, which made the build fail.
* Github CI actions will build with the assert and werr options turned
  on. This will cause CI jobs to fail if a developer introduces a new
  compiler warning, or causes an assert to fail in release builds.
* Includes the OS and compiler version in the linux dependencies jobs in
  the "check environment" step.
* Translates the `unity` build option into `CMAKE_UNITY_BUILD` setting.
2025-02-24 20:52:40 +00:00
Valentin Balaschenko
afc9a42ff5 Fix levelization script to ignore commented includes (#5194)
Check to ignore single-line comments during dependency analysis.
2025-02-24 20:52:40 +00:00
tequ
090393930f Fix the flag processing of NFTokenModify (#5246)
Adds checks for invalid flags.
2025-02-24 20:52:40 +00:00
Mayukha Vadari
c36daa7857 Fix failing assert in connect RPC (#5235) 2025-02-24 20:52:40 +00:00
Olek
9069e430ad Permissioned Domains (XLS-80d) (#5161) 2025-02-24 20:52:40 +00:00
Mayukha Vadari
6c66b7448d chore: update deprecated Github Actions (#5241) 2025-02-24 20:52:40 +00:00
tequ
1bb3c9db58 XLS-46: DynamicNFT (#5048)
This Amendment adds functionality to update the URI of NFToken objects as described in the XLS-46d: Dynamic Non Fungible Tokens (dNFTs) spec.
2025-02-24 20:52:40 +00:00
rrmanukyan
63cbd84487 chore: add macos dependency installation (#5233)
* python (3.13) and cmake (latest)
2025-02-24 20:52:40 +00:00
Shawn Xie
f6d74d8c29 prefix Uint384 and Uint512 with Hash in server_definitions (#5231) 2025-02-24 20:52:40 +00:00
Mayukha Vadari
117306f8ae refactor: add rpcName to LEDGER_ENTRY macro (#5202)
The LEDGER_ENTRY macro now takes an additional parameter, which makes it easier to avoid missing including the new field in jss.h and to the list of account_objects/ledger_data filters.
2025-02-24 20:52:40 +00:00
Ed Hennis
7717f08a05 Set version to 2.4.0-b1 2025-02-24 20:52:40 +00:00
Michael Legleux
0633844187 fix: Add header for set_difference (#5197)
Fix `error C2039: 'set_difference': is not a member of 'std'`
2025-02-24 20:51:54 +00:00
Mayukha Vadari
dc0608825b fix: allow overlapping types in Expected (#5218)
For example, Expected<std::uint32_t, Json::Value>, will now build even though there is animplicit conversion from unsigned int to Json::Value.
2025-02-24 20:51:54 +00:00
Gregory Tsipenyuk
49f35dc4d5 Add MPTIssue to STIssue (#5200)
Replace Issue in STIssue with Asset. STIssue with MPTIssue is only used in MPT tests.
Will be used in Vault and in transactions with STIssue fields once MPT is integrated into DEX.
2025-02-24 20:51:54 +00:00
Bronek Kozicki
8d78701c96 Antithesis instrumentation improvements (#5213)
* Rename ASSERT to XRPL_ASSERT
* Upgrade to Anthithesis SDK 0.4.4, and use new 0.4.4 features
  * automatic cast to bool, like assert
* Add instrumentation workflow to verify build with instrumentation enabled
2025-02-24 20:51:54 +00:00
John Freeman
a1e3009bff Enforce levelization in libxrpl with CMake (#5111)
Adds two CMake functions:

* add_module(library subdirectory): Declares an OBJECT "library" (a CMake abstraction for a collection of object files) with sources from the given subdirectory of the given library, representing a module. Isolates the module's headers by creating a subdirectory in the build directory, e.g. .build/tmp123, that contains just a symlink, e.g. .build/tmp123/basics, to the module's header directory, e.g. include/xrpl/basics, in the source directory, and putting .build/tmp123 (but not include/xrpl) on the include path of the module sources. This prevents the module sources from including headers not explicitly linked to the module in CMake with target_link_libraries.
* target_link_modules(library scope modules...): Links the library target to each of the module targets, and removes their sources from its source list (so they are not compiled and linked twice).

Uses these functions to separate and explicitly link modules in libxrpl:

    Level 01: beast
    Level 02: basics
    Level 03: json, crypto
    Level 04: protocol
    Level 05: resource, server
2025-02-24 20:51:54 +00:00
Mayukha Vadari
8632aa8d3d refactor: clean up LedgerEntry.cpp (#5199)
Refactors LedgerEntry to make it easier to read and understand.
2025-02-24 20:51:54 +00:00