9935 Commits

Author SHA1 Message Date
Wo Jake
cd3a6bf530 Document the "DefaultVote::no" policy in the code 2022-08-19 14:57:38 -07:00
Crypto Brad Garlinghouse
6a9c270776 Properly handle self-assignment of PublicKey 2022-08-19 14:27:33 -07:00
Howard Hinnant
21a3f4a5b5 Change by-value to by-reference to persist vote 2022-08-19 14:26:59 -07:00
Richard Holland
8b89db6a92 incr feature.h 2022-08-15 09:14:34 +00:00
Richard Holland
b2d3c96dc2 Merge remote-tracking branch 'ripple/develop' into develop 2022-08-15 08:53:01 +00:00
manojsdoshi
e5275b8577 Set version to 1.9.2 2022-07-25 16:48:36 -07:00
Nik Bougalis
83faf43140 Set version to 1.9.2-rc1 2022-07-18 13:58:48 -07:00
Nik Bougalis
22b4de2e44 Fix a race condition during shutdown 2022-07-18 13:58:47 -07:00
Nik Bougalis
b95ca98965 Fix #4231 (wrong include guard) and an out-of-order construction warning 2022-07-17 22:17:34 -07:00
Nik Bougalis
7e46f5342b Correct a technical flaw with the spinlock locking:
The existing spinlock code, used to protect SHAMapInnerNode
child lists, has a mistake that can allow the same child to
be repeatedly locked under some circumstances.

The bug was in the `SpinBitLock::lock` loop condition check
and would result in the loop terminating early.

This commit fixes this and further simplifies the lock loop
making the correctness of the code easier to verify without
sacrificing performance.

It also promotes the spinlock class from an implementation
detail to a more general purpose, easier to use lock class
with clearer semantics. Two different lock types now allow
developers to easily grab either a single spinlock from an
a group of spinlocks (packed in an unsigned integer) or to
grab all of the spinlocks at once.

While this commit makes spinlocks more widely available to
developers, they are rarely the best tool for the job. Use
them judiciously and only after careful consideration.
2022-07-17 22:17:34 -07:00
Nik Bougalis
59326bbbc5 Introduce the NonFungibleTokensV1_1 amendment:
The XLS-20 implementation contained two bugs that would require the
introduction of amendments. This complicates the adoption of XLS-20
by requiring a staggered amendment activation, first of the two fix
amendments, followed by the `NonFungibleTokensV1` amendment.

After consideration, the consensus among node operators is that the
process should be simplified by the introduction of a new amendment
that, if enabled, would behaves as if the `NonFungibleTokensV1` and
the two fix amendments (`fixNFTokenDirV1` and `fixNFTokenNegOffer`)
were activated at once.

This commit implements this proposal; it does not introduce any new
functionality or additional features, above and beyond that offered
by the existing amendments.
2022-07-17 22:17:33 -07:00
Nik Bougalis
9eb303f8e8 Improve STVector256 deserialization 2022-07-17 22:17:33 -07:00
Nik Bougalis
47ccd0b579 Limit how often endpoint messages can be processed:
The peer discovery protocol depends on peers exchanging messages
listing IP addresses for other peers.

Under normal circumstances, these messages should not be sent
frequently; the existing code would track the earliest time a
new message should be processed, but did not actually enforce
that limit.
2022-07-17 22:17:32 -07:00
Nik Bougalis
5e6728dccd Set cluster timer only when in a cluster 2022-07-17 22:17:31 -07:00
Nathan Nichols
d458e9972b Improve JSON sanitization in reporting mode 2022-07-17 22:17:24 -07:00
Howard Hinnant
b0b44d32bd Fix amendment voting persistence:
An incorrect SQL query could cause the server to improperly
configure its voting state after a restart; typically, this
would manifest as an apparent failure to store a vote which
the administrator of the server had configured.

This commit fixes the broken SQL and ensures that amendment
votes are properly reloaded post-restart and closes #4220.
2022-07-17 22:17:24 -07:00
Scott Schurr
8266d9d598 Correct a technical flaw with NFT offers:
The existing code would, incorrectly, allow negative amounts in offers
for non-fungible tokens. Such offers would be handled very differently
depending on the context: a direct offer would fail with an error code
indicating an internal processing error, whereas brokered offers would
improperly succeed.

This commit introduces the `fixNFTokenNegOffer` amendment that detects
such offers during creation and returns an appropriate error code.

The commit also extends the existing code to allow for buy offers that
contain a `Destination` field, so that a specific broker can be set in
the offer.
2022-07-17 22:17:24 -07:00
Scott Schurr
0839a202c9 Reduce console noise coming from unit tests:
A few unit tests have historically generated a lot of noise
to the console from log writes.  This noise was not useful
and made it harder to locate actual test failures.

By changing the log level of these tests from
- severities::kError to
- severities::kDisabled
it was possible to remove that noise coming from the logs.
2022-07-17 22:17:24 -07:00
Ed Hennis
ee60b16b3a Lower log level of "addPathsForType" log message (fixes #4177) 2022-07-17 22:17:24 -07:00
Ed Hennis
1f75ba23ee Fix bitwise or on boolean operands warning / error 2022-07-17 22:17:24 -07:00
seelabs
723733a778 Catch missing node error when rotating database:
While there should never be a missing node when copying the SHAMap,
rippled should not terminate when there's an error rotating the
database. This patch aborts the database rotation rather than aborting rippled.
2022-07-17 22:17:24 -07:00
seelabs
8e6a0d418c Fix race conditions in shard:
ThreadSafetyAnalysis was used to identify race conditions in this file.
This analysis was modivated by a (rare) crash while running unit tests.

Add locks to Shard flagged by ThreadSafetyAnalysis
2022-07-17 22:17:24 -07:00
seelabs
f55913dcee Add support for clang's ThreadSafetyAnalysis 2022-07-17 22:17:24 -07:00
Chenna Keshava B S
e46d2bcf27 Correctly use the configured network_id parameter:
The existing code properly parses the network_id parameter from the
the configuration file, but it does not properly set up the code to
use the value correctly. As a result the configured `network_id` is
ignored.
2022-07-17 22:17:24 -07:00
Chenna Keshava B S
d632f9f6c8 Properly handle incorrect port numbers in parseURL (fixes #4200) 2022-07-11 09:56:39 -07:00
Richard Holland
99eaa9201a static builds / change overflow to overflow_float for some compilers 2022-07-11 15:55:14 +00:00
Ikko Ashimine
4e724794c5 Fix typo in Consensus.h (#4179)
whenver -> whenever
2022-07-11 14:03:26 +02:00
RichardAH
610436d737 Add book_changes rpc (#4212) 2022-07-11 09:29:31 +02:00
Richard Holland
006524a10a account for new state objects and owner reserves better 2022-06-23 12:55:03 +00:00
Richard Holland
043bdaf379 Merge remote-tracking branch 'richardah/BookChanges191' into develop 2022-06-21 10:31:13 +00:00
Richard Holland
8dd5490fb6 try to suppress emitted txns being sent over network 2022-06-21 09:42:30 +00:00
Richard Holland
27846df19c Add book_changes rpc 2022-06-16 14:33:06 +00:00
Richard Holland
9ff1290093 Fix escrowid and offerid 2022-06-16 09:22:23 +00:00
Richard Holland
602c280dd4 use txnid instead of emitnonce where seq is not available in applicable transactors 2022-06-16 09:14:36 +00:00
Richard Holland
691f674743 bug fixes 2022-06-16 08:38:32 +00:00
Richard Holland
d3f6c4ef2d fix bug in iouescrow, hook macro 2022-06-14 12:52:55 +00:00
Richard Holland
2793f25acc merged IOUEscrow amendment 2022-06-14 09:04:43 +00:00
Richard Holland
d53c6d905a preliminary work on hook_namespace api 2022-06-14 08:48:08 +00:00
Richard Holland
1fa87c21be add emitnonce support to various transactors, object ids to various tx formats 2022-06-13 16:17:22 +00:00
Richard Holland
e3c792e68b emitdetails bug 2022-06-07 09:42:27 +00:00
Richard Holland
d452f9ca5a missing whitelist function 2022-06-06 12:55:24 +00:00
Richard Holland
3f7eaa5f7c fix multiplier bug, multipliers lower than 1 are necessary 2022-06-03 09:18:10 +00:00
Richard Holland
df111bc279 wce calc error 2022-06-02 19:53:57 +00:00
Richard Holland
0fe9fd2f81 division safety, seperate leb functions to signed and unsigned 2022-06-02 15:09:33 +00:00
Richard Holland
6571af7490 reprogram the guard_check function to fix several issues including worst case execution computation 2022-06-02 12:48:01 +00:00
Richard Holland
c87fa5210b add ledger_keylet hookapi 2022-06-02 08:35:16 +00:00
Richard Holland
869b66f06f impl missing float funcs that were documented but not implemented 2022-05-30 10:17:19 +00:00
Richard Holland
26f6f21635 better guard debugging 2022-05-27 11:04:16 +00:00
Richard Holland
4ea852b819 crash bug vector reserve 2022-05-26 10:58:23 +00:00
Richard Holland
4a8d904ed6 weak tsh bug fix 2022-05-26 09:48:02 +00:00