Skip to content

Commit 3d02580

Browse files
committed
Merge remote-tracking branch 'upstream/master' into merge231
Hotfix: version 2.3.1 Reduce the peer charges for well-behaved peers Update conan in the "nix" CI jobs
2 parents dcc4581 + 8458233 commit 3d02580

32 files changed

+400
-162
lines changed

.github/workflows/nix.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
env:
6464
build_dir: .build
6565
steps:
66+
- name: upgrade conan
67+
run: |
68+
pip install --upgrade "conan<2"
6669
- name: checkout
6770
uses: actions/checkout@v4
6871
- name: check environment
@@ -122,6 +125,9 @@ jobs:
122125
env:
123126
build_dir: .build
124127
steps:
128+
- name: upgrade conan
129+
run: |
130+
pip install --upgrade "conan<2"
125131
- name: download cache
126132
uses: actions/download-artifact@v4
127133
with:
@@ -170,6 +176,9 @@ jobs:
170176
env:
171177
build_dir: .build
172178
steps:
179+
- name: upgrade conan
180+
run: |
181+
pip install --upgrade "conan<2"
173182
- name: download cache
174183
uses: actions/download-artifact@v4
175184
with:
@@ -240,6 +249,9 @@ jobs:
240249
build_dir: .build
241250
configuration: Release
242251
steps:
252+
- name: upgrade conan
253+
run: |
254+
pip install --upgrade "conan<2"
243255
- name: download cache
244256
uses: actions/download-artifact@v4
245257
with:

Builds/levelization/results/ordering.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ test.nodestore > xrpld.core
8181
test.nodestore > xrpld.nodestore
8282
test.nodestore > xrpld.unity
8383
test.overlay > test.jtx
84+
test.overlay > test.toplevel
8485
test.overlay > test.unit_test
8586
test.overlay > xrpl.basics
8687
test.overlay > xrpld.app

RELEASENOTES.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,62 @@ This document contains the release notes for `rippled`, the reference server imp
66

77
Have new ideas? Need help with setting up your node? [Please open an issue here](https://github.com/xrplf/rippled/issues/new/choose).
88

9+
# Version 2.3.1
10+
11+
Version 2.3.1 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available.
12+
This is a hotfix release that includes the following updates:
13+
- Fix an erroneous high fee penalty that peers could incur for sending older transactions.
14+
- Update to the fees charged for imposing a load on the server.
15+
- Prevent the relaying of internal pseudo-transactions.
16+
- Before: Pseudo-transactions received from a peer will fail the signature check, even if they were requested (using TMGetObjectByHash) because they have no signature. This causes the peer to be charged for an invalid signature.
17+
- After: Pseudo-transactions, are put into the global cache (TransactionMaster) only. If the transaction is not part of a TMTransactions batch, the peer is charged an unwanted data fee. These fees will not be a problem in the normal course of operations but should dissuade peers from behaving badly by sending a bunch of junk.
18+
- Improved logging now specifies the reason for the fee charged to the peer.
19+
20+
[Sign Up for Future Release Announcements](https://groups.google.com/g/ripple-server)
21+
22+
<!-- BREAK -->
23+
24+
## Action Required
25+
26+
If you run an XRP Ledger validator, upgrade to version 2.3.1 as soon as possible to ensure stable and uninterrupted network behavior.
27+
28+
## Changelog
29+
30+
### Amendments and New Features
31+
32+
- None
33+
34+
### Bug Fixes and Performance Improvements
35+
36+
- Change the charged fee for sending older transactions from feeInvalidSignature to feeUnwantedData. [#5243](https://github.com/XRPLF/rippled/pull/5243)
37+
38+
### Docs and Build System
39+
40+
- None
41+
42+
### GitHub
43+
44+
The public source code repository for `rippled` is hosted on GitHub at <https://github.com/XRPLF/rippled>.
45+
46+
We welcome all contributions and invite everyone to join the community of XRP Ledger developers to help build the Internet of Value.
47+
48+
49+
## Credits
50+
51+
The following people contributed directly to this release:
52+
53+
Ed Hennis <ed@ripple.com>
54+
JoelKatz <DavidJoelSchwartz@GMail.com>
55+
Sophia Xie <106177003+sophiax851@users.noreply.github.com>
56+
Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
57+
58+
59+
Bug Bounties and Responsible Disclosures:
60+
61+
We welcome reviews of the `rippled` code and urge researchers to responsibly disclose any issues they may find.
62+
63+
To report a bug, please send a detailed report to: <bugs@xrpl.org>
64+
965
# Version 2.3.0
1066

1167
Version 2.3.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release includes 8 new amendments, including Multi-Purpose Tokens, Credentials, Clawback support for AMMs, and the ability to make offers as part of minting NFTs. Additionally, this release includes important fixes for stability, so server operators are encouraged to upgrade as soon as possible.

include/xrpl/resource/Charge.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ class Charge
5353

5454
bool
5555
operator==(Charge const&) const;
56-
bool
57-
operator!=(Charge const&) const;
56+
57+
std::strong_ordering
58+
operator<=>(Charge const&) const;
5859

5960
private:
6061
value_type m_cost;

include/xrpl/resource/Consumer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Consumer
6767

6868
/** Apply a load charge to the consumer. */
6969
Disposition
70-
charge(Charge const& fee);
70+
charge(Charge const& fee, std::string const& context = {});
7171

7272
/** Returns `true` if the consumer should be warned.
7373
This consumes the warning.

include/xrpl/resource/Fees.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@ namespace Resource {
2828
// clang-format off
2929
/** Schedule of fees charged for imposing load on the server. */
3030
/** @{ */
31-
extern Charge const feeInvalidRequest; // A request that we can immediately
31+
extern Charge const feeMalformedRequest; // A request that we can immediately
3232
// tell is invalid
3333
extern Charge const feeRequestNoReply; // A request that we cannot satisfy
3434
extern Charge const feeInvalidSignature; // An object whose signature we had
3535
// to check and it failed
36-
extern Charge const feeUnwantedData; // Data we have no use for
37-
extern Charge const feeBadData; // Data we have to verify before
36+
extern Charge const feeUselessData; // Data we have no use for
37+
extern Charge const feeInvalidData; // Data we have to verify before
3838
// rejecting
3939

4040
// RPC loads
41-
extern Charge const feeInvalidRPC; // An RPC request that we can
41+
extern Charge const feeMalformedRPC; // An RPC request that we can
4242
// immediately tell is invalid.
4343
extern Charge const feeReferenceRPC; // A default "reference" unspecified
4444
// load
4545
extern Charge const feeExceptionRPC; // RPC load that causes an exception
4646
extern Charge const feeMediumBurdenRPC; // A somewhat burdensome RPC load
47-
extern Charge const feeHighBurdenRPC; // A very burdensome RPC load
47+
extern Charge const feeHeavyBurdenRPC; // A very burdensome RPC load
4848

4949
// Peer loads
50-
extern Charge const feeLightPeer; // Requires no reply
51-
extern Charge const feeMediumBurdenPeer; // Requires some work
52-
extern Charge const feeHighBurdenPeer; // Extensive work
50+
extern Charge const feeTrivialPeer; // Requires no reply
51+
extern Charge const feeModerateBurdenPeer; // Requires some work
52+
extern Charge const feeHeavyBurdenPeer; // Extensive work
5353

5454
// Administrative
5555
extern Charge const feeWarning; // The cost of receiving a warning

include/xrpl/resource/detail/Logic.h

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,34 @@ class Logic
446446
}
447447

448448
Disposition
449-
charge(Entry& entry, Charge const& fee)
449+
charge(Entry& entry, Charge const& fee, std::string context = {})
450450
{
451+
static constexpr Charge::value_type feeLogAsWarn = 3000;
452+
static constexpr Charge::value_type feeLogAsInfo = 1000;
453+
static constexpr Charge::value_type feeLogAsDebug = 100;
454+
static_assert(
455+
feeLogAsWarn > feeLogAsInfo && feeLogAsInfo > feeLogAsDebug &&
456+
feeLogAsDebug > 10);
457+
458+
static auto getStream = [](Resource::Charge::value_type cost,
459+
beast::Journal& journal) {
460+
if (cost >= feeLogAsWarn)
461+
return journal.warn();
462+
if (cost >= feeLogAsInfo)
463+
return journal.info();
464+
if (cost >= feeLogAsDebug)
465+
return journal.debug();
466+
return journal.trace();
467+
};
468+
469+
if (!context.empty())
470+
context = " (" + context + ")";
471+
451472
std::lock_guard _(lock_);
452473
clock_type::time_point const now(m_clock.now());
453474
int const balance(entry.add(fee.cost(), now));
454-
JLOG(m_journal.trace()) << "Charging " << entry << " for " << fee;
475+
JLOG(getStream(fee.cost(), m_journal))
476+
<< "Charging " << entry << " for " << fee << context;
455477
return disposition(balance);
456478
}
457479

include/xrpl/resource/detail/Tuning.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ enum {
3232

3333
// Balance at which the consumer is disconnected
3434
,
35-
dropThreshold = 15000
35+
dropThreshold = 25000
3636

3737
// The number of seconds in the exponential decay window
3838
// (This should be a power of two)

src/libxrpl/resource/Charge.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ Charge::operator==(Charge const& c) const
6161
return c.m_cost == m_cost;
6262
}
6363

64-
bool
65-
Charge::operator!=(Charge const& c) const
64+
std::strong_ordering
65+
Charge::operator<=>(Charge const& c) const
6666
{
67-
return c.m_cost != m_cost;
67+
return m_cost <=> c.m_cost;
6868
}
6969

7070
} // namespace Resource

src/libxrpl/resource/Consumer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ Consumer::disposition() const
9696
}
9797

9898
Disposition
99-
Consumer::charge(Charge const& what)
99+
Consumer::charge(Charge const& what, std::string const& context)
100100
{
101101
Disposition d = ok;
102102

103103
if (m_logic && m_entry && !m_entry->isUnlimited())
104-
d = m_logic->charge(*m_entry, what);
104+
d = m_logic->charge(*m_entry, what, context);
105105

106106
return d;
107107
}

0 commit comments

Comments
 (0)