Commit Graph

12226 Commits

Author SHA1 Message Date
Scott Schurr
78d771af36 Remove conditionals for featureTickSize enabled 21Feb2017 2020-04-09 09:31:06 -07:00
Scott Schurr
6bb9dd22e0 Remove conditionals for featureCryptoConditions enabled 03Jan2017 2020-04-09 09:31:06 -07:00
Scott Schurr
1661c84af6 Remove unused featureCompareFlowV1V2 2020-04-09 09:31:06 -07:00
manojsdoshi
4f422f6f39 Setting version to 1.6.0-b1 2020-04-07 16:26:40 -07:00
manojsdoshi
393ca87572 Change the location for the project signer public keys:
The automated build system only builds packages signed with a list of
approved keys. This is a security measure to prevent someone who gains
push access to the repository from producing potentially malicious
packages that are signed by Ripple's trusted private keys.

Moving this list to the new location makes it easy to add and delete
new keys to the list.
2020-04-07 16:25:19 -07:00
Howard Hinnant
f4c56cbd53 Update SHAMap Documentation 2020-04-07 16:25:09 -07:00
Howard Hinnant
9470558ecc Remove all uses of the name scoped_lock
*  scoped_lock is now a std name with subtly different semantics
   compared to lock_guard.  Namely it can be used to lock 0 or
   more mutexes.  This is valuable, but can also be accidentally
   used to lock 0 mutexes when 1 was intended, creating a
   run-time error.

   Therefore, if and when we use scoped_lock, extra care needs to
   be taken in reviewing that code to ensure it doesn't
   accidentally lock 0 mutexes when 1 was intended.  To aid in
   such careful reviewing, the use of the name scoped_lock should
   be limited to those cases where the number of mutexes is not
   exactly one.
2020-04-07 16:25:09 -07:00
Howard Hinnant
f22fcb3b2a Rename canonicalize into two functions:
* canonicalize_replace_cache
* canonicalize_replace_client

Now it is clear at the call site that if there are
duplicate copies of the data between the cache and
the caller, which copy gets replaced.

Additionally data parameter is now const-correct.
If it is not going to be replaced (canonicalize_replace_cache),
then the shared_ptr to the client data is const.
2020-04-07 16:25:09 -07:00
Mark Travis
e257a226f3 Maintain history back to the earliest persisted ledger:
This makes behavior consistent with configurations both with and
without online delete.
2020-04-07 16:25:09 -07:00
rabbit
a4e9878790 Document the 'devnet' network identifier setting:
* The [network_id] option allows three string values:
- main: the XRP Ledger
- testnet: the Testnet operated by Ripple.
- devnet: the development test network operated by Ripple.
2020-04-07 16:23:34 -07:00
John Freeman
25b13978e7 Fix unity build 2020-04-07 11:31:23 -07:00
John Freeman
3e9cff9287 Fix Doxygen build 2020-04-06 17:28:53 -07:00
Gregory Tsipenyuk
758a3792eb Add protocol message compression support:
* Peers negotiate compression via HTTP Header "X-Offer-Compression: lz4"
* Messages greater than 70 bytes and protocol type messages MANIFESTS,
  ENDPOINTS, TRANSACTION, GET_LEDGER, LEDGER_DATA, GET_OBJECT,
  and VALIDATORLIST are compressed
* If the compressed message is larger than the uncompressed message
  then the uncompressed message is sent
* Compression flag and the compression algorithm type are included
  in the message header
* Only LZ4 block compression is currently supported
2020-04-06 17:22:59 -07:00
seelabs
ade5eb71cf Fix unneeded copies in range some range for loops:
clang 10 warns about an unneeded copy for these range for
loops (range-loop-construct warnings)
2020-04-06 17:22:59 -07:00
seelabs
d097819c52 Check XRP endpoints for circular paths (RIPD-1781):
The payment engine restricts payment paths so two steps do not input the
same Currency/Issuer or output the same Currency/Issuer. This check was
skipped when the path started or ended with XRP. An example of a path
that was incorrectly accepted was: XRP -> //USD -> //XRP -> EUR

This patch enables the path loop check for paths that start or end with
XRP.
2020-04-06 17:22:59 -07:00
Devon White
905a97e0aa Make ShardArchiveHandler downloads more resilient:
* Make ShardArchiveHandler a singleton.
* Add state database for ShardArchiveHandler.
* Use temporary database for SSLHTTPDownloader downloads.
* Make ShardArchiveHandler a Stoppable class.
* Automatically resume interrupted downloads at server start.
2020-04-06 17:22:47 -07:00
Miguel Portilla
cc452dfa9b Improve shard concurrency:
* Reduce lock scope on all public functions
* Use TaskQueue to process shard finalization in separate thread
* Store shard last ledger hash and other info in backend
* Use temp SQLite DB versus control file when acquiring
* Remove boost serialization from cmake files
2020-04-06 17:22:23 -07:00
Carl Hua
f00f263852 Set version to 1.5.0 2020-03-30 18:57:35 -04:00
Carl Hua
b54d672710 Set version to 1.5.0-rc3 2020-03-24 14:42:45 -05:00
Mark Travis
5047b89922 Allow non-root users to build packages. 2020-03-24 11:36:00 -07:00
seelabs
78ea75b116 Remove incorrect STAmount assert:
When computing rates for offers, an STAmount's value can be out of can be out of
range (before canonicalizing). There was an assert that could incorrectly fire
in some cases. This patch removes that assert.
2020-03-23 18:17:00 -07:00
Carl Hua
c0964832f5 Fix failing Travis CI Windows VS2019 build
The newest MSVC 19.25.28610.4 does not build rocksdb. During the
Travis CI Windows job, the vs_BuildTools.exe automatically
downloads the newest version of the compiler. This fix forces the
install of MSVC 19.24.28314.0 to build rocksdb.
2020-03-23 15:43:07 -07:00
Manoj doshi
4e3dc0e820 Set version to 1.5.0-rc2 2020-03-10 16:08:42 -07:00
CJ Cobb
2a2ad898b1 Set applied field to true even if engine result is not tesSUCCESS 2020-03-10 16:07:10 -07:00
Manoj doshi
b26ed948c8 Set version to 1.5.0-rc1 2020-03-06 15:12:51 -08:00
Manoj doshi
ba53722425 Set version to 1.5.0-b8 2020-03-06 15:10:49 -08:00
seelabs
4852daf695 Remove entry for fix1781 amendment:
The fix1781 amendment was incorrectly introduced during conflict
resolution and support for it is not included at this time. This commit
removes the definition of the amendment identifier.
2020-03-06 14:59:39 -08:00
Carl Hua
2d1be70ba2 Set version to 1.5.0-b7 2020-03-05 14:12:18 -05:00
seelabs
b126641f13 Clarify the code a comment applies to:
The `seq & 0xff` does not depend of `diff`, so does not belong in the block that
defines `diff`.
2020-03-05 14:10:31 -05:00
Nik Bougalis
6529d3e6f7 Use ephemeral validator public keys in lag ratchet:
A review of the lag ratchet code revealed that we were using
the long-term master public keys of trusted validators, when
we should have been using the ephemeral public keys instead.

As a result, the lag ratchet code would be effectively
inoperable.
2020-03-05 14:10:25 -05:00
Nik Bougalis
16c659b22c Simplify HashPrefix by converting to an enum 2020-03-05 14:10:20 -05:00
Mo Morsi
ec137044a0 Protocol Amendment: Always Require Fully-Canonical Signatures 2020-03-05 14:10:06 -05:00
John Freeman
053b6d9fd3 Include field name when diagnosing field not found:
Closes #3263
2020-03-05 14:08:07 -05:00
Mike Ellery
f76a5a3183 Set version to 1.5.0-b6
closes: #3226
closes: #3249
closes: #3260
closes: #3254
closes: #3258
closes: #3267
2020-02-25 19:22:00 -08:00
Elliot Lee
cfe59ee028 Fix typos in comments 2020-02-25 19:21:55 -08:00
John Freeman
20d4a39b63 Cooperate with CMAKE_MODULE_PATH set by Conan 2020-02-25 19:21:55 -08:00
CJ Cobb
e7ce3909d2 gRPC support for account_tx and tx
- Add support for all transaction types and ledger object types to gRPC
  implementation of tx and account_tx.

- Create common handlers for tx and account_tx.

- Remove mutex and abort() from gRPC server. JobQueue is stopped before
  gRPC server, with all coroutines executed to completion, so no need for
  synchronization.
2020-02-25 19:21:55 -08:00
Mike Ellery
acf4b78892 Add getRippledInfo to packages:
* include info gathering script in rippled linux pkgs
* modify script to output results to single markdown file
* rename info script
2020-02-25 19:21:55 -08:00
Mike Ellery
e9b3c58043 Use native cmake unity support:
* Remove hand-rolled unity sources
* unity unavailable for cmake 3.15 and earlier
* remove deprecated target configure option
2020-02-25 19:21:50 -08:00
seelabs
455105d3dc Limit account_channels to channels owned by the source account 2020-02-24 15:30:58 -08:00
seelabs
2dac108c57 Fix account_channels marker functionality 2020-02-24 15:30:58 -08:00
Nik Bougalis
0c6d380780 Set version to 1.5.0-b5 2020-02-12 11:30:45 -08:00
Edward Hennis
2c71802e38 Propagate validator lists (VLs or UNLs) over the peer network:
* Whenever a node downloads a new VL, send it to all peers that
  haven't already sent or received it. It also saves it to the
  database_dir as a Json text file named "cache." plus the public key of
  the list signer. Any files that exist for public keys provided in
  [validator_list_keys] will be loaded and processed if any download
  from [validator_list_sites] fails or no [validator_list_sites] are
  configured.
* Whenever a node receives a broadcast VL message, it treats it as if
  it had downloaded it on it's own, broadcasting to other peers as
  described above.
* Because nodes normally download the VL once every 5 minutes, a single
  node downloading a VL with an updated sequence number could
  potentially propagate across a large part of a well-connected network
  before any other nodes attempt to download, decreasing the amount of
  time that different parts of the network are using different VLs.
* Send all of our current valid VLs to new peers on connection.
  This is probably the "noisiest" part of this change, but will give
  poorly connected or poorly networked nodes the best chance of syncing
  quickly. Nodes which have no http(s) access configured or available
  can get a VL with no extra effort.
* Requests on the peer port to the /vl/<pubkey> endpoint will return
  that VL in the same JSON format as is used to download now, IF the
  node trusts and has a valid instance of that VL.
* Upgrade protocol version to 2.1. VLs will only be sent to 2.1 and
  higher nodes.
* Resolves #2953
2020-02-12 10:19:23 -08:00
Edward Hennis
3753840de5 Handle build directories for specific versions of gcc/clang:
* Example: gcc.Debug will use the the default version of gcc installed on the
  system. gcc-9.Debug will use version 9, regardless of the default. This will
  be most useful when the default is older than required or desired.
2020-02-12 10:19:23 -08:00
Edward Hennis
5ff23f8f31 Warn operators about upcoming unknown amendments:
* When an unknown amendment reaches majority, log an error-level
  message, and return a `warnings` array on all successful
  admin-level RPC calls to `server_info` and `server_state` with
  a message describing the problem, and the expected deadline.
* In addition to the `amendment_blocked` flag returned by
  `server_info` and `server_state`, return a warning with a more
  verbose description when the server is amendment blocked.
* Check on every flag ledger to see if the amendment(s) lose majority.
  Logs again if they don't, resumes normal operations if they did.

The intention is to give operators earlier warning that their
instances are in danger of being amendment blocked, which will
hopefully motivate them to update ahead of time.
2020-02-12 10:19:23 -08:00
Mike Ellery
4315913a5d Update RocksDB to 6.5:
* update EP and find package requirements
* minor protobuf/libarchive build fixes
* change travis release builds to nounity to
  ameliorate vm memory exhaustion.

FIXES: #3223, #3232
2020-02-12 10:19:23 -08:00
mbhandary
facb627786 Improve reporting of StateAccounting metrics:
* Metrics are now exported over insight.
* Fixes a minor bug that affected the reporting of gauges
2020-02-12 10:19:23 -08:00
mbhandary
b784988caf Added support for statsD Traffic Counts reporting 2020-02-12 10:19:23 -08:00
Nik Bougalis
172ead8221 Remove unused 'old Beast' code (RIPD-1652) 2020-02-11 19:14:24 -08:00
p2peer
d224d7e404 Switch to Boost.Beast for SSL detection (#3166) 2020-02-11 19:14:24 -08:00