Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed 2.3.0-rc1 #5183

Merged
merged 21 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8e2c85d
docs: clean up API-CHANGELOG.md (#5064)
intelliot Oct 1, 2024
bf4a7b6
Expand Error Message for rpcInternal (#4959)
ckeshava Oct 1, 2024
f6d647d
Update clang-format workflow
thejohnfreeman Mar 1, 2024
decb3c1
Update clang-format settings
thejohnfreeman Mar 1, 2024
e7cd033
Update pre-commit hook
thejohnfreeman Mar 1, 2024
552377c
Reformat code with clang-format-18
thejohnfreeman Oct 15, 2024
f0dabd1
Ignore reformat when blaming
thejohnfreeman Oct 15, 2024
63209c2
Consolidate definitions of fields, objects, transactions, and feature…
thejohnfreeman Oct 16, 2024
23c37fa
Introduce MPT support (XLS-33d): (#5143)
gregtatcam Oct 29, 2024
ab5d450
Update RELEASENOTES.md (#5154)
BobConanDev Oct 29, 2024
d4a5f83
fix: reject invalid markers in account_objects RPC calls (#5046)
yinyiqian1 Oct 29, 2024
0d887ad
docs: Add protobuf dependencies to linux setup instructions (#5156)
vlntb Oct 29, 2024
d6dbf0e
Add hubs.xrpkuwait.com to bootstrap (#5169)
alloynetworks Oct 31, 2024
54a350b
Add AMMClawback Transaction (XLS-0073d) (#5142)
yinyiqian1 Nov 4, 2024
d57cced
Fix unity build (#5179)
gregtatcam Nov 5, 2024
ec61f5e
Add fixAMMv1_2 amendment (#5176)
gregtatcam Nov 5, 2024
c5c0e70
Fix token comparison in Payment (#5172)
gregtatcam Nov 6, 2024
8e827e3
Introduce Credentials support (XLS-70d): (#5103)
oleks-rip Nov 6, 2024
9e48fc0
Fix potential deadlock (#5124)
Bronek Nov 6, 2024
7b18006
Replace Uint192 with Hash192 in server_definitions response (#5177)
shawnxie999 Nov 6, 2024
9d58f11
Set version to 2.3.0-rc1
ximinez Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ IncludeCategories:
IncludeIsMainRegex: '$'
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Expand All @@ -73,6 +74,7 @@ PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
RequiresClausePosition: OwnLine
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
Expand Down
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ e2384885f5f630c8f0ffe4bf21a169b433a16858
b9d007813378ad0ff45660dc07285b823c7e9855
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
552377c76f55b403a1c876df873a23d780fcc81c
10 changes: 5 additions & 5 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
CLANG_VERSION: 10
CLANG_VERSION: 18
steps:
- uses: actions/checkout@v4
- name: Install clang-format
Expand All @@ -19,8 +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 sources
run: find include src -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
- name: Format first-party sources
run: find include src -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
- name: Check for differences
id: assert
run: |
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
To fix it, you can do one of two things:
1. Download and apply the patch generated as an artifact of this
job to your repo, commit, and push.
2. Run 'git-clang-format --extensions c,cpp,h,cxx,ipp develop'
2. Run 'git-clang-format --extensions cpp,h,hpp,ipp develop'
in your repo, commit, and push.
run: |
echo "${PREAMBLE}"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v10.0.1
rev: v18.1.3
hooks:
- id: clang-format
162 changes: 74 additions & 88 deletions API-CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Builds/levelization/results/loops.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Loop: test.jtx test.unit_test
test.unit_test == test.jtx

Loop: xrpl.basics xrpl.json
xrpl.json ~= xrpl.basics
xrpl.json == xrpl.basics

Loop: xrpld.app xrpld.core
xrpld.app > xrpld.core
Expand Down
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ If you operate an XRP Ledger server, upgrade to version 2.0.0 by January 22, 202

- Switched to Unity builds to speed up Windows CI. [#4780](https://github.com/XRPLF/rippled/pull/4780)

- Clarified what makes concensus healthy in `FeeEscalation.md`. [#4729](https://github.com/XRPLF/rippled/pull/4729)
- Clarified what makes consensus healthy in `FeeEscalation.md`. [#4729](https://github.com/XRPLF/rippled/pull/4729)

- Removed a dependency on the <ranges> header for unit tests. [#4788](https://github.com/XRPLF/rippled/pull/4788)

Expand Down
1 change: 1 addition & 0 deletions cfg/rippled-example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@
# The default list of entries is:
# - r.ripple.com 51235
# - sahyadri.isrdc.in 51235
# - hubs.xrpkuwait.com 51235
#
# Examples:
#
Expand Down
2 changes: 1 addition & 1 deletion docs/build/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ direction.

```
apt update
apt install --yes curl git libssl-dev python3.10-dev python3-pip make g++-11
apt install --yes curl git libssl-dev python3.10-dev python3-pip make g++-11 libprotobuf-dev protobuf-compiler
curl --location --remote-name \
"https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz"
Expand Down
53 changes: 32 additions & 21 deletions include/xrpl/basics/Expected.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,67 +136,76 @@ class [[nodiscard]] Expected

public:
template <typename U>
requires std::convertible_to<U, T> constexpr Expected(U && r)
: Base(T(std::forward<U>(r)))
requires std::convertible_to<U, T>
constexpr Expected(U&& r) : Base(T(std::forward<U>(r)))
{
}

template <typename U>
requires std::convertible_to<U, E> &&
(!std::is_reference_v<U>)constexpr Expected(Unexpected<U> e)
: Base(E(std::move(e.value())))
requires std::convertible_to<U, E> && (!std::is_reference_v<U>)
constexpr Expected(Unexpected<U> e) : Base(E(std::move(e.value())))
{
}

constexpr bool has_value() const
constexpr bool
has_value() const
{
return Base::has_value();
}

constexpr T const& value() const
constexpr T const&
value() const
{
return Base::value();
}

constexpr T& value()
constexpr T&
value()
{
return Base::value();
}

constexpr E const& error() const
constexpr E const&
error() const
{
return Base::error();
}

constexpr E& error()
constexpr E&
error()
{
return Base::error();
}

constexpr explicit operator bool() const
constexpr explicit
operator bool() const
{
return has_value();
}

// Add operator* and operator-> so the Expected API looks a bit more like
// what std::expected is likely to look like. See:
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0323r10.html
[[nodiscard]] constexpr T& operator*()
[[nodiscard]] constexpr T&
operator*()
{
return this->value();
}

[[nodiscard]] constexpr T const& operator*() const
[[nodiscard]] constexpr T const&
operator*() const
{
return this->value();
}

[[nodiscard]] constexpr T* operator->()
[[nodiscard]] constexpr T*
operator->()
{
return &this->value();
}

[[nodiscard]] constexpr T const* operator->() const
[[nodiscard]] constexpr T const*
operator->() const
{
return &this->value();
}
Expand All @@ -218,23 +227,25 @@ class [[nodiscard]] Expected<void, E>
}

template <typename U>
requires std::convertible_to<U, E> &&
(!std::is_reference_v<U>)constexpr Expected(Unexpected<U> e)
: Base(E(std::move(e.value())))
requires std::convertible_to<U, E> && (!std::is_reference_v<U>)
constexpr Expected(Unexpected<U> e) : Base(E(std::move(e.value())))
{
}

constexpr E const& error() const
constexpr E const&
error() const
{
return Base::error();
}

constexpr E& error()
constexpr E&
error()
{
return Base::error();
}

constexpr explicit operator bool() const
constexpr explicit
operator bool() const
{
return Base::has_value();
}
Expand Down
24 changes: 13 additions & 11 deletions include/xrpl/basics/FeeUnits.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ class TaggedFee : private boost::totally_ordered<TaggedFee<UnitTag, T>>,
protected:
template <class Other>
static constexpr bool is_compatible_v =
std::is_arithmetic_v<Other>&& std::is_arithmetic_v<value_type>&&
std::is_convertible_v<Other, value_type>;
std::is_arithmetic_v<Other> && std::is_arithmetic_v<value_type> &&
std::is_convertible_v<Other, value_type>;

template <class OtherFee, class = enable_if_unit_t<OtherFee>>
static constexpr bool is_compatiblefee_v =
is_compatible_v<typename OtherFee::value_type>&&
std::is_same_v<UnitTag, typename OtherFee::unit_type>;
is_compatible_v<typename OtherFee::value_type> &&
std::is_same_v<UnitTag, typename OtherFee::unit_type>;

template <class Other>
using enable_if_compatible_t =
Expand All @@ -110,7 +110,8 @@ class TaggedFee : private boost::totally_ordered<TaggedFee<UnitTag, T>>,
{
}

constexpr TaggedFee& operator=(beast::Zero)
constexpr TaggedFee&
operator=(beast::Zero)
{
fee_ = 0;
return *this;
Expand Down Expand Up @@ -250,7 +251,8 @@ class TaggedFee : private boost::totally_ordered<TaggedFee<UnitTag, T>>,
}

/** Returns true if the amount is not zero */
explicit constexpr operator bool() const noexcept
explicit constexpr
operator bool() const noexcept
{
return fee_ != 0;
}
Expand Down Expand Up @@ -344,8 +346,8 @@ constexpr bool can_muldiv_source_v =

template <class Dest, class = enable_if_unit_t<Dest>>
constexpr bool can_muldiv_dest_v =
can_muldiv_source_v<Dest>&& // Dest is also a source
std::is_convertible_v<std::uint64_t, typename Dest::value_type> &&
can_muldiv_source_v<Dest> && // Dest is also a source
std::is_convertible_v<std::uint64_t, typename Dest::value_type> &&
sizeof(typename Dest::value_type) >= sizeof(std::uint64_t);

template <
Expand All @@ -354,8 +356,8 @@ template <
class = enable_if_unit_t<Source1>,
class = enable_if_unit_t<Source2>>
constexpr bool can_muldiv_sources_v =
can_muldiv_source_v<Source1>&& can_muldiv_source_v<Source2>&& std::
is_same_v<typename Source1::unit_type, typename Source2::unit_type>;
can_muldiv_source_v<Source1> && can_muldiv_source_v<Source2> &&
std::is_same_v<typename Source1::unit_type, typename Source2::unit_type>;

template <
class Source1,
Expand All @@ -365,7 +367,7 @@ template <
class = enable_if_unit_t<Source2>,
class = enable_if_unit_t<Dest>>
constexpr bool can_muldiv_v =
can_muldiv_sources_v<Source1, Source2>&& can_muldiv_dest_v<Dest>;
can_muldiv_sources_v<Source1, Source2> && can_muldiv_dest_v<Dest>;
// Source and Dest can be the same by default

template <
Expand Down
6 changes: 4 additions & 2 deletions include/xrpl/basics/IOUAmount.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class IOUAmount : private boost::totally_ordered<IOUAmount>,
operator<(IOUAmount const& other) const;

/** Returns true if the amount is not zero */
explicit operator bool() const noexcept;
explicit
operator bool() const noexcept;

/** Return the sign of the amount */
int
Expand All @@ -109,7 +110,8 @@ inline IOUAmount::IOUAmount(std::int64_t mantissa, int exponent)
normalize();
}

inline IOUAmount& IOUAmount::operator=(beast::Zero)
inline IOUAmount&
IOUAmount::operator=(beast::Zero)
{
// The -100 is used to allow 0 to sort less than small positive values
// which will have a large negative exponent.
Expand Down
Loading
Loading