Merge branch 'ximinez/lending-refactoring-2' into ximinez/lending-refactoring-3

This commit is contained in:
Ed Hennis
2025-09-03 14:04:12 -04:00
committed by GitHub
7 changed files with 93 additions and 9 deletions

View File

@@ -117,6 +117,8 @@ jobs:
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Prepare runner - name: Prepare runner
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5 uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
with:
disable_ccache: false
- name: Check configuration (Windows) - name: Check configuration (Windows)
if: ${{ inputs.os == 'windows' }} if: ${{ inputs.os == 'windows' }}

View File

@@ -60,5 +60,6 @@ repos:
exclude: | exclude: |
(?x)^( (?x)^(
external/.*| external/.*|
.github/scripts/levelization/results/.*\.txt .github/scripts/levelization/results/.*\.txt|
conan\.lock
)$ )$

View File

@@ -158,6 +158,10 @@ updated dependencies with the newer version. However, if we switch to a newer
version that no longer requires a patch, no action is required on your part, as version that no longer requires a patch, no action is required on your part, as
the new recipe will be automatically pulled from the official Conan Center. the new recipe will be automatically pulled from the official Conan Center.
> [!NOTE]
> You might need to add `--lockfile=""` to your `conan install` command
> to avoid automatic use of the existing `conan.lock` file when you run `conan export` manually on your machine
### Conan profile tweaks ### Conan profile tweaks
#### Missing compiler version #### Missing compiler version
@@ -466,6 +470,21 @@ tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
The location of `rippled` binary in your build directory depends on your The location of `rippled` binary in your build directory depends on your
CMake generator. Pass `--help` to see the rest of the command line options. CMake generator. Pass `--help` to see the rest of the command line options.
#### Conan lockfile
To achieve reproducible dependencies, we use [Conan lockfile](https://docs.conan.io/2/tutorial/versioning/lockfiles.html).
The `conan.lock` file in the repository contains a "snapshot" of the current dependencies.
It is implicitly used when running `conan` commands, you don't need to specify it.
You have to update this file every time you add a new dependency or change a revision or version of an existing dependency.
To do that, run the following command in the repository root:
```bash
conan lock create . -o '&:jemalloc=True' -o '&:rocksdb=True'
```
## Coverage report ## Coverage report
The coverage report is intended for developers using compilers GCC The coverage report is intended for developers using compilers GCC
@@ -564,7 +583,8 @@ After any updates or changes to dependencies, you may need to do the following:
``` ```
3. Re-run [conan export](#patched-recipes) if needed. 3. Re-run [conan export](#patched-recipes) if needed.
4. Re-run [conan install](#build-and-test). 4. [Regenerate lockfile](#conan-lockfile).
5. Re-run [conan install](#build-and-test).
### `protobuf/port_def.inc` file not found ### `protobuf/port_def.inc` file not found

View File

@@ -218,12 +218,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path") set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif() endif()
check_cxx_compiler_flag(-fprofile-update HAVE_cxx_fprofile_update) check_cxx_compiler_flag(-fprofile-update=atomic HAVE_cxx_fprofile_update)
if(HAVE_cxx_fprofile_update) if(HAVE_cxx_fprofile_update)
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic") set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
endif() endif()
check_c_compiler_flag(-fprofile-update HAVE_c_fprofile_update) check_c_compiler_flag(-fprofile-update=atomic HAVE_c_fprofile_update)
if(HAVE_c_fprofile_update) if(HAVE_c_fprofile_update)
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic") set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
endif() endif()

56
conan.lock Normal file
View File

@@ -0,0 +1,56 @@
{
"version": "0.5",
"requires": [
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497",
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1756234289.683",
"sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1756234266.869",
"soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1756234262.318",
"snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246",
"rocksdb/10.0.1#85537f46e538974d67da0c3977de48ac%1756234304.347",
"re2/20230301#dfd6e2bf050eb90ddd8729cfb4c844a4%1756234257.976",
"protobuf/3.21.12#d927114e28de9f4691a6bbcdd9a529d1%1756234251.614",
"openssl/3.5.2#0c5a5e15ae569f45dff57adcf1770cf7%1756234259.61",
"nudb/2.0.9#c62cfd501e57055a7e0d8ee3d5e5427d%1756234237.107",
"lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1756234228.999",
"libiconv/1.17#1e65319e945f2d31941a9d28cc13c058%1756223727.64",
"libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1756230911.03",
"libarchive/3.8.1#5cf685686322e906cb42706ab7e099a8%1756234256.696",
"jemalloc/5.3.0#e951da9cf599e956cebc117880d2d9f8%1729241615.244",
"grpc/1.50.1#02291451d1e17200293a409410d1c4e1%1756234248.958",
"doctest/2.4.11#a4211dfc329a16ba9f280f9574025659%1756234220.819",
"date/3.0.4#f74bbba5a08fa388256688743136cb6f%1756234217.493",
"c-ares/1.34.5#b78b91e7cfb1f11ce777a285bbf169c6%1756234217.915",
"bzip2/1.0.8#00b4a4658791c1f06914e087f0e792f5%1756234261.716",
"boost/1.88.0#8852c0b72ce8271fb8ff7c53456d4983%1756223752.326",
"abseil/20230802.1#f0f91485b111dc9837a68972cb19ca7b%1756234220.907"
],
"build_requires": [
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497",
"strawberryperl/5.32.1.1#707032463aa0620fa17ec0d887f5fe41%1756234281.733",
"protobuf/3.21.12#d927114e28de9f4691a6bbcdd9a529d1%1756234251.614",
"nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1756234232.901",
"msys2/cci.latest#5b73b10144f73cc5bfe0572ed9be39e1%1751977009.857",
"m4/1.4.19#b38ced39a01e31fef5435bc634461fd2%1700758725.451",
"cmake/3.31.8#dde3bde00bb843687e55aea5afa0e220%1756234232.89",
"b2/5.3.3#107c15377719889654eb9a162a673975%1756234226.28",
"automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56",
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86"
],
"python_requires": [],
"overrides": {
"protobuf/3.21.12": [
null,
"protobuf/3.21.12"
],
"lz4/1.9.4": [
"lz4/1.10.0"
],
"boost/1.83.0": [
"boost/1.88.0"
],
"sqlite3/3.44.2": [
"sqlite3/3.49.1"
]
},
"config_requires": []
}

View File

@@ -187,7 +187,7 @@ public:
char const* fn, char const* fn,
int meta = sMD_Default, int meta = sMD_Default,
IsSigning signing = IsSigning::yes); IsSigning signing = IsSigning::yes);
explicit SField(private_access_tag_t, int fc); explicit SField(private_access_tag_t, int fc, char const* fn);
static SField const& static SField const&
getField(int fieldCode); getField(int fieldCode);

View File

@@ -71,8 +71,8 @@ TypedField<T>::TypedField(private_access_tag_t pat, Args&&... args)
##__VA_ARGS__); ##__VA_ARGS__);
// SFields which, for historical reasons, do not follow naming conventions. // SFields which, for historical reasons, do not follow naming conventions.
SField const sfInvalid(access, -1); SField const sfInvalid(access, -1, "");
SField const sfGeneric(access, 0); SField const sfGeneric(access, 0, "Generic");
// The following two fields aren't used anywhere, but they break tests/have // The following two fields aren't used anywhere, but they break tests/have
// downstream effects. // downstream effects.
SField const sfHash(access, STI_UINT256, 257, "hash"); SField const sfHash(access, STI_UINT256, 257, "hash");
@@ -111,10 +111,11 @@ SField::SField(
knownNameToField[fieldName] = this; knownNameToField[fieldName] = this;
} }
SField::SField(private_access_tag_t, int fc) SField::SField(private_access_tag_t, int fc, char const* fn)
: fieldCode(fc) : fieldCode(fc)
, fieldType(STI_UNKNOWN) , fieldType(STI_UNKNOWN)
, fieldValue(0) , fieldValue(0)
, fieldName(fn)
, fieldMeta(sMD_Never) , fieldMeta(sMD_Never)
, fieldNum(++num) , fieldNum(++num)
, signingField(IsSigning::yes) , signingField(IsSigning::yes)
@@ -122,8 +123,12 @@ SField::SField(private_access_tag_t, int fc)
{ {
XRPL_ASSERT( XRPL_ASSERT(
!knownCodeToField.contains(fieldCode), !knownCodeToField.contains(fieldCode),
"ripple::SField::SField(fc) : fieldCode is unique"); "ripple::SField::SField(fc,fn) : fieldCode is unique");
XRPL_ASSERT(
!knownNameToField.contains(fieldName),
"ripple::SField::SField(fc,fn) : fieldName is unique");
knownCodeToField[fieldCode] = this; knownCodeToField[fieldCode] = this;
knownNameToField[fieldName] = this;
} }
SField const& SField const&