Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into invariant-acctde…
Browse files Browse the repository at this point in the history
…lete

* upstream/develop: (32 commits)
  fixInnerObjTemplate2 amendment (5047)
  Set version to 2.3.0-b1
  Ignore restructuring commits (4997)
  Recompute loops (4997)
  Rewrite includes (4997)
  Rearrange sources (4997)
  Move CMake directory (4997)
  Add bin/physical.sh (4997)
  Prepare to rearrange sources: (4997)
  Change order of checks in amm_info: (4924)
  Add the fixEnforceNFTokenTrustline amendment: (4946)
  Replaces the usage of boost::string_view with std::string_view (4509)
  docs: explain how to find a clang-format patch generated by CI (4521)
  XLS-52d: NFTokenMintOffer (4845)
  chore: remove repeat words (5041)
  Expose all amendments known by libxrpl (5026)
  fixReducedOffersV2: prevent offers from blocking order books: (5032)
  Additional unit tests for testing deletion of trust lines (4886)
  Fix conan typo: (5044)
  Add new command line option to make replaying transactions easier: (5027)
  ...
  • Loading branch information
ximinez committed Jul 1, 2024
2 parents 4dd0442 + 9fec615 commit b23eea4
Show file tree
Hide file tree
Showing 1,336 changed files with 11,726 additions and 7,588 deletions.
6 changes: 4 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<(BeastConfig)'
- Regex: '^<(test)/'
Priority: 0
- Regex: '^<(ripple)/'
- Regex: '^<(xrpld)/'
Priority: 1
- Regex: '^<(xrpl)/'
Priority: 2
- Regex: '^<(boost)/'
Priority: 3
Expand Down
4 changes: 2 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ slack_app: false

ignore:
- "src/test/"
- "src/ripple/beast/test/"
- "src/ripple/beast/unit_test/"
- "include/xrpl/beast/test/"
- "include/xrpl/beast/unit_test/"
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ e2384885f5f630c8f0ffe4bf21a169b433a16858
241b9ddde9e11beb7480600fd5ed90e1ef109b21
760f16f56835663d9286bd29294d074de26a7ba6
0eebe6a5f4246fced516d52b83ec4e7f47373edd
2189cc950c0cebb89e4e2fa3b2d8817205bf7cef
b9d007813378ad0ff45660dc07285b823c7e9855
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
6 changes: 2 additions & 4 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
sudo apt-get update
sudo apt-get install clang-format-${CLANG_VERSION}
- name: Format src/ripple
run: find src/ripple -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
- name: Format src/test
run: find src/test -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
- name: Format sources
run: find include src -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
- name: Check for differences
id: assert
run: |
Expand Down
40 changes: 33 additions & 7 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ See [System Requirements](https://xrpl.org/system-requirements.html).
Building rippled generally requires git, Python, Conan, CMake, and a C++ compiler. Some guidance on setting up such a [C++ development environment can be found here](./docs/build/environment.md).

- [Python 3.7](https://www.python.org/downloads/)
- [Conan 1.55](https://conan.io/downloads.html)
- [Conan 1.60](https://conan.io/downloads.html)[^1]
- [CMake 3.16](https://cmake.org/download/)

[^1]: It is possible to build with Conan 2.x,
but the instructions are significantly different,
which is why we are not recommending it yet.
Notably, the `conan profile update` command is removed in 2.x.
Profiles must be edited by hand.

`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
The [minimum compiler versions][2] required are:

Expand Down Expand Up @@ -67,9 +73,6 @@ Here are [sample instructions for setting up a C++ development environment on ma
Windows is not recommended for production use at this time.

- Additionally, 32-bit Windows development is not supported.
- Visual Studio 2022 is not yet supported.
- rippled generally requires [Boost][] 1.77, which Conan cannot build with VS 2022.
- Until rippled is updated for compatibility with later versions of Boost, Windows developers may need to use Visual Studio 2019.

[Boost]: https://www.boost.org/

Expand Down Expand Up @@ -104,6 +107,20 @@ then you will need to choose the `libstdc++11` ABI:
conan profile update settings.compiler.libcxx=libstdc++11 default
```


Ensure inter-operability between `boost::string_view` and `std::string_view` types:

```
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_BEAST_USE_STD_STRING_VIEW"]' default
conan profile update 'env.CXXFLAGS="-DBOOST_BEAST_USE_STD_STRING_VIEW"' default
```

If you have other flags in the `conf.tools.build` or `env.CXXFLAGS` sections, make sure to retain the existing flags and append the new ones. You can check them with:
```
conan profile show default
```


**Windows** developers may need to use the x64 native build tools.
An easy way to do that is to run the shortcut "x64 Native Tools Command
Prompt" for the version of Visual Studio that you have installed.
Expand Down Expand Up @@ -144,21 +161,30 @@ It does not explicitly link the C++ standard library,
which allows you to statically link it with GCC, if you want.

```
# Conan 1.x
conan export external/snappy snappy/1.1.10@
# Conan 2.x
conan export --version 1.1.10 external/snappy
```

Export our [Conan recipe for RocksDB](./external/rocksdb).
It does not override paths to dependencies when building with Visual Studio.

```
# Conan 1.x
conan export external/rocksdb rocksdb/6.29.5@
# Conan 2.x
conan export --version 6.29.5 external/rocksdb
```

Export our [Conan recipe for SOCI](./external/soci).
It patches their CMake to correctly import its dependencies.

```
# Conan 1.x
conan export external/soci soci/4.0.3@
# Conan 2.x
conan export --version 4.0.3 external/soci
```

### Build and Test
Expand Down Expand Up @@ -196,13 +222,13 @@ It patches their CMake to correctly import its dependencies.
generated by the first. You can pass the build type on the command line with
`--settings build_type=$BUILD_TYPE` or in the profile itself,
under the section `[settings]` with the key `build_type`.
If you are using a Microsoft Visual C++ compiler,
then you will need to ensure consistency between the `build_type` setting
and the `compiler.runtime` setting.
When `build_type` is `Release`, `compiler.runtime` should be `MT`.
When `build_type` is `Debug`, `compiler.runtime` should be `MTd`.
```
Expand Down
39 changes: 0 additions & 39 deletions Builds/CMake/RippledMultiConfig.cmake

This file was deleted.

15 changes: 0 additions & 15 deletions Builds/CMake/RippledVersion.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion Builds/levelization/levelization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mkdir results
includes="$( pwd )/results/rawincludes.txt"
pushd ../..
echo Raw includes:
grep -r '#include.*/.*\.h' src/ripple/ src/test/ | \
grep -r '#include.*/.*\.h' include src | \
grep -v boost | tee ${includes}
popd
pushd results
Expand Down
68 changes: 34 additions & 34 deletions Builds/levelization/results/loops.txt
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
Loop: ripple.app ripple.core
ripple.app > ripple.core
Loop: test.jtx test.toplevel
test.toplevel > test.jtx

Loop: ripple.app ripple.ledger
ripple.app > ripple.ledger
Loop: test.jtx test.unit_test
test.unit_test == test.jtx

Loop: ripple.app ripple.net
ripple.app > ripple.net
Loop: xrpl.basics xrpl.json
xrpl.json ~= xrpl.basics

Loop: ripple.app ripple.nodestore
ripple.app > ripple.nodestore
Loop: xrpld.app xrpld.core
xrpld.app > xrpld.core

Loop: ripple.app ripple.overlay
ripple.overlay ~= ripple.app
Loop: xrpld.app xrpld.ledger
xrpld.app > xrpld.ledger

Loop: ripple.app ripple.peerfinder
ripple.app > ripple.peerfinder
Loop: xrpld.app xrpld.net
xrpld.app > xrpld.net

Loop: ripple.app ripple.rpc
ripple.rpc > ripple.app
Loop: xrpld.app xrpld.nodestore
xrpld.app > xrpld.nodestore

Loop: ripple.app ripple.shamap
ripple.app > ripple.shamap
Loop: xrpld.app xrpld.overlay
xrpld.overlay ~= xrpld.app

Loop: ripple.basics ripple.core
ripple.core > ripple.basics
Loop: xrpld.app xrpld.peerfinder
xrpld.app > xrpld.peerfinder

Loop: ripple.basics ripple.json
ripple.json ~= ripple.basics
Loop: xrpld.app xrpld.rpc
xrpld.rpc > xrpld.app

Loop: ripple.basics ripple.protocol
ripple.protocol > ripple.basics
Loop: xrpld.app xrpld.shamap
xrpld.app > xrpld.shamap

Loop: ripple.core ripple.net
ripple.net > ripple.core
Loop: xrpld.core xrpld.net
xrpld.net > xrpld.core

Loop: ripple.net ripple.rpc
ripple.rpc > ripple.net
Loop: xrpld.core xrpld.perflog
xrpld.perflog ~= xrpld.core

Loop: ripple.nodestore ripple.overlay
ripple.overlay ~= ripple.nodestore
Loop: xrpld.net xrpld.rpc
xrpld.rpc > xrpld.net

Loop: ripple.overlay ripple.rpc
ripple.rpc ~= ripple.overlay
Loop: xrpld.nodestore xrpld.overlay
xrpld.overlay ~= xrpld.nodestore

Loop: test.jtx test.toplevel
test.toplevel > test.jtx
Loop: xrpld.overlay xrpld.rpc
xrpld.rpc ~= xrpld.overlay

Loop: test.jtx test.unit_test
test.unit_test == test.jtx
Loop: xrpld.perflog xrpld.rpc
xrpld.rpc ~= xrpld.perflog

Loading

0 comments on commit b23eea4

Please sign in to comment.