Compare commits

...

5813 Commits

Author SHA1 Message Date
Bronek Kozicki
e172510c4f Fixes 2025-09-02 21:28:20 +01:00
Bronek Kozicki
3a2e26c5c0 Remove unnecessary inputs 2025-09-02 20:14:47 +01:00
Bronek Kozicki
6bd3cc054a Add build-selected-commit workflow 2025-09-02 20:10:36 +01:00
Mayukha Vadari
e0b9812fc5 Refactor ledger_entry RPC source code and tests (#5237)
This is a major refactor of LedgerEntry.cpp. It adds a number of helper functions to make the code easier to maintain.

It also splits up the ledger and ledger_entry tests into different files, and cleans up the ledger_entry tests to make them easier to write and maintain.

This refactor also caught a few bugs in some of the other RPC processing, so those are fixed along the way.
2025-08-29 15:52:09 -04:00
Vito Tumas
e4fdf33158 adds additional logging to differentiate why connections were refused (#5690)
This is a follow-up to PR #5664 that further improves the specificity of logging for refused peer connections. The previous changes did not account for several key scenarios, leading to potentially misleading log messages.

It addresses the following 

- Inbound Disabled: Connections are now explicitly logged as rejected when the server is not configured to accept inbound peers. Previously, this was logged as the server being "full," which was technically correct but lacked diagnostic clarity.
- Duplicate Connections: The logging now distinguishes between two types of duplicate connection refusals:
    - When a peer with the same node public key is already connected (duplicate connection).
    -  When a connection is rejected because the limit for connections from a single IP address has been reached.

These changes provide more accurate and actionable diagnostic information when analyzing peer connection behavior.
2025-08-29 00:00:38 +00:00
Ed Hennis
6e814d7ebd chore: Run CI jobs in more situations, and add "passed" job (#5739)
Test jobs will run if
* Either the PR is non-draft or has the "DraftRunCI" label set *AND*
* One of the following:
	* Certain files were changed *OR*
	* The PR is non-draft and has the "Ready to merge" flag *OR*
	* The workflow is being run from the merge queue.

Additionally, a meta "passed" job was added that is dependent on all the other test jobs, so the required jobs list under branch protection rules only needs to specify "passed" to ensure that *either* all the test jobs pass *or* all the test jobs are skipped because they don't need to be run.

This allows PRs that don't affect the build or binary to be merged without overriding.
2025-08-28 20:33:11 +00:00
Ayaz Salikhov
1e37d00d6c ci: Use XRPLF/prepare-runner action (#5740)
* ci: Use XRPLF/prepare-runner action
* Remove some old boost workaround
2025-08-28 19:32:49 +00:00
Michael Legleux
87ea3ba65d Merge remote-tracking branch 'upstream/release' into merge2.6.0 2025-08-28 13:51:17 -04:00
Bronek Kozicki
dedf3d3983 Remove extraneous // LCOV_EXCL_START, and fix CMake warning (#5744)
* Remove extraneous // LCOV_EXCL_START
* Fix "At least one COMMAND must be given" CMake warning
2025-08-28 10:15:17 -04:00
Michael Legleux
2df7dcfdeb Set version to 2.6.0 2025-08-27 10:25:53 -07:00
Alex Kremer
1506e65558 refactor: Update to Boost 1.88 (#5570)
This updates Boost to 1.88, which is needed because Clio wants to move to 1.88 as that fixes several ASAN false positives around coroutine usage. In order for Clio to move to newer boost, libXRPL needs to move too. Hence the changes in this PR. A lot has changed between 1.83 and 1.88 so there are lots of changes in the diff, especially in regards to Boost.Asio and coroutines in particular.
2025-08-27 09:34:50 +00:00
Bart
808c86663c fix: Add codecov token to trigger workflow (#5736)
This change adds the Codecov token to the on-trigger workflow.
2025-08-26 19:07:23 -04:00
Bart
92431a4238 chore: Add support for merge_group event (#5734)
This change adds support for the merge_group CI event, which will allow us to enable merge queues.
2025-08-26 17:12:37 -04:00
Bart
285120684c refactor: Replace 'on: pull_request: paths' by 'changed-files' action (#5728)
This PR moves the list of files from the `paths:` section in the `on: pull_request` into a separate job.
2025-08-26 16:00:00 -04:00
Bart
77fef8732b fix: Simplify PR pipeline trigger rules (#5727)
This change removes `labeled` and `unlabeled` as pipeline trigger actions, and instead adds `reopened` and `ready_for_review`. The logic whether to run the pipeline jobs is then simplified, although to get a draft PR with the `DraftCIRun` label to run it can be necessary to close and reopen a PR.
2025-08-25 13:32:07 -04:00
Ed Hennis
7775c725f3 Merge remote-tracking branch 'upstream/release' into ximinez/merge-release 2025-08-22 19:56:21 -04:00
Bart
c61096239c chore: Remove codecov token check to support tokenless uploads on forks (#5722) 2025-08-22 23:31:01 +00:00
Ed Hennis
c5fe970646 Set version to 2.6.0-rc3 2025-08-22 17:32:31 -04:00
Ed Hennis
c57cd8b23e Revert "perf: Move mutex to the partition level (#5486)"
This reverts commit 94decc753b.
2025-08-22 17:30:08 -04:00
Bart
c14ce956ad chore: Update clang-format and prettier with pre-commit (#5709)
The change updates how clang-format is called in CI and locally, and adds prettier to the pre-commit hook. Proto files are now also formatted, while external files are excluded.
2025-08-22 17:37:11 +00:00
Mayukha Vadari
095dc4d9cc fix(test): handle null metadata for unvalidated tx in Env::meta (#5715)
This change handles errors better when calling `env.meta`. It prints some debug help and throws an error if `env.meta` is going to return a `nullptr`.
2025-08-22 16:15:03 +00:00
Bronek Kozicki
2e255812ae chore: Workaround for CI build errors on arm64 (#5717)
CI builds with `clang-20` on `linux/arm64` are failing due to boost 1.86. This is hopefully fixed in version 1.88.
2025-08-22 10:58:36 -04:00
Bart
896b8c3b54 chore: Fix file formatting (#5718) 2025-08-22 10:02:56 -04:00
Bart
58dd07bbdf fix: Skip notify-clio when running in a fork, reorder config fields (#5712)
This change will skip running the notify-clio job when a PR is created from a fork, and reorders the strategy matrix configuration fields so GitHub will more clearly show which configuration is running.
2025-08-21 16:32:04 -04:00
Bart
b13370ac0d chore: Reverts formatting changes to external files, adds formatting changes to proto files (#5711)
This change reverts the formatting applied to external files and adds formatting of proto files.

As clang-format will complain if a proto file is modified or moved, since the .clang-format file does not explicitly contain a section for proto files, the change has been included in this PR as well.
2025-08-21 15:22:25 -04:00
Bart
f847e3287c Update Conan dependencies: OpenSSL (#5617)
This change updates OpenSSL from 1.1.1w to 3.5.2. The code works as-is, but many functions have been marked as deprecated and thus will need to be rewritten. For now we explicitly add the `-DOPENSSL_SUPPRESS_DEPRECATED` to give us time to do so, while providing us with the benefits of the updated version.
2025-08-21 07:41:00 -04:00
Bart
56c1e078f2 fix: Correctly check for build_only when deciding whether to run tests (#5708)
This change modifies the `build_only` check used to determine whether to run tests. For easier debugging in the future it also prints out the contents of the strategy matrix.
2025-08-20 19:25:40 -04:00
Bart
afc05659ed fix: Adjust the CI workflows (#5700) 2025-08-19 12:46:38 -04:00
Bart
b04d239926 fix: Modify jobs to use '>>' instead of 'tee' for GITHUB_OUTPUT (#5699) 2025-08-18 10:49:55 -04:00
Bart
dc1caa41b2 refactor: Revamp CI workflows (#5661)
This change refactors the CI workflows to leverage the new CI Docker images for Debian, Red Hat, and Ubuntu.
2025-08-18 10:21:43 -04:00
Jingchen
ceb0ce5634 refactor: Decouple net from xrpld and move rpc-related classes to the rpc folder (#5477)
As a step of modularisation, this change moves code from `xrpld` to `libxrpl`.
2025-08-15 23:27:13 +00:00
Michael Legleux
fb89213d4d Set version to 2.6.0-rc2 2025-08-15 14:50:35 -07:00
Bart
d8628d481d docs: Updates list of maintainers and reviewers (#5687) 2025-08-14 16:17:37 -04:00
Elliot.
a14551b151 fix: Change log to debug level for AMM offer retrieval and IOU payment check (#5686)
Reduce log noise by changing two log statements from error/warn level to debug level. These logs occur during normal operation when AMM offers are not available or when IOU authorization checks fail, which are expected scenarios that don't require an elevated log level.
2025-08-14 12:28:01 -04:00
Bart
de33a6a241 fix: Add -Wno-deprecated-declarations for Clang only (#5680)
This change adds `-Wno-deprecated-declarations` for Clang only (not for GCC) builds in `cmake/RippledCompiler.cmake`.
2025-08-14 06:07:09 -04:00
Elliot.
28eec6ce1b Update .git-blame-ignore-revs for #5657 (#5675)
Now that #5657 has been squashed and merged, we can add its commit hash to .git-blame-ignore-revs.
2025-08-13 18:00:22 +00:00
Bronek Kozicki
c9a723128a Fix BUILD.md instruction (#5676) 2025-08-13 07:23:36 -04:00
Michael Legleux
da82e52613 Set version to 2.6.0-rc1 2025-08-12 13:40:34 -07:00
Vito Tumas
c9d73b6135 fix: Improve logging of the reason to refuse a peer connection (#5664)
Currently, all peer connection rejections are logged with the reason "slots full". This is inaccurate, as the PeerFinder can also reject connections if they are a duplicate. This change updates the logging logic to correctly report the specific reason (full or duplicate) for a rejected peer connection, providing more accurate diagnostic information.
2025-08-11 18:52:47 +00:00
Oleksandr Hrabar
b7ed99426b fix: Make test suite names match the directory name (#5597)
This change fixes the suite names all around the test files, to make them match to the folder name in which this test files are located. Also, the RCL test files are relocated to the consensus folder, because they are testing consensus functionality.
2025-08-11 14:12:36 -04:00
Mayukha Vadari
97f0747e10 chore: Run prettier on all files (#5657) 2025-08-11 16:15:42 +00:00
Bronek Kozicki
abf12db788 chore: Set CONAN_REMOTE_URL also for forks (#5662)
This change replaces the configuration variable with the hardcoded `https://conan.ripplex.io`, making it possible for PRs from forks to use our Conan remote containing workarounds.
2025-08-11 13:02:03 +00:00
Bart
bdfc376951 chore: Cleanup bin/ directory (#5660)
This change removes ancient and unused files from the `bin/` directory.
2025-08-11 11:24:24 +00:00
Jingchen
b40a3684ae perf: Optimize hash performance by avoiding allocating hash state object (#5469)
We're currently calling `XXH3_createState` and `XXH3_freeState` when hashing an object. However, it may be slow because they call `malloc` and `free`, which may affect the performance. This change avoids the use of the streaming API as much as possible by using an internal buffer.
2025-08-11 06:21:26 -04:00
Ed Hennis
86ef16dbeb Fix: Don't flag consensus as stalled prematurely (#5627)
Fix stalled consensus detection to prevent false positives in situations where there are no disputed transactions.

Stalled consensus detection was added to 2.5.0 in response to a network consensus halt that caused a round to run for over an hour. However, it has a flaw that makes it very easy to have false positives. Those false positives are usually mitigated by other checks that prevent them from having an effect, but there have been several instances of validators "running ahead" because there are circumstances where the other checks are "successful", allowing the stall state to be checked.
2025-08-08 17:13:32 -04:00
Bart
39b5031ab5 Switch Conan 1 commands to Conan 2 and fix credentials (#5655)
This change updates some incorrect Conan commands for Conan 2. As some flags do not exist in Conan 2, such as --settings build_type=[configuration], the commands have been adjusted accordingly. This change further uses the org-level variables and secrets rather than the repo-level ones.
2025-08-08 12:47:36 +00:00
Valentin Balaschenko
94decc753b perf: Move mutex to the partition level (#5486)
This change introduces two key optimizations:
* Mutex scope reduction: Limits the lock to individual partitions within `TaggedCache`, reducing contention.
* Decoupling: Removes the tight coupling between `LedgerHistory` and `TaggedCache`, improving modularity and testability.

Lock contention analysis based on eBPF showed significant improvements as a result of this change.
2025-08-07 17:04:07 -04:00
Bart
991891625a Upload Conan dependencies upon merge into develop (#5654)
This change uploads built Conan dependencies to the Conan remote upon merge into the develop branch.

At the moment, whenever Conan dependencies change, we need to remember to manually push them to our Conan remote, so they are cached for future reuse. If we forget to do so, these changed dependencies need to be rebuilt over and over again, which can take a long time.
2025-08-07 06:52:58 -04:00
Bart
69314e6832 refactor: Remove external libraries as they are hosted in our Conan Center Index fork (#5643)
This change:
* Removes the patched Conan recipes from the `external/` directory.
* Adds instructions for contributors how to obtain our patched recipes.
* Updates the Conan remote name and remote URL (the underlying package repository isn't changed).
* If the remote already exists, updates the URL instead of removing and re-adding.
  * This is not done for the libXRPL job as it still uses Conan 1. This job will be switched to Conan 2 soon.
* Removes duplicate Conan remote CI pipeline steps.
* Overwrites the existing global.conf on MacOS and Windows machines, as those do not run CI pipelines in isolation but all share the same Conan installation; appending the same config over and over bloats the file.
2025-08-06 15:46:13 +00:00
Bronek Kozicki
dbeb841b5a docs: Update BUILD.md for Conan 2 (#5478)
This change updates BUILD.md for Conan 2, add fixes/workarounds for Apple Clang 17, Clang 20 and CMake 4. This also removes (from BUILD.md only) workarounds for compiler versions which we no longer support e.g. Clang 15 and adds compilation flag -Wno-deprecated-declarations to enable building with Clang 20 on Linux.
2025-08-06 10:18:41 +00:00
tequ
4eae037fee fix: Ensures canonical order for PriceDataSeries upon PriceOracle creation (#5485)
This change fixes an issue where the order of `PriceDataSeries` was out of sync between when `PriceOracle` was created and when it was updated. Although they are registered in the canonical order when updated, they are created using the order specified in the transaction; this change ensures that they are also registered in the canonical order when created.
2025-08-05 13:08:59 -04:00
Jingchen
b5a63b39d3 refactor: Decouple ledger from xrpld/app (#5492)
This change decouples `ledger` from `xrpld/app`, and therefore fully clears the path to the modularisation of the ledger component. Before this change, `View.cpp` relied on `MPTokenAuthorize::authorize; this change moves `MPTokenAuthorize::authorize` to `View.cpp` to invert the dependency, making ledger a standalone module.
2025-08-05 15:28:56 +00:00
Denis Angell
6419f9a253 docs: Set up developer environment with specific XCode version (#5645) 2025-08-04 10:54:54 -04:00
Ayaz Salikhov
31c99caa65 Revert "ci: Build all conan dependencies from source for now (#5623)" (#5639)
This reverts commit 9b45b6888b.
2025-07-31 14:01:43 -04:00
Bronek Kozicki
d835e97490 Fix crash in Slot::deletePeer (#5635)
Fix crash due to recurrent call to `Slot::deletePeer` (via `OverlayImpl::unsquelch`) when a peer is disconnected at just the wrong moment.
2025-07-31 13:08:34 -04:00
Shawn Xie
baf4b8381f fix DeliveredAmount and delivered_amount in transaction metadata for direct MPT transfer (#5569)
The Payment transaction metadata is missing the `DeliveredAmount` field that displays the actual amount delivered to the destination excluding transfer fees. This amendment fixes this problem.
2025-07-29 17:02:33 +00:00
Ayaz Salikhov
9b45b6888b ci: Build all conan dependencies from source for now (#5623) 2025-07-29 15:29:38 +00:00
Bronek Kozicki
7179ce9c58 Build options cleanup (#5581)
As we no longer support old compiler versions, we are bringing back some warnings by removing no longer relevant `-Wno-...` options.
2025-07-25 15:48:22 -04:00
Bart
921aef9934 Updates Conan dependencies: Boost 1.86 (#5264) 2025-07-25 11:54:02 -04:00
Bronek Kozicki
e7a7bb83c1 VaultWithdraw destination account bugfix (#5572)
#5224 added (among other things) a `VaultWithdraw` transaction that allows setting the recipient of the withdrawn funds in the `Destination` transaction field. This technically turns this transaction into a payment, and in some respect the implementation does follow payment rules, e.g. enforcement of `lsfRequireDestTag` or `lsfDepositAuth`, or that MPT transfer has destination `MPToken`. However for IOUs, it missed verification that the destination account has a trust line to the asset issuer. Since the default behavior of `accountSendIOU` is to create this trust line (if missing), this is what `VaultWithdraw` currently does. This is incorrect, since the `Destination` might not be interested in holding the asset in question; this basically enables spammy transfers. This change, therefore, removes automatic creation of a trust line to the `Destination` account in `VaultWithdraw`.
2025-07-25 13:53:25 +00:00
Bart
5c2a3a2779 refactor: Update rocksdb (#5568)
This change updates RocksDB to its latest version. RocksDB is backward-compatible, so even though this is a major version bump, databases created with previous versions will continue to function.

The external RocksDB folder is removed, as the latest version available via Conan Center no longer needs custom patches.
2025-07-24 14:53:14 -04:00
Bronek Kozicki
b2960b9e7f Switch instrumentation workflow to use dependencies (#5607)
Before `XRPLF/ci` images, we did not have a `dependencies:` job for clang-16, so `instrumentation:` had to build its own dependencies. Now we have clang-16 Conan dependencies built in a separate job that can be used.
2025-07-24 09:20:50 -04:00
Bronek Kozicki
5713f9782a chore: Rename conan profile to default (#5599)
This change renames the `libxrpl` profile to `default` to make it more usable.
2025-07-24 10:35:47 +00:00
Chenna Keshava B S
60e340d356 Include network_id in validations and subscription stream responses (#5579)
This change includes `network_id` data in the validations and ledger subscription stream responses, as well as unit tests to validate the response fields. Fixes #4783
2025-07-23 17:53:18 +00:00
Bronek Kozicki
80d82c5b2b Add support for DomainID in MPTokenIssuance transactions (#5509)
This change adds support for `DomainID` to existing transactions `MPTokenIssuanceCreate` and `MPTokenIssuanceSet`.

In #5224 `DomainID` was added as an access control mechanism for `SingleAssetVault`. The actual implementation of this feature lies in `MPToken` and `MPTokenIssuance`, hence it makes sense to enable the use of `DomainID` also in `MPTokenIssuanceCreate` and `MPTokenIssuanceSet`, following same rules as in Vault:

* `MPTokenIssuanceCreate` and `MPTokenIssuanceSet` can only set `DomainID` if flag `MPTRequireAuth` is set.
* `MPTokenIssuanceCreate` requires that `DomainID` be a non-zero, uint256 number.
* `MPTokenIssuanceSet` allows `DomainID` to be zero (or empty) in which case it will remove `DomainID` from the `MPTokenIssuance` object.

The change is amendment-gated by `SingleAssetVault`. This is a non-breaking change because `SingleAssetVault` amendment is `Supported::no`, i.e. at this moment considered a work in progress, which cannot be enabled on the network.
2025-07-23 13:21:30 -04:00
Vlad
433eeabfa5 chore: Remove unused code after flow cross retirement (#5575)
After the `FlowCross` amendment was retired (#5562), there was still some unused code left. This change removes the remaining remnants.
2025-07-23 13:57:51 +00:00
Jingchen
faa781b71f Remove obsolete owner pays fee feature and XRPL_ABANDON stanza (#5550)
If a feature was never voted on then it is safe to remove.
2025-07-23 13:27:41 +00:00
Valentin Balaschenko
c233df720a refactor: Makes HashRouter flags more type-safe (#5371)
This change addresses the issue #5336: Refactor HashRouter flags to be more type-safe.

* Switched numeric flags to enum type.
* Updated unit tests
2025-07-23 12:03:12 +00:00
Bronek Kozicki
7ff4f79d30 Fix clang-format CI job (#5598)
For jobs running in containers, $GITHUB_WORKSPACE and ${{ github.workspace }} might not be the same directory. The actions/checkout step is supposed to checkout into `$GITHUB_WORKSPACE` and then add it to safe.directory (see instructions at https://github.com/actions/checkout), but that's apparently not happening for some container images. We can't be sure what is actually happening, so we preemptively add both directories to `safe.directory`. See also the GitHub issue opened in 2022 that still has not been resolved https://github.com/actions/runner/issues/2058.
2025-07-23 10:44:18 +00:00
Luc des Trois Maisons
60909655d3 Restructure beast::rngfill (#5563)
The current implementation of rngfill is prone to false warnings from GCC about array bounds violations. Looking at the code, the implementation naively manipulates both the bytes count and the buffer pointer directly to ensure the trailing memcpy doesn't overrun the buffer. As expressed, there is a data dependency on both fields between loop iterations.

Now, ideally, an optimizing compiler would realize that these dependencies were unnecessary and end up restructuring its intermediate representation into a functionally equivalent form with them absent. However, the point at which this occurs may be disjoint from when warning analyses are performed, potentially rendering them more difficult to
determine precisely.

In addition, it may also consume a portion of the budget the optimizer has allocated to attempting to improve a translation unit's performance. Given this is a function template which requires context-sensitive instantiation, this code would be more prone than most to being inlined, with a decrease in optimization budget corresponding to the effort the optimizer has already expended, having already optimized one or more calling functions. Thus, the scope for impacting the the ultimate quality of the code generated is elevated.

For this change, we rearrange things so that the location and contents of each memcpy can be computed independently, relying on a simple loop iteration counter as the only changing input between iterations.
2025-07-22 11:42:43 -04:00
Bronek Kozicki
03e46cd026 Remove include(default) from libxrpl profile (#5587)
Remove `include(default)` from `conan/profiles/libxrpl`. This means that we will now rely on compiler workarounds stored elsewhere e.g. in global.conf.
2025-07-21 14:03:53 +00:00
Vito Tumas
e95683a0fb refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
This change reverts the usage of boost::shared_mutex back to std::shared_mutex. The change was originally introduced as a workaround for a bug in glibc 2.28 and older versions, which could cause threads using std::shared_mutex to stall. This issue primarily affected Ubuntu 18.04 and earlier distributions, which we no longer support.
2025-07-21 13:14:22 +00:00
Jingchen
13353ae36d Fix macos runner (#5585)
This change fixes the MacOS pipeline issue by limiting GitHub to choose the existing runners, ensuring the new experimental runners are excluded until they are ready.
2025-07-21 12:22:32 +00:00
Chenna Keshava B S
1a40f18bdd Remove the type filter from "ledger" RPC command (#4934)
This issue was reported on the Javascript client library: XRPLF/xrpl.js#2611

The type filter (Note: as of the latest version of rippled, type parameter is deprecated) does not work as expected. This PR removes the type filter from the ledger command.
2025-07-18 17:58:46 +00:00
Bart
90e6380383 refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
This PR updates several dependencies to their latest versions. Not all dependencies have been updated, as some need to be patched and some require additional code changes due to backward incompatibilities introduced by the version bump.
2025-07-18 16:55:15 +00:00
Vlad
8bfaa7fe0a test: Run unit tests regardless of 'Supported' amendment status (#5537) 2025-07-16 11:47:54 +00:00
Vlad
c9135a63cd Retire Flow Cross amendment (#5562)
The FlowCross amendment is now permanently enabled, so all code branches that have this amendment disabled are removed.
2025-07-16 06:53:13 -04:00
Michael Legleux
452263eaa5 chore: Update CI to use Conan 2 (#5556)
This is a minimally invasive update to use Conan 2 provided by our new build images.
2025-07-15 22:17:22 +00:00
yinyiqian1
8aa94ea09a fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
Due to rounding, the LPTokenBalance of the last LP might not match the LP's trustline balance. This was fixed for `AMMWithdraw` in `fixAMMv1_1` by adjusting the LPTokenBalance to be the same as the trustline balance. Since `AMMClawback` is also performing a withdrawal, we need to adjust LPTokenBalance as well in `AMMClawback.`

This change includes:
1. Refactored `verifyAndAdjustLPTokenBalance` function in `AMMUtils`, which both`AMMWithdraw` and `AMMClawback` call to adjust LPTokenBalance.
2. Added the unit test `testLastHolderLPTokenBalance` to test the scenario.
3. Modify the existing unit tests for `fixAMMClawbackRounding`.
2025-07-11 20:03:28 +00:00
Bronek Kozicki
258ba71363 chore: Add gcc-12 workaround (#5554)
This change silences a dummy warning, which is breaking builds with GCC 12 (but not newer versions of GCC) in release mode only.
2025-07-11 18:57:09 +00:00
Shawn Xie
b8626ea3c6 Add MPT related txns into issuer's account history (#5530)
Currently there is no easy way to track MPT related transactions for the issuer. This change allows MPT transactions to show up on issuer's AccountTx RPC (to align with how IOUs work).
2025-07-11 17:50:03 +00:00
Vlad
6534757d85 chore: Remove unused headers (#5526) 2025-07-10 18:15:42 +00:00
Denis Angell
8e94ea3154 fix: add allowTrustLineLocking flag for account_info (#5525)
* Update the `account_info` API so that the `allowTrustLineLocking` flag is included in the response.
* The proposed `TokenEscrow` amendment added an `allowTrustLineLocking` flag in the `AccountRoot` object.
* In the API response, under `account_flags`, there is now an `allowTrustLineLocking` field with a boolean (`true` or `false`) value.
* For reference, the XLS-85 Token-Enabled Escrows implementation can be found in https://github.com/XRPLF/rippled/pull/5185
2025-07-10 16:29:51 +00:00
Bronek Kozicki
b113190563 Downgrade required CMake version for Antithesis SDK (#5548)
The current version was copied from `antithesis-sdk-cpp` but there is no logical reason to require this specific version of CMake. This change downgrades the version to make the project build with older CMake versions.
2025-07-10 11:46:02 -04:00
Ayaz Salikhov
358b7f50a7 fix: Link with boost libraries explicitly (#5546)
Having `boost::boost` in `self.requires` makes clio link with all boost libraries. There are additionally several Boost stacktrace backends that are both linked with, which violate ODR.
This change fixes the problem.
2025-07-10 06:14:27 -04:00
Bronek Kozicki
f47e2f4e82 chore: Fix compilation error with clang-20 and cleanup (#5543)
Removes clutter for old compilers, defaults to non-unity builds in cmake to match conanfile.py, and workaround for clang-20 compilation errors.
2025-07-09 17:47:34 +00:00
Bronek Kozicki
a7eea9546f test: Remove circular jtx.h dependencies (#5544)
Circular includes in header files can yield unpredictable results.
2025-07-09 08:43:11 -04:00
Jingchen
9874d47d7f Decouple CredentialHelpers from xrpld/app/tx (#5487)
This PR refactors `CredentialHelpers` and removes some unnecessary dependencies as a step of modularization.

The ledger component is almost independent except that it references `MPTokenAuthorize` and `CredentialHelpers.h`, and the latter further references `Transactor.h`. This PR partially clears the path to modularizing the ledger component and decouples `CredentialHelpers` from xrpld.
2025-07-03 14:27:37 +00:00
Mayukha Vadari
c2f3e2e263 fix: crash when trace-logging in tests (#5529)
This PR fixes a crash in tests when the test `Env is run at trace/debug log level.

This issue only affects tests, and only if logging at trace/debug level, so really only relevant during rippled development, and does not affect production servers.
2025-07-02 19:10:25 +00:00
Vlad
e18f27f5f7 test: switch some unit tests to doctest (#5383)
This change moves some tests from the current unit tests that are compiled into the rippled binary to using the doctest framework.
2025-06-26 19:35:31 +00:00
Jingchen
df6daf0d8f Add XRPL_ABANDON and use it to abandon OwnerPaysFee (#5510) 2025-06-26 12:09:05 -04:00
Jingchen
e9d46f0bfc Remove OwnerPaysFee as it's never fully supported (#5435)
The OwnerPaysFee amendment was never fully supported, and this change removes the feature to the extent possible.
2025-06-24 18:56:58 +00:00
Bart
42fd74b77b Removes release notes from codebase (#5508) 2025-06-24 13:10:00 -04:00
tequ
c55ea56c5e Add nftoken_id, nftoken_ids, offer_id to meta for transaction stream (#5230) 2025-06-24 09:02:22 -04:00
Michael Legleux
1e01cd34f7 Set version to 2.5.0 2025-06-23 10:13:01 -07:00
Alex Kremer
e2fa5c1b7c chore: Change libXRPL check conan remote to dev (#5482)
This change aligns the Conan remote used by the libXRPL Clio compatibility check workflow with the recent changes applied to Clio.
2025-06-20 17:02:16 +00:00
Ed Hennis
fc0984d286 Require a message on "Application::signalStop" (#5255)
This change adds a message parameter to Application::signalStop for extra context.
2025-06-20 16:24:34 +00:00
Valentin Balaschenko
8b3dcd41f7 refactor: Change getNodeFat Missing Node State Tree error into warning (#5455) 2025-06-20 15:44:42 +00:00
Denis Angell
8f2f5310e2 Fix: Improve error handling in Batch RPC response (#5503) 2025-06-18 17:46:45 -04:00
Michael Legleux
edb4f0342c Set version to 2.5.0-rc2 2025-06-11 17:10:45 -07:00
yinyiqian1
ea17abb92a fix: Ensure delegate tests do not silently fail with batch (#5476)
The tests that ensure `tfInnerBatchTxn` won't block delegated transactions silently fail in `Delegate_test.cpp`. This change removes these cases from that file and adds them to `Batch_test.cpp` instead where they do not silently fail, because there the batch delegate results are explicitly checked. Moving them to that file further avoids refactoring many helper functions.
2025-06-11 13:21:24 +08:00
Mayukha Vadari
35a40a8e62 fix: Improve multi-sign usage of simulate (#5479)
This change allows users to submit simulate requests from a multi-sign account without needing to specify the accounts that are doing the multi-signing, and fixes an error with simulate that allowed double-"signed" (both single-sign and multi-sign public keys are provided) transactions.
2025-06-10 14:47:27 +08:00
Ed Hennis
d494bf45b2 refactor: Collapse some split log messages into one (#5347)
Multi-line log messages are hard to work with. Writing these handful of related messages as one message should make the log a tiny bit easier to manage.
2025-06-06 16:01:02 +00:00
Vlad
8bf4a5cbff chore: Remove external project build cores division (#5475)
The CMake statements that make it seem as if the number of cores used to build external project dependencies is halved don't actually do anything. This change removes these statements.
2025-06-05 13:37:30 +00:00
Denis Angell
58c2c82a30 fix: Amendment-guard TokenEscrow preclaim and expand tests (#5473)
This change amendment-guards the preclaim for `TokenEscrow`, as well as expands tests to increase code coverage.
2025-06-05 12:54:45 +00:00
Michael Legleux
11edaa441d Set version to 2.5.0-rc1 (#5472) 2025-06-04 17:55:23 +00:00
yinyiqian1
a5e953b191 fix: Add tecNO_DELEGATE_PERMISSION and fix flags (#5465)
* Adds `tecNO_DELEGATE_PERMISSION` for unauthorized transactions sent by a delegated account.
* Returns `tecNO_TARGET` instead of `terNO_ACCOUNT` for the `DelegateSet` transaction if the delegated account does not exist.
* Fixes `tfFullyCanonicalSig` and `tfInnerBatchTxn` blocking transactions issue by adding `tfUniversal` in the permission related masks in `txFlags.h`
2025-06-03 22:20:29 +00:00
Mark Travis
506ae12a8c Increase network i/o capacity (#5464)
The change increases the default network I/O worker thread pool size from 2 to 6. This will improve stability, as worker thread saturation correlates to desyncs, particularly on high-traffic peers, such as hubs.
2025-06-03 21:33:09 +00:00
Ayaz Salikhov
0310c5cbe0 fix: Specify transitive_headers when building with Conan 2 (#5462)
To be able to consume `rippled` in Conan 2, the recipe should specify transitive_headers for external libraries that are present in the exported header files. This change remains compatibility with Conan 1, where this flag was not present.
2025-06-03 17:33:32 +00:00
Denis Angell
053e1af7ff Add support for XLS-85 Token Escrow (#5185)
- Specification: https://github.com/XRPLF/XRPL-Standards/pull/272
- Amendment: `TokenEscrow`
- Enables escrowing of IOU and MPT tokens in addition to native XRP.
- Allows accounts to lock issued tokens (IOU/MPT) in escrow objects, with support for freeze, authorization, and transfer rates.
- Adds new ledger fields (`sfLockedAmount`, `sfIssuerNode`, etc.) to track locked balances for IOU and MPT escrows.
- Updates EscrowCreate, EscrowFinish, and EscrowCancel transaction logic to support IOU and MPT assets, including proper handling of trustlines and MPT authorization, transfer rates, and locked balances.
- Enforces invariant checks for escrowed IOU/MPT amounts.
- Extends GatewayBalances RPC to report locked (escrowed) balances.
2025-06-03 12:51:55 -04:00
Vlad
7e24adbdd0 fix: Address NFT interactions with trustlines (#5297)
The changes are focused on fixing NFT transactions bypassing the trustline authorization requirement and potential invariant violation when interacting with deep frozen trustlines.
2025-06-02 16:13:20 +00:00
Gregory Tsipenyuk
621df422a7 fix: Add AMMv1_3 amendment (#5203)
* Add AMM bid/create/deposit/swap/withdraw/vote invariants:
  - Deposit, Withdrawal invariants: `sqrt(asset1Balance * asset2Balance) >= LPTokens`.
  - Bid: `sqrt(asset1Balance * asset2Balance) > LPTokens` and the pool balances don't change.
  - Create: `sqrt(asset1Balance * assetBalance2) == LPTokens`.
  - Swap: `asset1BalanceAfter * asset2BalanceAfter >= asset1BalanceBefore * asset2BalanceBefore`
     and `LPTokens` don't change.
  - Vote: `LPTokens` and pool balances don't change.
  - All AMM and swap transactions: amounts and tokens are greater than zero, except on withdrawal if all tokens
    are withdrawn.
* Add AMM deposit and withdraw rounding to ensure AMM invariant:
  - On deposit, tokens out are rounded downward and deposit amount is rounded upward.
  - On withdrawal, tokens in are rounded upward and withdrawal amount is rounded downward.
* Add Order Book Offer invariant to verify consumed amounts. Consumed amounts are less than the offer.
* Fix Bid validation. `AuthAccount` can't have duplicate accounts or the submitter account.
2025-06-02 09:52:10 -04:00
Shawn Xie
0a34b5c691 Add support for XLS-81 Permissioned DEX (#5404)
Modified transactions:
- OfferCreate
- Payment

Modified RPCs:
- book_changes
- subscribe
- book_offers
- ripple_path_find
- path_find

Spec: https://github.com/XRPLF/XRPL-Standards/pull/281
2025-05-30 13:24:48 -04:00
Matt Mankins
e0bc3dd51f docs: update example keyserver host in SECURITY.md (#5460) 2025-05-30 08:46:08 -04:00
Bronek Kozicki
dacecd24ba Fix unit build error (#5459)
This change fixes the issue that there is a `using namespace` statement inside a namespace scope.
2025-05-29 20:53:31 +00:00
Mayukha Vadari
05105743e9 chore[tests]: improve env.meta usage (#5457)
This commit changes the ledger close in env.meta to be conditional on if it hasn't already been closed (i.e. the current ledger doesn't have any transactions in it). This change will make it a bit easier to use, as it will still work if you close the ledger outside of this usage. Previously, if you accidentally closed the ledger outside of the meta function, it would segfault and it was incredibly difficult to debug.
2025-05-29 16:28:09 +00:00
Bronek Kozicki
9e1fe9a85e Fix: Improve handling of expired credentials in VaultDeposit (#5452)
This change returns `tecEXPIRED` from VaultDeposit to allow the Transactor to remove the expired credentials.
2025-05-28 10:28:18 -04:00
Vito Tumas
d71ce51901 feat: improve squelching configuration (#5438)
This commit introduces the following changes:
* Renames `vp_enable config` option to `vp_base_squelch_enable` to enable squelching for validators.
* Removes `vp_squelch` config option which was used to configure whether to send squelch messages to peers or not. With this flag removed, if squelching is enabled, squelch messages will be sent. This was an option used for debugging.
* Introduces a temporary `vp_base_squelch_max_trusted_peers` config option to change the max number of peers who are selected as validator message sources. This is a temporary option, which will be removed once a good value is found.
* Adds a traffic counter to count the number of times peers ignored squelch messages and kept sending messages for squelched validators.
* Moves the decision whether squelching is enabled and ready into Slot.h.
2025-05-28 06:30:03 -04:00
Michael Legleux
be668ee26d chore: Update CPP ref source (#5453) 2025-05-27 20:46:25 +00:00
Bart
cae5294b4e chore: Rename docs job (#5398) 2025-05-27 20:03:23 +00:00
Elliot.
cd777f79ef docs: add -j $(nproc) to BUILD.md (#5288)
This improves build times.
2025-05-27 19:11:13 +00:00
Valentin Balaschenko
8b9e21e3f5 docs: Update build instructions for Ubuntu 22.04+ (#5292) 2025-05-27 18:32:25 +00:00
Denis Angell
2a61aee562 Add Batch feature (XLS-56) (#5060)
- Specification: [XRPLF/XRPL-Standards 56](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-0056d-batch/README.md)
- Amendment: `Batch`
- Implements execution of multiple transactions within a single batch transaction with four execution modes: `tfAllOrNothing`, `tfOnlyOne`, `tfUntilFailure`, and `tfIndependent`.
- Enables atomic multi-party transactions where multiple accounts can participate in a single batch, with up to 8 inner transactions and 8 batch signers per batch transaction.
- Inner transactions use `tfInnerBatchTxn` flag with zero fees, no signature, and empty signing public key.
- Inner transactions are applied after the outer batch succeeds via the `applyBatchTransactions` function in apply.cpp.
- Network layer prevents relay of transactions with `tfInnerBatchTxn` flag - each peer applies inner transactions locally from the batch.
- Batch transactions are excluded from AccountDelegate permissions but inner transactions retain full delegation support.
- Metadata includes `ParentBatchID` linking inner transactions to their containing batch for traceability and auditing.
- Extended STTx with batch-specific signature verification methods and added protocol structures (`sfRawTransactions`, `sfBatchSigners`).
2025-05-23 19:53:53 +00:00
Bronek Kozicki
40ce8a8833 fix: Fix pseudo-account ID calculation (#5447)
Before #5224, the pseudoaccount ID was calculated using prefix expressed in `std::uint16_t`. The refactoring to move the pseudoaccount ID calculation to View.cpp had accidentally changed the prefix type to `int` (derived from `auto i = 0`) which in turn changed the length of the input to `sha512Half` from 2 bytes to 4, altering the result.

This resulted in a different ID of the pseudoaccount calculated from the function after the refactoring, breaking the ledger. This impacts AMMCreate, even when the `SingleAssetVault` amendment is not active. This change restores the prefix type to `std::uint16_t`.
2025-05-23 14:05:36 +00:00
Bronek Kozicki
7713ff8c5c Add codecov badge, raise .codecov.yml thresholds (#5428) 2025-05-22 14:43:41 +00:00
Olek
70371a4344 Fix initializer list initialization for GCC-15 (#5443) 2025-05-21 13:28:18 -04:00
Bronek Kozicki
e514de76ed Add single asset vault (XLS-65d) (#5224)
- Specification: XRPLF/XRPL-Standards#239
- Amendment: `SingleAssetVault`
- Implements a vault feature used to store a fungible asset (XRP, IOU, or MPT, but not NFT) and to receive shares in the vault (an MPT) in exchange.
- A vault can be private or public.
- A private vault can use permissioned domains, subject to the `PermissionedDomains` amendment.
- Shares can be exchanged back into asset with `VaultWithdraw`.
- Permissions on the asset in the vault are transitively applied on shares in the vault.
- Issuer of the asset in the vault can clawback with `VaultClawback`.
- Extended `MPTokenIssuance` with `DomainID`, used by the permissioned domain on the vault shares.

Co-authored-by: John Freeman <jfreeman08@gmail.com>
2025-05-20 14:06:41 -04:00
Bart
dd62cfcc22 fix: Update path in CODEOWNERS (#5440) 2025-05-20 15:24:07 +00:00
Michael Legleux
09690f1b38 Set version to 2.5.0-b1 2025-05-18 20:39:18 +01:00
Valentin Balaschenko
380ba9f1c1 Fix: Resolve slow test on macOS pipeline (#5392)
Using std::barrier performs extremely poorly (~1 hour vs ~1 minute to run the test suite) in certain macOS environments.
To unblock our macOS CI pipeline, std::barrier has been replaced with a custom mutex-based barrier (Barrier) that significantly improves performance without compromising correctness.
2025-05-16 10:31:51 +00:00
brettmollin
c3e9380fb4 fix: Update validators-example.txt fix xrplf example URL (#5384) 2025-05-16 09:49:14 +00:00
Jingchen
e3ebc253fa fix: Ensure that coverage file generation is atomic. (#5426)
Running unit tests in parallel and multiple threads can write into one file can corrupt output files, and then gcovr won't be able to parse the corrupted file. This change adds -fprofile-update=atomic as instructed by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68080.
2025-05-12 14:54:01 +00:00
Bart
c6c7c84355 Configure CODEOWNERS for changes to RPC code (#5266)
To ensure changes to any RPC-related code are compatible with other services, such as Clio, the RPC team will be required to review them.
2025-05-12 12:42:03 +00:00
yinyiqian1
28f50cb7cf fix: enable LedgerStateFix for delegation (#5427) 2025-05-10 10:36:11 -04:00
Vito Tumas
3e152fec74 refactor: use east const convention (#5409)
This change refactors the codebase to use the "east const convention", and adds a clang-format rule to follow this convention.
2025-05-08 11:00:42 +00:00
yinyiqian1
2db2791805 Add PermissionDelegation feature (#5354)
This change implements the account permission delegation described in XLS-75d, see https://github.com/XRPLF/XRPL-Standards/pull/257.

* Introduces transaction-level and granular permissions that can be delegated to other accounts.
* Adds `DelegateSet` transaction to grant specified permissions to another account.
* Adds `ltDelegate` ledger object to maintain the permission list for delegating/delegated account pair.
* Adds an optional `Delegate` field in common fields, allowing a delegated account to send transactions on behalf of the delegating account within the granted permission scope. The `Account` field remains the delegating account; the `Delegate` field specifies the delegated account. The transaction is signed by the delegated account.
2025-05-08 06:14:02 -04:00
Vito Tumas
9ec2d7f8ff Enable passive squelching (#5358)
This change updates the squelching logic to accept squelch messages for untrusted validators. As a result, servers will also squelch untrusted validator messages reducing duplicate traffic they generate.

In particular:
* Updates squelch message handling logic to squelch messages for all validators, not only trusted ones.
* Updates the logic to send squelch messages to peers that don't squelch themselves
* Increases the threshold for the number of messages that a peer has to deliver to consider it as a candidate for validator messages.
2025-05-02 11:01:45 -04:00
Ed Hennis
4a084ce34c Improve transaction relay logic (#4985)
Combines four related changes:
1. "Decrease `shouldRelay` limit to 30s." Pretty self-explanatory. Currently, the limit is 5 minutes, by which point the `HashRouter` entry could have expired, making this transaction look brand new (and thus causing it to be relayed back to peers which have sent it to us recently).
2.  "Give a transaction more chances to be retried." Will put a transaction into `LedgerMaster`'s held transactions if the transaction gets a `ter`, `tel`, or `tef` result. Old behavior was just `ter`.
     * Additionally, to prevent a transaction from being repeatedly held indefinitely, it must meet some extra conditions. (Documented in a comment in the code.)
3. "Pop all transactions with sequential sequences, or tickets." When a transaction is processed successfully, currently, one held transaction for the same account (if any) will be popped out of the held transactions list, and queued up for the next transaction batch. This change pops all transactions for the account, but only if they have sequential sequences (for non-ticket transactions) or use a ticket. This issue was identified from interactions with @mtrippled's #4504, which was merged, but unfortunately reverted later by #4852. When the batches were spaced out, it could potentially take a very long time for a large number of held transactions for an account to get processed through. However, whether batched or not, this change will help get held transactions cleared out, particularly if a missing earlier transaction is what held them up.
4. "Process held transactions through existing NetworkOPs batching." In the current processing, at the end of each consensus round, all held transactions are directly applied to the open ledger, then the held list is reset. This bypasses all of the logic in `NetworkOPs::apply` which, among other things, broadcasts successful transactions to peers. This means that the transaction may not get broadcast to peers for a really long time (5 minutes in the current implementation, or 30 seconds with this first commit). If the node is a bottleneck (either due to network configuration, or because the transaction was submitted locally), the transaction may not be seen by any other nodes or validators before it expires or causes other problems.
2025-05-01 13:58:18 -04:00
Vito Tumas
3502df2174 fix: Replaces random endpoint resolution with sequential (#5365)
This change addresses an issue where `rippled` attempts to connect to an IPv6 address, even when the local network lacks IPv6 support, resulting in a "Network is unreachable" error.

The fix replaces the custom endpoint selection logic with `boost::async_connect`, which sequentially attempts to connect to available endpoints until one succeeds or all fail.
2025-04-28 15:38:55 -04:00
Vlad
fa1e25abef chore: Small clarification to lsfDefaultRipple comment (#5410) 2025-04-25 15:21:27 +00:00
Denis Angell
217ba8dd4d fix: CTID to use correct ledger_index (#5408) 2025-04-24 10:24:10 -04:00
Ed Hennis
405f4613d8 chore: Run CI on PRs that are Ready or have the "DraftRunCI" label (#5400)
- Avoids costly overhead for idle PRs where the CI results don't add any
  value.
2025-04-11 22:20:59 +00:00
Mayukha Vadari
cba512068b refactor: Clean up test logging to make it easier to search (#5396)
This PR replaces the word `failed` with `failure` in any test names and renames some test files to fix MSVC warnings, so that it is easier to search through the test output to find tests that failed.
2025-04-11 09:07:42 +00:00
Valentin Balaschenko
1c99ea23d1 Temporary disable automatic triggering macOS pipeline (#5397)
We temporarily disable running unit tests on macOS on the CI pipeline while we are investigating the delays.
2025-04-10 21:58:29 +02:00
Denis Angell
c4308b216f fix: Adds CTID to RPC tx and updates error (#4738)
This change fixes a number of issues involved with CTID:
* CTID is not present on all RPC tx transactions.
* rpcWRONG_NETWORK is missing in the ErrorCodes.cpp
2025-04-10 12:38:52 +00:00
Wietse Wind
aafd2d8525 Fix: admin RPC webhook queue limit removal and timeout reduction (#5163)
When using subscribe at admin RPC port to send webhooks for the transaction stream to a backend, on large(r) ledgers the endpoint receives fewer HTTP POSTs with TX information than the amount of transactions in a ledger. This change removes the hardcoded queue length to avoid dropping TX notifications for the admin-only command. In addition, the per-request TTL for outgoing RPC HTTP calls has been reduced from 10 minutes to 30 seconds.
2025-04-10 06:37:24 +00:00
Denis Angell
a574ec6023 fix: fixPayChanV1 (#4717)
This change introduces a new fix amendment (`fixPayChanV1`) that prevents the creation of new `PaymentChannelCreate` transaction with a `CancelAfter` time less than the current ledger time. It piggy backs off of fix1571.

Once the amendment is activated, creating a new `PaymentChannel` will require that if you specify the `CancelAfter` time/value, that value must be greater than or equal to the current ledger time.

Currently users can create a payment channel where the `CancelAfter` time is before the current ledger time. This results in the payment channel being immediately closed on the next PaymentChannel transaction.
2025-04-09 22:08:44 +00:00
Mayukha Vadari
e429455f4d refactor(trivial): reorganize ledger entry tests and helper functions (#5376)
This PR splits out `ledger_entry` tests into its own file (`LedgerEntry_test.cpp`) and alphabetizes the helper functions in `LedgerEntry.cpp`. These commits were split out of #5237 to make that PR a little more manageable, since these basic trivial changes are most of the diff. There is no code change, just moving code around.
2025-04-09 17:02:03 +00:00
Vito Tumas
7692eeb9a0 Instrument proposal, validation and transaction messages (#5348)
Adds metric counters for the following P2P message types:

* Untrusted proposal and validation messages
* Duplicate proposal, validation and transaction messages
2025-04-09 15:33:17 +02:00
Bronek Kozicki
a099f5a804 Remove UNREACHABLE from NetworkOPsImp::processTrustedProposal (#5387)
It’s possible for this to happen legitimately if a set of peers, including a validator, are connected in a cycle, and the latency and message processing time between those peers is significantly less than the latency between the validator and the last peer. It’s unlikely in the real world, but obviously easy to simulate with Antithesis.
2025-04-08 14:43:34 +00:00
Michael Legleux
ca0bc767fe fix: Use the build image from ghcr.io (#5390)
The ci pipelines are constantly hitting Docker Hub's public rate limiting since increasing the number of jobs we're running. This change switches over to images hosted in GitHub's registry.
2025-04-05 02:24:31 +00:00
Mayukha Vadari
4ba9288935 fix: disable channel_authorize when signing_support is disabled (#5385) 2025-04-05 01:08:34 +00:00
Valentin Balaschenko
e923ec6d36 Fix to correct memory ordering for compare_exchange_weak and wait in the intrusive reference counting logic (#5381)
This change addresses a memory ordering assertion failure observed on one of the Windows test machines during the IntrusiveShared_test suite.
2025-04-04 18:21:17 +00:00
Vlad
851d99d99e fix: uint128 ambiguousness breaking macos unity build (#5386) 2025-04-04 08:28:33 -04:00
Bart
f608e653ca Fix undefined uint128_t type on Windows non-unity builds (#5377)
As part of import optimization, a transitive include had been removed that defined `BOOST_COMP_MSVC` on Windows. In unity builds, this definition was pulled in, but in non-unity builds it was not - causing a compilation error. An inspection of the Boost code revealed that we can just gate the statements by `_MS_VER` instead. A `#pragma message` is added to verify that the statement is only printed on Windows builds.
2025-04-01 11:21:59 -04:00
Vlad
72e076b694 test: enable compile time param to change reference fee value (#5159)
Adds an extra CI pipeline to perform unit tests using different values for fees.
2025-03-27 23:40:36 +00:00
Bart
6cf37c4abe refactor: Move integration tests from 'examples/' into 'tests/' (#5367)
This change moves `examples/example` into `tests/conan` to make it clear it is an integration test, and adjusts the `conan` CI job accordingly
2025-03-27 14:49:09 +00:00
Valentin Balaschenko
fc204773d6 Intrusive SHAMap smart pointers for efficient memory use and lock-free synchronization (#5152)
The main goal of this optimisation is memory reduction in SHAMapTreeNodes by introducing intrusive pointers instead of standard std::shared_ptr and std::weak_ptr.
2025-03-25 18:40:25 +00:00
Vlad
2bc5cb240f test: enable unit tests to work with variable reference fee (#5145)
Fix remaining unit tests to be able to process reference fee values other than 10.
2025-03-25 10:31:25 -04:00
Vlad
67028d6ea6 test: enable TxQ unit tests work with variable reference fee (#5118)
In preparation for a potential reference fee change we would like to verify that fee change works as expected. The first step is to fix all unit tests to be able to work with different reference fee values.
2025-03-24 14:56:19 -04:00
Ed Hennis
d22a5057b9 Prevent consensus from getting stuck in the establish phase (#5277)
- Detects if the consensus process is "stalled". If it is, then we can declare a 
  consensus and end successfully even if we do not have 80% agreement on
  our proposal.
  - "Stalled" is defined as:
    - We have a close time consensus
    - Each disputed transaction is individually stalled:
      - It has been in the final "stuck" 95% requirement for at least 2
        (avMIN_ROUNDS) "inner rounds" of phaseEstablish,
      - and either all of the other trusted proposers or this validator, if proposing,
        have had the same vote(s) for at least 4 (avSTALLED_ROUNDS) "inner
        rounds", and at least 80% of the validators (including this one, if
        appropriate) agree about the vote (whether yes or no).
- If we have been in the establish phase for more than 10x the previous
  consensus establish phase's time, then consensus is considered "expired",
  and we will leave the round, which sends a partial validation (indicating
  that the node is moving on without validating). Two restrictions avoid
  prematurely exiting, or having an extended exit in extreme situations.
  - The 10x time is clamped to be within a range of 15s
    (ledgerMAX_CONSENSUS) to 120s (ledgerABANDON_CONSENSUS).
  - If consensus has not had an opportunity to walk through all avalanche
    states (defined as not going through 8 "inner rounds" of phaseEstablish),
    then ConsensusState::Expired is treated as ConsensusState::No.
- When enough nodes leave the round, any remaining nodes will see they've
  fallen behind, and move on, too, generally before hitting the timeout. Any
  validations or partial validations sent during this time will help the
  consensus process bring the nodes back together.
2025-03-20 12:41:44 -04:00
Alex Kremer
75a20194c5 chore: Update link to ripple-binary-codec (#5355)
The link to ripple-binary-codec's definitions.json appears to be outdated. The updated link is also documented here: https://xrpl.org/docs/references/protocol/binary-format#definitions-file
2025-03-19 17:33:23 -04:00
Alex Kremer
7fe81fe62e chore: Add PR number to payload (#5310)
This PR adds one more payload field to the libXRPL compatibility check workflow - the PR number itself.
2025-03-18 17:26:08 +00:00
Bronek Kozicki
345ddc7234 fix: Remove null pointer deref, just do abort (#5338)
This change removes the existing undefined behavior from `LogicError`, so we can be certain that there will be always a stacktrace.

De-referencing a null pointer is an old trick to generate `SIGSEGV`, which would typically also create a stacktrace. However it is also an undefined behaviour and compilers can do something else. A more robust way to create a stacktrace while crashing the program is to use `std::abort`, which we have also used in this location for a long time. If we combine the two, we might not get the expected behaviour - namely, the nullpointer deref followed by `std::abort`, as handled in certain compiler versions may not immediately cause a crash. We have observed stacktrace being wiped instead, and thread put in indeterminate state, then stacktrace created without any useful information.
2025-03-18 12:45:25 -04:00
Bart
d167d4864f refactor: Updates Conan dependencies: RocksDB (#5335)
Updates RocksDB to version 9.7.3, the latest version supported in Conan 1.x. A patch for 9.7.4 that fixes a memory leak is included.
2025-03-18 11:25:48 -04:00
Vlad
bf504912a4 fix: trust line RPC no ripple flag (#5345)
The Trustline RPC `no_ripple` flag gets set depending on `lsfDefaultRipple` flag, which is not a flag of a trustline but of the account root. The `lsfDefaultRipple` flag does not provide any insight if this particular trust line has `lsfLowNoRipple` or `lsfHighNoRipple` flag set, so it should not be used here at all. This change simplifies the logic.
2025-03-18 09:03:03 -04:00
cyan317
a7fb8ae915 fix: Handle invalid marker parameter in grpc call (#5317)
The `end_marker` is used to limit the range of ledger entries to fetch. If `end_marker` is less than `marker`, a crash can occur. This change adds an additional check.
2025-03-18 08:21:33 -04:00
Sergey Kuznetsov
d9b7a2688f fix: Error message for ledger_entry rpc (#5344)
Changes the error to `malformedAddress` for `permissioned_domain` in the `ledger_entry` rpc, when the account is not a string. This change makes it more clear to a user what is wrong with their request.
2025-03-17 09:14:49 -04:00
Darius Tumas
c0299dba88 Adds hub.xrpl-commons.org as a new Bootstrap Cluster (#5263) 2025-03-17 07:04:46 -04:00
Bronek Kozicki
c3ecdb4746 Rename "deadlock" to "stall" in LoadManager (#5341)
What the LoadManager class does is stall detection, which is not the same as deadlock detection. In the condition of severe CPU starvation, LoadManager will currently intentionally crash rippled reporting `LogicError: Deadlock detected`. This error message is misleading as the condition being detected is not a deadlock. This change fixes and refactors the code in response.
2025-03-14 16:15:09 -04:00
Ed Hennis
c17676a9be refactor: Improve ordering of headers with clang-format (#5343)
Removes all manual header groupings from source and header files by leveraging clang-format options.
2025-03-12 18:33:21 -04:00
Ed Hennis
ed8e32cc92 refactor: Calculate numFeatures automatically (#5324)
Requiring manual updates of numFeatures is an annoying manual process that is easily forgotten, and leads to frequent merge conflicts. This change takes advantage of the `XRPL_FEATURE` and `XRPL_FIX` macros, and adds a new `XRPL_RETIRE` macro to automatically set `numFeatures`.
2025-03-12 17:34:06 -04:00
Bart
2406b28e64 refactor: Remove unused and add missing includes (#5293)
The codebase is filled with includes that are unused, and which thus can be removed. At the same time, the files often do not include all headers that contain the definitions used in those files. This change uses clang-format and clang-tidy to clean up the includes, with minor manual intervention to ensure the code compiles on all platforms.
2025-03-11 14:16:45 -04:00
Michael Legleux
2216e5a13f Set version to 2.4.0 2025-03-06 10:41:58 -08:00
Michael Legleux
5bf3a308d5 Set version to 2.4.0-rc4 2025-03-03 10:31:11 -08:00
Darius Tumas
53ea31c69a chore: Update XRPL Foundation Validator List URL (#5326) 2025-02-28 18:14:01 -05:00
Ed Hennis
c1c2b5bf52 chore: Move "assert" and "werr" flags from "actions/build" (#5325)
- PR #5228 added assert=TRUE and werr=TRUE CMake flags to the
  build/action.yml script which is used by all CI jobs to build rippled,
  ensuring those flags were always set. The assumption was that only the
  CI jobs used that script, so any extra time cost was offset by the
  benefit of the extra checks. That assumption was incorrect. That
  script is used by other downstream projects. Therefore, those flags
  have been moved into the individual CI jobs' "cmake-args" parameter
  passed to build/action.yml. This will have the same effect for CI jobs
  without any side effects.
2025-02-27 20:42:06 -05:00
Mark Travis
af018c7b0b Log detailed correlated consensus data together (#5302)
Combine multiple related debug log data points into a single
message. Allows quick correlation of events that
previously were either not logged or, if logged, strewn
across multiple lines, making correlation difficult.
The Heartbeat Timer and consensus ledger accept processing
each have this capability.

Also guarantees that log entries will be written if the
node is a validator, regardless of log severity level.
Otherwise, the level of these messages is at INFO severity.
2025-02-27 13:02:57 -05:00
Michael Legleux
0a1ca0600f Set version to 2.4.0-rc3 2025-02-26 12:41:15 -08:00
Mark Travis
cd7c62818b fix: Acquire previously failed transaction set from network as new proposal arrives (#5318)
Reset the failure variable.
2025-02-25 20:00:50 -05:00
Bronek Kozicki
37d06bcce8 Fix Replace assert with XRPL_ASSERT (#5312) 2025-02-25 11:43:26 -05:00
Bronek Kozicki
9745718467 fix: Remove 'new parent hash' assert (#5313)
This assert is known to occasionally trigger, without causing errors
downstream. It is replaced with a log message.
2025-02-25 09:14:10 -05:00
Michael Legleux
ab44cc31e2 Set version to 2.4.0-rc2 2025-02-20 15:29:54 -08:00
Ed Hennis
dce3e1efa6 Add logging and improve counting of amendment votes from UNL (#5173)
* Add logging for amendment voting decision process
* When counting "received validations" to determine quorum, count the number of validators actually voting, not the total number of possible votes.
2025-02-20 13:35:04 -05:00
Ed Hennis
159dfb5acb Revert "Reduce duplicate peer traffic for ledger data (#5126)" (#5300)
This reverts commit dd5e6559dd. It has
introduced a regression causing slow close times and syncing issues.
A fix will be attempted later.
2025-02-19 18:52:08 -05:00
Bart
844646dc50 docs: Revert peer port to 51235 (#5299)
Reverts the [port_peer] back to the legacy port 51235 rather than to the default port 2459, to avoid potentially inconveniencing existing operators.
2025-02-19 17:14:00 -05:00
Michael Legleux
01fc8f2209 Set version to 2.4.0-rc1 2025-02-18 13:58:56 -08:00
Olek
43e1d4440e fix: Switch Permissioned Domain to Supported::yes (#5287)
Switch Permissioned Domain feature's supported flag from Supported::no to Supported::yes for it to be votable.
2025-02-15 10:08:25 -05:00
Bart
466849efe8 docs: Clarifies default port of hosts (#5290)
The current comment in the example cfg file incorrectly mentions both "may" and "must". This change fixes this comment to clarify that the default port of hosts is 2459 and that specifying it is therefore optional. It further sets the default port to 2459 instead of the legacy 51235.
2025-02-14 21:37:14 -05:00
Mark Travis
db0fad6826 Log proposals and validations (#5291)
Adds detailed log messages for each validation and proposal received from the network.
2025-02-14 20:48:12 -05:00
Ed Hennis
dd5e6559dd Reduce duplicate peer traffic for ledger data (#5126)
- Drop duplicate outgoing TMGetLedger messages per peer
  - Allow a retry after 30s in case of peer or network congestion.
  - Addresses RIPD-1870
  - (Changes levelization. That is not desirable, and will need to be fixed.)
- Drop duplicate incoming TMGetLedger messages per peer
  - Allow a retry after 15s in case of peer or network congestion.
  - The requestCookie is ignored when computing the hash, thus increasing
    the chances of detecting duplicate messages.
  - With duplicate messages, keep track of the different requestCookies
    (or lack of cookie). When work is finally done for a given request,
    send the response to all the peers that are waiting on the request,
    sending one message per peer, including all the cookies and
    a "directResponse" flag indicating the data is intended for the
    sender, too.
  - Addresses RIPD-1871
- Drop duplicate incoming TMLedgerData messages
  - Addresses RIPD-1869
- Improve logging related to ledger acquisition
- Class "CanProcess" to keep track of processing of distinct items

---------

Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
2025-02-14 18:51:51 -05:00
Bart
7c9d652d9b Support canonical ledger entry names (#5271)
This change enhances the filtering in the ledger, ledger_data, and account_objects methods by also supporting filtering by the canonical name of the LedgerEntryType using case-insensitive matching.
2025-02-14 08:12:19 -08:00
Darius Tumas
dc9e6c37fe chore: Update XRPL Foundation public key (#5289)
Following the XRPL Foundation UNL migration a new set of keys was generated.
2025-02-14 06:54:29 -08:00
Ed Hennis
01fe9477f4 refactor: Change recursive_mutex to mutex in DatabaseRotatingImp (#5276)
Rewrites the code so that the lock is not held during the callback. Instead it locks twice, once before, and once after. This is safe due to the structure of the code, but is checked after the second lock. This allows mutex_ to be changed back to a regular mutex.
2025-02-13 14:32:37 -08:00
Bart
97e3dae6f4 fix: Replace charge() by fee_.update() in OnMessage functions (#5269)
In PeerImpl.cpp, if the function is a message handler (onMessage) or called directly from a message handler, then it should use fee_, since when the handler returns (OnMessageEnd) then the charge function is called. If the function is not a message handler, such as a job queue item, it should remain charge.
2025-02-13 08:54:01 -08:00
Elliot Lee
e8e7888a23 docs: ensure build_type and CMAKE_BUILD_TYPE match (#5274) 2025-02-13 07:28:23 -08:00
code0xff
b02b8d016c chore: Fix small typos in protocol files (#5279) 2025-02-13 05:48:48 -08:00
Ed Hennis
a079bac153 chore: Rename missing-commits job, and combine nix job files (#5268)
- Rename the job in missing-commits.yml from "check" to "up_to_date",
  because other jobs named "check" prevent merges, but this one should
  not prevent merges. How else are branches going to get caught up?
- Move the job in instrumentation.yml to nix.yml, but keep it entirely
  independent.
2025-02-12 05:44:03 -08:00
Ed Hennis
3a55a64e1c docs: Add a summary of the git commit message rules (#5283) 2025-02-11 15:50:51 -05:00
Olek
fa5a85439f fix: Amendment to add transaction flag checking functionality for Credentials (#5250)
CredentialCreate / CredentialAccept / CredentialDelete transactions will check sfFlags field in preflight() when the amendment is enabled.
2025-02-10 12:33:37 -08:00
Donovan Hide
81034596a8 fix: Omit superfluous setCurrentThreadName call in GRPCServer.cpp (#5280) 2025-02-10 09:08:36 -08:00
Bronek Kozicki
0968cdf340 fix: Do not allow creating Permissioned Domains if credentials are not enabled (#5275)
If the permissioned domains amendment XLS-80 is enabled before credentials XLS-70, then the permissioned domain users will not be able to match any credentials. The changes here prevent the creation of any permissioned domain objects if credentials are not enabled.
2025-02-07 15:11:29 -08:00
Mayukha Vadari
d9e4009e33 fix: issues in simulate RPC (#5265)
Make `simulate` RPC easier to use:
* Prevent the use of `seed`, `secret`, `seed_hex`, and `passphrase` fields (to avoid confusing with the signing methods).
* Add autofilling of the `NetworkID` field.
2025-02-07 12:17:37 -08:00
Bart
02387fd227 Updates Conan dependencies (#5256)
This PR updates several Conan dependencies:
* boost
* date
* libarchive
* libmysqlclient
* libpq
* lz4
* onetbb
* openssl
* sqlite3
* zlib
* zstd
2025-02-06 13:11:49 -08:00
Shawn Xie
fb3713bc25 Amendment fixFrozenLPTokenTransfer (#5227)
Prohibits LPToken holders from sending LPToken to others if they have been frozen by one of the assets in AMM pool.
2025-02-05 10:05:24 -08:00
Ed Hennis
f6d63082c0 Improve git commit hash lookup (#5225)
- Also get the branch name.
- Use rev-parse instead of describe to get a clean hash.
- Return the git hash and branch name in server_info for admin
  connections.
- Include git hash and branch name on separate lines in --version.
2025-02-05 11:36:43 -05:00
Vlad
33e1c42599 Add deep freeze feature (XLS-77d) (#5187)
- spec: XRPLF/XRPL-Standards#220
- amendment: "DeepFreeze"
- implemented deep freeze spec to allow token issuers to prevent currency holders from being able to acquire more of these tokens.
- in combination with normal freeze, deep freeze effectively prevents any balance trust line balance change of a currency holder (except direct issuer <-> holder payments).
- added 2 new invariant checks to verify that deep freeze cannot be enacted without normal freeze and transfer is not frozen.
- made some fixes to existing freeze handling.

Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
2025-01-31 13:40:33 -05:00
Ed Hennis
1b75dc8bcd Set version to 2.4.0-b3 2025-01-29 19:19:26 -05:00
Ed Hennis
3d02580c09 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
2025-01-29 18:11:02 -05:00
Ed Hennis
8458233a31 Set version to 2.3.1 2025-01-29 09:40:31 -05:00
Ed Hennis
cb0ddbf863 Update conan in the "nix" CI jobs 2025-01-29 09:40:30 -05:00
Mayukha Vadari
dcc4581220 Add RPC "simulate" to execute a dry run of a transaction (#5069)
- Spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate
- Also update signing methods to autofill fees better and properly handle transactions that require a non-standard fee.
2025-01-28 19:02:28 -05:00
Olek
50b8f19cb5 Fix CI unit tests (#5196)
- Add retries for rpc client
- Add dynamic port allocation for rpc servers
2025-01-28 10:45:59 -05:00
Valentin Balaschenko
f3e201f983 Set version to 2.3.1-rc1 2025-01-27 19:43:14 -05:00
Valentin Balaschenko
b14c24960b Reduce the peer charges for well-behaved peers:
- Fix an erroneous high fee penalty that peers could incur for sending
  older transactions.
- Update to the fees charged for imposing a load on the server.
- Prevent the relaying of internal pseudo-transactions.
  - 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 charge for an
    invalid signature.
  - 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.
- Improve logging: include the reason for fees charged to a peer.

Co-authored-by: Ed Hennis <ed@ripple.com>
2025-01-27 19:41:22 -05:00
Michael Legleux
b6e3453f49 Update secp256k1 library to 0.6.0 (#5254) 2025-01-27 19:47:47 +00:00
Ed Hennis
ed4870cdb4 chore: Update Visual Studio CI to VS 2022, and add VS Debug builds (#5240)
* Debug builds do not run tests, because they take too long.
2025-01-24 18:46:47 -05:00
Bronek Kozicki
5fbee8c824 Add [validator_list_threshold] to validators.txt to improve UNL security (#5112) 2025-01-23 18:00:34 -05:00
Bronek Kozicki
3868c04e99 Switch from assert to XRPL_ASSERT (#5245) 2025-01-23 16:56:37 -05:00
tequ
409c1d5aa2 Add missing space character to a log message (#5251) 2025-01-23 15:08:14 -05:00
Bronek Kozicki
20710f5232 Cleanup API-CHANGELOG.md (#5207) 2025-01-23 14:38:18 -05:00
Ed Hennis
870882f567 test: Unit tests to recreate invalid index logic error (#5242)
* One hits the global cache, one does not.
* Also some extra checking.

Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
2025-01-23 13:35:13 -05:00
Ed Hennis
e1e67b2c9e Update branch management and merge / release processes (#5215)
* Has more steps, but allows merges to develop to continue when a
  beta / RC is pending, increasing developer velocity.
* Add a CI job to check that no reverse merges have been missed.
* Add some useful scripts in bin/git:
  * Set up upstreams as expected for safer pushes
  * Squash a bunch of branches
  * Set the version number
2025-01-22 19:02:13 -05:00
Sergey Kuznetsov
eac3abdca9 fix: Error consistency in LedgerEntry::parsePermissionedDomains() (#5252)
Update errors for parsing permissioned domains in the LedgerEntry handler to make them consistent with other parsers.
2025-01-21 13:00:21 -05:00
Ed Hennis
ebd8e63276 Set version to 2.4.0-b2 2025-01-16 16:25:55 -05:00
Ed Hennis
839d17e7bd fix: Use consistent CMake settings for all modules (#5228)
* Resolves an issue introduced in #5111, which inadvertently removed the
  -Wno-maybe-uninitialized compiler option from some xrpl.libxrpl
  modules. This resulted in new "may be used uninitialized" build
  warnings, first noticed in the "protocol" module. When compiling with
  derr=TRUE, those warnings became errors, which made the build fail.
* Github CI actions will build with the assert and werr options turned
  on. This will cause CI jobs to fail if a developer introduces a new
  compiler warning, or causes an assert to fail in release builds.
* Includes the OS and compiler version in the linux dependencies jobs in
  the "check environment" step.
* Translates the `unity` build option into `CMAKE_UNITY_BUILD` setting.
2025-01-16 16:10:30 -05:00
Valentin Balaschenko
7be5c31bc6 Fix levelization script to ignore commented includes (#5194)
Check to ignore single-line comments during dependency analysis.
2025-01-16 15:23:40 -05:00
tequ
9e4a7d5871 Fix the flag processing of NFTokenModify (#5246)
Adds checks for invalid flags.
2025-01-16 10:37:52 -05:00
Mayukha Vadari
ff8b9aa439 Fix failing assert in connect RPC (#5235) 2025-01-14 14:52:38 -05:00
Olek
ccc0889803 Permissioned Domains (XLS-80d) (#5161) 2025-01-10 12:44:14 -05:00
Mayukha Vadari
07f118caec chore: update deprecated Github Actions (#5241) 2025-01-09 16:32:32 -05:00
tequ
58af62f388 XLS-46: DynamicNFT (#5048)
This Amendment adds functionality to update the URI of NFToken objects as described in the XLS-46d: Dynamic Non Fungible Tokens (dNFTs) spec.
2025-01-09 11:22:11 -05:00
rrmanukyan
040cd23e4a chore: add macos dependency installation (#5233)
* python (3.13) and cmake (latest)
2025-01-07 12:08:39 -05:00
Shawn Xie
0324764a83 prefix Uint384 and Uint512 with Hash in server_definitions (#5231) 2025-01-02 16:32:15 -05:00
Mayukha Vadari
679e35fd46 refactor: add rpcName to LEDGER_ENTRY macro (#5202)
The LEDGER_ENTRY macro now takes an additional parameter, which makes it easier to avoid missing including the new field in jss.h and to the list of account_objects/ledger_data filters.
2025-01-02 11:54:36 -05:00
Ed Hennis
49e0d54c76 Set version to 2.4.0-b1 2024-12-16 18:14:02 -05:00
Michael Legleux
7506852a99 fix: Add header for set_difference (#5197)
Fix `error C2039: 'set_difference': is not a member of 'std'`
2024-12-16 18:01:45 -05:00
Mayukha Vadari
bcbfb04992 fix: allow overlapping types in Expected (#5218)
For example, Expected<std::uint32_t, Json::Value>, will now build even though there is animplicit conversion from unsigned int to Json::Value.
2024-12-16 18:00:14 -05:00
Gregory Tsipenyuk
5cd72f2431 Add MPTIssue to STIssue (#5200)
Replace Issue in STIssue with Asset. STIssue with MPTIssue is only used in MPT tests.
Will be used in Vault and in transactions with STIssue fields once MPT is integrated into DEX.
2024-12-16 17:52:48 -05:00
Bronek Kozicki
eabca8439f Antithesis instrumentation improvements (#5213)
* Rename ASSERT to XRPL_ASSERT
* Upgrade to Anthithesis SDK 0.4.4, and use new 0.4.4 features
  * automatic cast to bool, like assert
* Add instrumentation workflow to verify build with instrumentation enabled
2024-12-16 17:48:33 -05:00
John Freeman
ea1fffeebf Enforce levelization in libxrpl with CMake (#5111)
Adds two CMake functions:

* add_module(library subdirectory): Declares an OBJECT "library" (a CMake abstraction for a collection of object files) with sources from the given subdirectory of the given library, representing a module. Isolates the module's headers by creating a subdirectory in the build directory, e.g. .build/tmp123, that contains just a symlink, e.g. .build/tmp123/basics, to the module's header directory, e.g. include/xrpl/basics, in the source directory, and putting .build/tmp123 (but not include/xrpl) on the include path of the module sources. This prevents the module sources from including headers not explicitly linked to the module in CMake with target_link_libraries.
* target_link_modules(library scope modules...): Links the library target to each of the module targets, and removes their sources from its source list (so they are not compiled and linked twice).

Uses these functions to separate and explicitly link modules in libxrpl:

    Level 01: beast
    Level 02: basics
    Level 03: json, crypto
    Level 04: protocol
    Level 05: resource, server
2024-12-06 17:54:40 -05:00
Mayukha Vadari
6d58065909 refactor: clean up LedgerEntry.cpp (#5199)
Refactors LedgerEntry to make it easier to read and understand.
2024-12-04 15:33:50 -05:00
Ed Hennis
47b0543461 test: Add more test cases for Base58 parser (#5174)
---------
Co-authored-by: John Freeman <jfreeman08@gmail.com>
2024-12-03 16:13:31 -05:00
Ed Hennis
8215c605b4 test: Check for some unlikely null dereferences in tests (#5004) 2024-12-03 15:03:22 -05:00
Bronek Kozicki
d7e949193f Add Antithesis intrumentation (#5042)
* Copy Antithesis SDK version 0.4.0 to directory external/
* Add build option `voidstar` to enable instrumentation with Antithesis SDK
* Define instrumentation macros ASSERT and UNREACHABLE in terms of regular C assert
* Replace asserts with named ASSERT or UNREACHABLE
* Add UNREACHABLE to LogicError
* Document instrumentation macros in CONTRIBUTING.md
2024-12-03 14:54:44 -05:00
Elliot Lee
f64cf9187a Set version to 2.3.0 2024-11-25 13:27:20 -08:00
Elliot Lee
b54d85d862 refactor(AMMClawback): move tfClawTwoAssets check (#5201)
Move tfClawTwoAssets check to preflight and return
error temINVALID_FLAG

---------

Co-authored-by: yinyiqian1 <yqian@ripple.com>
2024-11-25 13:16:47 -08:00
Elliot Lee
f419c18056 Add a new serialized type: STNumber (#5121)
`STNumber` lets objects and transactions contain multiple fields for
quantities of XRP, IOU, or MPT without duplicating information about the
"issue" (represented by `STIssue`). It is a straightforward serialization of
the `Number` type that uniformly represents those quantities.

---------

Co-authored-by: John Freeman <jfreeman08@gmail.com>
Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
2024-11-25 13:16:32 -08:00
Olek
0ec17b6026 fix: check for valid ammID field in amm_info RPC (#5188) 2024-11-18 13:58:25 -05:00
Ed Hennis
838978b869 Set version to 2.3.0-rc2 2024-11-12 18:40:22 -05:00
Mayukha Vadari
8186253707 fix: include index in server_definitions RPC (#5190) 2024-11-12 18:37:15 -05:00
Bronek Kozicki
2316d843d7 Fix ledger_entry crash on invalid credentials request (#5189) 2024-11-12 18:24:52 -05:00
Ed Hennis
9d58f11a60 Set version to 2.3.0-rc1 2024-11-06 17:37:59 -05:00
Shawn Xie
7b18006193 Replace Uint192 with Hash192 in server_definitions response (#5177) 2024-11-06 17:33:16 -05:00
Bronek Kozicki
9e48fc0c83 Fix potential deadlock (#5124)
* 2.2.2 changed functions acquireAsync and NetworkOPsImp::recvValidation to add an item to a collection under lock, unlock, do some work, then lock again to do remove the item. It will deadlock if an exception is thrown while adding the item - before unlocking.
* Replace ScopedUnlock with scope_unlock.
2024-11-06 17:22:42 -05:00
Olek
8e827e32ac Introduce Credentials support (XLS-70d): (#5103)
Amendment:
    - Credentials
    
    New Transactions:
    - CredentialCreate
    - CredentialAccept
    - CredentialDelete
    
    Modified Transactions:
    - DepositPreauth
    - Payment
    - EscrowFinish
    - PaymentChannelClaim
    - AccountDelete
    
    New Object:
    - Credential

    Modified Object:
    - DepositPreauth
    
    API updates:
    - ledger_entry
    - account_objects
    - ledger_data
    - deposit_authorized
    
    Read full spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070d-credentials
2024-11-06 17:05:03 -05:00
Gregory Tsipenyuk
c5c0e70e23 Fix token comparison in Payment (#5172)
* Checks only Currency or MPT Issuance ID part of the Asset object.
* Resolves temREDUNDANT regression detected in testing.
2024-11-06 11:20:30 -05:00
Gregory Tsipenyuk
ec61f5e9d3 Add fixAMMv1_2 amendment (#5176)
* Add reserve check on AMM Withdraw
* Try AMM max offer if changeSpotPriceQuality() fails
2024-11-05 15:06:16 -05:00
Gregory Tsipenyuk
d57cced17b Fix unity build (#5179) 2024-11-05 10:48:02 -05:00
yinyiqian1
54a350be79 Add AMMClawback Transaction (XLS-0073d) (#5142)
Amendment:
- AMMClawback

New Transactions:
- AMMClawback

Modified Transactions:
- AMMCreate
- AMMDeposit
2024-11-04 15:27:57 -05:00
Alloy Networks
d6dbf0e0a6 Add hubs.xrpkuwait.com to bootstrap (#5169) 2024-10-31 18:14:55 -04:00
Valentin Balaschenko
0d887ad815 docs: Add protobuf dependencies to linux setup instructions (#5156) 2024-10-29 16:26:20 -04:00
yinyiqian1
d4a5f8390e fix: reject invalid markers in account_objects RPC calls (#5046) 2024-10-29 16:13:01 -04:00
Bob Conan
ab5d450d3c Update RELEASENOTES.md (#5154)
fix the typo "concensus" -> "consensus"
2024-10-29 15:43:56 -04:00
Gregory Tsipenyuk
23c37fa506 Introduce MPT support (XLS-33d): (#5143)
Amendment:
- MPTokensV1

New Transactions:
- MPTokenIssuanceCreate
- MPTokenIssuanceDestroy
- MPTokenIssuanceSet
- MPTokenAuthorize

Modified Transactions:
- Payment
- Clawback

New Objects:
- MPTokenIssuance
- MPToken

API updates:
- ledger_entry
- account_objects
- ledger_data

Other:
- Add += and -= operators to ValueProxy

Read full spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0033d-multi-purpose-tokens

---------
Co-authored-by: Shawn Xie <shawnxie920@gmail.com>
Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
Co-authored-by: Ed Hennis <ed@ripple.com>
Co-authored-by: John Freeman <jfreeman08@gmail.com>
2024-10-29 15:19:28 -04:00
John Freeman
63209c2646 Consolidate definitions of fields, objects, transactions, and features (#5122) 2024-10-16 14:02:29 -05:00
John Freeman
f0dabd1446 Ignore reformat when blaming 2024-10-15 18:28:43 -05:00
John Freeman
552377c76f Reformat code with clang-format-18 2024-10-15 18:27:56 -05:00
John Freeman
e7cd03325b Update pre-commit hook 2024-10-15 18:25:14 -05:00
John Freeman
decb3c178e Update clang-format settings 2024-10-15 18:24:22 -05:00
John Freeman
f6d647d6c3 Update clang-format workflow 2024-10-15 18:22:57 -05:00
Chenna Keshava B S
bf4a7b6ce8 Expand Error Message for rpcInternal (#4959)
Validator operators have been confused by the rpcInternal error, which can occur if the server is not running in another process.
2024-10-01 14:09:42 -07:00
Elliot Lee
8e2c85d14d docs: clean up API-CHANGELOG.md (#5064)
Move the newest information to the top, i.e., use reverse chronological order within each of the two sections ("API Versions" and "XRP Ledger server versions")
2024-10-01 14:07:31 -07:00
Elliot Lee
1fbf8da79f Set version to 2.3.0-b4 2024-09-20 14:27:37 -07:00
Denis Angell
a75309919e feat(SQLite): allow configurable database pragma values (#5135)
Make page_size and journal_size_limit configurable values in rippled.cfg
2024-09-20 14:26:21 -07:00
Vlad
0ece395c24 refactor: re-order PRAGMA statements (#5140)
The page_size will soon be made configurable with #5135, making this
re-ordering necessary.

When opening SQLite connection, there are specific pragmas set with
commonPragmas.

In particular, PRAGMA journal_mode creates journal file and locks the
page_size; as of this commit, this sets the page size to the default
value of 4096. Coincidentally, the hardcoded page_size was also 4096, so
no issue was noticed.
2024-09-20 11:04:10 -07:00
Chenna Keshava B S
b6391fe011 fix(book_changes): add "validated" field and reduce RPC latency (#5096)
Update book_changes RPC to reduce latency, add "validated" field, and accept shortcut strings (current, closed, validated) for ledger_index.

`"validated": true` indicates that the transaction has been included in a validated ledger so the result of the transaction is immutable.

Fix #5033

Fix #5034

Fix #5035

Fix #5036

---------

Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
2024-09-19 08:39:10 -07:00
luozexuan
9a6af9c431 chore: fix typos in comments (#5094)
Signed-off-by: luozexuan <fetchcode@139.com>
2024-09-16 13:53:19 -07:00
Elliot Lee
fa1cbb0746 Merge remote-tracking branch 'origin/master' into develop-next 2024-09-14 18:36:46 -07:00
Elliot Lee
68e1be3cf5 Set version to 2.2.3 2024-09-14 13:21:23 -07:00
J. Scott Branson
9abc4868d6 Update SQLite3 max_page_count to match current defaults (#5114)
When rippled initiates a connection to SQLite3, rippled sends a "PRAGMA"
statement defining the maximum number of pages allowed in the database.
Update the max_page_count so it is consistent with the default for newer
versions of SQLite3. Increasing max_page_count is critical for keeping
full history servers online.

Fix #5102
2024-09-14 11:38:25 -07:00
Ed Hennis
23991c99c3 test: Retry RPC commands to try to fix MacOS CI jobs (#5120)
* Retry some failed RPC connections / commands in unit tests
* Remove orphaned `getAccounts` function

Co-authored-by: John Freeman <jfreeman08@gmail.com>
2024-09-11 11:29:06 +01:00
Ed Hennis
cc0177be87 Update Release Notes for 2.2.1 and 2.2.2 2024-09-03 18:37:47 -04:00
Ed Hennis
37b3e96b04 Merge remote-tracking branch 'upstream/master' into upstream--develop
* upstream/master:
  Set version to 2.2.2
  Allow only 1 job queue slot for each validation ledger check
  Allow only 1 job queue slot for acquiring inbound ledger.
  Track latencies of certain code blocks, and log if they take too long
2024-09-03 17:58:54 -04:00
Ed Hennis
85214bdf81 Set version to 2.2.2 2024-08-31 15:12:59 -04:00
Mark Travis
fbbea9e6e2 Allow only 1 job queue slot for each validation ledger check
* refactor filtering of validations to specifically avoid
 concurrent checkAccept() calls for the same validation ledger hash.
* Log when duplicate concurrent validation requests are filtered.
* RAII for containers that track concurrent validation requests.
2024-08-31 15:12:59 -04:00
Mark Travis
7741483894 Allow only 1 job queue slot for acquiring inbound ledger.
* Log when duplicate concurrent inbound ledger are filtered.
* RAII for containers that track concurrent inbound ledger.
* Comment on when to asynchronously acquire inbound ledgers, which
   is possible to be always OK, but should have further review.
* Other small logging changes

Co-authored-by: Ed Hennis <ed@ripple.com>
2024-08-31 15:12:22 -04:00
John Freeman
2f432e812c docs: Update options documentation (#5083)
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2024-08-28 17:31:33 -05:00
John Freeman
cad8970a57 refactor: Remove dead headers (#5081) 2024-08-28 14:23:38 -05:00
John Freeman
4d7aed84ec refactor: Remove reporting mode (#5092) 2024-08-28 13:00:50 -05:00
Valentin Balaschenko
00ed7c9424 Track latencies of certain code blocks, and log if they take too long 2024-08-26 19:03:56 -04:00
Ed Hennis
d9bd75e683 chore: Fix documentation generation job: (#5091)
* Add "doxygen" to list of supported branches to allow for testing and
  development.
* Add titles / H1 to some .md files that don't have them.
2024-08-15 17:03:50 -04:00
Ed Hennis
93d8bafb24 chore: libxrpl verification on CI (#5028)
Implements a CI workflow that detects when a new version of libxrpl is
proposed, uploads it to artifactory under the `clio` channel and
notifies Clio's CI to check this newly proposed version.
2024-08-15 12:51:50 -04:00
Scott Schurr
c19a88fee9 Address rare corruption of NFTokenPage linked list (#4945)
* Add fixNFTokenPageLinks amendment:

It was discovered that under rare circumstances the links between
NFTokenPages could be removed.  If this happens, then the
account_objects and account_nfts RPC commands under-report the
NFTokens owned by an account.

The fixNFTokenPageLinks amendment does the following to address
the problem:

- It fixes the underlying problem so no further broken links
  should be created.
- It adds Invariants so, if such damage were introduced in the
  future, an invariant would stop it.
- It adds a new FixLedgerState transaction that repairs
  directories that were damaged in this fashion.
- It adds unit tests for all of it.
2024-08-07 18:14:19 -04:00
Bronek Kozicki
0a331ea72e Factor out Transactor::trapTransaction (#5087) 2024-08-05 12:05:12 -04:00
John Freeman
7d27b11190 Remove shards (#5066) 2024-08-02 20:03:05 -04:00
Bronek Kozicki
eedfec015e Update gcovr EXCLUDE (#5084) 2024-08-02 17:25:44 -04:00
Bronek Kozicki
ffc343a2bc Fix crash inside OverlayImpl loops over ids_ (#5071) 2024-08-02 16:58:05 -04:00
Ed Hennis
e5aa605742 Set version to 2.3.0-b2 2024-07-31 17:14:04 -04:00
Bronek Kozicki
8b181ed818 Merge branch 'master' into develop 2024-07-31 15:12:15 +01:00
Ed Hennis
f5a349558e docs: Document the process for merging pull requests (#5010) 2024-07-30 20:19:03 -04:00
Scott Schurr
b9b75ddcf5 Remove unused constants from resource/Fees.h (#4856) 2024-07-30 12:47:04 -04:00
Mayukha Vadari
a39720e94a fix: change error for invalid feature param in feature RPC (#5063)
* Returns an "Invalid parameters" error if the `feature` parameter is provided and is not a string.
2024-07-30 11:18:25 -04:00
Ed Hennis
2820feb02a Ensure levelization sorting is ASCII-order across platforms (#5072) 2024-07-29 19:02:12 -04:00
Ed Hennis
8fc805d2e2 fix: Fix NuDB build error via Conan patch (#5061)
* Includes updated instructions in BUILD.md.
2024-07-29 18:14:41 -04:00
yinyiqian1
d54151e7c4 Disallow filtering account_objects by unsupported types (#5056)
* `account_objects` returns an invalid field error if `type` is not supported.
  This includes objects an account can't own, or which are unsupported by `account_objects`
* Includes:
  * Amendments
  * Directory Node
  * Fee Settings
  * Ledger Hashes
  * Negative UNL
2024-07-29 16:30:02 -04:00
Scott Schurr
21a0a64648 chore: Add comments to SignerEntries.h (#5059) 2024-07-25 17:12:59 -04:00
Scott Schurr
20707fac4a chore: Rename two files from Directory* to Dir*: (#5058)
The names of the files should reflect the name of the Dir class.

Co-authored-by: Zack Brunson <Zshooter@gmail.com>
Co-authored-by: Ed Hennis <ed@ripple.com>
2024-07-25 14:50:27 -04:00
Ed Hennis
e6ef0fc26c Set version to 2.2.1 2024-07-24 19:37:40 -04:00
John Freeman
c157816017 Use error codes throughout fast Base58 implementation 2024-07-24 19:37:34 -04:00
Mayukha Vadari
eba5d19377 Improve error handling in some RPC commands 2024-07-24 19:25:40 -04:00
Denis Angell
ad14d09a2b Update BUILD.md after PR #5052 (#5067)
* Document the need to specify "xrpld" and "tests" to build and test rippled.
2024-07-23 16:49:16 -04:00
John Freeman
f3bcc651c7 Add xrpld build option and Conan package test (#5052)
* Make xrpld target optional

* Add job to test Conan recipe

* [fold] address review comments

* [fold] Enable tests in workflows

* [fold] Rename with_xrpld option

* [fold] Fix grep expression
2024-07-11 15:04:30 -07:00
dashangcun
e8602b81fa chore: remove repeat words (#5053)
Signed-off-by: dashangcun <jchaodaohang@foxmail.com>
Co-authored-by: dashangcun <jchaodaohang@foxmail.com>
Co-authored-by: Zack Brunson <Zshooter@gmail.com>
2024-07-09 14:05:14 -07:00
yinyiqian1
0f32109993 fix CTID in tx command returns invalidParams on lowercase hex (#5049)
* fix CTID in tx command returns invalidParams on lowercase hex

* test mixed case and change auto to explicit type

* add header cctype because std::tolower is called

* remove unused local variable

* change test case comment from 'lowercase' to 'mixed case'

---------

Co-authored-by: Zack Brunson <Zshooter@gmail.com>
2024-07-05 11:10:54 -07:00
Ed Hennis
a17ccca615 Invariant: prevent a deleted account from leaving (most) artifacts on the ledger. (#4663)
* Add feature / amendment "InvariantsV1_1"

* Adds invariant AccountRootsDeletedClean:

* Checks that a deleted account doesn't leave any directly
  accessible artifacts behind.
* Always tests, but only changes the transaction result if
  featureInvariantsV1_1 is enabled.
* Unit tests.

* Resolves #4638

* [FOLD] Review feedback from @gregtatcam:

* Fix unused variable warning
* Improve Invariant test const correctness

* [FOLD] Review feedback from @mvadari:

* Centralize the account keylet function list, and some optimization

* [FOLD] Some structured binding doesn't work in clang

* [FOLD] Review feedback 2 from @mvadari:

* Clean up and clarify some comments.

* [FOLD] Change InvariantsV1_1 to unsupported

* Will allow multiple PRs to be merged over time using the same amendment.

* fixup! [FOLD] Change InvariantsV1_1 to unsupported

* [FOLD] Update and clarify some comments. No code changes.

* Move CMake directory

* Rearrange sources

* Rewrite includes

* Recompute loops

* Fix merge issue and formatting

---------

Co-authored-by: Pretty Printer <cpp@ripple.com>
2024-07-05 10:27:15 -07:00
Bronek Kozicki
7a1b238035 Bump codecov plugin version to version 4.5.0 (#5055)
This version includes fix https://github.com/codecov/codecov-action/pull/1471
which should end the codecov upload errors due to throttling.
2024-07-02 12:42:56 -07:00
yinyiqian1
e1534a3200 fix "account_nfts" with unassociated marker returning issue (#5045)
* fix "account_nfts" with unassociated marker returning issue

* create unit test for fixing nft page invalid marker not returning error

add more test

change test name

create unit test

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* fix "account_nfts" with unassociated marker returning issue

* [FOLD] accumulated review suggestions

* move BEAST check out of lambda function

---------

Authored-by: Scott Schurr <scott@ripple.com>
2024-07-02 11:58:03 -07:00
Scott Schurr
9fec615dca fixInnerObjTemplate2 amendment (#5047)
* fixInnerObjTemplate2 amendment:

Apply inner object templates to all remaining (non-AMM)
inner objects.

Adds a unit test for applying the template to sfMajorities.
Other remaining inner objects showed no problems having
templates applied.

* Move CMake directory

* Rearrange sources

* Rewrite includes

* Recompute loops

---------

Co-authored-by: Pretty Printer <cpp@ripple.com>
2024-06-27 11:52:02 -07:00
seelabs
ef02893f2f Set version to 2.3.0-b1 2024-06-20 15:30:07 -04:00
John Freeman
7cf4611d7c Ignore restructuring commits (#4997) 2024-06-20 13:57:22 -05:00
Pretty Printer
d028005aa6 Recompute loops (#4997) 2024-06-20 13:57:18 -05:00
Pretty Printer
1d23148e6d Rewrite includes (#4997) 2024-06-20 13:57:16 -05:00
Pretty Printer
e416ee72ca Rearrange sources (#4997) 2024-06-20 13:57:14 -05:00
Pretty Printer
2e902dee53 Move CMake directory (#4997) 2024-06-20 13:57:12 -05:00
John Freeman
f6879da6c9 Add bin/physical.sh (#4997) 2024-06-20 13:57:10 -05:00
John Freeman
ae20a3ad3f Prepare to rearrange sources: (#4997)
- Remove CMake module "MultiConfig".
- Update clang-format configuration, CodeCov configuration,
  levelization script.
- Replace source lists in CMake with globs.
2024-06-20 13:57:03 -05:00
Bronek Kozicki
c706926ee3 Change order of checks in amm_info: (#4924)
* Change order of checks in amm_info

* Change amm_info error message in API version 3

* Change amm_info error tests
2024-06-18 12:55:40 -04:00
Scott Schurr
223e6c7590 Add the fixEnforceNFTokenTrustline amendment: (#4946)
Fix interactions between NFTokenOffers and trust lines.

Since the NFTokenAcceptOffer does not check the trust line that
the issuer receives as a transfer fee in the NFTokenAcceptOffer,
if the issuer deletes the trust line after NFTokenCreateOffer,
the trust line is created for the issuer by the
NFTokenAcceptOffer.  That's fixed.

Resolves #4925.
2024-06-18 02:47:54 -04:00
Chenna Keshava B S
825864032a Replaces the usage of boost::string_view with std::string_view (#4509) 2024-06-17 16:41:03 -04:00
Elliot Lee
06733ec21a docs: explain how to find a clang-format patch generated by CI (#4521) 2024-06-17 15:32:08 -04:00
tequ
9f7c619e4f XLS-52d: NFTokenMintOffer (#4845) 2024-06-14 19:32:25 -04:00
todaymoon
3f5e3212fe chore: remove repeat words (#5041) 2024-06-14 15:36:59 -04:00
Alex Kremer
20d05492d2 Expose all amendments known by libxrpl (#5026) 2024-06-14 14:00:57 -04:00
Scott Schurr
ae7ea33b75 fixReducedOffersV2: prevent offers from blocking order books: (#5032)
Fixes issue #4937.

The fixReducedOffersV1 amendment fixed certain forms of offer
modification that could lead to blocked order books.  Reduced
offers can block order books if the effective quality of the
reduced offer is worse than the quality of the original offer
(from the perspective of the taker). It turns out that, for
small values, the quality of the reduced offer can be
significantly affected by the rounding mode used during
scaling computations.

Issue #4937 identified an additional code path that modified
offers in a way that could lead to blocked order books.  This
commit changes the rounding in that newly located code path so
the quality of the modified offer is never worse than the
quality of the offer as it was originally placed.

It is possible that additional ways of producing blocking
offers will come to light.  Therefore there may be a future
need for a V3 amendment.
2024-06-13 17:57:12 -04:00
Chenna Keshava B S
263e984bf4 Additional unit tests for testing deletion of trust lines (#4886) 2024-06-13 14:44:39 -04:00
Olek
58f3abe3c6 Fix conan typo: (#5044)
Add missed coma in 'exportes_sources'
2024-06-12 13:16:54 -04:00
Bronek Kozicki
d576416953 Add new command line option to make replaying transactions easier: (#5027)
* Add trap_tx_hash command line option

This new option can be used only if replay is also enabled. It takes a transaction hash from the ledger loaded for replay, and will cause a specific line to be hit in Transactor.cpp, right before the selected transaction is applied.
2024-06-11 14:34:02 -04:00
John Freeman
e3d1bb271f Fix compatibility with Conan 2.x: (#5001)
Closes #4926, #4990
2024-06-11 13:26:01 -04:00
seelabs
2df635693d Set version to 2.2.0 2024-06-04 17:56:09 -04:00
seelabs
40b4adc9cc Set version to 2.2.0-rc3 2024-05-20 17:46:43 -04:00
Alex Kremer
0c971b4415 Add xrpl.libpp as an exported lib in conan (#5022) 2024-05-20 17:43:31 -04:00
Gregory Tsipenyuk
f2d37da4ca Fix Oracle's token pair deterministic order: (#5021)
Price Oracle data-series logic uses `unordered_map` to update the Oracle object.
This results in different servers disagreeing on the order of that hash table.
Consequently, the generated ledgers will have different hashes.
The fix uses `map` instead to guarantee the order of the token pairs
in the data-series.
2024-05-20 16:33:01 -04:00
seelabs
d5e5c3c220 Set version to 2.2.0-rc2 2024-05-16 15:36:21 -04:00
Gregory Tsipenyuk
15390bedd5 Fix last Liquidity Provider withdrawal:
Due to the rounding, LPTokenBalance of the last
Liquidity Provider (LP), might not match this LP's
trustline balance. This fix sets LPTokenBalance on
last LP withdrawal to this LP's LPToken trustline
balance.
2024-05-16 13:36:24 -04:00
Gregory Tsipenyuk
7f6a079aa4 Fix offer crossing via single path AMM with transfer fee:
Single path AMM offer has to factor in the transfer in rate
when calculating the upper bound quality and the quality function
because single path AMM's offer quality is not constant.
This fix factors in the transfer fee in
BookStep::adjustQualityWithFees().
2024-05-16 13:36:24 -04:00
Gregory Tsipenyuk
2a25f58d40 Fix adjustAmountsByLPTokens():
The fix is to return the actual adjusted lp tokens and amounts
by the function.
2024-05-16 13:32:05 -04:00
Gregory Tsipenyuk
2705109592 Add the fixAMMOfferRounding amendment: (#4983)
* Fix AMM offer rounding and low quality LOB offer blocking AMM:

A single-path AMM offer with account offer on DEX, is always generated
starting with the takerPays first, which is rounded up, and then
the takerGets, which is rounded down. This rounding ensures that the pool's
product invariant is maintained. However, when one of the offer's side
is XRP, this rounding can result in the AMM offer having a lower
quality, potentially causing offer generation to fail if the quality
is lower than the account's offer quality.

To address this issue, the proposed fix adjusts the offer generation process
to start with the XRP side first and always rounds it down. This results
in a smaller offer size, improving the offer's quality. Regardless if the offer
has XRP or not, the rounding is done so that the offer size is minimized.
This change still ensures the product invariant, as the other generated
side is the exact result of the swap-in or swap-out equations.

If a liquidity can be provided by both AMM and LOB offer on offer crossing
then AMM offer is generated so that it matches LOB offer quality. If LOB
offer quality is less than limit quality then generated AMM offer quality
is also less than limit quality and the offer doesn't cross. To address
this issue, if LOB quality is better than limit quality then use LOB
quality to generate AMM offer. Otherwise, don't use the quality to generate
AMM offer. In this case, limitOut() function in StrandFlow limits
the out amount to match strand's quality to limit quality and consume
maximum AMM liquidity.
2024-05-14 15:28:38 -04:00
Denis Angell
244ac5e024 Update CONTRIBUTING.md (#4904) 2024-05-13 10:54:34 -04:00
Gregory Tsipenyuk
f4da2e31d9 Price Oracle: validate input parameters and extend test coverage: (#5013)
* Price Oracle: validate input parameters and extend test coverage:

Validate trim, time_threshold, document_id are valid
Int, UInt, or string convertible to UInt. Validate base_asset
and quote_asset are valid currency. Update error codes.
Extend Oracle and GetAggregatePrice unit-tests.
Denote unreachable coverage code.

* Set one-line LCOV_EXCL_LINE

* Move ledger_entry tests to LedgerRPC_test.cpp

* Add constants for "None"

* Fix LedgerRPC test

---------

Co-authored-by: Scott Determan <scott.determan@yahoo.com>
2024-05-09 15:17:16 -04:00
Michael Legleux
f650949573 Add external directory to Conan recipe's exports (#5006) 2024-05-02 15:44:42 -04:00
John Freeman
76128051c0 Add missing includes (#5011) 2024-05-02 11:14:59 -04:00
seelabs
5aa1106ba1 Remove flow assert: (#5009)
Rounding in the payment engine is causing an assert to sometimes fire
with "dust" amounts. This is causing issues when running debug builds of
rippled. This issue will be addressed, but the assert is no longer
serving its purpose.
2024-05-01 13:25:31 -04:00
Nik Bougalis
dccf3f49ef Update list of maintainers: (#4984)
I am resigning from my role as maintainer of the `rippled` codebase.

Please update repository permissions accordingly, prior to merging this pull request.

Thanks to everyone who has contributed, especially those whom I had the opportunity to closely collaborate with.
2024-04-29 18:44:20 -04:00
Ed Hennis
02ec8b7962 Set version to 2.2.0-rc1 2024-04-26 10:56:09 -04:00
seelabs
3f7ce939c8 fix amendment: AMM swap should honor invariants: (#5002)
The AMM has an invariant for swaps where:
new_balance_1*new_balance_2 >= old_balance_1*old_balance_2

Due to rounding, this invariant could sometimes be violated (although by
very small amounts).

This patch introduces an amendment `fixAMMRounding` that changes the
rounding to always favor the AMM. Doing this should maintain the
invariant.

Co-authored-by: Bronek Kozicki
Co-authored-by: thejohnfreeman
2024-04-25 21:15:19 -04:00
seelabs
b65cea1984 Add global access to the current ledger rules:
It can be difficult to make transaction breaking changes to low level
code because the low level code does not have access to a ledger and the
current activated amendments in that ledger (the "rules"). This patch
adds global access to the current ledger rules as a `std::optional`. If
the optional is not seated, then there is no active transaction.
2024-04-25 21:15:19 -04:00
Snoppy
b422e71eed chore: fix typos (#4958) 2024-04-25 12:05:12 -05:00
Ed Hennis
e9859ac1b1 test: Add RPC error checking support to unit tests (#4987) 2024-04-24 13:54:46 -04:00
John Freeman
b84f7e7c10 Ignore more commits 2024-04-19 11:45:51 -05:00
John Freeman
513842b23f Address compiler warnings 2024-04-19 11:32:16 -05:00
John Freeman
985c80fbc6 Add markers around source lists 2024-04-19 11:32:16 -05:00
John Freeman
35fe957020 Fix source lists 2024-04-19 11:32:16 -05:00
Pretty Printer
0eebe6a5f4 Rewrite includes
$ find src/ripple/ src/test/ -type f -exec sed -i 's:include\s*["<]ripple/\(.*\)\.h\(pp\)\?[">]:include <ripple/\1.h>:' {} +
2024-04-19 11:32:15 -05:00
Pretty Printer
760f16f568 Format formerly .hpp files 2024-04-19 11:32:15 -05:00
Pretty Printer
241b9ddde9 Rename .hpp to .h 2024-04-19 11:32:15 -05:00
John Freeman
3fcfb5cd49 Simplify protobuf generation 2024-04-19 11:32:14 -05:00
Pretty Printer
e2384885f5 Consolidate external libraries 2024-04-19 11:32:14 -05:00
John Freeman
dd312c3cc5 Remove packaging scripts 2024-04-19 11:32:14 -05:00
John Freeman
80379927e8 Remove unused files 2024-04-19 11:32:13 -05:00
Ed Hennis
676aae2755 Set version to 2.2.0-b3 2024-04-18 21:09:31 -04:00
Ed Hennis
f20e66e6f9 fix: Remove redundant STAmount conversion in test (#4996) 2024-04-18 21:09:25 -04:00
Scott Determan
cd737ad7d3 fix: resolve database deadlock: (#4989)
The `rotateWithLock` function holds a lock while it calls a callback
function that's passed in by the caller. This is a problematic design
that needs to be used very carefully. In this case, at least one caller
passed in a callback that eventually relocks the mutex on the same
thread, causing UB (a deadlock was observed). The caller was from
SHAMapStoreImpl, and it called `clearCaches`. This `clearCaches` can
potentially call `fetchNodeObject`, which tried to relock the mutex.

This patch resolves the issue by changing the mutex type to a
`recursive_mutex`. Ideally, the code should be rewritten so it doesn't
hold the mutex during the callback and the mutex should be changed back
to a regular mutex.

Co-authored-by: Ed Hennis <ed@ripple.com>
2024-04-18 16:44:59 -04:00
Chenna Keshava B S
df3aa84523 test: verify the rounding behavior of equal-asset AMM deposits (#4982)
* Specifically, test using tfLPToken flag
2024-04-18 16:15:31 -04:00
John Freeman
24a275ba25 test: Add tests to raise coverage of AMM (#4971)
---------

Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
Co-authored-by: Mark Travis <mtravis@ripple.com>
Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
Co-authored-by: Mayukha Vadari <mvadari@gmail.com>
Co-authored-by: Chenna Keshava <ckeshavabs@gmail.com>
2024-04-18 15:25:22 -04:00
Bronek Kozicki
aae438315f chore: Improve codecov coverage reporting (#4977)
* Amend `.codecov.yml` to disable coverage reporting of test sources
  and explicitly set most parameters
* Increase codecov upload retry time to 210s (from 35s)
* Upgrade gcovr adding support for more coverage formats (lcov, clover, jacoco)
* Upgrade github actions in coverage workflow
* Explicitly disable codecov plugins (also removing `gcov` coverage, which is not
  correctly handled by codecov https://github.com/codecov/feedback/issues/334)
2024-04-18 13:21:33 -04:00
Bronek Kozicki
8b0d049b9f test: Unit test for AMM offer overflow (#4986) 2024-04-18 12:30:18 -04:00
Mayukha Vadari
659bd99a67 fix amendment to add PreviousTxnID/PreviousTxnLgrSequence (#4751)
This amendment, `fixPreviousTxnID`, adds `PreviousTxnID` and
`PreviousTxnLgrSequence` as fields to all ledger objects that did
not already have them included (`DirectoryNode`, `Amendments`,
`FeeSettings`, `NegativeUNL`, and `AMM`). This makes it much easier
to go through the history of these ledger objects.
2024-04-18 10:41:25 -04:00
Ed Hennis
c88166e055 Set version to 2.2.0-b2 2024-04-04 15:42:39 -04:00
Michael Legleux
099c0bcd34 fix Conan component reference typo 2024-04-04 15:42:37 -04:00
Bronek Kozicki
d992e63075 Remove unused lambdas from MultiApiJson_test 2024-04-04 18:22:23 +01:00
Ed Hennis
c187f750fe chore: Default validator-keys-tool to master branch: (#4943)
* master is the default branch for that project. There's no point in
  using develop.
2024-04-04 10:40:35 -04:00
Ed Hennis
bcbf6c1973 Merge pull request #4968 from XRPLF/master
Merging changes for 2.1.1 from master into develop
2024-03-28 13:51:17 -04:00
Ed Hennis
4bcbf70cae chore: change Github Action triggers for build/test jobs (#4956)
Github Actions for the build/test jobs (nix.yml, mac.yml, windows.yml) will only run on branches that build packages (develop, release, master), and branches with names starting with "ci/". This is intended as a compromise between disabling CI jobs on personal forks entirely, and having the jobs run as a free-for-all. Note that it will not affect PR jobs at all.
2024-03-28 13:29:23 -04:00
seelabs
2d1854f354 Set version to 2.1.1 2024-03-27 13:46:59 +01:00
Gregory Tsipenyuk
a7c4a47723 fix: improper handling of large synthetic AMM offers:
A large synthetic offer was not handled correctly in the payment engine.
This patch fixes that issue and introduces a new invariant check while
processing synthetic offers.
2024-03-27 13:46:59 +01:00
Scott Determan
61672ad3ff fixXChainRewardRounding: round reward shares down: (#4933)
When calculating reward shares, the amount should always be rounded
down. If the `fixUniversalNumber` amendment is not active, this works
correctly. If it is not active, then the amount is incorrectly rounded
up. This patch introduces an amendment so it will be rounded down.
2024-03-22 17:02:17 -04:00
Mark Travis
cea43099d2 Don't reach consensus as quickly if no other proposals seen: (#4763)
This fixes a case where a peer can desync under a certain timing
circumstance--if it reaches a certain point in consensus before it receives
proposals. 

This was noticed under high transaction volumes. Namely, when we arrive at the
point of deciding whether consensus is reached after minimum establish phase
duration but before having received any proposals. This could be caused by
finishing the previous round slightly faster and/or having some delay in
receiving proposals. Existing behavior arrives at consensus immediately after
the minimum establish duration with no proposals. This causes us to desync
because we then close a non-validated ledger. The change in this PR causes us to
wait for a configured threshold before making the decision to arrive at
consensus with no proposals. This allows validators to catch up and for brief
delays in receiving proposals to be absorbed. There should be no drawback since,
with no proposals coming in, we needn't be in a huge rush to jump ahead.
2024-03-22 16:22:29 -04:00
Bronek Kozicki
6edf03c152 Write improved forAllApiVersions used in NetworkOPs (#4833) 2024-03-22 15:28:16 -04:00
Alloy Networks
47c8cc24f4 Remove zaphod.alloy.ee hub from default server list: (#4903)
Remove the zaphod.alloy.ee hubs from the bootstrap and default configuration after 5 years. It has been an honor to run these servers, but it is now time for another entity to step into this role.

The zaphod servers will be taken offline in a phased manner keeping all those who have peering arrangements informed.

These would be the preferred attributes of a boostrap set of hubs:

    1. Commitment to run the hubs for a minimum of 2 years
    2. Highly available
    3. Geographically dispersed
    4. Secure and up to date
    5. Committed to ensure that peering information is kept private
2024-03-22 14:52:45 -04:00
Bronek Kozicki
64e46878e0 Enforce no duplicate slots from incoming connections: (#4944)
We do not currently enforce that incoming peer connection does not have
remote_endpoint which is already used (either by incoming or outgoing
connection), hence already stored in slots_. If we happen to receive a
connection from such a duplicate remote_endpoint, it will eventually result in a
crash (when disconnecting) or weird behavior (when updating slot state), as a
result of an apparently matching remote_endpoint in slots_ being used by a
different connection.
2024-03-22 14:08:16 -04:00
Mayukha Vadari
ea9b1e3503 fixEmptyDID: fix amendment to handle empty DID edge case: (#4950)
This amendment fixes an edge case where an empty DID object can be
created. It adds an additional check to ensure that DIDs are
non-empty when created, and returns a `tecEMPTY_DID` error if the DID
would be empty.
2024-03-22 11:09:54 -04:00
Olek
2e9261cb26 perf: improve account_tx SQL query: (#4955)
The witness server makes heavily use of the `account_tx` RPC command. Perf
testing showed that the SQL query used by `account_tx` became unacceptably slow
when the DB was large and there was a `marker` parameter. The plan for the query
showed only indexed reads. This appears to be an issue with the internal SQLite
optimizer. This patch rewrote the query to use `UNION` instead of `OR` and
significantly improves performance. See RXI-896 and RIPD-1847 for more details.
2024-03-21 18:42:29 -04:00
John Freeman
69143d71f8 Fix workflows (#4951)
- Update container for Doxygen workflow. Matches Linux workflow, with newer GLIBC version required by newer actions.
- Fixes macOS workflow to install and configure Conan correctly. Still fails on tests, but that does not seem attributable to the workflow.
2024-03-20 09:19:48 -05:00
Ed Hennis
0c32fc5f2a test: Env unit test RPC errors return a unique result: (#4877)
* telENV_RPC_FAILED is a new code, reserved exclusively
  for unit tests when RPC fails. This will
  make those types of errors distinct and easier to test
  for when expected and/or diagnose when not.
* Output RPC command result when result is not expected.
2024-03-19 12:13:52 -04:00
Michael Legleux
af9cabe100 Install more public headers (#4940)
Fixes some mistakes in #4885
2024-03-13 21:14:43 -05:00
John Freeman
2ecb851926 Update remaining actions (#4949)
Downgrade {upload,download}-artifact action to v3 because of unreliability with v4.
2024-03-13 17:42:41 -05:00
Bronek Kozicki
2ffead76c1 Upgrade to xxhash 0.8.2 as a Conan requirement, enable SIMD hashing (#4893)
We are currently using old version 0.6.2 of `xxhash`, as a verbatim copy and paste of its header file `xxhash.h`. Switch to the more recent version 0.8.2. Since this version is in Conan Center (and properly protects its ABI by keeping the state object incomplete), add it as a Conan requirement. Switch to the SIMD instructions (in the new `XXH3` family) supported by the new version.
2024-03-13 16:12:22 -05:00
John Freeman
5cc377751a Fix workflows (#4948)
The problem was `CONAN_USERNAME` environment variable, which Conan 1.x uses as the default user in package references.
2024-03-13 13:23:43 -05:00
Scott Determan
ad8e9764e6 fix: order book update variable swap: (#4890)
This is likely the result of a typo when the code was simplified.
2024-03-12 17:52:07 -04:00
John Freeman
4ce426d8f6 Embed patched recipe for RocksDB 6.29.5 (#4947) 2024-03-12 17:01:15 -04:00
Gregory Tsipenyuk
c28e005087 build: add STCurrency.h to xrpl_core to fix clio build (#4939) 2024-03-06 16:24:07 -05:00
Mayukha Vadari
22b751834f feat: add user version of feature RPC (#4781)
* uses same formatting as admin RPC
* hides potentially sensitive data
2024-03-05 16:43:31 -05:00
Scott Determan
cce09b717e Fast base58 codec: (#4327)
This algorithm is about an order of magnitude faster than the existing
algorithm (about 10x faster for encoding and about 15x faster for
decoding - including the double hash for the checksum). The algorithms
use gcc's int128 (fast MS version will have to wait, in the meantime MS
falls back to the slow code).
2024-03-05 15:23:27 -05:00
Chenna Keshava B S
62dae3c6c6 Remove default ctors from SecretKey and PublicKey: (#4607)
* It is now an invariant that all constructed Public Keys are valid,
  non-empty and contain 33 bytes of data.
* Additionally, the memory footprint of the PublicKey class is reduced.
  The size_ data member is declared as static.
* Distinguish and identify the PublisherList retrieved from the local
  config file, versus the ones obtained from other validators.
* Fixes #2942
2024-03-05 12:02:53 -05:00
seelabs
97863e0b62 Set version to 2.2.0-b1 2024-02-29 11:07:24 -05:00
Gregory Tsipenyuk
8a2f6bec33 fix compile error on gcc 13: (#4932)
The compilation fails due to an issue in the initializer list
of an optional argument, which holds a vector of pairs.
The code compiles correctly on earlier gcc versions, but fails on gcc 13.
2024-02-28 09:34:22 -05:00
Gregory Tsipenyuk
e718378bdb Price Oracle (XLS-47d): (#4789) (#4789)
Implement native support for Price Oracles.

 A Price Oracle is used to bring real-world data, such as market prices,
 onto the blockchain, enabling dApps to access and utilize information
 that resides outside the blockchain.

 Add Price Oracle functionality:
 - OracleSet: create or update the Oracle object
 - OracleDelete: delete the Oracle object

 To support this functionality add:
 - New RPC method, `get_aggregate_price`, to calculate aggregate price for a token pair of the specified oracles
 - `ltOracle` object

 The `ltOracle` object maintains:
 - Oracle Owner's account
 - Oracle's metadata
 - Up to ten token pairs with the scaled price
 - The last update time the token pairs were updated

 Add Oracle unit-tests
2024-02-26 06:28:26 -05:00
seelabs
d7d15a922a Set version to 2.1.0 2024-02-20 19:56:19 -05:00
Ed Hennis
e74cb35aa4 test: guarantee proper lifetime for temporary Rules object: (#4917)
* Commit 01c37fe introduced a change to the STTx unit test where a local
  "defaultRules" object was created with a temporary inline "presets"
  value provided to the ctor. Rules::Impl stores a const ref to the
  presets provided to the ctor.  This particular call provided an inline
  temp variable, which goes out of scope as soon as the object is
  created. On Windows, attempting to use the presets (e.g. via the
  enabled() function) causes an access violation, which crashes the test
  run.
* An audit of the code indicates that all other instances of Rules use
  the Application's config.features list, which will have a sufficient
  lifetime.
2024-02-16 13:31:03 -08:00
Elliot Lee
da68651f61 Set version to 2.1.0-rc1 2024-02-07 13:59:44 -08:00
Gregory Tsipenyuk
be12136b8a fixInnerObjTemplate: set inner object template (#4906)
Add `STObject` constructor to explicitly set the inner object template.
This allows certain AMM transactions to apply in the same ledger:

There is no issue if the trading fee is greater than or equal to 0.01%.
If the trading fee is less than 0.01%, then:
- After AMM create, AMM transactions must wait for one ledger to close
  (3-5 seconds).
- After one ledger is validated, all AMM transactions succeed, as
  appropriate, except for AMMVote.
- The first AMMVote which votes for a 0 trading fee in a ledger will
  succeed. Subsequent AMMVote transactions which vote for a 0 trading
  fee will wait for the next ledger (3-5 seconds). This behavior repeats
  for each ledger.

This has no effect on the ultimate correctness of AMM. This amendment
will allow the transactions described above to succeed as expected, even
if the trading fee is 0 and the transactions are applied within one
ledger (block).
2024-02-07 13:58:12 -08:00
Chenna Keshava B S
6d3c21e369 feat: allow port_grpc to be specified in [server] stanza (#4728)
Prior to this commit, `port_grpc` could not be added to the [server]
stanza. Instead of validating gRPC IP/Port/Protocol information in
ServerHandler, validate grpc port info in GRPCServer constructor. This
should not break backwards compatibility.

gRPC-related config info must be in a section (stanza) called
[port_gprc].

* Close #4015 - That was an alternate solution. It was decided that with
  relaxed validation, it is not necessary to rename port_grpc.
* Fix #4557
2024-02-06 20:14:40 -08:00
Michael Legleux
1e96a1d6eb build: add headers needed in Conan package for libxrpl (#4885)
These headers are required in the xrpl Conan package in order for
xbridge witness server (xbwd) to build. This change to libxrpl may help
any dependents of libxrpl. This addition does not change any C++ code.
2024-02-05 08:17:32 -08:00
Shawn Xie
828bb64ebc fixNFTokenReserve: ensure NFT tx fails when reserve is not met (#4767)
Without this amendment, an NFTokenAcceptOffer transaction can succeed
even when the NFToken recipient does not have sufficient reserves for
the new NFTokenPage. This allowed accounts to accept NFT sell offers
without having a sufficient reserve. (However, there was no issue in
brokered mode or when a buy offer is involved.)

Instead, the transaction should fail with `tecINSUFFICIENT_RESERVE` as
appropriate. The `fixNFTokenReserve` amendment adds checks in the
NFTokenAcceptOffer transactor to check if the OwnerCount changed. If it
did, then it checks the new reserve requirement.

Fix #4679
2024-02-02 14:27:21 -08:00
John Freeman
6f00d32f7e fix(libxrpl): change library names in Conan recipe (#4831)
Use consistent platform-agnostic library names on all platforms.

Fix an issue that prevents dependents like validator-keys-tool from
linking to libxrpl on Windows.

It is bad practice to change the binary base name depending on the
platform. CMake already manipulates the base name into a final name that
fits the conventions of the platform. Linkers accept base names on the
command line and then look for conventional names on disk.
2024-02-01 16:57:29 -08:00
Ed Hennis
f9e365828a test: check for success/failure of Windows CI unit tests (#4871)
* Disable the Windows CI unit tests "allowed to fail" workaround which
  was previously introduced in #4596.
* The runner hardware was upgraded, and the unit tests have been passing
  since then.
2024-01-31 22:29:29 -08:00
Bronek Kozicki
90d463b925 test: add unit test for redundant payment (#4860)
If the payee and payer are the same account, then the transaction fails
in preflight with temREDUNDANT.
2024-01-30 22:14:57 -08:00
Elliot Lee
22cdb5728b Set version to 2.0.1 2024-01-29 08:36:10 -08:00
Bronek Kozicki
901152bd93 chore: retry codecov upload (#4896)
Update to #4849, using a workaround for spurious codecov upload errors.

Spurious codecov upload errors are expected in public repos which rely
on PRs via forks. Retrying uploads is a decent and easy workaround.
2024-01-24 16:46:24 -08:00
John Freeman
d9a5bca625 docs: fix broken links in docs/build/conan.md (#4699) 2024-01-23 20:35:22 -08:00
Elliot Lee
1676e9fe21 Set version to 2.0.1-rc1 2024-01-22 14:48:05 -08:00
Bronek Kozicki
fad9d639bf test: improve code coverage reporting (#4849)
* Speed up the generation of coverage reports by using multiple cores.

* Add codecov step to coverage workflow.
2024-01-22 13:09:18 -08:00
Chenna Keshava B S
efe6722bf8 docs: update help message about unit test-suite pattern matching (#4846)
Update the "rippled --help" message for the "-u" parameter. This
documents the unit test name pattern matching rule implemented by #4634.

Fix #4800
2024-01-19 21:55:57 -08:00
Mark Travis
a41f38547b Revert "Asynchronously write batches to NuDB. (#4503)" (#4882)
This reverts commit 1d9db1bfdd.

This improves the stability of online deletion.
2024-01-19 13:26:26 -08:00
Elliot Lee
87ee7868ea Set version to 2.0.1-b1 2024-01-17 16:40:20 -08:00
Elliot Lee
861bd1a96e docs: add Performance type to PR template (#4875) 2024-01-17 16:37:28 -08:00
Bronek Kozicki
6ac2b705dd test: add DeliverMax to more JSONRPC tests (#4826)
Minor change in unit tests to improve testing scope.
2024-01-16 20:38:35 -08:00
John Freeman
fe4d6c68b5 fix: change default send_queue_limit to 500 (#4867)
Clients subscribed to `transactions` over WebSocket are being
disconnected because the traffic exceeds the default `send_queue_limit`
of 100.

This commit changes the default configuration, not the default in code.

Fix #4866
2024-01-16 11:06:46 -08:00
Chenna Keshava B S
5a7af5bb77 fix: clang warning about deprecated sprintf usage (#4747)
Resolves a warning that was emitted from the clang compiler. Switches
usage of the sprintf function to the recommended snprintf function.

Warning was observed in Apple clang version 15.0.0 (clang-1500.0.40.1).

Fix #4569
2024-01-15 22:32:52 -08:00
Ed Hennis
d9f90c84c0 Improve lifetime management of ledger objects (SLEs) to prevent runaway memory usage: (#4822)
* Add logging for Application.cpp sweep()
* Improve lifetime management of ledger objects (`SLE`s)
* Only store SLE digest in CachedView; get SLEs from CachedSLEs
* Also force release of last ledger used for path finding if there are
  no path finding requests to process
* Count more ST objects (derive from `CountedObject`)
* Track CachedView stats in CountedObjects
* Rename the CachedView counters
* Fix the scope of the digest lookup lock

Before this patch, if you asked "is it caching?" It was always caching.
2024-01-12 12:42:33 -05:00
Ed Hennis
4308407dc1 WebSocket should only call async_close once (#4848)
Prevent WebSocket connections from trying to close twice.

The issue only occurs in debug builds (assertions are disabled in
release builds, including published packages), and when the WebSocket
connections are unprivileged. The assert (and WRN log) occurs when a
client drives up the resource balance enough to be forcibly disconnected
while there are still messages pending to be sent.

Thanks to @lathanbritz for discovering this issue in #4822.
2024-01-11 20:11:09 -05:00
Elliot Lee
2b0313d60c Set version to 2.0.0 2024-01-08 13:22:59 -08:00
Michael Legleux
350d213ee8 Set version to 2.0.0-rc7
* Ignore python error about modifying system python (#4863)
2024-01-05 12:55:45 -08:00
Elliot Lee
ca3198164c Set version to 2.0.0-rc6 2023-12-20 09:33:33 -08:00
Scott Schurr
c53a5e7a72 Revert "Apply transaction batches in periodic intervals (#4504)" (#4852)
This reverts commit 002893f280.

There were two files with conflicts in the automated revert:

- src/ripple/rpc/impl/RPCHelpers.h and
- src/test/rpc/JSONRPC_test.cpp

Those files were manually resolved.
2023-12-20 09:30:12 -08:00
Bronek Kozicki
ffb53f2085 Revert "Add ProtocolStart and GracefulClose P2P protocol messages (#3839)" (#4850)
This reverts commit 8f89694fae.
2023-12-19 12:52:25 -08:00
Elliot Lee
3b191a3097 docs(API-CHANGELOG): clarify changes for V2 (#4773) 2023-12-06 14:27:33 -08:00
Hussein Badakhchani
656948cd0f fix typo: 'of' instead of 'on' (#4821)
Co-authored-by: Hussein Badakhchani <hoos@alsoug.com>
2023-12-06 14:26:18 -08:00
Elliot Lee
46f3d3ef61 Set version to 2.0.0-rc5 2023-11-30 21:46:37 -08:00
Bronek Kozicki
06251aa76f Workarounds for gcc-13 compatibility (#4817)
Workaround for compilation errors with gcc-13 and other compilers
relying on `libstdc++` version 13. This is temporary until actual fix is
available for us to use: https://github.com/boostorg/beast/pull/2682

Some boost.beast files (which we do use) rely on an old gcc-12 behaviour
where `#include <cstdint>` was not needed even though types from this
header were used. This was broken by a change in libstdc++ version 13:
https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

The necessary fix was implemented in boost.beast, however it is not yet
available. Until it is available, we can use this workaround to enable
compilation of `rippled` with gcc-13, clang-16, etc.
2023-11-30 21:46:06 -08:00
Sophia Xie
5aef102f4f Revert #4505, #4760 (#4842)
* Revert "Optimize calculation of close time to avoid impasse and minimize gratuitous proposal changes (#4760)"

This reverts commit 8ce85a9750.

* Revert "Several changes to improve Consensus stability: (#4505)"

This reverts commit f259cc1ab6.

* Add missing include

---------

Co-authored-by: seelabs <scott.determan@yahoo.com>
2023-11-30 21:00:50 -08:00
Elliot Lee
431646437e Set version to 2.0.0-rc4 2023-11-29 12:20:43 -08:00
Bronek Kozicki
fe8621b00f APIv2: show DeliverMax in submit, submit_multisigned (#4827)
Show `DeliverMax` instead of `Amount` in output from `submit`,
`submit_multisigned`, `sign`, and `sign_for`.

Fix #4829
2023-11-29 12:19:32 -08:00
Bronek Kozicki
c045060560 APIv2: consistently return ledger_index as integer (#4820)
For api_version 2, always return ledger_index as integer in JSON output.

api_version 1 retains prior behavior.
2023-11-29 12:12:38 -08:00
Manoj Doshi
8ec475b1fd Set version to 2.0.0-rc3 2023-11-27 15:24:25 -08:00
Elliot Lee
e33a6d5c2b docs(API-CHANGELOG): add extra bullet about DeliverMax (#4784) 2023-11-27 13:29:47 -08:00
Bronek Kozicki
923e1cef99 Update API-CHANGELOG.md for release 2.0 (#4828) 2023-11-27 13:28:34 -08:00
Michael Legleux
2e93dd57eb Add Debian 12 Bookworm; ignore core-utils in almalinux (#4836)
Add codename `bookworm` to the distro matrix during Artifactory uploads
allowing Debian 12 clients to install `rippled` packages.

Ignore installing conflicting `core-utils` packages during almalinux
package smoke tests.
2023-11-27 13:26:41 -08:00
Elliot Lee
92957d685d Merge pull request #4823 from XRPLF/release
Merging release into develop
2023-11-27 13:16:34 -08:00
Elliot Lee
f05acbd782 Merge pull request #4824 from manojsdoshi/develop
Merging rc2 to develop
2023-11-27 13:12:18 -08:00
Manoj Doshi
44a9266c9e Set version to 2.0.0-rc2 2023-11-20 16:30:17 -08:00
Mark Travis
c1710900b4 Optimize calculation of close time to avoid impasse and minimize gratuitous proposal changes (#4760)
* Optimize the calculation of close time to avoid
impasse and minimize gratuitous proposal changes.

* git apply clang-format.patch

* Review (Howard) fixes.

* Review fix for impasse discovered by John.

* Review fixes (comments) from John.

* Scott S review fixes. Also clang-format.
2023-11-20 16:29:11 -08:00
Bronek Kozicki
d5059b11b9 Fix 2.0 regression in tx method with binary output (#4812)
* Fix binary output from tx method

* Formatting fix

* Minor test improvement

* Minor test improvements
2023-11-20 16:28:52 -08:00
Michael Legleux
f95fa338c9 Update Linux smoketest distros (#4813)
Co-authored-by: manoj <mdoshi@ripple.com>
2023-11-20 16:28:28 -08:00
Bronek Kozicki
96c926c71e Promote API version 2 to supported (#4803)
* Promote API version 2 to supported

* Switch command line to API version 1

* Fix LedgerRequestRPC test

* Remove obsolete tx_account method

This method is not implemented, the only parts which are removed are related to command-line parsing

* Fix RPCCall test

* Reduce diff size, small test improvements

* Minor fixes

* Support for the mold linker

* [fold] handle case where both mold and gold are installed

* [fold] Use first non-default linker

* Fix TransactionEntry_test

* Fix AccountTx_test

---------

Co-authored-by: seelabs <scott.determan@yahoo.com>
2023-11-20 16:28:17 -08:00
Scott Determan
4dff203787 Support for the mold linker (#4807) 2023-11-20 16:28:00 -08:00
manoj
4977a5d43c Proposed 2.0.0-rc2 (#4818)
* Support for the mold linker (#4807)

* Promote API version 2 to supported (#4803)

* Promote API version 2 to be supported

* Switch the command line to API version 1

* Fix LedgerRequestRPC test

* Remove obsolete tx_account method

This method is not implemented, the only parts which are removed are related to command-line parsing

* Fix RPCCall test

* Reduce diff size, small test improvements

* Minor fixes

* Support for the mold linker

* Fix TransactionEntry_test

* Fix AccountTx_test

---------

Co-authored-by: seelabs <scott.determan@yahoo.com>

* Update Linux smoketest distros (#4813)

* Fix 2.0 regression in tx method with binary output (#4812)

* Fix binary output from tx method

* Formatting fix

* Minor test improvement

* Minor test improvements

* Optimize calculation of close time to avoid impasse and minimize gratuitous proposal changes (#4760)

* Optimize the calculation of close time to avoid
impasse and minimize gratuitous proposal changes.

* git apply clang-format.patch

* Scott S review fixes. Also clang-format.

* Set version to 2.0.0-rc2

---------

Co-authored-by: manoj <mdoshi@ripple.com>
Co-authored-by: Scott Determan <scott.determan@yahoo.com>
Co-authored-by: Bronek Kozicki <brok@incorrekt.com>
Co-authored-by: Michael Legleux <legleux@users.noreply.github.com>
Co-authored-by: Mark Travis <mtrippled@users.noreply.github.com>
2023-11-20 13:34:59 -08:00
Mark Travis
8ce85a9750 Optimize calculation of close time to avoid impasse and minimize gratuitous proposal changes (#4760)
* Optimize the calculation of close time to avoid
impasse and minimize gratuitous proposal changes.

* git apply clang-format.patch

* Review (Howard) fixes.

* Review fix for impasse discovered by John.

* Review fixes (comments) from John.

* Scott S review fixes. Also clang-format.
2023-11-16 20:37:53 -08:00
Bronek Kozicki
d5939727e0 Fix 2.0 regression in tx method with binary output (#4812)
* Fix binary output from tx method

* Formatting fix

* Minor test improvement

* Minor test improvements
2023-11-15 16:40:10 -08:00
Michael Legleux
7b49f1e1de Update Linux smoketest distros (#4813)
Co-authored-by: manoj <mdoshi@ripple.com>
2023-11-14 16:56:48 -08:00
Bronek Kozicki
ac27089c69 Promote API version 2 to supported (#4803)
* Promote API version 2 to supported

* Switch command line to API version 1

* Fix LedgerRequestRPC test

* Remove obsolete tx_account method

This method is not implemented, the only parts which are removed are related to command-line parsing

* Fix RPCCall test

* Reduce diff size, small test improvements

* Minor fixes

* Support for the mold linker

* [fold] handle case where both mold and gold are installed

* [fold] Use first non-default linker

* Fix TransactionEntry_test

* Fix AccountTx_test

---------

Co-authored-by: seelabs <scott.determan@yahoo.com>
2023-11-13 15:04:27 -08:00
Scott Determan
4cb0bcb003 Support for the mold linker (#4807) 2023-11-13 12:28:25 -08:00
Manoj Doshi
cf4e9e5578 Set version to 2.0.0-rc1 2023-11-09 11:28:45 -08:00
Bronek Kozicki
32ced493de Unify JSON serialization format of transactions (#4775)
* Remove include <ranges>

* Formatting fix

* Output for subscriptions

* Output from sign, submit etc.

* Output from ledger

* Output from account_tx

* Output from transaction_entry

* Output from tx

* Store close_time_iso in API v2 output

* Add small APIv2 unit test for subscribe

* Add unit test for transaction_entry

* Add unit test for tx

* Remove inLedger from API version 2

* Set ledger_hash and ledger_index

* Move isValidated from RPCHelpers to LedgerMaster

* Store closeTime in LedgerFill

* Time formatting fix

* additional tests for Subscribe unit tests

* Improved comments

* Rename mInLedger to mLedgerIndex

* Minor fixes

* Set ledger_hash on closed ledger, even if not validated

* Update API-CHANGELOG.md

* Add ledger_hash, ledger_index to transaction_entry

* Fix validated and close_time_iso in account_tx

* Fix typos

* Improve getJson for Transaction and STTx

* Minor improvements

* Replace class enum JsonOptions with struct

We may consider turning this into a general-purpose template and using it elsewhere

* simplify the extraction of transactionID from Transaction object

* Remove obsolete comments

* Unconditionally set validated in account_tx output

* Minor improvements

* Minor fixes

---------

Co-authored-by: Chenna Keshava <ckeshavabs@gmail.com>
2023-11-08 10:36:24 -08:00
Scott Determan
09e0f103f4 fix: check for valid public key in attestations (#4798) 2023-11-02 15:19:21 -07:00
pwang200
056255e396 Fix unit test api_version to enable api_version 2 (#4785)
The command line API still uses `apiMaximumSupportedVersion`.
The unit test RPCs use `apiMinimumSupportedVersion` if unspecified.

Context:
- #4568
- #4552
2023-11-02 09:59:19 -07:00
Elliot Lee
85342b21c8 chore: delete unused Dockerfile (#4791) 2023-10-31 23:00:11 -07:00
Stefan van Kessel
26b0322aa5 fix: remove unused variable (#4677)
With clang 15, an unused-but-set-variable warning was emitted:

PostgresDatabase.cpp:178:14: warning: variable 'expNumResults' set but
not used [-Wunused-but-set-variable]
    uint32_t expNumResults = 1;
2023-10-30 20:35:28 -07:00
Gregory Tsipenyuk
3b624d8bf8 fixFillOrKill: fix offer crossing with tfFillOrKill (#4694)
Introduce the `fixFillOrKill` amendment.

Fix an edge case occurring when an offer with `tfFillOrKill` set (but
without `tfSell` set) fails to cross an offer with a better rate. If
`tfFillOrKill` is set, then the owner must receive the full TakerPays.
Without this amendment, an offer fails if the entire `TakerGets` is not
spent. With this amendment, when `tfSell` is not set, the entire
`TakerGets` does not have to be spent.

For details about OfferCreate, see: https://xrpl.org/offercreate.html

Fix #4684

---------

Co-authored-by: Scott Schurr <scott@ripple.com>
2023-10-30 14:05:46 -07:00
Bronek Kozicki
ac02e56519 fix: remove include <ranges> (#4788)
Remove dependency on `<ranges>` header, since it is not implemented by
all compilers which we want to support.

This code change only affects unit tests.

Resolve https://github.com/XRPLF/rippled/issues/4787
2023-10-30 11:13:25 -07:00
Bronek Kozicki
1eac4d2c07 APIv2: remove tx_history and ledger_header (#4759)
Remove `tx_history` and `ledger_header` methods from API version 2.

Update `RPC::Handler` to allow for methods (or method implementations)
to be API version specific. This partially resolves #4727. We can now
store multiple handlers with the same name, as long as they belong to
different (non-overlapping) API versions. This necessarily impacts the
handler lookup algorithm and its complexity; however, there is no
performance loss on x86_64 architecture, and only minimal performance
loss on arm64 (around 10ns). This design change gives us extra
flexibility evolving the API in the future, including other parts of
#4727.

In API version 2, `tx_history` and `ledger_header` are no longer
recognised; if they are called, `rippled` will return error
`unknownCmd`

Resolve #3638

Resolve #3539
2023-10-24 15:57:49 -07:00
Mark Travis
3e5f770a38 docs: clarify definition of network health (#4729)
Update the documentation to describe network health with more nuance as
well as context about related factors.
2023-10-24 14:23:44 -07:00
Elliot Lee
2a66bb3fc7 Set version to 2.0.0-b4 2023-10-23 11:51:45 -07:00
Bronek Kozicki
397268394b APIv2(DeliverMax): add alias for Amount in Payment transactions (#4733)
Using the "Amount" field in Payment transactions can cause incorrect
interpretation. There continue to be problems from the use of this
field. "Amount" is rarely the correct field to use; instead,
"delivered_amount" (or "DeliveredAmount") should be used.

Rename the "Amount" field to "DeliverMax", a less misleading name. With
api_version: 2, remove the "Amount" field from Payment transactions.

- Input: "DeliverMax" in `tx_json` is an alias for "Amount"
  - sign
  - submit (in sign-and-submit mode)
  - submit_multisigned
  - sign_for
- Output: Add "DeliverMax" where transactions are provided by the API
  - ledger
  - tx
  - tx_history
  - account_tx
  - transaction_entry
  - subscribe (transactions stream)
- Output: Remove "Amount" from API version 2

Fix #3484

Fix #3902
2023-10-23 11:26:16 -07:00
Ed Hennis
5026cbdaf3 perf(CI): use unity builds to speed up Windows CI (#4780)
The unity build speeds up compilation by bundling multiple source files
into one larger file. This reduces Windows CI build time by up to 50%.

As described in #4596, the automatic Windows builds take a very long
time. Unity builds are significantly faster - currently about 45 min,
much closer to the typical MacOS (35-40 minutes) and nix (~30 minutes)
run times.

This is intended as a stopgap solution until a more resourced and
reliable runner is available.

No C++ code was changed. This only affects CI.
2023-10-23 08:20:48 -07:00
shichengsg002
5af9dc5abd fix(CI): set permission for doxygen workflow (#4756) 2023-10-19 10:53:38 -07:00
Denis Angell
8d86c5e17d fix: allow pseudo-transactions to omit NetworkID (#4737)
The Network ID logic should not be applied to pseudo-transactions.

This allows amendments to enable on a network with an ID > 1024.

Context:
- NetworkID: https://github.com/XRPLF/rippled/pull/4370
- Pseudo-transactions: https://xrpl.org/pseudo-transaction-types.html

Fix #4736

---------

Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
2023-10-19 10:00:49 -07:00
Mayukha Vadari
078bd606c7 feat(rpc): add server_definitions method (#4703)
Add a new RPC / WS call for `server_definitions`, which returns an
SDK-compatible `definitions.json` (binary enum definitions) generated by
the server. This enables clients/libraries to dynamically work with new
fields and features, such as ones that may become available on side
chains. Clients query `server_definitions` on a node from the network
they want to work with, and immediately know how to speak that node's
binary "language", even if new features are added to it in the future
(as long as there are no new serialized types that the software doesn't
know how to serialize/deserialize).

Example:

```js
> {"command": "server_definitions"}
< {
    "result": {
        "FIELDS": [
            [
                "Generic",
                {
                    "isSerialized": false,
                    "isSigningField": false,
                    "isVLEncoded": false,
                    "nth": 0,
                    "type": "Unknown"
                }
            ],
            [
                "Invalid",
                {
                    "isSerialized": false,
                    "isSigningField": false,
                    "isVLEncoded": false,
                    "nth": -1,
                    "type": "Unknown"
                }
            ],
            [
                "ObjectEndMarker",
                {
                    "isSerialized": false,
                    "isSigningField": true,
                    "isVLEncoded": false,
                    "nth": 1,
                    "type": "STObject"
                }
            ],
        ...
```

Close #3657

---------

Co-authored-by: Richard Holland <richard.holland@starstone.co.nz>
2023-10-18 16:16:40 -07:00
Mayukha Vadari
b421945e71 DID: Decentralized identifiers (DIDs) (XLS-40): (#4636)
Implement native support for W3C DIDs.

Add a new ledger object: `DID`.

Add two new transactions:
1. `DIDSet`: create or update the `DID` object.
2. `DIDDelete`: delete the `DID` object.

This meets the requirements specified in the DID v1.0 specification
currently recommended by the W3C Credentials Community Group.

The DID format for the XRP Ledger conforms to W3C DID standards.
The objects can be created and owned by any XRPL account holder.
The transactions can be integrated by any service, wallet, or application.
2023-10-18 13:01:12 -07:00
Denis Angell
41cd337506 Update the reserved hook error code name to tecHOOK_REJECTED (#4559)
The old name was `tecHOOK_ERROR`
2023-10-17 22:56:22 -07:00
Scott Schurr
b69156ac01 refactor(peerfinder): use LogicError in PeerFinder::Logic (#4562)
It might be possible for the server code to indirect through certain
`end()` iterators. While a debug build would catch this problem with
`assert()`s, a release build would crash. If there are problems in this
area in the future, it is best to get a definitive indication of the
nature of the error regardless of whether it's a debug or release build.
To accomplish this, these `assert`s are converted into `LogicError`s
that will produce a reasonable error message when they fire.
2023-10-17 22:52:33 -07:00
Elliot Lee
be6ac7e7a1 docs(pull_request_template): add API Impact section (#4757) 2023-10-17 21:27:03 -07:00
Elliot Lee
1fc1eb9f68 Set version to 2.0.0-b3 2023-10-16 17:59:19 -07:00
Ed Hennis
1fde585003 fix(CI): Call python to upgrade pip on Windows (#4768)
In Windows, we need to call `python` in order for the `pip` upgrade
command to work.

This changes the GitHub Actions Windows CI job to use the correct
command to upgrade PIP, fixing this error:

```
ERROR: To modify pip, please run the following command:
C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe -m pip install --upgrade pip
```

A future task is to make job run on heavy Windows runners so that it
doesn't take so long.

Context: #4596
2023-10-16 14:26:40 -07:00
Jackson Mills
c915984340 docs(conan.md): fix broken link to conanfile.py (#4740) 2023-10-12 10:12:17 -07:00
Ed Hennis
50cc1cf0c9 fix(PathRequest): remove incorrect assert (#4743)
The assert is saying that the only reason `pathFinder` would be null is
if the request was aborted (connection dropped, etc.). That's what
`continueCallback()` checks. But that is very clearly not true if you
look at `getPathFinder`, which calls `findPaths`, which can return false
for many reasons.

Fix #4744
2023-10-12 10:10:35 -07:00
Chenna Keshava B S
1151fba415 fix(CI): update workflow for uploading binaries to artifactory (#4746)
Update the nix CI runner. This commit does not modify any source code
files. The unix builds were successful, but the binaries were not
uploaded to the internal artifactory. This PR borrows an idea from
@ximinez to attempt to fix this issue.

After successful authentication, the `outcome` variable contains a
string. In the upload step, we are checking if outcome == 'success' as a
prerequisite for uploading the binary.

This commit updates the contents of the `outcome` variable.
2023-10-11 08:45:45 -07:00
Ed Hennis
3e08c390f5 ci: reenable Windows CI build with Artifactory support (#4596)
Artifactory support was added to the `nix` builds with #4556. This
extends that support to the Windows build. Now the Windows build works;
CI will build and test a Windows release build. This only affects CI and
does not change any C++ code.

* Copy the remote setup step outcome fix from #4716 discussion
* Allow the Windows job to succeed if tests fail:
  * Currently the tests do not always pass, even on a single threaded
    run on the GitHub runners. So we are using parallel runs and mark
    the test step as allowed to fail (continue-on-error).
  * At this point, it's more important that the build succeeds than that
    the tests succeed, because:
  * We've got plenty of test coverage on the other jobs.
  * Test failures are much rarer than build failures because of
    cross-platform issues.
  * Having a test failure locally doesn't interrupt a workflow nearly as
    much as a build failure.

Note that Conan Center cannot hold the binaries we need. They do not
build the configurations we need, and they will not add them.

## Future Tasks

This introduces a new bottleneck since the build and test takes over an
hour. Speed up the job by:

* Making this job run on heavy Windows runners.
* Increasing the number of hardware threads.
2023-10-09 15:51:22 -07:00
Ed Hennis
053b69c63f docs(API-CHANGELOG): add XRPFees change (#4741)
* Add a new API Changelog section for release 1.10.
* Mark `jss::fee_ref` as deprecated.
* Fix a copy-paste error in one of the unit tests.
2023-10-06 11:11:39 -07:00
Florent
ced14ec1ab docs(rippled-example.cfg): add P2P link compression (#4753)
P2P link compression is a feature added in 1.6.0 by #3287.

https://xrpl.org/enable-link-compression.html

If the default changes in the future - for example, as currently
proposed by #4387 - the comment will be updated at that time.

Fix #4656
2023-10-06 08:23:30 -07:00
Denis Angell
6ba9450c89 fixDisallowIncomingV1: allow issuers to authorize trust lines (#4721)
Context: The `DisallowIncoming` amendment provides an option to block
incoming trust lines from reaching your account. The
asfDisallowIncomingTrustline AccountSet Flag, when enabled, prevents any
incoming trust line from being created. However, it was too restrictive:
it would block an issuer from authorizing a trust line, even if the
trust line already exists. Consider:

1. Issuer sets asfRequireAuth on their account.
2. User sets asfDisallowIncomingTrustline on their account.
3. User submits tx to SetTrust to Issuer.

At this point, without `fixDisallowIncomingV1` active, the issuer would
not be able to authorize the trust line.

The `fixDisallowIncomingV1` amendment, once activated, allows an issuer
to authorize a trust line even after the user sets the
asfDisallowIncomingTrustline flag, as long as the trust line already
exists.
2023-10-05 16:25:16 -07:00
Scott Determan
ec8626046b refactor: reduce boilerplate in applySteps: (#4710)
When a new transactor is added, there are several places in applySteps
that need to be modified. This patch refactors the code so only one
function needs to be modified.
2023-10-05 15:29:23 -07:00
Rome Reginelli
4e84ad6cd7 refactor: reunify transaction common fields: (#4715)
Make transactions and pseudo-transactions share the same commonFields
again. This regularizes the code in a nice way.

While this technically allows pseudo-transactions to have a
TicketSequence field, pseudo-transactions are only ever constructed by
code paths that don't add such a field, so this is not a transaction
processing change. It may be possible to add a separate check to ensure
TicketSequence (and other fields that don't make sense on
pseudo-transactions) are never added to pseudo-transactions, but that
should not be necessary. (TicketSequence is not the only common field
that can not and does not appear in pseudo-transactions.) Note:
TicketSequence is already documented as a common field.

Related: #4637

Fix #4714
2023-10-04 17:03:14 -07:00
sokkaofthewatertribe
40ebbecac8 fix typo in SECURITY.md (#4662) 2023-10-03 21:32:16 -07:00
Elliot Lee
0c43eb3973 docs(API-CHANGELOG): clarify account_info response (#4724) 2023-10-03 21:31:24 -07:00
Stefan van Kessel
3dea78d34b fix: asan stack-use-after-scope in soci::use with rvalues (#4676)
Address a stack-use-after-scope issue when using rvalues with
`soci::use`. Replace rvalues with lvalues to ensure the scope extends
beyond the end of the expression.

The issue arises from `soci` taking a reference to the rvalue without
copying its value or extending its lifetime. `soci` references rvalues
in `soci::use_container` and then the address in `soci_use_type`. For
types like `int`, memory access post-lifetime is unlikely to cause
issues. However, for `std::string`, the backing heap memory can be freed
and potentially reused, leading to a potential segmentation fault.

This was detected on x86_64 using clang-15 with asan. asan confirms
resolution of the issue.

Fix #4675
2023-10-03 21:21:36 -07:00
Chenna Keshava B S
e27d24ba00 docs(BUILD.md): require GCC 11 or higher (#4700)
Update minimum compiler requirement for building the codebase. The
feature "using enum" is required. This feature was introduced in C++20.

Updating the C++ compiler to version 11 or later fixes this error:

```
Building CXX object CMakeFiles/xrpl_core.dir/src/ripple/protocol/impl/STAmount.cpp.o
/build/ripple/binary/src/ripple/protocol/impl/STAmount.cpp: In lambda function:
/build/ripple/binary/src/ripple/protocol/impl/STAmount.cpp:1577:15: error: expected nested-name-specifier before 'enum'
 1577 |         using enum Number::rounding_mode;
      |               ^~~~
```

Fix #4693
2023-10-02 16:43:29 -07:00
Scott Determan
925aca764b fix(XLS-38): disallow the same bridge on one chain: (#4720)
Modify the `XChainBridge` amendment.

Before this patch, two door accounts on the same chain could could own
the same bridge spec (of course, one would have to be the issuer and one
would have to be the locker). While this is silly, it does not violate
any bridge invariants. However, on further review, if we allow this then
the `claim` transactions would need to change. Since it's hard to see a
use case for two doors to own the same bridge, this patch disallows
it. (The transaction will return tecDUPLICATE).
2023-10-02 07:49:33 -07:00
Scott Schurr
2bb8de030f fix: stabilize voting threshold for amendment majority mechanism (#4410)
Amendment "flapping" (an amendment repeatedly gaining and losing
majority) usually occurs when an amendment is on the verge of gaining
majority, and a validator not in favor of the amendment goes offline or
loses sync. This fix makes two changes:

1. The number of validators in the UNL determines the threshold required
   for an amendment to gain majority.
2. The AmendmentTable keeps a record of the most recent Amendment vote
   received from each trusted validator (and, with `trustChanged`, stays
   up-to-date when the set of trusted validators changes). If no
   validation arrives from a given validator, then the AmendmentTable
   assumes that the previously-received vote has not changed.

In other words, when missing an `STValidation` from a remote validator,
each server now uses the last vote seen. There is a 24 hour timeout for
recorded validator votes.

These changes do not require an amendment because they do not impact
transaction processing, but only the threshold at which each individual
validator decides to propose an EnableAmendment pseudo-transaction.

Fix #4350
2023-09-28 11:47:48 -07:00
Ed Hennis
b92d511558 fix(build): uint is not defined on Windows platform (#4731)
Fix the Windows build by using `unsigned int` (instead of `uint`).

The error, introduced by #4618, looks something like:
  rpc\impl\RPCHelpers.h(299,5): error C2061: syntax error: identifier
  'uint' (compiling source file app\ledger\Ledger.cpp)
2023-09-27 13:12:04 -07:00
Nik Bougalis
548c91ebb6 Eliminate the built-in SNTP support (fixes #4207): (#4628) 2023-09-26 17:35:31 -07:00
Elliot Lee
2c56d9fc3e Set version to 2.0.0-b2 2023-09-22 16:17:35 -07:00
John Freeman
6b61505ac2 fix: accept all valid currency codes in API (#4566)
A few methods, including `book_offers`, take currency codes as
parameters. The XRPL doesn't care if the letters in those codes are
lowercase or uppercase, as long as they come from an alphabet defined
internally. rippled doesn't care either, when they are submitted in a
hex representation. When they are submitted in an ASCII string
representation, rippled, but not XRPL, is more restrictive, preventing
clients from interacting with some currencies already in the XRPL.

This change gets rippled out of the way and lets clients submit currency
codes in ASCII using the full alphabet.

Fixes #4112
2023-09-22 16:07:43 -07:00
Bronek Kozicki
e4db0fba2b chore: add .build to .gitignore (#4722)
Currently, the `BUILD.md` instructions suggest using `.build` as the
build directory, so this change helps to reduce confusion.

An alternative would be to instruct developers to add `/.build/` to
`.git/info/exclude` or to user-level `.gitignore` (although the latter
is very intrusive). However, it is being added here because it is a good
practice to have a sensible default that's consistent with the build
instructions.
2023-09-22 16:01:00 -07:00
Gregory Tsipenyuk
8f89694fae Add ProtocolStart and GracefulClose P2P protocol messages (#3839)
Clean up the peer-to-peer protocol start/close sequences by introducing
START_PROTOCOL and GRACEFUL_CLOSE messages, which sync inbound/outbound
peer send/receive. The GRACEFUL_CLOSE message differentiates application
and link layer failures.

* Introduce the `InboundHandoff` class to manage inbound peer
  instantiation and synchronize the send/receive protocol messages
  between peers.
* Update `OverlayImpl` to utilize the `InboundHandoff` class to manage
  inbound handshakes.
* Update `PeerImp` for improved handling of protocol messages.
* Modify the `Message` class for better maintainability.
* Introduce P2P protocol version `2.3`.
2023-09-22 15:56:44 -07:00
ForwardSlashBack
5433e133d5 Fix typo in BUILD.md (#4718)
Co-authored-by: Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com>
2023-09-21 15:16:22 -07:00
Peter Chen
2487dab194 APIv2(gateway_balances, channel_authorize): update errors (#4618)
gateway_balances
* When `account` does not exist in the ledger, return `actNotFound`
  * (Previously, a normal response was returned)
  * Fix #4290
* When required field(s) are missing, return `invalidParams`
  * (Previously, `invalidHotWallet` was incorrectly returned)
  * Fix #4548

channel_authorize
* When the specified `key_type` is invalid, return `badKeyType`
  * (Previously, `invalidParams` was returned)
  * Fix #4289

Since these are breaking changes, they apply only to API version 2.

Supersedes #4577
2023-09-21 13:33:24 -07:00
John Freeman
77e0912a0e build: use Boost 1.82 and link Boost.Json (#4632)
Add Boost::json to the list of linked Boost libraries.

This seems to be required for macOS.
2023-09-21 08:58:39 -07:00
Chenna Keshava B S
a948203dae docs(overlay): add URL of blog post and clarify wording (#4635) 2023-09-18 22:00:59 -07:00
Elliot Lee
8f65bc24a0 docs(API-CHANGELOG): api_version 2 is expected with 2.0 (#4633)
* Also update for #4585
2023-09-18 21:59:47 -07:00
Elliot Lee
9f102fc99d docs(RELEASENOTES): update 1.12.0 notes to match dev blog (#4691)
* Reorganize some changelog entries
* Add note about portable binaries
* Dev blog: https://xrpl.org/blog
2023-09-18 21:57:25 -07:00
John Freeman
7bff9dc7f0 Update secp256k1 to 0.3.2 (#4653)
Copy the new code to `src/secp256k1` without changes:
`src/secp256k1` is identical to bitcoin-core/secp256k1@acf5c55 (v0.3.2).

We could consider changing to a Git submodule, though that would require
changes to the build instructions because we are not using submodules
anywhere else.
2023-09-18 13:26:14 -07:00
Chenna Keshava B S
e86181c096 docs: fix comment for LedgerHistory::fixIndex return value (#4574)
`LedgerHistory::fixIndex` returns `false` if a repair was performed.

Fix #4572
2023-09-18 10:01:43 -07:00
Ed Hennis
65df4bceaa fix: remove unused variable causing clang 14 build errors (#4672)
Removed the unused variable `none` from `Writer.cpp` which was causing
build errors on clang version 14.
2023-09-18 08:38:51 -07:00
Elliot Lee
3397922989 docs(BUILD): make it easier to find environment.md (#4507)
Make the instructions a bit easier to follow. Users on different
platforms can look for their platform name to find relevant information.
2023-09-15 21:54:25 -07:00
Elliot Lee
046d0c2f0a Set version to 2.0.0-b1 2023-09-15 08:55:09 -07:00
Michael Legleux
01fc4b0203 Revert CMake changes (#4707)
This was likely put back when #4292 was rebased.
2023-09-15 08:54:46 -07:00
Scott Determan
5b7d2c133a Change XChainBridge amendment to Supported::yes (#4709) 2023-09-15 08:54:39 -07:00
Scott Determan
237b406e8c Fix Windows build by removing two unused declarations (#4708)
Remove the `verify` and `message` function declarations. The explicit
instantiation requests could not be completed because there were no
implementations for those two member functions. It is helpful that the
Microsoft (MSVC) compiler on Windows appears to be strict when it comes
to template instantiation.

This resolves the warning:

  XChainAttestations.h(450): warning C4661: 'bool
  ripple::XChainAttestationsBase<ripple::XChainClaimAttestation>::verify(void)
  const': no suitable definition provided for explicit template
  instantiation request
2023-09-14 21:02:31 -07:00
Ed Hennis
5427321260 Match unit tests on start of test name (#4634)
* For example, without this change, to run the TxQ tests, must specify
  `--unittest=TxQ1,TxQ2` on the command line. With this change, can use
  `--unittest=TxQ`, and both will be run.
* An exact match will prevent any further partial matching.
* This could have some side effects for different tests with a common
  name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This
  might be useful. If not, the shorter-named test(s) can be renamed. For
  example, NFToken to NFTokens.
* Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds
  up parallel tests by a factor of 5.
2023-09-14 13:19:15 -07:00
Howard Hinnant
ce570c166d Revert ThreadName due to problems on Windows (#4702)
* Revert "Remove CurrentThreadName.h from RippledCore.cmake (#4697)"

This reverts commit 3b5fcd5873.

* Revert "Introduce replacement for getting and setting thread name: (#4312)"

This reverts commit 36cb5f90e2.
2023-09-14 13:16:50 -07:00
Scott Determan
649c11a78e XChainBridge: Introduce sidechain support (XLS-38): (#4292)
A bridge connects two blockchains: a locking chain and an issuing
chain (also called a mainchain and a sidechain). Both are independent
ledgers, with their own validators and potentially their own custom
transactions. Importantly, there is a way to move assets from the
locking chain to the issuing chain and a way to return those assets from
the issuing chain back to the locking chain: the bridge. This key
operation is called a cross-chain transfer. A cross-chain transfer is
not a single transaction. It happens on two chains, requires multiple
transactions, and involves an additional server type called a "witness".

A bridge does not exchange assets between two ledgers. Instead, it locks
assets on one ledger (the "locking chain") and represents those assets
with wrapped assets on another chain (the "issuing chain"). A good model
to keep in mind is a box with an infinite supply of wrapped assets.
Putting an asset from the locking chain into the box will release a
wrapped asset onto the issuing chain. Putting a wrapped asset from the
issuing chain back into the box will release one of the existing locking
chain assets back onto the locking chain. There is no other way to get
assets into or out of the box. Note that there is no way for the box to
"run out of" wrapped assets - it has an infinite supply.

Co-authored-by: Gregory Popovitch <greg7mdp@gmail.com>
2023-09-14 13:08:41 -07:00
Peter Chen
7fae1c1262 APIv2(account_tx, noripple_check): return error on invalid input (#4620)
For the `account_tx` and `noripple_check` methods, perform input
validation for optional parameters such as "binary", "forward",
"strict", "transactions". Previously, when these parameters had invalid
values (e.g. not a bool), no error would be returned. Now, it returns an
`invalidParams` error.

* This updates the behavior to match Clio
  (https://github.com/XRPLF/clio).
* Since this is potentially a breaking change, it only applies to
  requests specifying api_version: 2.
* Fix #4543.
2023-09-13 15:01:37 -07:00
Mark Travis
f259cc1ab6 Several changes to improve Consensus stability: (#4505)
* Verify accepted ledger becomes validated, and retry
   with a new consensus transaction set if not.
 * Always store proposals.
 * Track proposals by ledger sequence. This helps slow peers catch
   up with the rest of the network.
 * Acquire transaction sets for proposals with future ledger sequences.
   This also helps slow peers catch up.
 * Optimize timer delay for establish phase to wait based on how
   long validators have been sending proposals. This also helps slow
   peers to catch up.
 * Fix impasse achieving close time consensus.
 * Don't wait between open and establish phases.
2023-09-11 15:48:32 -07:00
Mark Travis
002893f280 Apply transaction batches in periodic intervals (#4504)
Add new transaction submission API field, "sync", which
determines behavior of the server while submitting transactions:
1) sync (default): Process transactions in a batch immediately,
   and return only once the transaction has been processed.
2) async: Put transaction into the batch for the next processing
   interval and return immediately.
3) wait: Put transaction into the batch for the next processing
   interval and return only after it is processed.
2023-09-11 15:47:40 -07:00
Mark Travis
1d9db1bfdd Asynchronously write batches to NuDB. (#4503) 2023-09-11 15:46:17 -07:00
Howard Hinnant
3b5fcd5873 Remove CurrentThreadName.h from RippledCore.cmake (#4697)
(File was already removed from the source)
2023-09-11 15:41:54 -07:00
Elliot Lee
a95505739d docs: update SECURITY.md (#4338) 2023-09-08 13:51:23 -07:00
Mayukha Vadari
31c8281922 refactor: simplify TxFormats common fields logic (#4637)
Minor refactor to `TxFormats.cpp`:
- Rename `commonFields` to `pseudoCommonFields` (since it is the common fields
  that all pseudo-transactions need)
- Add a new static variable, `commonFields`, which represents all the common
  fields that non-pseudo transactions need (essentially everything that
  `pseudoCommonFields` contains, plus `sfTicketSequence`)

This makes it harder to accidentally leave out `sfTicketSequence` in a new
transaction.
2023-09-08 10:24:51 -07:00
Peter Chen
c6f6375015 APIv2(ledger_entry): return invalidParams for bad parameters (#4630)
- Verify "check", used to retrieve a Check object, is a string.
- Verify "nft_page", used to retrieve an NFT Page, is a string.
- Verify "index", used to retrieve any type of ledger object by its
  unique ID, is a string.
- Verify "directory", used to retrieve a DirectoryNode, is a string or
  an object.

This change only impacts api_version 2 since it is a breaking change.

https://xrpl.org/ledger_entry.html

Fix #4550
2023-09-07 22:47:04 -07:00
Mark Pevec
6f74a745db docs(rippled-example.cfg): clarify ssl_cert vs ssl_chain (#4667)
Clarify usage of ssl_cert vs ssl_chain
2023-09-07 15:19:05 -07:00
Howard Hinnant
36cb5f90e2 Introduce replacement for getting and setting thread name: (#4312)
* In namespace ripple, introduces get_name function that takes a
  std:🧵:native_handle_type and returns a std::string.
* In namespace ripple, introduces get_name function that takes a
  std::thread or std::jthread and returns a std::string.
* In namespace ripple::this_thread, introduces get_name function
  that takes no parameters and returns the name of the current
  thread as a std::string.
* In namespace ripple::this_thread, introduces set_name function
  that takes a std::string_view and sets the name of the current
  thread.
* Intended to replace the beast utilities setCurrentThreadName
  and getCurrentThreadName.
2023-09-07 11:44:36 -07:00
Manoj Doshi
89780c8e4f Set version to 1.12.0 2023-09-06 13:58:34 -07:00
Elliot Lee
9d4d8c22d9 Set version to 1.12.0-rc4 2023-09-01 15:53:10 -07:00
Gregory Tsipenyuk
b014b79d88 amm_info: fetch by amm account id; add AMM object entry (#4682)
- Update amm_info to fetch AMM by amm account id.
  - This is an additional way to retrieve an AMM object.
  - Alternatively, AMM can still be fetched by the asset pair as well.
- Add owner directory entry for AMM object.

Context:

- Add back the AMM object directory entry, which was deleted by #4626.
  - This fixes `account_objects` for `amm` type.
2023-09-01 15:50:58 -07:00
Rome Reginelli
a61a88ea81 AMMBid: use tecINTERNAL for 'impossible' errors (#4674)
Modify two error cases in AMMBid transactor to return `tecINTERNAL` to
more clearly indicate that these errors should not be possible unless
operating in unforeseen circumstances. It likely indicates a bug.

The log level has been updated to `fatal()` since it indicates a
(potentially network-wide) unexpected condition when either of these
errors occurs.

Details:

The two specific transaction error cases changed are:

- `tecAMM_BALANCE` - In this case, this error (total LP Tokens
  outstanding is lower than the amount to be burned for the bid) is a
  subset of the case where the user doesn't have enough LP Tokens to pay
  for the bid. When this case is reached, the bidder's LP Tokens balance
  has already been checked first. The user's LP Tokens should always be
  a subset of total LP Tokens issued, so this should be impossible.
- `tecINSUFFICIENT_PAYMENT` - In this case, the amount to be refunded as
  a result of the bid is greater than the price paid for the auction
  slot. This should never occur unless something is wrong with the math
  for calculating the refund amount.

Both error cases in question are "defense in depth" measures meant to
protect against making things worse if the code has already reached a
state that is supposed to be impossible, likely due to a bug elsewhere.

Such "shouldn't ever occur" checks should use an error code that
categorically indicates a larger problem. This is similar to how
`tecINVARIANT_FAILED` is a warning sign that something went wrong and
likely could've been worse, but since there isn't an Invariant Check
applying here, `tecINTERNAL` is the appropriate error code.

This is "debatably" a transaction processing change since it could
hypothetically change how transactions are processed if there's a bug we
don't know about.
2023-09-01 13:44:48 -07:00
Elliot Lee
f31c50d04d Set version to 1.12.0-rc3 2023-08-30 15:47:07 -07:00
Elliot Lee
8ceb0f3a79 Revert "Asynchronously write batches to NuDB (#4503)"
This reverts commit 21c4aaf993.
2023-08-30 15:46:24 -07:00
Elliot Lee
d943c58b3d Revert "Apply transaction batches in periodic intervals (#4504)"
This reverts commit b580049ec0.
2023-08-30 15:46:12 -07:00
Elliot Lee
7ca1c644d1 Revert "Several changes to improve Consensus stability: (#4505)"
This reverts commit e8a7b2a1fc.
2023-08-29 16:52:31 -07:00
Manoj Doshi
300b7e078a Set version to 1.12.0-rc1 2023-08-21 16:23:06 -07:00
manoj
3574956e5e Set version to 1.12-b3
Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:38 -07:00
Mark Travis
e8a7b2a1fc Several changes to improve Consensus stability: (#4505)
* Verify accepted ledger becomes validated, and retry
   with a new consensus transaction set if not.
 * Always store proposals.
 * Track proposals by ledger sequence. This helps slow peers catch
   up with the rest of the network.
 * Acquire transaction sets for proposals with future ledger sequences.
   This also helps slow peers catch up.
 * Optimize timer delay for establish phase to wait based on how
   long validators have been sending proposals. This also helps slow
   peers to catch up.
 * Fix impasse achieving close time consensus.
 * Don't wait between open and establish phases.
2023-08-21 16:15:31 -07:00
Mark Travis
b580049ec0 Apply transaction batches in periodic intervals (#4504)
Add new transaction submission API field, "sync", which
determines behavior of the server while submitting transactions:
1) sync (default): Process transactions in a batch immediately,
   and return only once the transaction has been processed.
2) async: Put transaction into the batch for the next processing
   interval and return immediately.
3) wait: Put transaction into the batch for the next processing
   interval and return only after it is processed.
2023-08-21 16:15:31 -07:00
Mark Travis
21c4aaf993 Asynchronously write batches to NuDB (#4503) 2023-08-21 16:15:31 -07:00
Ikko Eltociear Ashimine
213491d94b refactor: fix typo in FeeUnits.h (#4644)
covert -> convert
2023-08-21 16:15:31 -07:00
Michael Legleux
da203b241b Update Ubuntu build image (#4650) 2023-08-21 16:15:31 -07:00
Arihant Kothari
5d88b726c2 test: add forAllApiVersions helper function (#4611)
Introduce a new variadic template helper function, `forAllApiVersions`,
that accepts callables to execute a set of functions over a range of
versions - from RPC::apiMinimumSupportedVersion to RPC::apiBetaVersion.
This avoids the duplication of code.

Context: #4552
2023-08-21 16:15:31 -07:00
Mayukha Vadari
dcb7dd8d27 add view updates for account SLEs (#4629)
Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:31 -07:00
John Freeman
91e9658217 Fix the package recipe for consumers of libxrpl (#4631)
- "Rename" the type `LedgerInfo` to `LedgerHeader` (but leave an alias
  for `LedgerInfo` to not yet disturb existing uses). Put it in its own
  public header, named after itself, so that it is more easily found.
- Move the type `Fees` and NFT serialization functions into public
  (installed) headers.
- Compile the XRPL and gRPC protocol buffers directly into `libxrpl` and
  install their headers. Fix the Conan recipe to correctly export these
  types.

Addresses change (2) in
https://github.com/XRPLF/XRPL-Standards/discussions/121.

For context: This work supports Clio's dependence on libxrpl. Clio is
just an example consumer. These changes should benefit all current and
future consumers.

---------

Co-authored-by: cyan317 <120398799+cindyyan317@users.noreply.github.com>
Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:31 -07:00
Alphonse Noni Mousse
b28f62bbd9 refactor: improve checking of path lengths (#4519)
Improve the checking of the path lengths during Payments. Previously,
the code that did the check of the payment path lengths was sometimes
executed, but without any effect. This changes it to only check when it
matters, and to not make unnecessary copies of the path vectors.

Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:30 -07:00
Alphonse N. Mousse
4f4951022c refactor: use C++20 function std::popcount (#4389)
- Replace custom popcnt16 implementation with std::popcount from C++20
- Maintain compatibility with older compilers and MacOS by providing a
  conditional compilation fallback to __builtin_popcount and a lookup
  table method
- Move and inline related functions within SHAMapInnerNode for
  performance and readability

Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:30 -07:00
Gregory Tsipenyuk
58f7aecb0b fix(AMM): prevent orphaned objects, inconsistent ledger state: (#4626)
When an AMM account is deleted, the owner directory entries must be
deleted in order to ensure consistent ledger state.

* When deleting AMM account:
  * Clean up AMM owner dir, linking AMM account and AMM object
  * Delete trust lines to AMM
* Disallow `CheckCreate` to AMM accounts
  * AMM cannot cash a check
* Constrain entries in AuthAccounts array to be accounts
  * AuthAccounts is an array of objects for the AMMBid transaction
* SetTrust (TrustSet): Allow on AMM only for LP tokens
  * If the destination is an AMM account and the trust line doesn't
    exist, then:
    * If the asset is not the AMM LP token, then fail the tx with
      `tecNO_PERMISSION`
    * If the AMM is in empty state, then fail the tx with `tecAMM_EMPTY`
      * This disallows trustlines to AMM in empty state
* Add AMMID to AMM root account
  * Remove lsfAMM flag and use sfAMMID instead
* Remove owner dir entry for ltAMM
* Add `AMMDelete` transaction type to handle amortized deletion
  * Limit number of trust lines to delete on final withdraw + AMMDelete
  * Put AMM in empty state when LPTokens is 0 upon final withdraw
  * Add `tfTwoAssetIfEmpty` deposit option in AMM empty state
  * Fail all AMM transactions in AMM empty state except special deposit
  * Add `tecINCOMPLETE` to indicate that not all AMM trust lines are
    deleted (i.e. partial deletion)
    * This is handled in Transactor similar to deleted offers
  * Fail AMMDelete with `tecINTERNAL` if AMM root account is nullptr
  * Don't validate for invalid asset pair in AMMDelete
* AMMWithdraw deletes AMM trust lines and AMM account/object only if the
  number of trust lines is less than max
  * Current `maxDeletableAMMTrustLines` = 512
  * Check no directory left after AMM trust lines are deleted
  * Enable partial trustline deletion in AMMWithdraw
* Add `tecAMM_NOT_EMPTY` to fail any transaction that expects an AMM in
  empty state
* Clawback considerations
  * Disallow clawback out of AMM account
  * Disallow AMM create if issuer can claw back

This patch applies to the AMM implementation in #4294.

Acknowledgements:
Richard Holland and Nik Bougalis for responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the project code and urge researchers to
responsibly disclose any issues they may find.

To report a bug, please send a detailed report to:

    bugs@xrpl.org

Signed-off-by: Manoj Doshi <mdoshi@ripple.com>
2023-08-21 16:15:08 -07:00
RichardAH
5530a0b665 feat: support Concise Transaction Identifier (CTID) (XLS-37) (#4418)
* add CTIM to tx rpc


---------

Co-authored-by: Rome Reginelli <mduo13@gmail.com>
Co-authored-by: Elliot Lee <github.public@intelliot.com>
Co-authored-by: Denis Angell <dangell@transia.co>
2023-08-17 18:43:47 -07:00
Elliot Lee
aded4a7a92 docs: add API Changelog (#4612)
Introduce an API Changelog, which logs the changes that have been made
to the API.

Without this changelog, it is difficult to keep track of the changes and
additions that are made to the API. While all changes are surfaced in
PRs and Release Notes, these are mixed in with other non-API-affecting
changes. PRs that affect the API have the `API Change` label applied,
but it is hard to identify which PRs have been included in each release.
Furthermore, some API changes will take effect based on `api_version`
(starting with rippled version 1.12, which will introduce `api_version:
2`), while others are based on the `rippled` version.

The API Changelog clarifies the details of the changes in a way that is
easily understood by API consumers, and breaks down the changes to be
clear which ones are gated by api_version (versus `rippled` version).

From now on, all PR authors are responsible for updating the API
Changelog according to the additions/changes that their PR makes to the
APIs.
2023-07-19 14:03:26 -07:00
Elliot Lee
01df19c08b Set version to 1.12.0-b2 2023-07-18 11:57:56 -07:00
Elliot Lee
c197c4cdd9 BUILD: list steps after dependencies update (#4623)
After dependencies update, developers may need to effectively "start
over" with the build steps.
2023-07-17 22:16:42 -07:00
Shawn Xie
5ba1f984df Rename allowClawback flag to allowTrustLineClawback (#4617)
Reason for this change is here XRPLF/XRPL-Standards#119

We would want to be explicit that this flag is exclusively for trustline. For new token types(eg. CFT), they will not utilize this flag for clawback, instead, they will turn clawback on/off on the token-level, which is more versatile.
2023-07-13 18:00:32 -07:00
John Freeman
cb09e61d2f Update dependencies (#4595)
Use the most recent versions in ConanCenter.

* Due to a bug in Clang 16, you may get a compile error:
  "call to 'async_teardown' is ambiguous"
  * A compiler flag workaround is documented in `BUILD.md`.
* At this time, building this with gcc 13 may require editing some files
  in `.conan/data`
  * A patch to support gcc13 may be added in a later PR.

---------

Co-authored-by: Scott Schurr <scott@ripple.com>
2023-07-13 13:25:08 -04:00
Gregory Tsipenyuk
3c9db4b69e Introduce AMM support (XLS-30d): (#4294)
Add AMM functionality:
- InstanceCreate
- Deposit
- Withdraw
- Governance
- Auctioning
- payment engine integration

To support this functionality, add:
- New RPC method, `amm_info`, to fetch pool and LPT balances
- AMM Root Account
- trust line for each IOU AMM token
- trust line to track Liquidity Provider Tokens (LPT)
- `ltAMM` object

The `ltAMM` object tracks:
- fee votes
- auction slot bids
- AMM tokens pair
- total outstanding tokens balance
- `AMMID` to AMM `RootAccountID` mapping

Add new classes to facilitate AMM integration into the payment engine.
`BookStep` uses these classes to infer if AMM liquidity can be consumed.

The AMM formula implementation uses the new Number class added in #4192.
IOUAmount and STAmount use Number arithmetic.

Add AMM unit tests for all features.

AMM requires the following amendments:
- featureAMM
- fixUniversalNumber
- featureFlowCross

Notes:
- Current trading fee threshold is 1%
- AMM currency is generated by: 0x03 + 152 bits of sha256{cur1, cur2}
- Current max AMM Offers is 30

---------

Co-authored-by: Howard Hinnant <howard.hinnant@gmail.com>
2023-07-12 13:52:50 -04:00
John Freeman
eeb8b41889 Adapt to change in Conan recipe for NuDB (#4615)
The recipe was updated a few days ago and the exported library target was renamed.
2023-07-11 16:26:15 -05:00
Elliot Lee
f7dd37e355 docs(CONTRIBUTING): push beta releases to release (#4589)
Sections that were rewrapped were wrapped to 72 characters, the same as
the recommendation for commit messages.
2023-07-07 14:31:09 -07:00
Arihant Kothari
a45a95e5ea APIv2(ledger_entry): return "invalidParams" when fields missing (#4552)
Improve error handling for ledger_entry by returning an "invalidParams"
error when one or more request fields are specified incorrectly, or one
or more required fields are missing.

For example, if none of of the following fields is provided, then the
API should return an invalidParams error:
* index, account_root, directory, offer, ripple_state, check, escrow,
  payment_channel, deposit_preauth, ticket

Prior to this commit, the API returned an "unknownOption" error instead.
Since the error was actually due to invalid parameters, rather than
unknown options, this error was misleading.

Since this is an API breaking change, the "invalidParams" error is only
returned for requests using api_version: 2 and above. To maintain
backward compatibility, the "unknownOption" error is still returned for
api_version: 1.

Related: #4573

Fix #4303
2023-07-06 11:58:53 -07:00
Chenna Keshava B S
c6fee28b92 refactor: change the return type of mulDiv to std::optional (#4243)
- Previously, mulDiv had `std::pair<bool, uint64_t>` as the output type.
  - This is an error-prone interface as it is easy to ignore when
    overflow occurs.
- Using a return type of `std::optional` should decrease the likelihood
  of ignoring overflow.
  - It also allows for the use of optional::value_or() as a way to
    explicitly recover from overflow.
- Include limits.h header file preprocessing directive in order to
  satisfy gcc's numeric_limits incomplete_type requirement.

Fix #3495

---------

Co-authored-by: John Freeman <jfreeman08@gmail.com>
2023-07-05 20:11:19 -07:00
Shawn Xie
77dc63b549 fix: add allowClawback flag for account_info (#4590)
* Update the `account_info` API so that the `allowClawback` flag is
  included in the response.
  * The proposed `Clawback` amendement added an `allowClawback` flag in
    the `AccountRoot` object.
  * In the API response, under `account_flags`, there is now an
    `allowClawback` field with a boolean (`true` or `false`) value.
  * For reference, the XLS-39 Clawback implementation can be found in
    #4553

Fix #4588
2023-07-05 08:46:23 -07:00
John Freeman
66bfe909e6 build: add binary hardening compile and link flags (#4603)
Enhance security during the build process:

* The '-fstack-protector' flag enables stack protection for preventing
  buffer overflow vulnerabilities. If an attempt is made to overflow the
  buffer, the program will terminate, thus protecting the integrity of
  the stack.
* The '-Wl,-z,relro,-z,now' linker flag enables Read-only Relocations
  (RELRO), a feature that helps harden the binary against certain types
  of exploits, particularly those that involve overwriting the Global
  Offset Table (GOT).
  * This flag is only set for Linux builds, due to compatibility issues
    with apple-clang.
  * The `relro` option makes certain sections of memory read-only after
    initialization to prevent them from being overwritten, while `now`
    ensures that all dynamic symbols are resolved immediately on program
    start, reducing the window of opportunity for attacks.
2023-07-03 07:41:12 -07:00
Mayukha Vadari
9c50415ebe add clang-format pre-commit hook (#4599)
* Add a new YAML file (.pre-commit-config.yaml) to set up pre-commit
  hook for clang-format
  * The pre-commit hook is opt-in and needs to be installed in order to
    run automatically
* Update CONTRIBUTING.md with instructions on how to set up and use the
  clang-format linter

Automating the process of running clang-format before committing code
helps to save time by removing the need to fix formatting issues later.

This is a tooling improvement and doesn't change C++ code.
2023-07-01 15:23:57 -07:00
Ed Hennis
516ffb2147 chore: update checkout action version to v3: (#4598)
* Update the version of the checkout action (for GitHub Actions) in
  `clang-format.yml` and `levelization.yml`.
  * The previous version, v2, was raising deprecation warnings due to
    its reliance on Node.js 12.
  * The latest checkout action version, v3, uses Node.js 16.
2023-07-01 00:13:37 -07:00
Peter Chen
f18c6dfea7 APIv2(account_info): handle invalid "signer_lists" value (#4585)
When requesting `account_info` with an invalid `signer_lists` value, the
API should return an "invalidParams" error.

`signer_lists` should have a value of type boolean. If it is not a
boolean, then it is invalid input. The response now indicates that.

* This is an API breaking change, so the change is only reflected for
  requests containing `"api_version": 2`
* Fix #4539
2023-06-29 23:05:21 -07:00
Michael Legleux
1cb67fbd20 fix: deb package build (#4591)
The debug packages were named with the extension ".ddeb", but due to a
bug in Artifactory, they need to have the ".deb" extension. Debug symbol
packages with ".ddeb" extensions are not indexed, and thus are not
visible in apt clients.

* Fix the issue by renaming the debug packages in the build script.
* Use GCC-11 and update GCC Conan profile.
  * This software requires GCC 11 and C++20. However, reporting mode is
    built with C++17.

This is a quick band-aid to fix the build. Later, it will be better to
remove this package-building code.

For context, a Debian (deb) package contains bundled software and
resources necessary for installing and managing software on a
Debian-based system, including Ubuntu and derivatives.
2023-06-29 20:15:11 -07:00
John Freeman
54afdaa101 ci: cancel overridden workflows (#4597)
Small quality-of-life improvements to workflows using new concurrency
control features:

https://docs.github.com/en/actions/using-jobs/using-concurrency

At time of this commit, macOS runners are oversubscribed. This may help.
2023-06-29 15:31:36 -07:00
Chenna Keshava B S
1c2ae10dc0 fix: Update Handler::Condition enum values #3417 (#4239)
- Use powers of two to clearly indicate the bitmask
- Replace bitmask with explicit if-conditions to better indicate predicates

Change enum values to be powers of two (fix #3417) #4239

Implement the simplified condition evaluation
removes the complex bitwise and(&) operator
Implement the second proposed solution in Nik Bougalis's comment - Software does not distinguish between different Conditions (Version: 1.5) #3417 (comment)
I have tested this code change by performing RPC calls with the commands server_info, server_state, peers and validation_info. These commands worked as expected.
2023-06-29 09:12:15 -07:00
Peter Chen
d34e8be316 APIv2: add error messages for account_tx (#4571)
Certain inputs for the AccountTx method should return an error. In other
words, an invalid request from a user or client now results in an error
message.

Since this can change the response from the API, it is an API breaking
change. This commit maintains backward compatibility by keeping the
existing behavior for existing requests. When clients specify
"api_version": 2, they will be able to get the updated error messages.

Update unit tests to check the error based on the API version.

* Fix #4288
* Fix #4545
2023-06-29 08:41:13 -07:00
Ed Hennis
4111382a31 Fix build references to deleted ServerHandlerImp: (#4592)
* Commits 0b812cd (#4427) and 11e914f (#4516) conflict. The first added
  references to `ServerHandlerImp` in files outside of that class's
  organizational unit (which is technically incorrect). The second
  removed `ServerHandlerImp`, but was not up to date with develop. This
  results in the build failing.
* Fixes the build by changing references to `ServerHandlerImp` to
  the more correct `ServerHandler`.
2023-06-28 13:23:12 -07:00
Scott Schurr
11e914fbe9 refactor: rename ServerHandlerImp to ServerHandler (#4516)
Rename `ServerHandlerImp` to `ServerHandler`. There was no other
ServerHandler definition despite the existence of a header suggesting
that there was.

This resolves a piece of historical confusion in the code, which was
identified during a code review.

The changes in the diff may look more extensive than they actually are.
The contents of `impl/ServerHandlerImp.h` were merged into
`ServerHandler.h`, making the latter file appear to have undergone
significant modifications. However, this is a non-breaking refactor that
only restructures code.
2023-06-27 17:57:52 -07:00
Chenna Keshava B S
0e983528e1 fix: remove deprecated fields in ledger method (#4244)
Remove deprecated fields from the ledger command:
* accepted
* hash (use ledger_hash instead)
* seqNum (use ledger_index instead)
* totalCoins (use total_coins instead)

Update SHAMapStore unit tests to use `jss:ledger_hash` instead of the
deprecated `hash` field.

Fix #3214
2023-06-27 17:52:15 -07:00
John Freeman
6b4437db39 Fix package definition for Conan (#4485)
Fix the libxrpl library target for consumers using Conan.

* Fix installation issues and update includes.
* Update requirements in the Conan package info.
  * libxrpl requires openssl::crypto.

(Conan is a software package manager for C++.)
2023-06-27 01:23:52 -07:00
Denis Angell
534a36536c refactor: replace hand-rolled lexicalCast (#4473)
Replace hand-rolled code with std::from_chars for better
maintainability.

The C++ std::from_chars function is intended to be as fast as possible,
so it is unlikely to be slower than the code it replaces. This change is
a net gain because it reduces the amount of hand-rolled code.
2023-06-26 23:50:03 -07:00
Elliot Lee
beba87129e Set version to 1.12.0-b1 2023-06-26 14:24:00 -07:00
Shawn Xie
b7e902dccc XLS-39 Clawback: (#4553)
Introduces:
* AccountRoot flag: lsfAllowClawback
* New Clawback transaction
* More info on clawback spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-39d-clawback
2023-06-26 14:07:20 -07:00
Howard Hinnant
9eb30d4316 refactor: remove TypedField's move constructor (#4567)
Apply a minor cleanup in `TypedField`:
* Remove a non-working and unused move constructor.
* Constrain the remaining constructor to not be overly generic enough as
  to be used as a copy or move constructor.
2023-06-26 12:32:10 -07:00
John Freeman
8fdad0d7fd ci: use Artifactory remote in nix workflow (#4556)
There is now an Artifactory (thanks @shichengripple001 and team!) to
hold dependency binaries for the builds.

* Rewrite the `nix` workflow to use it and cut the time down to a mere
  21 minutes.
  * This workflow should continue to work (just more slowly) for forks
    that do not have access to the Artifactory.
2023-06-23 14:20:20 -07:00
drlongle
0b812cdece Add RPC/WS ports to server_info (#4427)
Enhance the /crawl endpoint by publishing WebSocket/RPC ports in the
server_info response. The function processing requests to the /crawl
endpoint actually calls server_info internally, so this change enables a
server to advertise its WebSocket/RPC port(s) to peers via the /crawl
endpoint. `grpc` and `peer` ports are included as well.

The new `ports` array contains objects, each containing a `port` for the
listening port (number string), and an array `protocol` listing the
supported protocol(s).

This allows crawlers to build a richer topology without needing to
port-scan nodes. For non-admin users (including peers), the info about
*admin* ports is excluded.

Also increase test coverage for RPC ServerInfo.

Fix #2837.
2023-06-23 10:19:26 -07:00
Scott Schurr
724a301599 fixReducedOffersV1: prevent offers from blocking order books: (#4512)
Curtail the occurrence of order books that are blocked by reduced offers
with the implementation of the fixReducedOffersV1 amendment.

This commit identifies three ways in which offers can be reduced:

1. A new offer can be partially crossed by existing offers, so the new
   offer is reduced when placed in the ledger.

2. An in-ledger offer can be partially crossed by a new offer in a
   transaction. So the in-ledger offer is reduced by the new offer.

3. An in-ledger offer may be under-funded. In this case the in-ledger
   offer is scaled down to match the available funds.

Reduced offers can block order books if the effective quality of the
reduced offer is worse than the quality of the original offer (from the
perspective of the taker). It turns out that, for small values, the
quality of the reduced offer can be significantly affected by the
rounding mode used during scaling computations.

This commit adjusts some rounding modes so that the quality of a reduced
offer is always at least as good (from the taker's perspective) as the
original offer.

The amendment is titled fixReducedOffersV1 because additional ways of
producing reduced offers may come to light. Therefore, there may be a
future need for a V2 amendment.
2023-06-22 22:20:25 -07:00
Ed Hennis
71d7d67fa3 Enable the Beta RPC API (v2) for all unit tests: (#4573)
* Enable api_version 2, which is currently in beta. It is expected to be
  marked stable by the next stable release.
* This does not change any defaults.
* The only existing tests changed were one that set the same flag, which
  was now redundant, and a couple that tested versioning explicitly.
2023-06-21 11:51:37 -07:00
Elliot Lee
264280edd7 Set version to 1.11.0
* Add release notes
2023-06-20 11:40:11 -07:00
Elliot Lee
beb0904a32 Set version to 1.11.0-rc3 2023-06-09 17:34:40 -07:00
Chenna Keshava B S
77c0a62a74 fix: remove redundant moves (#4565)
- Resolve gcc compiler warning:
      AccountObjects.cpp:182:47: warning: redundant move in initialization [-Wredundant-move]
  - The std::move() operation on trivially copyable types may generate a
    compile warning in newer versions of gcc.
- Remove extraneous header (unused imports) from a unit test file.
2023-06-09 17:33:28 -07:00
Denis Angell
5d011c7e6b fix node size estimation (#4536)
Fix a bug in the `NODE_SIZE` auto-detection feature in `Config.cpp`.
Specifically, this patch corrects the calculation for the total amount
of RAM available, which was previously returned in bytes, but is now
being returned in units of the system's memory unit. Additionally, the
patch adjusts the node size based on the number of available hardware
threads of execution.
2023-06-09 09:37:18 -07:00
Scott Schurr
5644c8704f Trivial: add comments for NFToken-related invariants (#4558) 2023-06-08 17:31:19 -07:00
Scott Determan
c9a586c243 Add missing includes for gcc 13.1: (#4555)
gcc 13.1 failed to compile due to missing headers. This patch adds the
needed headers.
2023-06-05 15:50:03 -07:00
Scott Determan
f709311762 Fix unaligned load and stores: (#4528) (#4531)
Misaligned load and store operations are supported by both Intel and ARM
CPUs. However, in C++, these operations are undefined behavior (UB).
Substituting these operations with a `memcpy` fixes this UB. The
compiled assembly code is equivalent to the original, so there is no
performance penalty to using memcpy.

For context: The unaligned load and store operations fixed here were
originally introduced in the slab allocator (#4218).
2023-05-31 13:28:33 -07:00
oeggert
adde0c2d11 docs(BUILD): restructure content for better readability (#4514)
Follow-up to discussion #4433
2023-05-31 11:55:47 -07:00
Elliot Lee
adf672ff83 docs(README): add link to Clio (#4535) 2023-05-30 09:48:12 -07:00
Elliot Lee
029580886e Set version to 1.11.0-rc2 2023-05-23 14:29:51 -07:00
Ed Hennis
32f8ae1af1 Move faulty assert (#4533)
This assert was put in the wrong place, but it only triggers if shards
are configured. This change moves the assert to the right place and
updates it to ensure correctness.

The assert could be hit after the server downloads some shards. It may
be necessary to restart after the shards are downloaded.

Note that asserts are normally checked only in debug builds, so release
packages should not be affected.

Introduced in: #4319 (66627b26cf)
2023-05-23 14:25:18 -07:00
Scott Determan
ce997a6de8 Ensure that switchover vars are initialized before use: (#4527)
Global variables in different TUs are initialized in an undefined order.
At least one global variable was accessing a global switchover variable.
This caused the switchover variable to be accessed in an uninitialized
state.

Since the switchover is always explicitly set before transaction
processing, this bug can not effect transaction processing, but could
effect unit tests (and potentially the value of some global variables).
Note: at the time of this patch the offending bug is not yet in
production.
2023-05-22 19:36:46 -07:00
Shawn Xie
3620ac287e Add nftoken_id, nftoken_ids, offer_id fields for NFTokens (#4447)
Three new fields are added to the `Tx` responses for NFTs:

1. `nftoken_id`: This field is included in the `Tx` responses for
   `NFTokenMint` and `NFTokenAcceptOffer`. This field indicates the
   `NFTokenID` for the `NFToken` that was modified on the ledger by the
   transaction.
2. `nftoken_ids`: This array is included in the `Tx` response for
   `NFTokenCancelOffer`. This field provides a list of all the
   `NFTokenID`s for the `NFToken`s that were modified on the ledger by
   the transaction.
3. `offer_id`: This field is included in the `Tx` response for
   `NFTokenCreateOffer` transactions and shows the OfferID of the
   `NFTokenOffer` created.

The fields make it easier to track specific tokens and offers. The
implementation includes code (by @ledhed2222) from the Clio project to
extract NFTokenIDs from mint transactions.
2023-05-18 16:38:18 -07:00
John Freeman
629ed5c691 Switch to self-hosted runners for macOS (#4511) 2023-05-17 14:51:42 -07:00
drlongle
78076a6903 fix!: Prevent API from accepting seed or public key for account (#4404)
The API would allow seeds (and public keys) to be used in place of
accounts at several locations in the API. For example, when calling
account_info, you could pass `"account": "foo"`. The string "foo" is
treated like a seed, so the method returns `actNotFound` (instead of
`actMalformed`, as most developers would expect). In the early days,
this was a convenience to make testing easier. However, it allows for
poor security practices, so it is no longer a good idea. Allowing a
secret or passphrase is now considered a bug. Previously, it was
controlled by the `strict` option on some methods. With this commit,
since the API does not interpret `account` as `seed`, the option
`strict` is no longer needed and is removed.

Removing this behavior from the API is a [breaking
change](https://xrpl.org/request-formatting.html#breaking-changes). One
could argue that it shouldn't be done without bumping the API version;
however, in this instance, there is no evidence that anyone is using the
API in the "legacy" way. Furthermore, it is a potential security hole,
as it allows users to send secrets to places where they are not needed,
where they could end up in logs, error messages, etc. There's no reason
to take such a risk with a seed/secret, since only the public address is
needed.

Resolves: #3329, #3330, #4337

BREAKING CHANGE: Remove non-strict account parsing (#3330)
2023-05-16 17:22:10 -07:00
David Fuelling
67238b9fa6 Update environment.md build doc to install lzma: (#4498)
On macOS, if you have not installed something that depends on `xz`, then your
system may lack `lzma`, resulting in a build error similar to:

```
Downloading libarchive-3.6.0.tar.xz completed [6250.61k]
libarchive/3.6.0: 
ERROR: libarchive/3.6.0: Error in source() method, line 120
        get(self, **self.conan_data["sources"][self.version], strip_root=True)
        ReadError: file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: CompressionError('lzma module is not available')
- method tar: ReadError('invalid header')
```

The solution is to ensure that `lzma` is installed by installing `xz`.
2023-04-27 10:18:59 -07:00
John Freeman
c7ef4c9783 Add patched recipe for SOCI: (#4510)
SOCI is the C++ database access library. The SOCI recipe was updated in
Conan Center Index (CCI), and it breaks for our choice of options. This
breakage occurs when you build with a fresh Conan cache (e.g. when you
submit a PR, or delete `~/.conan/data`).

* Add a custom Conan recipe for SOCI v4.0.3
* Update dependency building to handle exporting and installing Snappy
  and SOCI
  * Fix workflows to use custom SOCI recipe
* Update BUILD.md to include instruction for exporting the SOCI Conan
  recipe:
  * `conan export external/soci soci/4.0.3@`

This solution has been verified on Ubuntu 20.04 and macOS.

Context:

* There is a compiler error that the `sqlite3.h` header is not available
  when building soci.
* When package B depends on package A, it finds the pieces it needs by
  importing the Package Configuration File (PCF) that Conan generates
  for package A.
  * Read the CMake written by package B to check that it is importing
    the PCF correctly and linking its exports correctly.
  * Since this can be difficult, it is often more efficient to check
    https://github.com/conan-io/conan-center-index/issues for package B
    to see if anyone else has seen a similar problem.
  * One of the issues points to a problem area in soci's CMake. To
    confirm the diagnosis, review soci's CMake (after any patches are
    applied) in the Conan build directory `build/$buildId/src/`.
  * Review the Conan-generated PCF in
    `build/$buildId/build/$buildType/generators/`.
  * In this case, the problem was likely (re)introduced by
    https://github.com/conan-io/conan-center-index/pull/17026
* If there is a problem in the source or in the Conan recipe, the
  fastest fix is to copy the recipe and either:
  * Add a source patch to fix any problems in the source.
  * Change the recipe to fix any problems in the recipe.
* In this case, this can be done by finding soci's Conan recipe at
  https://github.com/conan-io/conan-center-index/tree/master/recipes/soci
  and then copying the `all` directory as `external/$packageName` in our
  project. Then, make any changes.
  * Test packages can be removed from the recipe folder as they are not
    needed.
  * If adding a patch in the `patches` directory, add a description for
    it to `conandata.yml`.
  * Since `conanfile.py` has no `version` property on the recipe class,
    builders need to pass a version on the command line (like they do
    for our `snappy` recipe).
* Add an example command to `BUILD.md`.

Future work: It may make sense to refer to recipes by revision, by
checking in a lockfile.
2023-04-25 22:24:41 -07:00
solmsted
b21a05d465 Fix typo (#4508) 2023-04-25 14:11:08 -07:00
John Freeman
436de0e03a Expand Linux test matrix: (#4454)
This change makes progress on the plan in #4371. It does not replicate
the full [matrix] implemented in #3851, but it does replicate the 1.ii
section of the Linux matrix. It leverages "heavy" self-hosted runners,
and demonstrates a repeatable pattern for future matrices.

[matrix]: d794a0f3f1/.github/README.md (continuous-integration)
2023-04-24 16:17:51 -07:00
John Freeman
8d482d3557 Fix errors for Clang 16: (#4501)
Address issues related to the removal of `std::{u,bi}nary_function` in
C++17 and some warnings with Clang 16. Some warnings appeared with the
upgrade to Apple clang version 14.0.3 (clang-1403.0.22.14.1).

- `std::{u,bi}nary_function` were removed in C++17. They were empty
  classes with a few associated types. We already have conditional code
  to define the types. Just make it unconditional.
- libc++ checks a cast in an unevaluated context to see if a type
  inherits from a binary function class in the standard library, e.g.
  `std::equal_to`, and this causes an error when the type privately
  inherits from such a class. Change these instances to public
  inheritance.
- We don't need a middle-man for the empty base optimization. Prefer to
  inherit directly from an empty class than from
  `beast::detail::empty_base_optimization`.
- Clang warns when all the uses of a variable are removed by conditional
  compilation of assertions. Add a `[[maybe_unused]]` annotation to
  suppress it.
- As a drive-by clean-up, remove commented code.

See related work in #4486.
2023-04-21 12:20:35 -07:00
Mark Travis
c5003969de Use quorum specified via command line: (#4489)
If `--quorum` setting is present on the command line, use the specified
value as the minimum quorum. This allows for the use of a potentially
fork-unsafe quorum, but it is sometimes necessary for small and test
networks.

Fix #4488.

---------

Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
2023-04-20 11:36:18 -07:00
John Freeman
1f417764c3 Add install instructions for package managers: (#4472)
Add instructions for installing rippled using the package managers APT
and YUM. Some steps were adapted from xrpl.org.

---------

Co-authored-by: Michael Legleux <mlegleux@ripple.com>
2023-04-13 10:41:16 -07:00
John Freeman
e75cd49313 Fix the fix for std::result_of (#4496)
Newer compilers, such as Apple Clang 15.0, have removed `std::result_of`
as part of C++20. The build instructions provided a fix for this (by
adding a preprocessor definition), but the fix was broken.

This fixes the fix by:
* Adding the `conf` prefix for tool configurations (which had been
  forgotten).
* Passing `extra_b2_flags` to `boost` package to fix its build.
  * Define `BOOST_ASIO_HAS_STD_INVOKE_RESULT` in order to build boost
    1.77 with a newer compiler.
2023-04-12 16:32:37 -07:00
RichardAH
4f95b9d7a6 Prevent replay attacks with NetworkID field: (#4370)
Add a `NetworkID` field to help prevent replay attacks on and from
side-chains.

The new field must be used when the server is using a network id > 1024.

To preserve legacy behavior, all chains with a network ID less than 1025
retain the existing behavior. This includes Mainnet, Testnet, Devnet,
and hooks-testnet. If `sfNetworkID` is present in any transaction
submitted to any of the nodes on one of these chains, then
`telNETWORK_ID_MAKES_TX_NON_CANONICAL` is returned.

Since chains with a network ID less than 1025, including Mainnet, retain
the existing behavior, there is no need for an amendment.

The `NetworkID` helps to prevent replay attacks because users specify a
`NetworkID` field in every transaction for that chain.

This change introduces a new UINT32 field, `sfNetworkID` ("NetworkID").
There are also three new local error codes for transaction results:

- `telNETWORK_ID_MAKES_TX_NON_CANONICAL`
- `telREQUIRES_NETWORK_ID`
- `telWRONG_NETWORK`

To learn about the other transaction result codes, see:
https://xrpl.org/transaction-results.html

Local error codes were chosen because a transaction is not necessarily
malformed if it is submitted to a node running on the incorrect chain.
This is a local error specific to that node and could be corrected by
switching to a different node or by changing the `network_id` on that
node. See:
https://xrpl.org/connect-your-rippled-to-the-xrp-test-net.html

In addition to using `NetworkID`, it is still generally recommended to
use different accounts and keys on side-chains. However, people will
undoubtedly use the same keys on multiple chains; for example, this is
common practice on other blockchain networks. There are also some
legitimate use cases for this.

A `app.NetworkID` test suite has been added, and `core.Config` was
updated to include some network_id tests.
2023-04-11 17:11:17 -07:00
Nik Bougalis
066f91ca07 Avoid using std::shared_ptr when not necessary: (#4218)
The `Ledger` class contains two `SHAMap` instances: the state and
transaction maps. Previously, the maps were dynamically allocated using
`std::make_shared` despite the fact that they did not require lifetime
management separate from the lifetime of the `Ledger` instance to which
they belong.

The two `SHAMap` instances are now regular member variables. Some smart
pointers and dynamic memory allocation was avoided by using stack-based
alternatives.

Commit 3 of 3 in #4218.
2023-04-11 15:50:25 -07:00
Nik Bougalis
c3acbce82d Optimize SHAMapItem and leverage new slab allocator: (#4218)
The `SHAMapItem` class contains a variable-sized buffer that
holds the serialized data associated with a particular item
inside a `SHAMap`.

Prior to this commit, the buffer for the serialized data was
allocated separately. Coupled with the fact that most instances
of `SHAMapItem` were wrapped around a `std::shared_ptr` meant
that an instantiation might result in up to three separate
memory allocations.

This commit switches away from `std::shared_ptr` for `SHAMapItem`
and uses `boost::intrusive_ptr` instead, allowing the reference
count for an instance to live inside the instance itself. Coupled
with using a slab-based allocator to optimize memory allocation
for the most commonly sized buffers, the net result is significant
memory savings. In testing, the reduction in memory usage hovers
between 400MB and 650MB. Other scenarios might result in larger
savings.

In performance testing with NFTs, this commit reduces memory size by
about 15% sustained over long duration.

Commit 2 of 3 in #4218.
2023-04-10 17:13:03 -07:00
Nik Bougalis
b7f588b789 Introduce support for a slabbed allocator: (#4218)
When instantiating a large amount of fixed-sized objects on the heap
the overhead that dynamic memory allocation APIs impose will quickly
become significant.

In some cases, allocating a large amount of memory at once and using
a slabbing allocator to carve the large block into fixed-sized units
that are used to service requests for memory out will help to reduce
memory fragmentation significantly and, potentially, improve overall
performance.

This commit introduces a new `SlabAllocator<>` class that exposes an
API that is _similar_ to the C++ concept of an `Allocator` but it is
not meant to be a general-purpose allocator.

It should not be used unless profiling and analysis of specific memory
allocation patterns indicates that the additional complexity introduced
will improve the performance of the system overall, and subsequent
profiling proves it.

A helper class, `SlabAllocatorSet<>` simplifies handling of variably
sized objects that benefit from slab allocations.

This commit incorporates improvements suggested by Greg Popovitch
(@greg7mdp).

Commit 1 of 3 in #4218.
2023-04-10 14:22:59 -07:00
ledhed2222
9346842eed Add jss fields used by Clio nft_info: (#4320)
Add Clio-specific JSS constants to ensure a common vocabulary of
keywords in Clio and this project. By providing visibility of the full
API keyword namespace, it reduces the likelihood of developers
introducing minor variations on names used by Clio, or unknowingly
claiming a keyword that Clio has already claimed. This change moves this
project slightly away from having only the code necessary for running
the core server, but it is a step toward the goal of keeping this
server's and Clio's APIs similar. The added JSS constants are annotated
to indicate their relevance to Clio.

Clio can be found here: https://github.com/XRPLF/clio

Signed-off-by: ledhed2222 <ledhed2222@users.noreply.github.com>
2023-04-06 11:33:20 -07:00
RichardAH
f191c911d4 Add NFTokenPages to account_objects RPC: (#4352)
- Include NFTokenPages in account_objects to make it easier to
  understand an account's Owner Reserve and simplify app development.
- Update related tests and documentation.
- Fix #4347.

For info about the Owner Reserve, see https://xrpl.org/reserves.html

---------

Co-authored-by: Scott Schurr <scott@ripple.com>
Co-authored-by: Ed Hennis <ed@ripple.com>
2023-04-05 13:58:55 -07:00
drlongle
e6f49040f5 Fix unit test app.LedgerData (#4484) 2023-03-31 11:18:42 -07:00
drlongle
2f3f6dcb03 Fix ledger_data to return an empty list: (#4398)
Change `ledger_data` to return an empty list when all entries are
filtered out.

When the `type` field is specified for the `ledger_data` method, it is
possible that no objects of the specified type are found. This can even
occur if those objects exist, but not in the section that the server
checked while serving your request. Previously, the `state` field of the
response has the value `null`, instead of an empty array `[]`. By
changing this to an empty array, the response is the same data type so
that clients can handle it consistently.

For example, in Python, `for entry in state` should now work correctly.
It would raise an exception if `state` is `null` (or `None`). 

This could break client code that explicitly checks for null. However,
this fix aligns the response with the documentation, where the `state`
field is an array.

Fix #4392.
2023-03-30 11:59:10 -07:00
drlongle
5ebcaf0a6c Add account flags to account_info response: (#4459)
Previously, the object `account_data` in the `account_info` response
contained a single field `Flags` that contains flags of an account. API
consumers must perform bitwise operations on this field to retrieve the
account flags.

This change adds a new object, `account_flags`, at the top level of the
`account_info` response `result`. The object contains relevant flags of
the account. This makes it easier to write simple code to check a flag's
value.

The flags included may depend on the amendments that are enabled.

Fix #2457.
2023-03-30 11:46:18 -07:00
drlongle
8bfdbcbab5 Add logging for exceptions: (#4400)
Log exception messages at several locations.

Previously, these were locations where an exception was caught, but the
exception message was not logged. Logging the exception messages can be
useful for analysis or debugging. The additional logging could have a
small negative performance impact.

Fix #3213.
2023-03-30 10:13:30 -07:00
Brandon Wilson
135b63dbe0 Update example [validator_list_sites] (#4448) 2023-03-29 23:01:41 -07:00
Elliot Lee
46167d1c46 Add link to BUILD.md: (#4450)
In the release notes (current and historical), there is a link to the
`Builds` directory. By creating `Builds/README.md` with a link to
`BUILD.md`, it is easier to find the build instructions.
2023-03-28 15:55:53 -07:00
Alloy Networks
79e621d96c Update README.md (#4463) 2023-03-28 12:04:06 -07:00
Ed Hennis
66627b26cf Refactor fee initialization and configuration: (#4319)
* Create the FeeSettings object in genesis ledger.
* Initialize with default values from the config. Removes the need to
  pass a Config down into the Ledger initialization functions, including
  setup().
* Drop the undocumented fee config settings in favor of the [voting]
  section.
  * Fix #3734.
  * If you previously used fee_account_reserve and/or fee_owner_reserve,
    you should change to using the [voting] section instead. Example:

```
[voting]
account_reserve=10000000
owner_reserve=2000000
```

* Because old Mainnet ledgers (prior to 562177 - yes, I looked it up)
  don't have FeeSettings, some of the other ctors will default them to
  the config values before setup() tries to load the object.
* Update default Config fee values to match Mainnet.
* Fix unit tests:
  * Updated fees: Some tests are converted to use computed values of fee
    object, but the default Env config was also updated to fix the rest.
  * Unit tests that check the structure of the ledger have updated
    hashes and counts.
2023-03-28 09:03:25 -07:00
Ed Hennis
7aad6e5127 feat: mark 4 amendments as obsolete: (#4291)
Add the ability to mark amendments as obsolete. There are some known
amendments that should not be voted for because they are broken (or
similar reasons).

This commit marks four amendments as obsolete:

1. `CryptoConditionsSuite`
2. `NonFungibleTokensV1`
3. `fixNFTokenDirV1`
4. `fixNFTokenNegOffer`

When an amendment is `Obsolete`, voting for the amendment is prevented.
A determined operator can still vote for the amendment by changing the
source, and doing so does not break any protocol rules.

The "feature" command now does not modify the vote for obsolete
amendments.

Before this change, there were two options for an amendment's
`DefaultVote` behavior: yes and no.

After this change, there are three options for an amendment's
`VoteBehavior`: DefaultYes, DefaultNo, and Obsolete.

To be clear, if an obsolete amendment were to (somehow) be activated by
consensus, the server still has the code to process transactions
according to that amendment, and would not be amendment blocked. It
would function the same as if it had been voting "no" on the amendment.

Resolves #4014.

Incorporates review feedback from @scottschurr.
2023-03-23 22:28:53 -07:00
Scott Schurr
dffcdea12b fix: Expected to return a value: (#4401)
Fix a case where `ripple::Expected` returned a json array, not a value.

The problem was that `Expected` invoked the wrong constructor for the
expected type, which resulted in a constructor that took multiple
arguments being interpreted as an array.

A proposed fix was provided by @godexsoft, which involved a minor
adjustment to three constructors that replaces the use of curly braces
with parentheses. This makes `Expected` usable for
[Clio](https://github.com/XRPLF/clio).

A unit test is also included to ensure that the issue doesn't occur
again in the future.
2023-03-23 17:32:17 -07:00
John Freeman
d7725837f5 build: add interface library libxrpl: (#4449)
Make it easy for projects to depend on libxrpl by adding an `ALIAS`
target named `xrpl::libxrpl` for projects to link.

The name was chosen because:

* The current library target is named `xrpl_core`. There is no other
  "non-core" library target against which we need to distinguish the
  "core" library. We only export one library target, and it should just
  be named after the project to keep things simple and predictable.
* Underscores in target or library names are generally discouraged.
* Every target exported in CMake should be prefixed with the project
  name.

By adding an `ALIAS` target, existing consumers who use the `xrpl_core`
target will not be affected.

* In the future, there can be a migration plan to make `xrpl_core` the
  `ALIAS` target (and `libxrpl` the "real" target, which will affect the
  filename of the compiled binary), and eventually remove it entirely.

Also:

* Fix the Conan recipe so that consumers using Conan import a target
  named `xrpl::libxrpl`. This way, every consumer can use the same
  instructions.
* Document the two easiest methods to depend on libxrpl. Both have been
  tested.
* See #4443.
2023-03-22 17:21:03 -07:00
John Freeman
7745c72b2c docs: update build instructions: (#4381)
* Remove obsolete build instructions.
* By using Conan, builders can choose which dependencies specifically to
  build and link as shared objects.
* Refactor the build instructions based on the plan in #4433.
2023-03-22 12:02:42 -07:00
Elliot Lee
acb373280b Merge branch 'master' (1.10.1) into develop 2023-03-22 11:13:36 -07:00
Elliot Lee
4f506599f6 Set version to 1.10.1
* Add release notes
2023-03-22 09:27:56 -07:00
Elliot Lee
383f1b6ab3 Set version to 1.10.1-rc1 2023-03-21 11:14:20 -07:00
Michael Legleux
da18c86cbf Build packages with Ubuntu 18.04
Restores Ubuntu 18.04 packages
Update docker images to use Conan
2023-03-21 11:13:03 -07:00
Elliot Lee
9fcb28acad docs: update protocol README (#4457) 2023-03-21 08:01:47 -07:00
Shawn Xie
305c9a8d61 fixNFTokenRemint: prevent NFT re-mint: (#4406)
Without the protocol amendment introduced by this commit, an NFT ID can
be reminted in this manner:

1. Alice creates an account and mints an NFT.
2. Alice burns the NFT with an `NFTokenBurn` transaction.
3. Alice deletes her account with an `AccountDelete` transaction.
4. Alice re-creates her account.
5. Alice mints an NFT with an `NFTokenMint` transaction with params:
   `NFTokenTaxon` = 0, `Flags` = 9).

This will mint a NFT with the same `NFTokenID` as the one minted in step
1. The params that construct the NFT ID will cause a collision in
`NFTokenID` if their values are equal before and after the remint.

With the `fixNFTokenRemint` amendment, there is a new sequence number
construct which avoids this scenario:

- A new `AccountRoot` field, `FirstNFTSequence`, stays constant over
  time.
  - This field is set to the current account sequence when the account
    issues their first NFT.
  - Otherwise, it is not set.
- The sequence of a newly-minted NFT is computed by: `FirstNFTSequence +
  MintedNFTokens`.
  - `MintedNFTokens` is then incremented by 1 for each mint.

Furthermore, there is a new account deletion restriction:

- An account can only be deleted if `FirstNFTSequence + MintedNFTokens +
  256` is less than the current ledger sequence.
  - 256 was chosen because it already exists in the current account
    deletion constraint.

Without this restriction, an NFT may still be remintable. Example
scenario:

1. Alice's account sequence is at 1.
2. Bob is Alice's authorized minter.
3. Bob mints 500 NFTs for Alice. The NFTs will have sequences 1-501, as
   NFT sequence is computed by `FirstNFTokenSequence + MintedNFTokens`).
4. Alice deletes her account at ledger 257 (as required by the existing
   `AccountDelete` amendment).
5. Alice re-creates her account at ledger 258.
6. Alice mints an NFT. `FirstNFTokenSequence` initializes to her account
   sequence (258), and `MintedNFTokens` initializes as 0. This
   newly-minted NFT would have a sequence number of 258, which is a
   duplicate of what she issued through authorized minting before she
   deleted her account.

---------

Signed-off-by: Shawn Xie <shawnxie920@gmail.com>
2023-03-20 14:47:46 -07:00
Ed Hennis
9b2d563dec fix: support RPC markers for any ledger object: (#4361)
There were situations where `marker`s  returned by `account_lines` did
not work on subsequent requests, returning "Invalid Parameters".

This was caused by the optimization implemented in "Enforce account RPC
limits by account objects traversed":

e28989638d

Previously, the ledger traversal would find up to `limit` account lines,
and if there were more, the marker would be derived from the key of the
next account line. After the change, ledger traversal would _consider_
up to `limit` account objects of any kind found in the account's
directory structure. If there were more, the marker would be derived
from the key of the next object, regardless of type.

With this optimization, it is expected that `account_lines` may return
fewer than `limit` account lines - even 0 - along with a marker
indicating that there are may be more available.

The problem is that this optimization did not update the
`RPC::isOwnedByAccount` helper function to handle those other object
types. Additionally, XLS-20 added `ltNFTOKEN_OFFER` ledger objects to
objects that have been added to the account's directory structure, but
did not update `RPC::isOwnedByAccount` to be able to handle those
objects. The `marker` provided in the example for #4354 includes the key
for an `ltNFTOKEN_OFFER`. When that `marker` is used on subsequent
calls, it is not recognized as valid, and so the request fails.

* Add unit test that walks all the object types and verifies that all of
  their indexes can work as a marker.
* Fix #4340
* Fix #4354
2023-03-20 10:22:15 -07:00
Nik Bougalis
150d4a47e4 refactor: optimize NodeStore object conversion: (#4353)
When writing objects to the NodeStore, we need to convert them from
the in-memory format to the binary format used by the node store.

The conversion is handled by the `EncodedBlob` class, which is only
instantiated on the stack. Coupled with the fact that most objects
are under 1024 bytes in size, this presents an opportunity to elide
a memory allocation in a critical path.

This commit also simplifies the interface of `EncodedBlob` and
eliminates a subtle corner case that could result in dangling
pointers.

These changes are not expected to cause a significant reduction in
memory usage. The change avoids the use of a `std::shared_ptr` when
unnecessary and tries to use stack-based memory allocation instead
of the heap whenever possible.

This is a net gain both in terms of memory usage (lower
fragmentation) and performance (less work to do at runtime).
2023-03-16 15:00:07 -07:00
Ed Hennis
1c9df69b33 fix(ValidatorSite): handle rare null pointer dereference in timeout: (#4420)
In rare circumstances, both `onRequestTimeout` and the response handler
(`onSiteFetch` or `onTextFetch`) can get queued and processed. In all
observed cases, the response handler processes a network error.
`onRequestTimeout` usually runs first, but on rare occasions, the
response handler runs first, which leaves `activeResource` empty.
2023-03-16 10:32:22 -07:00
RichardAH
10555faa92 fix(gateway_balances): handle overflow exception: (#4355)
* Prevent internal error by catching overflow exception in `gateway_balances`.
* Treat `gateway_balances` obligations overflow as max (largest valid) `STAmount`.
  * Note that very large sums of STAmount are approximations regardless.

---------

Co-authored-by: Scott Schurr <scott@ripple.com>
2023-03-16 10:25:40 -07:00
Elliot Lee
0f1ffff068 Set version to 1.10.1-b1 2023-03-14 21:21:50 -07:00
Chenna Keshava B S
9309b57364 Rectify the import paths of boost/iterator: (#4293)
- MSVC 19.x reported a warning about import paths in boost for
  function_output_iterator class (boost::function_output_iterator).
- Eliminate that warning by updating the import paths, as suggested by
  the compiler warnings.
2023-03-14 21:10:56 -07:00
RichardAH
cb08f2b6ec Allow port numbers be be specified with a colon: (#4328)
Port numbers can now be specified using either a colon or a space.

Examples:

1.2.3.4:51235

1.2.3.4 51235

- In the configuration file, an annoying "gotcha" for node operators is
  accidentally specifying IP:PORT combinations using a colon. The code
  previously expected a space, not a colon. It also does not provide
  good feedback when this operator error is made.
- This change simply allows this mistake (using a colon) to be fixed
  automatically, preserving the intention of the operator.
- Add unit tests, which test the functionality when specifying IP:PORT
  in the configuration file.
- The RPCCall test regime is not specific enough to test this
  functionality, it has been tested by hand.
- Ensure IPv6 addresses are not confused for ip:port

---------

Co-authored-by: Elliot Lee <github.public@intelliot.com>
2023-03-14 21:06:30 -07:00
drlongle
84cde3ce0b Use <=> operator for base_uint, Issue, and Book: (#4411)
- Implement the `operator==` and the `operator<=>` (aka the spaceship
  operator) in `base_uint`, `Issue`, and `Book`. 
- C++20-compliant compilers automatically provide the remaining
  comparison operators (e.g. `operator<`, `operator<=`, ...).
- Remove the function compare() because it is no longer needed.
- Maintain the same semantics as the existing code.
- Add some unit tests to gain further confidence.
- Fix #2525.
2023-03-14 20:54:54 -07:00
Mark Travis
f7b3ddd87b Reporting Mode: Do not attempt to acquire missing data from peer network (#4458)
In Reporting Mode, a server would core dump when it is not able to read
from Cassandra. This patch prevents the core dump when Cassandra is down
for reporting mode servers. This does not fix the root cause, but it
cuts down on some of the resulting noise.
2023-03-14 20:49:40 -07:00
Elliot Lee
1e7710eee2 docs: security bug bounty acknowledgements (#4460) 2023-03-14 13:08:56 -07:00
Elliot Lee
07f047b1e2 Set version to 1.10.0
Merge #4451
2023-03-14 09:30:22 -07:00
Elliot Lee
8687b5c3c9 Set version to 1.10.0-rc4 2023-03-02 14:28:08 -08:00
Kenny Lei
ecd49e1535 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (#4442)
* Follow-up to #4336
* NFToken is the naming convention in the codebase (rather than NFT)
* Rename `lsfDisallowIncomingNFTOffer` to `lsfDisallowIncomingNFTokenOffer`
* Rename `asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer`
2023-03-02 13:01:50 -08:00
Elliot Lee
c77a8d5ec6 Update Docker.md (#4432)
* Add links to some related resources that may be helpful.
* Docker images can make testing easier to do.
2023-03-02 10:07:09 -08:00
Michael Legleux
e13676f709 Update package building scripts and images to use Conan (#4435)
* Set version to 1.10.0-rc3
* Test on Fedora 37
* Dependency builds are handled by Conan
2023-02-28 14:17:07 -08:00
Elliot Lee
74594d5348 Disable duplicate detector: (#4438)
Partially revert the functionality introduced
with #4195 / 5a15229 (part of 1.10.0-b1).

Acknowledgements:
Aaron Hook for responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to
responsibly disclose any issues they may find.

To report a bug, please send a detailed report to:

    bugs@xrpl.org

---------

Co-authored-by: Nik Bougalis <nikb@bougalis.net>
2023-02-28 14:12:28 -08:00
Ed Hennis
caf4827c0b Undo API changes introduced in XRPFees: (#4429)
* Original changes: e4b17d1cf2
* Resolve #4425
2023-02-24 08:41:28 -08:00
Elliot Lee
c2b03fecca Remove recipe for RocksDB and add recipe for Snappy (#4431)
- Copies the recipe for Snappy from Conan Center, but removes three
  lines that explicitly link the standard library, which prevents
  builders from statically linking it.
- Removes the recipe for RocksDB now that an official recipe for version
  6.27.3 is in Conan Center.

Developers will likely need to remove cached versions of both RocksDB
and Snappy:

```
conan remove -f rocksdb
conan remove -f snappy
```

---------

Co-authored-by: John Freeman <jfreeman08@gmail.com>
2023-02-23 12:41:18 -08:00
John Freeman
60c276d90b Fix Conan version constraint in workflows (#4430)
Conan 2.0 is not compatible with the current workflows.
2023-02-22 19:54:51 -08:00
Levin Winter
2929748898 Refactor getTrustedForLedger() (#4424)
Look for validations associated with a specific ledger ID and sequence
number.
2023-02-22 15:20:15 -08:00
Elliot Lee
5ec8783d35 README: Update "Build from source" section (#4426)
Fix #2987
2023-02-21 15:40:09 -08:00
Elliot Lee
96aab1288f README: Add a few source code starting points (#4421)
Co-authored-by: John Freeman <jfreeman08@gmail.com>
2023-02-17 22:27:27 -08:00
Ed Hennis
aebf2ac990 Resolve a couple of Github Action CI annoyances: (#4413)
* Set "fail-fast: false" so that multiple jobs in one workflow can
  finish independently. By default, if one job fails, other running jobs
  will be aborted, even if the other jobs are working fine and are
  almost done. This leads to wasted time and resources if the failure
  is, for example, OS specific, or due to a flaky unit test, and the
  failed job needs to be re-run, because all the jobs end up re-running.
* Put conditions back into the windows.yml job (manual, and for
  a specific branch name and that job). This prevents Github Actions
  from sending "No jobs were run" failure emails on every commit.
2023-02-15 11:34:32 -08:00
ledhed2222
ac78b7a9a7 Rename to fixNonFungibleTokensV1_2 and some cosmetic changes (#4419) 2023-02-13 15:52:40 -08:00
Denis Angell
b72a87c7d3 Only account specified as destination can settle through brokerage: (#4399)
Without this amendment, for NFTs using broker mode, if the sell offer contains a destination and that destination is the buyer account, anyone can broker the transaction. Also, if a buy offer contains a destination and that destination is the seller account, anyone can broker the transaction. This is not ideal and is misleading.

Instead, with this amendment: If you set a destination, that destination needs to be the account settling the transaction. So, the broker must be the destination if they want to settle. If the buyer is the destination, then the buyer must accept the sell offer, as you cannot broker your own offers.

If users want their offers open to the public, then they should not set a destination. On the other hand, if users want to limit who can settle the offers, then they would set a destination.

Unit tests:

1. The broker cannot broker a destination offer to the buyer and the buyer must accept the sell offer. (0 transfer)
2. If the broker is the destination, the broker will take the difference. (broker mode)
2023-02-13 15:52:39 -08:00
Scott Schurr
39c32561bd Prevent brokered sale of NFToken to owner: (#4403)
Fixes #4374

It was possible for a broker to combine a sell and a buy offer from an account that already owns an NFT. Such brokering extracts money from the NFT owner and provides no benefit in return.

With this amendment, the code detects when a broker is returning an NFToken to its initial owner and prohibits the transaction. This forbids a broker from selling an NFToken to the account that already owns the token. This fixes a bug in the original implementation of XLS-20.

Thanks to @nixer89 for suggesting this fix.
2023-02-13 15:52:39 -08:00
ledhed2222
89aa8b21ec Fix 3 issues around NFToken offer acceptance (#4380)
Fixes 3 issues:

In the following scenario, an account cannot perform NFTokenAcceptOffer even though it should be allowed to:

- BROKER has < S
- ALICE offers to sell token for S
- BOB offers to buy token for > S
- BROKER tries to bridge the two offers

This currently results in `tecINSUFFICIENT_FUNDS`, but should not because BROKER is not spending any funds in this transaction, beyond the transaction fee.

When trading an NFT using IOUs, and when the issuer of the IOU has any non-zero value set for TransferFee on their account via AccountSet (not a TransferFee on the NFT), and when the sale amount is equal to the total balance of that IOU that the buyer has, the resulting balance for the issuer of the IOU will become positive. This means that the buyer of the NFT was supposed to have caused a certain amount of IOU to be burned. That amount was unable to be burned because the buyer couldn't cover it. This results in the buyer owing this amount back to the issuer. In a real world scenario, this is appropriate and can be settled off-chain.

Currency issuers could not make offers for NFTs using their own currency, receiving `tecINSUFFICIENT_FUNDS` if they tried to do so.

With this fix, they are now able to buy/sell NFTs using their own currency.
2023-02-13 15:52:39 -08:00
Shawn Xie
a828e24cf0 Allow NFT to be burned when number of offers is greater than 500 (#4346)
* Allow offers to be removable
* Delete sell offers first

Signed-off-by: Shawn Xie <shawnxie920@gmail.com>
2023-02-13 15:52:38 -08:00
ledhed2222
f7a8d2de84 Add fixUnburnableNFToken feature (#4391) 2023-02-13 15:52:38 -08:00
Howard Hinnant
32559463ef Change default vote on fixUniversalNumber from yes to no (#4414) 2023-02-09 21:01:48 -08:00
Ed Hennis
8f514937a4 Update documented pathfinding configuration defaults: (#4409)
* Add recommended values for node which want to support "advanced"
  pathfinding, which is effectively the old default behavior.
2023-02-08 12:14:09 -08:00
John Freeman
36b34a7bd5 Update dependency: grpc (#4407) 2023-02-07 15:46:38 -08:00
Howard Hinnant
5edaec2bd0 Introduce min/max observers for Number
Three static member functions are introduced with
definitions consistent with std::numeric_limits:

static constexpr Number min() noexcept;

  Returns: The minimum positive value.  This is the value closest to zero.

static constexpr Number max() noexcept;

  Returns: The maximum possible value.

static constexpr Number lowest() noexcept;

  Returns: The negative value which is less than all other values.
2023-02-07 15:43:28 -08:00
Howard Hinnant
2f1f453052 Optimize uint128_t division by 10 within Number.cpp
* Optimization includes computing remainder from division.
* Used only within Number::operator*=.
2023-02-07 15:43:28 -08:00
Howard Hinnant
6eaaa7bcfa Replace Number division algorithm
* Replace division with faster algorithm.
* Correct some rounding bugs in multiplication.
* Add tests for rounding bugs.
2023-02-07 15:43:28 -08:00
Howard Hinnant
e354497f63 Include rounding mode in XRPAmount to STAmount conversion. 2023-02-07 15:43:28 -08:00
Howard Hinnant
6fcd654bee Remove undefined behavior
* Taking the negative of a signed negative is UB, but
  taking the negative of an unsigned is not.
2023-02-07 15:43:28 -08:00
Howard Hinnant
d275a2ab72 Silence warnings 2023-02-07 15:43:28 -08:00
Howard Hinnant
3f33471220 Introduce rounding modes for Number:
You can set a thread-local flag to direct Number how to round
non-exact results with the syntax:

    Number::rounding_mode prev_mode = Number::setround(Number::towards_zero);

This flag will stay in effect for this thread only until another call
to setround.  The previously set rounding mode is returned.

You can also retrieve the current rounding mode with:

    Number::rounding_mode current_mode = Number::getround();

The available rounding modes are:

* to_nearest : Rounds to nearest representable value.  On tie, rounds
               to even.
* towards_zero : Rounds towards zero.
* downward : Rounds towards negative infinity.
* upward : Rounds towards positive infinity.

The default rounding mode is to_nearest.
2023-02-07 15:43:28 -08:00
Howard Hinnant
a82ad5ba76 Use Number for IOUAmount and STAmount arithmetic
* Guarded by amendment fixUniversalNumber
* Produces slightly better accuracy in some computations.
2023-02-07 15:43:28 -08:00
Howard Hinnant
48e804c40c Add tests 2023-02-07 15:43:28 -08:00
Howard Hinnant
c9c54c9799 Add implicit conversion from STAmount to Number 2023-02-07 15:43:28 -08:00
Howard Hinnant
24fe5f9fd0 Add clip
* Return 0 if abs(x) < limit, else returns x
2023-02-07 15:43:28 -08:00
Howard Hinnant
476ee8a479 Add conversions between Number, XRPAmount and int64_t
* Conversions to Number are implicit
* Conversions away from Number are explicit and potentially lossy
* If lossy, round to nearest, and to even on tie
2023-02-07 15:43:28 -08:00
Howard Hinnant
0ee63b7c7b AMM Add Number class and associated algorithms 2023-02-07 15:43:28 -08:00
John Freeman
31e7e5a56e Revise CONTRIBUTING (#4382)
- Wrap text at 80 columns.
- Match capitalization of GitHub usernames.
- Prescribe more rules for pull requests.
- Link more reference documentation.
2023-02-05 16:08:26 -08:00
Ed Hennis
e4b17d1cf2 XRPFees: Fee setting and handling improvements (#4247)
* Introduces amendment `XRPFees`
* Convert fee voting and protocol messages to use XRPAmounts
* Includes Validations, Change transactions, the "Fees" ledger object,
  and subscription messages

* Improve handling of 0 drop reference fee with TxQ. For use with networks that do not want to require fees
* Note that fee escalation logic is still in place, which may cause the
  open ledger fee to rise if the network is busy. 0 drop transactions
  will still queue, and fee escalation can be effectively disabled by
  modifying the configuration on all nodes

* Change default network reserves to match Mainnet

* Name the new SFields *Drops (not *XRP)
* Reserve SField IDs for Hooks

* Clarify comments explaining the ttFEE transaction field validation
2023-02-02 16:20:35 -08:00
John Freeman
0ce15e0e35 Update BUILD.md (#4383)
Help readers of BUILD.md by moving the crash course to the top
2023-01-11 21:03:38 -08:00
John Freeman
b0e0f319a1 Make NodeToShardRPC a manual test (#4379)
Right now it is flaky, which creates noise in our automated testing.
2023-01-05 18:28:37 -06:00
John Freeman
2233f585f8 Update build instructions (#4376)
Document minimum compiler version; how to choose compiler; how to fix missing `std::result_of`; how to create Conan profile.
2023-01-05 18:27:53 -06:00
Scott Schurr
61d8c7a85b Add a unit test for invalid memos (#4287) 2023-01-04 15:45:19 -08:00
Scott Schurr
6f8750316c RPC tooBusy response has 503 HTTP status if "ripplerpc": "3.0": (#4143)
Fixes #4005

Makes it possible for internal RPC Error Codes to associate
themselves with a non-OK (200) HTTP status code.  There are
quite a number of RPC responses in addition to tooBusy that
now have non-OK HTTP status codes.

The new return HTTP return codes are only enabled by including
"ripplerpc": "3.0" or higher in the original request.
Otherwise the historical value, 200, continues to be returned.
This ensures that this is not a breaking change.
2023-01-03 09:24:45 -08:00
John Freeman
fda9e9a7ee Fix Doxygen workflow (#4372) 2022-12-21 10:41:16 -08:00
RichardAH
d8a84e9530 featureDisallowIncoming: Opt-out of incoming Checks, PayChans, NFTokenOffers and Trustlines (#4336)
featureDisallowIncoming is a new amendment that would allow users to opt-out of incoming Checks, Payment Channels, NFTokenOffers, and trust lines. This commit includes tests.

Adds four new AccountSet Flags:
1. asfDisallowIncomingNFTOffer
2. asfDisallowIncomingCheck
3. asfDisallowIncomingPayChan
4. asfDisallowIncomingTrustline
2022-12-19 17:35:35 -08:00
John Freeman
c3a9f3dbf3 Use the Conan package manager (#4367)
Introduces a conanfile.py (and a Conan recipe for RocksDB) to enable building the package with Conan, choosing more recent default versions of dependencies. It removes almost all of the CMake build files related to dependencies, and the configurations for Travis CI and GitLab CI. A new set of cross-platform build instructions are written in BUILD.md.

Includes example GitHub Actions workflow for each of Linux, macOS, Windows.

* Test on macos-12

We use the <concepts> library which was not added to Apple Clang until
version 13.1.6. The default Clang on macos-11 (the sometimes current
version of macos-latest) is 13.0.0, and the default Clang on macos-12 is
14.0.0.

Closes #4223.
2022-12-16 10:46:22 -08:00
CJ Cobb
df1300fb37 Catch transaction deserialization error in doLedgerGrpc (#4323)
* Allow clio to extract ledgers with transactions that can no longer be
  deserialized. The problem transactions will be skipped.
2022-12-13 17:09:53 -08:00
Scott Determan
648d6c3e2f Fix clang 15 warnings: (#4325)
Clang warned about the code removed in this patch with the warning:
```
warning: out-of-line definition of constexpr static data member is
redundant in C++17 and is deprecated [-Wdeprecated]
```
2022-12-13 16:21:22 -08:00
Scott Determan
47ffc392d7 Work around gdb bug by changing a template parameter: (#4332)
There's a bug in gdb where unsigned template parameters cause issues with
RTTI. This patch changes a template parameter from `size_t` to `int` to
work around this gdb bug.
2022-12-13 16:13:54 -08:00
Alloy Networks
0362e935af Reduce default reserves to 10/2 (#4329)
Reduce the reserve requirements from 20/5 to 10/2 in line with the current network votes. The requirements of 10/2 have been on the network long enough that new nodes should not still have the old reserve amount.

Co-authored-by: Richard Holland <richard.holland@starstone.co.nz>
2022-12-13 10:56:35 -08:00
Ed Hennis
a79fa2026b Update GitHub Actions to ubuntu-latest: (#4357)
* Per actions/runner-images#6002, ubuntu-18.04 is being deprecated. If
  latest ever fails in the future, we'll need to fix the jobs anyway, so
  catch it early.

* Use long option names

* Force clang-format to ubuntu-20.04 because LLVM 10 is not available for 22.04
2022-12-08 20:41:50 -08:00
Gregory Popovitch
c1e7fe2d93 Prevent unnecessary shared_ptr copies by accepting a value in SHAMapInnerNode::setChild (#4266)
* Do a move instead of a copy in `SHAMapInnerNode::setChild`

* Create the value directly in the call
2022-12-08 20:15:21 -08:00
Nik Bougalis
4a5ad4cfac Update affiliation: Nikolaos D Bougalis (#4360) 2022-12-08 16:30:05 -08:00
Elliot Lee
ffd453f7dd Set version to 1.10.0-rc1 2022-11-28 14:12:16 -08:00
Scott Determan
518fb6d208 Improve move semantics in Expected (#4326)
* Improve move semantics in Expected:

This patch unconditionally moves an `Unexpected<U>` value parameter as
long as `U` is not a reference. If `U` is a reference the code should
not compile. An error type that holds a reference is a strange use-case,
and an overload is not provided. If it is required in the future it can
be added.

The `Expected(U r)` overload should take a forwarding ref.

* Replace enable_if with concepts in Expected
2022-11-28 14:01:54 -08:00
Elliot Lee
093055c039 README - add link to ripple-server mailing list (#3890) 2022-11-28 13:57:38 -08:00
Ed Hennis
b7ac73c8e4 Don't try to read SLE with key 0 from the ledger:
* May resolve #4341
2022-11-28 13:55:29 -08:00
J. Scott Branson
004ec2d201 Update Linux Build Instructions (#4018)
* Removed a reference to the default number of workers varying based on whether a node has validation enabled. Workers default to the number of processor cores + 2: https://github.com/ripple/rippled/blob/develop/src/ripple/core/impl/JobQueue.cpp#L166

* Protobuf v2 and Ubuntu 16.04 are no longer supported.

* Updated protobuf version as v3 is now supported, fixed typos, automatically sent number of processors when building boost & rippled.
2022-11-28 13:49:38 -08:00
manojsdoshi
ebbf4b64a5 Set version to 1.10.0-b2 2022-10-14 13:15:44 -07:00
Scott Schurr
649ab872ff Add featureImmediateOfferKilled for tfImmediateOrCancel offers:
Fixes #4115; https://github.com/ripple/rippled/issues/4115
2022-10-14 12:54:59 -07:00
Scott Schurr
7e9e9104ea Rename SHAMapStoreImp::stopping() to healthWait() 2022-10-14 12:54:59 -07:00
greg7mdp
3726f8bf31 Release TaggedCache object memory outside the lock 2022-10-14 12:54:59 -07:00
Ed Hennis
e37dc710cf Improve timing of NodeToShardRPC unit test to reduce false failures 2022-10-14 12:54:59 -07:00
Ed Hennis
5d38e4cfbf Work around soci build issues 2022-10-13 15:44:49 -07:00
CJ Cobb
28f4cc7817 Remove gRPC code previously used for the xpring SDK 2022-10-13 15:44:43 -07:00
Chenna Keshava B S
95fabd5762 Remove inacessible code paths and outdated data format wchar_t 2022-10-11 18:11:32 -07:00
Alexander Kremer
23ce431876 Remove const_cast usage 2022-10-11 16:38:10 -07:00
seelabs
04ef885108 Support for boost 1.80.0:
Boost intrusive renamed the `comp()` function -> `get_comp()`
2022-10-11 16:36:30 -07:00
manojsdoshi
d33df35378 Merge master (1.9.4) into develop (1.10.0-b2) 2022-10-11 16:34:36 -07:00
Nik Bougalis
ba3c0e5145 Set version to 1.9.4 2022-09-20 18:23:13 -07:00
Michael Legleux
be1ce5eca9 Pin postgres, zlib, krb5, libuv and cassandra to stable versions 2022-09-20 18:22:37 -07:00
Ikko Ashimine
df66e4151e Fix typo in detail/Node.h
minumum -> minimum
2022-09-14 14:17:30 -07:00
seelabs
9a31f321cd Allow gcc 12 compilation:
Compiling with gcc 12 on manjaro (arch variant) had compilation errors
without adding an additional include file.
2022-09-14 14:16:40 -07:00
Scott Schurr
e40e38e8d3 Introduce fixRemoveNFTokenAutoTrustLine amendment:
It turns out that the feature enabled by the tfTrustLine flag
on an NFTokenMint transaction could be used as a means to
attack the NFToken issuer.  Details are in
https://github.com/XRPLF/rippled/issues/4300

The fixRemoveNFTokenAutoTrustLine amendment removes the
ability to set the tfTrustLine flag on an NFTokenMint
transaction.

Closes 4300.
2022-09-14 14:15:20 -07:00
Howard Hinnant
f5af42a640 Remove use of deprecated std::iterator 2022-09-14 14:14:18 -07:00
Nik Bougalis
fe05b8c4fe Set version to 1.10.0-b1 2022-08-25 08:49:18 -07:00
Nik Bougalis
7b3507bb87 Improve wrapper around OpenSSL RAND 2022-08-25 08:49:17 -07:00
Nik Bougalis
0ecfc7cb1a Improve self-signed certificate generation:
When starting, the code generates a new ephemeral private key and
a corresponding certificate to go along with it. This process can
take time and, while this is unlikely to matter for normal server
operations, it can have a significant impact for unit testing and
development. Profiling data suggests that ~20% of the time needed
for a unit test run can be attributed to this.

This commit does several things:

1. It restructures the code so that a new self-signed certificate
   and its corresponding private key are only initialized once at
   startup; this has minimal impact on the operation of a regular
   server.
2. It provides new default DH parameters. This doesn't impact the
   security of the connection, but those who compile from scratch
   can generate new parameters if they so choose.
3. It properly sets the version number in the certificate, fixing
   issue #4007; thanks to @donovanhide for the report.
4. It uses SHA-256 instead of SHA-1 as the hash algorithm for the
   certificate and adds some X.509 extensions as well as a random
   128-bit serial number.
5. It rounds the certificate's "start of validity" period so that
   the server's precise startup time cannot be easily deduced and
   limits the validity period to two years, down from ten years.
6. It removes some CBC-based ciphers from the default cipher list
   to avoid some potential security issues, such as CVE-2016-2107
   and CVE-2013-0169.
2022-08-25 08:49:17 -07:00
Nik Bougalis
e2eed966b0 Improve AccountID string conversion caching:
Caching the base58check encoded version of an `AccountID` has
performance advantages, because because of the computationally
heavy cost associated with the conversion, which requires the
application of SHA-256 twice.

This commit makes the cache significantly more efficient in terms
of memory used: it eliminates the map, using a vector with a size
that is determined by the configured size of the node, and a hash
function to directly map any given `AccountID` to a specific slot
in the cache; the eviction policy is simple: in case of collision
the existing entry is removed and replaced with the new data.

Previously, use of the cache was optional and required additional
effort by the programmer. Now the cache is automatic and does not
require any additional work or information.

The new cache also utilizes a 64-way spinlock, to help reduce any
contention that the pressure on the cache would impose.
2022-08-25 08:49:16 -07:00
Nik Bougalis
5a15229eeb Improve detection & handling of duplicate Node ID:
Each node on the network is supposed to have a unique cryptographic
identity. Typically, this identity is generated randomly at startup
and stored for later reuse in the (poorly named) file `wallet.db`.

If the file is copied, it is possible for two nodes to share the
same node identity. This is generally not desirable and existing
servers will detect and reject connections to other servers that
have the same key.

This commit achives three things:

1. It improves the detection code to pinpoint instances where two
   distinct servers with the same key connect with each other. In
   that case, servers will log an appropriate error and shut down
   pending intervention by the server's operator.
2. It makes it possible for server administrators to securely and
   easily generate new cryptographic identities for servers using
   the new `--newnodeid` command line arguments. When a server is
   started using this command, it will generate and save a random
   secure identity.
3. It makes it possible to configure the identity using a command
   line option, which makes it possible to derive it from data or
   parameters associated with the container or hardware where the
   instance is running by passing the `--nodeid` option, followed
   by a single argument identifying the infomation from which the
   node's identity is derived. For example, the following command
   will result in nodes with different hostnames having different
   node identities: `rippled --nodeid $HOSTNAME`

The last option is particularly useful for automated cloud-based
deployments that minimize the need for storing state and provide
unique deployment identifiers.

**Important note for server operators:**
Depending on variables outside of the the control of this code,
such as operating system version or configuration, permissions,
and more, it may be possible for other users or programs to be
able to access the command line arguments of other processes
on the system.

If you are operating in a shared environment, you should avoid
using this option, preferring instead to use the `[node_seed]`
option in the configuration file, and use permissions to limit
exposure of the node seed.

A user who gains access to the value used to derive the node's
unique identity could impersonate that node.

The commit also updates the minimum supported server protocol
version to `XRPL/2.1`, which has been supported since version
1.5.0 and eliminates support for `XPRL/2.0`.
2022-08-25 08:49:14 -07:00
Nik Bougalis
d318ab612a Avoid unnecessary copying and dynamic memory allocations
Co-authored-by: Chenna Keshava B S <ckbs.keshava56@gmail.com>
2022-08-25 08:49:14 -07:00
Chenna Keshava B S
9aaa0dff5f Build the command map at compile time (fixes #3298):
We profiled different algorithms and data structures to understand which
strategy is best from a performance standpoint:

- Linear search on an array;
- Binary search on a sorted array;
- Using `std::map`; and
- Using `std::unordered_map`.

Both linear search and std::unordered_map outperformed the other alternatives
so no change to the existing data structure is justified. If more handers are
added, this should be revisited.

For some additional details and timings, please see:
https://github.com/XRPLF/rippled/issues/3298#issuecomment-1185946010
2022-08-25 08:49:04 -07:00
Chenna Keshava B S
b88ed5a8ec Update command-line usage help message (fixes #3318) 2022-08-25 08:49:04 -07:00
Chenna Keshava B S
ce64f7a90f Remove deprecated AccountTxOld.cpp (fixes #2926) 2022-08-25 08:49:04 -07:00
Chenna Keshava B S
5e1cb09b88 Update broken link to hosted Doxygen content (fixes #4251) 2022-08-25 08:49:04 -07:00
Howard Hinnant
3d0c14f3e3 Remove use of deprecated std::iterator 2022-08-25 08:49:04 -07:00
Crypto Brad Garlinghouse
83ac141f65 Remove charUnHex 2022-08-25 08:49:04 -07:00
Crypto Brad Garlinghouse
e67f90588a Use constexpr to check memo validity 2022-08-25 08:38:28 -07:00
Crypto Brad Garlinghouse
69bb2be446 Introduce amendment to handle trustlines to self:
Trustlines must be between two different accounts but two trustlines exist
where an account extends trust to itself. They were created in the early
days, likely because of bugs that have been fixed. The new fixTrustLinesToSelf
amendment will remove those trustlines when it activates.
2022-08-25 08:38:28 -07:00
seelabs
92d35e54c7 Switch from C++17 to C++20 2022-08-25 08:38:28 -07:00
Nik Bougalis
47dec467ea Set version to 1.9.3 2022-08-24 19:41:07 -07:00
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
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
18d437284e Lower the message level for missing optional doc components 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
Chenna Keshava B S
3172a816fa Describe resolution for common SOCI-related build errors 2022-07-11 09:56:39 -07: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
RichardAH
0ee6f15b35 Create CONTRIBUTING.md, list maintainers and outline repo policies (#4214) 2022-07-09 20:37:13 +03:00
manojsdoshi
e32bc674aa Set version to 1.9.1 2022-05-22 13:18:18 -07:00
manojsdoshi
34786abd4f Set version to 1.9.1-rc2 2022-05-19 15:03:26 -07:00
natenichols
d0a813a19d Adding missing include <cassert> in beast/rngfill.h to fix rippled build 2022-05-19 15:02:28 -07:00
manojsdoshi
25474343a9 Set version to 1.9.1-rc1 2022-05-11 18:21:14 -07:00
Nik Bougalis
670bc22cfa Set version to 1.9.1-b1 2022-05-10 13:34:16 -07:00
Scott Schurr
80bda7cc48 Introduce fixNFTokenDirV1 amendment:
o Fixes an off-by-one when determining which NFTokenPage an
  NFToken belongs on.
o Improves handling of packed sets of 32 NFTs with
  identical low 96-bits.
o Fixes marker handling by the account_nfts RPC command.
o Tightens constraints of NFTokenPage invariant checks.

Adds unit tests to exercise the fixed cases as well as tests
for previously untested functionality.
2022-05-10 13:34:12 -07:00
Devon White
dac080f1c8 Advance ripple.app.rdb 2022-05-10 13:34:12 -07:00
Devon White
767dd4ff3f Address failures in DatabaseDownloader unittest 2022-05-10 13:34:12 -07:00
Richard Holland
01c37fed69 Introduce the ExpandedSignerList amendment:
The amendment increases the maximum sign of an account's signer
list from 8 to 32.

Like all new features, the associated amendment is configured with
a default vote of "no" and server operators will have to vote for
it explicitly if they believe it is useful.
2022-05-10 13:34:12 -07:00
Ed Hennis
04bd5878f1 Track total trustlines and avoid duplications 2022-05-10 13:34:12 -07:00
Ed Hennis
e836375d99 Don't load trust lines that can't participate in path finding
* "A path is considered invalid if and only if it enters and exits an
  address node through trust lines where No Ripple has been enabled for
  that address." (https://xrpl.org/rippling.html#specifics)
* When loading trust lines for an account "Alice" which was reached
  via a trust line that has the No Ripple flag set on Alice's side, do
  not use or cache any of Alice's trust lines which have the No Ripple
  flag set on Alice's side. For typical "end-user" accounts, this will
  return no trust lines.
2022-05-10 13:34:12 -07:00
Scott Schurr
aa4a5b7fe9 Adjust log levels to reflect actual severity (fixes #3996) 2022-05-10 13:34:12 -07:00
Mark Travis
5aedb0e07a Allow server to stabilize after online delete health check failure 2022-05-10 13:34:12 -07:00
greg7mdp
dfe69f1b76 Fix strict aliasing test failures with newer MSVC compilers 2022-05-10 13:34:12 -07:00
greg7mdp
87d06a2571 Check triggers cmake error unnecessarily 2022-05-10 13:34:12 -07:00
Nik Bougalis
7ca1f78446 Ensure that rngfill returns the requested amount of randomness:
One of the two versions of the `rngfill` function accepts a pointer
to a buffer and a size (in bytes). The function aims to fill the
provided `buffer` with `size` random bytes. It does this in chunks
of 8 bytes, for long as possible, and then fills any left-over gap
one byte at a time.

To avoid an annoying and incorrect warning about a potential buffer
overflow in the "trailing write", commit 78bc2727f7
used a `#pragma` to instruct the compiler to not generate the incorrect
diagnostic. Unfortunately, this change _also_ eliminated the trailing
write code, which means that, under some cases, the `rngfill` function
would generate between 1 and 7 fewer random bytes than requested.

This problem would only manifest on builds that do not define `__GNUC__`
which, as of this writing, means MSVC.
2022-05-10 13:34:12 -07:00
Nik Bougalis
b68a66928c Adjust the aggressiveness of the ledger acquisition engine:
Several hard-coded parameters control the behavior of the ledger
acquisition engine. The values of many of these parameters where
set by intuition and have complex and non-intuitive interactions
with each other and other parts of the code.

An earlier commit attempted to adjust several of these parameters
to improve syncing performance; initial testing was promising but
a number of operators reported experiencing syncing and stability
issues with their servers. As a result, this commit reverts parts
of commit 18235067af.

This commit further adjusts some tunables so as to increase the
aggressiveness of the ledger acquisition engine.
2022-05-06 11:38:19 -07:00
Nik Bougalis
245174c42c Adjust thread count calculation and request bundling:
This commit addresses minor bugs introduced with commit
6faaa91850:

- The number of threads used by the database engine was
  incorrectly clamped to the lower possible value, such
  that the database was effectively operating in single
  threaded mode.

- The number of requests to extract at once was so high
  that it could result in increased latency. The bundle
  size is now limited to 4 and can be adjusted by a new
  configuration option `rq_bundle` in the `[node_db]`
  stanza. This is an advanced tunable and adjusting it
  should not be needed.
2022-05-06 11:38:18 -07:00
manojsdoshi
7c66747d27 Set version to 1.9.0 2022-04-06 20:28:46 -07:00
manojsdoshi
cdd37a2a05 Set version to 1.9.0-rc1 2022-04-06 16:35:48 -07:00
manojsdoshi
c66be3e6cf Set version to 1.9.0-b3 2022-04-06 13:30:56 -07:00
Nik Bougalis
70779f6850 Introduce NFT support (XLS020) 2022-04-06 13:29:48 -07:00
greg7mdp
525aaecbca Fix build issue on M1 macs 2022-04-06 13:29:39 -07:00
Michael Legleux
9d3cd718e4 Do not install coreutils-single on rocky build image 2022-04-06 13:29:00 -07:00
Michael Legleux
656e9fe180 Upload rippled-reporting packages to Artifactory 2022-04-06 13:28:47 -07:00
Michael Legleux
8aa617d972 Fix failing Clio build 2022-04-06 13:28:10 -07:00
Nik Bougalis
711608e652 Set version to 1.9.0-b2 2022-03-30 15:16:40 -07:00
Ed Hennis
bc9773eb45 MSVC std::sample workaround 2022-03-30 15:16:27 -07:00
Michael Legleux
bea9610440 Remove checks for CMake < 3.16 2022-03-30 15:16:27 -07:00
Michael Legleux
375af87a86 Package builds of reporting mode rippled 2022-03-30 15:16:27 -07:00
Michael Legleux
1502e6e2cd Reduce the verbosity of CI scripts 2022-03-30 15:16:27 -07:00
Nik Bougalis
593677ee82 Squash warning about an unused variable 2022-03-30 15:16:27 -07:00
Nik Bougalis
8f58687091 Cleanup AcceptedLedger and AcceptedLedgerTx:
This commit modernizes the `AcceptedLedger` and `AcceptedLedgerTx`
classes, reduces their memory footprint and reduces unnecessary
dynamic memory allocations.
2022-03-30 15:16:27 -07:00
Nik Bougalis
c7e6803956 Simplify LedgerMaster:
- Eliminate `tune` member function and allow `LedgerHistory`
  to fully initialize itself.
2022-03-30 15:16:27 -07:00
Nik Bougalis
6faaa91850 Improve asynchronous database handlers:
This commit optimizes the way asynchronous nodestore operations are
processed both by reducing the amount of time locks are held and by
minimizing the number of memory allocations and data copying.
2022-03-30 15:16:27 -07:00
Nik Bougalis
d66d960d59 Miscellaneous Improvements:
- Adjust default tree cache sizing
- Various micro-optimizations
2022-03-30 15:16:26 -07:00
Nik Bougalis
18235067af Simplify and optimize the processing of inbound transactions 2022-03-30 15:16:26 -07:00
JoelKatz
3eb8aa8b80 Negative cache support for node store
Adds support to TaggedCache to support smart replacement
(Needed to avoid race conditions with negative caching.)

Create a "hotDUMMY" object that represents the absence
of an object.

Allow DatabaseNodeImp::asyncFetch to complete immediately
if object is in cache (positive or negative).

Fix a bug in asyncFetch where the object returned may not
be the correct canonical version because we stash the
object in the results array before we canonicalize it.
2022-03-30 15:16:12 -07:00
Nik Bougalis
b9903bbcc4 Simplify and improve order book tracking:
- Avoid using std::shared_ptr
- Prefer using unordered maps to avoid linear searches
- Increase the interval between full order book updates
2022-03-29 16:16:34 -07:00
Nik Bougalis
48803a48af Improve ledger-fetching logic:
When fetching ledgers, the existing code would isolate the peer
that sent the most useful responses and issue follow up queries
only to that peer.

This commit increases the query aggressiveness, and changes the
mechanism used to select which peers to issue follow-up queries
to so as to more evenly spread the load along those peers which
provided useful responses.
2022-03-29 16:16:34 -07:00
Nik Bougalis
1b9387eddc Eliminate SHAMapInnerNode lock contention:
The `SHAMapInnerNode` class had a global mutex to protect the
array of node children. Profiling suggested that around 4% of
all attempts to lock the global would block.

This commit removes that global mutex, and replaces it with a
new per-node 16-way spinlock (implemented so as not to effect
the size of an inner node objet), effectively eliminating the
lock contention.
2022-03-29 16:16:34 -07:00
Nik Bougalis
34ca457132 Improve stop signaling for Application 2022-03-29 16:15:42 -07:00
Edward Hennis
df60e46750 Improve deterministic transaction sorting in TxQ:
* Txs with the same fee level will sort by TxID XORed with the parent
  ledger hash.
* The TxQ is re-sorted after every ledger.
* Attempt to future-proof the TxQ tie breaking test
2022-03-23 23:28:04 -07:00
Edward Hennis
e7e672c3f8 Incremental improvements to path finding memory usage:
* Abort background path finding when closed or disconnected
* Exit pathfinding job thread if there are no requests left
* Don't bother creating the path find job if there are no requests
* Refactor to remove circular dependency between InfoSub and PathRequest
2022-03-23 23:28:04 -07:00
seelabs
4d5459d041 Optimize trust line caching:
The existing trust line caching code was suboptimal in that it stored
redundant information, pinned SLEs into memory and required multiple
memory allocations per cached object.

This commit eliminates redundant data, reducing the size of cached
objects and unpinning SLEs from memory, and uses value_types to
avoid the need for `std::shared_ptr`. As a result of these changes, the
effective size of a cached object, includes the overhead of the memory
allocator and the `std::shared_ptr` should be reduced by at least 64
bytes. This is significant, as there can easily be tens of millions
of these objects.
2022-03-23 23:28:04 -07:00
seelabs
59f5844381 Reduce lock contention in manifest cache:
This commit combines the `apply_mutex` and `read_mutex` into a single `mutex_`
var. This new `mutex_` var is a `shared_mutex`, and most operations only need to
lock it with a `shared_lock`. The only exception is `applyMutex`, which may need
a `unique_lock`.

One consequence of removing the `apply_mutex` is more than one `applyMutex`
function can run at the same time. To help reduce lock contention that a
`unique_lock` would cause, checks that only require reading data are run a
`shared_lock` (call these the "prewriteChecks"), then the lock is released, then
a `unique_lock` is acquired. Since a currently running `applyManifest` may write
data between the time a `shared_lock` is released and the `write_lock` is
acquired, the "prewriteChecks" need to be rerun. Duplicating this work isn't
ideal, but the "prewirteChecks" are relatively inexpensive.

A couple of other designs were considered. We could restrict more than one
`applyMutex` function from running concurrently - either with a `applyMutex` or
my setting the max number of manifest jobs on the job queue to one. The biggest
issue with this is if any other function ever adds a write lock for any reason,
`applyManifest` would not be broken - data could be written between the release
of the `shared_lock` and the acquisition of the `unique_lock`. Note: it is
tempting to solve this problem by not releasing the `shared_mutex` and simply
upgrading the lock. In the presence of concurrently running `applyManifest`
functions, this will deadlock (both function need to wait for the other to
release their read locks before they can acquire a write lock).
2022-03-23 23:28:04 -07:00
Richard Holland
a07a729e3d Reserve field codes for Hooks:
In order to preserve the Hooks ABI, it is important that field
values used for hooks be stable going forward.

This commit reserves the required codes so that they will not
be repurposed before Hooks can be proposed for inclusion in
the codebase.
2022-03-23 10:48:39 -07:00
Rome Reginelli
b65e279db6 Remove Xpring forum link from issue configs
The Xpring Forum shut down a while back, so it's no longer a relevant link for community discussions.
2022-03-23 10:48:39 -07:00
Steven Olmsted
1ddc966b31 Fix typo 2022-03-23 10:48:39 -07:00
Nik Bougalis
1a8eb5e6e3 Set version to 1.9.0-b1 2022-03-09 15:52:30 -08:00
Michael Legleux
6a8180c967 Use 3.16 as min cmake 2022-03-09 15:51:39 -08:00
Michael Legleux
eb57679085 Update cmake_minimum_required to 3.16, Ubuntu 20.04's version 2022-03-04 14:27:25 -08:00
Michael Legleux
297def5ed3 Update boost max to 1.77 2022-03-04 14:27:16 -08:00
Michael Legleux
a01cadbfd5 Move Beast & fix #include paths 2022-03-04 14:16:59 -08:00
CJ Cobb
11ca9a946c Add successor information to clio ETL messages
* Allow clio to ask for object successors and predecessors from rippled
* Add lower_bound and last_below to SHAMap
2022-03-04 13:38:48 -08:00
CJ Cobb
f326f019bf force build with c++17 2022-03-04 13:38:48 -08:00
natenichols
90326bf756 Proxy validation_quorum when in reporting mode 2022-03-04 13:38:48 -08:00
Edward Hennis
255bf829ca Fix Travis CI MacOS builds:
* Update boost version.
* Use latest macOS image.
* Credit to @donovanhide in #4025 for starting this ball rolling, and
  inspiring a boost update.
2022-03-04 13:38:48 -08:00
Edward Hennis
0623a40f02 Refactor to fix levelization:
* Remove Application & Database dependency in PerfLog. Replace it with
  a callback passed into the constructor.
* Fixes the circular dependency between ripple/nodestore and ripple/basics
2022-03-01 14:32:14 -08:00
Ikko Ashimine
a529b218f3 Fix typo in ReportingETL.cpp
respresent -> represent
2022-03-01 14:32:14 -08:00
Mark Travis
c0cb389b20 Fallback to normal sync if fast loading is not possible:
If fast loading is enabled but the last persisted ledger is not
entirely on disk, the server would fail to start without manual
intervention by the server operator.

This commit allows the server to detect this scenario and attempt
to automatically recover.
2022-03-01 11:29:07 -08:00
Mark Travis
8f82b62e0d Use CIDR notation for admin and secure_gateway 2022-03-01 11:27:50 -08:00
Mark Travis
dc213a4fab Make gateway_balances admin-only in reporting mode 2022-03-01 11:27:34 -08:00
Mark Travis
06e87e0f6a Fix deletion of orphan nodestore directories:
Orphaned nodestore directories should only be deleted
if the proper nodestore directories are confirmed to
exist.
2022-03-01 11:25:03 -08:00
John Freeman
c2a08a1f26 Simplify the Job Queue:
This is a refactor aimed at cleaning up and simplifying the existing
job queue.

As of now, all jobs are cancelled at the same time and in the same
way, so this commit removes the per-job cancellation token. If the
need for such support is demonstrated, support can be re-added.

* Revise documentation for ClosureCounter and Workers.
* Simplify code, removing unnecessary function arguments and
  deduplicating expressions
* Restructure job handlers to no longer need to pass a job's
  handle to the job.
2022-03-01 11:25:03 -08:00
Scott Schurr
df02eb125f Prefer using a local Sandbox over using the Context's view 2022-03-01 11:25:03 -08:00
Howard Hinnant
0c13676d5f Restrict access to the virtual functions move and copy
* These are meant to be used by detail::STVar only and
  are otherwise error-prone to call.
2022-03-01 11:25:03 -08:00
Howard Hinnant
74e6ed1af3 Improve the readability of STBase-derived types
* Increase the visibility of each type's API.
* No functional changes.
2022-03-01 11:25:03 -08:00
Nik Bougalis
72377e7bf2 Set version to 1.8.5 2022-02-07 16:36:55 -08:00
CJ Cobb
5b085a75fd Avoid dereferencing empty optional in ReportingETL 2022-02-07 12:38:50 -08:00
seelabs
61389a8bef Correct minor bug in TaggedPointer move constructor:
A typographical error would mishandle the case where a caller explicitly
tries to remove a child that is not actually part of the node. This case
is never invoked in practice, and so the bug would will never trigger.
2022-02-07 12:38:50 -08:00
Wo Jake
bd97e59254 Update README.md
XRPL Foundation's basic introduction to the XRPL, a great series that would *hopefully* continue...
2022-02-07 12:38:50 -08:00
Michael Legleux
95ecf296ad Install the protocol buffer deps during smoketests 2022-02-07 12:38:40 -08:00
Michael Legleux
b7e0306d0a Ensure protocol buffer prerequisites are present 2022-02-07 10:59:12 -08:00
Michael Legleux
a9ee802240 Update smoke test distributions 2022-02-07 10:59:12 -08:00
Edward Hennis
d23d37fcfd Correctly add GIT_COMMIT_HASH into version string:
Commit bf013c02ad added support
for incorporating a commit ID into the compiled version string
but did so in a way that did not follow the semantic versioning
standard.

This commit corrects that flaw by moving the commit ID into the
"metadata" part of the version string and properly handles the
case where the commit hash cannot be retrieved.
2022-02-07 10:52:31 -08:00
Nik Bougalis
289bc0afd9 Improve handling of endpoints during peer discovery 2022-02-07 10:33:02 -08:00
Nik Bougalis
c5dc00af74 Update RocksDB to version 6.27.3 2022-02-07 10:32:59 -08:00
Nik Bougalis
d49b486224 Set version to 1.8.4 2022-01-12 18:54:06 -08:00
Nik Bougalis
417cfc2fb0 Adjust pathfinding configuration defaults:
The pathfinding engine built into the code has several configurable
parameters to adjust the depth of the paths indexed and explored.

These parameters can dramatically impact the performance and memory
consumption of a server; higher values can result in resource usage
increasing exponentially.

These default values were decided early and somewhat arbitrarily at
a time when the network and the size of the network state were much
smaller.

This commit adjusts the default values to reduce the depth of paths
to more reasonable levels; unless explicitly overriden, the changes
mean that pathfinding operations will return fewer, shallower paths
than previous versions of the software.
2022-01-12 18:54:03 -08:00
seelabs
febbe14e6d Adjust mutex scope in walkMapParallel:
This commit corrects a technical flaw that was introduced with commit
7c12f01358: as written, a mutex that is
intended to help provide synchronization for multiple threads as they
are each walking the map, is declared so that each thread is passed a
dangling reference to a unique mutex.

This commit hoists the mutex outside the thread creation loop, so all
threads use a single mutex and eliminating the dangling reference.
2022-01-12 14:21:44 -08:00
Nik Bougalis
44514930f9 Set version to 1.8.3 2022-01-10 15:40:07 -08:00
Nik Bougalis
dc778536ed Provide sensible default values for nodestore cache:
The nodestore includes a built-in cache to reduce the disk I/O
load but, by default, this cache was not initialized unless it
was explicitly configured by the server operator.

This commit introduces sensible defaults based on the server's
configured node size.

It remains possible to completely disable the cache if desired
by explicitly configuring it the cache size and age parameters
to 0:

    [node_db]
    ...
    cache_size = 0
    cache_age = 0
2022-01-10 15:29:44 -08:00
Nik Bougalis
18584ef2fd Adjust number of concurrent ledger data jobs 2022-01-10 15:29:43 -08:00
Nik Bougalis
416ce35d73 Detect CVE-2021-3520 when decompressing using LZ4 2022-01-10 15:29:43 -08:00
Mark Travis
7c12f01358 Parallel ledger loader & I/O performance improvements:
- Only duplicate records from archive to writable during online_delete.
- Log duration of nodestore reads.
- Include nodestore counters in perf_log output.
- Remove gratuitous nodestore activity counting.
- Report initial sync duration in server_info and perfLog.
- Report state_accounting in perfLog.
- Make state_accounting durations more accurate.
- Parallel ledger loader.
- Config parameter to load ledgers on start.
2022-01-10 15:29:21 -08:00
JoelKatz
5a4654a0da Two small SHAMapSync improvements:
1) Don't acquire so many nodes per pass. It's likely
far more than we need.

2) Right-size the finishedReads_ vector on passes other
than just the first.
2022-01-07 04:41:58 -08:00
manojsdoshi
89766c5f21 Set version to 1.8.2 2021-12-20 14:50:58 -08:00
manojsdoshi
4ec11e692b Set version to 1.8.2-rc1 2021-12-16 23:23:25 -08:00
Michael Legleux
d02f0e11c5 Quiet builds and disable unity build 2021-12-16 22:45:38 -08:00
natenichols
e28989638d Enforce account RPC limits by account objects traversed 2021-12-16 11:57:08 -08:00
CJ Cobb
915fe31274 log request and duration for every RPC call 2021-12-15 12:12:28 -08:00
Mark Travis
db720a59e4 Log resource limit disconnections. 2021-12-15 11:26:13 -08:00
CJ Cobb
72752b1ee0 make cassandra io threads configurable 2021-12-15 11:25:32 -08:00
Mark Travis
c663f1f62b Make tx() function against a read-only postgres instance. 2021-12-15 11:25:10 -08:00
Scott Schurr
d54f6278bb Improve names returned by server_info counters 2021-12-15 11:21:51 -08:00
Mark Travis
fc04336caa Reporting mode always returns age in server_info. 2021-12-15 11:18:58 -08:00
CJ Cobb
47376a0cc3 Only forward to p2p nodes that are in sync 2021-12-15 11:18:07 -08:00
Nik Bougalis
45aa0142a6 Improve full & compressed inner node deserialization 2021-12-14 17:49:20 -08:00
Edward Hennis
e3acb61d57 Increase TxQ default minimum and target sizes 2021-12-14 17:47:48 -08:00
Edward Hennis
8fa33795a3 Reduce TxQ logging severity in several places 2021-12-14 17:47:48 -08:00
Edward Hennis
b1c9b134dc Make transaction queue order deterministic:
* Sort by fee level (which is the current behavior) then by transaction
  ID (hash).
* Edge case when the account at the end of the queue submits a higher
  paying transaction to walk backwards and compare against the cheapest
  transaction from a different account.
* Use std::if_any to simplify the JobQueue::isOverloaded loop.
2021-12-14 17:47:48 -08:00
Edward Hennis
ae9930b87d Consensus transaction recovery/deferral completely ignores the TxQ 2021-12-14 17:47:38 -08:00
Edward Hennis
aaa601841c Logging & minor optimizations:
* Log load fee values (at debug) received from validations.
* Log remote and cluster fee values (at trace) when changed.
* Refactor JobQueue::isOverloaded to return sooner if overloaded.
* Refactor Transactor::checkFee to only compute fee if ledger is open.
2021-12-14 17:47:38 -08:00
Scott Schurr
8ca2d98496 NuDBBackend destructor should not throw 2021-12-14 17:47:38 -08:00
Scott Schurr
ad805eb95b Improve handling of the X-Forwarded-For and Forwarded HTTP headers 2021-12-14 17:47:04 -08:00
Wo Jake
eb17325cbe Add load cost 2021-12-14 17:47:04 -08:00
wojak
b00787e161 Update README.md 2021-12-14 17:47:04 -08:00
Ikko Ashimine
81e7ec859d Fix typo in consensus.md
determing -> determining
2021-12-14 17:47:04 -08:00
Ikko Ashimine
6f6179abb4 Fix typo in RFC1751.cpp
seperated -> separated
2021-12-14 17:47:04 -08:00
Howard Hinnant
32a26a65d9 Make basic_seconds_clock::time_point atomic
* Just the rep is made atomic to workaround older compilers
2021-12-14 17:47:04 -08:00
Richard Holland
daccb5b4c0 Add ignore_default option to account_lines API:
This flag, if present, suppresses the output of incoming
trustlines in default state.

This is primarily motivated by observing that users of Xumm often
have many unwanted incoming trustlines in a default state, which are
not useful in the vast majority of cases.

Being able to suppress those when doing `account_lines` saves bandwidth
and resources.
2021-12-14 17:44:24 -08:00
Richard Holland
cf97dcb992 Make I/O and prefetch worker threads configurable 2021-12-14 17:43:50 -08:00
Richard Holland
6746b863b3 Configurable handling of untrusted validations and proposals 2021-12-14 17:43:04 -08:00
Richard Holland
bf013c02ad Add git commit hash to debug version string 2021-12-14 17:42:59 -08:00
manojsdoshi
fbedfb25ae Set version to 1.8.1 2021-11-24 10:32:37 -08:00
Nik Bougalis
9e877a929e Adjust RocksDB defaults 2021-11-24 10:29:49 -08:00
manojsdoshi
e0eae9725b Set version to 1.8.0 2021-11-22 18:44:47 -08:00
manojsdoshi
3083983fee Set version to 1.8.0-rc3 2021-11-22 18:42:33 -08:00
Edward Hennis
5050b366d9 Return correct error code for node_to_shard command errors 2021-11-22 18:40:32 -08:00
seelabs
f0c237e001 Set version to 1.8.0-rc2 2021-11-18 14:39:03 -05:00
CJ Cobb
970711f1fd Properly handle empty optionals in DB lookups 2021-11-18 14:38:42 -05:00
Mark Travis
19018e8959 Introduce partitioned unordered maps:
This commit implements partitioned unordered maps and makes it possible
to traverse such a map in parallel, allowing for more efficient use of
CPU resources.

The `CachedSLEs`, `TaggedCache`, and `KeyCache` classes make use of the
new functionality, which should improve performance.
2021-11-18 14:38:35 -05:00
Nik Bougalis
7edfbbd8bd Disable pathfinding indexing on validator nodes:
The pathfinding engine requires pre-building large tables which is a
resource-intensive operation. Typically, one would not expect that a
server configured as a validator would also support pathfinding APIs
and so, building those tables by default wastes resources.

This commit, if merged, will disable pathfinding on servers that are
configured as validators, unless the server operator opts to support
it explicitly, by configuring the `[path_search_max]` parameter.

Validator operators that wish to support pathfinding on a validator
and want to use the default values can add the following stanza to
their server's configuration file:

    [path_search_max]
    7
2021-11-17 20:52:18 -08:00
Nik Bougalis
d36024394d Report job queue data if a deadlock is detected 2021-11-17 20:52:12 -08:00
Nik Bougalis
35e0ab4280 Adjust verbosity of log messages 2021-11-17 20:52:12 -08:00
Nik Bougalis
ef60ac8348 Properly handle oversized ledger data replies 2021-11-17 20:52:11 -08:00
Nik Bougalis
0c47cfad6f Adjust priorities of jobs:
The priority of different types of jobs was set back in the early
days of development, based on insight and observations that don't
necessarily apply any longer.

Specifically, job types used by the server to sync to the network
were being treated as lower priority than client requests, making
it more difficult to regain sync.

This commit adjusts the priority of several jobs and should allow
servers to prioritize resynchronizing to the network over serving
clients.
2021-11-17 20:52:11 -08:00
Nik Bougalis
eb6b79bed7 Adjust default number of threads for JobQueue:
The existing calculation would limit the maximum number of threads
that would be created by default to at most 6; this may have been
reasonable a few years ago, but given both the load on the network
as of today and the increase in the number of CPU cores, the value
should be revisited.

This commit, if merged, changes the default calculation for nodes
that are configured as `large` or `huge` to allow for up to twelve
threads.
2021-11-17 20:52:11 -08:00
Nik Bougalis
eaff0d30fb Make the sweep_interval individually configurable:
The "sweep interval" is the amount of time between successive sweeps of
of various in-memory data structures to remove stale items.

Prior to this commit, the interval was automatically adjusted, based on
the value of the `[node_size]` option in a server's configuration file.

If merged, this commit introduces a new configuration option that makes
it possible for a server operator to adjust the sweep interval and make
a CPU/memory tradeoff:

    [sweep_interval]
    <integer>

The specified value represents the number of seconds between successive
sweeps. The range of valid values is between 10 and 600.

Important operator notes:

This is an advanced configuration option that should not be used unless
there is empirical data which suggests that the default sweep frequency
is either resulting in performance problems or is causing undue load to
the server.

Note that adjusting the sweep interval may not have the intended effect
on the server. Lower values will not always translate to a reduction of
memory usage and higher values will not always translate to a reduction
of CPU usage and/or load.
2021-11-17 20:52:10 -08:00
Nik Bougalis
fae9f9b24b Use unordered map for handling book_offers:
The performance characteristics of `std::unordered_map` are better
than `std::map` and the former should be preferred when the strict
ordering of the latter is not required.
2021-11-17 20:52:10 -08:00
manojsdoshi
5d44998368 Set version to 1.8.0-rc1 2021-10-28 15:07:30 -07:00
manojsdoshi
a145759d1e Set version to 1.8.0-b7 2021-10-21 12:07:50 -07:00
Peng Wang
e2a42184b9 Implement tx stream with history 2021-10-21 12:05:48 -07:00
Devon White
00a4c3a478 Implement node-to-shard RPC control 2021-10-19 16:27:30 -07:00
Michael Legleux
0320d2169e Remove old boost workaround 2021-10-18 15:37:04 -07:00
Richard Holland
da26d11593 make building tests optional:
* disable build specific commandline options when built without tests
2021-10-18 15:37:04 -07:00
Ikko Ashimine
90aa3c75a7 Fix typo in LedgerHandler.cpp
non-existant -> non-existent
2021-10-18 15:37:04 -07:00
manojsdoshi
1197e49068 Set version to 1.8.0-b6 2021-10-06 13:17:24 -07:00
seelabs
b6ed50eb03 Remove unused variable:
Clang 13 warns about `nbytes` being unused. This patch removes this unused variable.
2021-10-06 13:17:10 -07:00
CJ Cobb
8c78c83d05 Add modification type to GetLedger gRPC method
* Specify whether a ledger object was created, modified or deleted.
2021-10-06 13:17:10 -07:00
CJ Cobb
a5c4684273 Move TxMeta to xrpl_core
* add peekNodes() to TxMeta for const access to nodes
2021-10-06 13:17:10 -07:00
Michael Legleux
2bbf0eb588 Don't restart rippled during apt upgrade:
Resolves #3294
2021-10-06 13:17:10 -07:00
Mark Travis
6095f55bf1 Build packages with new LICENSE.md file. 2021-10-06 13:17:10 -07:00
Edward Hennis
f64bd54093 Disable Boost's deque forward declaration 2021-10-06 13:17:10 -07:00
Edward Hennis
bc91fd740f Fix out-of-bounds reserve, and some minor optimizations 2021-10-06 12:26:09 -07:00
Edward Hennis
4a9bd7ed6d Refactor Feature name management and creation:
* Only require adding the new feature names in one place. (Also need to
  increment a counter, but a check on startup will catch that.)
* Allows rippled to have the code to support a given amendment, but
  not vote for it by default. This allows the amendment to be enabled in
  a future version without necessarily amendment blocking these older
  versions.
* The default vote is carried with the amendment name in the list of
  supported amendments.
* The amendment table is constructed with the amendment and default
  vote.
2021-10-06 12:24:19 -07:00
Edward Hennis
1ca8898703 Set OpenSSL 1.1.1 as the minimum version, recommend 3.0.0 for Windows
* Also clean up some formatting in the Windows instructions
* Changed the recommended version for Windows to 1.1.1L after deeper
  checking uncovered some build issues.
2021-10-06 12:22:52 -07:00
Nik Bougalis
8a25f32824 Set version to 1.8.0-b5 2021-09-13 15:13:15 -07:00
Nathan Nichols
d9d001dffd Forward validations and manifests in reporting mode 2021-09-13 15:13:15 -07:00
Mark Travis
bdfafa0b58 Always persist ledgers in SQLite 2021-09-13 15:13:15 -07:00
Mark Travis
2266b04dd8 Narrow check for appropriate configurations 2021-09-13 15:13:15 -07:00
Scott Schurr
c50d166c23 Add ripple::Expected which simulates std::expected:
Also integrates use of ripple::Expected into the code base.
2021-09-13 15:13:15 -07:00
Edward Hennis
de43d43560 Health check endpoint ignores fee escalation:
* Also refactor to use `jss` labels instead of strings for JSON fields.
2021-09-13 15:13:15 -07:00
Guido Vranken
f954faada6 Patch soci only once:
* Patch the soci unsigned-types.h file. If no changes are made, delete
  the patched file and exit. If there are changes, backup the original
  and replace it with the patched file.
* Fixes #3885

Patch Rocksdb only once:

* The repeated patches do not appear to affect build times, but avoiding
  unnecessary copies is good for its own sake.
2021-09-13 15:13:15 -07:00
Howard Hinnant
9f75f2d522 Replace boost::clamp with std::clamp 2021-09-13 15:13:15 -07:00
Devon White
cf70ecbd6d Improve Relational DB Interface safety checks 2021-09-13 15:13:15 -07:00
cdy20
2a298469be Properly handle configurations where use_tx_tables = 0 2021-09-13 15:13:15 -07:00
Michael Legleux
3be668b343 Link statically against PostgreSQL 2021-09-13 15:13:15 -07:00
Michael Legleux
2027f642ec Use absolute paths for conffile in Debian package:
Recent changes to reject relative pathnames in DEBIAN/conffiles
cause deb packages to fail on Debian 11 (Bullseye).

For more details:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=15416a18f7645dbb9a36edb1e52f30a9e83c6627
2021-09-13 15:13:15 -07:00
Ikko Ashimine
9376d81d0d Fix typo in rippled-example.cfg
availabe -> available
2021-09-13 15:13:15 -07:00
seelabs
54e5d5fc35 Add missing include 2021-09-13 15:13:15 -07:00
seelabs
b8552abcea Fix potential deadlock in Validator sites:
There are two mutexes in ValidatorSite: `site_mutex_` and `state_mutex_`. Some
function end up locking both mutexes. However, depending on the call, the
mutexes could be locked in different orders, resulting in deadlocks.

If both mutexes are locked, this patch always locks the `sites_mutex_` first.
2021-09-13 15:13:15 -07:00
CJ Cobb
3fb60a89a3 Validate data size before calling uint256::fromVoid 2021-09-13 15:13:15 -07:00
Elliot Lee
15b0ae5bf0 Link to macOS Build Instructions
The most up-to-date macOS build instructions are on xrpl.org
2021-09-13 15:13:15 -07:00
Gregory Tsipenyuk
33b396c7b4 Discard non-validator TMSquelch message 2021-09-13 15:13:15 -07:00
Gregory Tsipenyuk
ea145d12c7 Improve transaction relaying logic:
The existing logic involves every server sending every transaction
that it receives to all its peers (except the one that it received
a transaction from).

This commit instead uses a randomized algorithm, where a node will
randomly select peers to relay a given transaction to, caching the
list of transaction hashes that are not relayed and forwading them
to peers once every second. Peers can then determine whether there
are transactions that they have not seen and can request them from
the node which has them.

It is expected that this feature will further reduce the bandwidth
needed to operate a server.
2021-09-13 15:13:15 -07:00
Nik Bougalis
0d17dd8228 Update LICENSE file:
The existing license file contains copyright statements and license
snippets referencing code that has long since been removed from the
codebase and which are not necessary any longer.

The general copyright statement for the ISC License is also changed
from "Ripple Labs" which is one contributor to the codebase, to the
more general "XRP Ledger Developers".

Remaining code which was originally taken from Bitcoin includes the
relevant copyright statement(s) inline.

To aid in the automated detection of the license type by GitHub and
tools like `licensee`, the following statement which referenced the
ISC license, and which was listed at the bottom of the file, is now
incorporated at the top:

>The accompanying files incorporate work covered by the following copyright
>and previous license notice:
>
>Copyright (c) 2011 Arthur Britto, David Schwartz, Jed McCaleb,
>Vinnie Falco, Bob Way, Eric Lombrozo, Nikolaos D. Bougalis, Howard Hinnant
2021-09-13 15:13:15 -07:00
Nik Bougalis
af5f28cbf8 Cleanup LedgerEntryType & TxType:
This commit removes the `ltINVALID` pseudo-type identifier from
`LedgerEntryType` and the `ttINVALID` pseudo-type identifier from
`TxType` and includes several small additional improvements that
help to simplify the code base.

It also improves the documentation `LedgerEntryType` and `TxType`,
which was all over the place, and highlights some important caveats
associated with making changes to the ledger and transaction type
identifiers.

The commit also adds a safety check to the `KnownFormats<>` class,
that will catch the the accidental reuse of format identifiers.
Ideally, this should be done at compile time but C++ does not (yet?)
allow for the sort of introspection that would enable this.
2021-09-13 15:13:14 -07:00
Nik Bougalis
234b754038 Eliminate code duplication and improve documentation:
The legacy functions `cdirFirst` and `dirFirst` were mostly
identical; the differences were only type-related. The same
situation existed with `cdirNext` and `dirNext`.

This commit removes the duplicated code by introducing new
template functions that abstract away the differences that
are present between each pair of functions.

This commit also improves the naming of function arguments,
helping to elucidate their purpose & use and to make the
code self-documenting.
2021-09-13 15:13:13 -07:00
Nik Bougalis
c231adf324 Minor cleanups in offer processing code 2021-09-09 11:26:06 -07:00
Nik Bougalis
7a088a5280 Merge master (1.7.3) into develop (1.8.0-b4) 2021-09-09 11:22:18 -07:00
Nik Bougalis
96bbabbd2e Set version to 1.7.3 2021-08-11 12:13:30 -07:00
Peng Wang
e37c108195 Add 'NegativeUNL' as a supported amendment:
The Negative UNL is a feature of the XRP Ledger consensus protocol that
improves liveness (the network's ability to make forward progress) during
a partial outage. Using the Negative UNL, servers adjust their effective
UNLs based on which validators are currently online and operational, so
that a new ledger version can be declared validated even if several trusted
validators are offline.

The Negative UNL has no impact on how the network processes transactions
or what transactions' outcomes are, except that it improves the network's
ability to declare outcomes final during some types of partial outages.

The feature was originally introduced with version **1.6.0** but it was
only possible to manually enable this. If merged, this commit introduces
the amendment associated with the feature so that server operators can
vote on whether to enable this feature.

For more details, please see https://xrpl.org/negative-unl.html

This commit closes #3898.
2021-08-10 18:20:51 -07:00
Edward Hennis
53df35eef3 Address OOB read in the base58 decoder:
Under some circumstances, it is possible to induce an out-of-bounds
memory read in the base58 decoder.

This commit addresses this issue.

Acknowledgements:
    Guido Vranken for discovering and responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
    We welcome reviews of the rippled code and urge researchers to
    responsibly disclose any issues they may find.

    Ripple is generously sponsoring a bug bounty program for the
    rippled project. For more information please visit:

        https://ripple.com/bug-bounty
2021-08-10 18:20:37 -07:00
Scott Schurr
1061b01ab3 Improve SLE usage in check cashing 2021-08-10 18:00:49 -07:00
manojsdoshi
aee422e819 Set version to 1.8.0-b4 2021-07-27 11:35:54 -07:00
Bharath Chari
324667b877 Add the XRP Ledger Foundation to the validator_list_sites 2021-07-27 11:35:50 -07:00
Fraser Waters
10d73655bc Move signer_list in JSON response for api_version 2:
See https://github.com/ripple/xrpl-dev-portal/issues/938 for context.
2021-07-27 11:35:50 -07:00
Miguel Portilla
96f11c786e Refactor GetLedger and LedgerData message handlers:
* Verify message fields first
* Break up GetLedger handler into several functions
2021-07-27 11:35:50 -07:00
Edward Hennis
9202197354 Fix nested locks in ValidatorSite:
* Modify relevant unit tests to recreate the problematic scenario.
2021-07-27 11:35:50 -07:00
CJ Cobb
d78a396525 Don't build gRPC benchmarks 2021-07-27 11:35:50 -07:00
seelabs
cd27b5f2bd Some code cleanups tagged by static analysis 2021-07-27 11:35:50 -07:00
seelabs
78bc2727f7 Disable false-alarm gcc warning 2021-07-27 11:35:50 -07:00
Ikko Ashimine
8b58e93a2e Fix typo in Quality.h:
alway -> always
2021-07-27 11:35:50 -07:00
Nik Bougalis
3752234161 Report additional fields in validation stream:
The HardenedValidations amendment introduces additional fields
in validations:

- `sfValidatedHash`, if present, is the hash the of last ledger that
  the validator considers to be fully validated.
- `sfCookie`, if present, is a 64-bit cookie (the default
  implementation selects it randomly at startup but other
  implementations are possible), which can be used to improve the
  detection and classification of duplicate validations.
- `sfServerVersion`, if present, reports the version of the software
  that the validator is running. By surfacing this information,
  server operators gain additional insight about variety of software
  on the network.

If merged, this commit fixes #3797 by adding the fields to the
`validations` stream as shown below:

- `sfValidateHash` as `validated_hash`: a 256-bit hex string;
- `sfCookie` as `cookie`: a 64-bit integer as a string; and
- `sfServerVersion` as `server_version`: a 64-bit integer as
  a string.
2021-07-27 11:35:50 -07:00
Scott Schurr
bf75094224 Introduce CheckCashMakesTrustLine amendment:
With this amendment, the CheckCash transaction creates a TrustLine
if needed.  The change is modeled after offer crossing.  And,
similar to offer crossing, cashing a check allows an account to
exceed its trust line limit.
2021-07-27 11:35:50 -07:00
Scott Schurr
8d59c7dd40 Redistribute unit test priorities based on current measurements 2021-07-27 11:35:50 -07:00
Scott Schurr
a1fd579756 Clean up Section in BasicConfig.h:
The following changes were made:
- Removed dependency on template defined in beast detail namespace.
- Removed Section::find() method which had an obsolete interface.
- Made Section::get<>() easier to use for the common case of
  retrieving a std::string.  The revised get() method replaces old
  calls to Section::find().
- Provided a default template parameter to free function
  get<>(Section config, std::string name) so it stays similar to
  Section::get<>().

Then the rest of the code was adapted to these changes.

- Calls to Section::find() were replaced with calls to Section::get.
- Unnecessary get<std::string>() arguments were reduced to get().

These changes dug up an interesting artifact in the SHAMap unit
tests.  I'm not sure why the tests were working before, but there
was a problem with the case of a Section key.  The unit test is
fixed.
2021-07-27 11:35:50 -07:00
Nicolai Helldorff
b9943d3746 Adding another UNL to the examples:
* Added the third well known UNL (https://vl.xrplf.org)
2021-07-27 11:35:28 -07:00
Michael Legleux
b5502a49c3 update boost URL 2021-07-21 16:14:00 -07:00
manojsdoshi
7bd5d51e4e Set version to 1.8.0-b3 2021-06-03 10:58:32 -07:00
plan-do-break-fix
d4d937c37b Correct typos in documentation 2021-06-03 10:58:24 -07:00
Robert Zhang
2f0231025f Future proof rippled by changing variable name 'requires' to 'require'
'requires' is a keyword in C++20.

https://en.cppreference.com/w/cpp/keyword/requires
2021-06-03 10:58:24 -07:00
Howard Hinnant
f1a9e8840f Add scope_exit utilities 2021-06-03 10:58:24 -07:00
Howard Hinnant
2c559116fb Remove unneeded header includes. 2021-06-03 10:58:24 -07:00
Nik Bougalis
4bedbd1d39 Remove unused code 2021-06-03 10:58:24 -07:00
Nik Bougalis
433feade5d Automatically determine the node size:
The `[node_size]` configuration parameter is used to tune various
parameters based on the hardware that the code is running on. The
parameter can take five distinct values: `tiny`, `small`, `medium`,
`large` and `huge`.

The default value in the code is `tiny` but the default configuration
file sets the value to `medium`. This commit attempts to detect the
amount of RAM on the system and adjusts the node size default value
based on the amount of RAM and the number of hardware execution
threads on the system.

The decision matrix currently used is:

|         |   1  | 2 or 3 |   ≥ 4  |
|:-------:|:----:|:------:|:------:|
|  > ~8GB | tiny |   tiny |   tiny |
| > ~12GB | tiny |  small |  small |
| > ~16GB | tiny |  small | medium |
| > ~24GB | tiny |  small |  large |
| > ~32GB | tiny |  small |   huge |

Some systems exclude memory reserved by the the hardware, the kernel
or the underlying hypervisor so the automatic detection code may end
up determining the node_size to be one less than "appropriate" given
the above table.

The detection algorithm is simplistic and does not take into account
other relevant factors. Therefore, for production-quality servers it
is recommended that server operators examine the system holistically
and determine what the appropriate size is instead of relying on the
automatic detection code.

To aid server operators, the node size will now be reported in the
`server_info` API as `node_size` when the command is invoked in
'admin' mode.
2021-06-03 10:58:24 -07:00
Scott Schurr
10e4608ce0 Improve unit test coverage of AccountDelete transactor 2021-06-03 10:58:24 -07:00
Scott Schurr
ff3d2e7c29 Use jtx::offer_cancel more places:
Replace explicit construction of OfferCancel transactions in unit
tests with calls to jtx::offer_cancel().
2021-06-03 10:58:24 -07:00
Scott Schurr
7822a28c87 Replace dirAdd() calls with dirAppend() or dirInsert(): 2021-06-03 10:58:24 -07:00
Scott Schurr
dcba79be48 Only warn on non-pseudo transactions without accounts:
Closes #3153
2021-06-03 10:58:24 -07:00
Scott Schurr
2a7c573dec Fix clang warnings about copies vs references:
A recent version of clang notes a number of places in range
for loops where the code base was making unnecessary copies
or using const lvalue references to extend lifetimes.  This
fixes the places that clang identified.
2021-06-03 10:58:24 -07:00
Scott Schurr
22cc9a254a Maintenance of Offer and PayStrand unit tests 2021-06-03 10:58:24 -07:00
Scott Schurr
09ae9168ca Remove some "Env::close" noise from unit test output 2021-06-03 10:58:24 -07:00
CJ Cobb
9eb9b8f631 Fix reporting mode build issue
* Add isCaughtUp() as a member function of RelationalDBInterfacePostgres
2021-06-03 10:58:24 -07:00
CJ Cobb
6298daba1a Support dns in gRPC connection for reporting ETL 2021-06-03 10:58:24 -07:00
Peng Wang
2eb1c6a396 Enable testing beta RPC API version with config 2021-06-02 13:37:40 -07:00
Peng Wang
7717056cf2 Add higher bound to validations to keep 2021-06-02 13:37:40 -07:00
seelabs
9fd5cd303d Do not use __func__ inside lambdas 2021-06-02 13:37:40 -07:00
seelabs
04ff6249d5 Support boost 1.76:
* remove unused `std::hash` specialization
* Use `std::chrono::floor` instead of `floor`
2021-06-02 13:37:40 -07:00
seelabs
fa9ecae2d6 Update doc specifying min gcc version:
* resolves https://github.com/ripple/rippled/issues/3782
* gcc 8 is required for the charconv include file
2021-06-02 13:37:40 -07:00
Devon White
62d2b76fa8 Advance shard store unittests 2021-06-02 13:37:30 -07:00
Devon White
d95aab1139 Add lookup DBs to the Relational DB Interface
* Create SQLite database for mapping transaction IDs to shard indexes
* Create SQLite database for mapping ledger hashes to shard indexes
* Create additional test cases for the shard database
2021-06-01 15:37:15 -07:00
Miguel Portilla
80c2302fd3 Extend peer shard info 2021-06-01 15:37:15 -07:00
Devon White
38f954fd46 Improve NodeStore to ShardStore imports
* Run the import process in a background thread
* Prevent online_delete from removing ledgers pending import
2021-06-01 15:37:15 -07:00
John Freeman
14b2f27c3e Remove dead code 2021-06-01 15:37:04 -07:00
John Freeman
a2a37a928a Redesign stoppable object pattern 2021-06-01 15:36:28 -07:00
manojsdoshi
c10c0be11b Merge master (1.7.2) into develop (1.8.0-b2) 2021-05-26 14:05:55 -07:00
manojsdoshi
34ee4ca0cb Set version to 1.7.2 2021-05-19 12:22:03 -07:00
Edward Hennis
30fd45890b Create comparator wrapper classes for MSVC 2019 build issues:
* The std::less and std::equal_to comparators have [[nodiscard]], which
  conflicts with boost::bimap validations.
2021-05-17 10:43:56 -07:00
Edward Hennis
36fe1966c3 Update version of vcpkg for Windows builds 2021-05-17 10:43:56 -07:00
seelabs
1bb99e5d3c Rm some offers where the quality is reduced:
Substantial reductions in an offer's effective quality from its
initial quality may clog offer books.
2021-05-07 15:02:23 -07:00
CJ Cobb
430802c1cf Add load_factor to server_info in reporting mode
* load_factor was missing from server_info when the server was running in
  reporting mode. Now, the reporting mode server calls server_info on the p2p
  node, and propagates the load_factor back to the client.
2021-05-07 14:58:29 -07:00
Nik Bougalis
9106a06579 Set version to 1.7.1 2021-04-01 13:40:41 -07:00
Nik Bougalis
79e69da364 Adjust OpenSSL defaults and mitigate CVE-2021-3499:
In order to effectively mitigate CVE-2021-3499 even when compiling
against versions of OpenSSL prior to 1.1.1k, this commit:

1) requires use of TLS 1.2 or later. Note that both TLS 1.0 and
   TLS 1.1 have been officially deprecated for over a year.
2) disables renegotiation support for TLS 1.2 connections.

Lastly, this commit also changes the default list of ciphers that
the server offers, limiting it only to ciphers that are part of
TLS 1.2.
2021-04-01 13:40:40 -07:00
CJ Cobb
73116297aa Properly encode results from the tx RPC command:
The `tx` command supports output in both "text" and "binary" modes,
controlled by the binary flag. For more details on the command and
the possible arguments, please see: https://xrpl.org/tx.html.

The existing handler would incorrectly deal with metadata when in
binary mode. This commit corrects this issue, ensuring that the
metadata is properly encoded, depending on the mode.
2021-04-01 13:21:02 -07:00
CJ Cobb
8579eb0c19 Maintain compatibility for forwarded RPC responses:
Typically, an RPC response contains a `result` field, which
contains details about the operation performed. For ease of
parsing, forwarded responses must look like a non-forwarded
response.

In some instances the response was incorrectly composed, so
that the actual `result` object would be encapsulated by an
outer `result` object, breaking existing code.

This commit, addresses this issue and correctly "folds" the
`result` field, ensuring a consistent schema for responses.
2021-04-01 10:40:05 -07:00
Mark Travis
9c8caddc5a Support HTTP health check in reporting mode. 2021-04-01 10:40:05 -07:00
manojsdoshi
2913847925 Set version to 1.8.0-b2 2021-04-01 10:39:22 -07:00
Crypto Brad Garlinghouse
cf8438fe1d Remove obsolete URLs and references to Ripple 2021-04-01 10:38:47 -07:00
cdy20
6d82fb83a0 Relational DB interface 2021-04-01 10:38:22 -07:00
CJ Cobb
207e1730e9 Serialize metadata as blob in tx RPC when binary flag is true 2021-04-01 10:37:46 -07:00
J. Scott Branson
f0424fe7dd Document parameters in example configuration file 2021-04-01 10:37:38 -07:00
Alloy Networks
2e456a835d Remove legacy protocol version (1.2) 2021-04-01 10:37:17 -07:00
Edward Hennis
ab9039e77d Create comparator wrapper classes for MSVC 2019 build issues:
* The std::less and std::equal_to comparators have [[nodiscard]], which
  conflicts with boost::bimap validations.
2021-03-18 14:12:41 -07:00
Howard Hinnant
9932a19139 Reduce coupling to date.h by calling C++17 chrono functions 2021-03-17 15:02:15 -07:00
Howard Hinnant
64e4a89470 Clarify the safety of NetClock::time_point arithmetic:
* NetClock::rep is uint32_t and can be error-prone when
  used with subtraction.
* Fixes #3656
2021-03-17 15:01:52 -07:00
manojsdoshi
9d89d4c188 Set version to 1.8.0-b1 2021-03-11 16:21:51 -08:00
Edward Hennis
b2bf2b6e6b Add instructions for resolving validation failures:
* Add instructions to the workflow at the point where the failure would
  occur, which is where someone experiencing a failure is most likely to
  look. To keep things simple, the instructions are always printed. The
  assumption is that if the job succeeds, nobody is likely to look
  anyway.
* Provides the diff of the failure as an artifact, so the user can apply
  it directly to their repo.
* Also update the levelization/README.md to clarify the levels a little
  bit.
2021-03-11 14:35:31 -08:00
Scott Schurr
3b33318dc8 Prefer std::optional over boost:optional:
Some of the boost::optionals must remain for now.  Both
boost::beast and SOCI have interfaces that require
boost::optional.
2021-03-11 14:35:31 -08:00
Scott Schurr
85307b29d0 Add constexpr constructor for base_uint 2021-03-11 14:35:31 -08:00
John Northrup
95426efb8a Update to use Ripple Artifactory for docker cache
This updates the build process to use the local Artifactory server as a docker image cache to avoid being rate limited by docker hub during the build process.
2021-03-11 14:35:31 -08:00
CJ Cobb
3e2b568ef9 Add list of dependencies for building reporting mode 2021-03-11 14:35:31 -08:00
Nik Bougalis
a06525649d Use libsecp256k1 instead of OpenSSL for key derivation:
While most of the code associated with secp256k1 operations had
been migrated to libsecp256k1, the deterministic key derivation
code was still using calls to OpenSSL.

If merged, this commit replaces the OpenSSL-based routines with
new libsecp256k1-based implementations. No functional change is
expected and the change should be transparent.

This commit also removes several support classes and utility
functions that wrapped or adapted various OpenSSL types that
are no longer needed.

A tip of the hat to the original author of this truly superb
library, Dr. Pieter Wuille, and to all other contributors.
2021-03-11 14:35:31 -08:00
Nik Bougalis
b4699c3b46 Improve the Byzantine validator detector:
This commit expands the detection capabilities of the Byzantine
validation detector. Prior to this commit, only validators that
were on a server's UNL were monitored. Now, all the validations
that a server receives are passed through the detector.
2021-03-11 14:35:31 -08:00
Nik Bougalis
27d978b891 Simplify SHAMapItem construction:
The existing class offered several constructors which were mostly
unnecessary. This commit eliminates all existing constructors and
introduces a single new one, taking a `Slice`.

The internal buffer is switched from `std::vector` to `Buffer` to
save a minimum of 8 bytes (plus the buffer slack that is inherent
in `std::vector`) per SHAMapItem instance.
2021-03-11 14:35:30 -08:00
cdy20
f91b568069 Add support for deterministic database shards (#2688):
Add support to allow multiple indepedent nodes to produce a binary identical
shard for a given range of ledgers. The advantage is that servers can use
content-addressable storage, and can more efficiently retrieve shards by
downloading from multiple peers at once and then verifying the integrity of
a shard by cross-checking its checksum with the checksum other servers report.
2021-03-10 16:53:36 -08:00
Howard Hinnant
06bd16c928 Simplify basic_seconds_clock:
* Remove unneeded vector of workers and associated mutex
* Remove unneeded generic worker
* Remove unneeded Clock template parameter
2021-03-10 16:53:18 -08:00
manojsdoshi
c0a0b79d2d Set version to 1.7.0 2021-02-23 12:51:24 -08:00
manojsdoshi
1d5d902d28 Set version to 1.7.0-rc4 2021-02-18 18:26:17 -08:00
Mark Travis
f284a19246 Don't delete from tx table if it's not in use 2021-02-18 18:24:39 -08:00
manojsdoshi
735b8b7d48 Set version to 1.7.0-rc3 2021-02-12 13:33:37 -08:00
Scott Schurr
a2e1a7a84d TicketSequence with non-zero Sequence is an error:
Before this change any non-zero Sequence field was handled as
a non-ticketed transaction, even if a TicketSequence was
present.  We learned that this could lead to user confusion.
So the rules are tightened up.

Now if any transaction contains both a non-zero Sequence
field and a TicketSequence field then that transaction
returns a temSEQ_AND_TICKET error code.

The (deprecated) "sign" and "submit" RPC commands are tuned
up so they auto-insert a Sequence field of zero if they see
a TicketSequence in the transaction.

No amendment is needed because this change is going into
the first release that supports the TicketBatch amendment.
2021-02-12 13:33:26 -08:00
John Freeman
c138338358 Fix declaration of CassandraBackend::counters_ 2021-02-12 13:32:33 -08:00
Ikko Ashimine
e7eba93666 Fix typo in aged_unordered_container.h 2021-02-12 12:42:22 -08:00
Edward Hennis
93ea4b2f4f Fix a typo in the [sqlite] section description 2021-02-12 12:38:01 -08:00
CJ Cobb
5776c2ebe5 Document secure_gateway for gRPC 2021-02-12 12:37:32 -08:00
manojsdoshi
8defb4cd28 Set version to 1.7.0-rc2 2021-02-04 19:13:14 -08:00
Miguel Portilla
d358495f02 Add database counters:
Fix bug where DatabaseRotateImp::getBackend and ::sync utilized the writable
backend without a lock. ::getBackend was replaced with ::getCounters.
2021-02-04 19:10:28 -08:00
Gregory Tsipenyuk
38dd2d6677 Fix idle peer timer:
This commit fixes  #3754
2021-02-04 19:10:01 -08:00
manojsdoshi
80bd107e57 Set version to 1.7.0-rc1 2021-01-29 12:01:56 -08:00
manojsdoshi
68286df23d Set version to 1.7.0-b12 2021-01-26 11:26:17 -08:00
Edward Hennis
d494d7a725 Use 64-bit Visual Studio build tools in documentation and Travis 2021-01-26 11:26:02 -08:00
seelabs
36be4856fd Fix path finding for XRP dst and sendmax:
* Fix bug where incorrect max amount was set for XRP
* Fix bug where incorrect source currencies were set when XRP was the dst and a
  sendmax amount was set
2021-01-25 18:49:49 -08:00
seelabs
c47b4f3667 Improve canonicalization of serialized amounts:
The existing code that deserialized an STAmount was sub-optimal and performed
poorly. In some rare cases the operation could result in otherwise valid
serialized amounts overflowing during deserialization. This commit will help
detect error conditions more quickly and eliminate the problematic corner cases.
2021-01-25 18:49:49 -08:00
seelabs
fe129e8e4f Optimize payment path exploration in flow:
* Use theoretical quality to order the strands
* Do not use strands below the user specified quality limit
* Stop exploring strands (at the current quality iteration) once any strand is non-dry
2021-01-25 18:49:49 -08:00
John Freeman
0a1fb4e6ca Reduce nesting and remove dead code 2021-01-25 18:49:49 -08:00
Peng Wang
7e97bfce10 Implement ledger forward replay 2021-01-25 18:49:49 -08:00
cdy20
49409dbf27 Added document describing why 16k-ledgers shards
are better than 8k- and 32k-ledgers
2021-01-25 18:49:43 -08:00
mDuo13
c3227a67ec Fix telBAD_PUBLIC_KEY message:
The previous error description was focused on keys that are too long,
but this error can occur if the key is too short or does not contain
the correct prefix.
2021-01-25 13:44:31 -08:00
Elliot Lee
a4a46a491f Update validators-example.txt 2021-01-25 13:44:16 -08:00
manojsdoshi
c11037fd27 Set version to 1.7.0-b11 2021-01-20 16:33:19 -08:00
Miguel Portilla
114981f774 Include missing header in json_reader 2021-01-20 16:32:59 -08:00
CJ Cobb
27543170d0 Add Reporting Mode
* Add a new operating mode to rippled called reporting mode
* Add ETL mechanism for a reporting node to extract data from a p2p node
* Add new gRPC methods to faciliate ETL
* Use Postgres in place of SQLite in reporting mode
* Add Cassandra as a nodestore option
* Update logic of RPC handlers when running in reporting mode
* Add ability to forward RPCs to a p2p node
2021-01-20 11:30:03 -08:00
Mark Travis
b0a39c5f86 Add Postgres functionality 2021-01-20 10:53:24 -08:00
John Freeman
4fbb1699be Add start-sync-stop Python script 2021-01-20 10:53:24 -08:00
Wietse Wind
319f29da8d Update ripple.com » xrpl.org links 2021-01-20 10:53:24 -08:00
Nik Bougalis
70bacb349e Improve manifest relaying and domain reporting:
- The changes to manifest relaying introduced with commit f74b469e68
  will cause newly accepted manifests to be sent back to the peer from
  which they were received. This no longer happens: a newly accepted
  manifest is never sent back to the peer we received it from.
- When encountering a manifest without a domain set, the `manifest` and
  `validator_info` commands would include an empty string as the domain
  associated with the manifest. This no longer happens: if a domain is
  not present, the `domain` field will not be.
2021-01-20 10:53:24 -08:00
Nik Bougalis
012bbcfe36 Fix parsing of node public keys in manifest CLI:
The existing code attempts to validate the provided node public key
using a function that assumes that the encoded public key is for an
account. This causes the parsing to fail.

This commit fixes #3317 by letting the caller specify the type of
the public key being checked.
2021-01-20 10:51:07 -08:00
Nik Bougalis
f74b469e68 Improve manifest relaying:
The manifest relay code would only ever relay manifests from validators
on a server's UNL which means that the manifests of validators that are
not broadly trusted can fail to propagate across the network, which can
make it difficult to detect and track such validators.

This commit, if merged, propagates all manifests on a best-effort basis
resulting in broader availability of manifests on the network and avoid
the need to introduce on-ledger manifest storage or to establish one or
more manifest repositories.
2021-01-20 10:51:04 -08:00
Nik Bougalis
55dc7a252e Set version to 1.7.0-b10 2021-01-09 13:50:07 -08:00
Nik Bougalis
b015623128 Add missing include headers 2021-01-09 13:50:07 -08:00
Nik Bougalis
c76a124d14 Remove unused Beast code 2021-01-09 13:50:06 -08:00
Gregory Tsipenyuk
74d96ff4bd Add experimental validation & proposal relay reduction support:
- Add validation/proposal reduce-relay feature negotiation to
  the handshake
- Make squelch duration proportional to a number of peers that
  can be squelched
- Refactor makeRequest()/makeResponse() to facilitate handshake
  unit-testing
- Fix compression enable flag for inbound peer
- Fix compression algorithm parsing in the header parser
- Fix squelch duration in onMessage(TMSquelch)

This commit fixes 3624, fixes 3639 and fixes 3641
2021-01-09 13:49:40 -08:00
Scott Schurr
44fe0e1fc4 Add support for the 'TicketBatch' amendment:
Support for 'out-of-sequence' transaction execution was introduced
in commit 7724cca384.

The changes in that commit were gated under a feature but there was
no corresponding amendment introduced that would allow the network
to vote on this amendment.

This commit introduces 'TicketBatch' amendment as the amendment
that is associated with the tickets feature. If the amendment is
enabled, it will activate support for tickets.

This commit also removes several workarounds that are no longer
needed in unit tests.
2021-01-08 14:43:06 -05:00
John Freeman
78245a072c Clean-up the Stoppable architecture 2021-01-08 14:43:06 -05:00
Miguel Portilla
1fd1c34112 Prevent deadlock in storeSQLite 2021-01-08 14:43:06 -05:00
Edward Hennis
0dae22adf2 Prevent simultaneous outgoing async peer messages:
* Also, only send validator list on incoming connection instead of both
  incoming and outgoing.
2021-01-08 14:43:06 -05:00
Edward Hennis
746181cb33 Analyze and document levelization:
* Markdown explanation of what levelization is, the intended levels, as
  well as the process used to determine dependencies
* Shell script finds all dependencies, groups them, and finds cyclic
  dependencies and maps out non-cyclic dependencies.
* Github job to run the script and fail if anything changes. Should
  catch introduction of new dependencies and new problems. Will also
  detect changes if problems or dependencies are removed.
2021-01-08 14:43:02 -05:00
Edward Hennis
4b9d3ca7de Support UNLs with future effective dates:
* Creates a version 2 of the UNL file format allowing publishers to
  pre-publish the next UNL while the current one is still valid.
* Version 1 of the UNL file format is still valid and backward
  compatible.
* Also causes rippled to lock down if it has no valid UNLs, similar to
  being amendment blocked, except reversible.
* Resolves #3548
* Resolves #3470
2021-01-08 12:35:08 -05:00
Nik Bougalis
54da532ace Set version to 1.7.0-b9 2020-12-18 15:23:31 -08:00
Gregory Tsipenyuk
4159b02753 Properly handle the "compression" flag:
- Fix compression enable flag in the inbound peer
- Fix compression algorithm fetching in protocol message
2020-12-18 15:23:26 -08:00
Edward Hennis
42a068ab5e Force wipe the travis caches with "travis_clean_cache" 2020-12-18 15:23:26 -08:00
Edward Hennis
6f7d413d88 Simplify travis config:
* Move all the vcpkg windows dependency installations into one step.
* Move the unmodified `before_install` step above the matrix to improve
  readability, because this step runs before any of the matrix steps.
2020-12-18 15:23:26 -08:00
Edward Hennis
1aaafeb57b Reset corrupt / inconsistent dependency source folders:
* Also display some more information about the build
2020-12-18 15:23:26 -08:00
JoelKatz
6dd3d825c8 Adjust time resolution of genesis ledger:
Due to some quirky emergent behavior, the server can't really begin
synching until twice the default close time resolution of the genesis
ledger, which is 30 seconds, has passed. In effect, this causes a one
minute delay.

This commit adjusts the default close time resolution down to the
minimum allowed resoluion of 10 seconds, so the corresponding delay
is reduced by 67% down to 20 seconds. This should be enough time to
ensure the server has reasonable connectivity without unduly delaying
initial synch times.
2020-12-18 15:23:26 -08:00
JoelKatz
02ccdeb94e Rework deferred node logic and async fetch behavior
This comment explains this patch and the associated patches
that should be folded into it. This paragraph should be removed
when the patches are folded after review.

This change significantly improves ledger sync and fetch
times while reducing memory consumption. The change affects
the code from that begins with SHAMap::getMissingNodes and runs
through to Database::threadEntry.

The existing code issues a number of async fetches which are then
handed off to the Database's pool of read threads to execute.
The results of each read are placed in the Database's positive
and negative caches. The caller waits for all reads to complete
and then retrieves the results out of these caches.

Among other issues, this means that the results of the first read
cannot be processed until the last read completes. Additionally,
all the results must sit in memory.

This patch changes the behavior so that each read operation has a
completion handler associated with it. The completion of the read
calls the handler, allowing the results of each read to be
processed as it completes. As this was the only reason the
negative and positive caches were needed, they can now be removed.

The read generation code is also no longer needed and is removed.
The batch fetch logic was never implemented or supported and is
removed.
2020-12-17 09:11:39 -08:00
seelabs
7b192945eb Replace std::pmr with boost::pmr:
gcc's implementation of `prm::synchronized_pool_resource` showed
extremely poor performance compared with
`boost::synchronized_pool_resouece`. Boost's implementation of pmr is
now used in all cases (previously it was only used when a standard
lib, like clang's, lacked an implementation of pmr).

This patch also makes a minor change where inner nodes are constructed
with sparse arrays, unless "dense" is explicitly requested.
2020-12-17 09:11:37 -08:00
Howard Hinnant
28ed2b9e69 Persist API-configured voting settings:
Prior to this commit, the amendments that a server would vote in support
of or against could be configured both via the configuration file and
via the command line "feature" command. Changes made in the configuration
file would only be loaded once at server startup and changes made via the
command line take effect immediately but are not persisted across
restarts.

This commit deprecates management of amendments via the configuration
file and stores the relevant information in the `wallet.db` database
file.

1. On startup, the new code parses the configuration file.
2. If the `[veto_amendments]` or `[amendments]` sections are present,
   we check if the `FeatureVotes` table is present in `wallet.db`.
3. If it is not, we create the `FeatureVotes` table and transfer the
   settings from the config file.
4. Proceed normally but only reference the `FeatureVotes` table instead
   of the config file.
5. Warns if the voting table already exists in `wallet.db` and there
   exists voting sections in the config file. The config file is ignored
   in this case.

This change addresses & closes #3366
2020-12-17 05:56:17 -08:00
Nik Bougalis
24b17c6de9 Set version to 1.7.0-b8 2020-12-12 04:51:02 -08:00
Edward Hennis
6eb93e9f8a Fix nested locks in ValidatorList:
* Found several functions called under lock that take a lock. Refactor
  to require a lock as a parameter instead.
* Found several functions called under lock that don't take a lock, but
  should. Refactored those as well to require a lock as a parameter.
2020-12-12 04:50:59 -08:00
Danil Nemirovsky
8173d1f643 Add pkg-config package to linux build guide 2020-12-12 04:50:59 -08:00
seelabs
b29812e40b Fix double counting unit test failures:
Unit tests are counting test failures, process crashes, and process exit code
failures in the count. Since a failing tests causes the process exit code to
return failure, we get extra counts. This patch removes process exit code
failures from the count.
2020-12-12 04:50:59 -08:00
seelabs
183dcd08d9 Remove ReadViewFwdRange end iterator cache:
ReadViewFwdRange was storing a cached `end_` iterator that was lazily
created in an iterators `end()` function. When the cache is empty, and
the range it iterated from multiple threads, this creates a race
condition.

This change has performance consequences for "old style" for loops.
For example:

```
 // don't do this
for(auto i = tx_range.begin(); i != tx_range.end(); ++i)

```

Can call the now expensive `end()` function more often than needed.
Range-based for loop (I.e. `for(auto const& t : tx_range)`) should be
used instead.
2020-12-12 04:50:59 -08:00
Nik Bougalis
deea16e14f Correct handling of corner-cases involving custom iterators:
- Under some conditions, comparing `ReadViewFwdRange::iterators`
  for equality could derefence an empty `std::unique_ptr` which
  will result in a crash.
- Misuse of the `equal` API could result in a `std::bad_cast`
  exception being thrown from when iterating transactions or
  SLEs from the `OpenView`, `RawStateTable` and `Ledger` classes.
2020-12-12 04:50:59 -08:00
Edward Hennis
e96a719724 Fix compiler warnings & linker errors:
Changes introduced with 1.7.0-b5 and 1.7.0-b6 could result in compiler
warnings and/or linker errors when compiling in certain configurations.
2020-12-11 15:45:12 -08:00
Edward Hennis
8e38d8e6f0 Add clang release builds to CI 2020-12-11 15:45:08 -08:00
Nik Bougalis
a0b862bbf7 Set version to 1.7.0-b7 2020-12-09 05:54:53 -08:00
Nik Bougalis
434e2f4cbf Set version to 1.7.0-b6 2020-12-09 08:50:42 -05:00
seelabs
cb0572d66e Store InnerNode children in sparse arrays:
A large percentage of inner nodes only store a small number of children. Memory
can be saved by storing the inner node's children in sparse arrays. Measurements
show that on average a typical SHAMap's inner nodes can be stored using only 25%
of the original space.
2020-12-09 08:50:42 -05:00
Nik Bougalis
5c8e072b7f Set version to 1.7.0-b5 2020-12-04 12:45:16 -08:00
Nik Bougalis
e39c452f31 Simplify processing of inbound ledger data 2020-12-04 12:45:14 -08:00
Nik Bougalis
1bb294afbc Refactor and improve the SHAMap code:
This commit combines a number of cleanups, targeting both the
code structure and the code logic. Large changes include:

 - Using more strongly-typed classes for SHAMap nodes, instead of relying
   on runtime-time detection of class types. This change saves 16 bytes
   of memory per node.
 - Improving the interface of SHAMap::addGiveItem and SHAMap::addItem to
   avoid the need for passing two bool arguments.
 - Documenting the "copy-on-write" semantics that SHAMap uses to
   efficiently track changes in individual nodes.
 - Removing unused code and simplifying several APIs.
 - Improving function naming.
2020-12-04 12:45:13 -08:00
Nik Bougalis
5def79e93c Track counts of SHAMap-related objects 2020-12-04 12:45:12 -08:00
Nik Bougalis
f072469409 Simplify & modernize code:
- Simplify and consolidate code for parsing hex input.
- Replace beast::endian::order with boost::endian::order.
- Simplify CountedObject code.
- Remove pre-C++17 workarounds in favor of C++17 based solutions.
- Improve `base_uint` and simplify its hex-parsing interface by
  consolidating the `SexHex` and `SetHexExact` methods into one
  API: `parseHex` which forces callers to verify the result of
  the operation; as a result some public-facing API endpoints
  may now return errors when passed values that were previously
  accepted.
- Remove the simple fallback implementations of SHA2 and RIPEMD
  introduced to reduce our dependency on OpenSSL. The code is
  slow and rarely, if ever, exercised and we rely on OpenSSL
  functionality for Boost.ASIO as well.
2020-12-04 12:45:12 -08:00
Nik Bougalis
4a444f7d60 Simplify SHAMapTreeNode APIs:
- Provide separate functions for serializing depending on whether
  one wants a "wire" version of a node, or one suitable for hashing.
- Remove unused functions
2020-12-04 12:45:11 -08:00
Nik Bougalis
ab77444fa3 Simplify SHAMapNodeID:
The existing SHAMapNodeID object has both a valid and an invalid state
and requirs callers to verify the state of an instance prior to using
it. A simple set of changes removes that restriction and ensures that
all instances are valid, making the code more robust.

This change also:

1. Introduces a new function to construct a SHAMapNodeID from a
   serialized blob; and
2. Reduces the amount of constructors the class exposes.
2020-12-04 12:45:11 -08:00
Nik Bougalis
57ffc58613 Optimize peer I/O:
- Limit the lifetime of a buffer that was only used in the early
  phases of peer connection establishment but which lived on as
  long as the peer was active.
- Cache the message used to transfer manifests, so it can be reused
  instead of recreated for every peer connection.
- Improve the reading of partial messages by passing a hint to the
  I/O layer if the number of bytes needed to complete the message
  is known.
2020-12-04 12:45:10 -08:00
Nik Bougalis
8c386ae07e Reduce PING frequency and simplify logic:
The existing code issues a PING to each peer every 8 seconds. While
frequent PINGs allow us to estimate a peer's latency with a high
degree of accuracy, this "inter-server polka dance" is inefficient
and not useful. This commit, if merged, reduces the PING frequency
to once every 60 seconds.

Additionally, this commit simplifies the PING handling logic and
merges the code used to check and disconnect peers which fail to
track the network directly into the timer callback.
2020-12-04 12:45:10 -08:00
Nik Bougalis
cba6b4a749 Improve handling of peers that aren't synced:
When evaluating the fitness and usefulness of an outbound peer, the code
would incorrectly calculate the amount of time that the peer spent in
a non-useful state.

This commit, if merged, corrects the calculation and makes the timeout
values configurable by server operators.

Two new options are introduced in the 'overlay' stanza of the config
file. The default values, in seconds, are:

[overlay]
max_unknown_time = 600
max_diverged_time = 300
2020-12-04 12:45:09 -08:00
Nik Bougalis
64191a4b13 Update Travis build matrix:
The Travis build matrix included builds for gcc 7 and clang 7 which
do not appear to have sufficient C++17 support to compile rippled
any longer.
2020-12-04 12:45:09 -08:00
Nik Bougalis
9bd6b249ce Remove a pre-C++17 workaround for std::is_invocable_r 2020-12-04 12:45:08 -08:00
Gregory Tsipenyuk
bec6c626d8 Add finer-grained control for incoming & outgoing peer limits:
This commit replaces the `peers_max` configuration element which had
a predetermined split between incoming and outgoing connections with
two new configuration options, `peers_in_max` and `peers_out_max`,
which server operators can use to explicitly control the number of
incoming and outgoing peer slots.
2020-12-04 12:44:19 -08:00
Devon White
7ddf856d58 Temper excessive warnings about historical shard
capacity
2020-12-04 12:44:19 -08:00
Howard Hinnant
a3915fa5c4 Switch to boost::shared_mutex:
* Avoid std::shared_mutex bug on ubuntu 18.04
* Fixes #3663
2020-12-04 12:44:19 -08:00
Scott Schurr
17abca1caa Use macros to instantiate most SField instances:
There have been cases in the past where SFields have been defined
in such a way that they did not follow our conventions.  In
particular, the string representation of an SField should match
the in-code name of the SField.

This change leverages the preprocessor to encourage SFields to
be properly constructed.

The suffixes of SField types are changed to be the same as
the suffixes of corresponding SerializedTypeIDs.  This allows
The preprocessor to match types using simple name pasting.

Since the string representation of the SField is part of our
stable API, the name of sfPayChannel was changed to sfChannel.
This change allows sfChannel to follow our conventions while
making no changes to our external API.
2020-12-04 12:44:19 -08:00
John Northrup
f239050054 Remove DinD Service from container build template (#3676)
* Remove DinD Service from container build template

DinD has changed how it works on GItLab due to recent docker changes such that the service no long needs to be called so long as the runner is being run on a `docker-X` tagged machine.

* refactor for docker service on normal node
2020-12-03 23:43:21 -06:00
manojsdoshi
76a6956138 Set version to 1.7.0-b4 2020-11-19 10:59:46 -08:00
Devon White
cf5ca9a5cf Download queued shards only if there is space for them all 2020-11-19 10:57:13 -08:00
Edward Hennis
77ec62e9c8 Always check the sequence when adding to the transaction queue:
* If multiple transactions are queued for the account, change the
  account's sequence number in a temporary view before processing the
  transaction.
* Adds a new "at()" interface to STObject which is identical to the
  operator[], but easier to write and read when dealing with ptrs.
* Split the TxQ tests into two suites to speed up parallel run times.
2020-11-18 13:25:27 -08:00
Edward Hennis
a3f2196d4e Test cancelling offers that are still in the TxQ 2020-11-18 13:25:27 -08:00
seelabs
d89c158a77 Replace qalloc with boost::pmr 2020-11-18 13:25:27 -08:00
Miguel Portilla
ef53197e1f Fix ledger sequence on copynode 2020-11-18 13:07:52 -08:00
Miguel Portilla
8707c15b9c Use NuDB burst size and use NuDB version 2.0.5 2020-11-18 13:07:26 -08:00
manojsdoshi
0b4e34b03b Set version to 1.7.0-b3 2020-10-14 11:19:09 -07:00
Miguel Portilla
6968da153c Fix improper promotion of bool on return 2020-10-14 11:17:44 -07:00
Miguel Portilla
03c809371a Add Shard pool management 2020-10-14 11:17:44 -07:00
Nik Bougalis
d282b0bf85 Report server domain to other servers:
This commit introduces a new configuration option that server
operators can set. The value is communicated to other servers
and is also reported via the `server_info` API.

The value is meant to allow third-party applications or tools
to group servers together. For example, a tool that visualizes
the network's topology can group servers together.

Similar to the "Domain" field in validator manifests, an operator
can claim any domain. Prior to relying on the value returned, the
domain should be verified by retrieving the xrp-ledger.toml file
from the domain and looking for the server's public key in the
`nodes` array.
2020-10-14 11:17:44 -07:00
Edward Hennis
efa615a5e3 Improve Windows and MacOS test performance in Travis CI:
* Increases hard-coded number of parallel unit test processes for
  Windows and MacOS builds from 1 to 2.
* Reduces Travis job time to well under the timeout value of 1.5 hours.
* Continue using a hard-coded value rather than `nprocs` because higher
  values cause some jobs to run out of memory.
2020-10-14 11:17:44 -07:00
Edward Hennis
068db1f48b Generalize unit test that depends on number of amendments 2020-10-13 11:31:54 -07:00
Devon White
afacbe2a3a Update shard db sections in the example config file 2020-10-13 11:31:54 -07:00
Devon White
f8a0ef8f87 Delay HTTPDownloader dtor until current session finishes 2020-10-13 11:31:54 -07:00
Carl Hua
e1a2939f89 Set version to 1.7.0-b2 2020-09-21 08:43:37 -04:00
Carl Hua
95da398e7d Update manifest RPC to be public 2020-09-21 08:43:16 -04:00
Scott Schurr
52adcc73d9 Add unit tests to check synchronization of KnownFormats and gRPC 2020-09-17 15:05:59 -07:00
Edward Hennis
dbde686a97 Improve reporting of unusual unit test failures:
* Jobs with no unit tests are counted as failures. Resolves #3474
* Crashed processes are counted as failures. Resolves #3600
* Any tests specified on the command line test do not have matching
  suites are counted as failures.
* Remove unused CI manual test.
2020-09-17 15:05:36 -07:00
seelabs
1129110be3 Document unused SHAMap constructor parameter 2020-09-17 15:05:15 -07:00
Nathan Nichols
a26a175957 Add GRPCServer to Stoppable Hierarchy 2020-09-17 15:05:06 -07:00
Nathan Nichols
795de3a75a Load transaction metadata from SQLite:
When processing the `tx` command, we will now load both the transaction
and its metadata directly from SQLite.

Previously the `tx` RPC call was querying SQLite for the transaction
and then separately querying the key-value store for the metadata.
2020-09-17 15:01:37 -07:00
Nathan Nichols
8116b569c7 Refactor AccountLinesRPC no_ripple_default logic 2020-09-17 15:01:37 -07:00
Devon White
2bba79138f Support shard downloading via HTTP or HTTPS 2020-09-17 15:01:22 -07:00
Nik Bougalis
a8d481c2a5 Set version to 1.7.0-b1 2020-09-01 16:39:07 -07:00
Nik Bougalis
85fc1e8235 Remove legacy support for endpoint dissemination:
Support for IPv6 messages was added with commit 08382d866b
and version 1.1.0. No peer presently connected to the network in a useful capacity fails
to understand v2 messages.

This commit removes the code that generates and processes v1 messages and deletes legacy
messages from the protocol buffer definition file.
2020-09-01 16:39:00 -07:00
Miguel Portilla
ab4102a632 Improve shard finalize memory utilization 2020-09-01 16:39:00 -07:00
Howard Hinnant
4ae2f06be4 Remove unused nullConstSHAMapItem
This commit fixes #3550.
2020-09-01 16:39:00 -07:00
Crypto Brad Garlinghouse
831e03ad2a Update Base58 codec and remove Bitcoin support:
Use C++17 constant expressions to calculate the inverse
alphabet map at compile time instead of at runtime.

Remove support for encoding & decoding tokens using the
Bitcoin alphabet.
2020-09-01 16:39:00 -07:00
seelabs
ab9f3fa42a Remove assert from Keylet:
Some transactions specify a keylet directly (Checks, for example). In those
cases, the assert will trigger even though there is no error.
2020-09-01 16:39:00 -07:00
Richard Holland
13b8359de6 Reserve transaction type and error codes for event hooking:
Event hooks will allow accounts to introduce configurable behavior
in response to send and receive events.
2020-09-01 16:39:00 -07:00
Nathan Nichols
660d9c1602 Make the transaction job queue limit adjustable:
The job queue can impose limits of how many jobs of a particular
type can be queued.

This commit makes the previously hard-coded limit associated with
transactions configurable by the server's operator. Servers that
have increased memory capacity or which expect to see an influx
of transactions can increase the number of transactions their
server will be able to queue.

This commit fixes #3556.
2020-09-01 16:39:00 -07:00
Nathan Nichols
b1d47c65d4 Add public_key to the "vl" method response:
The "/vl" HTTP endpoint can be used to request a particular
UNL from a rippled instance.

This commit, if merged, includes the public key of the requested
list in the response.

This commit fixes #3392
2020-09-01 16:39:00 -07:00
Devon White
271e79095b Consolidate programmer documentation on sharding 2020-09-01 16:39:00 -07:00
Devon White
6c268a3e9c Allow multiple paths for shard storage:
* Distinguish between recent and historical shards
* Allow multiple storage paths for historical shards
* Add documentation for this feature
* Add unit tests
2020-09-01 16:39:00 -07:00
Elliot Lee
e5ff70f606 Add pull request template
Based on the PR template used by xpring-eng:

https://raw.githubusercontent.com/xpring-eng/.github/master/.github/pull_request_template.md
2020-09-01 16:39:00 -07:00
Gregory Tsipenyuk
801b1580f5 Improve handling of RPC ledger_index argument:
Some RPC commands return `ledger_index` as a quoted numeric
string. This change allows the returned value to be directly
copied and used for follow-on RPC commands.

This commit fixes #3533
2020-09-01 16:39:00 -07:00
Gregory Tsipenyuk
707868be33 Implement sticky DNS resolution for validator list retrieval:
When attempting to load a validator list from a configured
site, attempt to reuse the last IP that was successfully
used if that IP is still present in the DNS response.

Otherwise, randomly select an IP address from the list of
IPs provided by the DNS system.

This commit fixes #3494.
2020-09-01 10:37:19 -07:00
Gregory Tsipenyuk
9b9f34f881 Optimize relaying of validation and proposal messages:
With few exceptions, servers will typically receive multiple copies
of any given message from its directly connected peers. For servers
with several peers this can impact the processing latency and force
it to do redundant work. Proposal and validation messages are often
relayed with extremely high redundancy.

This commit, if merged, introduces experimental code that attempts
to optimize the relaying of proposals and validations by allowing
servers to instruct their peers to "squelch" delivery of selected
proposals and validations. Servers making squelching decisions by
a process that evaluates the fitness and performance of a given
server and randomly selecting a subset of the best candidates.

The experimental code is presently disabled and must be explicitly
enabled by server operators that wish to test it.
2020-09-01 09:07:32 -07:00
Scott Schurr
7724cca384 Implement enhanced Ticket support:
Tickets are a mechanism to allow for the "out-of-order" execution of
transactions on the XRP Ledger.

This commit, if merged, reworks the existing support for tickets and
introduces support for 'ticket batching', completing the feature set
needed for tickets.

The code is gated under the newly-introduced `TicketBatch` amendment
and the `Tickets` amendment, which is not presently active on the
network, is being removed.

The specification for this change can be found at:
https://github.com/xrp-community/standards-drafts/issues/16
2020-09-01 08:58:57 -07:00
manojsdoshi
01bd5a2646 Set version to 1.6.0 2020-08-18 15:33:02 -07:00
manojsdoshi
2b44868373 Set version to 1.6.0-rc3 2020-08-07 13:45:44 -07:00
seelabs
f79a4a8cdb Revert "Remove CryptoConditionsSuite stub amendment:"
This reverts commit d3798f6290.
2020-08-07 13:45:22 -07:00
seelabs
7bb6b75f3c Use the correct root hash for the tx tree 2020-08-07 11:17:48 -07:00
Nik Bougalis
e5d17a9452 Set version to 1.6.0-rc2 2020-08-06 10:14:03 -07:00
manojsdoshi
dbd5f0073e Revert support for deterministic shards:
Commit 4dc08f8202 introduced support for
deterministic shards, which makes the sharding functionality provided
by rippled more useful.

After merging, several opportunities for further improvements to the
deterministic sharding implementation were identified and a significant
increase int memory usage during shard finalization was detected.

Because of these issues, the commit is being reverted and the feature is
being rolled back. It will be reintroduced in a future release.
2020-08-06 10:11:55 -07:00
Peng Wang
12c0e8148b Improve naming of fields associated with the NegativeUNL 2020-08-06 10:05:43 -07:00
Edward Hennis
72a9a2bdbb Reorder the Travis build:
* Builds Windows dependencies first.
* Builds ALL OSs in the last stage.
* Fix the MacOS builds.
* Windows dependency stages are allowed to fail so ALL configurations will
  attempt to build. Windows builds will probably fail if dependencies fail
  (caching may allow them to succeed), but they will at least be attempted.
* Remove broken AppVeyor config file, so it stops trying.
2020-08-06 10:05:43 -07:00
seelabs
80860fa8f5 Add preliminary support for Boost 1.74 2020-08-06 10:05:43 -07:00
seelabs
8cf542abb0 Fix memory management issues with checkpointers:
The checkpointer class had assumed that the database would exist for the
lifetime of the application. This is no long true. These changes resolve bugs
involving dangling pointers.
2020-08-06 10:05:43 -07:00
seelabs
a931b020b5 Switch to updated date library exception handling:
Without defining `HAS_UNCAUGHT_EXCEPTIONS` the date library would use the
deprecated `uncaught_exception` which would generate a warning.
2020-08-06 09:56:04 -07:00
seelabs
d317060ae4 Fix a race condition with TrustedPublisherServer:
There was a race condition in `on_accept` where the object's destructor
could run while `on_accept` was called.

This patch ensures that if `on_accept` is called then the object remains
valid for the duration of the call.
2020-08-06 09:56:04 -07:00
seelabs
eee07a4f96 Add missing cstdint include 2020-08-06 09:55:37 -07:00
manojsdoshi
7b048b423e Set version to 1.6.0-rc1 2020-07-08 13:40:03 -07:00
manojsdoshi
a459206848 Set version to 1.6.0-b9 2020-07-08 13:38:27 -07:00
Howard Hinnant
3a3b0b4c14 Modify health check API
* Fixes #3486
* load factor computation normalized by load_base.
* last validated ledger age set to -1 while syncing.
* Return status changed:
*    healthy  -> ok
*    warning  -> service_unavailable
*    critical -> internal_server_error
2020-07-08 13:35:07 -07:00
manojsdoshi
de0c527387 Set version to 1.6.0-b8 2020-06-30 12:40:51 -07:00
manojsdoshi
b54453d1a7 Fix a build issue caused by pip3 being unavailable 2020-06-30 09:15:37 -07:00
Peng Wang
706ca874b0 Implement negative UNL functionality:
This change can help improve the liveness of the network during periods of network
instability, by allowing the network to track which validators are presently not online
and to disregard them for the purposes of quorum calculations.
2020-06-30 09:15:37 -07:00
Peng Wang
51bd4626b1 Implement version upgrade warning:
If the 'HardenedValidations' amendment is enabled, this commit will
track the version of the software that validators embed in their
validations.

If a server notices that at least 60% of the validators on its UNL
are running a newer version than it is running, it will periodically
print an informational message, reminding the operator to check for
update.
2020-06-30 09:15:37 -07:00
mDuo13
cf6f40ea8f Deprecate unused/obsolete error codes:
The tecUNFUNDED code is actively used when attempting to create payment
channels; the messages incorrectly list it as deprecated.

Meanwhile, the tecUNFUNDED_ADD code actually is an unused legacy code,
dating back to when there was a WalletAdd transactor. The terLAST and
terFUNDS_SPENT codes are also unused legacy codes.

Engine result messages are not part of the binary format and are
documented as subject to change without notice, so this should not
require an amendment nor a new API version.

Align error code table for human readability.
2020-06-30 08:52:18 -07:00
seelabs
d3798f6290 Remove CryptoConditionsSuite stub amendment:
The amendment was partially complete, included no functional code
and, even if activated, it would result in no changes to transaction
proessing. Despite this, removing the amendment is the prudent course
of action and avoids the possibility of an accidental activation.

If additional cryptoconditions are implemented, they will be each
assigned a new, unique amendment code.
2020-06-30 08:52:18 -07:00
Rome Reginelli
4e33a1abf7 crawl_shards comment fix
Corrects the public_key parameter name in the comment.
See https://github.com/ripple/xrpl-dev-portal/pull/854 for context.
2020-06-30 08:52:18 -07:00
Miguel Portilla
86e8f2e232 Add Shard Family 2020-06-30 08:52:18 -07:00
Miguel Portilla
91e857874f Improve LedgerMaster shard acquisition 2020-06-30 08:52:17 -07:00
Miguel Portilla
8f50fd051e Use NuDB version 2.0.3 2020-06-30 08:52:17 -07:00
p2peer
94e8e94750 Add support for deterministic database shards (#2688):
This commit, if merged, adds support to allow multiple indepedent nodes to
produce a binary identical shard for a given range of ledgers. The advantage
is that servers can use content-addressable storage, and can more efficiently
retrieve shards by downloading from multiple peers at once and then verifying
the integrity of a shard by cross-checking its checksum with the checksum
other servers report.
2020-06-30 08:52:17 -07:00
Edward Hennis
54ece72b62 Update cmake so that rippled can build as a submodule 2020-06-25 19:47:20 -07:00
Edward Hennis
4702c8b591 Improve online_delete configuration and DB tuning:
* Document delete_batch, back_off_milliseconds, age_threshold_seconds.
* Convert those time values to chrono types.
* Fix bug that ignored age_threshold_seconds.
* Add a "recovery buffer" to the config that gives the node a chance to
  recover before aborting online delete.
* Add begin/end log messages around the SQL queries.
* Add a new configuration section: [sqlite] to allow tuning the sqlite
  database operations. Ignored on full/large history servers.
* Update documentation of [node_db] and [sqlite] in the
  rippled-example.cfg file.

Resolves #3321
2020-06-25 19:46:43 -07:00
Mark Travis
00702f28c2 Improve reporting of ledger age in server_info 2020-06-25 19:46:43 -07:00
Gregory Tsipenyuk
df29e98ea5 Improve amendment processing and activation logic:
* The amendment ballot counting code contained a minor technical
  flaw, caused by the use of integer arithmetic and rounding
  semantics, that could allow amendments to reach majority with
  slightly less than 80% support. This commit introduces an
  amendment which, if enabled, will ensure that activation
  requires at least 80% support.
* This commit also introduces a configuration option to adjust
  the amendment activation hysteresis. This option is useful on
  test networks, but should not be used on the main network as
  is a network-wide consensus parameter that should not be
  changed on a per-server basis; doing so can result in a
  hard-fork.

Fixes #3396
2020-06-25 19:46:43 -07:00
Nik Bougalis
fe9922d654 Improve compression support:
* Optimize parsing of compressed message headers
* Enforce protocol-defined message size maxima
* Update comments
2020-06-25 19:46:43 -07:00
Nik Bougalis
362a017eee Cleanup SHAMap and simplify interfaces:
* Improve error reporting (more readable exception messages)
* Reduce function complexity (split oversized function to smaller pieces)
* Reduce code duplication
* Reduce buffer copying
2020-06-25 19:46:43 -07:00
Nik Bougalis
e8f3525226 Improve Slice:
Slice should, eventually, be replaced by std::string_view<std::uint8_t>
so begin adding some helpful functions to align its interface.
2020-06-25 19:46:43 -07:00
Howard Hinnant
1067086f71 Consolidate "Not Synced" error messages:
Work on a version 2 of the XRP Network API has begun. The new
API returns:

* `notSynced` in place of `noClosed`, `noCurrent`, and `noNetwork`;
* `invalidParams` in place of `lgrIdxInvalid`.

The new version 2 API cannot be selected yet, as it remains a work
in progress.

Fixes #3269
2020-06-25 19:45:59 -07:00
Howard Hinnant
0214d83aa5 Improve handling of empty buffer in varint parsing (RIPD-1683) 2020-06-25 19:45:59 -07:00
CJ Cobb
d69a902876 Add comments to protobuf files 2020-06-25 19:09:19 -07:00
manojsdoshi
f43aeda49c Set version to 1.6.0-b7 2020-05-29 17:55:01 -07:00
Yusuf Sahin HAMZA
27484f78a9 Use libarchive version 3.4.3 2020-05-29 17:54:19 -07:00
p2peer
93bf77bdec Unit tests for database shards 2020-05-29 17:54:19 -07:00
Miguel Portilla
728651b5d5 Use LZ4_decompress_safe 2020-05-29 17:54:19 -07:00
Miguel Portilla
fb74eefa9e Update LZ4 library to 1.9.2 2020-05-29 17:54:19 -07:00
manojsdoshi
853c964194 Fix a build issue caused by the latest Docker version:
* The latest docker version is not supported by
   artifactory causing the package build to fail.
   Setting the docker version to 19.03.8 to fix the build.
2020-05-29 17:54:19 -07:00
Gregory Tsipenyuk
645c06764b Update the default port for [ips] and [ips_fixed]:
If a port number is not specified in the [ips] or [ips_fixed]
blocks, automatically add the new default peer port which was
registered with IANA: 2459. Also use 2459 if no port is specified
with manually using the `connect` command; previously it was
using 6561, which could have resulted in spurious failures.
This commit, if merged, fixes #2861.
2020-05-29 17:52:49 -07:00
Howard Hinnant
2d23e7bd18 Use std::size in place of std::extent
* Fixes RIPD-269
2020-05-29 14:03:08 -07:00
Howard Hinnant
0290d0b82c Create health_check rpc
* Gives a summary of the health of the node:
  Healthy, Warning, or Critical

* Last validated ledger age:
  <7s is Healthy,
  7s to 20s is Warning
  > 20s is Critcal

* If amendment blocked, Critical

* Number of peers:
  > 7 is Healthy
  1 to 7 is Warning
  0 is Critical

* server state:
  One of full, validating or proposing is Healthy
  One of syncing, tracking or connected is Warning
  All other states are Critical

* load factor:
  <= 100 is Healthy
  101 to 999 is Warning
  >= 1000 is Critical

* If not Healthy, info field contains data that is considered not
  Healthy.

Fixes: #2809
2020-05-29 14:02:08 -07:00
manojsdoshi
3d86b49dae Set version to 1.6.0-b6 2020-05-26 18:48:13 -07:00
John Freeman
0b9e935806 Find date::date in CMake package configuration file 2020-05-26 18:41:30 -07:00
Mark Travis
17412d17e2 Fix historical ledger acquisition when using online deletion:
Commit e257a22 introduced changes in the logic used to acquire historical
ledgers. The logic could cause historical ledgers to be acquired only since
the last online deletion interval instead of the configured value to allow
deletion.
2020-05-26 18:39:48 -07:00
seelabs
99f5193699 Disable formatting operator&:
Clang 10.0.0 and 10.0.1 disagree on formatting operator&
Disable until we upgrade to clang 11.
2020-05-26 18:39:36 -07:00
seelabs
328e42ad42 Minor cleanups:
* Make sure variables are always initialized
* Use lround instead of adding .5 and casting
* Remove some unneeded vars
* Check for null before calling strcmp
* Remove redundant if conditions
* Remove make_TxQ factory function
2020-05-26 18:39:24 -07:00
seelabs
6d28f2a8d9 Cleanup code using move semantics 2020-05-26 18:39:16 -07:00
seelabs
421417ab07 Fixes for gcc 10 2020-05-26 18:39:06 -07:00
Scott Schurr
68494a308e AmendmentTable improvements 2020-05-26 18:38:58 -07:00
CJ Cobb
16f79d160a Add delivered amount to GetAccountTransactionHistory responses 2020-05-26 18:38:51 -07:00
John Freeman
8f984042f4 Try to fix usage of pkg-config for static linking 2020-05-26 18:37:52 -07:00
Edward Hennis
eb1a699c5a Fix typo in error message 2020-05-26 18:37:45 -07:00
Devon White
ac766ec0eb Introduce ShardArchiveHandler improvements:
* Improve documentation
* Make the ShardArchiveHandler rather than the DatabaseShardImp perform
  LastLedgerHash verification for downloaded shards
* Remove ShardArchiveHandler's singleton implementation and make it an
  Application member
* Have the Application invoke ShardArchiveHandler initialization
  instead of clients
* Add RecoveryHandler as a ShardArchiveHandler derived class
* Improve commenting
2020-05-26 18:37:01 -07:00
Devon White
21340a1c1e Validate LastLedgerHash for downloaded shards:
* Add documentation for shard validation
* Retrieve last ledger hash for imported shards
* Verify the last ledger hash in Shard::finalize
* Limit last ledger hash retrieval attempts for imported shards
* Use a common function for removing failed shards
* Add new ShardInfo::State for imported shards
2020-05-26 18:36:54 -07:00
Nik Bougalis
c594f3b0cf Reduce visibility of retired amendment identifiers:
Identifiers for retired amendments should not generally be used
in the codebase.

This commit reduces their visibility down to one translation
unit and marks them as unused and deprecated to prevent
accidental reuse.
2020-05-26 18:36:15 -07:00
Nik Bougalis
268e28a278 Tune relaying of untrusted proposals & validations:
In deciding whether to relay a proposal or validation, a server would
consider whether it was issued by a validator on that server's UNL.

While both trusted proposals and validations were always relayed,
the code prioritized relaying of untrusted proposals over untrusted
validations. While not technically incorrect, validations are
generally more "valuable" because they are required during the
consensus process, whereas proposals are not, strictly, required.

The commit introduces two new configuration options, allowing server
operators to fine-tune the relaying behavior:

The `[relay_proposals]` option controls the relaying behavior for
proposals received by this server. It has two settings: "trusted"
and "all" and the default is "trusted".

The `[relay_validations]` options controls the relaying behavior for
validations received by this server. It has two settings: "trusted"
and "all" and the default is "all".

This change does not require an amendment as it does not affect
transaction processing.
2020-05-26 18:36:06 -07:00
Nik Bougalis
ca664b17d3 Improve handling of sfLedgerSequence field:
The sfLedgerSequence field is designated as optional in the object
template but it is effectively required and validations which do not
include it were, correctly, rejected.

This commit migrates the check outside of the peer code and into the
constructor used for validations being deserialized for the network.

Furthermore, the code will generate an error if a validation that is
generated by a server does not include the field.
2020-05-26 18:35:58 -07:00
Nik Bougalis
3936110c8d Use boost::circular_buffer:
The existing code used std::deque along with a size check to constrain the
size of a buffer and, effectively, "hand rolled" a circular buffer. This
change simply migrates directly to boost::circular_buffer.
2020-05-26 18:35:49 -07:00
Nik Bougalis
9f91870b1c Adjust frequency of mtENDPOINTS messages 2020-05-26 18:35:39 -07:00
Nik Bougalis
97712107b7 Set version to 1.6.0-b5 2020-05-05 16:05:24 -07:00
Carl Hua
d9fa148688 Revert "Add PR automation for project boards"
This reverts commit cd78ce3118.
2020-05-05 16:05:23 -07:00
Miguel Portilla
d88a7c73b4 Improve online delete backend locking 2020-05-05 16:05:23 -07:00
Scott Schurr
894d3463ce Extend unit testing of account_tx with deleted account:
The unit test now verifies that if an account is not present in the
starting account_tx ledger, account_tx still iterates down and finds
the transaction that deletes the account (and earlier transactions).
2020-05-05 16:05:23 -07:00
John Freeman
5b5226d518 Cleanup the 'PeerSet' hierarchy:
This commit introduces no functional changes but cleans up the
code and shrinks the surface area by removing dead and unused
code, leveraging std:: alternatives to hand-rolled code and
improving comments and documentation.
2020-05-05 16:05:23 -07:00
Alloy Networks
d025f3fb28 Add descriptive comments to 'getRippledInfo.sh':
The script, when invoked by a server operator can collect information
useful for debugging, while attempting to redact potentially sensitive
data.

It contained no explanation or other exposition to allow people who
look at the file but aren't familiar with shell scripts to understand
its purpose.
2020-05-05 16:05:23 -07:00
Markus Alvila
11be30dd40 Correct typo in comment 2020-05-05 16:05:23 -07:00
Elliot Lee
4fad421c8a Correct typos in SECURITY.md 2020-05-05 16:05:23 -07:00
seelabs
57b3543e7b Support boost 1.73 2020-05-05 16:05:23 -07:00
Kirill Fomichev
a00543b6bc Fix docs about misconfigured neighbor port 2020-05-05 16:05:23 -07:00
Kirill Fomichev
dbd25f0e32 Remove excessive redirect call on PeerManager 2020-05-05 16:05:23 -07:00
Nik Bougalis
62a3f33d72 Remove the built-in "sustain" watchdog:
The built-in watchdog is simplistic and can, sometimes, cause problems
especially on systems that have the ability to automatically start and
monitor processes.

This commit removes the sustain system entirely, changes the handling
of the SIGTERM signal to properly terminate the process and improves
the error message reported to the user when the command line used to
start `rippled` is incorrect and malformed.
2020-05-05 16:05:23 -07:00
Nik Bougalis
74f9edef07 Prefer keylets instead of naked hashes:
Entries in the ledger are located using 256-bit locators. The locators
are calculated using a wide range of parameters specific to the entry
whose locator we are calculating (e.g. an account's locator is derived
from the account's address, whereas the locator for an offer is derived
from the account and the offer sequence.)

Keylets enhance type safety during lookup and make the code more robust,
so this commit removes most of the earlier code, which used naked
uint256 values.
2020-05-05 16:05:22 -07:00
Nik Bougalis
dbee3f01b7 Clean up and modernize code:
This commit removes obsolete comments, dead or no longer useful
code, and workarounds for several issues that were present in older
compilers that we no longer support.

Specifically:

- It improves the transaction metadata handling class, simplifying
  its use and making it less error-prone.
- It reduces the footprint of the Serializer class by consolidating
  code and leveraging templates.
- It cleanups the ST* class hierarchy, removing dead code, improving
  and consolidating code to reduce complexity and code duplication.
- It shores up the handling of currency codes and the conversation
  between 160-bit currency codes and their string representation.
- It migrates beast::secure_erase to the ripple namespace and uses
  a call to OpenSSL_cleanse instead of the custom implementation.
2020-05-05 16:05:22 -07:00
Nik Bougalis
6c72d5cf7e Improve loading of validator tokens (RIPD-1687):
A deliberately malformed token can cause the server to crash during
startup. This is not remotely exploitable and would require someone
with access to the configuration file of the server to make changes
and then restart the server.

Acknowledgements:
Guido Vranken for responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to
responsibly disclose any issues they may find.

Ripple is generously sponsoring a bug bounty program for the
rippled project. For more information please visit:

    https://ripple.com/bug-bounty
2020-05-01 12:55:12 -07:00
Nik Bougalis
2827de4d63 Report the server version in published validations:
Currently there is no mechanism for a validator to report the
version of the software it is currently running. Such reports
can be useful for those who are developing network monitoring
dashboards and server operators in general.

This commit, if merged, defines an encoding scheme to encode
a version string into a 64-bit unsigned integer and adds an
additional optional field to validations.

This commit piggybacks on "HardenedValidations" amendment to
determine whether version information should be propagated
or not.

The general encoding scheme is:

XXXXXXXX-XXXXXXXX-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY-YYYYYYYY

X: 16 bits identifying the particular implementation
Y: 48 bits of data specific to the implementation

The rippled-specific format (implementation ID is: 0x18 0x3B) is:

00011000-00111011-MMMMMMMM-mmmmmmmm-pppppppp-TTNNNNNN-00000000-00000000

    M: 8-bit major version (0-255)
    m: 8-bit minor version (0-255)
    p: 8-bit patch version (0-255)
    T: 11 if neither an RC nor a beta
       10 if an RC
       01 if a beta
    N: 6-bit rc/beta number (1-63)
2020-05-01 12:55:12 -07:00
Nik Bougalis
381606aba2 Harden validations:
This commit introduces the "HardenedValidations" amendment which,
if enabled, allows validators to include additional information in
their validations that can increase the robustness of consensus.

Specifically, the commit introduces a new optional field that can
be set in validation messages can be used to attest to the hash of
the latest ledger that a validator considers to be fully validated.

Additionally, the commit leverages the previously introduced "cookie"
field to improve the robustness of the network by making it possible
for servers to automatically detect accidental misconfiguration which
results in two or more validators using the same validation key.
2020-05-01 12:55:11 -07:00
Nik Bougalis
567e42e071 Deprecate 'Time to Live' fields 2020-04-30 20:05:09 -07:00
manojsdoshi
2bf3b194fa Set version to 1.6.0-b4 2020-04-27 16:17:15 -07:00
manojsdoshi
444ea56182 Adding support to build rippled packages for ubuntu 20.04 2020-04-27 16:16:56 -07:00
CJ Cobb
d797589164 Add README for gRPC protobuf folder 2020-04-23 18:11:12 -07:00
Edward Hennis
1577c775b3 Close download socket before result is passed to the callback:
* Specifically relevent to the processing of UNL downloads via
  ValidatorSite.
2020-04-23 18:10:21 -07:00
Edward Hennis
3bf0b724a3 Adjust timeouts in Validator Site tests:
* Prevents spurious failures due to DNS resolution.
2020-04-23 18:10:12 -07:00
Miguel Portilla
bd8dbb87b6 Update to RocksBD 6.7.3 2020-04-23 18:09:45 -07:00
Carl Hua
cd78ce3118 Add PR automation for project boards 2020-04-23 18:09:08 -07:00
manojsdoshi
023f5704d0 Set version to 1.6.0-b3 2020-04-23 14:27:29 -07:00
manojsdoshi
123e94c603 Fix a build issue involving Ubuntu Docker containers:
Upgrade the build pipeline to use ubuntu 19.10 container
in order for the build pipeline to successfully complete builds.
2020-04-23 14:27:12 -07:00
John Freeman
156dc2ec4c Add GitHub Action for checking w/ clang-format-10 2020-04-23 10:15:36 -07:00
John Freeman
b7b7e098be Add .git-blame-ignore-revs (requires Git >= 2.24) 2020-04-23 10:14:29 -07:00
Pretty Printer
50760c6935 Format first-party source according to .clang-format 2020-04-23 10:02:04 -07:00
John Freeman
65dfc5d19e Prepare code for formatting
- Add missing `#include` in `ripple/core/JobTypeInfo.h`
- Protect version string from clang-format in
  `ripple/protocol/impl/BuildInfo.cpp`.
  `Builds/CMake/RippledVersion.cmake` searches for this line by pattern.
2020-04-23 09:53:49 -07:00
Nik Bougalis
020b285808 Set version to 1.6.0-b2 2020-04-14 19:42:50 -07:00
Nik Bougalis
bdd22e4d51 Improve reporting of missing node exceptions 2020-04-14 19:42:50 -07:00
Nik Bougalis
b7631d2a28 Correct a typo that could result in a nullptr dereference 2020-04-14 19:42:50 -07:00
Nik Bougalis
284ed38471 Reduce calls to std::random_device:
Existing per-thread PRNGs are individually initialized using calls
to std::random_device.

If merged, this commit will use a single PRNG, initialized from
std::random_device on startup, to seed the thread-specific PRNGs.

Acknowledgements:
    Thomas Snider, who reported this issue to Ripple on April 8, 2020.
2020-04-14 19:42:49 -07:00
Nik Bougalis
b96ef6adb8 Add SECURITY.md to the repository 2020-04-14 19:42:49 -07:00
manojsdoshi
ce6b427202 Fix a build issue involving Ubuntu Docker containers:
The package 'apt-transport-https' needs to be downloaded and installed
in order for the build pipeline to successfully complete builds.
2020-04-14 19:42:42 -07:00
John Freeman
858e93c7f8 Improve the Doxygen Workflow
* Use official build environment Docker image
* Update documentation and Doxygen website URLs
2020-04-14 19:42:42 -07:00
Miguel Portilla
6477bdf3e8 Fix division by zero with shards file stats 2020-04-14 19:42:42 -07:00
Miguel Portilla
ce5f240551 Fix invalid shard removal 2020-04-14 19:42:42 -07:00
Gábor Lipták
1c3c69f8b5 Update Travis to bionic 2020-04-14 19:17:13 -07:00
Mo Morsi
be2652544b Add ledger_cleaner command to rippled cmd line help 2020-04-14 19:17:13 -07:00
Mo Morsi
f155eaff4b Unit test for memo 2020-04-14 19:17:13 -07:00
Scott Schurr
67981f002f Reduce strand re-execute log message severity to warning:
Historically strand re-execute log messages have been treated as
errors.  However in the vast majority of cases these log messages
are caused by well understood mechanics in the payment engine.
So usually these log messages should be treated as warnings.
2020-04-14 19:17:13 -07:00
Scott Schurr
0d83223445 Remove conditionals for fix1201 enabled 14Nov2017 2020-04-09 11:42:34 -07:00
Scott Schurr
9f8d648514 Remove conditionals for fix1512 enabled 14Nov2017 2020-04-09 11:42:34 -07:00
Scott Schurr
3d3b6d85cd Remove conditionals for fix1523 enabled 14Nov2017 2020-04-09 11:42:34 -07:00
Scott Schurr
8cf7c9548a Remove conditionals for fix1528 enabled 14Nov2017 2020-04-09 11:42:34 -07:00
Scott Schurr
323dbc7962 Remove conditionals for featureSortedDirectories enabled 14Nov2017 2020-04-09 11:42:34 -07:00
Scott Schurr
46a76fb318 Remove conditionals for featureEnforceInvariants enabled 07Jul2017 2020-04-09 11:42:34 -07:00
Scott Schurr
a6246b0baa Remove conditionals for fix1373 enabled 07Jul2017 2020-04-09 11:42:34 -07:00
Scott Schurr
c8282795ef Remove conditionals for featureEscrow enabled 31Mar2017 2020-04-09 09:31:06 -07:00
Scott Schurr
e93a44fe9b Remove conditionals for fix1368 enabled 31Mar2017 2020-04-09 09:31:06 -07:00
Scott Schurr
3e870866e0 Remove conditionals for featurePayChan enabled 31Mar2017 2020-04-09 09:31:06 -07:00
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
p2peer
7ea78c8517 Remove workaround for waitable timers (#3166) 2020-02-11 19:14:24 -08:00
Howard Hinnant
ce589225dd Add time zone abbreviation to all time point streaming 2020-02-11 19:14:24 -08:00
Howard Hinnant
79896af275 Qualify tolower with std:: and remove obsolete comments
* Fixes RIPD-1759
2020-02-11 19:14:24 -08:00
Scott Schurr
2831ed0538 Add unittests for peer_reservations command line interface 2020-02-11 19:14:24 -08:00
Mo Morsi
e24dd2f954 Fix broken tests (missing api_version parameter) 2020-02-11 19:14:24 -08:00
Mo Morsi
60f0f5224d Accept 'strict' param in certain CLI options
account_info, owner_info, account_currencies
2020-02-10 23:36:31 -08:00
Mo Morsi
3578acaf0b Add new validator_info and manifest rpc methods
Returns local validator details and specified manifest information
respectively. Folded and rebased on latest develop
2020-02-10 23:36:31 -08:00
Carl Hua
2f9edf495e Add issue templates 2020-02-10 23:36:31 -08:00
Manoj doshi
cc4cefaa4b Set version to 1.5.0-b4 2020-01-30 15:56:43 -08:00
seelabs
81326a6d08 Remove old payment code 2020-01-30 15:38:14 -08:00
seelabs
9d3626fec5 Fix bug in qualityUpperBound:
* In and Out parameters were swapped when calculating the rate
* In and out qualities were not calculated correctly; use existing functions
  to get the qualities
* Added tests to check that theoretical quality matches actual computed quality
* Remove in/out parameter from qualityUpperBound
* Rename an overload of qualityUpperBound to adjustQualityWithFees
* Add fix amendment
2020-01-30 13:35:52 -08:00
Scott Schurr
ae707b814f Always enable fix1449 dated March 30, 2017 20:00:00 UTC 2020-01-30 13:22:54 -08:00
Scott Schurr
9c580b20a3 Always enable fix1443 dated March 12, 2017 01:00:00 UTC 2020-01-30 13:22:49 -08:00
Scott Schurr
70c21f90b9 Always enable fix1298 dated December 21, 2016 18:00:00 UTC 2020-01-30 13:22:43 -08:00
Scott Schurr
0964379a66 Always enable fix1274 dated September 30, 2016 17:00:00 UTC 2020-01-30 13:22:34 -08:00
Scott Schurr
a176f58a92 Always enable fix1141 dated July 1, 2016 17:00:00 UTC 2020-01-30 13:22:26 -08:00
Scott Schurr
fc0a082700 Remove STAmountSO::soTime and soTime2:
STAmount::soTime and soTime2 were time based "amendment like"
switches to control small changes in behavior for STAmount.
soTime2, which was the most recent, was dated Feb 27, 2016.
That's over 3 years ago.

The main reason to retain these soTimes would be to replay
old transactions.  The likelihood of needing to replay a
transaction from over three years ago is pretty low.  So it
makes sense to remove these soTime values.

In Flow_test the testZeroOutputStep() test is removed.  That
test started to fail when the STAmount::soTimes were removed.
I checked with the original author of the test.  He said
that the code being tested by that unit test has been removed,
so it makes sense to remove the test.  That test is removed.
2020-01-30 13:22:19 -08:00
Scott Schurr
f7fffee28d Warn on replay of ledgers from before Jan 1 2018 2020-01-30 13:22:08 -08:00
Scott Schurr
51ed7db002 Remove conditionals for featureTrustSetAuth enabled 19Jul2016 2020-01-30 13:20:01 -08:00
Scott Schurr
6e4945c56b Remove conditionals for featureMultiSign enabled 27Jun2016 2020-01-30 13:19:55 -08:00
Scott Schurr
c48be14f4f Remove comments about featureFeeEscalation enabled 19May2016 2020-01-30 13:19:48 -08:00
Jeroen Meulemeester
ecbbabfc3c Reduce log level of xrp/xrp offer payment step
This fixes #3181
2020-01-30 13:18:44 -08:00
Mark Travis
687cdbb78b Set start/stop logging for online_delete to appropriate verbosity level. 2020-01-30 13:18:35 -08:00
Mike Ellery
098086592b Resolve minor build issues:
- allow SOCI EP to build with vcpkg
 - fix container tagging in pkg build
 - correct libarchive name for win
2020-01-30 13:18:18 -08:00
Carl Hua
90d9ca901d Set version to 1.5.0-b3 2020-01-12 13:02:17 -05:00
Mike Ellery
eb016456a1 Streamline pkg and travis CI:
* use tagged containers for pkg build
* update build images
* continue to build container images in pipeline, but allow
  failure (non-block)
* limit travis macos cache
* add vs2019 windows to travis
* remove xcode 9 travis build
* remove clang5/6 from CI and update min version of Clang required in
  cmake
* break windows CI build into stages to reduce timeouts
* update datelib
* add if condition to travis builds to allow commit message to limit
  builds by platform
2020-01-12 07:26:19 -08:00
Devon White
cd9732b47a Change how fail_hard transactions are handled.
FIXES: #2847

* Transactions that are submitted with the fail_hard flag
  and that result in any TER code besides tesSUCCESS shall
  be neither queued nor held.

[FOLD] Keep tec results out of the open ledger when fail_hard:

* Improve TransactionStatus const correctness, and remove redundant
  `local` check
* Check open ledger tx count in fail_hard tests
* Fix some wrapping
* Remove duplicate test
2020-01-10 12:40:31 -08:00
CJ Cobb
7d867b806d Add gRPC support (#3127):
* add support for AccountInfo, Fee and Submit RPCs

* add partial support for Tx RPC (only supports Payments)
2020-01-10 12:31:24 -08:00
seelabs
761bb5744e Make XRPAmount constructor explicit:
Remove the implicit conversion from int64 to XRPAmount. The motivation for this
was noticing that many calls to `to_string` with an integer parameter type were
calling the wrong `to_string` function. Since the calls were not prefixed with
`std::`, and there is no ADL to call `std::to_string`, this was converting the
int to an `XRPAmount` and calling `to_string(XRPAmount)`.

Since `to_string(XRPAmount)` did the same thing as `to_string(int)` this error
went undetected.
2020-01-08 16:10:25 -08:00
Edward Hennis
e3b5b808c5 Add units to all fee calculations:
* Uses existing XRPAmount with units for drops, and a new TaggedFee for
  fee units (LoadFeeTrack), and fee levels (TxQ).
* Resolves #2451
2020-01-08 18:44:01 -05:00
Edward Hennis
1901b981f3 Convert tuning params to constexpr 2020-01-08 17:58:47 -05:00
Nik Bougalis
c624fc9b17 Set version to 1.5.0-b2 2020-01-02 13:29:22 -08:00
mbhandary
9294a07362 Report the validated and publish ledger ages over insight 2020-01-01 18:12:55 -08:00
mbhandary
9fcc30df89 Improve insight reporting of job queue timing:
Prior to this commit, the queue and execution times for individual jobs
were reported indepedently and could, potentially, be out of sync. This
change reports both values when either one of the exceeds the reporting
threshold.
2020-01-01 18:12:55 -08:00
Elliot Lee
1f5d9404d0 Update comments in TER.h 2020-01-01 18:12:55 -08:00
seelabs
5096cc1f5f Increase the deadlock detection timeout:
It's possible an overloaded job queue is causing false alarms on the deadlock
detector. Log a fatal message after 90s, declare a logic error after 600s.
2020-01-01 18:12:55 -08:00
Peng Wang
2aa11fa41d Support API versioning 2020-01-01 18:12:55 -08:00
p2peer
79e9085dd1 Augment "submit" command response:
If merged, this commit will report additional information in the
response to the submit command; this will make it easier for developers
to accurately track the status of transaction submission.

Fixes #2851
2020-01-01 18:12:38 -08:00
Mike Ellery
14f0234a26 Allow trailing comments in config file:
Treat all `#` characters in config files as comments (and remove)
*unless* the `#` is immediately preceded by `\`. Write a warning
to log file when trailing comments are found/ignored in the config
to let operators know that the treatment of trailing `#` has changed.

Fixes #3121
2020-01-01 18:12:38 -08:00
Howard Hinnant
a65c91a676 Backwards compatible workaround for boost 1.72 2019-12-30 20:20:34 -08:00
Nik Bougalis
607328e1a0 Improve the 'network_id' configuration option:
The 'network_id' option allows an administrator to specify to which
network they intend a server to connect. Servers can leverage this
information to optimize routing and prune automatically discovered
cross-network connections.

This commit will, if merged:

- add support for the devnet keyword, which corresponds to network ID #2;
- report the network ID, if one is configured, in server_info
2019-12-30 20:20:34 -08:00
Nik Bougalis
a96dc2ecea Remove unused configuration option 2019-12-30 20:20:33 -08:00
Nik Bougalis
3a77990781 Improve automatic I/O thread tuning algorithm 2019-12-30 20:20:33 -08:00
Nik Bougalis
4bb951d48e Fix node auto-configuration code:
The `node_size` configuration option is used to automatically
configure various parameters (cache sizes, timeouts, etc) for
the server.

A previous commit included changes that caused incorrect values
to be returned which can result in sub-optimal performance that
can manifest as difficulty syncing to the network, or increased
disk I/O and/or memory usage. The problem was introduced with
commit 66fad62e66.

This commit, if merged, fixes the code to ensure that the correct
values are returned and introduces a compile-time check to prevent
this issue from reoccurring.
2019-12-30 20:20:32 -08:00
Nik Bougalis
63503ee8f0 Improve platform detection and reduce includes:
The existing platform detection code was derived from the old Beast
library, which was, itself, derived from JUCE.

This commit removes that code and replaces it with the Boost.Predef
library which defines a consistent set of compiler, architecture,
operating system, library, and other version numbers.

For more on Boost.Predef, please see the Boost documentation. The
documentation for the current version as of this writing is at:
https://www.boost.org/doc/libs/1_71_0/doc/html/predef.html
2019-12-30 20:20:31 -08:00
Nik Bougalis
4a1148eb28 Set version to 1.5.0-b1 2019-11-28 09:46:20 -08:00
Nik Bougalis
f6916bfd42 Improve protocol-level handshaking protocol:
This commit restructures the HTTP based protocol negotiation that `rippled`
executes and introduces support for negotiation of compression for peer
links which, if implemented, should result in significant bandwidth savings
for some server roles.

This commit also introduces the new `[network_id]` configuration option
that administrators can use to specify which network the server is part of
and intends to join. This makes it possible for servers from different
networks to drop the link early.

The changeset also improves the log messages generated when negotiation
of a peer link upgrade fails. In the past, no useful information would
be logged, making it more difficult for admins to troubleshoot errors.

This commit also fixes RIPD-237 and RIPD-451
2019-11-28 09:46:17 -08:00
Scott Schurr
3ea525430e Improve Json::Value:
o Increase test coverage.
o Remove unused and/or broken interfaces.
2019-11-27 17:28:15 -08:00
John Northrup
fb0d065723 Move signing of deb to use Ubuntu 18.04 LTS 2019-11-27 17:28:15 -08:00
Devon White
47501b7f99 Provide additional info with txnNotFound errors.
* The `tx` command now supports min_ledger and max_ledger fields.
* If the requested transaction isn't found and these fields are
  provided, the error response indicates whether or not every
  ledger in the the provided range was searched.

This fixes #2924
2019-11-27 17:28:15 -08:00
ShangyanLi
11cf27e006 Skip validity check for tx command:
* historical tx retrieval no longer needs to pass current validity check;
* introduced additional RPC error code for database deserialization error.

This fixes issue #2597
2019-11-27 17:28:15 -08:00
Mark Travis
ade1afe1b0 Support multiple proxies in X-Forwarded-For header 2019-11-27 17:28:15 -08:00
Mo Morsi
6cda070fe0 Search for soci before vendoring 2019-11-27 16:58:56 -08:00
Mo Morsi
9bd470f2c7 Search for sqlite3 before vendoring 2019-11-27 16:58:56 -08:00
Mo Morsi
530f1939d6 Search for system snappy before vendoring 2019-11-27 16:58:56 -08:00
Mo Morsi
e4ea3752ac Search for system secp256k1 before vendoring 2019-11-27 16:58:56 -08:00
Mo Morsi
b728bf0d09 Search for system libarchive before vendoring 2019-11-27 16:58:56 -08:00
Mo Morsi
194fb2b86d Use find_package to search for system lz4 before vendoring 2019-11-27 16:58:56 -08:00
Mike Ellery
ce5d901e6e Switch to official date lib repo for date.h 2019-11-27 16:58:56 -08:00
Howard Hinnant
14075630d4 Remove per-process hash seeding for gcc.
* gcc now seeds hardened_hash per instance.

* Other platforms were already doing this.
2019-11-27 16:58:56 -08:00
Miguel Portilla
5c1dd87fab Make class members journal const 2019-11-27 16:58:56 -08:00
Nik Bougalis
06c371544a Set version to 1.4.0 2019-11-26 10:35:54 -08:00
Nik Bougalis
ffa0f048f3 Set version to 1.4.0-rc2 2019-11-25 21:51:54 -08:00
Mike Ellery
22ca0041b8 Use signed artifacts in pkg pipeline 2019-11-25 21:51:12 -08:00
Manoj doshi
232975bfdb Set version to 1.4.0-rc1 2019-11-04 11:45:31 -08:00
Howard Hinnant
4e84868747 Document the minimum GCC version as 7 2019-11-04 11:39:19 -08:00
John Northrup
9e1ccb900e GPG Sign DEB and RPM packages generated by build pipeline (#3144)
* adding package signing steps for rpm and deb

* first spike at GPG signing with CI and containers

* refine ubuntu portion

* get correct gpg package version

* adding CentOS support

* fixing errors in installing gpg on ubuntu

* base64 decode the GPG key

* fixing line continuations

* revised package signing, looking for package artifacts

* add dpkg-sig to ubuntu image

* sign all deb packges

* add passphrase to GPG process

* repeat yo slef on dpkg

* sign all the rpm packages too

* install rpm-sign in the CentOS docker image

* loop through rpm files

* no need for PIN on GPG signing
2019-11-03 12:08:40 -06:00
Manoj doshi
98d55b988f Set version to 1.4.0-b8 2019-10-30 12:24:25 -07:00
Mike Ellery
e720a66076 Ensure permissions for initial config 2019-10-30 12:23:58 -07:00
Joseph Busch
7be7343e05 Make the HTTP response size const 2019-10-30 12:23:58 -07:00
seelabs
e26dd7bdfe Reject overlong encodings earlier 2019-10-30 12:23:58 -07:00
seelabs
906b9ae00b Don't use set in AccountObjects test:
Collecting the returned and expected values in sets only works if there are no
duplicates. The implementation is changed to use sorted vectors to fix this case.
2019-10-30 12:23:58 -07:00
Mo Morsi
15c5f9c111 Report consensus phase changes in the server subscription stream 2019-10-30 12:23:57 -07:00
Howard Hinnant
726dd69ab9 Make Env::AppBundle constructor exception safe
When the Env::AppBundle constructor throws an exception
it still needs to run ~AppBundle(), otherwise the JobQueue
isn't properly shut down.  Specifically the  JobQueue
can destruct without waiting on outstanding jobs in the
queue.

This change ensures that if Env::AppBundle constructor
throws, Env::AppBundle::~AppBundle() runs.

This fixes the unit test crash exposed by PR #3047.
2019-10-30 12:23:57 -07:00
Manoj doshi
41b2c80dde Set version to 1.4.0-b7 2019-10-18 16:45:06 -07:00
Mike Ellery
cd01502d17 Relax STTx test failure criterion:
FIXES: #3106

Different versions of protobuf produce subtly different
results when given invalid message payloads. This leads to
subtly different behavior when we try to deserialize these
invalid messages. As such, we can't tie success to a
particular exception.
2019-10-18 16:44:16 -07:00
Mike Ellery
b2317f8b41 Omit downloader resolve test when it won't fail
Fixes: #3108
2019-10-18 16:44:16 -07:00
Nik Bougalis
113167acf4 Allow channel_authorize to use Ed25519 keys 2019-10-18 16:44:16 -07:00
Nik Bougalis
a3a9dc26b4 Introduce support for deletable accounts:
The XRP Ledger utilizes an account model. Unlike systems based on a UTXO
model, XRP Ledger accounts are first-class objects. This design choice
allows the XRP Ledger to offer rich functionality, including the ability
to own objects (offers, escrows, checks, signer lists) as well as other
advanced features, such as key rotation and configurable multi-signing
without needing to change a destination address.

The trade-off is that accounts must be stored on ledger. The XRP Ledger
applies reserve requirements, in XRP, to protect the shared global ledger
from growing excessively large as the result of spam or malicious usage.

Prior to this commit, accounts had been permanent objects; once created,
they could never be deleted.

This commit introduces a new amendment "DeletableAccounts" which, if
enabled, will allow account objects to be deleted by executing the new
"AccountDelete" transaction. Any funds remaining in the account will
be transferred to an account specified in the deletion transaction.

The amendment changes the mechanics of account creation; previously
a new account would have an initial sequence number of 1. Accounts
created after the amendment will have an initial sequence number that
is equal to the ledger in which the account was created.

Accounts can only be deleted if they are not associated with any
obligations (like RippleStates, Escrows, or PayChannels) and if the
current ledger sequence number exceeds the account's sequence number
by at least 256 so that, if recreated, the account can be protected
from transaction replay.
2019-10-18 16:44:16 -07:00
Joseph Busch
7e7664c29a Add deletion_blockers_only param to account_objects RPC command 2019-10-18 14:18:38 -07:00
Manoj doshi
fccb7e1c70 Set version to 1.4.0-b6 2019-10-15 12:02:12 -07:00
Howard Hinnant
3f45b8c3bd Switch deadlock detector to steady_clock
* Changes to system time should not trigger the deadlock detector.
* Fixes #3101
2019-10-15 12:01:37 -07:00
seelabs
ca6d5798e9 Support for boost 1.71:
* replace boost::beast::detail::iequals with boost::iequals
* replace deprecated `buffers` function with `make_printable`
* replace boost::beast::detail::ascii_tolower with lambda
* add missing includes
2019-10-15 12:01:37 -07:00
Mike Ellery
2110b24090 Add omitted unit tests, cleanup old files 2019-10-15 12:01:37 -07:00
Mike Ellery
82484e26f5 Add option to enable -Wextra for gcc/clang. 2019-10-15 12:01:37 -07:00
Scott Schurr
ca47583a3b Small bug fixes in BuildLedger.cpp 2019-10-15 12:01:37 -07:00
Joseph Busch
f4d6b0e1c4 Add metrics for PeerImp to track bandwidth usage 2019-10-15 12:01:37 -07:00
Devon White
9196d9541a Include validator's master public key in validation stream:
The validation stream only reported the ephemeral signing key for validators
which use manifests. This made tracking unnecessarily difficult for clients
processing the data stream.

With this change, the validator's long-term master public key is also
included.

This commit fixes #3005

* Provide proposing validator's master key in the validation stream
  subscription JSON responses.

Implement code review changes.

FIXES: #3005
2019-10-15 12:01:37 -07:00
Manoj doshi
b53fda1e1a Set version to 1.4.0-b5 2019-09-27 12:25:21 -07:00
Mike Ellery
9a5911f94c CI: remove boost from macos/hombrew 2019-09-27 12:24:19 -07:00
Mike Ellery
80acc85e59 Fix startup error with --import 2019-09-27 12:24:19 -07:00
Joseph Busch
8ce1c189f7 Fix VS2019 debug build 2019-09-27 12:24:19 -07:00
Howard Hinnant
7228b2e068 Remove SHAMap V2 2019-09-27 12:24:19 -07:00
Yusuf Sahin HAMZA
33ab0cd7bd Automatically update NodeDB path if changed 2019-09-27 12:24:19 -07:00
seelabs
e33ac1d450 Add PayChan to recipient's owner directory 2019-09-27 11:35:22 -07:00
Rome Reginelli
826cbbc3bf Clarify Linux build instructions for configuring
* Explain that Arch/Manjaro/etc. need `-Dstatic=OFF` during the configure step
* move configuration options closer to that step
* separate sub-headers for configuration and build
2019-09-27 11:35:22 -07:00
Mike Ellery
38f82115f7 Set version to 1.4.0-b4 2019-09-09 18:46:06 -07:00
Mike Ellery
d9bb78c8b8 Cleanup usage of ScopedUnlock 2019-09-09 18:45:56 -07:00
Mo Morsi
905f631b71 Modularize cmake build config 2019-09-09 18:45:53 -07:00
Mike Ellery
9213c49ca1 Honor SSL config settings for ValidatorSites:
FIXES: #2990

* refactor common SSL client setup
* enable SSL in unit-test http server
* add tests for SSLHTTPDownloader
* misc test refactoring
2019-09-09 10:55:31 -07:00
Nik Bougalis
fc7ecd672a Set version to 1.4.0-b3 2019-09-07 12:08:47 -07:00
Mark Travis
a6944be5cf Clarify online delete data error message. 2019-09-07 11:44:00 -07:00
Mark Travis
e5b61c9ac9 Update operating mode upon network disagreement. 2019-09-07 11:44:00 -07:00
Scott Schurr
a9a4e2c8fb Add Destination to Check threading 2019-09-07 11:39:02 -07:00
Miguel Portilla
56eac5c9a1 Fix rand_int assert in shard store 2019-09-07 11:39:02 -07:00
Miguel Portilla
4b1970afa9 Log database connection error 2019-09-07 11:39:02 -07:00
Miguel Portilla
22c9de487a Add shard thread safety 2019-09-07 11:39:02 -07:00
Miguel Portilla
66fad62e66 Implement Shard SQLite support 2019-09-07 11:39:02 -07:00
Mike Ellery
008fc5155a Improve CI and packaging:
* add travis build for min cmake supported
* add travis build for validator keys (uses xrpl_core)
* add travis build for ipv6 (mac only)
* add cmake target for validator keys via FetchContent
* use validator keys target in package build
2019-09-07 11:39:02 -07:00
seelabs
5834fbbc5d Set version to 1.4.0-b2 2019-08-23 11:33:59 -07:00
seelabs
06219f1151 Disable shadow warning:
Different compilers and handling the shadow warning differently. In particular,
some are warning about types being shadowed by variables. Until these can be
resolved the shadow warning is being disabled.

Note: the shadow warning was originally enabled to help with the structured
bindings patch. As that is now complete, it's less important to keep this
warning.
2019-08-23 11:33:59 -07:00
seelabs
c2d2ba9f45 Simplify code using if constexpr:
Also simplify msig construction
2019-08-23 11:33:59 -07:00
seelabs
1eb3753f26 Replace from_string_checked pair return type with optional<Endpoint> 2019-08-23 11:33:59 -07:00
seelabs
0a256247a0 Replace strUnHex pair return type with optional<Blob> 2019-08-23 11:33:59 -07:00
seelabs
7912ee6f7b Use structured bindings in some places:
Most of the new uses either:
* Replace some uses of `tie`
* bind to pairs when iterating through maps
2019-08-23 11:33:59 -07:00
seelabs
9c58f23cf8 Replace unordered_map::emplace with insert_or_assign 2019-08-23 08:47:43 -07:00
seelabs
9245b0b666 Use std::gcd to implement lowestTerms 2019-08-23 08:47:43 -07:00
seelabs
92925a0af6 Use [[fallthrough]] in some switch statements 2019-08-23 08:47:43 -07:00
seelabs
70c2e1b419 remove make_Amounts:
* c++-17's class template type deduction can replace this function
2019-08-23 08:47:43 -07:00
seelabs
5d1728cc96 Use class template argument deduction for locks 2019-08-23 08:47:43 -07:00
seelabs
4076b6d92e Replace for_each_arg trick with fold expressions 2019-08-23 08:47:42 -07:00
seelabs
b9e73b4852 Fix shadowing variables 2019-08-23 08:47:42 -07:00
seelabs
014df67fed Remove unused member variable 2019-08-23 08:47:35 -07:00
Mike Ellery
014ec021bb Build packages with gcc-8 2019-08-23 08:42:14 -07:00
Mike Ellery
7fa9b91d23 Fix jenkins/travis CI:
* remove clang builds from jenkins
* disable windows travis cache
* limit make parallelism
* update linux CI image
2019-08-23 08:41:49 -07:00
Nik Bougalis
98c4a7a2b1 Set version to 1.4.0-b1 2019-08-19 06:58:55 -07:00
Vishwas Patil
c04c00d279 Add "sahyadri.isrdc.in" to list of bootstrap nodes 2019-08-19 06:58:50 -07:00
Elliot Lee
ef139e8b3c Update README.md
- This fixes #3023; thanks @crypto-deus.
- This fixes #3026; thanks @William-Gomez.
2019-08-19 06:58:50 -07:00
Alloy Networks
45c1c38993 Warn if the update script is not executed as root 2019-08-19 06:58:50 -07:00
Mo Morsi
1942fee581 Modernize code and clean up out-of-date or obsolete comments:
- Remove references to nodestore ledger index. This was removed
  in f946d7b447.
2019-08-19 06:58:50 -07:00
seelabs
b3c85e2709 Remove unused TER code from StrandResult 2019-08-19 06:58:50 -07:00
seelabs
561942da23 Use enums for some parameters in payments:
* Use enums for StrandDirection, DebtDirection, and QualityDirection
2019-08-19 06:58:50 -07:00
seelabs
c217baa367 Enable C++17 2019-08-19 06:58:50 -07:00
Howard Hinnant
c699864c85 Fix incorrect snapShot unsharing
This fixes #3020.
2019-08-19 06:58:50 -07:00
Howard Hinnant
4ff0f482c3 Remove unneeded and unused base classes in insight 2019-08-19 06:58:50 -07:00
Scott Schurr
28b942b186 Enhance AccountTx unit test 2019-08-19 06:58:50 -07:00
Edward Hennis
4900e3081d Update appveyor dependencies for boost 1.70 2019-08-19 06:58:50 -07:00
Mike Ellery
145326c00c Add policy check to FindBoost 2019-08-19 06:58:50 -07:00
Mike Ellery
c7d90bfddd Update to current SOCI HEAD 2019-08-16 10:33:08 -07:00
Mike Ellery
bfa84cfca5 Fix io_latency_probe test on CI environments 2019-08-16 10:33:08 -07:00
Mike Ellery
cbc6e500b6 Set minimum versions for gcc/clang 2019-08-16 10:33:08 -07:00
Mike Ellery
13a4fefe34 Travis CI improvements:
FIXES: #2527

* define custom docker image for travis-linux builds based on
  package build image
* add macos builds
* add windows builds (currently allowed to fail)
* improve build and shell scripts as required for the CI envs
* add asio timer latency workaround
* omit several manual tests from TravisCI which cause memory exhaustion
2019-08-16 10:33:08 -07:00
John Freeman
87e9ee5ce9 Add support for reserved peer slots:
This commit allows server operators to reserve slots for specific
peers (identified by the peer's public node identity) and to make
changes to the reservations while the server is operating.

This commit closes #2938
2019-08-05 17:46:24 -07:00
John Freeman
20cc5df5fe Fix GitLab CI
- Update Docker image to Boost 1.70
- Bust dependency cache
- Pass `Boost_NO_BOOST_CMAKE` to CMake
2019-08-05 09:49:43 -07:00
Miguel Portilla
9e117b7b38 Fix shard path detection 2019-08-04 20:48:08 -07:00
Miguel Portilla
a02d914093 Move shard store init to Application 2019-08-04 20:48:08 -07:00
Miguel Portilla
c5a95f1eb5 Remove SQLite Validations table 2019-08-04 20:01:34 -07:00
Manoj doshi
e1adbd7ddd Set version to 1.3.1 2019-07-24 15:22:24 -07:00
Joseph Busch
355a7b04a8 Add a LogicError when a deadlock is detected 2019-07-24 14:08:47 -07:00
Lazaridis
d3ee0df93a Add links to in-repo build-instructions 2019-07-24 14:03:44 -07:00
Mark Travis
7c24f7b170 Improve logging during process startup. 2019-07-24 13:55:38 -07:00
Mike Ellery
a3060516c6 Improve package build pipeline:
- Add docker container tags for "latest_BRANCH"
- Prevent different branches from overwriting deb repo artifacts
- Manual approval always required before pushing to prod
2019-07-24 13:53:09 -07:00
Nik Bougalis
caa5c9e223 Set version to 1.3.0 2019-07-09 13:56:37 -07:00
Manoj doshi
846538304f Set version to 1.3.0-rc2 2019-07-09 13:50:12 -07:00
Mo Morsi
7b7e3b6750 Return WS error on closure when balance threshold exceeds 2019-07-09 13:50:12 -07:00
Miguel Portilla
a988b3224f Use NuDB context with backends 2019-07-09 13:50:12 -07:00
Scott Schurr
89b3bf0796 Stabilize RPC error code values:
The original intent was that RPC error codes were not stable.
But those codes were made available through the API, so some
users came to depend on the code values.  This change adapts
to the current state of affairs.
2019-07-09 13:50:12 -07:00
seelabs
6d8988b78a Improve handling of revoked manifests:
Manifests which are revoked can include ephemeral keys although doing
so does not make sense: a revoked manifest isn't used for signing and
so don't need to define an ephemeral key.
2019-07-09 13:38:59 -07:00
Mike Ellery
3acbd84f1d Set proper system openssldir in package build 2019-07-03 11:22:53 -07:00
Manoj doshi
45403b877f Set version to 1.3.0-rc1 2019-06-25 12:03:18 -07:00
Manoj doshi
f17d9bc421 Set version to 1.3.0-b6 2019-06-21 14:59:08 -07:00
Nik Bougalis
ba2714fa22 Make protocol message counters more granular:
A running instance of the server tracks the number of protocol messages
and the number of bytes it sends and receives.

This commit makes the counters more granular, allowing server operators
to better track and understand bandwidth usage.
2019-06-21 14:53:50 -07:00
Mike Ellery
2c4b3d515d Trim whitespace for all config lines
FIXES: 2979
2019-06-21 14:48:45 -07:00
Mike Ellery
59973a435e Add beast/cxx17 to install set 2019-06-19 11:32:31 -07:00
Mike Ellery
93232ec7df Add logrotate config to rpm/deb pkgs 2019-06-19 11:31:19 -07:00
Manoj doshi
efa926676c Set version to 1.3.0-b5 2019-06-13 21:06:25 -07:00
Scott Schurr
dc24748c24 Improve locking of PeerImp member variables 2019-06-13 20:59:28 -07:00
Mo Morsi
f8365f5009 Add JsonOptions enum class to contain options passed to getJSON methods 2019-06-13 20:40:33 -07:00
Mo Morsi
c2138c4e88 Fix Docker error about "FROM" macro usage 2019-06-13 20:39:47 -07:00
Mike Ellery
bfad96dbb9 Force snappy compression for RocksDB (remove option):
FIXES: https://github.com/ripple/rippled/issues/2860

 * Also remove RocksDBQuick backend which is non-functional.
2019-06-13 20:38:42 -07:00
Mike Ellery
0ef6d9f9a0 Add slack notify for approvals, remove old RPM build 2019-06-13 20:38:22 -07:00
Mike Ellery
c1a1cfe550 Pkgbld - Make approval blocking, add slack summary message 2019-06-13 20:38:05 -07:00
Howard Hinnant
773dcd1d48 Modernize base_uint:
*  Add construction and assignment from a generic
   contiguous container.  Both compile-time and run time
   safety checks are made to ensure the safety of this
   conversion.

*  Remove base_uint::copyFrom.  The generic copy assignment
   operator now does this functionality with enhanced
   safety and better syntax.

*  Remove construction from and dedendence on Blob.
   The generic constructor and assignment now handle this
   functionality.

*  Fix client code to adhere to this new API.

*  Removed the use of fromVoid in PeerImp.cpp as it was
   an inappropriate use of this dangerous API.  The
   generic container constructors do it with enhanced
   safety and better syntax.

*  Rename data member pn to data_ and make it private.

*  Remove constraint from hash_append

*  Remove array_type alias
2019-06-13 20:37:29 -07:00
Miguel Portilla
de99e79bf1 Fix SNTPClock shutdown
This PR addresses a problem where the server could hang indefinitely
on shutdown. The cause of the problem is the SNTPClock class was not
binding the socket to an endpoint on initialization. This can create
an error sent to the read handler. Unfortunately, the handler ignores
the error, reads again and enters into a loop preventing the
io_service from ever completing.
2019-06-13 20:36:45 -07:00
Manoj doshi
e83d367f49 Set version to 1.3.0-b4 2019-05-22 14:44:15 -07:00
invalidator
aa76b382af Document IPv6 usage in sample config:
- Explain how to bind to both IPv4 and IPv6 interfaces
- Provide a hint in the default [port_peer] section
- Do not enable it by default

Note that on Linux, use of '::' and IPv4-mapped IPv6 depends on a sysctl value
setting 'net.ipv6.bindv6only = 0' which seems to be the default on most Linux
distributions.
2019-05-22 13:15:43 -07:00
Howard Hinnant
595b7b194c Improve locking:
- Use `std::lock` when grabbing multiple mutexes to ensure consistent
locking order and avoid deadlocks.
- Reduce the scope of the master mutex lock by relesing it prior to
calling setHeartbeatTimer
2019-05-22 13:15:43 -07:00
JoelKatz
5f908ba870 Make some locks more granular:
- Overlay
- Cluster
- Validator List
- Consensus

The overlay also has its own lock and manages its own thread safety.
2019-05-22 13:15:43 -07:00
Mike Ellery
adc1b8a36b Update package build env to boost 1.70 2019-05-22 13:15:43 -07:00
Mike Ellery
73c6e47e8a Use local rippled core lib during pkg build 2019-05-22 13:15:43 -07:00
Mike Ellery
3a780f80f1 Remove repo package check from update script 2019-05-22 13:15:43 -07:00
mtrippled
c78404e233 Pause for lagging validators. 2019-05-22 13:15:43 -07:00
seelabs
79a0cb096b Payment paths with a zero output step are dry (RIPD-1749):
A tiny input amount to a payment step can cause this step to output zero. For
example, if a previous steps outputs a dust amount of 10^-80, and this step is a
IOU -> XRP offer, the offer may output zero drops. In this case, call the strand
dry. Before this patch, an error would be logged, the strand would be called
dry; in debug mode an assert triggered.

Note, this patch is not transaction breaking, as the caller did not user the ter
code. The caller only checked for success or failuer.

This patch addresses github issue issue reported here:
https://github.com/ripple/rippled/issues/2929
2019-05-20 15:58:54 -07:00
seelabs
6f9e8dc720 Support Boost 1.70:
This patch removes calls to several deprecated asio functions.

* `io_service::post` becomes `post` (free function)
* `io_service::work` becomes `executor_work_guard`
* `io_service::wrap` becomes `bind_executor`
* `get_io_context`   becomes `get_executor` or `get_executor().context()`

This patch was tested with boost 1.69 and 1.70. The functions
`ripple::get_lowest_layer` and `beast::create_waitable_timer` are required to
handle a breaking difference between these versions. When rippled no longer
needs to support pre 1.70 boost versions, both of these functions may be
removed, and the waitable timer injections may also be removed.
2019-05-20 15:58:54 -07:00
Scott Schurr
b39b0fef39 Get names of transactions and ledger types from jss 2019-05-20 15:58:54 -07:00
Edward Hennis
be139d9bde Add some missing items to help command list:
* validators
* validator_list_sites
* Put "version" in the right place
2019-05-20 15:58:54 -07:00
John Freeman
c6d82c722b Configure build+test matrix for GitLab CI:
* Disable parallel tests for address sanitizer
* Improve caching
* Prefer Ninja builds because they are faster
2019-05-20 15:58:54 -07:00
John Freeman
0c20e2eb8b Refine parseUrl regular expression (RIPD-1708):
The new parse logic is more strict but handles more cases. If an exception
is thrown, just bail.

* Allow parsing unenclosed IPv6 addresses without port
* Improve string construction
* Reduce nesting levels of code
2019-05-20 15:58:54 -07:00
James Fryman
63eeb8d734 Use recursive remove and clean for apt (OPS-508) 2019-05-20 15:58:34 -07:00
seelabs
5214b3c1b0 Set version to 1.3.0-b3 2019-04-29 08:18:48 -04:00
Jesper Wallin
5f7a61f040 Report a peer's public key and IP address in log messages (fixes #2675) 2019-04-29 08:17:24 -04:00
John Freeman
c5a938de55 Disallow using the master key as the regular key:
The XRP Ledger allows an account to authorize a secondary key pair,
called a regular key pair, to sign future transactions, while keeping
the master key pair offline.

The regular key pair can be changed as often as desired, without
requiring other changes on the account.

If merged, this commit corrects a minor technical flaw which would
allow an account holder to specify the master key as the account's
new regular key.

The change is controlled by the `fixMasterKeyAsRegularKey` amendment
which, if enabled, will:

1. Prevent specifying an account's master key as the account's
   regular key.
2. Prevent the "Disable Master Key" flag from incorrectly affecting
   regular keys.
2019-04-29 08:17:24 -04:00
Mike Ellery
9372a587e4 Request RocksDB PORTABLE build option 2019-04-29 08:17:24 -04:00
Mike Ellery
948e724dff Improvements to pkg CI pipeline:
* add manual approval option before push to prod
* Use new public repo DNS name
* add distros to smoketest
2019-04-29 08:17:24 -04:00
Mike Ellery
06faf2bd5b Improve exit and test failure handling in CI 2019-04-29 08:17:24 -04:00
Mike Ellery
1dd81c04f3 Improve jemalloc build config:
* fix include order for macos/homebrew
* use static jemalloc for static builds
* set CMP0074 for using <pkgname>_ROOT variables
2019-04-29 08:17:24 -04:00
Mike Ellery
56dbf70c3c Improve windows build README 2019-04-29 08:17:24 -04:00
Mike Ellery
f8a4ac6ad7 Use optimized OpenSSL implementations when possible 2019-04-29 08:17:24 -04:00
seelabs
61bd06177f Reserve memory before inserting into a flat set 2019-04-29 08:17:24 -04:00
seelabs
80e535a13c Arguments passed to jtx Env::operator() must be invocable:
Before this patch, jtx allowed non-invocable functions to be passed to
operator(). However, these arguments are ignored. This caused erronious code
code such as:

```
env (offer (account_to_test, BTC (250), XRP (1000)),
         offers (account_to_test, 1));
```

While it looks like the number of offers are checked, they are not. The `offers`
funclet is never run. While we could modify jtx to make the above code correct,
a cleaner solution is to run post conditions in a `require` statement after a
transasction runs.
2019-04-26 11:22:36 -07:00
Scott Schurr
64b55c0f88 Rename JsonFields.h to jss.h:
At this point all of the jss::* names are defined in the same
file.  That file has been named JsonFields.h.  That file name
has little to do with either JsonStaticStrings (which is what
jss is short for) or with jss.  The file is renamed to jss.h
so the file name better reflects what the file contains.

All includes of that file are fixed.  A few include order
issues are tidied up along the way.
2019-04-26 11:21:52 -07:00
Scott Schurr
afcc4ff296 Reduce likelihood of malformed SOTemplate:
Formerly an SOTemplate was default constructed and its elements
added using push_back().  This left open the possibility of a
malformed SOTemplate if adding one of the elements caused a throw.

With this commit the SOTemplate requires an initializer_list of
its elements at construction.  Elements may not be added after
construction.  With this approach either the SOTemplate is fully
constructed with all of its elements or the constructor throws,
which prevents an invalid SOTemplate from even existing.

This change requires all SOTemplate construction to be adjusted
at the call site.  Those changes are also in this commit.

The SOE_Flags enum is also renamed to SOEStyle, which harmonizes
the name with other uses in the code base.  SOEStyle elements
are renamed (slightly) to have an "soe" prefix rather than "SOE_".
This heads toward reserving identifiers with all upper case for
macros.  The new style also aligns with other prominent enums in
the code base like the collection of TER identifiers.

SOElement is adjusted so it can be stored directly in an STL
container, rather than requiring storage in a unique_ptr.
Correspondingly, unique_ptr usage is removed from both
SOTemplate and KnownFormats.
2019-04-26 11:17:45 -07:00
Scott Schurr
57fe197d3e Remove runtime inference of unrecognized SFields 2019-04-26 11:17:45 -07:00
Edward Hennis
9279a3fee7 Refactor SField construction:
* Use a private_access_tag_t to prevent other files from
  instantiating an SField.
* Delete SField move constructor and make helper.
2019-04-26 11:17:45 -07:00
JoelKatz
b6363289bf Use Json::StaticString for field names
Clean up some code relating to unknown fields and avoid
allocate/copy/free cycles for Json objects containing
serialized field names.
2019-04-26 11:17:45 -07:00
Nik Bougalis
8c1123edc6 Merge master (1.2.4) into develop (1.3.0-b2) 2019-04-26 10:42:51 -07:00
Nik Bougalis
834f545498 Set version to 1.2.4 2019-04-15 12:39:27 -07:00
Mike Ellery
dd99bf479f Enforce a 20s timeout when making validator list requests (RIPD-1737) 2019-04-15 12:39:16 -07:00
Miguel Portilla
2e26377e7c Use public key when routing shard crawl requests 2019-04-15 12:39:08 -07:00
seelabs
0329ee236f Set version to 1.2.3 2019-03-28 17:47:14 -04:00
seelabs
b347afcc5b Better error checking in CachedViewImpl::read:
* Prevent null pointer dereferences
* Alway check for correct sle type before returning sle
* Reformat code
2019-03-28 17:47:14 -04:00
Nik Bougalis
fa57859477 Set version to 1.3.0-b2 2019-03-19 15:31:21 -07:00
Nik Bougalis
88cb0e5928 Allow manifests to include an optional 'domain' field:
The new 'Domain' field allows validator operators to associate a domain
name with their manifest in a transparent and independently verifiable
fashion.

It is important to point out that while this system can cryptographically
prove that a particular validator claims to be associated with a domain
it does *NOT* prove that the validator is, actually, associated with that
domain.

Domain owners will have to cryptographically attest to operating particular
validators that claim to be associated with that domain. One option for
doing so would be by making available a file over HTTPS under the domain
being claimed, which is verified separately (e.g. by ensuring that the
certificate used to serve the file matches the domain being claimed) and
which contains the long-term master public keys of validator(s) associated
with that domain.

Credit for an early prototype of this idea goes to GitHub user @cryptobrad
who introduced a PR that would allow a validator list publisher to attest
that a particular validator was associated with a domain. The idea may be
worth revisiting as a way of verifying the domain name claimed by the
validator's operator.
2019-03-19 15:31:21 -07:00
Nik Bougalis
e239eed6de Remove obsolete code 2019-03-19 15:31:20 -07:00
Mark Travis
504b3441dd Apply resource limits to proxied clients:
Resource limits were not properly applied to connections with
known IP addresses but no corresponding users.

Add unit tests for unlimited vs. limited ports.
2019-03-19 08:00:17 -07:00
Scott Schurr
872478d965 Construct ErrorCodes lookup table at compile time 2019-03-19 08:00:17 -07:00
Scott Schurr
185f2baf76 Remove unused RPC error codes:
An audit showed that a number of the RPC error codes in
ErrorCodes.h are no longer used in the code base.  The unused
codes were removed from the file along with their support code
in ErrorCodes.cpp.
2019-03-19 08:00:09 -07:00
Scott Schurr
36d6758945 Disallow both single- and multi-signing in RPC (RIPD-1713):
The ledger already declared a transaction that is both single-
and multi-signing malformed.  This just adds some checking in
the signing RPC commands (like submit and sign_for) which allows
that sort of error to be identified a bit closer to the user.

In the process of adding this code a bug was found in the
RPCCall unit test.  That bug is fixed as well.
2019-03-18 17:08:36 -07:00
seelabs
d8c450d272 Remove incorrectly defaulted functions:
* The functions removed in this commit were explicitly defaulted
  but implicitly deleted
2019-03-18 17:08:36 -07:00
Mike Ellery
8ef5b9bab4 Make LedgerTrie remove work for truncated history 2019-03-18 17:08:36 -07:00
Mike Ellery
e6370a6482 Add dpkg/rpm building capability:
* docker container definitions for package building
* cmake targets for building packages
* initial gitlab CI + artifactory integration
2019-03-18 16:44:54 -07:00
Mike Ellery
b2170d016a Update travis dist/tools 2019-03-18 16:36:57 -07:00
Mike Ellery
5c124f11c2 Remove the 'rocksdb' subtree 2019-03-18 16:19:24 -07:00
Mike Ellery
2aed24a552 Build RocksDB by ExternalProject 2019-03-18 16:19:24 -07:00
Howard Hinnant
296469f5fe Reduce memory allocations for RCLCensorshipDetector 2019-03-18 16:19:24 -07:00
Miguel Portilla
08371ba2c4 Improve shard downloader status reporting 2019-03-18 16:19:24 -07:00
Miguel Portilla
56bc2a2ade Improve SSLHTTPDownloader:
* Use TLS 1.2
* Make certificate verification configurable
2019-03-18 16:19:23 -07:00
Nik Bougalis
1084dc6dd3 Set version to 1.3.0-b1 2019-03-06 19:37:54 -08:00
Elliot Lee
8023caaa97 Correct example configuration file:
Trailing comments are not permitted in the crawl section
and can cause the lines containing them to be ignored.
2019-03-06 19:37:48 -08:00
Howard Hinnant
8b97466285 Always use UTC to be timezone-neutral (RIPD-1659) 2019-03-06 19:37:48 -08:00
Mike Ellery
de1d102535 Allow build to support XCode 10.2 2019-03-06 19:14:52 -08:00
Scott Schurr
1e1e8c2547 Remove assert that accesses object post-dtor (RIPD-1704) 2019-03-06 19:14:52 -08:00
Crypto Brad Garlinghouse
aa49be65a1 Remove conditional check for feature introduced in 0.28.1-b7 2019-03-06 19:14:52 -08:00
Crypto Brad Garlinghouse
cd820b3777 Improve the server's PING/PONG logic 2019-03-06 19:14:52 -08:00
Crypto Brad Garlinghouse
8d59ed5b2a Remove STValidation::isValid overload 2019-03-06 19:14:52 -08:00
seelabs
e03efdbe0b Remove use of beast's detail::sec_ws_key_type 2019-03-06 19:14:52 -08:00
seelabs
4f52c2989c Remove use of beast::detail::is_invocable trait 2019-03-06 19:14:52 -08:00
Mike Ellery
3fb13233a9 Provide patch for FindBoost and apply it 2019-03-06 19:14:52 -08:00
seelabs
9695fd44ba Support boost 1.69 2019-03-06 19:14:52 -08:00
ChronusZ
1bb32134f8 Remove censorshipMaxWarnings 2019-03-06 19:14:52 -08:00
seelabs
0ebed96142 Set version to 1.2.2 2019-03-05 18:21:39 -05:00
Edward Hennis
4c06b3f86f Validate TxQ config and expected transactions range 2019-03-04 11:45:56 -05:00
Nik Bougalis
a3470c225b Set version to 1.2.1 2019-02-25 13:01:32 -08:00
seelabs
c5d215d901 Add delivered amount to the ledger RPC command 2019-02-25 13:01:12 -08:00
JoelKatz
9dbf8495ee Avoid a race condition during peer status change 2019-02-25 12:59:35 -08:00
Nik Bougalis
2529edd2b6 Properly transition state to disconnected:
If the number of peers a server has is below the configured
minimum peer limit, this commit will properly transition the
server's state to "disconnected".

The default limit for the minimum number of peers required was
0 meaning that a server that was connected but lost all its
peers would never transition to disconnected, since it could
never drop below zero peers.

This commit redefines the default minimum number of peers to 1
and produces a warning if the server is configured in a way
that will prevent it from ever achieving sufficient connectivity.
2019-02-25 12:59:35 -08:00
Nik Bougalis
e974c7d8a4 Avoid directly using memcpy to deserialize data 2019-02-25 12:59:34 -08:00
Nik Bougalis
b335adb674 Make validators opt out of crawl:
If a server is configured to support crawl, it will report the
IP addresses of all peers it is connected to, unless those peers
have explicitly opted out by setting the `peer_private` option
in their config file.

This commit makes servers that are configured as validators
opt out of crawling.
2019-02-25 12:59:34 -08:00
Nik Bougalis
c6ab880c03 Display validator status only to admin requests:
Several commands allow a user to retrieve a server's status. Commands
will typically limit disclosure of information that can reveal that a
particular server is a validator to connections that are not verified
to make it more difficult to determine validators via fingerprinting.

Prior to this commit, servers configured to operate as validators
would, instead of simply reporting their server state as 'full',
augment their state information to indicate whether they are
'proposing' or 'validating'.

Servers will only provide this enhanced state information for
connections that have elevated privileges.

Acknowledgements:
Ripple thanks Markus Teufelberger for responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to responsibly
disclose any issues that they may find. For more on Ripple's Bug Bounty
program, please visit: https://ripple.com/bug-bounty
2019-02-25 12:59:31 -08:00
Mike Ellery
7779dcdda0 Set version to 1.2.0 2019-02-12 16:41:03 -08:00
Mike Ellery
132f1b218c Set version to 1.2.0-rc2 2019-01-30 15:37:56 -08:00
Mike Ellery
e5d6f16f19 Remove [ips] section from sample config 2019-01-30 15:33:39 -08:00
Mike Ellery
8f973621fc Set version to 1.2.0-rc1 2019-01-28 12:02:33 -08:00
Mike Ellery
b75c2d71a5 Make sample config comment consistent with code 2019-01-28 11:53:30 -08:00
Nik Bougalis
eed210bb67 Set version to 1.2.0-b11 2019-01-18 12:13:22 -08:00
Mike Ellery
eab2a0d668 Improve debug information generated for the LedgerTrie 2019-01-18 12:13:21 -08:00
Howard Hinnant
148bbf4e8f Add safe_cast (RIPD-1702):
This change ensures that no overflow can occur when casting
between enums and integral types.
2019-01-18 12:13:21 -08:00
Joseph Busch
494724578a Enchance /crawl API endpoint with local server information (RIPD-1644):
The /crawl API endpoint allows developers to examine the structure of
the XRP Ledger's overlay network.

This commit adds additional information about the local server to the
/crawl endpoint, making it possible for developers to create data-rich
network-wide status dashboards.

Related:
 - https://developers.ripple.com/peer-protocol.html
 - https://github.com/ripple/rippled-network-crawler
2019-01-18 12:13:21 -08:00
Nik Bougalis
ea76103d5f Detect malformed data earlier during deserialization (RIPD-1695):
When deserializing specially crafted data, the code would ignore certain
types of errors. Reserializing objects created from such data results in
failures or generates a different serialization, which is not ideal.

Also addresses: RIPD-1677, RIPD-1682, RIPD-1686 and RIPD-1689.

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing these issues.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to responsibly
disclose any issues that they may find. For more on Ripple's Bug Bounty
program, please visit: https://ripple.com/bug-bounty
2019-01-18 12:13:21 -08:00
Nik Bougalis
2151110976 Improve message buffering (RIPD-1699):
Specially crafted messages could cause the server to buffer large
amounts of memory which could increase memory pressure.

This commit changes how messages are buffered and imposes a limit
on the amount of data that the server is willing to buffer.

Acknowledgements:
Aaron Hook for responsibly disclosing this issue.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to
responsibly disclose any issues they may find. For information
on Ripple's Bug Bounty program, please visit:

    https://ripple.com/bug-bounty
2019-01-17 18:39:04 -08:00
Nik Bougalis
dfb45baa93 Set version to 1.2.0-b10 2018-12-28 13:32:27 -08:00
f443439f1f Add zaphod.alloy.ee to default hub configuration 2018-12-28 13:31:19 -08:00
Howard Hinnant
6d0b108ec1 Upgrade sqlite to 3.26 (fix #2810) 2018-12-28 13:31:19 -08:00
Howard Hinnant
710f9ee1ac Relax overly-strict assert in Serializer constructor (RIPD-1701):
The constructor would previously assert that the specified buffer pointer
was non-null, even if the buffer size is specified as 0. While reasonable,
this also makes it more difficult to use this API.
2018-12-28 13:31:19 -08:00
Howard Hinnant
76d5ecb595 Verify invariants when calling SHAMapInnerNodeV2::addRaw (RIPD-1700) 2018-12-28 13:32:09 -08:00
Joseph Busch
ba9ca1378e Strict input validation against expected schema (RIPD-1709, RIPD-1710) 2018-12-28 13:31:19 -08:00
Miguel Portilla
1be8094ee2 Improve crawl shard resource usage 2018-12-28 13:31:19 -08:00
Nik Bougalis
96c949a997 Set version to 1.2.0-b9 2018-12-11 13:01:05 -08:00
Mike Ellery
9121e26708 Update libarchive to 3.3.3 from official repo 2018-12-11 12:52:29 -08:00
Edward Hennis
2432f13903 Reserve correct vector size for fee calculations:
* Using txnsExpected_, which is influenced by both the config
  and network behavior, can reserve far too much or far too
  little memory, wasting time and resources.
* Not an issue during normal operation, but a user could
  cause problems on their local node with extreme configuration
  settings.
2018-12-11 12:51:46 -08:00
Edward Hennis
259fb1c32e Fix unit test with incorrectly hard-coded parameter:
* initFee was using a lot of logic that could look unclear. Add
  some documentation explaining why certain values were used.
* Because initFee had side effects, callers needed to repeat the
  max queue size computation, making the initial problem more
  likely. Instead, return the max queue size value, so the caller
  can reuse it.
* A newer test (testInFlightBalance()) was incorrectly using a
  hard-coded queue limit. Fix it to use initFee's new return
  value.
2018-12-11 12:51:46 -08:00
Rome Reginelli
e0515b0015 Correct amount serialization comments 2018-12-11 12:51:46 -08:00
John Freeman
412a3ec710 Fix the --rpc_port command-line argument
The --rpc_port command-line option is effectively ignored. We construct
an `Endpoint` with the given port, but then drop it on the floor.
(Perhaps the author thought the `Endpoint::at_port` method is a mutation
instead of a transformation.) This small change adds the missing
assignment to hold on to the new endpoint.

Fixes #2764
2018-12-11 12:50:05 -08:00
Nik Bougalis
30bba29da2 Merge master (1.1.2) into develop (1.2.0-b8) 2018-12-11 12:48:32 -08:00
Nik Bougalis
4f3a76dec0 Set version to 1.1.2 2018-11-29 21:49:10 -08:00
Nik Bougalis
61f443e3bb Properly bypass connection limits for cluster peers (fix #2795) 2018-11-29 21:38:35 -08:00
Brad Chase
bd2a38f584 Improve preferred ledger calculation:
This changeset ensures the preferred ledger calculation
properly distinguishes the absence of trusted validations
from a preferred ledger which is the genesis ledger.
2018-11-29 21:38:12 -08:00
Nik Bougalis
4cff94f7a4 Set version to 1.2.0-b8 2018-11-25 17:39:49 -08:00
Mark Travis
fbdbffed67 Report duration in current state. 2018-11-25 17:37:31 -08:00
Scott Schurr
ad5c5f1969 STObject::applyTemplate() throws with description of error:
The `STObject` member function `setType()` has been renamed to
applyTemplate() and modified to throw if there is a template
mismatch.

The error description in the exception is, in certain cases,
used, to better indicate why a particular transaction was
considered ill formed.

Fixes #2585.
2018-11-25 17:37:31 -08:00
John Freeman
c354809e1c Implement missing string conversions for JSON
`Json::Value::isConvertibleTo` indicates that unsigned integers and
reals are convertible to string, but trying to do so (with
`Json::Value::asString`) throws an exception because its internal switch
is missing these cases. This change fills them in (and adds tests).

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing this issue.

Closes #2778
2018-11-25 17:37:14 -08:00
John Freeman
dc4d76f626 Prefer regex to manual parsing in parseURL:
Although `parseURL` used a regex to pull the authority out of the URL
being parsed, it performed manual parsing of the hostname and port.

This commit rolls the parsing of the username and password, if any,
directly into the regex. The hostname can be a name, an IPv4 or an
IPv6 address.

Fixes #2751
2018-11-21 17:08:21 -08:00
Edward Hennis
c1a02440dc Load validator list from file:
* Adds local file:// URL support to the [validator_list_sites] stanza.
  The file:// URL must not contain a hostname. Allows a rippled node
  operator to "sideload" a new list if their node is unable to reach
  a validator list's web site before an old list expires. Lists
  loaded from a file will be validated in the same way a downloaded
  list is validated.
* Generalize file/dir "guards" from Config test so they can be reused
  in other tests.
* Check for error when reading validators.txt. Saves some parsing and
  checking of an empty string, and will give a more meaningful error.
* Completes RIPD-1674.
2018-11-20 19:49:39 -08:00
Edward Hennis
e7a69cce65 Account for minimum reserve in potential spend:
* Relevant when deciding whether an account can queue multiple
  transactions. If the potential spend of the already queued
  transactions would dip into the reserve, the reserve is
  preserved for fees.
* Also change several direct modifications of the owner count to
  call adjustOwnerCount to preserve overflow checking.
* Update related unit testcase
* Resolves #2251
2018-11-20 19:49:39 -08:00
Howard Hinnant
60dc949314 Remove custom terminate handler
* Reduce the amount of code we have to maintain.
* Remove the potential for degrading stack dumps.
2018-11-20 19:45:02 -08:00
Nik Bougalis
cc824685e7 Set version to 1.2.0-b7 2018-11-09 07:40:46 -08:00
JoelKatz
be70d81bd7 Perform some extra checks on ledger changes
Perform some extra checks on the close time and sequence number
of a candidate for network consensus ledger. This tightens
defenses against some "insane/hostile supermajority" attacks.
2018-11-09 07:40:41 -08:00
JoelKatz
6df96f08df Ensure websocket PING/PONG token has length 8 (RIPD-1670) 2018-11-09 07:40:41 -08:00
JoelKatz
9ad2b9be45 Fix a rare race condition on shutdown:
If we happen to get very unlucky and close the door when no
accept operation is pending, the do_accept loop would never
terminate.
2018-11-09 07:40:41 -08:00
JoelKatz
0d2b2923da Control memory growth from slow writes
* Don't allow a write batch to grow without bound
* Don't fetch history if write load is high
2018-11-09 07:40:41 -08:00
Mike Ellery
265f5f1fb1 Delete old protobuf subtree 2018-11-08 18:58:13 -08:00
Mike Ellery
a2ab6c4b02 Build protobuf as ExternalProject when not found 2018-11-08 18:58:13 -08:00
Mike Ellery
6bdc9e7b30 Use correct manifest cache when loading ValidatorList 2018-11-08 18:58:13 -08:00
Nik Bougalis
c71eb45240 Eliminate potential undefined behavior (RIPD-1685):
Under certain conditions, we could call `memcpy` or `memcmp` with a null
source pointer. Even when specifying 0 as the amount of data to copy this
could result in undefined behavior under the C and C++ standards.

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing these issues.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to responsibly
disclose any issues that they may find. For more on Ripple's Bug Bounty
program, please visit: https://ripple.com/bug-bounty
2018-11-08 18:58:13 -08:00
Nik Bougalis
753600a2a0 Reset the validator list fetch timer if an error occurs 2018-11-08 18:58:12 -08:00
Nik Bougalis
945493d9cf Allow servers to detect transaction censorship attempts (RIPD-1626):
The XRP Ledger is designed to be censorship resistant. Any attempt to
censor transactions would require coordinated action by a majority of
the system's validators.

Importantly, the design of the system is such that such an attempt is
detectable and can be easily proven since every validators must sign
the validations it publishes.

This commit adds an automated censorship detector. While the server is
in sync, the detector tracks all transactions that, in the view of the
server, should have been included and issues warnings of increasing
severity for any transactions which, have not after several rounds.
2018-11-08 18:58:11 -08:00
Nik Bougalis
2a8b0e4b88 Set version to 1.2.0-b6 2018-11-06 10:27:29 -08:00
Nik Bougalis
513b1dd194 Add support for Ed25519 seeds encoded using ripple-lib:
When Ed25519 support was added to ripple-lib, a way to specify
whether a seed should be used to derive a "classic" secp256k1
keypair or a "new" Ed25519 keypair was needed, and the
requirements were that:

1. previously seeds would, correctly, generate a secp256k1
   keypair.
2. users would not have to know about whether the seed was
   used to generate a secp256k1 or an Ed25519 keypair.

To address these requirements, the decision was made to encode
the type of key within the seed and a custom encoding was
designed.

The encoding uses a token type of 1 and prefixes the actual
seed with a 2 byte header, selected to ensure that all such
keypairs will, when encoded, begin with the string "sEd".

This custom encoding is non-standard and was not previously
documented; as a result, it is not widely supported and other
sofware may treat such keys as invalid. This can make it
difficult for users that have stored such a seed to use
wallets or other tooling that is not based on ripple-lib.

This commit adds support to rippled for automatically
detecting and properly handling such seeds.
2018-11-06 10:27:13 -08:00
Nik Bougalis
77462b8f72 Remove deprecated 'validation_seed' RPC command:
The 'validation_seed' RPC command was used to change the validation
key used by a validator at runtime.

Its implementation was commented out with commit fa796a2eb5
which has been included in the codebase since the 0.30.0 release
and there are no plans to reintroduce the functionality at this
point.

Validator operators should migrate to using validator manifests
instead.

This fixes #2748.
2018-11-06 10:27:12 -08:00
Nik Bougalis
1682fe3a39 Cleanup unused Beast bits and pieces:
This cleanup does not remove Boost.Beast code, but old-style Beast
which is no longer relevant or helpful.
2018-11-06 10:27:10 -08:00
Edward Hennis
58f786cbb4 Make the FeeEscalation amendment permanent (RIPD-1654):
The FeeEscalation amendment has been enabled on the XRP Ledger network
since May 19, 2016. The transaction which activated this amendment is:
5B1F1E8E791A9C243DD728680F108FEF1F28F21BA3B202B8F66E7833CA71D3C3.

This change removes all conditional code based around the FeeEscalation
amendment, but leaves the amendment definition itself since removing the
definition would cause nodes to think an unknown amendment was activate
causing them to become amendment blocked.

The commit also removes the redundant precomputed hashes from the
supportedAmendments vector.
2018-11-06 10:26:29 -08:00
Edward Hennis
a96cb8fc1c Remove undocumented experimental options from RPC sign (RIPD-1653):
The `x_assume_tx` and `x_queue_okay` experimental options were
associated with the transaction queue that were not officially
supported.
2018-11-06 10:26:29 -08:00
Joe Loser
c587012e5c Inline calls to cachedRead:
Problem:
- There are only a few call sites to cachedRead, and all of them
  currently do more work than is required since we know the type in each
  case.

Solution:
- "Inline" the codepath to cachedRead, but do not check if the type is
  valid. In all such call sites, we know the keylet to read directly.

This fixes #2550
2018-11-06 10:26:29 -08:00
Mike Ellery
ad4bbd8dff Add source filtering for coverage with option to disable 2018-11-06 10:26:29 -08:00
Mike Ellery
202d91c9f0 Remove unused json_batchallocator.h 2018-11-06 10:26:29 -08:00
Howard Hinnant
146ea5d44e Remove a use after std::move
Fixes: #2538
Fixes: #2536
2018-11-06 10:26:29 -08:00
Howard Hinnant
157c066f2b Fix memory leak in Json move assignment operator
*  When move assignment is creates a cyclic ownership pattern
   memory was being leaked.  This patch breaks the cycle.

*  Fixes: #2572
2018-11-06 10:26:29 -08:00
Howard Hinnant
156e8dae83 Replace WaitableEvent with portable std primitives:
The WaitableEvent class was a leftover from the pre-Boost
version of Beast and used Windows- and pthread-specific
APIs.

This refactor replaces that functionality by using only
interfaces provided by the C++ standard, making the code
more portable.

Closes #2402.
2018-11-06 10:26:29 -08:00
Markus Teufelberger
5e96da51f9 Remove the state file for the random number generator 2018-11-06 10:26:29 -08:00
Nik Bougalis
cb71d493a0 Set version to 1.2.0-b5 2018-10-23 08:33:18 -07:00
MarkusTeufelberger
8124c1f51f remove duplicated include
The errno.h header is already included for both Linux and Android above
2018-10-23 08:24:11 -07:00
Nik Bougalis
6ed2270bc9 Merge master (1.1.1) into develop (1.2.0-b4) 2018-10-23 08:21:43 -07:00
Mike Ellery
4e7c038520 Set version to 1.2.0-b4 2018-10-19 12:24:51 -07:00
1535239824@qq.com
7b48dc36f5 Add fixTakerDryOfferRemoval amendment 2018-10-19 12:23:25 -07:00
Miguel Portilla
d5c0e1216d Change conflicting example websocket port 2018-10-19 12:22:47 -07:00
Scott Schurr
a999894dae Allow rippled to compile with C++17:
Many of the warnings on Windows were not resolved, just
silenced with _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS.
They need to be resolved in a future commit.
2018-10-19 12:21:57 -07:00
Scott Schurr
63e167b7a3 ledger_entry RPC by index matches other forms [RIPD-1538] 2018-10-19 12:21:10 -07:00
MarkusTeufelberger
8fc6a8175b Remove unused execinfo.h header
Fixes #2671 and #2159
2018-10-19 12:20:11 -07:00
Edward Hennis
af1697cc6a Improve RPC error message for fee command:
* If rippled is not synced to the network, `fee` will return a
  "no network" error instead of the possibly confusing "not enabled"
  error.
* Resolves RIPD-1588
2018-10-19 12:19:20 -07:00
Mark Travis
e98c76110a Remove outdated example configs. 2018-10-19 12:18:29 -07:00
Mike Ellery
7fe1d4b9c2 Accept redirects from validator list sites:
Honor location header/redirect from validator sites. Limit retries per
refresh interval to 3. Shorten refresh interval after HTTP/network errors.

Fixes: RIPD-1669
2018-10-19 12:16:57 -07:00
Nik Bougalis
b36e11bc49 Properly handle expired validator lists when validating (RIPD-1661):
A validator that was configured to use a published validator list could
exhibit aberrent behavior if that validator list expired.

This commit introduces additional logic that makes validators operating
with an expired validator list bow out of the consensus process instead
of continuing to publish validations. Normal operation will resume once
a non-expired validator list becomes available.

This commit also enhances status reporting when using the `server_info`
and `validators` commands. Before, only the expiration time of the list
would be returned; now, its current status is also reported in a format
that is clearer.
2018-10-19 12:15:36 -07:00
seelabs
72e6005f56 Set version to 1.1.1 2018-10-19 13:12:40 -04:00
Nik Bougalis
152d698957 Properly handle expired validator lists when validating (RIPD-1661):
A validator that was configured to use a published validator list could
exhibit aberrent behavior if that validator list expired.

This commit introduces additional logic that makes validators operating
with an expired validator list bow out of the consensus process instead
of continuing to publish validations. Normal operation will resume once
a non-expired validator list becomes available.

This commit also enhances status reporting when using the `server_info`
and `validators` commands. Before, only the expiration time of the list
would be returned; now, its current status is also reported in a format
that is clearer.
2018-10-19 13:08:56 -04:00
Mike Ellery
7c96bbafbd CI rpm build fix 2018-10-11 11:08:55 -07:00
Mike Ellery
bdaad19e70 Accept redirects from validator list sites:
Honor location header/redirect from validator sites. Limit retries per
refresh interval to 3. Shorten refresh interval after HTTP/network errors.

Fixes: RIPD-1669
2018-10-11 11:08:27 -07:00
seelabs
63c3fc30d8 Set version to 1.2.0-b3 2018-10-10 13:09:25 -04:00
Joe Loser
1ac9694dbc Simplify strHex:
Problem:
- There are several specific overloads with some custom code that can be
  easily replaced using Boost.Hex.

Solution:
- Introduce `strHex(itr, itr)` to return a string given a begin and end
  iterator.
- Remove `strHex(itr, size)` in favor of the `strHex(T)` where T is
  something that has a `begin()` member function. This allows us to
  remove the strHex overloads for `std::string`, Blob, and Slice.
2018-10-10 13:09:22 -04:00
Miguel Portilla
3661dc88fe Add RPC command shard crawl (RIPD-1663) 2018-10-10 12:16:01 -04:00
Edward Hennis
86c066cd7e Include entire src tree in multiconfig projects:
* For example Visual Studio, XCode. This will allow easily working with
  any file in the IDE.
* Also ignore the file created by Visual Studio when using cmake
  integration.
* Use conditional for unity/nounity sources (h/t @mellery451)
2018-10-10 10:25:25 -04:00
Mike Ellery
d70464032c Add dependency for NuDB ExternalProject 2018-10-10 10:19:00 -04:00
Scott Schurr
0bbe6e226c Remove beast::Journal default constructor 2018-10-10 10:18:03 -04:00
Mike Ellery
49e61cc0a6 Improve codecov builds:
- allow private token for jenkins/codecov
- add custom targets for gcc/clang to generate codecov reports
- use CMake coverage target in jenkins build
- optional coverage_test argument when configuring the build
2018-10-10 10:15:10 -04:00
Scott Schurr
6572fc8e95 Implement MultiSignReserve amendment [RIPD-1647]:
Reduces the account reserve for a multisigning SignerList from
(conditionally) 3 to 10 OwnerCounts to (unconditionally) 1
OwnerCount.  Includes a transition process.
2018-10-01 18:17:33 -07:00
Nik Bougalis
3ce4dda5cb Set version to 1.2.0-b2 2018-10-01 11:26:31 -07:00
Edward Hennis
7295cf979b Grow the open ledger expected transactions quickly (RIPD-1630):
* When increasing the expected ledger size, add on an extra 20%.
* When decreasing the expected ledger size, take the minimum of the
  validated ledger size or the old expected size, and subract another 50%.
* Update fee escalation documentation.
* Refactor the FeeMetrics object to use values from Setup
2018-10-01 11:26:22 -07:00
Edward Hennis
e14f913244 Update TxQ developer docs:
* Rename a couple of member variables for clarity.
2018-10-01 11:26:22 -07:00
Joe Loser
cd1c5a30dd Add user defined literals for megabytes and kilobytes 2018-10-01 11:26:22 -07:00
Joe Loser
8dd8433bb6 Remove unused function in AutoSocket.h 2018-10-01 07:40:56 -07:00
Scott Schurr
eeb9d92fb0 Add RPCCall unit tests (RIPD-1634) 2018-10-01 07:40:56 -07:00
Scott Schurr
4104778067 Improve transaction error condition handling (RIPD-1578, RIPD-1593):
As described in #2314, when an offer executed with `Fill or Kill`
semantics, the server would return `tesSUCCESS` even if the order
couldn't be filled and was aborted. This would require additional
processing of metadata by users to determine the effects of the
transaction.

This commit introduces the `fix1578` amendment which, if enabled,
will cause the server to return the new `tecKILLED` error code
instead of `tesSUCCESS` for `Fill or Kill` orders that could not
be filled.

Additionally, the `fix1578` amendment will prevent the setting of
the `No Ripple` flag on trust lines with negative balance; trying
to set the flag on such a trust line will fail with the new error
code `tecNEGATIVE_BALANCE`.
2018-09-30 14:10:40 -07:00
Spec
4dcb3c9199 Avoid dispatching multiple fetch pack threads 2018-09-30 13:54:59 -07:00
Nik Bougalis
b0092aee24 Set version to 1.2.0-b1 2018-09-28 09:15:12 -07:00
Mike Ellery
bb52b04c25 Remove subtrees for soci, sqlite, lz4, snappy, nudb 2018-09-28 09:15:06 -07:00
Mike Ellery
83dac8b382 Use ExternalProject for NIH dependencies
Fixes: RIPD-1648

 - use ExternalProject for snappy, lz4, SOCI, and sqlite3
 - use FetchContent for NuDB
 - update SOCI from 79e222e3c2278e6108137a2d26d3689418b37544 to
   3a1f602b3021b925d38828e3ff95f9e7f8887ff7
 - update lz4 from c10863b98e1503af90616ae99725ecd120265dfb to v1.8.2
 - update sqlite3 from 3.21 to 3.24
 - update snappy from b02bfa754ebf27921d8da3bd2517eab445b84ff9 to 1.1.7
 - update NuDB from 00adc6a4f16679a376f40c967f77dfa544c179c1 to 1.0.0
2018-09-28 09:15:06 -07:00
Mike Ellery
8a4951947d Improve ssl and nih in cmake:
- provide better override handling for ssl dir
- include build type in nih cache for single config
  to avoid cmake cache collision
2018-09-28 09:15:06 -07:00
Mike Ellery
ab6163e989 Remove test sensitivity to error text from OpenSSL 2018-09-28 09:15:06 -07:00
Mike Ellery
5741a8356f Refine json object test for NDEBUG case 2018-09-28 09:15:06 -07:00
seelabs
b2f2d89a08 Support boost 1.68 2018-09-28 09:15:06 -07:00
seelabs
c946043280 Suppress clang warning on intentional self assignment 2018-09-28 09:15:06 -07:00
Miguel Portilla
820546c873 Report fetch pack errors with shards 2018-09-28 09:15:06 -07:00
Scott Schurr
b36e9dd1b4 Remove noisy log write from Stoppable.cpp 2018-09-28 09:15:06 -07:00
Scott Schurr
582d1691a9 Improve error descriptions in JSONRPC unit test 2018-09-28 09:15:06 -07:00
Nik Bougalis
3e22a1e9e8 Set version to 1.1.0 2018-09-14 12:53:38 -07:00
wilsonianb
7b0367730c Set version to 1.1.0-rc3 2018-08-21 13:56:28 -05:00
wilsonianb
8c14002c25 Do not use beast base64 encoding without fix:
Boost 1.67 and 1.68 are missing this fix
0439dcfa7a
2018-08-21 10:05:45 -05:00
Nik Bougalis
c0d396fb3c Set version to 1.1.0-rc2 2018-08-15 20:02:19 -07:00
Nik Bougalis
65d517d0df Don't filter proposals by close time at the wire protocol level:
When validators publish a proposal, they include the close time that they
believe the new ledger should have, and the network attempts to reach
consensus on that.

Instead of delaying consensus if no close time has the required majority
the servers can "agree to disagree"; if this happens, they switch to
proposing a close time of 0, and the network avalanches to that value.

If that occurs, determinstic rules record the new ledger's close time as
being one second later than its parent, and set a flag indicating that
no consensus on the close time was reached.

The wire protocol decoder would incorrectly filter such proposals, so
that they would not be seen by the higher level consensus engine.

This commit removes the low-level filtering, and allows higher level
code to filter out stale proposals instead.
2018-08-15 19:59:55 -07:00
Nik Bougalis
38c3a46a33 Deprecate commands that perform remote tx signing (RIPD-1649):
In order to facilitate transaction signing, `rippled` offers the `sign` and
`sign_for` and `submit` commands, which, given a seed, can be used to sign or
sign-and-submit transactions. These commands are accessible from the command
line, as well as over the WebSocket and RPC interfaces that `rippled` can be
configured to provide.

These commands, unfortunately, have significant security implications:

  1. They require divulging an account's seed (commonly known as a "secret
     key") to the server.
  2. When executing these commands against remote servers, the seeds can be
     transported over clear-text links.
  3. When executing these commands over the command line, the account
     seed may be visible using common tools that show running processes
     and may potentially be inadvertently stored by system monitoring
     tools or facilities designed to maintain a history of previously
     typed commands.

While this commit cannot prevent users from issuing these commands to a
server, whether locally or remotely, it restricts the `sign` and `sign_for`
commands, as well as the `submit` command when used to sign-and-submit,
so that they require administrative privileges on the server.

Server operators that want to allow unrestricted signing can do so by
adding the following stanza to their configuration file:

    [signing_support]
    true

Ripple discourages server operators from doing so and advises against using
these commands, which will be removed in a future release. If you rely on
these commands for signing, please migrate to a standalone signing solution
as soon as possible. One option is to use `ripple-lib`; documentation is
available at https://developers.ripple.com/rippleapi-reference.html#sign.

If the commands are administratively enabled, the server includes a warning
on startup and adds a new field in the resulting JSON, informing the caller
that the commands are deprecated and may become unavailable at any time.

Acknowledgements:
Jesper Wallin for reporting this issue to Ripple.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers to responsibly
disclose any issues that they may find. For more on Ripple's Bug Bounty
program, please visit: https://ripple.com/bug-bounty
2018-08-15 19:59:52 -07:00
Scott Schurr
d3258c7f1f deposit_authorized gives error if source not in ledger (#2640) 2018-08-14 08:46:59 -07:00
seelabs
8a02903fa5 Set version to 1.1.0-rc1 2018-08-08 21:07:57 -04:00
Mike Ellery
dbc8f147c9 Improve subproj handling and deprecated target options:
Exclude several libraries from build when we are included in a
super-project (this is the case when someone only wants to use
xrpl_core). Force several target (deprecated) params to be cache
variables since they are now exposed as options.
2018-08-08 21:07:54 -04:00
Mike Ellery
7a547b8cf2 Add missing sources to build 2018-08-08 21:07:54 -04:00
Mike Ellery
2c13ca0109 Define DEBUG preprocessor symbol for debug builds 2018-08-08 21:07:54 -04:00
Miguel Portilla
a7ed5bfbee Improve shards file exception handling 2018-08-08 21:07:54 -04:00
Miguel Portilla
a73372cb9d Add RPC shard download 2018-08-08 21:07:54 -04:00
Miguel Portilla
658f904ce0 Add shard import support to shard database 2018-08-08 21:07:54 -04:00
Miguel Portilla
9212c28ef8 Add HTTPS file downloader client 2018-08-08 21:07:54 -04:00
Miguel Portilla
5336e3715a Add archive and lz4 extracting 2018-08-08 21:07:54 -04:00
Mike Ellery
c12dbc4386 Add libarchive 2018-08-08 21:07:54 -04:00
Scott Schurr
2901577be7 Remove using namespace declarations at namespace scope in headers 2018-08-08 21:07:54 -04:00
seelabs
4aa0bc37c0 Add delimiter when appending to CMAKE_CXX_FLAGS 2018-08-08 21:07:54 -04:00
Mike Ellery
24d2687f2d Remove empty source file 2018-08-08 21:07:54 -04:00
Mike Ellery
ed5a0bdc3c Correct werr flag for jenkins build 2018-08-08 21:07:54 -04:00
Mark Travis
04745b11a8 Expand SQLite potential storage capacity:
Increase page size for SQLite transaction database upon creation
Provide diagnostics for transaction db page usage.
Shut down rippled gracefullly if transaction db is running out of pages.
Add new rippled maintenance command line option to cause new page size
to take effect.
2018-08-08 21:07:54 -04:00
wilsonianb
9b63f4fb53 Remove executable bit from source files 2018-08-07 14:38:27 -04:00
Joe Loser
8ac6799149 Remove unused SNTP_DEBUG define in SNTPClock.cpp 2018-08-07 14:36:19 -04:00
Nik Bougalis
09050a860b Set version to 1.1.0-b5 2018-07-26 16:06:25 -07:00
mDuo13
32ca1dd6ed Update README with XRP Ledger branding 2018-07-26 16:06:16 -07:00
Mike Ellery
37d9544ef7 Refactor/modernize our cmake:
Switch to target-oriented dependencies. Use imported targets for
dependencies (openssl, boost). Localize FindBoost to remove cmake
version dependence for latest boost support. Logically separate
"ripple-libpp" core sources and add install targets.
Add ninja build for msvc. Add two clang sanitizer builds. Misc script
changes to work with latest modernized cmake.
2018-07-20 08:58:04 -07:00
Mike Ellery
63370b4441 Default to ipv4 for unit tests, add ipv6 option 2018-07-20 08:58:04 -07:00
Mike Ellery
49bcdda418 Improve charge handling in NoRippleCheckLimits test (RIPD-1641) 2018-07-20 08:58:04 -07:00
Miguel Portilla
d89ff1b63d Handle websocket construction exceptions:
Certain versions of the Beast HTTP & WebSocket library can
generate exceptions, which unless caught, will result in
unexpected behavior.

Acknowledgements:
Ripple thanks Thomas Snider for originally noticing this
issue and responsibly disclosing it to Ripple.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit:
https://ripple.com/bug-bounty
2018-07-20 08:58:04 -07:00
Miguel Portilla
d289512aeb Improve SSLHTTPPeer asynchronous shutdown 2018-07-20 08:58:04 -07:00
Howard Hinnant
d98c4992dd Supply ConsensusTimer with milliseconds or finer precision 2018-07-20 08:58:04 -07:00
Howard Hinnant
d257d1b2c9 Migrate more code into the chrono type system:
Changes include:

  *  Database::tune and all tune overrides
  *  TaggedCache TargetAge
  *  KeyCache TargetAge
2018-07-20 08:58:04 -07:00
Scott Schurr
574ea2c14d Minor optimization of STObject::add 2018-07-20 08:58:04 -07:00
Joe Loser
70d9d88cda Remove using namespace beast in base_uint.h 2018-07-20 08:58:04 -07:00
Joe Loser
79d819584f Replace boost locks and mutexes with std-equivalent 2018-07-16 17:49:42 -07:00
Joe Loser
e222ff5868 Rename data members of ConsensusParms:
Based on a TODO comment in DisputedTX.h, it seems at one point the
data members of ConsensusParms were macros. Now that they are not,
we should spell them like other data members (without all uppercase).
2018-07-16 17:49:42 -07:00
Joe Loser
f58916a2e4 Remove comment about passing allocator to KeyCache:
After some discussion on https://github.com/ripple/rippled/pull/2595
we have decided that the allocator should not be plumbed through
the KeyCache class template. As such, remove the comment suggesting
to push the allocator through.
2018-07-16 17:49:42 -07:00
wilsonianb
7e30897ef4 Increase validation quorum to 80%
All listed validators are trusted and quorum is 80% of trusted
validators regardless of the number of:
* configured published lists
* listed or trusted validators
* recently seen validators

Exceptions:
* A listed validator whose master key has been revoked is not trusted
* Custom minimum quorum (specified with --quorum in the command line)
  is used if the normal quorum appears unreachable based on the number
  of recently received validators.

RIPD-1640
2018-07-16 17:49:42 -07:00
seelabs
cff1abba5d Add .clang-format rules and update code style 2018-07-16 17:49:42 -07:00
MarkusTeufelberger
aa4e3a98f7 Remove cmake conditional that could never be true
Boost >= 1.67 is required, the check was for boost versions <= 1.66
2018-07-03 02:09:33 +02:00
Nik Bougalis
381a1b948b Set version to 1.1.0-b4 2018-06-25 17:12:08 -07:00
Nik Bougalis
873ba1ba9b Merge master (1.0.1) into develop (1.1.0-b3) 2018-06-25 13:53:15 -07:00
Edward Hennis
16b9bbb517 Retried transactions that tec move from TxQ to open ledger:
* Unit test of tec code handling.
* Extra TxQ debug logging
2018-06-25 13:52:16 -07:00
Ian Roskam
7427cf7506 Beast was accepted into Boost:
Link to Beast repository was outdated.  Updated to the boostorg/beast repository.
2018-06-25 13:52:16 -07:00
Scott Schurr
b14bdb068a Standardize on default_prng() for non-crypto shuffling 2018-06-25 13:52:15 -07:00
Mike Ellery
8098cba4c2 Trim space in Endpoint::from_string
Fixes: RIPD-1643
2018-06-25 13:38:05 -07:00
Mike Ellery
68bebc472a only IPv4 allowed with travis 2018-06-25 13:38:05 -07:00
Joe Loser
243e181c08 Replace uses of dirDelete with ApplyView::dirRemove 2018-06-25 13:38:05 -07:00
Joe Loser
b0a1aef43d Replace deprecated usages of std::random_shuffle
std::random_shuffle is deprecated in C++14 and removed completely
in C++17. The two-iterator version of std::random_shuffle usually
depends on std::rand and also on a global state. The preferred
replacement is to use std::shuffle with a pseudo-random number
generator.
2018-06-25 13:38:05 -07:00
Joe Loser
aab47e09b6 Remove static_assert for Boost version 2018-06-25 13:38:05 -07:00
Joe Loser
fc3a3d8267 Remove BEAST_NO_ZERO_AUTO_RETURN in Zero.h 2018-06-25 13:38:05 -07:00
Joe Loser
73fb3f0bfa Mark some move and move-assignment ctors noexcept 2018-06-25 13:38:05 -07:00
Joe Loser
5f8037c55b Apply clang-tidy modernize-use-equals-default check 2018-06-25 13:38:05 -07:00
Nikolaos D. Bougalis
3aaf6d7857 Use Boost.Endian instead of custom wrappers 2018-06-25 13:38:00 -07:00
Mike Ellery
11ab98cced Set version to 1.1.0-b3 2018-06-19 11:56:08 -07:00
Joe Loser
06d0ff6e52 Remove conditional check for using Boost.Process:
- Since we require a min Boost version of 1.67 as of recently (for
  Beast), we also remove the conditional checks that existed for us
  to know whether Boost.Process is available or not. We can
  always assume it is available now.
- Remove runtime checks for minimum Boost and OpenSSL versions
  since they are checked at CMake configure time.
2018-06-19 11:56:08 -07:00
Mike Ellery
5a830b63e9 RPM dev build fixes:
skip signature checks and allow for all branches (not PRs).
2018-06-19 11:25:20 -07:00
Joe Loser
f658656b82 Mark some single-argument constructors explicit 2018-06-19 11:25:20 -07:00
wilsonianb
31e511afcf Fix duplicate validation and manifest suppression
RIPD-1636
RIPD-1638
RIPD-1632
2018-06-19 11:25:20 -07:00
Joe Loser
f0cc7c4c8d Replace beast::SharedPtr with std::shared_ptr 2018-06-19 11:25:20 -07:00
Scott Schurr
6a74d771ee Reduce occurrences of sporadic PerfLog unit test failures 2018-06-19 11:25:20 -07:00
seelabs
833fae57db Use liquidity from strands that consume too many offers (RIPD-1515):
This changes the rules for payments in two ways:

1) It sets the maximum number of offers any book step can consume from
2000 to 1000.

2) When a strand contains a step that consumes too many offers,
currently the liquidity is not used at all and the strand will
be considered dry. This changes things so the liquidity is used,
however the strand will still be considered dry.
2018-06-19 11:25:20 -07:00
Scott Schurr
5097656c83 Add xrpRoundToZero logging for FlowCross compareSandboxes 2018-06-19 11:25:20 -07:00
Edward Hennis
5b733fb485 Remove Transactor::mFeeDue member variable
* mFeeDue is only used in one place by one derived class, so
  only compute it as a local in that function.
* The baseFee needs to be calculated outside of the Transactor class
  because, it can change during transaction processing, and the function
  is static, so we need to be sure to call the right version
* Rename Transactor::calculateFee to minimumFee
2018-06-19 11:25:20 -07:00
Joe Loser
0b2f33d23a Prefer std::array over C-style array in base_uint 2018-06-19 11:25:16 -07:00
Mike Ellery
08382d866b Support ipv6 for peer and RPC comms:
Fixes: RIPD-1574

Alias beast address classes to the asio equivalents. Adjust users of
address classes accordingly. Fix resolver class so that it can support
ipv6 addresses. Make unit tests use ipv6 localhost network. Extend
endpoint peer message to support string endpoint
representations while also supporting the existing fields (both are
optional/repeated types). Expand test for Livecache and Endpoint.
Workaround some false positive ipaddr tests on windows (asio bug?)
Replaced usage of address::from_string(deprecated) with free function
make_address. Identified a remaining use of v4 address type and
replaced with the more appropriate IPEndpoint type (rpc_ip cmdline
option). Add CLI flag for using ipv4 with unit tests.

Release Notes
-------------

The optional rpc_port command line flag is deprecated. The rpc_ip
parameter now works as documented and accepts ip and port combined.
2018-06-19 09:32:54 -07:00
Nik Bougalis
8429dd67e6 Set version to 1.0.1 2018-06-04 16:37:47 -07:00
Nik Bougalis
0439dcfa7a Fix a corner case when decoding base64:
Under some corner cases, the base64 decoder would not allocate
enough memory, which could result in spurious errors.

Acknowledgements:
Ripple thanks Guido Vranken for originally noticing this issue
and responsibly disclosing it to Ripple.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit:
https://ripple.com/bug-bounty
2018-06-04 16:37:45 -07:00
seelabs
00df097e5f Improve json exception handling 2018-06-04 12:09:48 -04:00
seelabs
fd4636b056 Set version to 1.1.0-b2 2018-06-01 13:29:57 -04:00
Scott Schurr
34d3f93868 Don't read Amount field if it is not present (RIPD-1623) 2018-06-01 13:29:52 -04:00
Joe Loser
57ab0a00b5 Rename member function in NetworkOPs.h 2018-06-01 13:29:52 -04:00
Joe Loser
f0cec3b2f1 Rename LoadEvent member function reName to setName 2018-06-01 13:29:52 -04:00
Mike Ellery
1c2b8417b9 Correct copy in io_latency_probe:
Fixes: https://github.com/ripple/rippled/issues/2521

Copy ctor missed one member. Also added move since we have some rvalues
passed around here.
2018-06-01 13:29:52 -04:00
Mike Ellery
ca29c2b906 Improve unity/nounity description in linux doc 2018-06-01 13:29:52 -04:00
Joe Loser
7c785d0d7c Add missing override keyword:
* Enable the `suggest-override` warning for gcc
* Fix all functions that were flagged by that warning
2018-06-01 13:29:52 -04:00
seelabs
0ae157a5c3 Enable c++-11 for soci 2018-06-01 13:02:52 -04:00
Joe Loser
a6f59081cc Remove deprecated protocol/types.h header 2018-06-01 13:01:45 -04:00
Mike Ellery
201f1aaa39 Prompt for manual approval on non-collaborator PRs 2018-06-01 13:01:10 -04:00
Mike Ellery
ae73878c59 Build an unsigned rpm in dev pipeline 2018-06-01 13:01:10 -04:00
Mike Ellery
cfdc64d7cf Enable manual tests in CI:
Fixes: RIPD-1575. Fix argument passing to runner. Allow multiple unit
test selectors to be passed via --unittest argument. Add optional
integer priority value to test suite list. Fix several failing manual
tests. Update CLI usage message to make it clearer.
2018-06-01 12:57:12 -04:00
seelabs
95eb5e1862 Fix manual offer test 2018-06-01 12:57:12 -04:00
Joe Loser
dc0d5996e2 Convert macros in STTX.h into an enum 2018-06-01 12:56:09 -04:00
seelabs
817d2339b8 Set version to 1.1.0-b1 2018-05-15 16:58:33 -04:00
Scott Schurr
008ff67ac2 Add DepositPreauth ledger type and transaction (RIPD-1624):
The lsfDepositAuth flag limits the AccountIDs that can deposit into
the account that has the flag set.  The original design only
allowed deposits to complete if the account with the flag set also
signed the transaction that caused the deposit.

The DepositPreauth ledger type allows an account with the
lsfDepositAuth flag set to preauthorize additional accounts.
This preauthorization allows them to sign deposits as well.  An
account can add DepositPreauth objects to the ledger (and remove
them as well) using the DepositPreauth transaction.
2018-05-15 16:58:31 -04:00
seelabs
b444196bf9 Remove pre-boost beast 2018-05-15 16:58:30 -04:00
seelabs
27703859e7 Convert code to use boost::beast 2018-05-15 16:58:30 -04:00
Nikolaos D. Bougalis
2ac1c2b433 Improve invariant checking:
Add a new invariant checker that verifies that we never charge a
fee higher than specified in the transaction; we will charge less
in some corner cases where the transacting account cannot afford
the fee.

Detect more anomalous conditions, and improve the logged error
messages.

Clarify the code flow associated with invoking the invariant checker
from `Transactor`, add extra comments and improve naming to make the
code self-documenting.
2018-05-15 11:28:50 -04:00
Scott Schurr
118c25c0f0 Compile time check preflight returns no tec (RIPD-1624):
The six different ranges of TER codes are broken up into six
different enumerations.  A template class allows subsets of
these enumerations to be aggregated.  This technique allows
verification at compile time that no TEC codes are returned
before the signature is checked.

Conversion between TER instance and integer is provided by
named functions.  This makes accidental conversion almost
impossible and makes type abuse easier to spot in the code
base.
2018-05-15 11:28:50 -04:00
Howard Hinnant
7d163a45dc Replace UptimeTimer with UptimeClock
* UptimeClock is a chrono-compatible seconds-precision clock.

* Like UptimeTimer, its purpose is to make it possible for clients
  to query the uptime thousands of times per second without a
  significant performance hit.

* UptimeClock decouples itself from LoadManager by managing its
  own once-per-second update loop.

* Clients now traffic in chrono time_points and durations instead
  of int.
2018-05-15 09:56:47 -04:00
Joe Loser
717f874767 Add missing virtual destructors:
Some classes had virtual methods, but were missing a virtual
destructor.

Technically, every unit test that inherits from the Beast test suite
would get flagged by `-Wnon-virtual-dtor` but I did not think it would
be a great idea to go sprinkle a virtual destructor for every Ripple
test suite.
2018-05-15 09:55:28 -04:00
Brad Chase
681df58b61 Refactor ledger replay logic (RIPD-1547):
Also switch to use ReadView for TxQ updates.
2018-05-15 09:54:00 -04:00
Nikolaos D. Bougalis
f31ca2860f Set version to 1.0.0 2018-05-11 10:29:41 -07:00
Nikolaos D. Bougalis
d702e736ca Set version to 1.0.0-rc1 2018-05-07 11:37:16 -07:00
Brad Chase
6156ff3eb7 Remove validation cookie support code 2018-05-07 11:36:27 -07:00
Joe Loser
04f1388860 Remove extra semicolons:
Several functions had an extra semicolon. This removes them.
2018-05-07 11:36:27 -07:00
Joe Loser
c1c332f0b0 Remove redundant type qualifier:
The extra `const` type qualifier on the return type has no effect.
Clang emits `-Wignored-qualifiers` warning with `-Wextra`.
2018-05-07 11:36:27 -07:00
seelabs
93780c25f7 Resolve gcc8 warnings 2018-05-07 11:31:23 -07:00
Nikolaos D. Bougalis
a442d3fdb3 Set version to 1.0.0-b5 2018-04-29 02:04:37 -07:00
Scott Schurr
7bc163ee4c Add delivered_amount to tx result for CheckCash (RIPD-1623) 2018-04-28 13:46:04 -07:00
Scott Schurr
6bd0b850a0 Fixes for PerfLog unit test in a Docker container 2018-04-28 13:45:25 -07:00
Nikolaos D. Bougalis
1eece9b1fd Set version to 1.0.0-b4 2018-04-09 09:52:30 -07:00
Miguel Portilla
859d18adb0 Add command import node store to shards 2018-04-09 09:52:13 -07:00
Scott Schurr
c4a9b73a66 Add check, escrow, and pay_chan to ledger_entry (RIPD-1600) 2018-04-08 02:34:37 -07:00
Mark Travis
8eb8c77886 Performance logging and counters:
* Tally and duration counters for Job Queue tasks and RPC calls
    optionally rendered by server_info and server_state, and
    optionally printed to a distinct log file.
    - Tally each Job Queue task as it is queued, starts, and
      finishes running. Track total duration queued and running.
    - Tally each RPC call as it starts and either finishes
      successfully or throws an exception. Track total running
      duration for each.
  * Track currently executing Job Queue tasks and RPC methods
    along with durations.
  * Json-formatted performance log file written by a dedicated
    thread, for above-described data.
  * New optional parameter, "counters", for server_info and
    server_state. If set, render Job Queue and RPC call counters
    as well as currently executing tasks.
  * New configuration section, "[perf]", to optionally control
    performance logging to a file.
  * Support optional sub-second periods when rendering human-readable
    time points.
2018-04-08 02:24:38 -07:00
Markus Teufelberger
ef3bc92b82 Rename xxhash.c to xxhash.cpp 2018-04-08 01:52:12 -07:00
Brad Chase
f7a4a94c3b Add cookie to validation (RIPD-1586):
Each validator will generate a random cookie on startup that it will
include in each of its validations. This will allow validators to detect
when more than one validator is accidentally operating with the same
validation keys.
2018-04-08 01:52:12 -07:00
Brad Chase
3dc0714273 Add testnet to example configs (RIPD-1622) 2018-04-08 01:52:12 -07:00
Mike Ellery
deb9e4ce3c Remove BeastConfig.h (RIPD-1167) 2018-04-08 01:52:12 -07:00
Mike Ellery
4bc300e251 Quiet protobuf warning in XCode build 2018-04-08 01:52:11 -07:00
Mike Ellery
d65e208a99 Eliminate objective-c sources 2018-04-08 01:52:11 -07:00
Howard Hinnant
f8fb1f6c7d Remove unneeded macOS-specific code 2018-04-08 01:52:11 -07:00
Howard Hinnant
db3b4dd396 Prevent accidental aggregates
*  The compiler can provide many non-explicit constructors for
   aggregate types.  This is sometimes desired, but it can
   happen accidentally, resulting in run-time errors.

*  This commit assures that no types are aggregates unless existing
   code is using aggregate initialization.
2018-04-08 01:52:11 -07:00
Nikolaos D. Bougalis
b7335fdff5 Remove unused headers for LevelDB and HyperlevelDB 2018-04-08 01:52:11 -07:00
Nikolaos D. Bougalis
d45556ec82 Improve checking of transaction flags (RIPD-1543) 2018-04-08 01:52:10 -07:00
Nikolaos D. Bougalis
cebb9c6604 Remove unused capture in lambdas 2018-04-08 01:52:08 -07:00
Nikolaos D. Bougalis
b7692b7bc1 Remove nodestore dependency on Snappy 2018-04-08 01:52:07 -07:00
Nikolaos D. Bougalis
327377cb2d Use xxhash and remove unused hash functions:
We had several hash functions implemented, including SipHash,
SpookyHash and FNV1a.

Default to using xxhash and remove the code for the remaining
hash functions.
2018-04-08 01:52:06 -07:00
Nikolaos D. Bougalis
75c4dbb0a1 Set version to 1.0.0-b3 2018-03-24 12:54:09 -07:00
Brad Chase
f0b9506617 Remove scons support 2018-03-24 12:53:53 -07:00
Howard Hinnant
b4e1b3c1b1 Remove undefined behavior from <ctype.h> calls:
For the functions defined in <ctype.h> the C standard requires
that the value of the int argument be in the range of an
unsigned char, or be EOF.  Violation of this requirement
results in undefined behavior.
2018-03-24 12:53:44 -07:00
seelabs
02c487348a Remove warning about plantuml:
Plantuml is only relevant when building docs. On most systems it is OK if it is
not installed.
2018-03-24 12:53:37 -07:00
David Schwartz
5db5e31140 Allow relayed ledger requests to check the shard store 2018-03-24 12:53:29 -07:00
Miguel Portilla
4869a0d00e Verify SQLite ledgers exist in node store 2018-03-24 12:53:21 -07:00
Miguel Portilla
d9be0de269 Add shard configuration example 2018-03-24 12:53:11 -07:00
Miguel Portilla
0b18b36186 Make earliest ledger sequence configurable 2018-03-24 12:53:01 -07:00
Nikolaos D. Bougalis
8d9dffcf84 Clarify Escrow semantics (RIPD-1571):
When creating an escrow, if the `CancelAfter` time is specified but
the `FinishAfter` is not, the resulting escrow can be immediately
completed using `EscrowFinish`. While this behavior is documented,
it is unintuitive and can be confusing for users.

This commit introduces a new fix amendment (fix1571) which prevents
the creation of new Escrow entries that can be finished immediately
and without any requirements.

Once the amendment is activated, creating a new Escrow will require
specifying the `FinishAfter` time explicitly or requires that a
cryptocondition be specified.
2018-03-24 12:52:40 -07:00
Nikolaos D. Bougalis
2b8893dfca Merge master (0.90.1) into develop (1.0.0-b2):
The merge also updates the RELEASENOTES.md with the release
notes for the 0.90.1 which were accidentally not included
in that release.
2018-03-24 12:51:23 -07:00
Howard Hinnant
881cd4cfad Limit STVar recursion during deserialization (RIPD-1603):
Constructing deeply nested objects could allow an attacker to
cause a server to overflow its available stack.

We now enforce a 10-deep nesting limit, and signal an error
if we encounter objects that are nested deeper.

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing this
issues.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled codebase and urge reviewers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit
https://ripple.com/bug-bounty
2018-03-23 14:18:36 -07:00
Nikolaos D. Bougalis
067dbf299c Set version to 0.90.1 2018-03-21 20:39:20 -07:00
Miguel Portilla
8e9495f487 Use lock when creating peer shard rangeset 2018-03-21 20:39:19 -07:00
Howard Hinnant
40dc6b1458 Limit STVar recursion during deserialization (RIPD-1603):
Constructing deeply nested objects could allow an attacker to
cause a server to overflow its available stack.

We now enforce a 10-deep nesting limit, and signal an error
if we encounter objects that are nested deeper.

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing this
issues.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled codebase and urge reviewers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit
https://ripple.com/bug-bounty
2018-03-21 20:39:18 -07:00
Nikolaos D. Bougalis
d5f981f5fc Address issues identified by external review:
* RIPD-1617, RIPD-1619, RIPD-1621:
  Verify serialized public keys more strictly before
  using them.

* RIPD-1618:
    * Simplify the base58 decoder logic.
    * Reduce the complexity of the base58 encoder and
      eliminate a potential out-of-bounds memory access.
    * Improve type safety by using an `enum class` to
      enforce strict type checking for token types.

* RIPD-1616:
  Avoid calling `memcpy` with a null pointer even if the
  size is specified as zero, since it results in undefined
  behavior.

Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing these
issues.

Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit:
https://ripple.com/bug-bounty
2018-03-21 20:39:18 -07:00
Nikolaos D. Bougalis
25de6b0a5f Remove STValidation::getFlags:
The function is non-virtual and hides the virtual function specified in
the base class.

Falling back to the virtual function in the base class is the correct
solution.
2018-03-15 21:17:49 -07:00
seelabs
9af994ceb4 Set version to 1.0.0-b2 2018-03-15 14:38:09 -04:00
seelabs
5549ff4c8a Fix boost::error_code conversions to int:
* Boost 1.67 removes boost::error_code automatic conversions to int
2018-03-15 14:38:06 -04:00
Mike Ellery
3730d46dad Fix intermittent failure in Subscribe_test:
Fixes: RIPD-1601

Fix intermittent failure in server stream sub/unsub test.
Root cause is LoadManager thread *sometimes* running and causing a
fee change event which got published before our test could
unsubscribe. Fixed by explicitly stopping the LoadManager for this test.
2018-03-15 14:38:06 -04:00
Brad Chase
1507ed66a8 Check consensus hash consistency (RIPD-1456):
These changes use the hash of the consensus transaction set when
characterizing the mismatch between a locally built ledger and fully
validated network ledger. This allows detection of non-determinism in
transaction process, in which consensus succeeded, but a node somehow
generated a different subsequent ledger.
2018-03-15 14:38:06 -04:00
seelabs
3a5a6c3637 Remove unused variables 2018-03-15 14:21:18 -04:00
seelabs
4b2afc8f42 Detect when a unit test child process crashes (RIPD-1592):
When a test suite starts and ends, it informs the parent process. If the parent
has received a start message without a matching end message it reports that a
child may have crashed in that suite.
2018-03-15 14:20:25 -04:00
Mike Ellery
deef322b07 Remove outputDebugString, replace getComputerName 2018-03-15 14:19:29 -04:00
Miguel Portilla
9456b83576 Change permessage-deflate and compress defaults (RIPD-506) 2018-03-15 14:18:32 -04:00
Mike Ellery
864844086e Set version to 1.0.0-b1 2018-03-02 07:37:16 -08:00
Mike Ellery
755849115e Add dev docs generation to Jenkins:
Fixes: RIPD-1521

Switch to pure doxygen HTML for developer docs. Remove docca/boostbook
system. Convert consensus document to markdown. Add existing markdown
files to doxygen input set. Fix some image paths and scale images for
use with MD links. Rename/cleanup some files for consistency.
Add pipeline logic for windows slaves. Add ninja and parallel test run
option. Add make doc target build in build-and-test.sh. Cleanup README
files. Add nounity windows build. Add link to jenkins summary table.
Add rippled_classic build (win). Improve formatting of summary table.
2018-03-02 07:37:15 -08:00
Mike Ellery
605ace7645 Unroll some unity files in the nounity build:
FIXES: RIPD-1597

Add includes, remove unused getStackBacktrace() implementation.
2018-03-02 07:37:10 -08:00
Howard Hinnant
1a245234f1 Cleanup some Json::Value methods:
* Rename isArray to isArrayOrNull
* Rename isObject to isObjectOrNull
* Introduce isArray and isObject
* Change as many uses of isArrayorNull to isArray as possible
* Change as many uses of isObjectorNull to isObject as possible
* Reject null JSON arrays for subscribe and unsubscribe
2018-03-01 15:59:40 -08:00
Brad Chase
20defb4844 Update validations on UNL change (RIPD-1566):
Change the trust status of existing validations based when nodes are
added or removed from the UNL.
2018-03-01 13:27:28 -08:00
Markus Teufelberger
8b909d5c17 Include 2 missing headers:
<cerrno> for ETIMEDOUT
<sys/time.h> for gettimeofday()
2018-03-01 13:25:32 -08:00
Edward Hennis
4a3a40174e Strip down Travis CI support toward future deprecation:
* Remove all builds except cmake gcc & clang debug.
* Time some dependency and build operations, using a custom format to avoid
  interfering with other timers.
* Use Travis's "trusty" infrastructure.
* Install more dependencies via apt.
* Update boost version to 1.65.1.
* Do not run unit tests under gdb - several security features prevent
  it from running correctly.
* Run test job with two processes.
2018-03-01 13:23:49 -08:00
Miguel Portilla
2fee75bfc1 Use lock when creating peer shard rangeset 2018-02-26 12:24:56 -05:00
Nikolaos D. Bougalis
6230204e42 Set version to 0.90.0 2018-02-20 14:18:31 -08:00
Brad Chase
5807ce2127 Set version to 0.90.0-rc3 2018-02-16 12:13:21 -05:00
Scott Schurr
da43775d1b Unit test that NoRipple and DepositAuth are orthogonal 2018-02-16 12:12:44 -05:00
Edward Hennis
099a050c0b Support --unittest-jobs in Test.py scons builds:
* Replace Ubuntu scons dependency with cmake
* Remove dependency installation support for Ubuntu 12.04 Precise Pangolin.
  It is EOL'd as of 2017-04-28. http://releases.ubuntu.com/12.04/
2018-02-16 12:12:44 -05:00
Elliot Lee
6fb2482886 Document AccountLines "out" fields 2018-02-16 12:12:37 -05:00
Scott Schurr
b07da94c31 Remove two inaccurate asserts:
The assert in LedgerHistory.cpp was incorrect since
getLedgerByHash() can return a null object.  The assert has
been seen to fire inappropriately during online_delete.

The assert in LedgerMaster.cpp was simply misguided.  If a
null hash were returned by getLedgerHashForHistory(), then we
should not forward that hash to peers.  The assert only fires
in a debug build, so a release build would forward the request
for a null hash to peers.
2018-02-16 12:06:03 -05:00
MarkusTeufelberger
531e153144 Add missing includes 2018-02-16 12:03:06 -05:00
Brad Chase
079f346efd Improve handling of malformed JSON-RPC requests 2018-02-16 12:00:32 -05:00
seelabs
6d3b2b404d Set version to 0.90.0-rc2 2018-02-13 09:08:17 -05:00
seelabs
9685e756e6 Fix boost compilation issues 2018-02-13 09:08:14 -05:00
seelabs
8e365ea44a Revert "Remove pre-boost beast"
This reverts commit ba43bfc646.
2018-02-12 11:55:59 -05:00
seelabs
9a210cfda5 Revert "Convert code to use boost::beast"
This reverts commit cc9c976b76.
2018-02-12 11:55:59 -05:00
seelabs
060692aad4 Set version to 0.90.0-rc1 2018-02-07 10:55:55 -05:00
Brad Chase
3e9e0c4b53 Set version to 0.90.0-b6 2018-02-03 07:07:11 -05:00
Scott Schurr
88570df135 Allow account_objects RPC to filter by "check" (RIPD-1589):
Fixes #2350 issue on GitHub.
2018-02-03 07:06:56 -05:00
Scott Schurr
c6a307fcd7 Unit test pre-expired offer that also cancels an offer 2018-02-02 20:52:33 -05:00
Brad Chase
fd00e6e035 Use boost 1.66 in macos build instructions 2018-02-02 20:46:37 -05:00
Brad Chase
94c6a2a850 Use LedgerTrie for preferred ledger (RIPD-1551):
These changes augment the Validations class with a LedgerTrie to better
track the history of support for validated ledgers. This improves the
selection of the preferred working ledger for consensus. The Validations
class now tracks both full and partial validations. Partial validations
are only used to determine the working ledger; full validations are
required for any quorum related function. Validators are also now
explicitly restricted to sending validations with increasing ledger
sequence number.
2018-02-02 20:38:38 -05:00
seelabs
1c44c4a43e Set version to 0.90.0-b5 2018-01-29 20:28:33 -05:00
Nikolaos D. Bougalis
7e936187ac Remove deprecated wallet_seed RPC endpoint 2018-01-29 20:28:28 -05:00
Nikolaos D. Bougalis
6328fabd5c Improve log scrubbing:
Per issue #2354, when the log level of a server was configured at
"trace", sensitive keying meterial generated by the `wallet_propose`
command could be written to the server's log file, if one was
configured.

This commit improves the log scrubbing code to account for the
sensitive information generated by a `wallet_propose`.

** Important security consideration **

We still caution everyone *against* executing this command on a
server that they do not control: a malicious server operator could
intercept the generated keypair, or operate a modified server that
returns keypairs that are not securely generated.
2018-01-29 20:28:28 -05:00
Brad Chase
125316f2a6 Update Visual Studio build instructions 2018-01-29 17:59:03 -05:00
Scott Schurr
ed750a84dd Reduce noise in log 2018-01-29 11:56:01 -05:00
Scott Schurr
e0ee58c92d Remove unused beast::currentTimeMillis() 2018-01-29 11:56:01 -05:00
Scott Schurr
6286a9708e Avoid stack overflow on AppVeyor:
o Reduce json_reader max recursion, and
o Use a GCE VM for AppVeyor
2018-01-29 11:56:01 -05:00
Mike Ellery
5e4cb78208 Update macos build instructions:
Added workaround for include path order anomaly with Xcode (discovered
while testing the xcode build instructions)
2018-01-29 11:56:01 -05:00
Howard Hinnant
a8481e369d Better error messages for out of range integral values
* This change passes detailed error messages from the JSON parser
  on the server side, back to the client for inclusion into the
  reply's error message.

* Errors originating from the server's inability to parse are
  reclassified from rpcINTERNAL to rpcINVALID_PARAMS.
2018-01-29 11:56:01 -05:00
Scott Schurr
35cc341544 Unit test that sign_for returns a correct hash (RIPD-1583) 2018-01-29 11:56:01 -05:00
Mike Ellery
f6013c1c37 Sconstruct fix for clang sanitizer build 2018-01-29 11:56:01 -05:00
Mike Ellery
992a390d75 Fix cmake clang build for sanitizers 2018-01-29 11:56:01 -05:00
seelabs
ba43bfc646 Remove pre-boost beast 2018-01-29 11:56:00 -05:00
seelabs
cc9c976b76 Convert code to use boost::beast 2018-01-29 11:56:00 -05:00
Scott Schurr
eaff9a0e6a Set version to 0.90.0-b4 2018-01-17 17:19:23 -08:00
Mike Ellery
2a4eac6eb8 Force boost static linking for macos builds 2018-01-17 16:02:27 -08:00
Howard Hinnant
0ec66b3dbc Limit nesting of json commands 2018-01-17 15:33:15 -08:00
Miguel Portilla
718d217158 Implement Shards 2018-01-17 13:43:54 -08:00
Miguel Portilla
aeda2430cd Normalize SHAMap visit functions 2018-01-17 11:41:43 -08:00
Brad Chase
819ea46bf0 Add RangeSet serialization 2018-01-17 11:21:53 -08:00
Scott Schurr
2d5ddbf1bf Checks (RIPD-1487):
Introduce a new ledger type: ltCHECK
Introduce three new transactions that operate on checks:

- "CheckCreate" which adds the check entry to the ledger.  The
  check is a promise from the source of the check that the
  destination of the check may cash the check and receive up to
  the SendMax specified on the check.  The check may have an
  expiration, after which the check may no longer be cashed.

- "CheckCash" is a request by the destination of the check to
  transfer a requested amount of funds, up to the check's SendMax,
  from the source to the destination.  The destination may receive
  less than the SendMax due to transfer fees.

  When cashing a check, the destination specifies the smallest
  amount of funds that will be acceptable.  If the transfer
  completes and delivers the requested amount, then the check is
  considered cashed and removed from the ledger.  If enough funds
  cannot be delivered, then the transaction fails and the check
  remains in the ledger.

  Attempting to cash the check after its expiration will fail.

- "CheckCancel" removes the check from the ledger without
  transferring funds.  Either the check's source or destination
  can cancel the check at any time.  After a check has expired,
  any account can cancel the check.

Facilities related to checks are on the "Checks" amendment.
2018-01-17 10:00:20 -08:00
Mark Travis
76ad06ef47 Control transaction dispatch rate:
Do not process a transaction received from a peer if it has
been processed within the past ten seconds.

Increase the number of transaction handlers that can be in
flight in the job queue and decrease the relative cost for
peers to share transaction and ledger data.

Additionally, make better use of resources by adjusting the
number of threads we initialize, by reverting commit
68b8ffdb63.

Performance counter modifications:
  * Create and display counters to track:
    1) Pending transaction limit overruns.
    2) Total peer disconnections.
    3) Peers disconnections due to resource consumption.

Avoid a potential double-free in Json library.
2018-01-17 09:23:29 -08:00
Nikolaos D. Bougalis
49b5c42e85 Set version to 0.90.0-b3 2018-01-12 13:42:28 -08:00
Mike Ellery
d9337ad43a Make gold linker less aggressive at discarding boost libs 2018-01-12 13:42:23 -08:00
MarkusTeufelberger
0c22e0262d Link Boost statically only when requested
Fixes #2261
2018-01-10 00:12:23 -08:00
MarkusTeufelberger
593a53253c Poll if process is still alive in Test.py
In some cases this script did not detect properly that the subprocess is already terminated. The "append" loop afterwards caused memory to fill up and the script to fail eventually.
2018-01-10 00:12:23 -08:00
Mike Ellery
0c4f0fdd01 Fix jenkins pipeline for branches 2018-01-10 00:12:23 -08:00
Miguel Portilla
ecd1528197 Update Appveyor dependencies package:
* Use the Visual Studio 2017 image
* Update to rippled_deps17.01
2018-01-10 00:12:23 -08:00
Scott Schurr
cc0ce7163a PayChan and Escrow should ignore DisallowXRP (RIPD-1462) 2018-01-10 00:12:23 -08:00
Scott Schurr
259394029a Support for lsfDepositAuth (RIPD-1487):
The DepositAuth feature allows an account to require that
it signs for any funds that are deposited to the account.
For the time being this limits the account to accepting
only XRP, although there are plans to allow IOU payments
in the future.

The lsfDepositAuth protections are not extended to offers.
If an account creates an offer it is in effect saying, “I
will accept funds from anyone who takes this offer.”
Therefore, the typical user of the lsfDepositAuth flag
will choose never to create any offers.  But they can if
they so choose.

The DepositAuth feature leaves a small gap in its
protections.  An XRP payment is allowed to a destination
account with the lsfDepositAuth flag set if:

- The Destination XRP balance is less than or equal to
  the base reserve and

- The value of the XRP Payment is less than or equal to
  the base reserve.

This exception is intended to make it impossible for an
account to wedge itself by spending all of its XRP on fees
and leave itself unable to pay the fee to get more XRP.

This commit

- adds featureDepositAuth,

- adds the lsfDepositAuth flag,

- adds support for lsfDepositAuth in SetAccount.cpp

- adds support in Payment.cpp for rejecting payments that
  don't meet the lsfDepositAuth requirements,

- adds unit tests for Payment transactions to an an account
  with lsfDepositAuth set.

- adds Escrow and PayChan support for lsfDepositAuth along
  with as unit tests.
2018-01-10 00:12:23 -08:00
seelabs
a307d2d03f Allow channel_verify to specify public key in hex (RIPD-1467) 2018-01-10 00:12:23 -08:00
seelabs
ad4ba44394 Add validated field to account_channels command (RIPD-1466) 2018-01-10 00:12:23 -08:00
seelabs
6b56426719 Unit test logging fixes (RIPD-1568):
* Check message queue before shutting down unit tests
* Logging should be on if not quiet
2018-01-10 00:12:23 -08:00
Brad Chase
44e5e8bccf Make Journal assignable 2018-01-10 00:12:23 -08:00
Brad Chase
edf58820cf Cleanly report invalid [server] settings (RIPD-1562) 2018-01-10 00:12:23 -08:00
Elliot Lee
20cdb4dca0 Update rippled-example.cfg:
The quorum is now calculated automatically and does not need to be
manually specified.
2018-01-10 00:12:22 -08:00
Howard Hinnant
d8bbcf21be Add test for size_varint 2018-01-10 00:12:22 -08:00
Howard Hinnant
7ff6d34a49 Force json commands to be objects
* Null json values can be objects or arrays.
* json arrays are now interpreted as batch commands.
* json objects are single commands.
* null jsons are ambiguous as to whether they are single or batch
  commands and should be avoided.
2018-01-09 16:29:39 -08:00
Nikolaos D. Bougalis
e3499b5df8 Merge master (0.81.0) into develop (0.90.0-b2) 2018-01-09 15:13:08 -08:00
Nikolaos D. Bougalis
4e8c8deeaa Set version to 0.81.0 2018-01-04 05:19:57 -08:00
Nikolaos D. Bougalis
92c987a6b4 Transition to dynamic validator lists:
In connection with Ripple's decentralization strategy, the example
validators.txt file is being updated, and the [validators] field,
which contained a static list of trusted validators, is being
replaced with two new fields:

- The [validator_list_keys] field which contains the keys that can be
  used to sign its recommended validator list.
- The [validator_list_sites] field which specifies the URLs where
  dynamic validator list can be found.

The initial configuration links to Ripple's default validator list,
which is located at https://vl.ripple.com.

To read more about Ripple's decentralization strategy, please visit
the Ripple Dev Blog:

https://ripple.com/dev-blog/decentralization-strategy-update/
2018-01-04 05:19:56 -08:00
Mark Travis
5e4dac41a7 Optimize SQL queries used in handling account_tx:
Profiling and research indicates that the SQLite query planner executed
our existing SQL queries sub-optimally by not using the index efficiently.

Restructuring the SQL query works around this issue and allows queries
to be executed efficiently and without unnecessary delay.
2018-01-04 04:41:00 -08:00
Brad Chase
dc9e9f498a Set version to 0.90.0-b2 2017-12-18 14:38:12 -05:00
Brad Chase
0d3ed84864 Update LZ4 support 2017-12-18 14:38:06 -05:00
Brad Chase
468b1e22f5 Update lz4 to 1.8.0 2017-12-18 14:38:00 -05:00
Brad Chase
c89bb5f4b1 Squashed 'src/lz4/' changes from baf78e7e4..c10863b98
c10863b98 fix : asan error in dctx, due to increased maximum frame header size, reported by Craig Young
1e92bb0af Merge pull request #382 from lz4/installVars
edb434365 updated lz4frame manual
a1f3a27e9 Merge branch 'dev' into installVars and fixed conflicts
af9d72b7f Merge pull request #383 from lz4/blockChecksum
8593ba883 Merge pull request #380 from lz4/dictID
01cdbfb5f lz4c legacy commands are now enabled at runtime based on link/binary name "lz4c"
731cff120 fix minor markdown display issues
aea7d521a better respect GNU standard Makefile conventions
930a69211 cli : restored command -BX to enable block checksum (#322)
77f99d292 restored block checksum capability at lz4frame API level
228e26ee6 Merge pull request #378 from deymo/dev
757497ae3 implemented lz4frame decompression API
4531637ec support dictionary compression with independent blocks
8d597d62d fixed gcc prototype warning
d8aafe2c5 dictionary compression correctly uses compression level
ca2fb166a fixed C++ conversion warnings
bf8daa2fd fixed uninitialization error in lz4frame
31f2cdf4d implemented dictionary compression in lz4frame
1d1737aaf fixed frameCompress example
a82dadfba added dictID inside LZ4F_frameInfo_t
e98a52857 updated Frame specification
76ef6d0ab Allow to predefine FORCE_INLINE macro.
9a967030d Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
c5a015bc3 Merge pull request #376 from ido/patch-1
4891f909e Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
dba4d70a1 updated man page
8aeaf6bb3 Fix typos preventing installation of static lib.
ac5ed8e4b Merge pull request #374 from ferdnyc/patch-2
63d500568 Generate updated man page from Markdown source
ef0655510 Merge pull request #373 from ferdnyc/patch-2
872f767fe Fix formatting of concatenation example
6ad3a983d fix #369
2ef4afeeb Merge pull request #371 from jku/tests-LIBDIR
e14b4c5a3 tests/Makefile: don't use LIBDIR as variable
1525fd1f5 Merge pull request #367 from Chocobo1/fallthrough
7982a905e Merge pull request #368 from Chocobo1/readme
9d453a188 Update README.md
a4ec7fa7b Fix gcc7 Wimplicit-fallthrough warnings
89b9f026c made level 10 a bit faster
a6fd0f9d0 -g compilation flag not by default for lz4 cli
bfc180660 clarified lz4frame api comment (#350)
d18084c65 report where decompression ends (#313)
139a387d1 updated NEWS
0beaa356f fixed minor scan-build warning
775e63ee0 refactored simple_buffer.c example (#363)
7e15e240a added a paragraph on overlap matches
03d8586fc cli accept block sizes with KB / MB prefixes
8c355d17f Merge pull request #360 from Chocobo1/md
1c9d4091d [Doc] Fix markdown
6614be7cc Merge pull request #359 from PierreNav/dev
4e359f5c3 Add DLL files to the INSTALL target
5c97cdfa0 Merge pull request #352 from lz4/resetDCtx
2600a154b fix (minor) g++ compatibility for frametest
e60cbb5ca added test for LZ4F_resetDecompressionContext()
2012e4de9 fixed c_standards tests
a90212761 bumped version number to 1.8.0
b8575f2d2 updated Makefile
fe932c452 expose LZ4F_resetDecompressionContext()
1efa48831 minor readability changes
a8dd86d93 changed macro HEAPMODE into LZ4_HEAPMODE
11bfedb6c Merge pull request #349 from svpv/master
6cf1f7d75 lz4hc.c: clamp compression levels > 12
a41df535f lz4cli.c: fix a comment: LZ4HC_DEFAULT_CLEVEL -> LZ4HC_CLEVEL_MAX
f3460fc14 liz4hc.h: fix a comment: LZ4HC_MAX_CLEVEL -> LZ4HC_CLEVEL_MAX
37ef330cd Merge pull request #348 from terrelln/deprecate
0b3e80704 [LZ4F] Allow users to disable LZ4F_DEPRECATE
31e9ed612 Merge pull request #347 from lz4/negativeCLevels
e2c9b1912 lz4frame : Added negative compression levels
7eecd32c0 ensure lz4f_cctx internal buffer size remain valid in case of malloc error
e169edac0 lz4frame : control lz4 context creation success
e2827775e make __packed memory access default for gcc
3d4ee35da Merge pull request #344 from lz4/LZ4F_getFrameInfo
6226d52ea fixed minor Visual warning
b88df6b1b Improved comments on LZ4F_getFrameInfo()
fc31257ab added LZ4F_resetDecompressionContext()
f0a7651fc Safer LZ4_getFrameInfo()
ab547a0ef Merge pull request #342 from iburinoc/isatty
9b1f00056 Fix inline compile errors
afde27acf Fix IS_CONSOLE returning 1 for NUL on windows
84246b974 Merge pull request #341 from iburinoc/exematch
4567d0def Merge pull request #340 from lz4/optlz4opt
e9c3b14f2 Ignore extensions in exe name matching
38362c1d6 Merge pull request #338 from ldv-alt/dev
60b6d2907 improved level 10 speed for degenerated cases
8f8fc52fc Merge branch 'dev' into optlz4opt
0863931a1 fixed API comment for LZ4F_createCompressionContext()
dab3590fc Export deprecated symbols declared in lz4hc.h
13f5cb2d5 Merge pull request #337 from ldv-alt/dev
b1daffc4e cli: add GNU separator -- specifying that all following arguments are files
68044acfe Merge branch 'optlz4opt' of github.com:Cyan4973/lz4 into optlz4opt
b8bc70022 minor refactor
cea8f60df slight btopt speed improvement
f513020a6 slight btopt speed improvement
8bd32a17b made SET_PRICE macro more usable
118b47f3d improved lz4opt speed (~4%)
eff6166eb minor price function optimization
0d073d4d2 added `extern C` for lz4.h static section
aae447fff LZ4_compress_HC_continue_destSize() works as intended up to level 10
cd35f0d98 LZ4_compress_HC_destSize() uses LZ4HC_compress_generic() code path
6b2a1b360 updated lz4 version number
430b7d32b created LZ4_HC_STATIC_LINKING_ONLY section
9144520dc fixed Visual compilation error
a33bf89c6 fix #332 : do not modify /dev/null permissions
e945a27f9 fix #333 : expose obsolete decoding functions
e1b2b370e added Oleg @remittor contribution
b9132bedc Merge pull request #331 from ldv-alt/dev
50fe87f13 Merge pull request #329 from remittor/dev-hc2
883ebdcee Export only those symbols that are part of public API
25b243588 Export deprecated symbols
7aeecbff7 Explicitly set visibility of public API functions when gcc is used
93b3b08ef Merge pull request #330 from inikep/dev
cb1671955 bench.c: respect LZ4_MAX_INPUT_SIZE limit
517d446d7 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
36842ebb1 lz4hc: Fix LZ4HC_compress_hashChain for backward compatibility
baa155088 lz4hc: Fix LZ4HC_compress_hashChain for full support destSize variant
66b26a389 tests: fuzzer: Add test for LZ4_compressHC_destSize
f007153e3 lz4hc: Add LZ4_compressHC_destSize and LZ4_compress_HC_continue_destSize
45b592b7e lz4hc: Cleanup function LZ4HC_encodeSequence
534f8fa5d lz4hc: Cleanup function LZ4HC_compress_hashChain
9141ada8d Merge pull request #328 from ldv-alt/dev
0dfb0b9da Fix test-lz4-basic
97df1c978 updated LICENSE
5bfdff96b Merge pull request #320 from inikep/dev
d3eaf7883 remove MOREFLAGS from test-lz4c32
5bb6ba794 Merge pull request #319 from inikep/dev
ca2c5fd3c CFLAGS=-I/usr/include/x86_64-linux-gnu
ace22424d circle.yml: fixed lz4c32 target (2)
0d77c85d9 circle.yml: fixed lz4c32 target
24007bb4e Merge pull request #318 from esiegerman/eks/mklib
4ee9bd5c3 improved Circle CI tests
c0a8d0ad8 added circle.yml
3ec1591db Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
68a358769 Avoid fseek()'s 2GiB barrier with MinGW
40ad1e85d upgraded util.h
eb51b2b8d Explicitly create $(DESTDIR)$(LIBDIR)/ at install time
69dbafc1c Merge pull request #317 from esiegerman/eks/no-andand-oror
b89cac7b2 Don't use "foo && false || true"
7e57c398c Merge pull request #316 from inikep/dev
f4b9c1d03 Merge pull request #315 from bebehei/patch-1
c139eb40b added OpenBSD NetBSD SunOS to list of supported `make install` OSes
5e1a925be update repolink in makefile
272699a4e Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
c7b14967a updated platform.h
4f261b828 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
04e5eaf9b added DragonFly to list of supported `make install` OS
04ec09269 updated comments on block sizes
7ed257191 Merge pull request #312 from mgorny/cmake-pc-version
96e150e7d [cmake] Fix substituting version in liblz4.pc
67abd75e6 Merge pull request #307 from inikep/dev
8e1fd97d1 lz4frame.h: added Introduction
d56ee32b3 updated gen-lz4-manual.sh
f54c7e0e7 added lz4frame_manual.html
9071df0fa lz4frame.h: prepared to generate manual
6a5633e99 lz4 manual updated to v1.7.5
f9f48f8ed lz4.h: improved manual generation
128244371 improved gen_manual
489d1618c added "This Makefile is validated for"
339e79320 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
ca083dd4d Merge pull request #304 from Chocobo1/cppcheck
db6f733ec Use logical or instead of bitwise or
44f95e92e Fix printf specifier
9683a1ae8 LZ4_MEMORY_USAGE can be modified from compilation command line
16d69c8d0 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
05e27ade6 updated NEWS
c18a81c02 Merge pull request #296 from mgorny/cmake-fixes
d7969e49a cmake: Install manpages
1380c33b7 cmake: Install lz4cat and unlz4 symlinks
28db4acc9 cmake: Support building shared & static libs simultaneously
9e867db90 cmake: Fix SOVERSION to match Makefiles
cb9599449 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
8c4de60d0 Merge pull request #295 from inikep/opt-parser
d2b51c22d fuzzer: tests more compression levels
312d88249 removed nextToUpdateBT
3d5bb3897 clean logging
1c80b9af4 LZ4HC_getSearchNum
581da2bf8 Merge pull request #293 from inikep/dev
98f9d6c72 improved logging
12aae846b fixed table update in LZ4_loadDictHC
c8b31263c added FUZ_CLEVEL_DEFAULT
7a73c5c1f changed default PREFIX and MANDIR
d57ff6456 changed default PREFIX and MANDIR
a3d61cf3d improved test-lz4-opt-parser
20381a2fc fixed -BD compression
f4575f4f1 added test-lz4-opt-parser
e6536faf3 lib\Makefile: fixed INSTALL_DATA
efaa9b7bc Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
b22e2bed5 BSD: improved "make install"
ea51ad0ce Solaris: working "make install"
19c0f21b0 updated Makefile : lz4 no longer recompiled when already up-to-date
9b4b081c1 "make test" is now compatible with Solaris
b41f9bb13 Merge pull request #292 from inikep/dev
7eb16d97d updated NEWS
52cac9a97 updated a few macros names
fea95c156 use FindFirstFileA and FindNextFileA on Windows
e6af952f8 improved comments
581245063 use fseeko for 32-bit MacOS
f084b6538 test Large File support for Mac OS-X in 32-bits mode
973bc7974 util.h and platform.h based on zstd
70526a11e fixed lib/clean
bc0839c5d minor fix for travis-install test
7cf0bb97b LZ4F_compressBound(0) provides upper bound for LZ4F_flush() and LZ4F_compressEnd() [#290, suggested by @vtermanis]
385cb4f53 minor update Makefile
4f61505cc datagen.vcxproj: CharacterSet is MultiByte
253ac12cb VS projects: CharacterSet changed to MultiByte
287f7d3d6 added IncludePath
2fd7eb554 fixed Visual Studio compilation
3c6ce9c66 fixed gcc 4.4 support
64cbc4e1d improved MinGW support
9546ba62d executables use basic types from util.h
452cc970d reordered definitons in platform.h
090cb887a improved formatting (2)
e1332241a improved formatting
5f0cc8e2d fixed gcc warnings (2)
2efedaf7d fixed gcc warnings
6adf05d1e improved platform.h
2cfef1395 executables use platform.h
bb69cdf25 updated util.h
45b14ab8e added platfom.h
913b98fd6 fix `make` concurrency build (#277)
fec57e49e Merge pull request #287 from inikep/dev
4f050b68d tree update dependent from compression level
838ed341f fullUpdate as a parameter
b3ecc3e3e last match starts at least 12 bytes before end of block
d694bf911 faster opt compression
e7c42d757 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
a22e71d4a full binary tree update
626552671 updated NEWS
de93e9e5d fix #285 : lz4cat doesn't work with stdin (reported by @beiDei8z)
fb6c98c85 slightly improved lz4opt.h
20183ad7a Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
0280cf40d fixed path-1, as suggested by @t-mat
7e2d4c4c0 fixed test-lz4c32
750a50cf6 fix #284, reported by @beiDei8z : added test cases for path/to/lz4cat
01ffed25a fix : invocation of path/to/unlz4 (#284), reported by @beiDei8z
8c2f23c13 fixed LZ4_STREAMHCSIZE
76228f064 LZ4HC_DICTIONARY_LOGSIZE 17
8bfa42e61 improved ratio
128903824 15-bit LZ4HC_HASH_LOG
410ba53db improved LZ4HC_BinTree_GetAllMatches
1833be1cf fixed gcc warnings
f2ebf37bf slightly improved ratio
77b051ed7 improve code formatting
e3fee9474 LZ4HC_MAX_CLEVEL = 12
757ef1d5f removed LZ4HC_GetAllMatches
cfe6a24b0 updated LZ4HC_get_price
2113ead17 17-bit LZ4HC_MAXD
c1ef7a177 introduced LZ4HC_compress_hashChain
3f430daf7 added lz4opt.h
5ae0e789f Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
5eb547a60 fix #283 : implement LZ4_versionString().
9a6f7dfc5 updated NEWS
a9a8dbf7c fixed minor display error when using -r
6b90cfbea Updated man page
009f06e01 minor man page update
b3bc054d0 Merge pull request #279 from t-mat/md-to-man
544290d58 Add "man" target to Makefile
018ddf799 numbering
605512a7b updated NEWS
f4c74e6fa library release build compatible with environment variable
edc132b69 lz4 release build compatible with PIE
7819d5878 new test case with fPIE
de0cf5de6 fixed LZ4IO_compressMultipleFilenames
65a542579 updated README.md
2cbd0233b Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
cc21115cb minor warning fix
8875e7dbb fix minor analyzer warning
8b233b228 added a few dates
ba7a85b46 fixed minor analyzer warning
3bde02a05 added gcc 4.4 test
2fe3aa985 added examples to make all
742f2b683 added doc in code comments
2dbcebfda changes travis test order
b4db9d7e3 Add C++14 standard [[deprecated]] attribute
a38cbf9f6 fixed : shadow global variable on gcc 4.4 (minor)
19df3029e fixed #272 (compilation fails on gcc 4.4), reported by @totaam
519932afa attempt -mx32 tests on Travis CI
a91983daa highly improved speed on -mx32 mode Now -mx32 is fastest mode on x64 CPU
6cabcd151 removed usan32 tests. Let's summarize : gcc-5 and gcc-6 on Travis do not support UB sanitizer. And clang on Travis is not able to generate -m32 code. Great. It makes the combination impossible to test on Travis ... :(
7a22904a7 moved usan32 tests to gcc-6
ffc8c18c1 usan32 relies on default compiler (by default)
a4f4bf21e fixed gcc-5 conf
71814a26f switch usan32 tests to gcc-5
8e1ea59ad attempt to fix sanitize32 package dependency
8f536a43b added sanitize32 tests to Travis
3f6f57768 fixed strict aliasing warnings in fasttest
c0e55ec05 fixed versionsTest
7d5354847 added v1.x.y to versions tests
279344a17 fixed Travis test cases
1abecbc33 fix 32-bits mode. Large File support for Mac OS-X in 32-bits mode Fixed potential undefined behavior Changed makefile for 32-bits mode
7fde7438d Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
a22ca9378 updated README for v1.7.3
e9bec0fdc Merge pull request #271 from inikep/dev
b1519f861 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
2dee7bdaf include NEWS in lz4_x64.zip and lz4_x86.zip
632ab3b8d updated programs\README.md
8b48d5e44 updated example\README.md
11f6217cc created dll\example directory
873206e70 appveyor.yml: create only lz4_x64.zip and lz4_x86.zip
7b6a9d863 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
2e10aab20 MinGW doesn't require the import library at all
7cecc7b08 fixed a limit case scenario
00fa1b9c0 fixed double ;; for Visual
929badd61 fixed sign conversion warning
d613e2494 restored .travis.yml
d2be69b14 fixed minor coverity warnings
8c32a12f1 .travis.yml for coverity
2eddc8ea2 removed .travis.yml, for better rebase
2906c373c fixed appveyor badges
0d6dc079f update appveyor tokens
b44790cf9 Merge pull request #270 from inikep/dev
4235e5e25 updated visual\README.md
257b65a1d ToolsVersion="4.0"
200746427 removed _x64 and _x86
e583dd056 ImageHasSafeExceptionHandlers=false
eb160e1a2 appveyor.yml: added liblz4_x86.zip
45b8623af updated lib\dll\README.md
5625cc21e appveyor.yml: generate DLL package
c093e256d added files used by DLL package
be471c69d added fullbench-dll.sln that works with gcc/MinGW
f71340ce1 DLL dependencies moved to lib/dll/
f3f59bef4 updated appveyor.yml
b0e994cc5 upload executables to GitHub
d84a80e66 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
923cf4447 bump version number
4c5c711b7 fixed minor conversion warning
f094f5314 silence a minor msan warning
0fe5c187a fixed minor msan warning
201149f8e fixed conversion warnings
fa158b411 fixed nameless union warnings
84af32d49 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
5a5ebeec1 clang and g++ tests restricted to native only on Travis CI Ubuntu v12 environment
569897ddd Merge pull request #269 from inikep/dev
1b24cc115 fixed conversion warnings
9ad7508db Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
ecc55d19b fixed uintptr_t on pre-c99 compilers
3d3ccc154 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
d5c9b39dd minor code refactoring
4bd9db1dd Merge pull request #268 from nemequ/dev
f42130ee4 cli : add --help command
84b97f90b fuzzer code refactoring fix g++ conversion warning
151021a3a cmake: add public domain dedication, and a note about the maintainer
b6bcb84ea cmake: make PIC optional when generating a static library
94542d845 made lz4hc explicitly dependent on lz4
bb97e8a6f fixed __GNUC__ macro
cb2230826 fixed fuzzer error
3580d9698 enabled deprecation warnings on remaining obsolete functions
874f3e095 update code comments
e528a82f0 Merge pull request #267 from terrelln/strict-aliasing
3d456bdf2 fixed conversion warnings
bf6dda69e updated frametest
85aeb0e4b Expose internal types to remove strict aliasing
dbfdd5131 Merge pull request #266 from terrelln/frame-ex
7aad356ff Add frame decompression example
ec6fb477b added visual\README.md
9d075580d Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
4f9db1383 updated xxhash lib
c72d2f5b1 minor typo
7d2e4b3cf Merge pull request #265 from terrelln/rm-zstd
5b37837e6 Fix license and remove references to zstd
1f246a989 Fixed #178 fullbench on small input
5e13a6ec4 improved man on compression level
f9c9bb364 Merge pull request #263 from terrelln/dict-ex
cd4462629 Merge pull request #264 from inikep/dev
52251d970 Using MinGW+MSYS to create DLL
72a4a84df udated README.md
2ecce6f15 lz4.h: added Introduction section
93e2477ca added lz4_manual.html
a340b734b added contrib/gen_manual
2278d1f02 custom block size
d57d3e4b4 better MSYS/MinGW support
74f127787 NB_LOOPS ?= -i1
cf8ca581d reordered Travis CI tests
767a23160 changed FUZZER_TIME
6a160b72e Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
924f00c86 fix empty body
94917c9a0 Add dictionary random access example
f34808e4a fixed some static analyzer warning
46f74d79b fixed sparse on stdout
fe48cef50 fixed multiples files on lz4cat (#184, by @libor-m)
1b1680594 fix unused variable warning
1b95d60c6 fixed synthetic benchmark mode slightly optimized test mode
acc48a3f8 fixed lz4cat changed lz4-test order
0c5e2e4d1 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
fafba3973 updated NEWS
2987eb417 Merge pull request #262 from inikep/dev
063b4d92e fixed make install
773ae50b4 DLL exports only functions defined in liblz4.def
ca80a7c8f create DLL with MinGW/MSYS
67fd5dffd updated appveyor.yml
c794829a2 update .gitignore
9e7fe1062 removed <PlatformToolset>
dd14dca15 LZ4_DLL_IMPORT
325babddf added lz4.rc
ef2fdfe3d rename liblz4-dll to lz4-dll
7df658ec1 removed LZ4_DLL_EXPORT=1 (2)
4a6e7327c removed LZ4_DLL_EXPORT=1
bde0d340b added fullbench-dll.vcxproj
da48dbb57 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
fe5148417 introduced LZ4_COMPILED_AS_DLL
d5903c8e5 Merge pull request #261 from terrelln/clean-fasttest
d594d9d87 Remove fasttest when cleaning
bd88e4007 Merge pull request #260 from nemequ/dev
661c48040 cmake: significant changes to accomodate a new "bundled" mode.
ce2202690 Merge pull request #259 from inikep/dev
96ea2e363 updated IntDir
39157c9f3 added lz4-dll project
ec63747de VS project: added IntDir
c6fd78f4f VS project: added setargv.obj
1d22fae1e added test-lz4-speed.py
85f861fc4 bench.c: support notification level
2c788b372 joined arm and aarch64 tests
0a22bf7d6 err0r(LZ4F_errorCodes code) uses ptrdiff_t
d06ab4f41 test powerpc64
230264913 tests\Makefile: added test-platform
c201327f1 added platformTest
0f73ed572 new Travis tests
90981a35c Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
c7ab95faa slightly improved HC compression ratio
e9089bcbe small compression ratio and speed improvement on small files
00c6370ad Fix #243 : detect and report fread() errors, by @iyokan
f6a7c6b57 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
301c4e94e Merge pull request #258 from inikep/dev2
839085f05 Merge pull request #257 from inikep/dev
9b3dcb325 MOREFLAGS="-Werror"
7fbb163f3 added "make c_standards"
b6c407886 condensed travis.yml
2fbd7a512 updated travis.yml
ef54f9f9d added --rm option
d61bb74f2 updated declaration of LZ4F_freeDecompressionContext
7a98db266 added datagen.c to lz4.vcxproj
4b29af350 TreatWarningAsError=true only for debug
90d4401fe fixed appveyor.yml (3)
434d1230e fixed appveyor.yml (2)
58ead8dd2 fixed appveyor.yml
98be00847 Copy owner, file permissions and modification time
158156729 util.h requires CharacterSet=MultiByte
ef9d1b2d4 fixed --test
112499a73 Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
58d7a619a Merge pull request #254 from terrelln/dev
920bf2171 Fix LZ4_decompress_fast_continue() bug
207f478ba minor refactor
8195ba8f7 Updated man page
96565816b restricted deprecation warning to fairly recent gcc versions (>=6.0)
eaad740ac lz4frame obsolete enum should trigger deprecation warnings (on supported compilers)
079d5dd54 removed support for old error code enums from lz4frame_static.h, to free up namespace. note : lz4frame_static.h does not guaranteed API stability. note 2 : the macro to enable old error code enums is still present. Just needs to comment one line to re-enable them.
473acf5aa Merge pull request #252 from inikep/dev
10c5d5eee Merge pull request #253 from terrelln/exit-code
86a24c80f Fix typo in lz4 manpage
f30c56c08 Quiet gcc-4.6.3 narrowing warning
374090c7a Return error if input file does not exist.
fbede33fd fixed Travis tests
8ddaddc2d updated #include in util.h
f878c08b7 better correctness on big-endian 64-bits platforms
26dec498c small compression speed improvement on 64-bits systems
e8a6067e8 updated lz4cli.c
8b8c726a5 bench.c based on zstd
e06fcd903 redefined VOID for Windows/MSYS
e7648f4fc added -r option
6ebf8859e Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
4c496faba Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
6d6a3e0fb Merge pull request #250 from terrelln/test-mode
4c6610709 minor code refactoring
136caa552 Rename passThrough to testMode
eda8c4eb1 fix #198 : no longer requires to restart streaming decompression from where it stopped. It permits relocating remaining data into another memory space. Still, the same content must be presented.
04d728b87 Fix tests for test mode
4791cda04 fixed strict warnings
258a5e7fa updated comments
3dcafd35d Fix test mode and write to null
6f68a1692 fixed travis badges
99d11120b Merge pull request #249 from inikep/dev
46b49af37 fixed clang conversion warning
c66108ceb check fread() operation results (#243)
8847faffb updated programs/README.md
f38adde9e versionsTests moved to tests/
74ba377d7 updated .travis.yml
9f15a4c6e updated Visual Studio projects
84cedb463 updated links to LZ4 repository
e624978ea test programs moved to tests/
88cef262e documentation moved to doc/
b768da8ad Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
59adfd82d fix for ARM platform
67500142c Clarified license (#115, #244)
f17302769 moved cmake and debian directories to contrib (#245)
d05ca2ff6 fixed #247, reported by Felix Bolte
7e112cfa5 fixes static compilation under Windows (#246)
e64a92692 Merge pull request #242 from vapier/dev
92408d338 README: fix minor typo
52cdb4a5f Merge pull request #241 from vapier/dev
c5cb4aa52 Merge pull request #238 from kou/add-lz4lib-api
544abaced Merge pull request #240 from kou/add-missin-ext
43b631223 add a flag to disable static libs
829941e5a Add missing $(EXT) to lz4 program name
59771f41c Use different prefix for each file to avoid conflict
1ca408105 Merge pull request #239 from kou/use-lower-case-for-header-name
012c66536 Add LZ4LIB_API
46a7b94e8 Use lower case for header file name
3b9439ccd updated uninstall
8eae1320c Merge pull request #236 from inikep/dev
33993542a removed test artefacts
3eb143fff fix bug #232 at https://github.com/Cyan4973/lz4/issues/232
c8a78dba1 datagen depends on lz4.h for version string
53515b05e Merge pull request #235 from inikep/dev
92ee3e0ea fixed LZ4 repository links
39be6f16a versionTests require 32-bit gcc libraries
122fdd13a versionTests require python3
6adf7392a updated .travis.yml
8ac619afe Merge pull request #233 from inikep/dev
58a1616d7 Merge remote-tracking branch 'refs/remotes/Cyan4973/dev' into dev
c77fdb44f disabled <RunCodeAnalysis> for Win32
28f98647e lz4 version source from lz4.h
dd51ca630 frametest depends on standard C time.h only
f327a8bdd fullbench depends on standard C time.h only
32a31663c fuzzer depends on standard C time.h only
64f556e61 lz4cli version number from lz4.h
5871585b6 coding style change
e5b0f1ea1 CFLAGS  += $(MOREFLAGS)
829ae7587 remove EnablePREfast=true for Win32
547e1943c set OutDir
ab707e8b0 update IncludePath
3a7b4457a restored lz4.vcxproj
81d90609b added appveyor.yml
c200f7e09 renamed VS project
f4111cf04 Merge pull request #231 from inikep/dev
b3ae49c7b added <string.h> for strlen()
2cf32ef0f -b# and -e# options from zstd
c1864f69e fix mingw64 compilation warnings
7f08131f9 Merge pull request #226 from gsauthof/port-make
3fa60044e don't use variable eval syntax in if()
e1e3305db don't link the tools against the shared library
b0d42cb7e remove additional -fPIC switch because
681d5010d use gnu c99 to get both c99 and POSIX
584e1fe92 request POSIX.2001 definitions for fileno()
5bd3eaa48 minor comments
9578ff539 minor refactor
a7672dc4f minor decompression speed gains
182645ee0 lz4 as phony target
0214638eb Makefile : lz4 at root
63d22e7a1 minor comments clarifications
74e6afc5d minor comments clarification
2ac9ecec6 Fixed #157 : LZ4F_getFrameInfo() fails on valid null-content frame
45ea27949 Minor fuzzer code refactoring
de69eca47 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
828332d23 fixed : fuzzer test, reported by @setharnold (#203)
b130fd592 minor refactoring changes
3c295ca4a Merge pull request #222 from kou/fix-build-error-with-mingw
0c63b7cbd Fix build error with MinGW on Linux
7316584ca Merge pull request #219 from BenWiederhake/dev
d3e2d8026 Use https wherever possible
cec38d1b7 Correctly reference self (github, not googlecode)
654003003 Use correct 'repository' hostname
91cce757f Updated xxhash library to v0.6.1
5540f4f93 stronger compilation flags
19e585cc4 modified : some more deprecated functions from lz4hc.h generate warnings
6b1600f41 changed : default benchmark LZ4_decompress_safe()
6923f3e23 Minor refactoring (code style)
410ec8154 Fixed : alignment warning
bc342ab94 minor refactoring
c8a573d32 very minor decompression speed gain
a5508b1ad fixed display result issue when benchmarking multiple files
e27e7316d minor code refactoring
2d7df8b30 Reduced bench dependency to standard C <time.h> Faster tests More accurate results on systems with high resolution clocks
8938e1074 minor compression speed improvement
c77c0c108 minor refactoring
3c0332600 minor refactoring (coding style)
1f47f3f74 Merge pull request #208 from Nimloth/dev
7bfbccb97 Add FreeBSD to install targets
5bb5d6ee1 Merge pull request #204 from irwand/dev
bc70a4b72 fixed non-C99 compilers
10e3eecc5 fixed non-C99 compiler
973baa2c1 Merge branch 'heapmode_alloc_failure_fix' into dev
3e5bb6753 alloc failure fix
8a42ee10a Merge pull request #201 from cernekee/cmake-pc
4bda09fc8 cmake: Install liblz4.pc
8b562a4f3 Merge pull request #197 from Cyan4973/fix-readme-travis
5cdf9a657 Fix wrong link for Travis
220e0b606 Merge pull request #194 from jzhuge/dev
cf6652f9b lz4cli: print library version
60ba8638c Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
219da951d Added zstd
2995a45e5 Merge pull request #185 from jwerner-chromium/dev
dc868cd5b Allow for safe in-place decoding
4fcb2e17f Remove whitespace from ends of lines
ad564c872 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
db53bbb94 updated hyperlink
b84eb3349 Merge pull request #182 from kou/add-missing-ext
b8abffc39 Merge pull request #181 from kou/fix-build-failure-on-mingw
ab3e1d253 Add missing $(EXT)
14b40fb6d Fix build error on MinGW
62bbd102f Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
2785eeedf clarified man page as suggested in #170
631dc8f2b Merge pull request #173 from flandr/liblz4
d67ae8fe4 Merge pull request #172 from psteinb/add_static_cmake
4c9d851eb added static build target for OSX and Linux to cmake
495ea43d9 Merge pull request #162 from KyleJHarper/20151021_examples
7aa004377 Forgot to make clean before commiting.  Removing binary.
7f96babc4 Several changes to address a few concerns from Yann.  See Google Group LZ4c topic 'Reusing compression/decompression resources' for details.
d1be164e4 Added a note about why char* is used.  Also removed a binary that wasn't supposed to be in there.
0d2518567 Finished the two example files.  Decided to avoid adding anything to lz4.c/h to expose LZ4_compress_generic().
02be6631b Took out the basics and placed them into basics.c.  Added decompression and a wrapper for the generic call.  I will likely break this file up into 2 examples before submission.
67b3a2470 Final tests and reporting are done.  As expected there isn't much to be gained by jumping the chain.  In most of my tests I did see a moderate performance gain when invoking LZ4_compress_generic() directly with normal text.  This could very easily be an edge case.  Either way it's interesting and worth sharing.
bdd9143e0 Didn't add my file for some reason.  Odd.
73dd936b9 Wrote the skeleton of the performance test.  Need to finish tests for the rest of the call stack and then my own copy of generic().
2c8013812 heapmode macro option for lz4hc
ff3324b8d Fix : compiler-independent macro to remove deprecation warnings
64f8b037e clarified lz4 license
2df602568 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
7d4575e54 fixed link typo
012ab2f52 Merge pull request #152 from dcolascione/dev
94a0954b1 Remove .dir-locals.el
4f1ff58f8 Tweak error message
975c06b1a Improve error messages for attempted console IO
6f1fe1b70 Add .dir-locals.el for setting tab-width
0011033e3 fixed #150 : blank lines when converting lz4.1 to .ps or .pdf
248553c5e minor : show in table that frame checksum is optional
cd18ed308 create link to dynamic library without using `cp -a` (#147)
fb6fece77 Updated Makefile and .travis
8a750aa35 Add static library target for msbuild
13f12aa02 Wrapped possibly empty string (Emscripten) with quotes (@Fordi)
4a5a003c4 updated cli help
9aa5504f0 New unalign access method
e5aee601e updated xxhash
e64345506 Merge pull request #142 from bioothod/master
d15ac1f1a Slightly improved compression speed on ARMv6
0f2bf0c54 Improved performance on ARMv6
fb4d3ef2c Added .gitignore
4b4384772 Updated xxhash to r41
2a6ad2a7f debian: changed name lz4->liblz4
2f3e4bf32 debian: changed name lz4->liblz4
31fed3167 debian: changed name lz4->liblz4
309d1e087 debian: remove sbin dir
2131eedf7 debian: renamed lz4->liblz4, updated installed library files
b47786b9e debian: updated debianization to cdbs
a8f33076a cmake: when building library make it shared
33fa0bfb7 Added debianization
b4b739c4b cmake: bump version to the latest release
5dd12b4a7 faster sanitize tests
60119e258 Makefile : generates *.o for faster processing
9517bd923 minor simplification lz4_readarch()
a60d11e46 update on decompression speed
00eedb37d minor refactor
3e579afa6 Slightly improved decompression speed Slightly decreased decompression stack usage in 64-bits mode
795a2cdb1 sligthly improved decompression speed
a3c6daba6 liblz4 : Moved XXH_NAMESPACE to CPPFLAGS
d86dc9167 Merge pull request #131 from Cyan4973/dev
dfabec2d1 Fixed a few minor visual analyzer warnings
4abc86e0b Increased stack memory considered normal by Visual static analyzer
db59c7d33 Merge pull request #130 from Cyan4973/dev
8901dcdc9 removed one malloc
1098d897a lz4io : removed one malloc
81f19264a lz4cli : add one malloc test
aa1350e13 lz4hc : added one malloc test
6fe48b918 changed datagen to remove one malloc
15603d956 Added static analyzer test in Visual
48feb909d Merge pull request #129 from Cyan4973/dev
57e14d4c1 renamed directory to versionsTest
14064beaf Updated NEWS
7273da38b minor example clarification
0cc38f9eb Updated lib readme
454d109c5 Fixed : fuzzer display messages
caba2cc0f staticAnalyze use same compilation flags as normal build
8e8dc17ca Ensured make test is not confused with directory test
192ee724a Added namespace ability to xxhash
c04df7e1b Changed : static library is no longer compiled with -fPIC by default (this option can still be added on the command line) See #53
cdef03389 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
992faef5a Merge pull request #124 from toddlipcon/master
3d9adf7af Merge pull request #122 from keszybz/master
02ff90ac9 Merge pull request #121 from keszybz/add-gitignore
91138150c Fix cmake build to use gnu flags on clang
2ce2e6008 Minor doc clarification on sparse mode support
b17d3220d Minor lib readme update
3bcf68ff3 Use lz4 binary to check output
386d216cd Add example which uses the frame api through the library
0e0c32dfb Make git ignore generated files
7a532eedd Minor update on source ports
8a7bcead9 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
1cec6cb03 Updated badges
7f3d82def Merge pull request #114 from lpsantil/djgpp
f0a0e4430 READM fixup
a3a479fc2 djgpp port now using the proposed contrib structure
00b6535b4 Reverted all `Makefile` changes
936f75b4d Renamed the djgpp README so that it gets converted to HTML by github.  Fixed breakage of `make install`.
81d6b5634 Makefile cleanups to make building with Andrew Wu's build-djgpp cross compilers (and everyone else) simpler.
faa0bce4e Fixup lib/Makefile so that is builds a library for djgpp using Andrew Wu's build-djgpp cross compilers
b2bbb2790 Fixup programs/{Makefile,lz4cli.c,lz4io.c} to build with Andrew Wu's build-djgpp cross compilers.  Add some documentation in README.DJ

git-subtree-dir: src/lz4
git-subtree-split: c10863b98e1503af90616ae99725ecd120265dfb
2017-12-18 14:38:00 -05:00
Brad Chase
7d6c2229ab Update snappy support file 2017-12-18 14:37:42 -05:00
Brad Chase
516a1b85d1 Update snappy to 1.1.7 2017-12-18 13:41:54 -05:00
Brad Chase
2836c20649 Squashed 'src/snappy/snappy/' changes from 1ff9be9b8..b02bfa754
b02bfa754 Tag open source release 1.1.7.
824e6718b Add a loop alignment directive to work around a performance regression.
55924d110 Add GNUInstallDirs to CMake configuration.
632cd0f12 Use 64-bit optimized code path for ARM64.
77c12adc1 Add unistd.h checks back to the CMake build.
c8049c582 Replace getpagesize() with sysconf(_SC_PAGESIZE).
18e2f220d Add guidelines for opensource contributions.
f0d3237c3 Use _BitScanForward and _BitScanReverse on MSVC.
71b8f8688 Add SNAPPY_ prefix to PREDICT_{TRUE,FALSE} macros.
be6dc3db8 Redo CMake configuration.
e4de6ce08 Small improvements to open source CI configuration.
c756f7f5d Support both static and shared library CMake builds.
038a3329b Inline DISALLOW_COPY_AND_ASSIGN.
a8b239c3d snappy: Remove autoconf build configuration.
27671c6ae Clean up CMake header and type checks.
548501c98 zippy: Re-release snappy 1.1.5 as 1.1.6.
513df5fb5 Tag open source release 1.1.5.
5bc9c82ae Set minimum CMake version to 3.1.
e9720a001 Update Travis CI config, add AppVeyor for Windows CI coverage.
f24f9d2d9 Explicitly copy internal::wordmask to the stack array to work around a compiler optimization with LLVM that converts const stack arrays to global arrays.  This is a temporary change and should be reverted when https://reviews.llvm.org/D30759 is fixed.
82deffcde Remove benchmarking support for fastlz.
18488d621 Use 64 bit little endian on ppc64le.
7b9532b87 Improve the SSE2 macro check on Windows.
7dadceea5 Check for the existence of sys/uio.h in autoconf build.
83179dd8b Remove quicklz and lzf support in benchmarks.
c8131680d Provide a CMakeLists.txt.
ed3b7b242 Clean up unused function warnings in snappy.
8b60aac4f Remove "using namespace std;" from zippy-stubs-internal.h.
7d7a8ec80 Add Travis CI configuration to snappy and fix the make build.
1cd3ab02e Rename README to README.md. It already in markdown, we might as well let github know so that it renders nicely.
597fa795d Delete UnalignedCopy64 from snappy-stubs since the version in snappy.cc is more robust and possibly faster (assuming the compiler knows how to best copy 8 bytes between locations in memory the fastest way possible - a rather safe bet).
039b3a7ac Add std:: prefix to STL non-type names.
3c706d223 Make UnalignedCopy64 not exhibit undefined behavior when src and dst overlap.
d3c6d20d0 Add compression size reporting hooks.
626e1b9fa Use #ifdef __SSE2__ for the emmintrin.h include, otherwise snappy.cc does not compile with -march=prescott.
2d99bd14d 1.1.4 release.
8bfb028b6 Improve zippy decompression speed.
818b58338 adds std:: to stl types (#061)
27c5d8652 Re-work fast path for handling copies in zippy decompression.
4a7409408 Speed up Zippy decompression in PIE mode by removing the penalty for global array access.
38a5ec5fc Re-work fast path that emits copies in zippy compression.
094c67de8 Speed up the EmitLiteral fast path, +1.62% for ZFlat benchmarks.
fce661fa8 Speed up zippy decompression by removing some zero-extensions.
e788e527d Avoid calling memset when resizing the buffer.
32d6d7d8a Merge pull request #6 from deviance/provide-pkg-config-data
971613510 Add #ifdef to guard against macro redefinition if this is included in another Google project that also defines this.
0000f997d Merge pull request #13 from huachaohuang/patch-1
d53de1879 Make heuristic match skipping more aggressive.
2b9152d9c Default to glibtoolize instead of libtoolize if it exists, and also make it customizable through the environment variable $LIBTOOLIZE.
0800b1e4c Work around an issue where some compilers interpret <:: as a trigraph. Also correct the namespace name.
e7d2818d1 Unbreak the open-source build for ARM due to missing ATTRIBUTE_PACKED declaration.
7525a1600 Fix an issue where the ByteSource path (used for parsing std::string) would incorrectly accept some invalid varints that the other path would not, causing potential CHECK-failures if the unit test were run with --write_uncompressed and a corrupted input file.
ef5598aa0 Make UNALIGNED_LOAD16/32 on ARMv7 go through an explicitly unaligned struct, to avoid the compiler coalescing multiple loads into a single load instruction (which only work for aligned accesses).
b8cd908a8 Allow to compile in nested packages.
96a2e340f Update URLs in the Snappy README to reflect the move to GitHub.
0852af760 Move the logic from ComputeTable into the unit test, which means it's run automatically together with the other tests, and also removes the stray function ComputeTable() (which was never referenced by anything else in the open-source version, causing compiler warnings for some) out of the core library.
d80342922 Fix signed-vs.-unsigned comparison warnings.
d2cb73b6a Provide pkg-config data
efb39e81b Release Snappy 1.1.3; getting the new Uncompress variant in a release is nice, and it's also good to finally get an official release out after the migration to GitHub.
eb66d8176 Initialized members of SnappyArrayWriter and SnappyDecompressionValidator. These members were almost surely initialized before use by other member functions, but Coverity was warning about this. Eliminating these warnings minimizes clutter in that report and the likelihood of overlooking a real bug.
b2312c4c2 Add support for Uncompress(source, sink). Various changes to allow Uncompress(source, sink) to get the same performance as the different variants of Uncompress to Cord/DataBuffer/String/FlatBuffer.
b2ad96006 Changes to eliminate compiler warnings on MSVC
e7a897e18 Fixed unit tests to compile under MSVC.
86eb8b152 Change a few branch annotations that profiling found to be wrong. Overall performance is neutral or slightly positive.
11ccdfb86 Sync with various Google-internal changes.
22acaf438 Change some internal path names.

git-subtree-dir: src/snappy/snappy
git-subtree-split: b02bfa754ebf27921d8da3bd2517eab445b84ff9
2017-12-18 13:41:54 -05:00
JoelKatz
80050c110f RocksDB support updates:
* Update unity build for RocksDB changes
* Log RocksDB options on startup
* Support RocksDB option strings
* Support full file bloom filters

You can now configure most RocksDB options with RocksDB's option
string scheme.

Set "filter_full" to 1 to make bloom filters for an
entire file rather than each block. More memory will be
needed during compaction but less memory will be needed
during fetching for large databases. Does nothing unless
bloom filters are enabled with "filter_bits".

Example:
options = max_compaction_bytes=64;max_bytes_for_level_multiplier=64
clock_cache_mb = 96
filter_bits = 10
filter_full = 1
2017-12-18 13:35:08 -05:00
Nikolaos D. Bougalis
d2fc4e3569 Set version to 0.80.2 2017-12-15 13:06:10 -05:00
Mark Travis
fbfb4bd74e Control transaction dispatch rate:
Do not dispatch a transaction received from a peer for
processing, if it has already been dispatched within the
past ten seconds.

Increase the number of transaction handlers that can be in
flight in the job queue and decrease the relative cost for
peers to share transaction and ledger data.

Additionally, make better use of resources by adjusting the
number of threads we initialize, by reverting commit
68b8ffdb63.
2017-12-14 16:04:04 -08:00
Brad Chase
8fff0fa6a9 Update RocksDB to 5.8.7 2017-12-02 13:44:49 -05:00
Brad Chase
d0dac38ea8 Squashed 'src/rocksdb2/' changes from 1fdd726a8..aead40417
aead40417 fix HISTORY.md typo
a0cdc3cec Bump version to 5.8.7
7513f6350 Fix IOError on WAL write doesn't propagate to write group follower
9e47084ce Bump version to 5.8.6
36074ba5d Enable cacheline_aligned_alloc() to allocate from jemalloc if enabled.
aa00523e0 Add -DPORTABLE=1 to MSVC CI build
cf2b98237 Bump version to 5.8.5
e8c9350f2 Blob DB: not using PinnableSlice move assignment
4907d2463 Bump version to 5.8.4
5d928c795 Blob DB: Fix race condition between flush and write
725bb9d66 Blob DB: Fix release build
b7367fe84 Bump version to 5.8.3
13b2a9b6f Blob DB: use compression in file header instead of global options
5dc70a15c Fix PinnableSlice move assignment
9019e9125 dynamically change current memtable size
7f1815c37 Bump version to 5.8.2
2584a18ef Blob DB: Fix BlobDBTest::SnapshotAndGarbageCollection asan failure
17f67b546 PinnableSlice move assignment
6fb56c582 Blob DB: Add compaction filter to remove expired blob index entries
f90ced92f Blob DB: fix snapshot handling
632f36dcd Blob DB: option to enable garbage collection
11bacd578 Blob DB: Fix flaky BlobDBTest::GCExpiredKeyWhileOverwriting test
f98efcb1e Blob DB: Evict oldest blob file when close to blob db size limit
c1e99eddc Blob DB: cleanup unused options
ffc3c62ca Blob DB: Initialize all fields in Blob Header, Footer and Record structs
9e8254090 Blob DB: update blob file format
d66bb21e1 Blob DB: Inline small values in base DB
05d5c575a Return write error on reaching blob dir size limit
2b8893b9e Blob DB: Store blob index as kTypeBlobIndex in base db
419b93c56 Blob DB: not writing sequence number as blob record footer
8afb0036c fix lite build
dded348dd Blob DB: Move BlobFile definition to a separate file
374736123 add GetLiveFiles and GetLiveFilesMetaData for BlobDB
8cff6e945 Enable WAL for blob index
c29347290 Add ValueType::kTypeBlobIndex
eae53de3b Make it explicit blob db doesn't support CF
65aec19df Fix memory leak on blob db open
30b38c98c TableProperty::oldest_key_time defaults to 0
2879f4beb Bump version to 5.8.1
88595c882 Add DB::Properties::kEstimateOldestKeyTime
266ac245a Bumping version to 5.8
64185c23a update HISTORY.md for DeleteRange bug fix
e83d6a02e Not using aligned_alloc with gcc4 + asan
0980dc6c9 Fix wrong smallest key of delete range tombstones
b76797231 avoid use-after-move error
c41744270 CMake: Fix formatting
c21ea8f7a CMake: Add support for CMake packages
544434558 add Erlang to the list of language bindings
2972a702a Minor updates to FlushWAL blog
fbfa3e7a4 WriteAtPrepare: Efficient read from snapshot list
b01f426f5 Blog post for FlushWAL
503db684f make blob file close synchronous
3c840d1a6 Allow DB reopen with reduced options.num_levels
92bfd6c50 Fix DropColumnFamily data race
7fdf735d5 Pinnableslice examples and blog post
7fbb9ecca support disabling checksum in block-based table
19cc66dc4 fix clang bug in block-based table reader
7eba54eb9 test compaction input-level split range tombstone assumption
cd26af347 Add unit test for WritePrepared skeleton
a12479819 Improved transactions support in C API
c10b39131 LANGUAGE-BINDINGS.md: add another rust binding
90177432e Remove leftover references to phutil_module_cache
234f33a3f allow nullptr Slice only as sentinel
ccf7f833e Use PinnableSlice in Transactions
1dfcdb15f Extend pin_l0 to filter partitions
39ef90055 stop calling memcmp with nullptrs
78cb6b611 Provide byte[] version of SstFileWriter.merge to reduce GC Stall
867fe92e5 Scale histogram bucket size by constant factor
f004307e9 CMake improvements
09ac6206a Circumvent ASAN false positive
5b68b114f Blob db create a snapshot before every read
4624ae52c GC the oldest file when out of space
8ace1f79b add counter for deletion dropping optimization
0d8e992b4 Revert the mistake in version update
5358a8056 add VerifyChecksum to HISTORY.md
ed0a4c93e perf_context measure user bytes read
1efc600dd Preload l0 index partitions
bddd5d363 Added mechanism to track deadlock chain
c1384a707 fix db_stress uint64_t to int32 cast
29877ec7b Fix blob db crash during calculating write amp
8f2598ac9 Enable Cassandra merge operator to be called with a single merge operand
9a44b4c32 Allow merge operator to be called even with a single operand
ac8fb77af fix some misspellings
23593171c minor improvements to db_stress
af012c0f8 fix deleterange with memtable prefix bloom
1c8dbe2aa update scores after picking universal compaction
eb6425303 Update WritePrepared with the pseudo code
132306fbf Remove PartialMerge implementation from Cassandra merge operator
71598cdc7 Fix false removal of tombstone issue in FIFO and kCompactionStyleNone
3204a4f64 Fix missing stdlib include required for abort()
7aa96db7a db_stress rolling active window
dfa6c23c4 Update RocksDBCommonHelper to use escapeshellarg
e367774d1 Overload new[] to properly align LRUCacheShard
ad42d2fcb Remove residual arcanist_util directory
279296f4d properly set C[XX]FLAGS during CMake configure-time checks
c5f0c6cc6 compile with correct flags to determine SSE4.2 support
185ade4c0 cmake: support more compression type
5449c0990 rocksdb: make buildable on aarch64
a144a9782 Fix for CMakeLists.txt on Windows for RocksJava
acf935e40 fix deletion dropping in intra-L0
8254e9b57 make sst_dump compression size command consistent
74f18c130 db_bench support for non-uniform column family ops
5de98f2d5 approximate histogram stats to save cpu
3f5888430 Fix c_test ASAN failure
e5a1b727c Fix blob DB transaction usage while GC
6f051e0c7 fix corruption_test valgrind
ac098a462 expose set_skip_stats_update_on_db_open to C bindings
666a005f9 Support prefetch last 512KB with direct I/O in block based file reader
ad77ee0ea Revert "Makefile: correct faligned-new test"
b87ee6f77 Use more keys per lock in daily TSAN crash test
25df24254 Add column families related functions (C API)
64f848435 block_cache_tier: fix gcc-7 warnings
0cecf8155 Write batch for `TransactionDB` in C API
6a9de4347 Windows.h macro call fix
23c7d1354 fix comment
1fbad84b6 Makefile: correct faligned-new test
7848f0b24 add VerifyChecksum() to db.h
47ed3bfc3 fix WinEnv assertions
d97a72d63 Try to repair db with wal_dir option, avoid leak some WAL files
36375de76 gcc-7/i386: markup intentional fallthroughs
bdc056f8a Refactor PessimisticTransaction
a9a4e89c3 Fix valgrind complaint about initialization
4ca11b4b0 Update USERS.md
c9804e007 Refactor TransactionDBImpl
20dc5e74f Optimize range-delete aggregator call in merge helper.
0d4a2b733 Avoid blob db call Sync() while writing
627c9f1ab Don't add -ljemalloc when DISABLE_JEMALLOC is set
dce6d5a83 db_bench background work thread pool size arguments
4f81ab38b Makefile: fix for GCC 7+ and clang 4+
92afe830f Update all blob db TTL and timestamps to uint64_t
5883a1ae2 Fix /bin/bash shebangs
cc01985db Introduce bottom-pri thread pool for large universal compactions
0b814ba92 Allow concurrent writes to blob db
2c45ada4c Blob DB garbage collection should keep keys with newer version
58410aee4 Fix the overflow bug in AwaitState
c3d5c4d38 Refactor TransactionImpl
060ccd4f8 support multiple CFs with OPTIONS file
345387067 Fix statistics in RocksJava sample
1900771bd Dump Blob DB options to info log
3218edc57 Fix universal compaction bug
6a36b3a7b fix db get/write stats
a84cee812 Add a missing "once" in .h
21696ba50 Replace dynamic_cast<>
e85f2c64c Prevent empty memtables from using a lot of memory
ac748c57e Fix FIFO Compaction with TTL tests
aaf42fe77 Move blob_db/ttl_extractor.h into blob_db/blob_db.h
aace46516 Fix license headers in Cassandra related files
50a969131 CacheActivityLogger, component to log cache activity into a file
6083bc79f Blob DB TTL extractor
710411aea fix asan/valgrind for TableCache cleanup
3a3fb00b7 TARGETS file not setting sse explicitly
fca4d6da1 Build fewer tests in Travis platform_dependent tests
8f553d3c5 remove unnecessary internal_comparator param in newIterator
7f6d012d7 "ccache -C" in Travis
d12691b86 move TableCache::EraseHandle outside of db mutex
f33f11368 fix db_bench argument type
e7697b8ce Fix LITE unit tests
3ce20e985 Fix use of RocksDBCommonHelper in cont_integration.sh
c281b4482 Revert "CRC32 Power Optimization Changes"
9980de262 Fix FIFO compaction picker test
2289d3811 CRC32 Power Optimization Changes
30b58cf71 Remove the orphan assert on !need_log_sync
fe1a5559f Fix flaky write_callback_test
addbd279c 5.6.1 release blog post
30edff308 buckification: remove explicit `-msse*` compiler flags
2b259c9d4 Lower num of iterations in DeadlockCycle test
277f6f23d Release note for partitioned index/filters
5e731a138 Remove unused rocksdb arcanist lib
9b11d4345 Fix broken links
06f191744 add vcpkg as an windows option
ea8ad4f67 Fix compaction div by zero logging
34112aeff Added db paths to c
1d8aa2961 Gcc 7 ParsedInternalKey replace memset with clear function.
a4c42e800 Fix UBSAN issue of passing nullptr to memcmp
16e038820 LRUCacheShard cache line size alignment
216644c61 enable UBSAN macro in TARGETS
e67b35c07 Add Iterator::Refresh()
a34b2e388 Fix caching of compaction picker's next index
72502cf22 Revert "comment out unused parameters"
1d7048c59 comment out unused parameters
534c255c7 Cassandra compaction filter for purge expired columns and rows
63163a8c6 Remove make_new_version.sh
0302da47a Reduce blob db noisy logging
3e5ea29a8 Fix Flaky DeleteSchedulerTest::ImmediateDeleteOn25PercDBSize
a22b9cc6f overlapping endpoint fixes in level compaction picker
ffd2a2eef delete ExpandInputsToCleanCut failure log
3e6e863b1 Remove arcanist_util directory
36651d14e Moving static AdaptationContext to outside function
6e3ee015f Update java/rocksjni.pom
ecff9d5e3 Include write_buffer_manager in ImmutableDBOptions::Dump
ae28634e9 Remove some left-over BSD headers
33b1de82a Remove format compatibility hack
2f375154e checkout local branch in check_format_compatible.sh
ddb22ac59 avoid collision with master branch in check format
0c03a7f17 set the remote for git checkout
7ac184c6d Revert cmake -DNDEBUG for non-MSVC
0655b5858 enable PinnableSlice for RowCache
00464a314 Fix column_family_test with LITE build
b2dd192fe tools/write_stress.cc: Correct "1204" typos.
cbaab3044 table/block.h: change memset
f1a056e00 CodeMod: Prefer ADD_FAILURE() over EXPECT_TRUE(false), et cetera
4a2e4891f Add back the LevelDB license file
a7321fc97 Remove the licensing description in CONTRIBUTING.md
3c327ac2d Change RocksDB License
132013366 Make TARGETS file portable
ccf5f08f8 Set CACHE_LINE_SIZE for s390, PPC, ARM64
67510eeff db_crashtest.py: remove need for shell
4267eb00d Remove punit tests
5bfb67d90 Enable write rate limit for updaterandom benchmark
20a691d98 Update HISTORY to release 5.7
98d1a5510 db_bench to by default verify checksum
26ce69b19 Update blob db to use ROCKS_LOG_* macro
43e4eef77 remove unnecessary fadvise
21b17d768 Fix BlobDB::Get which only get out the value offset
70440f7a6 Add virtual func IsDeleteRangeSupported
7550255c5 Add JAVAC_ARGS as Makefile variable
7a0b5de77 Gcc 7 ignored quantifiers
000bf0af3 Improve the design and native object management of Stats in RocksJava
269d383d5 Bump version to 5.7
c32f27223 Fixes db_bench with blob db
fcd99d27c db_bench_tool: fix buffer size
87128bd5c fix regression test
8f927e5f7 Fix undefined behavior in Hash
643b787c7 Added a note about LZ4 compression dependency
56656e12d Temporarily disable FIFOCompactionWithTTLTest
b5fb85ec5 fix valgrind init complaint
657df29ea Add max_background_jobs to db_bench
a43c053ad remove duplicated utilities/merge_operators/cassandra/test_utils.cc in src.mk
7c4a9e6c9 Initialize a variable in ldb to make code analysis tool happy
98669b535 init filters_in_partition_
0013bf14e fix asan and valgrind leak report in test
521b4c28b rocksdb 5.5.1 release post
33042573d Fix GetCurrentTime() initialization for valgrind
f6b9d9355 Fix clang error in PartitionedFilterBlockBuilder
45b9bb033 Cut filter partition based on metadata_block_size
f4ae1bab0 update history for OnBackgroundError and DeleteRange fix
1cb8c6de6 Add -enable_pipelined_write to db_bench and add two defaults
7604b463b Update the AddDBStats in LITE
1e34d07e1 Simplify and document sync rules for logs_ etc
d310e0f33 Regression test for empty dedicated range deletion file
e9f91a517 Add a fetch_add variation to AddDBStats
c1b375e96 skip generating empty sst
67b417d62 fix format compatible test
afbef6518 Bug fix: Fast CRC Support printing is not honest
397ab1115 Improve Status message for block checksum mismatches
18c63af6e Make "make analyze" happy
01534db24 Fix the reported asan issues
1cd45cd1b FIFO Compaction with TTL
982cec22a Fix TARGETS file tests list
b49b37109 allow numa >= 2.0.8
e517bfa2c CLANG Tidy
dc3d2e4d2 update compatible test
89468c01d Fix Windows build broken by 5c97a7c0664d4071768113814e9ba71fe87e18cf
51778612c Encryption at rest support
7061912c2 Trivial typo in HISTORY.md
2a9cd8799 Fix jni WriteBatchThreadedTest
0025a3640 revert perf_context and io_stats to __thread
5c97a7c06 Unit Tests for sync, range sync and file close failures
4cee11f4e Intra-L0 blog post
857e9960b Improve the error message for I/O related errors.
d757355cb Fix bug that flush doesn't respond to fsync result
8e6345d2d Update rename of ParanoidCheck
499ebb3ab Optimize for serial commits in 2PC
0ac4afb97 Sanitize partitioning options
521724ba8 fixed wrong type for "allow_compaction" parameter
71f5bcb73 Introduce OnBackgroundError callback
88cd2d96e Downgrade option sanitiy check level for prefix_extractor
6837a1762 Fix Data Race Between CreateColumnFamily() and GetAggregatedIntProperty()
af1746751 WriteBufferManager will not trigger flush if much data is already being flushed
9467eb614 Fix flush assertion with tsan
048446fc7 Fix cassandra ASAN use-after-free
a21db161c Implement ReopenWritibaleFile on Windows and other fixes
c430d69ee fix coredump for release nullptr
0d278456c default implementation for InRange
cbd825dee Create a MergeOperator for Cassandra Row Value
2c98b06bf Remove pin_slice option by making it the default
c80c6115d add db_bench options for partitioning
6a3377f45 Synchronize statistic enumeration values between statistics.h and java API
53dda8797 Do not run RateLimiterTest.Rate test on Travis+Mac OSX.
ae8571f5c Fix blob db compression bug
7a380deff Update blob_db_test
89ad9f3ad Allow ignoring unknown options when loading options from a file
6b5a5dc5d fixed typo
0f228be3b fixed typo in util/dynamic_bloom.h
c217e0b9c Call RateLimiter for compaction reads
91e2aa3ce write exact sequence number for each put in write batch
6f4154d69 record index partition properties
5d5a28a98 Fix Clang release build broken by 5582123dee8426a5191dfd5e846cea8c676c793c
0175d58c3 Make direct I/O write use incremental buffer
7a270069b GNU C library for struct tm has 2 additional fields.
d713471da Limit trash directory to be 25% of total DB
9bb91e932 Dedup release
27b450165 Update HistogramTypes in the Java API
e97304c68 update history for 5.6
5582123de Sample number of reads per SST file
db818d2d1 Fix RocksDB Lite build with CLANG
a472c4ae4 update 5.5 change log
bc09c8a0d Fix crash in PosixWritableFile::Close() when fstat() fails
6d0f22e42 Fix mock_env.cc uninitialized variable
c2012d488 Java APIs for put, merge and delete in file ingestion
85dace2af Disable DBRangeDelTest::TailingIteratorRangeTombstoneUnsupported for ubsan
d4f7731b6 fix travis error with init time in mockenv
550a1df72 Fix clang errors by asserting the precondition
cc5f9339e Fix concurrency issue with filter_block_set_
2e64f450d bump version to 5.6
afbc2d0d2 Force travis to build with clang on MacOS
b172a3f1a Fix warnings while generating RocksJava documentation
52a7f38b1 WriteOptions.low_pri which can throttle low pri writes if needed
26a8a8071 Switch from CentOS 5 to CentOS 6 for crossbuilding RocksJava
dba9f3722 Fix db_write_test clang/windows build failure
c7662a44a fixed typo
7e8d95cc0 Fix the Java build which was broken by a4d9c02
7e5fac2c3 remove test dir before exit when current regression is running
7f6c02dda using ThreadLocalPtr to hide ROCKSDB_SUPPORT_THREAD_LOCAL from public…
138b87eae Fix interaction between CompactionFilter::Decision::kRemoveAndSkipUnt…
95b0e89b5 Improve write buffer manager (and allow the size to be tracked in block cache)
a4d9c0251 Pass CF ID to MemTableRepFactory
f68d88be5 Fix DBWriteTest::ReturnSequenceNumberMultiThreaded data race
215076ef0 Fix TSAN: avoid arena mode with range deletions
3a8a848a5 account for L0 size in estimated compaction bytes
0fae3f5dd codemod: format TARGETS with buildifier [5/5] (D5092623)
872199606 add checkpoint support for single db in regression test
5a9b4d743 Retire memenv https://github.com/facebook/rocksdb/pull/2082
d6019651b sync internal/external TARGETS
bbaba51bb Add missing index type to C-API
292edfd51 travis: test with xcode8.3 (OS X 10.12)
0dc3040d5 db: avoid `#include`ing malloc and jemalloc simultaneously
9b3ed8350 fix regression test
9c9909bf7 Support ingest file when range deletions exist
ad19eb868 Fixing blob db sequence number handling
51ac91f58 Histogram of number of merge operands
345878a7f update blob_db_test
cbc821c25 change regression rebuild to one level
103d0692e Avoid unsupported attributes when not building with UBSAN
5fd04566c travis: reduce the number of travis builders
2d05002b9 RocksDB 5.4.5 release blog post
7eca90f18 Update RocksDB blog authors
d03c34497 update comment of GetNextFile
f7bb1a006 support merge and delete in file ingestion
c2c62ad4e Reorder variables of ReadOptions
7bb1f5d48 Increase of compaction threads should be logged at info level instead of a warning
6c456ecae Clean zstd files
347e16f83 codemod: replace `headers = AutoHeaders.*` with `auto_headers`
0be636bf7 Fix db_bench build break with blob db
135ee6a3f fix tsan crash data race
a99fb9928 fix column_family_test asan
f41bffb3d travis: clang-3.6 -> clang-4.0
e7612798b update buckifer/TARGETS
bb01c1880 Introduce max_background_jobs mutable option
5a2530462 Fix the CMakeLists for RocksJava
41cbb7274 options.delayed_write_rate use the rate of rate_limiter by default.
506803466 range sync should be enabled
02594b5f1 Fix build errors in blob_dump_tool with GCC 4.8
52d9e5f7b Fix column family seconds_up accounting
7d8207f1f Fix errors in clang-analyzer builds
85b8569ae Fix release build on Linux
69ec8356b Allow SstFileWriter to use the rate limiter
6cc9aef16 New API for background work in single thread pool
9d0a07ed5 Fix rocksdb.estimate-num-keys DB property underflow
578fb0b1d Simple blob file dumper
ac39d6bec Core-local statistics
3e86c0f07 disable direct reads for log and manifest and add direct io to tests
15ba4d6c4 Address MS Visual Studio 2017 issue with autovector
88c818e43 Replace deprecated RocksDB#addFile with RocksDB#ingestExternalFile
228f49d20 Fix data races caught by tsan
4c9d2b104 remove #include port/port.h in public header file
07bdcb91f New WriteImpl to pipeline WAL/memtable write
d746aead1 Suppress clang-analyzer false positive
217b866f4 column_family_test: EnvCounter::num_new_writable_file_ to be atomic
9f839a7f6 keep util/build_version.cc when make clean
7eecd40a4 add emacs tags file - etags
9bbba4fec Remoe unused BlockBasedTable::compaction_optimized_
f5ba131bf Fixed some spelling mistakes
146b7718f Fix mingw compilation with -DNDEBUG
a36220ccf fix unity test
0ebdd7057 fixed typo
8032f4cb3 Remove -pie in TSAN
362ba9b02 Release RocksDB 5.5.0
ba685a472 Support ingest_behind for IngestExternalFile
01ab7b528 Add ROCKSDB_LIBRARY_API macro to a few C APIs, to fix windows build
cb9392a09 add Transactions and Checkpoint to C API
445f1235b s/std::snprintf/snprintf
cd593c283 Fix travis java_test
f720796e2 fixed typo
a48a62d5b define NDEBUG in CMake non-debug builds
1ca723dbd C API: support pinnable get
2ef15b85d Core-local stats blog post
4f9e69ccf fix log err
11c5d4741 cross-platform compatibility improvements
d00433302 Put lib files into suitable path in RPM package
86d549253 Fix build error with blob DB.
254c46800 Fix the RocksJava Release on Windows
7a47b431f Fix .gitignore pattern
fa5a15ceb Make sure that zstd is statically linked correctly in the Java static build
3fa9a39c6 Add GetAllKeyVersions API
1a60982a5 Simplified instructions for CentOS
a5cc7ecec Facility for cross-building RocksJava using Docker
ccd3dddf5 Blog post for partitioned index/filters
b145c34d7 Update blog authors
bbe9ee7dd core-local array type conversions
c2be43430 Build and link with ZStd when creating the static RocksJava build
c61e72c42 Add missing files of blob_db to CMake file
3907c94ff Fix ColumnFamilyTest:BulkAddDrop
cda5fde2d CoreLocalArray class
93949667c update TARGETS
4e83b8001 title: Bulkoading -> title: Bulkloading
d85ff4953 Blob storage pr
492fc49a8 fix readampbitmap tests
be421b0b1 portable sched_getcpu calls
0f559abdb Add NO_UPDATE_BUILD_VERSION option to makefile
3a04a254a Flink state
35df23fe8 Fix suite exclisions
e7cea86f7 Fixes the CentOS 5 cross-building of RocksJava
259a00eac unbiase readamp bitmap
a62096696 port: updated PhysicalCoreID()
df035b682 Print compaction_options_universal.stop_style in LOG file
4897eb250 dont skip IO for filter blocks
3f73d54bb Add C API to set max_file_opening_threads option
0b69e5079 Define CACHE_LINE_SIZE only when it's not defined
2cd00773c Add bulk create/drop column family API
40af2381e Object lifetime in cache
fdaefa030 travis: add Windows cross-compilation
a30a69603 do not read next datablock if upperbound is reached
2d42cf5ea Roundup read bytes in ReadaheadRandomAccessFile
264d3f540 Allow IntraL0 compaction in FIFO Compaction
8c3a180e8 Set lower-bound on dynamic level sizes
7c1c8ce5a Avoid calling fallocate with UINT64_MAX
a45e98a5b max_open_files dynamic set, follow up
6b99dbe04 fix memory alignment with logical sector size
e7ae4a3a0 Max open files mutable
60847a3b0 port: updated PhysicalCoreID()
b551104e0 support PopSavePoint for WriteBatch
498693cf3 Remove orphaned Java classes
5e2ebf2bd travis: add CMake compilation
af6fe69e4 Fix an issue of manual / auto compaction data race
6798d1f3b Revert "Delete filter before closing the table"
89833577a Delete filter before closing the table
47a09b0a8 Avoid pinning when row cache is accessed
aeaba07b2 Remove an assert that causes TSAN failure.
0b90aa951 Set VALGRIND_VER
a2b05210e Make PosixLogger::flush_pending_ atomic
da4b2070b Fix WriteBatchWithIndex address use after scope error
d616ebea2 Add GPLv2 as an alternative license.
4439b4596 Add documentation license
0ca3ead0c add GetRootDB() in DeleteFilesInRange
cdad04b05 Remove double buffering on RandomRead on Windows.
e15382c09 Disable two flaky tests
2150cc1f3 fix WritableFile buffer size in direct IO
efc361ef7 Add user stats Reset API
6616e4d62 add prefetch to PosixRandomAccessFile in buffered io
f6a27d0bc Extract statistics tests into separate file
7eddecce1 support bulk loading with universal compaction
3b4d1b7a4 add <sys/sysmacros.h> to avoid warning with glibc 2.25
e5e545a02 Reunite checkpoint and backup core logic
72c21fb3f call GetRootDB() before cast to DBImpl* in CancelAllBackgroundWork
4c9447d88 Add erase option to release cache
04d58970c AIX and Solaris Sparc Support
afff9951e Respect deprecated flag in table options
066cfbacc Adding -noprofile to CMakeLists for Windows
cb885bccf set compaction_iterator earliest_snapshot to max if no snapshot
7534ba7bd StackableDB should pass ResetStats()
c1fbf91b2 Fixing Solaris Sparc crash due to cached TLS
963eeba48 Revert how check_format_compatible.sh checkout release branches.
97005dbd5 tools/check_format_compatible.sh to cover option file loading too
8f6196788 Add cpu usage to regression benchmarks (4th attempt)
df74b775e Limit backups opened
1dd776051 Change L0 compaction score using level size
927bbab25 Revert "Add cpu usage to regression benchmarks (3rd attempt)"
8e84a388e Re-add index_per_partition but as deprecated
1553659d6 Add more recent versions to tools/check_format_compatible.sh
966ebb02f Hide event listeners from lite build
476e80be8 Add cpu usage to regression benchmarks (3rd attempt)
c49d70465 Add DB:ResetStats()
0fcdccc33 Blob storage helper methods
a6439d797 CMake: compile with -O2
e67f0adf3 enable O2 optimization for lz4
bc3973259 CMake: add support for SSE4.2
7d5f5aa97 Separate compile and link for shared library
071652734 remove warning
6e8d6f429 readahead backwards from sst end
ca96654d8 Change Build Env to gcc-5
e9e6e5324 Simplify write thread logic
6799c7e00 Pass in remote as a param to branch creation script
44fa8ece9 change use_direct_writes to use_direct_io_for_flush_and_compaction
13b50358f add space for buggy kernel warning
b6b9359ec Fix BYTES_WRITTEN accounting
13369fbd4 Update ShipIt to honor TARGETS updates
f2449ce92 Remove .deprecated_arcconfig
415be221c RocksDB Release 5.4 : Update HISTORY.md and build version.
3eab41d7c java dependencies test -s -> use test -d
a22ed4eab internal_repo_rocksdb to build Java and RocksDB LITE
9f2cc59ec sync TARGETS file
10d754696 set readahead buffer size from roundup(user_size) + 4k to roundup(use…
ba7da434a fix db_stress crash caused by buggy kernel warning
6257837d8 Add ROCKSDB_JAVA_NO_COMPRESSION flag
6a6723ee1 Move MergeOperatorPinning tests to be with other merge operator tests
6a8d5c015 Revert "Report cpu usage using time command"
8f47a9751 File level histogram should be printed per CF, not per DB
9300ef545 Fix shared lock upgrades
1f8b119ed Limit maximum memory used in the WriteBatch representation
97ec8a134 Report cpu usage using time command
20778f2f9 Adding comments to the write path
7124268a0 Reduce the number of params needed to construct DBIter
04abb2b2d FreeBSD only requires WITH_JEMALLOC, not the rest
61730186d dummy diff
360e9960f Summary: Remove .arcconfig
69a5e6461 Deprecate .arcconfig
9690653db Add a verify phase to benchmarks
dd8f9e38e Fix compilation for GCC-5
c2954f9b6 Add Travis job to build examples
72fc1e9d0 avoid non-existent O_DIRECT on OpenBSD
ff9728701 Refactor compaction picker code
9e7293902 only FALLOC_FL_PUNCH_HOLE when ftruncate is buggy
343b59d6e Move various string utility functions into string_util
1d068f606 Fix CompactRange incorrect buffer release
df6f5a377 Move memtable related files into memtable directory
107c5f6a6 CMake: more MinGW fixes
d2dce5611 Move some files under util/ to separate dirs
c50e3750d Use a human readable size for level report
ce64b8b71 Divide db/db_impl.cc
02799ad77 Revert "delete fallocate with punch_hole"
e2a7b202c Release note for partition filters
af256eb2b build db every monday
e5a1372b2 Rework test running script.
d659faad5 Level-based L0->L0 compaction
a12306fab Add a notice on gflags installation in INSTALL.md
43010a929 Revert "[rocksdb][PR] CMake: more MinGW fixes"
a30b75cdc Add buckifier script to github repo
3450ac8c1 CMake: more MinGW fixes
90cfd4645 update IterKey that can get user key and internal key explicitly
e2c6c0636 add TimedEnv
9e4453180 Refactor WriteImpl (pipeline write part 1)
6ef8c620d Move auto_roll_logger and filename out of db/
a1c469d71 Add release notes for PinnableSlice
0537f515c fix run_remote with strong quoting
72e600094 fixed misses on Centos library installation instructions
88cc81df5 auto_roll_logger_test to move away from real sleep
d25e28d58 replace sometimes-undefined uint type with unsigned int
a1d7e487b Add L0 write-amp to compaction level stats
b6d609063 CMake: support AVX2 in MinGW
bd7d13835 test remote instead run remote in regression test
c81a805fe test db existence on the remote host
5fc1e6765 add -rf when remove db in regression test
4ab4049f2 gflags has moved to GitHub
4e0065015 make all DB::Get overloads virtual
6401a8b76 Fix build with MinGW
80fe5b385 disable test: DeleteSchedulerTest.DynamicRateLimiting1
a9c86f51b backup garbage collect shared_checksum tmp files
da175f7ec exit with code 2 when there is already a db_bench running in regression test
0ee7f0403 Added missing options to RocksJava
c6d04f2ec Option to fail a request as incomplete when skipping too many internal keys
58179ec4a Cleanup of ThreadStatusUtil structures should use the DB's reference
f3607640a add ldb build to regression test
8a8c96746 Enable Fast CRC32 for Win64
f9813b853 Added SstFileWriter construtor without explicit comparator to JNI api
8d3cb4f20 Added naming of backup engine threads
67d762379 Expose the stalling information through DB::GetProperty()
0fd574926 delete fallocate with punch_hole
41fe9ad75 Hide usage of compaction_options_fifo from lite build
e7731d119 Configure index partition size
69c8d524a Fix jni library name for PowerPC Architecture
34a70859b Fix segmentation fault caused by #1961
8dee8cad9 Enable fifo compaction benchmark to db_bench
a5c8b5434 fix a header include
91b5feb37 Fix Windows Build broken by a recent commit
41ccae6d2 Add C API functions (and tests) for WriteBatchWithIndex
88bb6f6bf non_shm CI should run tests on /tmp
8888de2b1 Update .gitignore file in examples
203136e79 Fix Compilation errors when using IBM Java
f4fce4751 Fix clang compile error - [-Werror,-Wunused-lambda-capture]
a084b26a5 Blog post for releasing 5.2.1
15950fe3a Remove ASSERT_EQ(boolean, ...)
3e56c7e0c make total_log_size_ atomic
909028e21 HISTORY.md for log_size_for_flush in CreateCheckpoint()
be723a8d8 Optionally construct Post Processing Info map in MemTableInserter
e474df947 db_bench: not need to check mmap for PlainTable
8b0097b49 Readers for partition filter
9ef3627fd Allow checkpointing without flushing
17866ecc3 Allow Users to change customized ldb tools' header in help printing
a2a883318 remove deleted option from benchmark.sh
78cb19559 add checkpoint to ldb
4b04addfc updated solution if "make format" command fails
8f5bf0446 Flush triggered by DB write buffer size picks the oldest unflushed CF
6908e24b5 dynamic setting of stats_dump_period_sec through SetDBOption()
93c68b642 change regression bash file with debug mode
21d8c3179 remove LIKELY from public headers
36ad75778 INSTALL: document USE_SSE
9272e12f1 avoid ftruncate twice in buffered io
d52f334cb Break stalls when no bg work is happening
e66221add fix db_bench rate limiter callsites
dbae438a0 Replace "DEPRECATED" comment to "not supported"
995618a82 Support SstFileManager::SetDeleteRateBytesPerSecond()
e19163688 Add macros to include file name and line number during Logging
d525718a9 cleanup direct io flag in WritableFileWriter
5fa927aa9 Add Xpress and ZSTD CompressionType values to C header
11526252c Pinnableslice (2nd attempt)
e5bd8def1 update history.md for fixing the bug that skips keys
1ffbdfd9a Add a new SstFileWriter constructor without explicit comparator
ebd5639b6 Add ability to search for key prefix in sst_dump tool
e6725e8c8 Fix some bugs in MockEnv
900c62be6 fix compile for VS2015
fe1835617 release 5.3
5dae01947 Revert "Report cpu usage using time command"
f2817fb7f avoid ASSERT_EQ(false, ...);
5b11124e3 add max to histogram stats
d43adf21b Report cpu usage using time command
18fc1bc0e minor changes for rate limiter test flakiness
12ba00ea6 Reset DBIter::saved_key_ with proper user key anywhere before pass to DBIter::FindNextUserEntry
c9df05d1e Fix random access alignment
f64991537 Add Bulkoading IngestExternalFile blog post
54b434110 Builders for partition filter
97edc72d3 Add a memtable-only iterator
72202962f fix db_sst_test flakiness
5f65dc877 Expose DB::DeleteRange and WriteBath::DeleteRange in Java
58b12dfe3 Set logs as getting flushed before releasing lock, race condition fix
f8a4ea020 Move db_test and external_sst_file_test out of Travis's MAC OS run
534581a35 Fix a bug in tests in options operator=
a2f7a514d Refactoring
2a5daa06f Add stderr log level for ldb backup commands
4561275c2 fix rate limiter test flakiness
7c80a6d7d Statistic for how often rate limiter is drained
0ad5af42d Clarify VerifyBackup behavior
6fb901344 sanitize readahead when direct read enabled
f89b3893c Remove skip_table_builder_flush and default it to true
cc253982d Use more default options in db_bench
8432bcf55 Make compaction_pri settable through option string
d5b607a43 Make db_wal_test slightly faster
ba4c77bd6 Divide external_sst_file_test
e877afa08 Remove bulk loading and auto_roll_logger in rocksdb_lite
90d835507 Fix the wrong address for PREFETCH in DynamicBloom::Prefetch
08864df21 Move advanced column family options to advanced_options.h
2ca2059f6 Get unique_ptr to use delete[] for char[] in DumpMallocStats
253799c06 Add missing include for `abort()`
c6d464a9d Fixed various memory leaks and Java 8 JNI Compatibility
be3e5568b Fix unaligned reads in read cache
8ad0fcdf9 Separate small subset tests in DBTest
6c951c43c Run fewer tests in OSX
f7997f134 add direct I/O to version notes 5.2.0
3b8ba703c Fix flaky DBTestUniversalCompaction.UniversalCompactionTrivialMoveTest2
96c7e1504 Fix Java build
e0b87afc7 Black list some slow valgrind tests
e67232cff Handle failed Finish() in SST file writer
8efb5ffa2 [rocksdb][PR] Remove option min_partial_merge_operands and verify_checksums_in_comp…
1ba2804b7 Remove XFunc tests
e7d902e69 add direct_io and compaction_readahead_size in db_stress
1ef5f50e8 detect logical sector size
ed50308d2 check backup directory exists before listing children
4d7c06ced Make WriteBatchWithIndex moveble
5040414e6 Gracefully handle previous backup interrupted
f206af56f add use_direct_io() to ReadaheadRandomAccessFile
082493442 truncate patch
286a36db7 posix writablefile truncate
f0879e4c3 Page size isn't always 4k on linux
18eeb7b90 Fix interference between max_total_wal_size and db_write_buffer_size checks
1560b2f5f Temporarly return deprecated functions to fix MongoRocks build
2a0f3d0de level compaction expansion
ebc8a7998 alignment is on in ReadaheadRandomAccessFile::Read()
381fd3224 Remove timeout_hint_us from WriteOptions
fce7a6e19 Fail IngestExternalFile when bg_error_ exists
a618a16f4 New subcode for IOError to detect the ESTALE errno
7ab005183 Remove deprecated DB::AddFile and DB::CompactRange
401667366 Adding Dlang to the list
756c5924e Allow adding external v1 sst file with no global seqno support
aa0298fa9 Remove trailing whitespace from examples Makefile
db2b4eb50 avoid direct io in rocksdb_lite
43e9f01c2 Fix repair_test on ROCKSDB_LITE
7106a994f Use monotonic time points in write_controller.cc and rate_limiter.cc
c2247dc1c Make DBImpl::has_unpersisted_data_ atomic
eb912a927 Remove disableDataSync option
0227c16d6 Update static library versions and add checksums
b3aae4d07 Add repair_test to make check
421ce7c2b Add support for JNI Library on Linux on PowerPC.
9afa20cf2 Increase build version and HISTORY.md for releasing 5.2
a5adda064 Fix repair issues
b48e4778b Consolidate file cutting logic in compaction loop
ac2a77a74 Announce the experimetnal two-level index feature in HISTORY.md
c4a37dcb4 Print the missed last layer in cfstats
a12818afc Blog post for 5.1.2 release
3b4ac8076 Clarify ldb column family argument
d70ce7ee0 Move db_bench flags out of unnamed namespace
186c7eedb Remove incorrect statistics warning
53bb01516 [rocksdb][PR] compaction_style and compaction_pri should output their value as a st…
69d5262c8 Two-level Indexes
0a4cdde50 Windows thread
1aaa898cf Adding GetApproximateMemTableStats method
9fc23c55f Use gcc-4.9-glibc-2.20-fb python in precommit_checker
b797e4215 Dump compression dictionary meta-block
036d668b1 Fix wrong result in data race case related to Get()
574b543f8 Rename merger.h -> merging_iterator.h
add8b50cc Move ThreadLocal implementation into .cc
71d2496af Fix arc setting for Facebook internal tools
f289d9f4a Fix OSX build break after the fallocate change
4a3e7d320 Change the default of delayed slowdown value to 16MB/s
0513e21f9 RangeSync() should work with ROCKSDB_FALLOCATE_PRESENT not set
8b369ae5b Cleaner default options using C++11 in-class init
ec79a7b53 Dedup code in option.cc and db_options.cc
b96372dea improving the C wrapper
04c4ec41d Change corruption_test to use 4 bits.
2d75cd40d NewLRUCache() to pick number of shard bits based on capacity if not given
f25f1ec60 Add test DBTest2.GetRaceFlush which can expose a data race bug
37d4a79e9 Deserialize custom Statistics object in db_bench
3b35134e4 Avoid cache lookups for range deletion meta-block
94a0c32e7 Fix LRU Ref() for handles with external references only
17c118060 Generalize Env registration framework
07dddd5f7 EnvPosixTestWithParam should wait for all threads to finish
5dad9d6d2 Avoid logs_ operation out of DB mutex
a7b13919b Fix CompactFiles() bug when used with CompactionFilter using SuperVersion
616a1464e Fix DeleteRange including sentinels in output files
c918c4b76 Update USERS.md add user Pika
03ca2ac8a Remove function from DBImpl that are not used anywhere
b0029bc7f Test merge op covered by range deletion in memtable
d438e1ec1 Test range deletion block outlives table reader
fba726e55 Version librocksdb.so
9da4d542f Range deletions unsupported in tailing iterator
f2b4939da fixed typo
973f1b78f memtable: delete merge value for range deleteion
aebfd1703 fix non-portable behavior in encoder
753ff84a3 Fix get approx size
d7ea44f2f Fixup a couple of builds errors on Linux.
537da370d c: allow set savepoint to writebatch
af6ec4d78 fix batchresult handle leak
e29bb934f Zlib 1.2.8 is no longer available, switched to 1.2.10
5ac97314e Fix std::out_of_range when DBOptions::keep_log_file_num is zero
4e35ffdfa cmake: check -momit-leaf-frame-pointer before using it
3c0852d1d Make ingest external file backward compatible
0e8dfd606 Fix OptimizeForPointLookup()
e840213d6 Change DB::GetApproximateSizes for more flexibility needed for MyRocks
9239103cd Flush job should release reference current version if sync log failed
da54d36a9 Disable IngestExternalFile in ReadOnly mode
5cf176ca1 Fix for 2PC causing WAL to grow too large
4a73bb0b4 Split travis jobs
c70d3c7ad Enable DBTest.GroupCommit as it runs in a reasonlable time now.
602c13a96 Remove fadvise with direct IO read
f9d18e22d Fix DeleteRange file boundary correctness issue with max_compaction_bytes
3ce091fd7 Add KEEP_DB env var option
77b480662 Fix 2PC with concurrent memtable insert
e8a096000 util/thread_local.h: silence a clang-build warning
324a0f988 Follow up for DirectIO refactor
bc5d7b702 travis: For linux, do all tests under gcc
3e6899d11 change UseDirectIO() to use_direct_io()
d4e07a845 fix warning of unused direct io helper functions
dc2584eea direct reads refactor
d18dd2c41 Abort compactions more reliably when closing DB
62384ebe9 Guarding extra fallocate call with TRAVIS because its not working pro…
9f246298e Performance: Iterate vector by reference
fe395fb63 Allow incrementing refcount on cache handles
2172b660e Fix build on FreeBSD
3c233ca4e Fix Windows environment issues
763173456 Fix the error in ColumnFamiliesTest
7a02ad070 Update travis to ubuntu trusty
60c509ff1 Fix valgrind failure in test CurrentFileModifiedWhileCheckpointing2PC
d0ba8ec8f Revert "PinnableSlice"
54d94e9c2 PinnableSlice
e04480fae Fix MS warnings. Use ROCKSDB_Prsz for size_t.
c081f7215 5.0.1 release blog post
ac73d7558 Add GetSupportedCompressions() convenience function
b104b8781 Maintain position in range deletions map
640d72480 Update db_bench and sst_dump to test with block cache mid-point inser?
653ac1f9c C API: support total_order_mode
85ac1a320 Fix rocksdb::Status::getState
76711b6e7 Make ExternalSSTFileTest::CompactionDeadlock more deterministic
c963460db Fix tests under GCC_481
33c86d677 Fix backupable db test
e425ec116 utilities/backupable: backup should limit the copy size of wal.
0712d541d Delegate Cleanables
d58ef52ba Allow SstFileWriter to Fadvise the file away from page cache
17a4b75cc Always fsync the file after file copying
2fb70dc79 examples: Add options_file_example to target all
a738af8f8 db/pinned_iterators_manager.h: bugfix
906523d98 Add description to the 2PC checkpooint bug in HISTORY.md
438f22bc5 Fix bug of Checkpoint loses recent transactions with 2PC
335981d47 Fix the directory path for RocksDB repo
548b62805 Enable conditionally using adaptive mutexes
4e07b08ef include/rocksdb/utilities/env_librados: fix typo
ab48c165a Print cache options to info log
972f96b3f direct io write support
989e644ed Remove sst_file_manager option from LITE
1beef6569 Fix c_test
3d692822f persistent_cache: fix two timer
046099c9b The array is malloced by backtrace_symbols(), and must be freed
6ff2c8d7f Remove gflags as travis build dependency
3cd9ed1c3 Show sandcastle URL in phabricator
50e305de9 Collapse range deletions
5d1457dbb Dump persistent cache options
7bd725e96 db_bench: introduce --benchmark_read_rate_limit
296691847 Update Netflix section of USERS.md
342370f1d Simplify MemTable::Update
1a136c1f1 Expose file size
fbff4628a Reduce compaction iterator status checks
bd6cf7b51 WritableFileWriter: default buffer size equal min(64k,options.writabl?
fc0c6fd98 "make format" format diff since last commit from master
816c1e30c gcc-7 requires include <functional> for std::function
c27073586 Iterator should be in corrupted status if merge operator return false
a8bf4d63f Make format shows wrong curl command for retrieving clang-format-diff.py
8f5d24ae6 C API: support get usage and pinned_usage for cache
0ab6fc167 Gcc-7 buffer size insufficient
b7239bf7e Gcc 7 fallthrough
477b6ea57 std::remove_if requires <algorithm>
83f9a6fd2 Fail BackupEngine::Open upon meta-file read error
a79eae4b0 Add pcache documentation images
d71e728c7 Print user collected properties in sst_dump
7004a6f7b Add missing copyright header
3cdfaeca3 Fixes for MSVC compilation
e097222e6 util/logging.cc: buffer of insufficient size (gcc-7 -Werror=format-length)
cfc34d7c4 Missing break in case in DBTestBase::CurrentOptions
bfbcec233 Gcc 7 error expansion to defined
6653e32ac build: make it easier to pass PORTABLE
67adc937b intentional fallthough (prevents gcc-7/clang-4 error)
1a146f89c break Flush wait for dropped CF
c3e5ee715 util/histogram.cc: HistogramStat::toString buffer insufficient
5334d8b44 table/block_based_table_builder.cc: intentional fallthrough - comment to match gcc pattern
36d42e65d Disable test to unblock travis build
b57dd9262 C API: support writebatch delete range
2ba59b5a1 Disallow ingesting files into dropped CFs
1f6f7e3e8 cast to signed char in ldb_cmd_test for ppc64le
243975d5d More accurate error status for BackupEngine::Open
f0c509e2c Return finer-granularity status from Env::GetChildren*
dc64f46b1 Add db_bench option for stderr logging
2cabdb8f4 Increase buffer size
4a17b47bb Remove unnecessary header include
8c2b921fd Fixed a crash in debug build in flush_job.cc
20ce081fa Fix issue where IngestExternalFile insert blocks in block cache with g_seqno=0
5241e0dbf fix db_bench argument type
c04f6a0b4 Specify shell in makefile
45c7ce137 CompactRangeOptions C API
2c2ba6824 db_stress support for range deletions
b821984d3 DeleteRange read path end-to-end tests
2f4fc539c Compaction::IsTrivialMove relaxing
1dce75b2e Update USERS.md
304b3c706 Update USERS.md
fa50fffaf Option to expand range tombstones in db_bench
c26a4d8e8 Fix compile error in trasaction_lock_mgr.cc
ed8fbdb56 Add EventListener::OnExternalFileIngested() event
2005c88a7 Implement non-exclusive locks
0b0f23572 Mention IngestExternalFile changes in HISTORY.md
23db48e8d Update HISTORY.md for 5.0 branch
beb36d9c1 Fixed CompactionFilter::Decision::kRemoveAndSkipUntil
67f37cf19 Allow user to specify a CF for SST files generated by SstFileWriter
9053fe2a5 Made delete_obsolete_files_period_micros option dynamic
edde954e7 fix clang build
56281f3a9 Add memtable_insert_with_hint_prefix_size option to db_bench
4a21b1402 Cache heap::downheap() root comparison (optimize heap cmp call)
e39d08087 Fix travis (compile for clang < 3.9)
3f407b065 Kill flashcache code in RocksDB
b77007df8 Bug: paralle_group status updated in WriteThread::CompleteParallelWorker
247d0979a Support for range skips in compaction filter
96fcefbf1 c api: expose option for dynamic level size target
00197cff3 Add C API to set base_backgroud_compactions
5b219eccb deleterange end-to-end test improvements for lite/robustness
aad119176 pass rocksdb oncall to mysql_mtr_filter otherwise tasks get created w…
e33352899 DeleteRange write path end-to-end tests
7784980fc Fix mis-reporting of compaction read bytes to the base level
3c6b49ed6 Fix implicit conversion between int64_t to int
b3b875657 Remove unused assignment in db/db_iter.cc
4f6e89b1d Fix range deletion covering key in same SST file
a2bf265a3 Avoid intentional overflow in GetL0ThresholdSpeedupCompaction
52fd1ff2c disable UBSAN for functions with intentional -ve shift / overflow
1886c435b Fix CompactionJob::Install division by zero
63c30de80 fix options_test ubsan
13e66a8f5 Fix compaction_job.cc division by zero
01eabf737 Fix double-counted deletion stat
7ffb10fc1 DeleteRange compaction statistics
236d4c67e Less linear search in DBIter::Seek() when keys are overwritten a lot
cd7c4143d Improve Write Stalling System
dfb6fe675 Unified InlineSkipList::Insert algorithm with hinting
3068870cc Making persistent cache more resilient to filesystem failures
734e4acaf Eliminate redundant cache lookup with range deletion
182b940e7 Add WriteOptions.no_slowdown
4118e1333 Persistent Cache: Expose stats to user via public API
f2a8f92a1 rocks_lua_compaction_filter: add unused attribute to a variable
4444256ab Remove use of deprecated LZ4 function
548d7fb26 Fix fd leak when using direct IOs
fd43ee09d Range deletion microoptimizations
23a18ca5a Reword support a little bit to more clear and concise
481856ac4 Update support to separate code issues with general questions
a0deec960 Fix deadlock when calling getMergedHistogram
fe349db57 Remove Arena in RangeDelAggregator
e63350e72 Use more efficient hash map for deadlock detection
a13bde39e Skip ldb test in Travis
73843aa63 Direct I/O Reads Handle the last sector correctly.
9d60151b0 Implement PositionedAppend for PosixWritableFile
3f6221521 Lazily initialize RangeDelAggregator's map and pinning manager
41e77b839 cmake: s/STEQUAL/STREQUAL/
c1038d283 Release RocksDB 5.0
635a7bd1a refactor TableCache Get/NewIterator for single exit points
f39452e81 Fix heap use after free ASAN/Valgrind
a4eb7387b Allow plain table to store index on file with bloom filter disabled
36e4762ce Remove Ticker::SEQUENCE_NUMBER
86eb2b9ad Fix src.mk
0765babe1 Remove LATEST_BACKUP file
647eafdc2 Introduce Lua Extension: RocksLuaCompactionFilter
760ef68a6 fix deleterange asan issue
327085b7b fix valgrind
715591bba Ask travis to use JDK 7
972e3ff29 Enable allow_concurrent_memtable_write and enable_write_thread_adaptive_yield by default
420bdb42e option_change_migration_test: force full compaction when needed
1543d5d92 Report memory usage by memtable insert hints map.
018bb2ebf DeleteRange support for db_bench
dc51bd716 CMakeLists.txt: FreeBSD has jemalloc as default malloc
48e8baebc Decouple data iterator and range deletion iterator in TableCache
4b0aa3c4c Fix failed compaction_filter_example and add it into make all
53b693f5f ldb support for range delete
661e4c926 DeleteRange unsupported in non-block-based tables
489d14280 DeleteRange interface
eba99c28e Fix min_write_buffer_number_to_merge = 0 bug
2ef92fea5 Remove all instances of relative_url until GitHub pages problem is fixed.
91300d01f Dynamic max_total_wal_size option
ec2f64794 Consider subcompaction boundaries when updating file boundaries for range deletion
800e51553 Fix CSS issues again
b952c898b Parallize persistent_cache_test and transaction_test
3b192f618 Handle full final subcompaction output file with range deletions
6c5795200 Make range deletion inclusive-exclusive
425210cc4 CSS issues are arising on the Github Pages side. Temp fix.
1ea79a78c Optimize sequential insert into memtable - Part 1: Interface
df5eeb85c Optimize sequential insert into memtable - Part 2: Implementation
5ed650857 Fix SstFileWriter destructor
adb665e0b Allowed delayed_write_rate option to be dynamically set.
307a4e80c sst_dump support for range deletion
361010d44 Exporting compaction stats in the form of a map
672300f47 Use relative Urls for stylesheets
b39b2ee12 do not call get() in recovery mode
1ca5f6d13 Fix 2PC Recovery SeqId Miscount
e095d0cbc Rocksdb contruns to new Sandcastle API
14c0380e7 Convenience option to parse an internal key on command line
c90fef88b fix open failure with empty wal
4e20c5da2 Store internal keys in TombstoneMap
a9fb346e4 Fix RocksDB Lite build failure in c_test.cc
d133b08f6 Use correct sequence number when creating memtable
144cdb8f1 16384 as e.g .value for compression_max_dict_bytes
9bd191d2f Fix deadlock between (WriterThread/Compaction/IngestExternalFile)
a9fae0a9d CSS problems again :(
193221e0a Fix Forward Iterator Seek()/SeekToFirst()
e48f3f8b9 remove tabs and duplicate #include in c api
85bd8f518 Minor fix to GFLAGS usage in persistent cache
a7875272d c: support seek_for_prev
0f17f9279 Make the header links a bit more flexible
cf19f559d single quotes in feed
2dc019e09 Fix header links
f1aedda06 More Jekyll 3.3 fixes
c54cdc378 More Jekyll 3.3 updates
2bcaf8246 Update product and feature template for Jekyll 3.3
24bceb096 Java API - Implement GetFromBatch and GetFromBatchAndDB in WBWI
815f54afa Insert range deletion meta-block into block cache
9e7cf3469 DeleteRange user iterator support
5c5d01ae7 Fix wrong comment (Maximum supported block size)
f998c9790 DeleteRange Get support
879f36636 Add C api for RateLimiter
557034f36 Remove all instances of baseurl
437942e48 Add avoid_flush_during_shutdown DB option
2b16d664c Change max_bytes_for_level_multiplier to double
16fb04434 expose IngestExternalFile to c abi
ce22ea99a Fix casts for MSVC
196af035c Introduce FAIL_ON_WARNINGS CMake variable (default ON)
40a2e406f DeleteRange flush support
d5555d95a Fix MSVC compile error in 32 bit compilation
da61f348d Print compression and Fast CRC support info as Header level
f9eb56791 db_bench: --dump_malloc_stats takes no effect
6a4faee5c fix freebsd build include path err and so & jar file name
c90c48d3c Show More DB Stats in info logs
1b295ac8a DBTest.GetThreadStatus: Wait for test results for longer
25f5742f0 Update documentation to point at gcc 4.8
b50a81a2b Add a test for tailing_iterator
04751d534 L0 compression should follow options.compression_per_level if not empty
2946cadc4 Improve RangeDelAggregator documentation
0a9fd05c2 Update Vagrant file (test internal phabricator workflow)
fcd1e0bf6 Make rocksdb work with internal repo
0aab5e55f FreeBSD: malloc_usable_size is in <malloc_np.h> (#1428)
9c0bb7f17 cmake: drop "-march=native" from CXX_FLAGS (#1429)
eeb27e1bb Add handy option to turn on direct I/O in db_bench (#1424)
c6168d13a removed some declarations from c.h which resulted in undefined symbols (#1407)
bc429de49 revert fractional cascading in farward iterator
b9bc7a2aa Use skiplist rep for range tombstone memtable
60a2bbba9 Makefile: generate util/build_version.cc from .in file (#1384)
9ee84067f Disable DBTest.RepeatedWritesToSameKey (#1420)
f41df3045 OptionChangeMigration() to support FIFO compaction
2e8004e60 Changing the legocastle run to use valgrind_test instead of _check
9de2f7521 revert Prev() in MergingIterator to use previous code in non-prefix-seek mode
24495186d DBSSTTest.RateLimitedDelete: not to use real clock
1168cb810 Fix a bug that may cause a deleted row to appear again
99c052a34 Fix integer overflow in GetL0ThresholdSpeedupCompaction (#1378)
f83cd64c0 Fix a bug that mistakenly disable regression_test.sh to update commit (#1415)
0e926b84f Passing DISABLE_JEMALLOC=1 to valgrind_check if run locally
4dfaa6610 Make IsDeadlockDetect() virtual member of Transaction
59a7c0337 Change ioptions to store user_comparator, fix bug
869ae5d78 Support IngestExternalFile (remove AddFile restrictions)
1d9dbef64 Restrict running condition of UniversalCompactionTrivialMoveTest2
4edd39fda Implement deadlock detection
48fd619a4 Minor fixes to RocksJava Native Library initialization (#1287)
48e4e842b Disable auto compactions in memory_test and re-enable the test (#1408)
fb2e41294 column_family_test: disable some tests in LITE
5af651db2 fix data race in compact_files_test
a0ba0aa87 Fix uninitialized variable gcc error for MyRocks
b88f8e87c Support SST files with Global sequence numbers [reland]
08616b493 [db_bench] add filldeterministic (Universal+level compaction)
52c9808c3 not split file in compaciton on level 0
5e0d6b4cc fix db_stress assertion failure
ab5399837 Bump RocksDB version to 4.13 (#1405)
b4d07123c SamePrefixTest.InDomainTest to clear the test directory before testing
aa09d0338 Avoid calling GetDBOptions() inside GetFromBatchAndDB()
6fbe96baf Compaction Support for Range Deletion
257de78d9 Remove "-Xcheck:jni" from Java tests (#1402)
d88dff4ef add seeforprev in history
5027dd17a Fix a minor bug in the ldb tool that was not selecting the specified (#1399)
fea6fdd67 Fix @see in two Java functions (#1396)
b1031d6c1 Remove function local statics that interfere with memory pooling (#1392)
f47054015 Handle WAL deletion when using avoid_flush_during_recovery
e29d3b67c Make max_background_compactions and base_background_compactions dynamic changeable
21e8daced fix assertion failure in Prev()
b9311aa65 Implement WinRandomRW file and improve code reuse (#1388)
a249a0b75 check_format_compatible.sh to use some branch which allows to run with GCC 4.8 (#1393)
040328a30 Remove an assertion for single-delete in MergeHelper::MergeUntil
8cbe3e10c Relax the acceptable bias RateLimiterTest::Rate test be 25%
f26a139d8 Log successful AddFile
5691a1d8a Fix compaction conflict with running compaction
017de666c fixup commit
1b7af5fb1 Redo handling of recycled logs in full purge
27bfe327b Editorial change to README.md
89cc404de A bit of doc restructuring
9e7fda829 Fix arcanist
2e4b5cab0 Add missing RateLimiter class to the Windows build (#1382)
ce4963fdf [doc] Document that Visual Studio 2015+ is now required for Windows builds (#1389)
e48927098 Fix scoped arena iterator (#1387)
f8d8cf53f Fix log_write_bench -bytes_per_sync option. (#1375)
02b3e3985 Make txn->GetState() const
447f17127 new Prev() prefix support using SeekForPrev()
991b585ee More block cache tickers
d6ae6dec6 Add Statistics::getAndResetTickerCount().
aea3ce4c8 Avoid string CONCAT which is not supported in cmake 2.6 (#1383)
2ad68b971 Support running consistency checks in release mode
67501cfc9 Fix -ve std::string::resize
04b02dd12 Testing asset links after config change
8c55bb87c Make Lock Info test multiple column families
d06232897 Revert "Support SST files with Global sequence numbers"
5cd28833a [RocksJava] Adjusted RateLimiter to 3.10.0 (#1368)
37737c3a6 Expose Transaction State Publicly
2c1f95291 Add facility to write only a portion of WriteBatch to WAL
043cb62d6 Fix record_size in log_write_bench, swap args to std::string::assign. (#1373)
4985f60fc env_mirror: fix a few leaks (#1363)
5aded67dd update of c.h (#1371)
912aec13c "Recent Posts" -> "All Posts"
7cbb298db Make sure that when contribtuing we call out creating appropriate directories
a06ad4711 Add top level doc information to CONTRIBUTING.md
3fdd5b971 A little more generic CONTRIBUTING.md
ed4fc31db Add link to CONTRIBUTING.md to main docs README.md
e4922e181 Forgot to truncate one blog post
6d8cd7ede Add CONTRIBUTING.md for rocksdb.org contribution guidance
bd55e5a1e Fix some formatting of compaction blog post
0f60358b0 CRLF -> LF mod (including removing trailing whitespace for those files)
b90e29c90 Truncate posts on the main /blog/ page
0d7acadaf Add author fields to blog posts
01be44181 Add GitHub link to the landing page header
9d6c96138 Fix Mac build
ab01da543 Support SST files with Global sequence numbers
d346ba246 Minor fixes around Windows 64 Java Artifacts (#1366)
e91b4d0cf Add factory method for creating persistent cache that is accessible from public
be1f1092c Expose transaction id, lock state information and transaction wait information
6009c473c Store range tombstones in memtable
3c21c64c7 Use size hint for HashMap in multiGet. Similar to https://github.com/facebook/rocksdb/pull/1344 (#1367)
13f7a01f6 Fixing JNI release build for gcc (#975)
7260662b3 Add Java API for SstFileWriter
26388247a delete unused variable for PrevInterval()
87dfc1d23 Fix conflict between AddFile() and CompactRange()
eb44ed655 Update 2016-09-28-rocksdb-4-11-2-released.markdown
e4437610d Update 2016-09-28-rocksdb-4-11-2-released.markdown
501f05108 Update 2016-09-28-rocksdb-4-11-2-released.markdown
dec9009f8 Update 2016-09-28-rocksdb-4-11-2-released.markdown
4ed69dd0b Create 2016-09-28-rocksdb-4-11-2-released.markdown
21f4bb5a8 cmake support for linux and osx (#1358)
4defe306f fix typo in comments (#1360)
f517d9dd0 Add SeekForPrev() to Iterator
eb3894cf4 Recompute compaction score on SetOptions (#1346)
5c64fb67d Fix AddFile() conflict with compaction output [WaitForAddFile()]
9e9f5a0b9 Fix CompactFilesTest.ObsoleteFiles timeout (#1353)
c2a62a4cb not cut compaction output when compact to level 0
9ed928e7a Split DBOptions into ImmutableDBOptions and MutableDBOptions
4bc8c88e6 Recover same sequence id from WAL (#1350)
0a1bd9c50 add cfh deletion started listener
da5a9a65c Fix mac build
d45eb6c6d Fix typo (#1349)
abc0ae462 Add AddFile() InternalStats for Total files/L0 files/total keys ingested
715256338 forbid merge during recovery
5735b3dc2 Fix compiling under -Werror=missing-field-initializers
654ed9a28 loose the assertion condition of rate_limiter_test
e4d3f5d9b Fix DBImpl::GetWalPreallocateBlockSize Mac build error
7afbb7420 solve the problem of table_factory_to_write_=nullptr (#1342)
d78a4401b DBImpl::GetWalPreallocateBlockSize() should return size_t
42ac9c5f1 Retry getting arcanist token on failure
b666f8544 Consider more factors when determining preallocation size of WAL files
4c3f4496b Add TableBuilderOptions::level and relevant changes (#1335)
3edb9461b Avoid hard-coded sleep in EnvPosixTestWithParam.TwoPools
0a88f38b7 Remove ColumnFamilyData::options()
41a9070f8 Fix java makefile dependencies
8d9bf5c49 Fix DBOptionsTest.GetLatestOptions
40cfa3e02 Fix DBWALTest.RecoveryWithLogDataForSomeCFs with mac
06b4785fe Fix recovery for WALs without data for all CFs
d7242ff4d Fix GetSortedWalFiles when log recycling enabled
17f76fc56 DB::GetOptions() reflect dynamic changed options
215d12826 Fix typo (#903)
a958c2643 Rename jvalue to jval in rocksjni
0a165bd7d Have Facebook link point to RocksDB on FB
3639f3288 Fix bug in UnScSigned-off-by: xh931076284 <931076284@qq.com> (#1336)
8e061f974 Refactor GetMutableOptionsFromStrings
81747f1be Refactor MutableCFOptions
ba65c816b Support POSIX RandomRWFile
1d980a8e3 Create CNAME
2adab1dde Add API links to the header bar
a182b2981 Preserve blog comments in markdown
f54de9230 Adding Dgraph to list of Users (#1291)
9e4aa798c Summary: (#1313)
a10e8a056 Fix C api memtable rep bugs. (#1328)
eb1d4d53c Release RocksDB 4.12
22d88e24d Allow an offset as well as a length to be specified for byte[] operations in RocksJava JNI (#1264)
b06b19136 add C api for set wal_recovery_mode (#1327)
1cca09129 Temporarily revert Prev() prefix support
de28a2553 Update HISTORY.md for thread-local stats
0fcb6dbed Remove extraneous function prototypes from c.h (#1326)
52ee07b02 Move AddFile() tests to external_sst_file_test.cc
66a91e260 Add NoSpace subcode to IOError (#1320)
67036c040 Fix Flaky ColumnFamilyTest.FlushCloseWALFiles
0e2da497c fix typo in option.h's comment (#1321)
6d61358a0 Add real Google Analytics ID
2d9d36ea4 Have "Edit on GitHub" point to master instead of gh-pages
937751898 Update landing page content
1ec75ee76 Add redirects from old blog posts link to new format
607628d34 Support ZSTD with finalized format
ce1be2ce3 Fix build error on Windows (AppVeyor) (#1315)
f7669b40b Fix Windows Build
22696b088 Fix uninitlized CompactionJob::SubcompactionState::current_output_file_size
c1865e0f7 Trigger more tests per diff
a88677d2c Remove ImmutableCFOptions from public API
80c75593e Fix data race in AddFile() with multiple files + custom comparator bug
5051755e3 Fix db_bench memory use after free (detected by clang_analyze)
4fd08f4b8 Ensure Correct Behavior of StatsLevel kExceptDetailedTimers and kExceptTimeForMutex  (#1308)
e14fbaae2 Add FAQ based on the front page of the current rocksdb.org
3c2262400 Migrate the RocksDB Worpdress blog over to Jekyll
ee0e2201e Transfer the current Getting Started contents to GitHub Pages
5a0e9a4cf Initial Landing Page
9447a8540 Remove the `doc` directory
32149059f Merge options source_compaction_factor, max_grandparent_overlap_bytes and expanded_compaction_factor into max_compaction_bytes
4590b53a4 add stats to Cache::LookUp()
85bb30825 Expose Utility function StringToMap() (#1306)
8ce1b8440 Fix Travis on Mac
380e651af Fix Mac build failure (#1309)
1613fa949 Thread-specific histogram statistics
6a14d55bd add prefix_seek_mode to db_iter_test
de47e2bd4 Fix ClockCache memory leak
f099af4c7 Fix travis
db74b1a21 fix bug in merge_iterator when data race happens
b18f9c9ea add nullptr check to internal_prefix_transform
4e395e875 Update docs README.md
2482d5fb4 support Prev() in prefix seek mode
7541c7a79 Fix cache_test valgrind_check failure
c8513cde0 Update the download location of Snappy (#1304)
b49b92cf2 Introduce Read amplification bitmap (read amp statistics)
c7004840d store prefix_extractor_name in table
4ad928e17 add comment to SimCache to estimate actual capacity
e9b2af87f Expose ThreadPool under include/rocksdb/threadpool.h
23a057007 Document memtable flush behavior in CancelAllBackgroundWork()
dade61ac2 Mitigate regression bug of options.max_successive_merges hit during DB Recovery
cce702a6e [db_bench] Support single benchmark arguments (Repeat for X times, Warm up for X times), Support CombinedStats (AVG / MEDIAN)
3586901f8 cat tests logs sorted by exit code
b2ce59537 Persist data during user initiated shutdown
4b3438d2d Fix parallel valgrind (valgrind_check)
a081f798b Relax consistency for thread-local ticker stats
b10d65c2a Update and slightly clarify instructions in build_detect_platform (#1301)
f85f99bf6 Fix the Windows build of RocksDB Java. Similar to https://github.com/facebook/rocksdb/issues/1220 (#1284)
7b8109517 Fix a crash when compaction fails to open a file
7c9586837 Thread-specific ticker statistics
ea9e0757f Add initial GitHub pages infra for RocksDB documentation move and update. (#1294)
2a9c97108 [Flaky Test] Disable DBPropertiesTest.GetProperty
d76ddf327 Disable ClockCache db_crashtest
cec2c6436 fix data race in NewIndexIterator() in block_based_table_reader.cc
badbff65b Not insert into block cache if cache is full and not holding handle
4a16c32ec Option to cache index/filter blocks with priority
99c4af716 Make ClockCache available with TSAN build
f57bc1d03 Fix lambda expression for clang/windows
5440675c3 Fix lambda capture expression for windows
6584cec8f Fold function for thread-local data
817eeb29b Add singleDelete to RocksJava (#1275)
ffdf6eee1 Add Status to RocksDBException so that meaningful function result Status from the C++ API isn't lost (#1273)
ecf900386 Fix bug in printing values for block-based table
72f8cc703 LRU cache mid-point insertion
6a17b07ca Add TablePropertiesCollector support in SstFileWriter
78837f5d6 TableBuilder / TableReader support for range deletion
4cc37f59e Introduce ClockCache
ff17a2abf Adding TBB as dependency.
49d88be02 c abi: allow compaction filter ignore snapshot (#1268)
0b63f51fb fixes 1215: execute_process(COMMAND mkdir ${DIR}) fails to create a directory with cmake on Windows (#1219)
3981345be Small nits (#1280)
2a2ebb6f5 Move LRUCache structs to lru_cache.h header
2fc2fd92a Single Delete Mismatch and Fallthrough statistics
3771e3797 WriteBatch support for range deletion
236756f2c Make SyncPoint return immediately when disabled
64a0082c6 Fix DBSSTest::AddExternalSstFileSkipSnapshot valgrind fail
dd7a748cf Fix java build
4fe12baa6 Make db_bench less space for --stats_per_interval
6525ce4ca Compaction stats printing: "batch" => "commit group"
a117891b4 Fixed typo (#1279)
b248e98cf Fix a destruction order issue in ThreadStatusUpdater
deda159b5 Added min/max/avg data block size output to sst_dump
e408e98c8 add Name() to Cache
a297643f2 Fix valgrind memory leak
d11c09d9e Eliminate memcpy from ForwardIterator
d36755502 Added further Java API options for controlling concurrent writes
ebdfe34cc Exposed further Java API options for controlling compaction
d1be59463 Improve documentation of SliceTransform.
6056d6317 Improve comment and bug fix for GetOptionsFromMap functions in convenience.h
76a67cf74 support stackableDB as the baseDB of transactionDB
67c1ae883 Travis build break fix
b693ba68b Minor PinnedIteratorsManager Refactoring
db3dfb164 Fixes for arcanist config (#1271)
87c91bd87 Persistent Read Cache (8) Benchmark tooling
2914de64e add sim_cache stats to Statistics
8b79422b5 [Proof-Of-Concept] RocksDB Blob Storage with a blob log file.
4beffe001 Fix test data race in two FaultInjectionTest tests
821bcb0b3 util/arena.cc: FreeBSD: More portable use of mmap(MAP_ANON) (#1254)
5370f44a8 Increase RocksDB version
56dd03411 read_options.background_purge_on_iterator_cleanup to cover forward iterator and log file closing too.
ccecf3f4f UniversalCompaction should ignore sorted runs being compacted (when compacting for file num)
1b0069ce2 Remove non-gtest from parallelized tests
638c49f24 Change HISTORY.md for release 4.11
6b8e9c68b fix vs generator (#1269)
c38b075e7 Update HISTORY.md
8f399e3fe Update HISTORY.md
98d0b78ea Added check_snapshot option in the DB's AddFile function (#1261)
9fd68b7fb set travis open file descriptor limit
59ddb5059 Fix travis build break
f4d986364 Added SetOptions support to RocksJava (#1243)
7882cb977 Make DBOptionsTest::EnableAutoCompactionAndTriggerStall less falky
44f5cc57a Add time series database (resubmitted)
7c4615cf1 A utility function to help users migrate DB after options change
5bb0a7f73 Update appveyor.yml
86396cc18 Update appveyor.yml
c1db098dc Update appveyor.yml
7da2eaf0d Update appveyor.yml
34723b4c4 Cleanup unused variable pending_fsync_.
7cc0dbd66 cat all logs in sandcastle output
9253767a6 Correct geHistogramData() -> getHistogramData() (#1257)
f35b16f24 db_bench add an option of --base_background_compactions
c3a4bea5d Fix flaky test `ObsoleteFiles`
8234faabf Fix failed test
4990c0d1a Remove deprecated LEVELDB_PLATFORM_POSIX
7323e4c8a Fix clang on macOS
ee027fc19 Ignore write stall triggers when auto-compaction is disabled
e4609a749 Fix Windows build issues (#1253)
2306167d3 Fix clang build failure and refactor unit test
343304e1d Use StopWatch to do statistic job in db_impl_add_file.cc
cdc4eb689 Add a GetComparator() function to the ColumnFamilyHandle base class so that the user's comparator can be retrieved.
712dd27e6 Build break fixes
0155c73de Fix parallel tests `make check -j`
c49ea68c5 Fix to enable running CI jobs locally
726c2f7e5 Build break fix
d51dc96a7 Experiments on column-aware encodings
c116b4780 Persistent Read Cache (part 6) Block Cache Tier Implementation
64046e581 Write a benchmark to emulate time series data
9ae92f50b More granular steps in the Makefile, can help with running all or single Java tests (and with ASAN build - https://github.com/facebook/rocksdb/wiki/JNI-Debugging) (#1237)
7c01d6534 [Fix Java] Remove duplicate cases in LoggerJniCallback::Logv
8796934af Added missing Java ReadOptions settings (#1109)
5e2c79658 Make DBTest.CompressionStatsTest more deterministic
557748ff7 Fix db_stress failure (pass merge_operator even if not used)
811ee2111 Bugfix to ensure that logging can be achieved from threads that are not known to the JVM (#1106)
afad5bd1c Simplify thread-local static initialization
6920cde89 Remove an extra apostrophe
e72ea485e add InDomain regression test
9c8ac144b Avoid duplicate task creation for RocksDB contruns
d4c45428a db_stress shouldn't assert file size 0 if file creation fails
d3bfd3397 Testing out parallel sandcastle changes
7efd9c25c Increse timeout in some tests
50b8d29b9 fixes 1230: Error:string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command (#1231)
5c858ddd2 fix errata in libnuma test (#1244)
e5b5f12b8 Change options memtable_prefix_bloom_huge_page_tlb_size => memtable_huge_page_size and cover huge page to memtable too
0ce258f9b Compaction picker to expand output level files for keys cross files' boundary too.
ac0d93b08 fixes 1217: rocksdbjni javac and javah execute_processes fail on windows (#1218)
1ae46094d Appveyor badge to show master branch
8745f013f [Fix java build] Stop using non standard std::make_unique
e12270dfe fix previous typo
bbd6a5a18 ldb restore subcommand
9498069fc Run error-filtering script on diff-triggered tests
f8061a237 Fix Statistics TickersNameMap miss match with Tickers enum
16e225f70 Fix MergeContext::copied_operands_ strings moving
a4955b39a Run sandcastle tests in /dev/shm
ae0ad719d Fix flaky DBSSTTEST::DeleteObsoleteFilesPendingOutputs
b2a8016df Update db_bench_tool.cc (#1239)
c6654588b Disable two dynamic options tests under lite build
2a6d0cde7 Ignore stale logs while restarting DBs
ee8bf2e41 fixes 1228: rockdbjni loadLibraryFromJarToTemp fails when file is already present (#1232)
f85df120f Re-enable tsan crash white-box test with reduced killing odds
89e4c4882 Update README.md to include appveyor badge
b06ca5f86 ldb load, prefer ifsteam(/dev/stdin) to std::cin (#1207)
4ea0ab3cc Revert "Remove bashism from `make check` (#1225)"
12767b313 fixes 1220: rocksjni build fails on Windows due to variable-size array declaration (#1223)
a9d512a76 Update .gitignore for internal release
d5a51d4de Need to make sure log file synced before flushing memtable of one column family
89f319c2d Fix unit test which breaks lite build
b50632920 Add unit test not on /dev/shm as part of the pre-commit tests
b9a97181a Bump next release version
663afef88 Add EnvLibrados - RocksDB Env of RADOS (#1222)
32604e660 Fix flush not being commit while writing manifest
9ab38c45a Remove %z Format Specifier and Fix Windows Build of sim_cache.cc (#1224)
08ab1d83a Remove bashism from `make check` (#1225)
f9b14be49 Re-enable TSAN crash test but only with black box crash test
68f3eb746 Run release build for CLANG and GCC 4.8.1 in pre-commit tests too
e70020e4f Only cache level 0 indexes and filter when opening table reader
7bedd9440 Build break fix
68a8e6b8f Introduce FullMergeV2 (eliminate memcpy from merge operators)
e70ba4e40 MemTable::PostProcess() can skip updating num_deletes if the delta is 0
2a282e5f5 DBTablePropertiesTest.GetPropertiesOfTablesInRange: Fix Flaky
d9cfaa2b1 Persistent Read Cache (6) Persistent cache tier implentation - File layout
9430333f8 New Statistics to track Compression/Decompression (#1197)
515b11ffa fixes #1210: rocksdb/java/CMakeLists.txt lacks cmake_minimum_required (#1214)
876cb8bfb fixes #1212: rocksdbjni maven build does not escape slashes in groovy script (#1213)
21c55bdb6 DBTest.DynamicLevelCompressionPerLevel: Tune Threshold
4b9525358 Refactor cache.cc
c6a8665b3 Update LANGUAGE-BINDINGS.md
880ee363e ldb backup support
6797e6ffa Avoid updating memtable allocated bytes if write_buffer_size is not set
dda6c72ac Add DestroyColumnFamilyHandle(ColumnFamilyHandle**) to db.h
56222f57d Avoid FileMetaData copy
15b7a4ab8 Fixed output size and removed unneeded loop
6ea41f852 Fix deadlock when trying update options when write stalls
efd013d6d Miscellaneous performance improvements
e6f68faf9 Update Makefile to fix dependency
816ae098e fix test failure
e295da126 Fix Log() doc for default level
8e6b38d89 update DB::AddFile to ingest list of sst files
296545a2c Fix clang analyzer errors
61dbfbb6c Add release build to RocksDB per-diff/post-commit tests
907f24d0e Concurrent memtable inserter to update counters and flush state after all inserts
0f691c4b5 CLI option & Rename() allow overwrite
7c190070b delete unnessary pointer cast in beginInternalTransaction() function
e1b3ee8a7 Cleanup auto-roll logger flush-while-rolling test
cd4178a01 Add a new feature to enforce a sync point only active on a thread
b954847fc Fix release build for MyRocks by using debug-only code only in debug builds
a00bf1b3c Add More Logging to track total_log_size
01f77cb19 Update USER.md to include more services at Facebook.
eb53c05a3 Add comment for GetBackupInfo about returned BackupInfos order
32df9733d Add options.write_buffer_manager: control total memtable size across DB instances
5aaef91d4 group multiple batch of flush into one manifest file (one call to LogAndApply)
a45ee8318 Fix a bug that accesses invalid address in iterator cleanup function
38fae9e65 fix typos in HISTORY.md (#1192)
1a11c934d Disable some persistent cache tests on linux/clang
9b5adea97 Add More Logging to track total_log_size
95d96eeeb remove LockFile
ff45d1b54 if read only backup engine can't find meta dirs, return NotFound() instead of IOError()
cb2476a0c fix rate limiter to avoid starvation
6b7167651 Run env_basic_test on Env::Default
9eb0b5395 Move env_basic_test cleanup to TearDown
1fe3bf829 Re-enable linux on travis
43692793e Fixed Minor Bug on Windows Build and db_bench_tool.cc (#1189)
95c192475 writable file close before reset
197b832af Update USERS.md
bdb1d19a6 Fix UBSan build break caused by variable not initialized
b726bf596 FreeBSD does not have std::to_string (#1190)
faa7eb3b9 Improve regression_test.sh
c4cef07f1 Update DBTestUniversalCompaction.UniversalCompactionSingleSortedRun to use max_size_amplification_percent = 0
892e9d304 make transaction WriteOptions modifiable
4f2b0946d fix simple typos (#1183)
3b7ed677d ColumnFamilyOptions API [CF + RepairDB part 3/3]
56ac68629 Detect column family from properties [CF + RepairDB part 2/3]
3fc713ed9 delete 2nd level children for default env
343507afb Refactor to use VersionSet [CF + RepairDB part 1/3]
aa432be4b Workarounds for continuous build implementation
8cd9f04fe Test change to verify new commit detection
8a4ee7e90 Trivial change to test cont. build
af6248d8b Fix max_bytes_for_level_base comment
0d7b26123 add tests to env_basic_test.cc
6576fa05a Fix minor typos and PHP source file name used to trigger the builds
c4e19b77e Add a read option to enable background purge when cleaning up iterators
fa813f747 Update DB::AddFile() to ingest the file to the lowest possible level
d6b79e2fd Remove filter_deletes from crash_test
a52e4d7d0 Framework for enabling continuous RocksDB build and tests
f9bd66779 Makefile warning for invalid paths in make_config.mk
88a2776db Update SstFileWriter to use bottommost_compression if avaliable
e87d5df1a TiKV use-case (#1172)
7b79238b6 Deprectate filter_deletes
4939fc389 Bulk load mode shouldn't stop ingest
3a2bccc84 Fixed a crash bug that incorrectly parse deprecated options in options_helper
cf8adc971 Allow arcanist_util to work with both new and old arc versions
30a24f2d3 Add InternalStats and logging for AddFile()
d26a84807 Temporarily disable travis on linux
249e796df Fix Flaky DBCompactionTest.SkipStatsUpdateTest
162c9170d Make sandcastle access secure
8366e10ff Fix clang build
0babce57f Move away from enum char value -1
812dbfb48 Optimize BlockIter::Prev() by caching decoded entries
550bf895e Minor bug fix with log name
886af5910 Fix examples/Makefile jemalloc error
e3b1e3dfa Expose save points in Java WriteBatch and WBWI (#1092)
f5177c761 Remove wasteful instrumentation in FullMerge (stacked on D59577)
97fd2a638 Remove dead Jenkins code and support `arc diff --preview` in RocksDB
7c919decc Reuse TimedFullMerge instead of FullMerge + instrumentation
9a33a723b Remove the comments saying allow_concurrent_memtable_write and enable_write_thread_adaptive_yield are not stable
81f6b33d9 Fix tsan error
bc8af90e8 add option to not flush memtable on open()
8100ec2cd Fix libgcc broken lib path
7360db39e Add a check mode to verify compressed block can be decompressed back
2a79af1c5 Fix Java Break Related to memtable bloom bits to size ratio change
6faddd7c5 Merge db/slice.cc into util/slice.cc
5009b5326 BlockBasedTable::FullFilterKeyMayMatch() Should skip prefix bloom if full key bloom exists
2d05eaeb2 Fix name conflict in delete_shceduler_test and db_sst_test
bde7d1055 Fix clang_analyze path in fbcode_config.sh
ca3db5478 Fetch branches from github for format compatibility test
20699df84 memtable_prefix_bloom_bits -> memtable_prefix_bloom_bits_ratio and deprecate memtable_prefix_bloom_probes
e9c1face6 Minor fix to precommit-check.py
fcc47fa5f New features to precommit check script
56887f6cb Backup Options
a683d4aba URI-based Env selection for db_bench
53a4bd8a6 duplicate line
3e8686961 release 4.9 update version and history
b2973eaae Remove options builder
5b197bff4 Enabled Windows build for volatile tier implementation
281fbdddc Temporarily remove PersistentCacheOptions from persistent_cache_tier.h to fix unity build
2ae15b2d5 Format compatible test should cover forward compatibility up to 4.8.
00a058725 netflix use-case
5091dfc1e use branch names in format compatibility test
edc764e91 Use valgrind built with gcc-4.9-glibc-2.20
8ff59b2b4 Disable PersistentCacheTierTest.VolatileCacheInsertWithEviction test under TSAN temporarily
1ba452226 Fix for GCC 5.4 (#1157)
972c895c3 Previously WARN level logging became FATAL level logging in the Java API (#1089)
a73b26f60 Adding test for contiguous WAL detection
098da8348 Fix CLANG build break caused by the recent Persistent Cache change
54db29b8f Use gvfs links in dependencies.sh
d755c62f9 Persistent Read Cache (5) Volatile cache tier implementation
fda098461 Allow regression_test.sh to specify OPTIONS_FILE.  Add header comments.
0fee89684 Fix Windows build
10d46b9c8 Update tp2 clang path to fix clang build
774a6aa29 Java API - Rename geHistogramData -> getHistogramData (#1107)
3070ed902 Persistent Read Cache (4) Interface definitions
e42dc9192 Update paths for fbcode dependencies
5647fa427 stack_trace,cc: The current Stacktrace code does not compile for FreeBSD (#1153)
0d65acec0 threadpool.cc: abort() lives in stdlib.h on FreeBSD (#1155)
19dd5a61c env_chroot.cc: FreeBSD likes stdlib.h for realpaht() and friends (#1154)
5aca977be env_basic_test library for testing new Envs [pluggable Env part 3]
1147e5b05 Adding support for sharing throttler between multiple backup and restores
6e6622abb Create env_basic_test [pluggable Env part 2]
e53287794 Add statistics field to show total size of index and filter blocks in block cache
a791a2cf2 Java API - Bugfix for native linking of Compaction Filter (#1099)
af0c9ac01 Env registry for URI-based Env selection [pluggable Env part 1]
02ec8154e allow updating block cache capacity from C (#1149)
630b732cb fix flaky sim_cache_test
62d548098 Add persistent cache to Windows build system
842958651 Fix race condition in SwitchMemtable
88acd932f Allows db_bench to take an options file
3a276b0cb Add a callback for when memtable is moved to immutable (#1137)
8cf0f86d3 Allow regression test to run db_bench at a remost host
27ad17071 Fix Windows build break
936973d14 Small tweaks to logging to track the number of immutable memtables
21c047ab4 add readahead size option (#1146)
71c7eed91 Assert boundary checks for SetPerfLevel()
5d85fdb2c add missing lock
c40c4cae1 LDBCommand::SelectCommand to use a struct as the parameter
590e2617e fix delete file bug when do checkpoint (#1138)
8dfa980cb Add statically-linked library for tools/benchmarks
f62fbd2c8 Handle overflow case of rate limiter's paramters
57461fba8 In-memory environment read beyond EOF
0e2000017 LDBCommand::InitFromCmdLineArgs() to move from template to function wrapper
472c06e90 Add low and upper bound values for rocksdb::PerfLevel enum
157e0633e MutexLock -> ThreadPoolMutexLock in util/threadpool.cc
23d4cf483 include/rocksdb/sst_file_writer.h should not depend on util/mutable_cf_options.h
345fd73fa Fix flaky DBTestDynamicLevel.DynamicLevelMaxBytesBase2
8fc75de32 Minor fix to disable DynamicLevelMaxBytesBase2
9dd50d990 Fix db_bench
5d660258e add simulator Cache as class SimCache/SimLRUCache(with test)
d379d110e Update CMakeLists.txt for added test
21f847eda Direct IO fix for Mac
99765ed85 Clean up the ComputeCompactionScore() API
def2f7bd0 Expose report_bg_io_stats option in the C API. (#1131)
f89caa127 Direct IO capability for RocksDB
8f1214531 C API: Expose DeleteFileInRange (#1132)
11f329bd4 db/db_impl: restrict WALRecoveryMode when using recycled log files
2b2a898e0 db/log_reader: combine kBadRecord{Len,Checksum} for readability
34df1c94d db/log_reader: treat bad record length or checksum as EOF
7947aba68 db/log_reader: move kBadRecord{Len,Checksum} handling into ReadRecord
847e471db db/log_test: add recycle log test
4e7e41ba7 Disable lite build/testing for persistent read cache
1d725ca51 Deprecate BlockBasedTableOptions.hash_index_allow_collision=false.
0e77246ba backupable_db.cc: lambada to explictly caputre "this" when escaping scope
2073cf377 Eliminate use of 'using namespace std'.  Also remove a number of ADL references to std functions.
26adaad43 Split WinEnv into separate classes. (#1128)
bb98ca3c8 Implement GetUniqueId for Mac
1f2dca0ea Add MaxOperator to utilities/merge_operators/
f6e404c20 Added "number of merge operands" to statistics in ssts.
7383b64b3 Fix formatting of HISTORY.md (#1126)
0e665c399 Disable long running GroupCommitTest (#1125)
3c69f77c6 Move IO failure test to separate file
533cda90c Add GetStringFromCompressionType to include/rocksdb/convenience.h
c70a9335d Fix mutex unlock issue between scheduled compaction and ReleaseCompactionFiles()
05c5c39a7 Fix build
a6254f2bd Long outstanding prepare test
2ead11511 Fix TransactionTest.TwoPhaseMultiThreadTest under TSAN
1f0142ce1 Persistent Read Cache (Part 2) Data structure for building persistent read cache index
43afd72be [rocksdb] make more options dynamic
bac3be7c4 Fix build issue. (#1123)
f6aedb62c Fix Transaction memory leak
a08c8c851 Added PersistentCache abstraction
5c06e0814 [ldb] Templatize the Selector
aab91b8d8 Use generic threadpool for Windows environment (#1120)
a40033639 TransactionLogIterator sequence gap fix
fa3536d20 Store SST file compression algorithm as a TableProperty
40123b380 signed vs unsigned comparison fix
49815e384 [ldb] Export LDBCommandRunner
c1af07ce8 Disable backupable_db_test.cc on Windows
e61ba052b Isolate db env and backup Env in unit tests
560358dc9 Fix data race in GetObsoleteFiles()
5c1c90487 ldb option for compression dictionary size
c27061dae [rocksdb] 2PC double recovery bug fix
a657ee9a9 [rocksdb] Recovery path sequence miscount fix
8a66c85e9 [rocksdb] Two Phase Transaction
1b8a2e8fd [rocksdb] Memtable Log Referencing and Prepared Batch Recovery
0460e9dcc Modification of WriteBatch to support two phase commit
f548da33e Follow symlinks in chroot directory
d86f9b9c3 Fix lite build
4b3172343 Add bottommost_compression option
bfb6b1b8a Estimate pending compaction bytes more accurately
258459ed5 Properly destroy ChrootEnv in env_test
fca5aa6fc Initial script for the new regression test
e1951b6f2 Add --index_block_restart_interval option in db_bench
730f7e2e2 Fix win build
a9b3c47c8 Fix includes for clang on OS X
3f16a836a Introduce chroot Env
269f6b2e2 Revert "Modification of WriteBatch to support two phase commit"
04dec2a35 [ldb] Export ldb_cmd*.h
72c73cdc8 Java API - Add missing HEADER_LEVEL logging (#1104)
4d02bfa3a Add support for PauseBackgroundWork and ContinueBackgroundWork to the Java API (#1087)
8f65feafc Have sandcastle run lite_test for every diff
0d590d999 Make max_dict_bytes optional in options string
7ccb8d6ef BlockBasedTable::Get() not to use prefix bloom if read_options.total_order_seek = true
e3c6ba37d OptimizeForSmallDb(): revert some options whose defaults were just changed
967476eae Fix valgrind (DBIteratorTest.ReadAhead)
9790b94c9 Add optimize_filters_for_hits option to db_bench
a4ea345b0 Fixing lite build
24a24f013 Enable configurable readahead for iterators
ff4b3fb5b Fix Iterator::Prev memory pinning bug
cba752d58 sst_dump won't print size for unsupported compression type
6e801b0bd Eliminate memcpy in Iterator::Prev() by pinning blocks for keys spanning multiple blocks
1b166928c Release RocksDB 4.8.0
b8cf9130f Fix #1110, 32-bit build failure on Mac OSX (#1112)
21441c09b Fix calling GetCurrentMutableCFOptions in CompactionJob::ProcessKeyValueCompaction()
4ea6e051e Fix multiple issues with WinMmapFile fo sequential writing (#1108)
f3bb024fd Fix clang build
6e56a114b Modification of WriteBatch to support two phase commit
1d2e4ef74 ldb support new WAL records
a92049e3e Added EventListener::OnTableFileCreationStarted() callback
e8115cea4 Revert "Use async file handle for better parallelism (#1049)" (#1105)
6a14f7a97 Change several option defaults
c6c770a1a Use prefix_same_as_start to avoid iteration in FindNextUserEntryInternal. (#1102)
992a8f83b Not enable jemalloc status printing if USE_CLANG=1
029022b0f Fix crash_test
a06faa632 Skip PresetCompressionDict test for lite
e7899c661 Fix build issue. (#1103)
0f428c561 Fix compression dictionary clang osx error
6d4832a99 Merge pull request #1101 from flyd1005/wip-fix-typo
af70f9ac6 Fix typo in build_tools/fbcode_config.sh
54de13aba Fix compression dictionary clang errors
0850bc514 Fix build on machines without jemalloc
4032145ad Configurable compression in db_bench
843d2e313 Shared dictionary compression using reference block
ad573b902 Temporarily disable CompactFiles in db_stress in its default setting
1c80dfab2 Print memory allocation counters
eb7398085 Fix BackupableDBTest
ac0e54b4c CompactedDB should not be used if there is outstanding WAL files
d719b095d Introduce PinnedIteratorsManager (Reduce PinData() overhead / Refactor PinData)
1995e34d6 Retrieve file size from proper Env
7c14abf2c Improve BytewiseComparatorImpl::FindShortestSeparator
f3eb0b5b8 Make EventListenerTest.CompactionReasonLevel more deterministic
7b78d623f Shouldn't report default column family's compaction stats as DB compaction stats
995353e46 Fix null-pointer-dereference detected by Infer (https://github.com/facebook/infer)
24110ce90 Correct Statistics FLUSH_WRITE_BYTES
b71c4e613 Alpine Linux Build (#990)
90ffed1f9 Update USERS.md with link to LinkedIn blog post (#1088)
99a3bf8f6 Merge pull request #1068 from daaku/c-purge-old-backups
b54c34742 Use async file handle for better parallelism (#1049)
c146c9be1 rocksdb_create_mem_env to allow C libraries to create mem env (#1066)
6da70c581 expose more options in the c api (#1067)
6f01687aa C rocksdb_create_iterators to expose NewIterators (#1069)
644f978c1 Fix RocksDB Lite build in db_stress
5bd4022fe Add comparator, merge operator, property collectors to SST file properties (again)
7a6045a3c fix typo in HISTORY.md
73a847ef8 Add per-level compression ratio property
ee221d2de Introduce XPRESS compresssion on Windows. (#1081)
874c96ac1 Merge pull request #1083 from flabby/master
6cbffd50d Enable testing CompactFiles in db_stress
b95510ddf Fix DBTest.RateLimitedDelete flakiness
6356b4d51 Fix nullptr dereference in adaptive_table
9385fd72c Delete deprecated backup classes in Java
a2466c885 [db_stress] Make subcompaction random in crash_test
c3c389d54 Fix column label for L0 write sum
ec84bef24 New legocastle output parsing
725184b04 Fix db_block_cache_test in lite build
290883d94 Fix lite build
23089fd28 write_callback_test: clean test directory before running tests
792762c42 Split db_test.cc
40b840f29 Delete deprecated *BackupableDB interface for backups
6affd45d8 Make more tests run in parallel
47833e0ab Merge branch 'master' of github.com:facebook/rocksdb
e5c614e1d Fixing snapshot 0 assertion
1b1adebe8 Fixing snapshot 0 assertion
6d436a3f8 DBTest.HardLimit made more deterministic
994d9bc82 Make parallel valgrind watch-log more readable
9d35ae649 Make DBTestUniversalCompaction.IncreaseUniversalCompactionNumLevels more deterministic
cea8ed970 Fix backupable_db_test test cases that can't run by itself
4b6833aec Rename options.compaction_measure_io_stats to options.report_bg_io_stats and include flush too.
3894603fe Allow valgrind_check to run in parallel
c9d668c58 Fix unit tests issues on Windows (#1078)
083cadc7e Minor fix to Java sandcastle job definition
80b74a6c6 Include ldb tool in the windows build (#914)
7c14d11eb Minor fix to java build job
535af525d BlockBasedTable::PrefixMayMatch() to skip index checking if we can't find a filter block.
09be5cad5 Minor fix to sandcastle java job definition
1aeca9733 Release RocksDB 4.7
dfc3de8b7 Split Travis unittests Job
c2c8fe47f Add Java job for sandcastle
19ef3de57 Fix ManualCompactionPartial test flakiness
b345b3662 Add a minimum value for the refill bytes per period value
dff4c48ed BlockBasedTable::PrefixMayMatch: no need to find data block after full bloom checking
0353b853c Propagate sandcastle run error to UI
b885f33a5 Parallelize travis jobs
71303e04e Update db_bench_tool.cc (#1073)
63cf15bb9 Fix option settable tests
e208575b2 using java7 in runtime for hdfs env (#1072)
13e6c8e97 Relax an assertion in Compaction::ShouldStopBefore
ae21d71e9 Fixed a bug in RocksDB Statistics where flush is considered as compaction
8e0e22f76 Fix Windows build by replacing strings.h include
5675d5037 Revert travis commit
91f0f1f5e fix travis
a23c6052c Don't run DBOptionsAllFieldsSettable under valgrind
30d72ee43 PrefixTest.PrefixAndWholeKeyTest should run against a different directory from prefix_test
0e3cc2cf1 Add column family info to TableProperties::ToString()
2448f8037 Make sure that if use_mmap_reads is on use_os_buffer is also on
114a1b879 Fix build errors for windows
052299035 Improve sst_dump help message
0930e5e99 Update comments on include/rocksdb/perf_context.h
3b977bcdc instructing people to use java7 for hdfs (#1063)
1518b733e Change default number of cache shard bit to be 6 and max_file_opening_threads to be 16.
ada88b63f fix wrong assignment of level0_stop_writes_trigger in spatialdb (#1061)
2391ef721 Embed column family name in SST file
ab4c62332 Don't use version in the error message
d02eb8d00 Fix unused variable warning
9278097f8 Merge pull request #1056 from facebook/igorcanadi-patch-1
cc87075d6 No need to limit to 20 files in UpdateAccumulatedStats() if options.max_open_files=-1
8a1a603fd Eliminate std::deque initialization while iterating over merge operands
f38540b12 WriteBatchWithIndex micro optimization
200654067 Merge pull request #1053 from adamretter/benchmark-java-comparator
f2c43a4a2 Stderr info logger
b55e2165b Rocksdb backup can store optional application specific metadata
9b5198752 Adding pin_l0_filter_and_index_blocks_in_cache feature and related fixes.
2feafa3db Change some RocksDB default options
a558830f8 Fixed compile warnings in posix_logger.h and coding.h
51c9464df Merge pull request #980 from adamretter/java-arm
925b5d002 Merge pull request #1054 from DCEngines/magic12
63e8f1b55 Formatted lines to adhere to 80 char limit
994b3bd69 Add support for UBsan builds to RocksDB
21700a510 to/from hex refactor
24420947d Replace kHeader by WriteBatchInternal::kHeader in few more places kHeader was moved from write_batch.cc to header file because it is being used wherever the number "12" was being used to check for record size
3bdbe8961 Merge branch 'magic12' of https://github.com/dcengines/rocksdb into magic12
78711524b In all the places where log records are read, there was a check that record.size() should not be less than 12.
e7c64fb11 Imporve sst_file_manager comment
99ffb3d53 Fix perf_context::merge_operator_time_nanos calculation
07bb12d97 Update internal jemalloc and other versions
ad2fdaa82 Correct a typo in a comment
be9816b3d Fix data race issue when sub-compaction is used in CompactionJob
e3802531f Merge pull request #1050 from yuslepukhin/support_db_test2
e7cc49cbd Add support for db_test2 for dev and CI runs
3996770d0 Add comments to perf_context skip counters
4e85b7479 Make WritableFileWrapper not screw up preallocation
ec458dcde Merge pull request #1047 from PraveenSinghRao/wal_filter_ex
583157f71 Avoid overloaded virtual function
b9d4fa890 Options settable tests to use a different special charactor
60e34baef Merge pull request #1044 from PraveenSinghRao/wal_filter_ex
136b8e0ca Merge from master
2dcbb3b4f Addressed review comments
b1fafcaca Revert "Adding pin_l0_filter_and_index_blocks_in_cache feature."
5f8741a69 Revert "Fix failing Java unit test."
43bbb5619 tools/check_format_compatible.sh to use consistent version when testing backward and forward compatibility
d7ae42b0f Fix failing Java unit test.
fbbb8a614 Add test for Snapshot 0
e182f03c1 Add unit tests for RepairDB
7d371863e travis build fixes
fbea4dc66 Merge pull request #1042 from SherlockNoMad/HistFix
780d2b04c Update format compatible checking tool
4f1c74a46 merge from master
f8c218930 Publish log numbers for column family to wal_filter, and provide log number in the record callback
44756260a Reset block cache in failing unit test.
522de4f59 Adding pin_l0_filter_and_index_blocks_in_cache feature.
be2227126 Merge pull request #1041 from yuslepukhin/adjust_for_jemalloc
4ecc03c03 Fix in HistogramWindowingImpl
2ca0994cf Latest versions of Jemalloc library do not require je_init()/je_unint()   calls. #ifdef in the source code and make this a default build option.
90aff0c44 Update --max_write_buffer_number for compaction benchmarks
72224104d Forge current file for checkpoint
33d568611 Merge pull request #1040 from bureau14/master
02e62ebbc Fixes warnings and ensure correct int behavior on 32-bit platforms.
9cad56861 Merge pull request #1039 from bureau14/master
3d29f9146 Improve documentation of the allow_os_buffer parameter.
3ff98bd20 Fix no compression test
b9cc42a72 Merge pull request #1038 from SherlockNoMad/HistFix
f76b260ef Fix FB internal CI build failure
774922c68 Merge pull request #1026 from SherlockNoMad/Hist
17b879b91 Merge pull request #1037 from SherlockNoMad/BuildFix
f11b0df12 Fix AppVeyor build error
6b03f93d4 Fix the build break on Ubuntu 15.10 when gcc 5.2.1 is used
697fab820 Updates to RocksDB subcompaction benchmarking script
58379bfb5 remove division from histogramwidowing impl
1a2cc27e0 ColumnFamilyOptions SanitizeOptions is buggy on 32-bit platforms.
e778c34e7 Merge pull request #1035 from bureau14/master
5bd3da1c5 Added quasardb to the USERS.md file
b2ae5950b Index Reader should not be reused after DB restart
0267655da Update change log for 4.6 release
08304c086 Expose RepairDB as ldb command
fd664a27b Fix Build Error
580fede34 Aggregate hot Iterator counters in LocalStatistics (DBIter::Next perf regression)
54f6b9e16 Histogram Concurrency Improvement and Time-Windowing Support
790252805 Add multithreaded transaction test
e8e6cf017 fix: handle_fatal_signal (sig=6) in std::vector<std::string, std::allocator<std::string> >::_M_range_check | c++/4.8.2/bits/stl_vector.h:794 #174
d9620239d Cleanup stale manifests outside of full purge
f71fc77b7 Cache to have an option to fail Cache::Insert() when full
ee8cc3520 Merge pull request #938 from alexander-fenster/master
765597fa7 Update compaction score right after CompactFiles forms a compaction
f0161c37b formatting fix
aa3f02d50 Improve comment in compaction.h and compaction_picker.h
2200295ee optimistic transactions support for reinitialization
badd6b784 Ignore db_test2
200080ed7 Improve snapshot handling for Transaction reinitialization
171c8e80b Update dependencies / Fix Clang
294bdf9ee Change Property name from "rocksdb.current_version_number" to "rocksdb.current-super-version-number"
bf1c4089d Use pure if-then check instead of assert in EraseColumnFamilyInfo
a7d4eb2f3 Fix a bug where flush does not happen when a manual compaction is running
68189f7e1 Update benchmarks used to measure subcompaction performance
dfe96c72c Fix WriteLevel0TableForRecovery file delete protection
451678c8c Merge pull request #1025 from SherlockNoMad/BuildFix
58ecd9132 Fix Windows build
501927ffc [backupable db] Remove file size embedded in name workaround
ef204df7e Compaction always needs to be removed from level0_compactions_in_progress_ for universal compaction
e79ad9e18 Add Iterator Property rocksdb.iterator.version_number
19ea40f8b Subcompaction boundary keys should not terminate after an empty level
deb08b822 Add parsing of missing DB options
f8e90e875 Get file attributes in bulk for VerifyBackup and CreateNewBackup
12fd9b186 Change BlockBasedTableOptions.format_version default to 2
4572a2d8c Update current version to 4.6
74b660702 Rename iterator property "rocksdb.iterator.is.key.pinned" => "rocksdb.iterator.is-key-pinned"
6743135ea Fix DB::AddFile() issue when PurgeObsoleteFiles() is called
432f3adf2 Add DB Property "rocksdb.current_version_number"
188bb2e7a Fix formatting identified by `arc lint`
0f2d2fcff Refactored tests to use try-with-resources
f8e02c782 Deprecate org.rocksdb.AbstractNativeReference#dispose() and implement java.lang.AutoCloseable
0f2fdfe23 Fix the javadoc and the formatting of the base-classes for objects with native references
b5b1db167 Recompute compaction score after scheduling manual compaction
5ea9aa3c1 TransactionDB:ReinitializeTransaction
1f5954147 Introduce Iterator::GetProperty() and replace Iterator::IsKeyPinned()
67789419f Merge pull request #1020 from gongsu832/master
69c471bd9 Handle concurrent manifest update and backup creation
3373c81fa Modify build_tools/build_detect_platform to detect and set -march=z10 on Linux s390x.
990509045 Merge branch 'master' of https://github.com/gongsu832/rocksdb
3492889ab Merge pull request #1019 from javacruft/wip-omit-leaf-frame-pointer-archs
7ca731b12 build: Improve -momit-leaf-frame-pointer usage
21f17aaa6 Modified Makefile and build_tools/build_detect_platform to compile on Linux s390x.
8800975fb Make DBTestUniversalCompaction.IncreaseUniversalCompactionNumLevels more robust
cd3fe675a Remove stale TODO
69c98f043 Reorder instance variables in backup test for proper destruction order
82f15fb15 Add test to make sure DropColumnFamily doesn't impact existing iterators
38201b359 Fix assert failure when DBImpl::SyncWAL() conflicts with log rolling
2568985ab IOStatsContext::ToString() add option to exclude zero counters
b04691665 Redo SyncPoints for flush while rolling test
291ae4c20 Revert "Revert "Fixed the bug when both whole_key_filtering and prefix_extractor are set.""
eef63ef80 Fixed CompactFiles() spuriously failing or corrupting DB
79ca039eb Relax the check condition of prefix_extractor in CheckOptionsCompatibility
4b1b4b8ae Merge pull request #1004 from yuslepukhin/child_attr
9ea2968d2 Implement ConsistentChildrenAttribute   by using default implementation for now as it works.
c7f1a8a46 Fix LITE build thread_local_test
0914f0ca5 Merge pull request #1003 from yuslepukhin/fix_mutexlock_pthread_build
d37d348da This addresses build issues on Windows  https://github.com/facebook/rocksdb/issues/1002
d825fc70d Use condition variable in log roller test
6b2a047df Fix SstFileManager uninitialized data member
a3db93c26 Remove the SyncPoint usage in the destructor of PosixEnv
df9ba6df6 Introduce SstFileManager::SetMaxAllowedSpaceUsage() to cap disk space usage
3943d1678 Fix race conditions in auto-rolling logger
d733dd572 [build] Fix env_win.cc compiler errors
cf38e56f2 Fix broken appveyor build caused by D53991
351252b49 Merge pull request #998 from fengjian0106/master
133605249 fix ios build error
d08d50295 Fix transaction locking
730a422c3 Improve the documentation of LoadLatestOptions
a7b6f0748 Improve write_with_callback_test to sync WAL
5bcf952a8 Fix WriteImpl empty batch hanging issue
871cc5f98 fix build without gflags
c90d63a23 can_unlock set but not used
44371501f Fixed a segfault when compaction fails
2f084d39b Merge pull request #992 from jofusa/jdennison/options-typo-fix
7bd284c37 Separeate main from bench functionality to allow cusomizations
bd5f842bb fixes typo in options logging
1c868d684 Fix includes for env_test
545a19395 Add J to commit_prereq so comilation/execution happens in parallel
5bb7371ca [build] Evaluate test names only when db_test exists
6a2b4fcb8 Add flag to forcibly disable fallocate
92a9ccf1a Add a new compaction priority that picks file whose overlapping ratio is smallest
3dc3d1c14 Merge pull request #984 from petermattis/pmattis/comparator-iterate-upper-bound
239aaf2fc Use user_comparator when comparing against iterate_upper_bound.
908100399 Fixed a dependency issue of ThreadLocalPtr
337671b68 Add universal compaction benchmarks to run_flash_bench.sh
3a67bffaa Fix an ASAN error in transaction_test.cc
c5af85eca Fix a memory leak of Slice objects from org.rocksdb.WBWIRocksIterator#entry1
e84137c8a Remove unnessecary java.util.List expense in JNI
76e8beeeb Pass by pointer from/to Java from JNI not by object
0e7e6f6e4 Improve Javadoc
18eb56305 Improve the speed and synchronization around the construction of Java/JNI objects
2a04268be Temporarily disable unstable tests in memory_test.cc
08a78b6b4 Merge pull request #979 from facebook/update_licenses
21e95811d Updated all copyright headers to the new format.
59b3ee658 Env function for bulk metadata retrieval
4a8cbf4e3 Allows Get and MultiGet to read directly from SST files.
fe93bf9b5 Transaction::UndoGetForUpdate
2608219cc crash_test: cover concurrent memtable insert in default crash test
a76e9093f Fix LITE db_test build broken by previous commit
b1887c5dd Explictly fail when memtable doesn't support concurrent insert
8ed343877 Add option to run fillseq with WAL enabled in addition to WAL disabled
73a9b0f4b Update version to 4.5
6f71d3b68 Improve perf of Pessimistic Transaction expirations (and optimistic transactions)
8e6172bc5 Add BlockBasedTableOptions::index_block_restart_interval
34a40bf91 Add --allow_concurrent_memtable_write in stress test and run it in crash_test
73bf330c7 Merge pull request #973 from yuslepukhin/moveout_testcode
f7c0f4e3e perf_context.cc and iostats_context.cc use different output macro (fix unity build)
9656eab00 This partially addresses issue https://github.com/facebook/rocksdb/issues/935   testutil.cc and testharness.cc could not be moved out at this time   as they are used by 4 benchmarks in release builds.
14a322033 Remove references to files deleted in commit abb405227848581d3e6d2ba40d94dbc0a5513902
8445e5380 Add a mechanism to run all tests in sandcastle
461cec4e8 Merge pull request #972 from adamretter/wb-threads
9ab269ab3 Threaded tests for WriteBatch
bf767c641 Minor fix to makefile
2c1db5ea5 always invalidate sequential-insertion cache for concurrent skiplist adds
c12ff20ab Merge pull request #965 from koldat/jni_for_windows
a09ce4fcd Skip some of the non-critical tests in ./tools/run_flash_bench.sh
284aa613a Eliminate duplicated property constants
94be872ea Merge branch 'master' of github.com:facebook/rocksdb
0c2bd5cb4 Removing data race from expirable transactions
5fcd1ba30 disable kConcurrentSkipList multithreaded test
466c2c1bf Generate tags for *.c files
70c068c97 Merge pull request #960 from koldat/masterFixes2
a62c519bb RollLogFile tries to find non conflicting file until there is no conflict.
57a95a700 Making use of GetSystemTimePreciseAsFileTime dynamic - code review fixes
502d41f15 Making use of GetSystemTimePreciseAsFileTime dynamic to not break compatibility with Windows 7. The issue with rotated logs was fixed other way.
52153930d Adding support for Windows JNI build - fix Java unit test for release build of JNI DLL
e2972803a Adding support for Windows JNI build
9c2cf9479 Fix for --allow_concurrent_memtable_write with batching
ac3fa9a6f Travis CI to disable ROCKSDB_LITE tests
7b943da1b Merge pull request #967 from SherlockNoMad/ValueSize
b5750790e Merge pull request #968 from yuslepukhin/one_shot_buffer
1ad818295 Fix WriteBatchTest.ManyUpdates, WriteBatchTest.LargeKeyValue under clang
ad7ecca72 Add unit tests to verify large key/value
fdd70d149 Skip filters for last L0 file if hit-optimized
aa5e3b7c0 PerfContext::ToString() add option to exclude zero counters
36300fbbe Enable per-request buffer allocation in RandomAccessFile  This change impacts only non-buffered I/O on Windows.  Currently, there is a buffer per RandomAccessFile  instance that is protected by a lock. The reason we  maintain the buffer is non-buffered I/O requires an aligned  buffer to work.  XPerf traces demonstrate that we accumulate a considerable  wait time while waiting for that lock.  This change enables to set random access buffer size to zero  which would indicate a per request allocation.  We are expecting that allocation expense would be much less than  I/O costs plus wait time due to the fact that the memory heap  would tend to re-use page aligned allocations especially with the  use of Jemalloc.  This change does not affect buffer use as a read_ahead_buffer for  compaction purposes.
1d854fa3d Fixed the asan error on column_family_test
37159a644 Add histogram for value size per operation
3b2a1ddd2 Add options.base_background_compactions as a number of compaction threads for low compaction debt
6ee38bb15 Slowdown of writing to the last memtable should not override stopping
d6c838f1e Add SstFileManager (component tracking all SST file in DBs and control the deletion rate)
45768ade4 transaction allocation perf improvements
77926f93e Merge pull request #964 from benoitc/fix/pi2
03a5661a1 fix build for raspberry 2
4b50f1354 Should not skip bloom filter for L0 during the query.
eadd221d3 Merge pull request #959 from koldat/master
d209076fa Merge pull request #961 from wingify/master
26c618004 Add Wingify to USERS.md
4265f81e8 Remove util/auto_roll_logger.cc (it was moved to different directory)
d7f22b6d2 Fixing generated GenerateBuildVersion.vcxproj when one builds on different locale than english. The problem is that date and time CLI utilities generates different format so that REGEX in CMake does not work.
d20915d52 Disable stats about mutex duration by default
0c433cd1e Fix issue in Iterator::Seek when using Block based filter block with prefix_extractor
035857a31 Fix RocksDB lite build
77ef87ccb Update fbcode_config4.8.1.sh to use update_dependencies.sh
955ecf8b4 Fix an ASAN error in compact_files_test
b0afcdeea Fix bug in block based tables with full filter block and prefix_extractor
167bd8856 [directory includes cleanup] Finish removing util->db dependencies
acd7d5869 [directory includes cleanup] Remove util->db dependency for ThreadStatusUtil
46f9cd46a [directory includes cleanup] Move cross-function test points
22ecb752d Add valgrind to pre-commit sandcastle testing
b7ecf3d21 Fix intermittent hang in ColumnFamilyTest.FlushAndDropRaceCondition
38e1d7fea ldb to support --column_family option
da33dfe18 Parameterize DBTest.Randomized
fb9811ee9 Add a perf context level that doesn't measure time for mutex operations
f7ef1a613 Include rest of dependencies in dependencies.sh
3e9209a07 Updated GetProperty documentation
40911e0b3 Run unit tests in parallel to find failing tests
2fbc59a34 Disallow SstFileWriter from creating empty sst files
f53c95f81 Cosmetic fixes and comments for the reader
f1ed17010 Add tests to make sure new DB or ColumnFamily options are settable through string
f57596b0c Improvements to pre-commit
538eec066 Update fbcode_config.sh to use latest versions automatically
8019aa9b5 improve test for manifest write failure
bcd4ccbc3 Revert D7809
b0a15e7fb Mechanism to run CI jobs on local branch via commit_prereq
bb2888738 Cleanup property-related variable names
29289333d Add named constants for remaining properties
2c2b72218 Disable OptionsParserTest.BlockBasedTableOptionsAllFieldsSettable under CLANG
a300d9928 Added sandcastle pre-commit
202be23e4 Add test that verifies all options in BlockBasedTableOptions is settable through GetBlockBasedTableOptionsFromString()
eceb5cb1b Split db_test.cc (part 1: properties)
94918ae84 db_bench: explicitly clear buffer in compress benchmark
fdbff4239 Crash test to make kill decision for every kill point
39c3e94ff Merge pull request #954 from davidbernard/solaris_build
df7c2f3b5 As per google coding standard replace "using" in option_builder.cc and geodb_impl.cc
12809b44b Revert "Change notification email for travis"
34704d5c7 [easy] Fixed a crash in LogAndApply() when CF creation failed
791dbafa9 Merge pull request #953 from sselva/master
594a5ef02 Merge pull request #955 from bcbrock/ppc64-build
f423f05dc Simple changes to support builds for ppc64[le] consistent with X86
3f12e16f2 Make alloca.h optional
eaa563756 Change notification email for travis
d78c6b28c Changes for build on solaris
2e9fae3f2 Add Rakuten Marketing to USERS.md
83e1de92a move internal build to use zstd 0.4.5
aec10f734 Guard falloc.h inclusion to avoid build breaks
f7ebc2f34 Update HISTORY.mc for 4.4.0
addd9545f Merge pull request #947 from yuslepukhin/align_and_yield
ac50fd3a7 Align statistics   Use Yield macro to make it a little more portable between platforms.
b54d4dd43 tools/sst_dump_tool_imp.h not to depend on "util/testutil.h"
48a8667c3 Merge pull request #929 from warrenfalk/fix32
d9bca1e14 Reduce iterator deletion overhead
45d794068 Merge pull request #940 from yuslepukhin/fix_windows_build_signed_unsigned
20d7902df Fix compile error.   Use constructor style initialization instead of a cast for   simplicity.
e16438bb8 fixing build warning
b73fbbaf6 added --no_value option to ldb scan to dump key only
1477dcb37 Merge pull request #937 from petehunt/master
c7cb1076a Add Smyte to USERS.md
df7e3b622 Include <array> in table/plain_table_key_coding.h
235b162be Not scheduling more L1->L2 compaction if L0->L1 is pending with higher priority
9a8e3f73e plain table reader: non-mmap mode to keep two recent buffers
7ece10ecb DeleteFilesInRange: Mark files to be deleted as being compacted before applying change
94d9df248 fix an unused function compiler warning in crc32c in 32-bit mode
2f01e10fa use static_cast in crc32c instead of c-style cast
601f1306a fix shorten-64-to-32 warning in crc32c
f3fb39814 Fix BlockBasedTableTest.NoopTransformSeek failure
55b37efa1 fix a compile error on 32-bit
8c71eb5af Optimize DBIter::Prev() by reducing stack overhead
73c31377b Revert "Fixed the bug when both whole_key_filtering and prefix_extractor are set."
57605d7ef Fixed the bug when both whole_key_filtering and prefix_extractor are set.
6935eb24e Add ColumnFamilyHandle::GetDescriptor()
9760c842c fix valgrind failure in backupable_db_test
b1a3b4c0d Make ldb automagically determine the file type and use the correct dumping function
ba8344736 Merge pull request #923 from petermattis/pmattis/prefix-may-match
da032495d Optimize GetLatestSequenceForKey
260c29762 Fix index seeking in BlockTableReader::PrefixMayMatch.
e541dcc8f Fix issue #921
51adc5457 fix sporadic failure in fault_injection_test
a2422f053 fix potential test SleepingTask race condition
1627c4b1b Merge pull request #918 from mkurdej/fix/assertion-on-no-disk-space
92d0850f1 Fix failing assertion in logger on Windows when the disk is full.
7699439b7 Prevent the user from setting block_restart_interval to less than 1
4041903ec Enhance db_bench write rate limit
399343205 Add Airbnb and Pinterest to USERS.md
d74c9f0a5 DeleteFilesInRange: Clean job context if no files deleted
1dec5b8f5 Merge pull request #916 from warrenfalk/capi_huge_page_option
12fa27b4f Merge pull request #915 from warrenfalk/capi_full_bloom
0fde291ab expose memtable_prefix_bloom_huge_page_tlb_size option to C API
7e81dba5c Support creation of "full" format bloom filter from C API
bae5b0a1d Fix clang build
ac16663bd use -Werror=missing-field-initializers, to closer match MyRocks build
ab5a9a66d Merge pull request #911 from shuzhang1989/fix_envhdfs_virtual_func
eb5a13904 update posix env schedule call
a41f68ac2 fix inconsistency between env_hdfs and env
7238be090 Fix clang build in db_compaction_test
c9e2490bc Fix DynamicBloomTest.concurrent_with_perf to pass TSAN
63ddb783d Delete files in given key range
d8677a8d2 Upgrade internal CLANG version for FB-internal gcc 4.8.1
edf1cd497 Not generating "__attribute__((__unused__))" for padding fields if it is not CLANG
9eb4f9596 Merge pull request #907 from siying/master
22c0ed8a5 Disable Visual Studio Warning C4351
fcafac053 Fix memory leak in ColumnFamilyTest.WriteStall*
b99d4276f Fix java test buid broken by 7d87f02799bd0a8fd36df24fab5baa4968615c86
11672df19 Fix CLANG errors introduced by 7d87f02799bd0a8fd36df24fab5baa4968615c86
7fafd52dc Merge pull request #900 from shuzhang1989/hdfs_env_fix
2b7c810db more foramt
b79ccbd57 indent
7d87f0279 support for concurrent adds to memtable
5b2587b5c DBTest.HardLimit use special memtable
b4aa82366 format
4dfdd1d92 format
298ba27ae Merge pull request #846 from yuslepukhin/enble_c4244_lossofdata
7810aa802 Merge pull request #899 from zhipeng-jia/fix_clang_warning
4c5560d70 Merge pull request #895 from zhipeng-jia/develop
d43da8ae0 DBTest.DelayedWriteRate: fix assert of sign and unsign comparison
3280ae9a2 Fix warning in release
ec2664fef Fix clang compile error under Linux
4fd23fb13 add a factory method for creating hdfs env
9c176ef90 Update liblz4 to r131
15b890226 Change default options.delayed_write_rate
73b175a77 Fix clang warnings regarding unnecessary std::move
b9f77ba12 When slowdown is triggered, reduce the write rate
445d5b8c5 Fix clang build
e089db40f Skip bottom-level filter block caching when hit-optimized
06c05495e Merge pull request #898 from zhipeng-jia/fix_move_warning
aa515823b Fix clang warning
2ba03196d Merge pull request #897 from yuslepukhin/enable_status_move
dbb8260f7 Make Status moveable   Status is a class which is frequently returned by value from functions.   Making it movable avoids 99% of the copies automatically   on return by value.
2bf9b968c Fix lite_build
d005c66fa Report compaction reason in CompactionListener
728f944f0 Fix computation of size of last sub-compaction
8ac7fb837 Merge pull request #863 from zhangyybuaa/fix_hdfs_error
e53e8219a Merge pull request #894 from zhipeng-jia/develop
e0abec158 Sorting std::vector instead of using std::set
33e09c0e1 add call to install superversion and schedule work in enableautocompactions
22c6b50ee Merge pull request #893 from zhipeng-jia/develop
24c7dae13 Fix clang warning regarding implicit conversion
eff309867 Do not use timed_mutex in TransactionDB
97ea8afaa compaction assertion triggering test fix for sequence zeroing assertion trip
521da3abb Fix BlockBasedTableTest.BlockCacheLeak valgrind failure
a48382399 Fix use-after free in db_bench
bf8ffc1d6 Merge pull request #890 from zhipeng-jia/develop
131f7ddf6 fix typo: sr to picking_sr
c37729a6a db_bench: --soft_pending_compaction_bytes_limit should set options.soft_pending_compaction_bytes_limit
7b12ae97d Add signalall after removing item from manual_compaction deque
d72b31774 Slowdown when writing to the last write buffer
6b2a3ac92 Add documentation for unschedFunction
167fb919a ZSTD to use CompressionOptions.level
32ff05e97 Bump version to 4.4
aececc209 Introduce ReadOptions::pin_data (support zero copy for keys)
e6e505a4d Fix examples
aa29cc128 Improve examples/README.md
97265f5f1 Fix minor bugs in delete operator, snprintf, and size_t usage
b68dc0f83 Merge pull request #885 from yuslepukhin/fix_size_t_formatting
b6d19adcf Use port size_t formatting
963660eb5 Merge pull request #883 from zhipeng-jia/master
99ae549d3 Fix typo
636cd3c71 Clean up listener_test (reuse db_test_util)
030215bf0 Running manual compactions in parallel with other automatic or manual compactions in restricted cases
d26a4ea62 Merge pull request #882 from SherlockNoMad/BuildFix
768a61486 Fix appVeyor Build problem
aca403d2b Fix another rebase problems.
a6fbdd64e Fix rebase issues and new code warnings.
3fa68af31 Enable MS compiler warning c4244.   Mostly due to the fact that there are differences in sizes of int,long   on 64 bit systems vs GNU.
236fe21c9 Enable MS compiler warning c4244.   Mostly due to the fact that there are differences in sizes of int,long   on 64 bit systems vs GNU.
84f98792d Transaction::SetWriteOptions()
3bfd3d39a Use SST files for Transaction conflict detection
362d819a1 Improving parser
00d6edf6a Ensure the destruction order of PosixEnv and ThreadLocalPtr
64fa43843 Merge pull request #862 from ceph/wip-env
2074ddd62 env: add EnvMirror
a3ba5915c Correct a comment in include/rocksdb/cache.h
f0a8e5a2d Fixed the valgrind error in ColumnFamilyTest::CreateAndDropRace
9e4462906 Change SingleDelete to support conflict checking
c5af8bffb Merge pull request #879 from charsyam/feature/typos
c30b49954 fix typos in comments
56e77f096 Deprecate options.soft_rate_limit and add options.soft_pending_compaction_bytes_limit
d6e1035a1 A new compaction picking priority that optimizes for write amplification for random updates.
de6958b2e Merge pull request #877 from yuslepukhin/fix_unnecessary_type_truncation
0991cee6c Merge pull request #815 from SherlockNoMad/CounterFix
49957f9a9 Prefer integer arithmetics   The code had conversion to double then casting to size_t   and then casting uint32_t which caused compiler warning (VS15).
0836d265c Merge pull request #876 from warrenfalk/wf_win_master
c6fedf2bf Add compaction_iterator and delete_scheduler tests to Windows build
ac8e56f05 db_bench: in uncompress benchmark, get Snappy size from compressed stream
9c227923c Merge pull request #788 from OpenChannelSSD/to_fb_master2
fa3dbf203 Merge pull request #853 from Vaisman/enable_C4267_warning
ad6aaf4fa Merge pull request #848 from SherlockNoMad/db_bench
56bbecc31 Merge pull request #867 from SherlockNoMad/CacheFix
188170fb4 Updating HISTORY.md
758dbec7f Fix fb-only build for gcc 4.8.1
774b80e99 Resubmit the fix for a race condition in persisting options
afc84731f Include ldb_tools and sst_dump_tools libraries in shared library
e5c5f2381 Support marking snapshots for write-conflict checking - Take 2
ea1192355 Upgrade to ZSTD 0.4.2
b60cb88c7 Update examples/rocksdb_option_file_example.ini
3d8bb2c89 Fix valgrind failure in IncreaseUniversalCompactionNumLevels
7af91d425 Merge pull request #873 from yuslepukhin/make_vs15_build
1d63c3d61 Revert "Support marking snapshots for write-conflict checking"
78de0c922 Fix up VS 15 build.  Fix warnings  Take advantage of native snprintf on VS 15
ec704aafd Support marking snapshots for write-conflict checking
770dea932 Fix occasional failure of DBTest.DynamicCompactionOptions
ebc2d490d Split histogram per OperationType in db_bench
f307036bd Revert "Fix a race condition in persisting options"
2fa3ed518 Fix a race condition in persisting options
f276c3a82 Fix valgrind failures in 3 tests in db_compaction_test due to new skiplist changes
291088ae4 Fix undeterministic failure of ColumnFamilyTest.DifferentWriteBufferSizes
3c2b995fb Merge branch 'master' of https://github.com/facebook/rocksdb into CacheFix
355fa9436 EstimatedNumKeys Counter Inaccurate
b2863017b Move posix threads into a library
3a98a7ae7 Replace malloc with new for LRU Cache Handle
a9ca9107b Fix db_universal_compaction_test
d3bb572da Build break fix.
b28b7c6dd Added callback notification when a snapshot is created
e8180f990 added public api to schedule flush/compaction, code to prevent race with db::open
19b1201b2 Merge pull request #865 from yuslepukhin/fix_db_table_properties_test
e0de7ef87 Avoid empty ranges vector with subsequent zero element access
a330f0b3b Fix incorrect merge in db/db_compaction_test.cc
bd7a49d44 Make DBCompactionTestWithParam::CompactionTrigger more deterministic
be006d288 fix LinkFile() undefined reference error
4687ced5d fix ToString() not declared error
bcd7bd122 Relax verification condition of DBTest.SuggestCompactRangeTest
f9103d9a3 DBTest.DynamicCompactionOptions: More deterministic and readable
0ad68518b Fix DBCompactionTestWithParam.CompactionTrigger in non-jemalloc build.
459c7fba3 Revert previous behavior of internal_key_skipped_count
481f9edb1 Fix CLANG build
d7421c22f Fixed some typos in the comments of rocksdb options file example
ef8ed3681 Fix DBTest.SuggestCompactRangeTest for disable jemalloc case
db320b1b8 DB to only flush the column family with the largest memtable while option.db_write_buffer_size is hit
4a009f917 Merge pull request #860 from SherlockNoMad/BuildFix
b4efaebff Fix ms version Appveyor build error
d27ea4c9e Initialize options.row_cache
72930485b Fix clang build
6bbfa1874 BackupDB to have a mode to use file size in file name
f3ea00bc8 Merge pull request #856 from ceph/wip-env
4cedd6b03 EnvWrapper: add ReuseWritableFile
33e0c9382 Reduce extra key comparision in DBIter::Next()
9a9d4759b InlineSkipList part 3/3 - new skiplist type that colocates key and node
520172954 InlineSkipList - part 2/3
78812ec6b InlineSkipList - part 1/3
ffb466da4 Merge pull request #855 from yuslepukhin/enable_3rdparty_override
10d257d64 Enable override to 3rd party linkage
41b32c605 Enable C4267 warning
c5b467306 Fix race condition that causes valgrind failures
efb01a055 Merge pull request #850 from yuslepukhin/enable_2015_build
81be49c75 Have a way for compaction filter to ignore snapshots
047bd22aa Build on Visual Studio 2015 Update 1
88e052772 Reduce moving memory in LDB::ScanCommand
890f44f46 Merge pull request #844 from yuslepukhin/enable_C4804_unsafe_bool
9d0b8f19d plain table reader: avoid re-read the same position for index and data in non-mmap mode
89bacb7e7 Enable MS Warning C4804 : unsafe use of type 'bool' in operation
d5239f870 build_tools/fbcode_config4.8.1.sh: upgrade versions of some dependencies
c4ebb66d6 Not to build forward_iterator_bench now
c342549d0 Merge pull request #841 from yuslepukhin/fix_test_rerun_logic
7cb1293b6 Fix log names when scheduling runs and reruns
51fce92e1 "ldb compact" should force bottommost level compaction
f83164120 Merge pull request #837 from yuslepukhin/rerun_concurrency_value
4159ab816 Merge pull request #839 from SherlockNoMad/memtableOption
6170fec25 Fix build broken by previous commit of "option helper refactor"
3a6643c2f Merge pull request #805 from SherlockNoMad/OptionHelperFix
189b3e03d Fix uninitilizeded SpecialEnv::time_elapse_only_sleep_
d5540e18e DBTest.MergeTestTime to only use fake time to be determinstic
bd7be035e Support Memtable Factory Parse in option_helper.cc
94e39e236 Exclude DBTest.FileCreationRandomFailure as a long running test   Increase concurrency to 18   Fix exclusion but in the ps script
4189c0f9a Fix Java Makefile
605a24d94 Block forward_iterator_bench under MAC and Windows
2a0510c9f Failed tests must be rerun with concurrency 1
9b8c9be0b Fix forward_iterator allocation of vector.
5cbb7e43e DBTest.MergeTestTime: relax counter upper bound verification
52e04b3d0 Merge pull request #833 from yuslepukhin/fix_win_build_after_lint
314f62194 Remove headers from the cc since they are in the module's header.
472c74006 Add necessary headers after cpplint rearranged includes
9bc9c93bd Move to version 4.3
3381e2c3e Handle multiple calls to DBImpl::PauseBackgroundWork() and DBImpl::ContinueBackgroundWork()
65a042921 Merge pull request #831 from yuslepukhin/remove_forward_iter_bench_win
ca5566d20 Fix clang build
4175472ad Merge pull request #832 from yuslepukhin/fix_forward_iter_outofbounds
cb9459f85 Fix empty vector write in ForwardIterator
a163cc2d5 Lint everything
8f01f2541 Remove forward_iter_bench from Win build.
dac5b248b UniversalCompactionPicker::PickCompaction(): avoid to form compactions if there is no file
d06b63e99 Fix Rocksdb lite build failure in forward_iterator_bench
7824444bf Reuse file iterators in tailing iterator when memtable is flushed
2ae4d7d70 Make sure that CompactFiles does not run two parallel Level 0 compactions
d781da816 Add CheckOptionsCompatibility() API to options_util
2391b459b Merge pull request #824 from yuslepukhin/try_ci_tests_on_daily
2ab3e2df2 Fix a build break so tests can run
247c49a40 Merge branch 'master' into try_ci_tests_on_daily
935d1495c Run tests imporvements   Add sequential rerun for any failed tests. Add env_test case.   Limit concurrency   Allow to specify individual tests   Take $Limit into account when displaying number of tests
5ac16300b Fixed valgrind error in options_util_test
6ce42dd07 Don't merge WriteBatch-es if WAL is disabled
56245ddcf Fixed DBCompactionTest.SkipStatsUpdateTest
e11f676e3 Add OptionsUtil::LoadOptionsFromFile() API
e78389b55 Fixed build failure of RocksDBLite test on options_file_test.cc
e114f0abb Enable RocksDB to persist Options file.
7ed2c3e45 Merge pull request #823 from yuslepukhin/fix_off_t_type
7f59e33b1 Make CI build debug/optimized
ae2dfe404 Try running db_test during integration build
720af2269 Merge branch 'fix_off_t_type' of https://github.com/yuslepukhin/rocksdb into fix_off_t_type
5270b33bd Make use of portable `uint64_t` type to make possible file access   in 64-bit.
631863c63 track WriteBatch contents
505accda3 remove constexpr from util/random.h for MSVC compat
5421c9728 Make use of portable `uint64_t` type to make possible file access   in 64-bit.
b81b43098 Switch to thread-local random for skiplist
75a8bad2a Merge pull request #821 from yuslepukhin/continue_windows_warnings
986230b8c Revert "Fix TSAN build for fbcode"
f3ca28ab0 Correct the comment of GetApproximateMemoryUsageByType
838676c17 Revert "Adding new table properties"
7c86d5049 Enable C4305 'identifier' : truncation from 'type1' to 'type2'
85a2ce9c1 Enable C4702 unreachable code
62aa1b1b7 Enable C4200 warning   nonstandard extension used : zero-sized array in struct/union
5b9ce1a32 Merge pull request #820 from yuslepukhin/enable_compiler_warnings
20f57b171 Enable Windows warnings C4307 C4309 C4512 C4701   Enable C4307 'operator' : integral constant overflow   Longs and ints on Windows are 32-bit hence the overflow   Enable C4309 'conversion' : truncation of constant value   Enable C4512 'class' : assignment operator could not be generated   Enable C4701 Potentially uninitialized local variable 'name' used
8be568a9c Adding new table properties
2b42000f4 incorrect batch group size computation for write throttling
c745f1d2c Fix TSAN build for fbcode
fe789c5f2 Document SingleDelete
e89e5b253 Merge pull request #818 from yuslepukhin/improve_test_concurrency
ae7940b62 Fix regression failure in PrefixTest.PrefixValid
3277d172b Improve concurrency when running tests   PowerShell seems to have a hard time when a flood of async tasks is   scheduled at the same time.   I speculated that WaitForMultipleObjects() in Windows can only take up   to 64 process handles and if you want to handle more than you should write   some additional code which can be sub-optimal. I.e to implement Wait-Job -Any.   I decided to test that suggestion and introduced a $Concurrency parameter with a default value of 62.   So in the new version the script fires up up to $Concurrency value   and wait for anything to complete before starting any more processes.   This improved matters greatly. Individual tests against ramdrive now   run in 8 minutes and all of the 200+ db_tests run in 9 minutes with concurrency   values of 8-16. About 48 is required to load a CPU on my box running against HD   but that does not improve running times much.
c8e01ef98 Delete test iterators
9d50afc3b Prefix-based iterating only shows keys in prefix
14c6e1a04 Add write_stress to RocksDB Legocastle runs
db3f5e494 Update HISTORY.md
042fb053f Fix clang
2419f435a Merge pull request #816 from SherlockNoMad/GeoDBTestFix
2e4540991 Fix appveyor build failure
183cadfc8 Add OptionsSanityCheckLevel
dba5e0074 Fixed the compile error in RocksDBLite in memory_test.cc
7d7ee2b65 Add Memory Insight support to utilities
3ecbab004 Add GetAggregatedIntProperty(): returns the aggregated value from all CFs
93a966722 Merge branch 'master' of github.com:facebook/rocksdb
c9aef3c41 Add RocksDb/GeoDb Iterator interface
f31442fb5 Merge pull request #803 from SherlockNoMad/SkipFlush
dcc898b02 Merge pull request #812 from yuslepukhin/fix_windows_warnings
df7ed91ef Fix white space at end of line
a0163c068 Do not disable compiler warnings:   C4101 'identifier' : unreferenced local variable   C4189 'identifier' : local variable is initialized but not referenced   C4100 'identifier' : unreferenced formal parameter   C4296 'operator' : expression is always false
279c8e0cd Merge pull request #811 from OverlordQ/unused-variable-warning
affd83369 Fix introduced in 2ab7065 was reverted by 18285c1.
db68a2c09 Merge pull request #806 from yuslepukhin/signed_unsigned_warning
ccc8c10c0 Move skip_table_builder_flush to BlockBasedTableOption
eaaf081d1 Do not suppress C4018 'expression' : signed/unsigned mismatch   The code compiles cleanly for the most part. Fix db_test.   Move debug file to testutil library.
ff4499e29 Update DB::AddFile() to have less restrictions
9ac88c855 Merge branch 'master' of https://github.com/facebook/rocksdb into OptionTestFix
84992d647 Option Helper Refactoring
11c71a365 db_bench: --compaction_pri default should be rocksdb::Options().compaction_pri
335e4ce8c options_test: fix a bug of assertion
66a3a87ab Merge pull request #797 from SherlockNoMad/optionHelper
550af4ee6 Fix Travis Build Error
a6dd0831d Add Option to Skip Flushing in TableBuilder
2872e0c8c Clean and expose CreateLoggerFromOptions
296c3a1f9 "make format" in some recent commits
6388e7f4e Merge pull request #798 from yuslepukhin/readahead_buffermanagement
f4cbb90c4 Merge pull request #799 from yuslepukhin/fix_random_generator_compile
1277a48f1 Fix 80 character limit issue.
ee2c3236d Fix compilation problem on Windows.   char is not a valid template parameter for std::uniform_int_distribution   according to the standard. Replacing with int should be just fine.
b69b9b624 Support PlainTableOption in option_helper
c97667d9f Fix RocksDB lite build for write_stress
0d720dfc1 Use the correct variable when fetching table properties.
4b66d9534 Write stress test
47414c6cd Move include/posix/io_posix.h to util/io_posix.h
2889df84c Revert "Avoid to reply on ROCKSDB_FALLOCATE_PRESENT in include/posix/io_posix.h"
28c8758a3 Merge pull request #795 from yuslepukhin/fix_mocktable_id
5c8f2ee78 Fix MockTable ID storage   On Windows two tests fail that use MockTable:   flush_job_test and compaction_job_test with the following message:   compaction_job_test_je.exe : Assertion failed: result.size() == 4,   file c:\dev\rocksdb\rocksdb\table\mock_table.cc, line 110
72d6e758b Fix WritableFileWriter::Append() return
d0a18c284 Merge pull request #786 from aloukissas/unused_param
c37223c08 Avoid to reply on ROCKSDB_FALLOCATE_PRESENT in include/posix/io_posix.h
6fbc4f9f3 Implement smart buffer management.   introduce a new DBOption random_access_max_buffer_size to limit   the size of the random access buffer used for unbuffered access.   Implement read ahead buffering when enabled.   To that effect propagate compaction_readahead_size and the new option   to the env options to make it available for the implementation.   Add Hint() override so SetupForCompaction() call would call Hint()   readahead can now be setup from both Hint() and EnableReadAhead()   Add new option random_access_max_buffer_size support   db_bench, options_helper to make it string parsable   and the unit test.
d6219e4d9 Mac build break caused by include/posix/io_posix.h not declearing errno,
beb69d451 Merge pull request #765 from PraveenSinghRao/wal_filter
ab0f3b964 crash_test to trigger some less frequent crash point more frequently
7beb743cf Merge pull request #778 from Vaisman/master
4ce117c4d Merge branch 'master' into wal_filter
32cdec634 Fail recovery if filter provides more records than original and corresponding unit-test, fix naming conventions
44d4057d7 Avoid some includes in io_posix.h
2adad23a1 Fix unused parameter warnings.
b0980ff74 Fix unused parameter warnings.
bc898c5f8 Fix unused parameter warnings.
138876a62 Merge pull request #746 from ceph/wip-recycle
581f20fd8 Add LITE tests to Legocastle
3d56d868c Merge remote-tracking branch 'upstream/master'
d69111114 include/posix/io_posix.h should have a once declartion
a6962edf8 Merge pull request #783 from yuslepukhin/remove_test_conditional_compilation
3c750b59a No need to #ifdef test only code on windows
8c11c5dee Merge pull request #768 from OpenChannelSSD/to_fb_master2
6e6dd5f6f Split posix storage backend into Env and library
980a82ee2 Fix a bug in GetApproximateSizes
d0d13ebf6 fix bug in db_crashtest.py
01a41af0a Merge remote-tracking branch 'upstream/master'
5678c05d8 Use DEBUG_LEVEL=0 in make release and make clean
ac25fe6b9 Merge pull request #779 from yuslepukhin/optimize_windows_build
e154ee086 Do not build test only code and unit tests in Release builds   Test code errors are currently blocking Windows Release builew   We do not want spend time building in Release what we can not run   We want to eliminate a source of most frequent errors when people   check-in test only code which can not be built in Release.   This feature will work only if you invoke msbuild against rocksdb.sln   Invoking it against ALL_BUILD target will attempt to build everything.
cd3286fae Error while cmake by building from zip-archive
e3d4e1407 DBCompactionTestWithParam.ManualCompaction to verify block cache is not filled in manual compaction
033c6f1ad T7916298, bug fix
7717ad1af Adding artifacts to stress_crash CI job
0bf656b90 Don't spew warnings when flint doesn't exist
6d6776f6b Log more information for the add file with overlapping range failure
7951b9b07 make field order match initialization order
90228bb08 Merge pull request #771 from maximecaron/patch-1
2938c5c13 merge upstream changes
e3b1d23d3 Bump version to 4.2
a7b2bedfb log_{reader,write}: recyclable record format
4e07c99a9 Fix iOS build
0c59691dd Handle multiple batches in single log record - allow app to return a new batch + allow app to return corrupted record status
32c291e3c Merge branch 'master' of github.com:facebook/rocksdb into T7916298
4575de5b9 #7916298: merge tools/db_crashtest2.py into tools/db_crashtest.py
5c727de6a Merge pull request #777 from yuslepukhin/fix_win_build_uint
cfaa33f9a Update transaction iterator documentation
2f680ed09 Make index same type as auto deduced uint32_t
09f853550 uint is a not a datatype on windows.
ec1f8354a Fix the default assignment of DEBUG_LEVEL in Makefile
f18acd887 Fixed the clang compilation failure
4104e9bb6 log_reader: introduce kBadHeader; drop wal mode from ReadPhysicalRecord
9c33f64d1 log_reader: pass in WALRecoveryMode instead of bool report_eof_inconsistency
718805210 db_test_util: add recycle_log_files to set of tested options
3ac13c99d log_reader: pass log_number and optional info_log to ctor
5830c699f log_writer: pass log number and whether recycling is enabled to ctor
666376150 db_impl: recycle log files
d666225a0 db_impl: disable recycle_log_files if WAL archive is enabled
543c12ab0 options: add recycle_log_file_num option
1bcafb62f env: add ReuseWritableFile
e1a09a770 Implementation for GetPropertiesOfTablesInRange
ad471453e Allow GetProperty to report the number of currently running flushes / compactions.
277dea78f Add more kill points
a98fbacfa Moving memtable related files from util to a new directory memtable
8f143e03f Add ClearSnapshot()
f9ba79ecd crash_test to trigger fail points other than file appending more frequently
2f2de338c Run ROCKSDB_LITE tests in travis
680156ca6 crash_test to run with data sync on
e1a5ff857 Allow users to disable some kill points in db_stress
d306a7ea8 Merge pull request #773 from yuslepukhin/update_requirements
bb64d6da4 Disabling TSAN crash test
8c2fe68fd Update 4 is required for building with MS Visual Studio 13
952ad994a Fix db_test under ROCKSDB_LITE
6d730b4ae Block tests under ROCKSDB_LITE
5eee1ef2d Merge pull request #770 from Vaisman/master
63e507c59 Move ldb and sst_dump from utils to tools.
dae49e829 Make DBTest.ReadLatencyHistogramByLevel more robust
92060b215 Fix build error using Visual Studio 12
9f7413502 Error while cmake by building from zip-archive
b81b2ec25 Fix benchmarks under ROCKSDB_LITE
e587dbe03 Move manual_compaction_test.cc from util to db
666fb5df4 Remove DefaultCompactionFilterFactory.
d662b8dab Merge pull request #766 from PraveenSinghRao/lockfix
f55d3009c Make db_test_util compile under ROCKSDB_LITE
29a47cd2b Include the time unit in the comment of perf_context timers
2b925ccb4 Correct the comments in db/internal_stats.h
35ad531be Seperate InternalIterator from Iterator
91c041e57 move debug variable under ifndef
198ed5898 Merge pull request #760 from jwlent55/use-static-library-header-files
cc4d13e0a Put wal_filter under #ifndef ROCKSDB_LITE
385b41600 Merge pull request #764 from dmittendorf/fix-java-static-packaging
7062d0ea6 Make perf_context.db_mutex_lock_nanos and db_condition_wait_nanos only measures DB Mutex
1fe78a407 Fix tests failing in ROCKSDB_LITE
a6efefef7 Fix format specifiers
f7b2a7b40 Fix format specifiers
7f58ff7c3 Remove db_impl_debug from release build
1ddd91cd2 Fixed packaging of java crossbuild jar by forcing all compiled binaries to be output to the java/target directory.  The uber crossbuild jar is then assembled within the java/target directory.
eb2417855 merge from master
c64ae05b1 Move TEST_NewInternalIterator to NewInternalIterator
59a0c219b Adding log filter to inspect and filter log records on recovery
0be50ed12 Merge pull request #763 from PraveenSinghRao/lockfix
a1d37602a Fixing mutex to not use unique_lock
9e819d096 Modify the way java static builds are done so that: 1) There is no need to download and install the compression libraries twice just to get access to their header files during the compile phase. 2) Ensure that the compression library headers files used during the compile phase are the same ones used to build the static library that is linked into the library.
f1fdf5205 Clean up dependency: Move db_test_util.* to db directory
237994409 Fixed an incorrect replace of const value in util/options_helper.cc
0bb8ea56b [RocksDB Options File] Add TableOptions section and support BlockBasedTable
4a7970d75 Modify the way java static builds are done so that: 1) There is no need to download and install the compression libraries twice just to get access to their header files during the compile phase. 2) Ensure that the compression library headers files used during the compile phase are the same ones used to build the static library that is linked into the library.
c4366165e Merge pull request #759 from jwlent55/statically-load-compression-libraries
fa4b5b3db Fix for the travis build caused by my previous commit
3d07b815f Passing table properties to compaction callback
64546af83 Adding parser to CI jobs
def74f876 Deferred snapshot creation in transactions
c5f3707d4 DisableIndexing() for Transactions
776bd8d5e Pass column family ID to table property collector
5a7222782 Ensure that the compression libraries are statically linked into dynamic libraries included in the Java jar.  Also build the linux libraries using the portable flag to fix a problem with the linux32 build and improve the general portability of the RocksDB dynamic libraries. ==> linux32: util/crc32c.cc:318:39: error: ‘_mm_crc32_u64’ was not declared in this scope
e61d9c148 Make DBTest.AggregatedTableProperties more deterministic
b77eb16ab New Manifest format to allow customized fields in NewFile.
6732a5765 Merge pull request #756 from viveknelamangala/master
a52888ed0 Install snappy headers to standard locations using yum, so that build_tools/build_detect_platform sets -DSNAPPY flag to g++ . Current jars of rocksdb do no have snappy compression avaliable .
831101b5f Make it harder for users to run debug builds in production
000836a88 CompactionFilter::Context to contain column family ID
3a0bf873b Change RocksDB version to 4.1
77318ee14 Enable crash CI jobs
9803e0d81 compaction_filter.h cleanup
51fa7ecec Bytes read/written from cache statistics
f925208ff Create Makefile target unity_test
a065cdb38 bloom hit/miss stats for SST and memtable
40cdf797d Fix compile error on platforms without fallocate()
77e4ad7ce Fix compile failure on Travis
4049bcde3 Added boolean variable to guard fallocate() calls
aadf49fe6 Travis shouldn't fail when clang-format suggests improvements
d80ce7f99 Compaction filter on merge operands
726d9ce1a Disabling unity
026750265 Support for LevelDB SST with .ldb suffix
5855cdb6d Merge pull request #750 from yuslepukhin/fixup_build_options
7bbe10c01 Merge pull request #751 from yuslepukhin/return_noerror
e95b703b7 Mmap reads should not return error if reading past file
25c58a204 Add shared_linked DEBUG flag, remove port from among the include directories.
60b1c0a70 Fix to CI job definition
9babaeed1 Update dump_tool and undump_tool to accept Options
eb5b637fb Fix condition for bottommost level
9eaff629e Make corruption_test more robust
bf19dbff4 Fix valgrind - Initialize done variable
5c7bf56d3 [RocksDB Options] Support more options in RocksDBOptionParser for sanity check.
115427ef6 Add APIs PauseBackgroundWork() and ContinueBackgroundWork()
a39897369 Adding features to CI job description
a47bf325c Merge pull request #748 from yuslepukhin/improve_test_runs
65324a16d Improve test running scripts   Introduce proper command line arguments so we can control the script   Add appveyor support   Add an ability to run all other (non db_tests) test executables in parallel   Use .NET HashSet instead of empty valued hashtable to improve the looks   TODO: Some of the tests do not use GTests and need to improve log parsing
7e4ee4231 Merge pull request #743 from edsrzf/amalgamation
7a23e4d8c New amalgamation target
e9a6808c4 Merge pull request #745 from yuslepukhin/test_appveyor_baseline
9320ffd67 Improve CI build and fix Windows build breakage   Is there a way to enforce CMake additions for internal changes that seem to come   w/o a PR?
03b08ba9a Return MergeInProgress when fetching from transactions or WBWI with overwrite_key
c29af48d3 Add max_file_opening_threads to db_bench
da1cf8a9b Add a missing check for deprecated options in options_helper.cc
5a51fa907 Fix accidental object copy in transactions
1e73b11af Better handling of deprecated options in RocksDBOptionsParser
a8b8295d1 Fixed a compile warning in options_test.cc under clang
74b100ac1 RocksDB Options file format and its serialization / deserialization.
75134f756 Merge pull request #741 from yuslepukhin/test_appveyor_baseline
2e7506d82 Improve CI build and build switches   Add an optimized build config switch for faster test runs   Change compiler options to introduce more opitmizations and be more inline with MS internal switches.   Make appveyor build to utilize all the avaiable cores on the VM (parallel)   Introduce new appveyor configuration for daily test runs as it would take too long   to run db_test after each checkin even in paralell.   With some exclusions we make it in 38 minutes. We currently fail to install ramdisk during the build.   Add a powershell script to faicilitate paralell run for db_test cases.
1eff1834b Remove non-existing functions. Closes #680
16d1ba700 Clear SyncPoint Trace in DeleteSchedulerTests
30f74fa96 Make CompactionJobStatsTest.UniversalCompactionTest more robust
afe0dc539 SingleDelete support for Transactions
a263002a3 Fixed a tsan warning in db_stress.cc
e4861e7d6 Fixed a compile error in util/arena.h
0fdb4f168 Fixed a compile warning in util/arena.cc when hugetlb is not supported.
94ac8826c Merge pull request #737 from mlin/readonly-syncwal
60fa9cf0b Override DBImplReadOnly::SyncWAL() to return NotSupported. Previously, calling it caused program abort.
7df348b40 Minor fix to CI job definition
dac3f22b7 Fix the test failure
63e0f8679 Fixed a bug which causes rocksdb.flush.write.bytes stat is always zero
7ee445dd6 Fix the compile warning
174e2be5f Merge pull request #735 from jsteemann/fix-potential-leak-in-allocate
aa58958d3 prevent potential memleaks in Arena::Allocate*()
25fd743d7 Fix SingleDelete support in WriteBatchWithIndex
b6aa3f962 Fixed a memory leak issue in DBTest.UnremovableSingleDelete
7b7b5d9f1 [minor] Reuse SleepingBackgroundTask
e01f32cc3 Parameterizing email id
c58bac701 Fix valgrind failure due to memory leaks
a70d08ec0 Fix the bug of using freed memory introduced by recent plain table reader patch
628216fc1 Simplifying valgrind testing
4805fa0ea Remove ldb HexToString method's usage of sscanf
f03b5c987 Add experimental DB::AddFile() to plug sst files into empty DB
3fdb6e523 Fixed old lint errors in db/filename.cc
b349d2278 Fixed old lint errors in db/filename.h
df34aea33 PlainTableReader to support non-mmap mode
d746eaad5 RandomAccessFileReader should not inherit RandomAccessFile
03dd8f3ca Fixing punit job description
d0c31641d Internal stats WAL file synced to match meaning of the stats of the same name
48b4497f7 Merge pull request #730 from yuslepukhin/fix_write_batch_win_const_expr
a6c22e3e4 Disabling parallel test CI job
489a3e95d Re-work to support size_t max constant for 32/64-bit.
ff57c6511 [RocksJava] Fix test failure of InfoLogLevelTest
f1b9f804e Add a mode to always pick the oldest file to compact for each level
5e8f0a66d Use port::constant for std::muneric_limtis<>::max()
2754ec999 Fix Windows constexpr issue and '#ifdef' column_family_test in Release.
dd2e1eeb3 Disabling log running jobs
199744f4c Merge pull request #728 from jsteemann/fix-missing-include-header
0e65693f1 Merge pull request #727 from jsteemann/micro-optimization
4d6eb52d1 Fix to CI jobs.
3bcc072d2 Added more CI jobs
669b892f9 add missing header required for std::function
624ef456d fixed formatting. thanks @4tXJ7f for pointing me at `make format`
bbb18c827 removed unused variable of type Status, fixed indentation
470483335 pass input string to WriteBatch() by const reference
5ec129971 key_ cannot become nullptr, so no check is needed for that
834b12a8d made Size() function const because it does not modify data
1fc16cb2e Fix clang-format on Travis
e244bdf39 Merge pull request #725 from adamretter/fail-failed-java-test
7d937a090 Exit with non-zero status if one or more Java tests fail
1b598213a Check formatting in Travis
c7fba8029 Fix non-deterministic failure in backupable_db_test
014fd55ad Support for SingleDelete()
f35560d00 Merge pull request #723 from jsteemann/fix-typos
f8b770a94 fixed typos
51e1c1125 Do not flag error if file to be deleted does not exist
a5e312a7a Improving condition for bottommost level during compaction
9aca7cd6d DB::Open() to flush info log after printing DB pointer
cecd903ad Fix gflags build in Travis script
16934d495 Fix wrong constants in db_test_util
2e8e7eb39 Fix the verbosity issue in Java makefile
f21c7415a Change the log level of DB start-up log from Warn to Header.
9566342d2 Build gflags from source for Travis
3ebf11ed1 Adding the increment for a counter for a number of WAL syncs
81a61d75d Skipped tests shouldn't be failures [part 2]
1b7ea8ce8 Skipped tests shouldn't be failures
5ba3297d0 Add compaction time to log output
31a27a360 Callback for informing backup downloading added
d93a9f2aa [travis CI] Run ulimit -n 2000
2b683d497 Add DBOption.max_subcompaction to option dump
0e50a3fcc Merge issue with D46773
a7e80379b LogAndApply() should fail if the column family has been dropped
2819a1db3 Minor fix to CI job definition
df22e2fb7 Relax memory order for faster tickers
488607317 Adding Slice::difference_offset() function
5ce63e30e Merge pull request #720 from AMDmi3/fix-constant-overflow
925babc76 Merge pull request #721 from AMDmi3/printf-size_t
f171faa24 Fix printf format for size_t
4b0b0201c Fix `integer overflow in expression' error
f3170b6f6 DBImpl::FindObsoleteFiles() shouldn't release mutex between getting min_pending_output and scanning files
e467bf0de Fix valgrind error
7cb314b9e Skip some tests in ROCKSD_LITE
0bfe0573e Add gflags dependency to Travis script
5de807ac1 Add options.hard_pending_compaction_bytes_limit to stop writes if compaction lagging behind
7143242d1 Fix compaction_job_stats under ROCKSDB_LITE
592f6bf78 Merge pull request #716 from yuslepukhin/refactor_file_reader_writer_win
e2d6011f4 Minor fix to CI job definition
ad0d70ca1 Relax asserts in arena_test
03ddce9a0 Add counters for L0 stall while L0-L1 compaction is taking place
a3fc49bfd Transactions: Release Locks when rolling back to a savepoint
ddc8b4499 Address code review comments both GH and internal  Fix compilation issues on GCC/CLANG  Address Windows Release test build issues due to Sync
9f3a66a93 Improvements to CI jobs
7db1471cc Minor fix to CI job
c67d20689 Fixed arena_test failure due to malloc_usable_size()
34cedaff6 Initialize variable to avoid warning
aeb461268 Add counters for seek/next/prev
45e9e4f0b Refactor NewTableReader to accept TableReaderOptions
ddb950f83 Fixed bug in compaction iterator
30e82d5c4 Refactor to support file_reader_writer on Windows.   Summary. A change https://reviews.facebook.net/differential/diff/224721/   Has attempted to move common functionality out of platform dependent   code to a new facility called file_reader_writer.   This includes:   - perf counters   - Buffering   - RateLimiting
af7cdbf64 Run full test suite in Travis
c25f6a85b Removed __unused__ attribute
6db0a939d Fix DBCompactionTest failure with parallel L0-L1 compactions
8aa1f1519 Refactored common code of Builder/CompactionJob out into a CompactionIterator
41bce0586 CI job improvements
95ffc5d2b Correct ASSERT_OK() in ReadDroppedColumnFamily
3c37b3ccc Determine boundaries of subcompactions
112664408 Relaxing consistency detection to include errors while inserting to memtable as WAL recovery error.
abc7f5fdb Make DBTest.ReadLatencyHistogramByLevel more robust
ac9bcb55c Set max_open_files based on ulimit
4cbd2f9aa Merge pull request #714 from facebook/travisformac
d0df54d1f Run travis tests on OS X
a55e5a52a Merge pull request #711 from facebook/testtravis
2b676d5bb Upgrade travis to new architecture
c66d53fee Fixed minor issue in CompressionTypeSupported()
f3f2032c4 Release RocksDB 4.0.0
44b6e99e1 update max_write_buffer_number_to_maintain docblock
aa6eed0c1 Transaction stats
25dbc579f Update HISTORY file for transactions
52386a1e7 Minor fix to sandcastle jobs commands
b5b2b75e5 better tuning of arena block size
342ba8089 Make DBTest.OptimizeFiltersForHits more deterministic
e17e92ea1 Relaxed assert in forward iterator
5e94f68f3 TransactionDB Custom Locking API
0ccf2db38 Fixed broken build due to format specifier
6bdc484fd Added Equal method to Comparator interface
7a31960ee Tests for ManifestDumpCommand and ListColumnFamiliesCommand
778cf4449 Adding email notification.
3a0df7f16 Fixed comparison in ForwardIterator when computing hint for GetNextLevelIndex()
91f3c9079 Fix case when forward iterator misses a new update
ff1953c89 Merge pull request #707 from dkorolev/master
7b463e657 Fixed a typo in INSTALL.md
d9f42aa60 Adding a verifyBackup method to BackupEngine
50dc5f0c5 Replace BackupRateLimiter with GenericRateLimiter
20ef64cae Moving jobs to use gcc-4.9
0f1aab6c1 Add SetLockTimeout for Transactions
14456aea5 Fix compile
76f286cc8 Optimize bloom filter cache misses
0e6e5472e Fixed a compile warning in rocksjni/loggerjnicallback.cc
b8a962d4f Adding commands for few more CI jobs.
8a2d59a35 Add Cloudera's blog post to USERS.md
3c9cef1ee Unified maps with Comparator for sorting, other cleanup
3e0a672c5 Bug fix: table readers created by TableCache::Get() doesn't have latency histogram reported
b42cd6bed Remove the need for LATEST_BACKUP in BackupEngine
0f763db20 Merge pull request #705 from yuslepukhin/rate_limiter_fix
20c44fefb t6913679: Use fallocate on LOG FILESS
f14c3363e Make WinEnv::NowMicros return system time   Previous change for the function   555ca3e7b7 (diff-bdc04e0404c2db4fd3ac5118a63eaa4a)   made use of the QueryPerformanceCounter to return microseconds values that do not repeat   as std::chrono::system_clock returned values that made auto_roll_logger_test fail.
aad0572f8 Fixed the build issue of rocksdbjavastaticrelease
5508122ed Fix a perf regression in ForwardIterator
b72200777 Fix listener_test when using ROCKSDB_MALLOC_USABLE_SIZE
40cd91b7f Fixed compile warning in rocksdbjava
90415cfeb Fixed a compile warning in linux32 environment.
9d6503f88 Fix arena_test test break using glibc-2.17
77a28615e Support static Status messages
18db1e469 better db_bench options for transactions
0be260523 Merge pull request #702 from PraveenSinghRao/remove_spurious
8b689546b Add Subcompactions to Universal Compaction Unit Tests
c6d870ffb Merge branch 'arcpatch-D45741'
57b3a8773 Adding sandcastle determinator for RocksDB
3d78eb66b Arena usage to be calculated using malloc_usable_size()
effd9dd1e Fix deadlock in WAL sync
64f07deb8 remove spurious compression definitions
72a9b73c9 Removed unnecessary checks in DBTest.ApproximateMemoryUsage
cb164bfc4 Do not delete iterators for immutable memtables.
7a0dbdf3a Add ZSTD (not final format) compression type
e2db15efd Merge pull request #701 from PraveenSinghRao/usewinapi_notcruntime
e853191c1 Fix DBTest.ApproximateMemoryUsage
7c916a5d3 Merge pull request #699 from OpenChannelSSD/to_fb_master
0886f4f66 Helper functions to support direct IO
7e327980a Remove usage of C runtime API that has file handle limitation
8ef0144e2 Add argument --show_table_properties to db_bench
1fb2abae2 ColumnFamilyOptions serialization / deserialization.
5f4166c90 ReadaheadRandomAccessFile -- userspace readahead
16ebe3a2a Mmap reads should not return error if reading past file
d286b5df9 DBIter to out extra keys with higher sequence numbers when changing direction from forward to backward
3795449c9 Fix DBTest.GetProperty
a7834a129 Merge pull request #698 from yuslepukhin/address_noexcept_windows
9ccf1bd3e Correct the comment for GetProperty() API.
fbe2c05f5 s/NOEXCEPT/ROCKSDB_NOEXCEPT
6924d7582 Address noexcept and const integer lambda capture   VS 2013 does not support noexcept.    Complains about usage of ineteger constant within lambda requiring explicit capture.
2f8d71ec0 Moving sequence number compaction variables from SubCompactionState to CompactionJob
bab9934d9 Fix build failure caused by bad merge.
4d28a7d8a Add a whitebox test for deleted file iterators.
249fb4f88 Fix use of deleted file iterators with incomplete iterators
53b88784d Add throttling to multi-threaded backups
09d982f9e Fix compact_files_example
6996de87a Expose per-level aggregated table properties via GetProperty()
86d6c3cde Fix Windows build
20d1e547d Common base class for transactions
205083297 Fixing race condition in DBTest.DynamicMemtableOptions
e46bcc08b Remove an extra 's' from cur-size-all-mem-tabless
4ab26c5ad Smarter purging during flush
4c81ac0c5 Fix benchmark report script
b6def58f7 Changed 'num_subcompactions' to the more accurate 'max_subcompactions'
c85296846 db_iter_test: add more test cases for the data race bug
9130873a1 Add options.new_table_reader_for_compaction_inputs
07d2d3416 Add a counter about estimated pending compaction bytes
41a0e2811 Improve defaults for benchmarks
a203b913c Fixed a rare deadlock in DBTest.ThreadStatusFlush
962aa6429 Merge pull request #695 from yuslepukhin/address_windows_build
5bf890762 More indent adjustment.
e2a9f43d6 Adjust indent
6e9a260b0 Merge branch 'address_windows_build' of https://github.com/yuslepukhin/rocksdb into address_windows_build
1cac89c9b Address windows build issues  Intro SubCompactionState move functionality  =delete copy functionality  #ifdef SyncPoint in tests for Windows Release builds
f25f06ddd Address windows build issues   Intro SubCompactionState move functionality   =delete copy functionality   #ifdef SyncPoint in tests for Windows Release builds
027ca5b2c Total SST files size DB Property
b604d2562 Removing unused variables to fix build
1b114eed4 Free file iterators for files which are above the iterate upper bound to Improve memory utilization
3fd70b05b Rate limit deletes issued by DestroyDB
df79eafcb Introduce GetIntProperty("rocksdb.size-all-mem-tables")
888fbdc88 Remove the contstaint that iterator upper bound needs to be within a prefix
137c37667 Removing variables used only in assertions to prevent build error
b47cc5851 Bounding Number of Subcompactions
e58e1b18e Make tailing iterator show new entries in memtable.
9ec957159 DBOptions serialization and deserialization
b2df20a89 Make HashCuckooRep::ApproximateMemoryUsage() return reasonable estimation.
601b1aaca Fixing Failed Assertion in Subcompaction State Diff
f0da6977a [Parallel L0-L1 Compaction Prep]: Giving Subcompactions Their Own State
f32a57209 Simplify querying of merge results
72613657f Measure file read latency histogram per level
b7198c3af reduce db mutex contention for write batch groups
603b6da8b Add options.compaction_measure_io_stats to print write I/O stats in compactions
dc9d5634f Change master to 3.14
b78c8e07d Merge pull request #689 from msb-at-yahoo/add-tools-target
9f0dd2229 Add a 'tools' target.
463720712 Add test case to repro the mispositional iterator in a low-chance data race case
3bd9db420 [Cleanup] Remove RandomRWFile
c3466eab0 Have Transactions use WriteBatch::RollbackToSavePoint
0db807ec2 Transaction error statuses
c2f2cb021 Pessimistic Transactions
c2868cbc5 Use manual_compaction for compaction_job_test
6b2d57039 Fix Windows build by adding snapshot_impl to CMakeLists
e61fafbe7 Fixed clang-build error in util/thread_local.cc
cee1e8a08 Parallelize LoadTableHandlers
4249f159d Removing duplicate code in db_bench/db_stress, fixing typos
a03085b55 Fix linters on non-fb machines
1ae27113c reduce comparisons by skiplist
b47d65b31 Fixed Segmentation Fault in db_stress on OSX.
a1581eca8 Modernize RocksDB linters
a9dcc0a63 Fix clang build
2cf0f4f47 Adding wal_recovery_mode log message
68f934355 Better CompactionJob testing
22dcaaff3 More accurate time measurement for delete_scheduler_test
0a7ea582c Add auto-build manifest for appveyor
0093271ee Merge pull request #685 from flandr/fix-tls-build
ac04a6cfb Fix OSX + Windows build
16ea1c7d1 simple ManagedSnapshot wrapper
257ee895f Fixed memory leaks
254c4fb88 In HISTORY.md Switch unreleased notes to 3.13
40f893f4a Fix delete_scheduler_test valgrind error
6a4aaadcd Avoid type unique_ptr in LogWriterNumber::writer for Windows build break
d7314ba75 Fixing endless loop if seeking to end of key with seq num 0
48e6e9aa8 Add util/delete_scheduler_impl.cc to CMakeLists.txt
c7742452e Add Statistics.getHistogramString() to print more detailed outputs of a histogram
29b028b0e Make DeleteScheduler tests more reliable
fca88f8e1 valgrind_check to exit on test failures
7d364d0d9 Fix build failure
960d936e8 Add function 'GetInfoLogList()'
7ccd1c80a Add two unit tests for SyncWAL()
3ae386eaf Add statistic histogram "rocksdb.sst.read.micros"
8ecb51a7e "make commit-prereq" should clean up rocksjava properly
9aec75fbb Enable DBTest.FlushSchedule under TSAN
bd2fc5f5f Fix TSAN for delete_scheduler_test
8e01bd114 Fix misplaced position for reversing iterator direction while current key is a merge
c46507102 Removing duplicate code
e06cf1a09 [wal changes 3/3] method in DB to sync WAL without blocking writers
5dc3e6881 Update Tests To Enable Subcompactions
c45a57b41 Support delete rate limiting
102ac118b Update JAVA-HISTORY.md for v3.13
3a1d4e6c9 Merge pull request #670 from skunkwerks/fix_osx_shared_library_names
f5d072ae6 Fixed RocksJava test failure of shouldSetTestCappedPrefixExtractor
f39cbcb0a Merge pull request #654 from adamretter/remove-emptyvalue-compactionfilter
f0b5bcc7b add support for capped prefix extractor in java
18ba58a94 Upgrading jemalloc from 3.6.0 to the latest for fbcode+gcc 4.8.1
ce21afd20 Expose the BackupEngine from the Java API
b0d12a135 Merge pull request #569 from adamretter/travis-java-api
241bb2aef Make DBCompactionTest.SkipStatsUpdateTest more stable.
3424eeb1e Polish HISTORY.md
cf3e05304 crash_test cleans up directory before testing if TEST_TMPDIR is set
24daff6d7 Fix a typo and update HISTORY.md for NewCompactOnDeletionCollectorFactory().
14d0bfa42 Add DBOptions::skip_sats_update_on_db_open
e2a3bfe74 First half of whitebox_crash_test to keep crashing the same DB
2e73bd4ff crash_test to put DB under TEST_TMPDIR
1205bdbce crash_test to cover simply cases
d5c0a6da6 Merge branch 'master' of github.com:facebook/rocksdb
2d41403f4 Made change to fix the memory leak
92f7039ee fix memory corruption issue in sst_dump --show_compression_sizes
be8621ffa Fix compile warning in compact_on_deletion_collector in some environment
26894303c Add CompactOnDeletionCollector in utilities/table_properties_collectors.
20b244fcc Fix CompactFiles by adding all necessary files
87df6295d Make SuggestCompactRangeNoTwoLevel0Compactions deterministic
40c64434d Parallelize L0-L1 Compaction: Restructure Compaction Job
47316c2d0 dump_manifest supports DB with more number of levels
bd852bf11 Fixed typos in db_stress
544be638a Fixing fprintf of non string literal
193dc977e Fixing dead code in table_properties_collector_test
05d4265a2 Merge branch 'master' of github.com:facebook/rocksdb
4be6d4416 Compression sizes option for sst_dump_tool
8161bdb5a WriteBatch Save Points
7bfae3a72 tools/db_crashtest2.py should run on the same DB
d06c82e47 Further cleanup of CompactionJob and MergeHelper
e95c59cd2 Count number of corrupt keys during compaction
221a94a5f Another attempt at adding the Java API and tests to the travis build
1bdfcef7b Fix when output level is 0 of universal compaction with trivial move
6a82fba75 Add missing hashCode() implementation
f73c80143 Fixing Java tests.
14f413760 Correct the comment of DB::GetApproximateSizes
8279d4197 Merge pull request #667 from yuslepukhin/fix_now_microsec_win
eb8e3b4c7 Fix shared library names on OSX
555ca3e7b Fix WinEnv::NowMicrosec   * std::chrono does not provide enough granularity for microsecs and periodically emits     duplicates   * the bug is manifested in log rotation logic where we get duplicate    log file names and loose previous log content   * msvc does not imlement COW on std::strings adjusted the test to use     refs in the loops as auto does not retain ref info   * adjust auto_log rotation test with Windows specific command to remove     a folder. The test previously worked because we have unix utils installed     in house but this may not be the case for everyone.
82f148ef9 Fix test DBCompactionTest.PartialCompactionFailure undeterministic failure
6002801e0 Abandon ROCKSDB_WARNING
4922af6f8 fixed DBTest.GetPropertiesOfAllTablesTest and DBTest.GetUserDefinedTablaProperties flakiness
3bf9f9a83 cleaned up PosixMmapFile a little
fe09a6dae [wal changes 2/3] write with sync=true syncs previous unsynced wals to prevent illegal data loss
06aebca59 Report live data size estimate
85ac65536 Tests to avoid to use TMPDIR directly
f09d45690 Merge pull request #664 from yuslepukhin/add_tests_fix_sanity
31b35c902 Add missing tests, fix db_sanity  Add heap_test, merge_helper_test  Fix uninitialized pointers in db_sanity_test that cause SIGSEV when DB::Open fails in case compression is not linked.
66a3cbc54 Merge pull request #663 from yuslepukhin/fix_windows_build_refactor
ac5e441ad Fix windows build after refactoring   Missing and duplicate files in CMake   Missing definition of port::Crash
02b635fa3 Fix undeterministic failure of DBTest.GetPropertiesOfAllTablesTest
3dbf4ba22 RangeSync not to sync last 1MB of the file
7219088cd Move general compaction tests from db_test.cc to db_compaction_test.cc
0adecd9f4 Add db_inplace_update_test back to Makefile
064294081 Improved FileExists API
9f1de9518 Revert Makefile
6867fb19c Revert "Add missing db_log_iter_test in the test list"
443c6646b Move remaining universal compaction tests from db_test.cc to db_universal_compaction_test.cc
7462286d3 Move in-place-update related tests from db_test.cc to db_inplace_update_test.cc
03467bdd4 Add missing db_log_iter_test in the test list
331954ab8 Fixed DBTestUniversalManualCompactionOutputPathId test
a75f23eb8 Relax assertions in unit DropWrites to be more permissible
ee80432ff db_bench add an option of --universal_allow_trivial_move
58b4209e0 Trigger non-trivial compaction in fault_injection_test
59eca2cc9 Make memenv_test runnable in ROCKSDB_LITE
aa8ac6445 Skip unsupported tests in ROCKSDB_LITE
ce9712d34 Make mock_env_test runnable in ROCKSDB_LITE
c06d1d839 Make merge_test runnable in ROCKSDB_LITE
144d2910d Block backupable_db_test_lite in ROCKSDB_LITE
0d1d9aeeb Block plain_table_db_test in ROCKSDB_LITE
4853e228e Make table_test runnable in ROCKSDB_LITE
f0fe9126f Fix compile for write_callback_test in ROCKSDB_LITE
cf6a7bebc Block cuckoo table tests in ROCKSDB_LITE
20922c4a5 Make compaction_picker_test runnable in ROCKSDB_LITE
6e9fbeb27 Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env
5ec829bc4 Cleaning up CYGWIN define of fread_unlocked to port
26ca89319 Block document_db_test in ROCKSDB_LITE
35ca59364 Don't let flushes preempt compactions
79373c372 Fix ROCKSDB_WARNING
74c755c55 Added JSON manifest dump option to ldb command
a96fcd09b Deprecate CompactionFilterV2
1d20fa9d0 Fixed and simplified merge_helper
aede5cd8e Merge pull request #656 from qinzuoyan/fb-master
d730c3677 Merge pull request #657 from yuslepukhin/ensure_clean_public_headers
ac2b9367f Fix a typo in variable
415c47323 Merge after rebasing
d1a457181 Ensure Windows build w/o port/port.h in public headers
6c0c8dee7 Fix data loss after DB recovery by not allowing flush/compaction to be scheduled until DB opened
e4af3bfb2 Test for compaction of corrupted keys
91bf1b80e Java facility to use the RemoveEmptyValueCompactionFilter
3d00271e4 The ability to specify a compaction filter via the Java API
62dec0e2b RemoveEmptyValueCompactionFilter - A compaction filter which removes entries which have an empty value
c5bca5319 Fix compile on Mac
487bba434 extend temp str buffer size
247690fe3 Ensure Windows build w/o port/port.h in public headers
84c3577af fix append bug in DumpDBFileSummary()
43e982562 Fix mongo build -take 2
d8263d958 Unbreak mongo build
12c5528a8 Bump to RocksDB 3.13
81d072623 move convenience.h out of utilities
beb19ad0d Fixing delete files in Trivial move of universal compaction
c61396069 Build fix.
2c8de0eca Update --help message in db_bench.
6b2d44b2f Refactoring of writing key/value pairs
e1c99e10c Replace std::priority_queue in MergingIterator with custom heap, take 2
9a6a0bd8c Style fix in compaction_job.cc
e94c510c3 Make ldb_test not depend on compression
ddad40e93 Fixed nullptr deref and added assert
1bc8eb877 make coverage should execute sequentially
801df912a Move UniversalCompaction related db-tests to db_universal_compaction_test.cc
3ca6b2541 Move TailingIterator tests from db_test.cc to db_test_tailing_iterator.cc
ce829c77e Make TransactionLogIterator related tests from db_test.cc to db_log_iter_test.cc
c3f98bb89 Move CompactionFilter tests in db_test.cc to db_compaction_filter_test.cc
0936362a7 Block SyncPoint in util/db_test_util.h in released Windows mode.
05e194158 Merge pull request #639 from cleaton/setMaxTableFileSize
fc2b71d9c Merge pull request #655 from adamretter/java-make-resolve-maven
8a9fca261 Better error handling in BackupEngine
18d5e1bf8 Remove db_impl_readonly dependency on utilities
9d22a9737 Resolve Java test dependencies from local maven repo if present
49640bd82 Allow write_batch_test to run with ROCKSDB_LITE
a9c510951 Deprecate purge_redundant_kvs_while_flush
5aea98ddd Deprecate WriteOptions::timeout_hint_us
ae29495e4 Avoid manipulating const char* arrays
ab137af4b Partial cleanup of CompactionJob
1879d9370 Add ldb_test.py back to `make check`
b10cf4e2e Move DynamicLevel related db-tests to db_dynamic_level_test.cc
e290f5d3c Block reduce_levels_test in ROCKSDB_LITE
04d201fa0 Block spatial_db_test in ROCKSDB_LITE
49f42ad03 Move global static functions in db_test_util to DBTestBase
625467a08 Move reusable part of db_test.cc to util/db_test_util.h
e8e8c9049 fix compile for optimistic_transaction_test under ROCKSDB_LITE
8bca83e5d Add tombstone information in CompactionJobStats
f9728640f "make format" against last 10 commits
76d3cd328 Fix public API dependency on internal codes and dependency on MAX_INT32
5fd11853c Print Fast CRC32 support information in DB LOG
a6e38fd17 Fix a uncleaned counter in PerfContext::Reset()
e41cbd9c2 Merge pull request #646 from yuslepukhin/ms_win_port
4cab5ebec Merge branch 'ms_win_port' of https://github.com/yuslepukhin/rocksdb into ms_win_port
296de4ae6 Address review comments  Rule of five: add destructor  Add a note to COMMIT.md for 3rd party json.
041b6f95a perf_context: report time spent on reading index and bloom blocks
d08ba9f0c Merge branch 'ms_win_port' of http://vstfbing:8080/tfs/Bing/_git/repo.RocksDB into ms_win_port
805fe84ba Conditional use of third-party libraries  Committed by Alexander Zinoviev <alexander.zinoviev@me.com> 7/9/2015 2:42:41 PM
5555cc500 Improve build system
c903ccc4c Merge from github/master
54d124a38 Conditional use of third-party libraries
7189e90c2 Fix a noisy unit test.
1f4d56570 Add db_bench flag to set cache_index_and_filter_blocks
5c7913233 Revert the changes related to Options, as requested to seperate them into a different patch.
d8586ab22  All of these are in the new code added past 3.10      1) Crash in env_win.cc that prevented db_test run to completion and some new tests      2) Fix new corruption tests in DBTest by allowing a shared trunction of files. Note that this is generally needed ONLY for tests.      3) Close database so WAL is closed prior to inducing corruption similar to what we did within Corruption tests.
4bed00a44 Fix function name format according to google style
e2e3d84b2 Added multi WAL log testing to recovery tests.
5219226d3 Merge branch 'ms_win_port' of http://vstfbing:8080/tfs/Bing/_git/repo.RocksDB into ms_win_port
ef4b87f1b Commit both PR and internal code review changes
95f4c2bcb Conditional use of 3rd-party libraries
4f56632b1 Fix occasional failure in compaction_job_test
411c8e3d1 Build fail fix
b7a2369fb Revert "Replace std::priority_queue in MergingIterator with custom heap"
c0b23dd5b Enabling trivial move in universal compaction
d8e3e766f Fixed a bug in test ThreadStatusSingleCompaction
57d216ea6 Remove assert(current_ == CurrentReverse()) in MergingIterator::Prev()
59b50dcef Update HISTORY.md for Listener
4ce5be425 fixed leaking log::Writers
685582a0b Revert two diffs related to DBIter::FindPrevUserKey()
e12b40399 Initialize threads later in constructor
58d7ab3c6 Added tests for ExpandWhileOverlapping()
155ce60da Fix compaction_job_test
b6655a679 Replace std::priority_queue in MergingIterator with custom heap
e25ee32e3 Arena needs mman header for mmap
d2f0912bd Merge the latest changes from github/master
35cd75c37 Introduce InfoLogLevel::HEADER_LEVEL
acee2b08a Fixed endless loop in DBIter::FindPrevUserKey()
218487d8d [wal changes 1/3] fixed unbounded wal growth in some workloads
feb99c31a Merge remote-tracking branch 'origin' into ms_win_port
e70115e71 Fix unity build by removing anonymous namespace
4159f5b87 Prepare 3.12
a69bc91e3 Multithreaded backup and restore in BackupEngineImpl
9dbde7277 Merge remote-tracking branch 'origin' into ms_win_port
03d433ee6 [RocksJava] Fixed test failures
326da912d Add string.h to Histogram as we init the array out of curly braces
ca2fe2c1b Address GCC compilation issues
19e13a595 Fix header inclusion
18285c1e2 Windows Port from Microsoft
c00948d5e [RocksJava] Fix test failure of compactRangeToLevel
05e283196 Allocate LevelFileIteratorState and LevelFileNumIterator from DB iterator's arena
436ed904d Add rpath option to production builds for 4.8.1 toolchain
b0f1927db Increasing timeout for drop writes.
ec70fea4c Fix a comparison in DBIter::FindPrevUserKey()
501591c42 Make column_family_test runnable in ROCKSDB_LITE
91cb82f34 Merge branch 'master' of github.com:facebook/rocksdb
09f5a4b48 set -e in fb_compile_mongo.sh
6199cba99 Fix race in unit test.
0a019d74a Use malloc_usable_size() for accounting block cache size
4cbc4e6f8 Call merge operators with empty values
619167ee6 Fix mac compile
472e64d39 Improve fb_compile_mongo.sh
c9cd404bc Make flush check for shutdown
4fb09c687 Updating SeekToLast with upper bound
dadc42976 Reproducible MongoRocks compile with FB toolchain
62a8fd154 Make stringappend_test runnable in ROCKSDB_LITE
48da7a9ca Improve the comment for BYTES_READ in statistics.
72cab8895 Block redis_test in ROCKSDB_LITE
dec2c9f56 Make table_properties_collector_test runnable in ROCKSDB_LITE
0b1ffe2e1 Remove -Wl,--no-as-needed flag when making shared_lib in OSX and IOS
674b1181c Bottommost level compaction option
782a1590f Implement a table-level row cache
de85e4cad Introduce WAL recovery consistency levels
530534fce Fix trivial move merge
7015fd81c Add read_nanos to IOStatsContext.
7160f5d80 Fix broken gflags link
dda74111a add setMaxTableFilesSize Options unit test
d62b6ed83 add setMaxTableFilesSize to JNI interface
e1d3c7dbe Fixing valgrind error in checkpoint_test
3bdec09cb Remove ldb_tests.py from make check until it is working again.
15325bf55 First version of rocksdb_dump and rocksdb_undump.
04251e1e3 Add wal files to Checkpoint for multiple column families.
18cc5018b Fix memory leaks in PinnedUsageTest
bf03f59c1 Disable CompressLevelCompaction() if Zlib is not supported
df719d496 Make autovector_test runnable in ROCKSDB_LITE
4d6d47688 Block geodb_test in ROCKSDB_LITE
71b438c4a Remove unused target --- compactor_test
eade498bd Block utilities/write_batch_with_index in ROCKSDB_LITE
760e9a94d Fail DB::Open() when the requested compression is not available
69bb210d5 Add Cache.GetPinnedUsageUsage()
4eabbdb7e Skip bottommost level compaction if possible
4b8bb62f0 Don't dump DBOptions for each column family
176f0bedc Merge branch 'master' of github.com:facebook/rocksdb
bb1c74ce1 Fixed a bug of CompactionStats in multi-level universal compaction case
a66b8157d Merge branch 'master' of github.com:facebook/rocksdb
f06be62fd Replace %llu with format macros in ParsedInternalKey::DebugString())
2dc3910b5 Add --benchmark_write_rate_limit option to db_bench
12e030a99 Use CompactRangeOptions for CompactRange
c89369f57 Move dockerbuild.sh to build_tools/
4716ab4d1 Merge pull request #638 from HolodovAlexander/master
25d600569 Clean up InstallSuperVersion
1369f015e Only initialize the ThreadStatusData when necessary.
1a08d0beb Block c_test in ROCKSDB_LITE
40f562e74 Allow GetApproximateSize() to include mem table size if it is skip list memtable
d59d90bb1 db_bench periodically writes QPS to CSV file
46296cc86 Cygwin build not to use -fPIC
bee8d033f Removed two unused macros in iostats_context
5fec96387 Fixed false alarm of size comparison in compaction_job_stats_test
cccd2199a Revert skip bottommost compaction
20f2b5425 Skip bottom most level compaction if no compaction filter
7842920be Slow down writes by bytes written
a84df655f Don't let two L0->L1 compactions run in parallel
d6ce0f7c6 Add largest sequence to FlushJobInfo
ab455ce49 fix clang build
3eddd1abe Add Env::GetThreadID(), which returns the ID of the current thread.
73faa3d41 Handling edge cases for ReFitLevel
bffaf0a8b Merge pull request #631 from mkhq/patch-1
821cff114 Re-generate WriteEntry on WBWIIterator::Entry()
8b7be1808 Updated OS X instructions, replace homebrew/dupes with homebrew/versions
d03f11090 Link all libraries when building shared libraries
75222d130 Revert "Fix compile"
47f1e7212 Merge pull request #630 from rdallman/c-wb-logdata
51440f83e Fix compile
4949ef08d Re-generate WriteEntry on WBWIIterator::Entry()
735df6655 C: add WriteBatch.PutLogData support
e409d3d74 Make "make all" work for CYGWIN
62c3a9579 Add test for iteration+mutation of WBWI
d9b3338eb Add Yahoo's blog post about Sherpa to USERS.md
75d7075a8 Print info message about files need compaction for debuging purpose
406a5682e Fix hang when closing a DB after doing loads with WAL disabled.
d8c8f08c1 GetSnapshot() and ReleaseSnapshot() to move new and free out of DB mutex
643bbbf08 Use nullptr for default compaction_filter_factory
21f2492ac Fix CYGWin release build
f02ce0c65 Fix ASAN errors in c_test
133130a4f Merge pull request #625 from rdallman/c-slice-parts-support
de4d172d0 Merge pull request #622 from rdallman/c-multiget
6df589b44 Add TablePropertiesCollector::NeedCompact() to suggest DB to further compact output files
2e764f06e [API Change] Improve EventListener::OnFlushCompleted interface
7322c7401 Revert incorrect commit
31e60e2a7 Unlock mutex in ReFitLevel
7647df8f9 Fixed the tsan failure in util/compaction_job_stats_impl.cc
b2785472c Fix compile
3ce3bb3da Allowing L0 -> L1 trivial move on sorted data
bb808eadd Changed the CompactionJobStats::output_key_prefix type from char[] to string.
0b3172d07 Add EventListener::OnTableFileDeletion()
211a195d4 C: add MultiGet support
5dc174e11 C: add support for WriteBatch SliceParts params
2d0b9e5f0 Fix compile on darwin
3af668ed1 Fix DBTest.MigrateToDynamicLevelMaxBytesBase slowness with valgrind
408cc4b8e Revert "Merge pull request #621 from rdallman/c-slice-parts-support"
78382d4ba Merge pull request #621 from rdallman/c-slice-parts-support
ca8b85ac0 better document max_write_buffer_number_to_maintain
0483dab2a Remove a TODO that has been done
8afafc278 Fix compile warning in db/db_impl
fe5c6321c Allow EventListener::OnCompactionCompleted to return CompactionJobStats.
3083ed212 Fixed heap-use-after-free error in compaction_job_test.cc
8d8d4e45b Fixed ROCKSDB_LITE compile error due to the missing of TableFileCreationInfo
ab946af08 Fix a compile warning in listener_test.cc
fc8382127 Add EventListener::OnTableFileCreated()
898e803fc Add a stats counter for DB_WRITE back which was mistakenly removed.
ac81130fa Fix Bug: CompactRange() doesn't change to correct level caused by using wrong level
ec7a94436 more times in perf_context and iostats_context
4266d4fd9 Allow users to migrate to options.level_compaction_dynamic_level_bytes=true using CompactRange()
d333820ba Removed DBImpl::notifying_events_
495ce6018 Fixed compile warning in compact_files_example.cc
2ecac9f96 add rocksdb::WritableFileWrapper similar to rocksdb::EnvWrapper
a187e66ad Merge pull request #617 from rdallman/wb-merge-sliceparts
16c197627 Fixed db_stress
4c181f08b Fix compile on darwin
bc7a7a400 fix LITE build
832271f6b Fixed a compile warning in db_stress in NDEBUG mode.
dc9d70de6 Optimistic Transactions
d5a0c0e69 Fixed a compile warning in db_stress
ebfdb3c7f Fixed a compile error in ROCKSDB_LITE
9ffc8ba02 Include EventListener in stress test.
a3da59022 Decrease number of jobs in make release
21cd6b7ad C: add support for WriteBatch SliceParts params
a0635ba3f WriteBatch.Merge w/ SliceParts support
c81535103 Support saving history in memtable_list
ec4ff4e99 Rename EventLoggerHelpers EventHelpers
672dda9b3 [API Change] Move listeners from ColumnFamilyOptions to DBOptions
3ab8ffd4d Compaction now conditionally boosts the size of deletion entries.
a81ac2412 Merge pull request #615 from rdallman/master
6d299b70b Fixed a bug in EventLoggerHelpers::LogTableFileCreation
a0580205c Removed an unused private variable in db_impl.h
328ad902a update an import path to fit in with the rest of the kids
9c38ce1d0 C: extra bbto / noop slice transform
8d26799fe Merge pull request #614 from arschles/docker
32198343f fix typo in c_simple_example
6116ccc23 moving dockerfile to root
d90cee9fd adding docker build script and dockerfile
ea6d3a8ac Don't skip last level when calculating compaction stats
5c224d1b7 Fixed two bugs on logging file deletion.
dc81efe41 Change the log-level of DB summary and options from INFO_LEVEL to WARN_LEVEL
687214f87 Ensure ColumnFamilyOptions.num_levels >= 2 when level compaction is used.
2abb59268 Avoid logging under mutex in DBImpl::WriteLevel0TableForRecovery().
309a9d076 Run tests sequentally if J=1
7fee8775a Allow EventLogger to directly log from a JSONWriter.
7a3577519 Don't artificially inflate L0 score
4cb4d546c Set stats_dump_period_sec to 600 by default
e2c1d4b57 [Public API Change] Make DB::GetDbIdentity() be const function.
eaf61ba9f Minor text correction
f16c0b289 Merge pull request #613 from DerekSchenk/DerekSchenk-patch-issue-606
d1a978ae3 Rename JSONWritter to JSONWriter
3e0817541 Add LDFLAGS to Java static library
812c461c9 Dump db stats in WARN level
b588505a7 Update HISTORY.md for GetThreadList() update.
944043d68 Add --wal_bytes_per_sync for db_bench and more IO stats
d5de04d20 Update history for 3.11
08b6b3796 FORCE_GIT_SHA
04feaeebb Fix comparison between signed and usigned integers
4a855c079 Add an option wal_bytes_per_sync to control sync_file_range for WAL files
b0fdda4ff Allow flushes to run in parallel with manual compaction
74f3832d8 Fixed compile errors due to some gcc does not have std::map::emplace
0c8017dba Remove duplicated code
fb5bdbf98 DBTest.DynamicLevelMaxBytesCompactRange: make sure L0 is not empty before running compact range
6fa708512 CompactRange skips levels 1 to base_level -1 for dynamic level base size
84a9c6a53 add comment
eeb44366b C api: human-readable statistics
3f0867c0f Allow GetThreadList to report Flush properties.
a66f643e9 Use a better way to initialize ThreadStatus::kNumOperationProperties.
7413306d9 Take a chance on a random file when choosing compaction
8c52788f0 Use version defined in Makefile in rocksdb_build_git_sha
5aad88129 DBTest.DynamicLevelMaxBytesBase2: remove an unnecesary check
ec43a8b9f Universal Compaction with multiple levels won't allocate up to output size
714fcc067 Make ThreadStatus::InterpretOperationProperties take const uint64_t*
bc68bd5a1 db_bench to support rate limiter
df1f87a88 Fixed compile error in db/column_family.cc
14431e971 Fixed a bug in EventListener::OnCompactionCompleted().
dbd95b753 Add more table properties to EventLogger
b5881762b Reset parent_index and base_index when picking files marked for compaction
711465cce API to fetch from both a WriteBatchWithIndex and the db
3996fff8a Fix clang build - add override
d97813906 SuggestCompactRange() is manual compaction
2fe24e4b5 Don't treat warnings as error when building rocksdbjavastatic
beda81c53 rm -rf in make clean
50eab9cf3 Fix BackupEngine
962f8ba33 Bump to 3.11
37bbd3185 Merge pull request #601 from adamretter/jdb-bench
77a5a543a Allow GetThreadList() to report basic compaction operation properties.
65fe1cfbb Cleanup CompactionJob
df4130ad8 fix crashes in stats and compaction filter for db_ttl_impl
7ea769487 Fix flakiness in column_family_test
a2c4cc756 Don't treat warnings as error when building release
9aa011fa3 Optimize GetRange Function
36a740889 Fix UNLIKELY parenthesis
9bdbaab94 Update USERS.md
2ab7065af build: avoid unused-variable warning
88044340c Add Size-GB column to benchmark reports
d2346c2cf Fix hang with large write batches and column families.
b6b100fe0 Remove iter_refresh_interval_us
197f01b7b Bugfix remove deprecated option use which was removed in previous commit 019ecd19329ee895284e9b040df0ffe4c08b35d8
aa094e8ea Fix conversion from nano-seconds to milli-seconds and seconds
dddceefe5 Fix clang build
d4540654e Optimize GetApproximateSizes() to use lesser CPU cycles.
fd96b5540 Making GetOptions() comment better (#597)
7246ad34d Don't compact bottommost level in SuggestCompactRange
7f47ba0e2 Fix possible SIGSEGV in CompactRange (github issue #596)
aba005c44 Merge pull request #585 from fyrz/RocksJava-RemoveDeprecatedStuff
d6f39c5ae Helper function to time Merges
a087f80e9 Add scripts to run leveldb benchmark
1bb4928da Include bunch of more events into EventLogger
3db81d535 Fix memory leak in cache_test introduced in the previous commit
4961a9622 Fix build
93ab1473d Merge pull request #593 from charsyam/feature/type-1
6ede020dc fix typos
3d1af4ae6 Don't preinstall jemalloc in Travis
242f9b4c2 Fix CLANG build issue introduced in previous commit
794ccfde8 Task 6532943: Rocksdb - SetCapacity() can dynamically change cache capacity if feasible
98a44559d Build for CYGWIN
d01bbb53a Fix CompactRange for universal compaction with num_levels > 1
e003d3864 Abstract out SetMaxPossibleForUserKey() and SetMinPossibleForUserKey
fd7a35731 Enable open source users to use jemalloc (github issue #438)
aa14670b2 Add an assertion in CompactionPicker
2dc421df4 Implement DB::PromoteL0 method
9bf40b64d Print max score in level summary
397b6588b options.paranoid_file_checks to read all rows after writing to a file.
283a04296 Set --seed per test
618d07b06 Making PreShutdown tests more reliable.
0a91bca5d test: avoid vuln-inducing use of temporary directory
6e359419f Add rpath for production builds
78dbd087d Improve benchmark scripts
6a5ffee0c Fix gflags Makefile
108a927f0 Merge pull request #589 from coderplay/patch-1
a58fd7427 Update USERS.md
d85d08c7b One last fix to Makefile
2db96dca1 Fix make install when there is no shared lib
7d136994c Get rid of error output
79c1b021a Fix Makefile
742fa9e31 Fix compile with two gflags
79c21ec0c skip ioctl-using tests when not supported
6059bdf86 Add experimental API MarkForCompaction()
acf8a4141 maint: use ASSERT_TRUE, not ASSERT_EQ(true; same for false
b5400f90f Kill dead code
48b0a045d Speed up reduce_levels_test
00c2afcd3 Fix bug in ExpandWhileOverlapping()
019ecd193 [RocksJava] Remove deprecated methods
98ef21d2f Merge pull request #584 from pshareghi/rocksdb-3.10-falloch
5b7131c75 [RocksJava] Removed deprecated skipLogErrorOnRecovery methods.
566f65271 [RocksJava] Removed deprecated ColumnFamilyDescriptor methods
6997aa0b6 Merge pull request #582 from fyrz/RocksJava-Fix-RateLimiter
582c4b0f7 [RocksJava] Fix RateLimiter Tests in 3.10
6cfb2150d Merge pull request #581 from vladb38/patch-3
d71e8f7ad Update USERS.md
debaf85ef Bug of trivial move of dynamic level
12d7d3d28 Fix and Improve DBTest.DynamicLevelCompressionPerLevel2
a1271c6c6 Fix build break introduced by new SyncPoint interface change
fcb206b66 SyncPoint to allow a callback with an argument and use it to get DBTest.DynamicLevelCompressionPerLevel2 more straight-forward
281db8bb6 Temporarily disable test CompactFilesOnLevelCompaction
e8808b912 Added falloc.h in build_detect_platform
1983fadcb assert(sorted) in vector rep
9da874801 Get benchmark.sh loads to run faster
9b983befa Fix flakiness of WalManagerTest
d41a565a4 Don't do O(N^2) operations in debug mode for vector memtable
08be1803e Fix bad performance in debug mode
0a0501c8d Add Xfunc to makefile
e7ad14926 Fix flakiness in FIFOCompaction test (github issue #573)
abb405227 Kill benchharness
894e9f745 Update Patent Grant.
590fadc40 Fix compile warning on CLANG
47b874398 Make Compaction class easier to use
753dd1fdd Fix valgrind issues in memtable_list_test
697380f3d Repairer documentation improvement.
2f66d7f92 Add LinkedIn back to USERS.md
0feeee643 Fix memtable_list_test
7b9581bc3 Fixed xfunc related compile errors in ROCKSDB_LITE
fabc11569 MemTableList tests
9741dec0e Fix a compile error in ROCKSDB_LITE in db/db_impl.cc
465b25ca9 "make commit-prereq" doesn't really build ROCKSDB_LITE
d2a056241 Fix a compilation error in ROCKSDB_LITE in db/internal_stats.h
316ec80bf fault_injection_test: add a test case to cover log syncing after a log roll
ed229a0de Fixes for readcache-flashcache
91df4e969 Remove use of whole-archive to include jemalloc
84c5bd7eb Add thread-safety documentation to MemTable and related classes
ee9bdd38a Script to check whether RocksDB can read DB generated by previous releases and vice versa
2b019a151 Enabling checksum in repair db as it should have been.
b1bbdd791 Create EnvOptions using sanitized DB Options
edbb08b5d Fix Makefile
199313dc3 build: create .o files specifically for java-related targets
b118238a5 Trivial move to cover multiple input levels
e7adfe690 Fix formatting of USERS.md
4e7543dcf Add USERS.md
58346b9e2 Log writer record format doc.
db6569cd4 Fix the compilation error in flashcache.cc on Mac
cba592001 build: don't use a glob for java/rocksjni/*
c66483c13 Fix github issue #563
de22c7bd1 Integrate Jenkins with Phabricator
f12614070 Fix TSAN build error of D36447
824e64634 Adding another NewFlashcacheAwareEnv function to support pre-opened fd
5e067a7b1 Clean up compression logging
e3ee98b38 run 'make check's rules (and even subtests) in parallel
a45e7581b Avoid naming conflict of EntryType
3be82bc89 Add p99.9 and p99.99 response time to benchmark report, add new summary report
953a885eb A new call back to TablePropertiesCollector to allow users know the entry is add, delete or merge
d2a92c13b avoid returning a number-of-active-keys estimate of nearly 2^64
a7ac6cef1 Fix level size overflow for options_.level_compaction_dynamic_level_bytes=true
089509b84 db_test: clean up sync points in test cleaning up
afbafeaea Disallow trivial move if compression level is different
d0695f3e2 Fix crash caused by opening an empty DB in readonly mode
51c8133a7 Fix make unity build compiler warning about "stats" shadowing global variable
df71c6b9e Script to trigger jenkins test
38a01ed1b Update COMMIT.md
76d63b452 Fix one non-determinism of DBTest.DynamicCompactionOptions
b23bbaa82 Universal Compactions with Small Files
2511b7d94 Makefile minor cleanup
1bd70fb54 Add --stats_interval_seconds to db_bench
fd3dbef22 Clean up old log files in background threads
99ec2412e Make the benchmark scripts configurable and add tests
2158e0f83 Fix clang build
d61cb0b9d db_bench can now disable flashcache for background threads
1c47c433b build: always attempt to update util/build_version.cc
e018892bb Formalize the DB properties string definitions.
cfa576402 Make auto_sanity_test always use the db_sanity_test.cc of the newer commit.
e9fddb7a2 Merge pull request #560 from xiaoxichen/patch-1
bcd8a71a2 Fix interger overflow on i386 arch
030859eb5 Dump compression info on startup
3539e0644 Merge pull request #558 from aamihailov/master
a3e4b3248 fix compilation error (same as fix #284)
ff1ff7c62 TSAN: avoid new link failure with -pg
39d508e34 Add a missing section title in HISTORY.md
727684bf9 Fixed a typo in RocksDBSample.java
ca25e86ef build: cause the "check" rule to depend on $(PROGRAMS)
986bdc680 Merge branch 'master' of github.com:facebook/rocksdb
1e57f2bf2 Fix build
2d417e52d Update HISTORY.md for 3.10.0
cbd6a2073 Merge branch 'master' of github.com:facebook/rocksdb
211ca26ae Fixing build issue
2495f9396 Merge pull request #555 from pshareghi/staticLZ4
f06de5f23 Merge pull request #556 from fyrz/RocksJava-Maven-Fix
cd987c383 Fix compile error when NROCKSDB_THREAD_STATUS is not used.
8f104ae5e [RocksJava] Maven build fix
3d1a924ff Adding stats for the merge and filter operation
afc51649e Merge pull request #546 from fyrz/RocksJava-MemEnv
4806cc126 Added static lz4 support for roccksjavastatic
6284eef4c Merge pull request #545 from fyrz/RocksJava-Level-Compression
248c063ba Report elapsed time in micros in ThreadStatus instead of start time.
315abac94 Undeprecate GetLiveFiles()
a057bb2a8 Improve ThreadStatusSingleCompaction
868968c8e Merge branch 'master' of github.com:facebook/rocksdb
689391406 Make SSTDumpTest.GetProperties less noisy
8d8656243 Merge pull request #551 from fyrz/RocksJava-JavaDoc-Fix
f8c505b23 Merge pull request #550 from fyrz/RocksJava-Sample-Fix
46443bfa9 [RocksJava] Add missing JavaDoc annotations
864b7e88f [RocksJava] Java sample bugfix
2b2394cbb [RocksJava] DBBenchmark option for RocksMemEnv
fd8804f97 [RocksJava] Expose MemEnv in RocksJava Summary: In 3.10 the C++ code was extended with a MemEnv implementation. This is now also available in RocksJava.
004b89fba [RocksJava] Add compression per level to API
51da3aab4 Merge pull request #536 from fyrz/RocksJava-32-Bit-adjustment
b7e88cfb5 Merge pull request #543 from fyrz/RocksJava-Logger-Comment
38d286f14 Clean-up WAL directory before running db_test
28bc6de98 rocksdb: print status error message when (ASSERT|EXPECT)_OK fails
9405b5ef8 rocksdb: Remove #include "util/string_util.h" from util/testharness.h
220d0dff7 rocksdb: Remove #include "util/random.h" from util/testharness.h
b088c83e6 Don't delete files when column family is dropped
17ae3fcbc rocksdb: initial util/testharness clean up
39f4271be [RocksJava] Enhanced Logger comment
5615e23d8 [RocksJava] 32-Bit adjustments
836bcc2f0 Merge pull request #532 from fyrz/RocksJava-LevelCompactionDynamicLevelBytes
67d995808 rocksdb: fix make unity
52e0f3353 Clean up compactions_in_progress_
6b626ff24 rocksdb: change db_test::MultiThreadedDBTest as value parameterized test.
9720ea4de A build option to run through all check-in requirements.
0831a3599 Add a DB Property For Number of Deletions in Memtables
f7ed65464 Fix RocksJava test failure due to deprecation of table_cache_remove_scan_count_limit
51301b869 Enable dynamic changing of rate limiter's bytes_per_second
652db51a3 Fix compilation error in rocksjni/write_batch_test.cc
dfccc7b4e Add readwhilemerging benchmark
c345d1ee8 [RocksJava] Integrated changes for D34857
12350115d [RocksJava] Added LevelCompactionDynamicLevelBytes to Options
230e68727 Fix TSAN failue in env_test
155d468c5 Using chrono as a fallback
81345b90f Create an abstract interface for write batches
46214df4a Only run db_test in Travis
c88ff4ca7 Deprecate removeScanCountLimit in NewLRUCache
b4b69e4f7 rocksdb: switch to gtest
413e35273 Merge pull request #540 from dalgaaf/wip-da-fix-elif
969aa806b util/xfunc.h: fix #elif check for NDEBUG
87c7d49d6 util/env_posix.cc: fix #elif check for __MACH__
c86e5d7b9 stack_trace.cc: fix #elif check for OS_MACOSX
98c37fda5 Remove unused parameter in CancelAllBackgroundWork
9fd6edf81 rocksdb: Replace ASSERT* with EXPECT* in functions that does not return void value
d4d42c02e Fixed clang build in env.h
b2b308652 Speed up rocksDB close call.
a7aba2ef6 rocksdb: Add gtest
95344346a rocksdb: Small refactoring before migrating to gtest
bd4963e64 rocksdb: update reference to the latest version of clang dev in fbcode
56337faf3 Fix compaction IO stats to handle large file counts
eafa1bfc3 Merge pull request #529 from fyrz/RocksJava-Logger
ac03c4d51 Merge pull request #522 from fyrz/RocksJava-Optimize-Filters-For-Hits
c6967a1a5 Make RecordIn/RecordOut human readable
c8da67032 Stop printing per-level stall times.
04778a94c [RocksJava] OptimizeFiltersForHits
57f2a00c6 RocksJava - JNI Logger callback
814627af3 [RocksJava] Change log level at runtime in custom logger
a3bd4142f [RocksJava] Logging JNI callback
58878f1c6 Switch to use_existing_db=1 for updaterandom and mergerandom
12134139e Fixed the unit-test issue in PreShutdownCompactionMiddle
fd1b3f385 Fix the issue in PreShutdownMultipleCompaction
56c4a9c76 Fix compile warning in thread_status_util.h on Mac
417367c42 Fix SIGSEGV when not using cache
e25ff039c Prevent slowdowns and stalls in PreShutdown tests
f69071265 Speed up db_bench shutdown
c1b3cde18 Improve the robustness of ThreadStatusSingleCompaction
8c12426c9 Fix the deadlock issue in ThreadStatusSingleCompaction.
b16ead531 DBTest.DynamicLevelCompressionPerLevel should not run without snappy support
a5e60bafc Fix a typo / test failure in ThreadStatusSingleCompaction
cb2c91850 Don't run some tests is snappy is not present
c594b0e89 Allow GetThreadList() to report operation stage.
2623b2cf6 Include chrono
52d8347a9 EventLogger
756532daf Merge pull request #524 from fyrz/RocksJava-Test-Fix
47a2b3a40 Merge pull request #534 from fyrz/RocksJava-Fix-BrokenJacocoReport
9d22a1f13 Allow negative Wnew
2c84303aa Merge pull request #528 from fyrz/RocksJava-NativeLibraryLoader
2dc636f62 [RocksJava] Fix broken jacoco report
f210b0f6c [RocksJava] Fix NativeLibraryLoader
3ebebfccd Prevent xxhash symbols from polluting global namespace
53996149d Removing unnecessary kInlineSize
b411d0603 Prevent stalls in preshutdown tests
1d43bc41f Fixing segmentation fault in db_bench
e9de8b65a Change the way options.compression_per_level is used when options.level_compaction_dynamic_level_bytes=true
2b785d76b Fixed a bug where CompactFiles won't delete obsolete files until flush.
6f5579868 Fixed a compile error in db_bench in mac.
05d92efa7 Add convenience.cc to src.mk
2884b100b db_bench: Better way to randomize repeated read keys in -read_random_exp_range
284be570c Provide a mechanism to inform Rocksdb that it is shutting down
2ddf53b2c Get OptimizeFilterForHits work on Mac
480b28476 Fix make_new_version.sh
89597bb66 Allow GetThreadList() to report the start time of the current operation.
37921b499 db_bench: Add Option -read_random_exp_range to allow read skewness.
485ac0dbd Add rate_limiter to string options
e126e0da5 Single threaded tests -> sync=0 Multi threaded tests -> sync=1 by default unless DB_BENCH_NO_SYNC is defined
dc4532c49 Add --thread_status_per_interval to db_bench
34c75e984 fix-up patch: avoid new link error
ebc647de8 build: fix missing dependency problems
492f6d27e Fix a segfault in fbson under Mac OS X compiler
0d13bbe27 RocksJava] Fix ColumnFamily tests
67533809f [RocksJava] Fixed CompactionTest
1b7b997b8 [RocksJava] Remove MaxValue from Statistics
f862b3812 [RocksJava] Fix cleanup in tests
a01b59259 [RocksJava] DefaultColumnFamily Memory Fix
22c73d15b [RocksJava] Fix ColumnFamily tests
694988b62 Fix a bug in stall time counter.  Improve its output format.
b8d23cdcb Revert chrono use
db0373934 options.level_compaction_dynamic_level_bytes to allow RocksDB to pick size bases of levels dynamically.
f29b33c73 Add functionality to pre-fetch blocks specified by a key range to BlockBasedTable implementation.
c4bd03a97 Fix typo in log message
3cf7f353d Instrument memtable seeks
216a9e16f Fix compile
b9ff6b050 Fix a bug in ReadOnlyBackupEngine
afa8156af adding stdlib to fbson
f9c14a42e Fix compile on Mac
a9f0e2b5b Fix compile
e7c434c36 Add columnfamily option  optimize_filters_for_hits to optimize for key hits only
ba9d1737a RocksDB on FreeBSD support
4ba119df5 rocksdb: Update path to dev clang in fbcode
8984e5f84 Fix race in sync point.
03b432d4b rocksdb: Fix uninitialized use error
ccef2a766 Merge pull request #518 from fyrz/RocksJava-Native-Library-Loader-Fix
9fcf1a7b0 [RocksJava] RocksJava Testcases
03bbf718c Return fbson
62247ffa3 rocksdb: Add missing override
1e06a4068 Support builds for MongoDB+RocksDB
b74ad6632 Merge pull request #508 from fyrz/RocksJava-Final-Patch
d9f4875e5 Disable pre-fetching of index and filter blocks for sst_dump_tool.
182b4ceac Limit key range to number of keys, not number of writes
a360bb61b Merge pull request #516 from fyrz/RocksJava-Update-Statistics-To-3.10
8c7684474 [RocksJava] Updated TickerTypes and Histogram to 3.10
7f0c77cb3 [RocksJava] Integrated changes from D33417
819e787bb [RocksJava] Final usage correction
5139e678b Upgrade compiler in Travis
4ade89962 Fix compile error on MacOS.
ace3d8506 Revert "Unused managed iterator"
7b8f348e5 Attempt at fixing travis issue
d85993998 Merge pull request #506 from fyrz/RocksJava-Raw-Use
30e93c9b9 Merge pull request #505 from fyrz/RocksJava-Redundant-Modifier
217854dc4 Introduce DISABLE_WARNING_AS_ERROR in Makefile
bd339a979 Unused managed iterator
174a79c99 LevelDb include guard replaced with #pragma once
6fdda8ac4 rocksdb: changes to support 'make analyze' in Jenkins
96d989f70 catch config errors with L0 file count triggers
62f7a1be4 rocksdb: Fixed 'Dead assignment' and 'Dead initialization' scan-build warnings
5636c4a80 Verbose build in travis
a047409ae Fixed a bug in the test case
4f514a53d build: enable more compiler warnings
a2b911b63 inputs: restore "const" attribute removed by D33759
1b4082581 mark as unused some variables with cpp-derived names
c6d54b503 fix erroneous assert: cast kBlockSize (of type unsigned int) to "int"
aa5d8e6d9 table_test.cc: add missing 5th arg in TestArgs initializer
c37937a9c maint: remove extraneous "const" attribute from return type
9283c7afd build: remove always-true assertions
06a766de5 Adding Flush to AutoRollLogger
92416fa7f Fix mac build
96ab15d30 GetOptionsFromString + fixes to block_based_table_options
73711f956 rocksdb: Fix scan-build bug 'Memory leak' in db/db_bench.cc
98870c7b9 rocksdb: Fix scan-build memory warning in table/block_based_table_reader.cc
a42324e37 build: do not relink every single binary just for a timestamp
d45a6a400 Add rocksdb.num-live-versions: number of live versions
11581b741 build: abbreviate AR command, too
b8ac71ba1 Revert "Fbson to Json"
7ce1b2c19 Fbson to Json
7d817268b Managed iterator
b4b8c25a5 build: factor out AM_LINK command (trivial)
dc885c6e9 build: make "make" output readable by default
a37b46ae1 build: fix Makefile inconsistencies (trivial)
55277c328 build: remove unused rules: rocksdb_shell, DBClientProxy_test
3ad6b794c rocksdb: Fix 'Division by zero' scan-build warning
12753130e Remove ThreadStatusMultiCompaction test
f0c36da6e Add thread_status_util_debug.cc back
daebb1f91 build: running "make" with no arguments must not "uninstall"
e60bc99fe Allow GetThreadList to reflect flush activity.
b9a0213cd build: fix unportable Makefile syntax
4e4b85784 rocksdb: Fix scan-build 'Called C++ object pointer is null' and 'Dereference of null pointer' bugs
b3fd16226 build: remove unportable use of sed in favor of $(CXX)'s -MT
e7ea51a8e Introduce job_id for flush and compaction
6a0e737d9 [RocksJava] Raw use of parametrized class
439701270 [RocksJava] Redundant access-modifier in interfaces
2d62e8051 Merge pull request #504 from fyrz/RocksJava-Flush-Correction
eaf39568e [RocksJava] FlushOptions Correction
5d1151deb Added simple monitoring script to monitor overusage of memory in db_bench
5f00af457 DBTest.DestroyDBMetaDatabase: create DB directories if not exists
68af7811e Remember whole key/prefix filtering on/off in SST file
fd5970b45 Merge pull request #503 from weiweisd/master
513ad866b modify double type euqal compare in json_document.cc
933973dc2 Merge pull request #495 from fyrz/RocksJava-CF-Name-Byte-Handling
5e8e453d5 [RocksJava] Integrated changes from D33165
677d02427 [RocksJava] CF Name shall handle bytes correctly
d1cafc089 Merge pull request #1 from facebook/master
6d6305dd7 Perf Context to report DB mutex waiting time
863009b5a Fix deleting obsolete files #2
1851f977c Added RocksDB stats GET_HIT_L0 and GET_HIT_L1
91ac3b206 Print DB pointer when opening a DB
bee4e5124 Merge pull request #492 from fyrz/logger-logv-virtual
cfe8837e4 Switch logv with loglevel to virtual
aaceef363 Fix formatting
ee4aa9a0e Merge pull request #481 from mkevac/backupable
82faa377a added simple example for db restore from backup
d090330c8 fixed c_simple_example and added some comments
965130830 renamed backup to backup_and_restore in c_test for clarity
bbb52b21f Merge pull request #483 from adamretter/restructure-java-build
7e50ed8c2 Added some more wrappers and wrote a test for backup in C
218c3ecea Fix std::cout data race
8f679c290 Merge branch 'master' of github.com:facebook/rocksdb
da9cbce73 Add Header to logging to  capture application level information
2a979822b Fix deleting obsolete files
8e83a9d31 Add a missing field for STATE_MUTEX_WAIT to global_state_table
6f1013035 Fix DestroyDB
7de4e99a8 Revert "Fix wal_dir not getting cleaned"
9a52e06a0 Add GetID to ColumnFamilyHandle
181191a1e Add a counter for collecting the wait time on db mutex.
f36d394ae Fix wal_dir not getting cleaned
53ae09c39 db_test: fix a data race in SpecialEnv
fe9f69119 Fix fault_injestion_test
b37f5ffc7 Put db_test back to TESTS in Makefile
108470e96 Fix stack trace on mac
3e53760fc Fix compaction_picker_test
e39f4f6cf Fix data race #3
e63140d52 Get() to use prefix bloom filter when filter is not block based
678503ebc Add utility functions for interpreting ThreadStatus
4d98e2935 rocksdb: Enable scan-build static analysis
756e1f151 Remove unused util/thread_event_info.h
dad98dd4a Changes for supporting cross functional tests for inplace_update
9898f6398 Divide test DBIteratorTest.DBIterator to smaller tests
829363b44 Options::PrepareForBulkLoad() to increase parallelism of flushes
b04408c47 Fix unity build
8d3819369 NewIteratorWithBase() for default column family
2c2d5ab7e Fix compile warning in util/xfunc.h
0b8dec717 Cross functional test infrastructure for RocksDB.
868bfa403 Merge pull request #488 from ekg/master
9900f3821 Merge pull request #484 from fyrz/RocksJava-Release-MD-change
e6eaf938c remove old debugging message (#487)
f33f3955e Moved Java Samples main classes into samples/src/main/java
ad325517f Update test lib versions and maven plugin versions
d6187d07b Maven can now build a standard project layout
157768890 Moved Java Benchmark main classes into benchmark/src/main/java
dd8d5471e Adjustment to NativeLibraryLoader to allow native library to be loaded from either java.library.path or from extracting from the Jar. Means that the test in the build do not need to rely on the Jar, useful when creating similar builds (and executing tests) from Maven
353db6dae Moved Java main classes into src/main/java
98cb501bc Moved Java test classes into src/test/java
7479a62a7 Release.md - Remove version change instrcution
4a4e4279f Update HISTORY-JAVA.md
384cb6619 Merge pull request #480 from fyrz/RocksJava-Deprecate-SkipLogError
ca52a67cf [RocksJava] Deprecate setSkipLogErrorOnRecovery
114d21878 Merge pull request #479 from fyrz/RocksJava-Snapshot-Sequence-Number
cb5c3159f [RocksJava] Snapshot - GetSequenceNumber
ea189b320 Merge pull request #474 from fyrz/RocksJava-GetUpdatesSince
391f85fc8 [RocksJava] Incorporated changes for D32151
68cd93b87 [RocksJava] GetUpdatesSince support
caedd40dd [RocksJava] Adjusted auto pointer
b39006e3d [RocksJava] enable/disable File deletions
9a456fba2 [RocksJava] GetUpdatesSince support
d3a736761 Merge pull request #482 from fyrz/RocksJava-TTL-Fix
939bb3659 [RocksJava] Fix ColumnFamily name alloc in TTL DB
86e2a1eee Allow creating backups from C
db9ed5fdb Unaddressed comment in previous diff. Change only in code comments.
5917de0ba CappedFixTransform: return fixed length prefix, or full key if key is shorter than the fixed length
6c6037f60 Expose Snapshot's SequenceNumber
2fd8f750a Compile MemEnv with standard RocksDB library
173c52a97 Fix build on older compilers -- emplace() is not available
d07fec3bd make DBTest.SharedWriteBuffer to pass MockEnv
4bdf38b16 Disable FlushSchedule when running TSAN
e84299c76 Fix bug recently introduced in MemFile::Lock()
e5aab4c2b Fix data race in HashLinkList
2113ecd3c Merge pull request #472 from fyrz/RocksJava-Cleanup
10af17f3d fault_injection_test: add a unit test to allow parallel compactions and multiple levels
0c4d1053d Fix data race #5
cc0d8be01 [RocksJava] Integrated review comments (D32145)
5257c9c42 Merge pull request #452 from robertabcd/backupable-mem
560ed402b [minor] fprintf to stderr instead of stdout in test
551a41df3 Merge pull request #476 from alabid/alabid/add-to-simple-example
d2a2b058f fault_injection_test: to support file closed after being deleted
f8f040ccc Updated .gitignore to ignore *~ files and example object files
e8bf2310a Remove blob store from the codebase
ea7d0b943 Added WriteBatch block to simple_example.cc
d6c7300cc Fixed a compile warning in clang in db/listener_test.cc
f9758e012 Add compaction listener.
e919ecedf SuperVersion::Unref() to use sequential consistency to decrease ref counting
4c49fedaf Use ustricter consistency in thread local operations
1b43ab58d fault_injection_test: add more logging and makes synchronization slightly stronger
ca2b00277 [RocksJava] Cleanup portal.h & tests
f8dc5c459 [RocksJava] Add missing test to Makefile
b3c133148 [RocksJava] Removed todo comment in portal.h
7ffcc457f [RocksJava] Cleanup portal.h
c4fb83441 Update the comment for the removal of mac-install-gflags.sh
be8f0b12e Rename DBImpl::log_dir_unsynced_ to log_dir_synced_
c1de6c42a fault_injection_test: add a test case to drop random number of unsynced data
d888c9574 Sync WAL Directory and DB Path if different from DB directory
58f34edfc Fix valgrind
f1c886247 Fix data race #1
b08b2fe73 Merge pull request #471 from fyrz/RocksJava-Fix-NativeLibraryLoader
e61f38e5a [RocksJava] Fix native library loader
26b50783d Fix assert in histogramData
42189612c Fix data race #2
f5a839835 Fix archive WAL race conditions
43ec4e68b fault_injection_test: bring back 3 iteration runs
c2e8e8c1c Fix two namings in fault_injection_test.cc
b4c13a868 fault_injection_test: improvements and add new tests
a52dd0024 Fix ASAN failure with backupable DB
910186c27 Return the build with 4.8.1
401d4205e Add thread sanitizer
b068f0a67 Upgrade our compilers
a76d92862 Merge pull request #466 from fyrz/RocksJava-Support-ReadOptions-Iterator
bef7821f0 [RocksJava] ReadOptions support in Iterators
3b494a610 Make options_test runnable on ROCKSDB_LITE
912c52e82 Merge pull request #465 from fyrz/RocksJava-BlockBasedTable-FormatVersion
cd4c07197 Update HISTORY.md for GetThreadStatus() support on compaction.
46a7048dc Reduce false alarm in ThreadStatusMultipleCompaction test
aed028698 Merge pull request #462 from fyrz/RocksJava-JNI-allocation-correction
e5df90f5d Fix comment (minor)
dd53428f8 Incorporated review comments
908258a4f [RocksJava] BlockBasedTableConfig 3.10
2efe22849 [RocksJava] Incorporated changes for D31809
4e48753b7 Sync manifest file when initializing it
e204a5a16 [RocksJava] ColumnFamily name JNI correction
96264784d [RocksJava] ColumnFamily name JNI correction
ae82849bc Fix build failure
423dee841 Abort db_bench if Get() returns error
206237d12 DBImpl::CheckConsistency() shouldn't create path name with double "/"
5e98e5324 Merge pull request #458 from fyrz/RocksJava-TTLDB-Support
4ffe0be41 [RocksJava] Integrated changes for D31449
e82856754 [RocksJava] Integrated changes from D31449
859c54a03 [RocksJava] TTL-Support
5ff8aec4d [RocksJava] TTL Support
ca47da9e6 [RocksJava] TTL-Support
1190ebe5a Merge pull request #461 from fyrz/RocksJava-DirectSlice-Fix
ea25ff715 [RocksJava] Integrated proposed simplificiation
d68e83c35 [RocksJava] DirectSlice String termination fix
0ddf5f73e memenv: normalize file path
4d9d5955a Merge pull request #464 from fyrz/RocksJava-Various-Fixes
ceaea2b72 Adding prefix_extractor string config parameter
3d628f8f2 Update format_version comment
155bec4cf fallocate also tests FALLOC_FL_KEEP_SIZE
c75c02e7a [RocksJava] WriteBatchWithIndexTest fix
c787fb50b [RocksJava] JavaDoc errors in Java8
b229f970d Remove Compaction::ReleaseInputs().
f2ddb8b45 Fix for bug where GeoDB accesses key after next modification of iterator
d10f1de2b Ported LevelDB's fault_injection_test
2bb059007 Change db_stress to work with format_version == 2
9ab5adfc5 New BlockBasedTable version -- better compressed block format
2355931c6 Merge pull request #450 from adamretter/writebatch-with-index
3d246c89c Abstract duplicate code on key and value slice objects into generic methods
2d0dd8db3 Implement WBWIRocksIterator for WriteBatchWithIndex in the Java API
de678b288 Abstractions for common iterator behaviour
e01acb3a0 Test for WriteBatchWithIndex#newIterator()
56f24941a Simplify the Java API by permitting WriteBatchWithIndex to be provided straight to RocksDB#write
95d5f9848 Test for RocksDB#write(WriteBatchWithIndex)
ef5b34dee Implement WriteBatchWithIndex in the Java API
c6e554561 Abstractions for common write batch behaviour
be905491b Test for WriteBatchWithIndex#newIteratorWithBase(org.rocksdb.RocksIterator)
2241e3f4d Extract the interface for a RocksIterator
a8cfa7ace Extract the interface for a WriteBatch
45e43b81d Adds support for db->DefaultColumnFamily() to the Java API
516a04267 Add LZ4 compression to sanity test
2ccc54301 Merge pull request #460 from neutronsharc/master
2a7bd0ea4 Remove duplicated method declarations in C header.
bb128bfec More accurate message for compaction applied to a different version
96b8240bc Support footer versions bigger than 1
53f615df6 Fix clang build
02b30202c Merge pull request #455 from Andersbakken/stdlib_fix
2159484dd Remove two unnecessary blank lines in db/db_test.cc
e7dd88c57 Merge pull request #441 from fyrz/RocksJava-ColumnFamilyDescriptor-Alignment
d2c018fd5 Make ThreadStatusMultipleCompaction more robust.
bf9aa4dfc Improve GetThreadStatus to avoid false alarm in some case.
c91cdd59c Allow GetThreadList() to indicate a thread is doing Compaction.
402c1152a Fix c_simple_example
a9ea65d65 Build with clang 3.5 on Linux.
23ad5f401 [RocksJava] Incorporated changes for D30525
0aab1005f [RocksJava] ColumnFamilyDescriptor alignment with listColumnFamilies
15d2abbec Fix build issues
abb9b95ff Move compression functions from port/ to util/
9132e52ea DB Stats Dump to print total stall time
93b35c299 Merge pull request #453 from fyrz/SimpleCExampleSigSegv
628a67b00 Reduce memory footprint in backupable db.
ef3901642 Fixed memory issue in c_simple_example
b89d58dfa :%s/build_config/make_config
242b9769c Memtablerep Benchmark
73ee4feba Add comments about properties supported by DB::GetProperty() and DB::GetIntProperty()
2dca48f55 Merge pull request #451 from StanislavGlebik/document_db_improvement
4b57d9a82 Fixed negative numbers comparison in DocumentDB
9ef59a09a VersionSet::AddLiveFiles() to assert current version is included.
4d16a9a63 VersionBuilder to optimize for applying a later edit deleting files added by previous edits
7731d51c8 Simplify column family concurrency
07aa4e0e3 Fix compaction summary log for trivial move
9d5bd411b benchmark.sh won't run through all tests properly if one specifies wal_dir to be different than db directory.
62ad0a9b1 Deprecating skip_log_error_on_recovery
fa0b126c0 Fix corruption_test -- if status is not OK, return status -- during recovery
d7b4bb62a Fail DB::Open() on WAL corruption
9619081d9 Merge pull request #449 from robertabcd/improve-backupable
49376bfe8 Fix errors when using -Wshorten-64-to-32.
a8c5564a9 Do not issue extra GetFileSize() calls when loading BackupMeta.
caa1fd0e0 Improve performance when loading BackupMeta.
e9ca35815 Fix CLANG build for db_bench
bf287b76e Add structures for exposing thread events and operations.
a801c1fb0 db_bench --num_hot_column_families to be default off
2067058a6 Dump routine to BlockBasedTableReader (valgrind)
ddc81440d db_bench to add an option as number of hot column families to add to
a944afd35 Fixed a compile error in db/db_impl.cc on ROCKSDB_LITE
7ea7bdf04 Dump routine to BlockBasedTableReader
ae508df90 Clean up compile for c_simple_example
b62300961 Fix compile of compact_file_example
ded26605f Merge pull request #444 from adamretter/java-api-fix
98490bccf Fix the build on Mac OS X
4d9972974 Merge pull request #443 from behanna/master
5045c4394 add support for nested BlockBasedTableOptions in config string
d232cb156 Fix the build with -DNDEBUG.
45bab305f Move GetThreadList() feature under Env.
4fd26f287 Only execute flush from compaction if max_background_flushes = 0
0acc73881 Speed up FindObsoleteFiles()
d8c4ce6b5 Merge pull request #442 from alabid/alabid/fix-example-typo
949bd71fd fix really trivial typo
f8999fcf3 Fix a SIGSEGV in BackgroundFlush
ade4034a9 MultiGet for DBWithTTL
fdb6be4e2 Rewritten system for scheduling background work
a3001b1d3 Remove -mtune=native because it's redundant
e27c84522 Merge pull request #437 from fyrz/RocksJava-SliceTests-Fixes
1fed1282a [RocksJava] Incorporated changes D30081
5b9ceef01 [RocksJava] JavaDoc correction
5fbba60b6 [RocksJava] Incorporated changes D30081
b0230d7e0 [RocksJava] Incorporate additions for D30081
b015ed0ca [RocksJava] Slice / DirectSlice improvements
4d422db01 Merge pull request #430 from adamretter/increase-parallelism
04c4e4969 Merge pull request #411 from fyrz/RocksJava-RangeCompaction
62d19b7b5 Merge pull request #427 from haneefmubarak/c-examples
28424d734 style fixes in c example
7198ed5a2 Handle errors during pthread calls
91c58752f error detection and memory leaks in c example
25f70a5ab Avoid unnecessary unlock and lock mutex when notifying events.
7661e5a76 Move the file copy out of the mutex.
17e84f215 Rudimentary test cases for setIncreaseParallelism
eda0dcdd9 Exposed IncreasedParallelism option to Java API as setIncreasedParallelism
efc94ceb2 [RocksJava] Incorporated changes for D29283
69188ff44 [RocksJava] CompactRange support
48adce77c [RocksJava] CompactRange support
153f4f071 RocksDB: Allow Level-Style Compaction to Place Files in Different Paths
06eed650a Optimize default compile to compilation platform by default
cef6f8439 Added 'dump_live_files' command to ldb tool.
7ab1526c0 Add an assert and avoid std::sort(autovector) to investigate an ASAN issue
74b3fb6d9 Fix Mac compile errors on util/cache_test.cc
d7a486668 Improve scalability of DB::GetSnapshot()
ee95cae9a Modifed the LRU cache eviction code so that it doesn't evict blocks which have exteranl references
0ab0242f3 VersionBuilder to use unordered set and map to store added and deleted files
e93f044d9 add range scan test to benchmark script
cb82d7b08 Fix #434
046ba7d47 Fix calculation of max_total_wal_size in db_options_.max_total_wal_size == 0 case
1b7fbb9e8 Update HISTORY.md for release 3.9
635c61fd3 Fix problem with create_if_missing option when wal_dir is used
2871bc7bc Merge pull request #422 from fyrz/RocksJava-Quality-Improvements
8c5781666 Add -fno-exceptions flag to ROCKSDB_LITE.
1f04066ca Add DBProperty to return number of snapshots and time for oldest snapshot
6436ba6b0 Provide mechanism to restart tests from previous error
d84b2bade Replace exception by abort() in dummy HdfsEnv implementation.
9260e1ad7 Bump version to 3.9
8f4e1c1c9 Remove the compability check on log2 OS_ANDROID as it's already blocked by ROCKSDB_LITE
c4a7423c1 Replace runtime_error exception by abort() in thread_local
a94d54aa4 Remove the use of exception in WriteBatch::Handler
a5d4fc0a2 Fix compile warning in db_stress
1a8f4821a Replace exception by assertion in autovector
97c194088 Fix compile warning in db_stress.cc on Mac
5f719d720 Replace exception by setting valid_ = false in DBIter::MergeValuesNewToOld()
c0dee851c Improve formatting, add missing newlines
815f638cd Fix java build
32a0a0384 Add Moved(GB) to Compaction IO stats
a14b7873e Enforce write buffer memory limit across column families
3e684aa68 Integrated changes from D29571
37d73d597 Fix linters
a15169f2e Fixed a Lint problem
b7f9e644c [RocksJava] Quality improvements
e002a6122 [RocksJava] Comparator tests for CF
335e6ad5c [RocksJava] Remove obsolete dbFolder cleanup
b036804ac RocksJava - FindBugs issues
9a632b4a9 Merge pull request #429 from fyrz/RocksJava-MacOSX-strip-fix
b42667506 [RocksJava] MacOSX strip support
e463cb0bc Merge pull request #424 from eile/master
91d898163 Tweak Makefile for building on BG/Q
c6f31a289 minor memory leak in C example
703ef66a8 Merge pull request #426 from fyrz/RocksJava-Restore-PrecisionFix
ac4ed1e30 fix examples/makefile for C example
d7f5ccb0c add c example to makefile and fix "make clean"
9c34d5e36 fix type in C simple example
0a9a7e753 added C version of simple_example
bcf908689 Block Universal and FIFO compactions in ROCKSDB_LITE
67cb7ca75 [RocksJava] Fixed MacOS build of RocksJava
b8136a7d2 Merge pull request #398 from fyrz/RocksJava-CreateCheckPoint
533592a27 Merge pull request #401 from fyrz/RocksJava-Sigsegv-MergeOperatorName
73d72ed5c Block ReadOnlyDB in ROCKSDB_LITE
e47f0fa9e Merge pull request #425 from adamretter/macosx-clean-fix
ff0cb90d1 Do not delete Java Fatal Error Log, developers may still want these for reference
2a792cd30 There will also be a librocksdbjni-osx.jnilib.dSYM folder on MacOSX builds to be deleted
beb74c14c Fix travis-build error
a486352e0 Merge pull request #423 from zerebubuth/c_iterate_upper_bound
26109d487 Store upper bound `Slice` with the same lifetime as the `ReadOptions` so that we can provide a pointer to it.
a97314219 Fix compile error in ROCKSDB_LITE
9d5019327 Replace log2 by implementing Log2 in options_builder
805bac6d2 Add test for upper bounds on iterators using C interface.
f193deea3 [RocksJava] Addressed comments in D28971
94f70a86b [RocksJava] Incoroporated changes for D29013
a280af2a5 [RocksJava] Sigsegv fix for MergerOperatorByName
fcc2dfd9f [RocksJava] Support for stored snapshots
274ba6270 Block internal_stats in ROCKSDB_LITE
4f2e8bab5 Merge pull request #421 from fyrz/RocksJava-PrecisionFix
c4765dc10 [RocksJava] Fix precision problem in rocksjni
14788e181 Merge pull request #420 from rdallman/add-wal
88dd8d889 c api: add max wal total to opts
7e608e2fe Block plain_table_index.cc in ROCKSDB_LITE
13de000f0 Add rocksdb::ToString() to address cases where std::to_string is not available.
90ee85f8e Improve listener_test to avoid possible false alarm
2946e37a0 remove unreliable test in db/cuckoo_table_db_test.cc
9c7ca65d2 free builders in VersionSet::DumpManifest
7530c75ab Merge pull request #413 from saghmrossi/master
d699d7034 Make RocksDB compile without gflags
325722149 Fixes valgrind error in GetSnapshotLink. Free checkpoint now.
ada3d7873 Merge pull request #415 from fyrz/RocksJava-Makefile
569853ed1 Fix leak when create_missing_column_families=true on ThreadStatus
c4b65f70f [RocksJava] Makefile correction
141018016 Make arena use hugepage if possible
3a40c427b Fix db_bench on CLANG mode
9222a2d02 Fixed iOS build caused by GetThreadList feature.
aa31fc506 Improve listener_test by ensuring flushes are completed before assert.
7ec71f101 Provide default implementation of LinkFile, don't break the build
cd278584c Clean up StringSplit
d84069995 Fix mac compile
4f882924d Merge pull request #404 from fyrz/RocksJava-Backup-Restore-3.8
4b63fcbff Add enable_thread_tracking to DBOptions
bafce6197 first rdb commit
9e285d423 Added CompatibleOptions for compatibility with LevelDB Options
353307758 Add IOS_CROSS_COMPILE to macro guard for GetThreadList feature.
eecdebe65 Fixed the destruction order of static variables in ThreadStatusImpl.
004f416b7 Moved checkpoint to utilities
beabc6879 Fixed ~ThreadStatusImpl().
faa8d32be [RocksJava] Integrated changes from D29019.
3d78c7a8c [RocksJava] Lint adjustments
d7529b2de [RocksJava] Cleanup Backupable implementations
fa703efb2 [RocksJava] Improved BackupableDBTest
24fdc4741 [RocksJava] Backupable/Restorable DB update 3.8.0
9972f969e [RocksJava] BackupableDBOptions alginment + 3.8
fbc42a093 Fixed -Werror=unused-but-set-variable in thread_status_impl
a564be715 Fix asan error in thread_status_impl.cc
7165d1886 Fix clang compile error
d0c5f28a5 Introduce GetThreadList API
1fd1aecb3 Merge pull request #409 from fyrz/RocksJava-Make-cleanup
91c8dcefc [RocksJava] Strip library in publish
e7fcaa4d9 [RocksJava] JavaDoc is executed too often
2cd1794e4 [RocksJava] Make cleanup - Clean Target
be005e17b fix clang compilation
5e69f19c4 Merge pull request #405 from fyrz/RocksJava-Convenient-Options
55a344872 Merge pull request #408 from fyrz/Missing-include
9e9a83baf Missing header in build on CentOS
91ccc8ebe [RocksJava] Integrated changes in D29025
5249d0db5 [RocksJava] Convenience methods for Options
8d3f8f969 remove all remaining references to cfd->options()
1e4a45aac remove cfd->options() in DBImpl::NotifyOnFlushCompleted
517c28994 Options helper supports k, m, g, and t unit suffixes
c46c2be8d Merge pull request #397 from fyrz/RocksJava-GetIntProperty
8efd4bb42 [RocksJava] Improved comments in RocksDB class
5529c1ad1 [RocksJava] GetIntProperty in RocksDB
db59eeb61 Merge pull request #406 from fyrz/Build-Fix
e97f014b9 [RocksJava] JavaDoc corrections - Java8
98e59f981 Fixed a bug which could hide non-ok status in CompactionJob::Run()
ec24bd4e6 Merge pull request #402 from adamretter/bugfix-native-library-loader
d3c4a0f4a Improve the comment in InfoLogLevelTest.java
a77e97c53 Merge pull request #396 from fyrz/RocksJava-LogLevel
585c759cf Make sure to use the correct Java classloader for loading the RocksDB Native Library
c3915abba Minor tidyup and use Java 7 for file copying
a122a42bb Merge pull request #399 from fyrz/RocksJava-Version-to-3.8
b8d5e3f08 [RocksJava] MVN Build reads version from version.h
23295b74b Clean job_context
0ce38fe98 Fix signed/unsigned compile
e7960c03a Don't parallelize the build in travis
84af2ff8d Clean job context in DeleteFile
8a1bcc39c [RocksJava] Bump version to 3.8 in rocksjni.pom
5c04acda0 Explicitly clean JobContext
4947a0674 [RocksJava] Incorporated review comments D28947
07cd3c42a [RocksJava] LogLevel support in Options
26dc5da96 Fix compaction_job_test
5f583d2a9 Merge pull request #394 from lalinsky/cuckoo-c
353303a76 Merge pull request #380 from fyrz/RocksJava-Junit-Framework
3f9c95a51 [RocksJava] Minor lint correction
e46450da6 [RocksJava] Rebased + integrated CF tests
cd82beb0c [RocksJava] Merged in latest changes.
b6abab8b7 [RocksJava] Merged & rebased to HEAD
74057d6d2 [RocksJava] Improved tests within RocksJava
628e39e97 [RocksJava] Integrated review comments from D28209
a4b28c1ae [RocksJava] Extended Testcases
36f3a0bb8 [RocksJava] Integrated review comments from adamretter in D28209
b09268695 [RocksJava] Extended testcases
9bec23c41 [RocksJava] Test-framework integration
f617135d5 [RocksJava] Testcase improvements
1fe7a4c62 [RocksJava] Test-framework integration
04ca7481d Fix build
6c1b040cc Provide openable snapshots
9be338cf9 CompactionJobTest
c9fd03ec5 Update docs for NewAdaptiveTableFactory
e6c3cc657 Add very basic tests to make sure the C cuckoo table options compile and run
7fe247080 Update HISTORY.md for RocksJava
c44a29278 Add cuckoo table options to the C interface
136b8583b Merge pull request #395 from lalinsky/fix-env-test
94fa542f8 Update HISTROY.md for 3.8 release
a177742a9 Make db_stress built for ROCKSDB_LITE
746cfaac5 Relax the block count check on deallocation in env_test
f822129b3 Add a unit test for behavior when merge operator and compaction filter co-exist.
4161de92a Fix SIGSEGV
373c665ed Fix broken test in 31b02d.
772bc97f1 No CompactFiles in ROCKSDB_LITE
1d1a64f58 Move NeedsCompaction() from VersionStorageInfo to CompactionPicker
cd0980150 Add concurrency to compacting SpatialDB
3c92e5233 Fix include
25f273027 Fix iOS compile with -Wshorten-64-to-32
fa50abb72 Fix bug of reading from empty DB.
31b02dc21 Improve Backup Engine.
1033db29f Merge pull request #390 from fyrz/RocksJava-Cleanup
9a03da773 Merge pull request #375 from fyrz/RocksJava-ColumnFamilyOptions-Extension-3.6
d50c68e3a [RocksJava] JavaDoc cleanup warnings with Java8
079d942ea [RocksJava] Code-cleanup + Java7 warnings removed
9a255b95f [RocksJava] Sample and Default value
9d2ba2136 [RocksJava] Incorporated review comments
fa9cfc65f [RocksJava] Integrated Review comments from yhchiang in D28023
75010d208 [RocksJava] ColumnFamily custom Options API extension
0345c2156 [RocksJava] Extend Options with ColumnFamilyOptions implementation ColumnFamilyOptions implementation with tests [RocksJava] Extended ColumnFamilyTest
975949522 Fixed clang compile error in version_builder_test
581141935 Fixed GetEstimatedActiveKeys
1f621e6ab Fix additional -Wshorten-64-to-32 errros
767777c2b Turn on -Wshorten-64-to-32 and fix all the errors
113796c49 Fix NewFileNumber()
625e162c6 Merge pull request #393 from fyrz/RocksJava-Flush
fc6fcbab9 [RocksJava] Flush functionality
8e5547f64 [RocksJava] Makefile restructured
26f0a78b0 Merge pull request #363 from adamretter/write_batch-iterate
35c8c814e Make ForwardIterator::status() more efficient
d88568c68 Move -Wnon-virtual-dtor to c++ flags
c7ee9c3ab Fix -Wnon-virtual-dtor errors
746252197 Merge pull request #384 from msb-at-yahoo/compaction-filter-2-empty-changed-values
dd726a59e Bump Version Number to 3.8
4a3bd2bad Optimize usage of Status in CompactionJob
bcdb9671c Fix build
d904fbbb0 Addresed comments from code review https://reviews.facebook.net/D27567
eeb9cf6c4 Test for WriteBatchHandler
8fb4751d5 Iterator support for Write Batches
00211f9c5 Fix SIGSEGV in db_stresS
a4a2bfd6b Merge pull request #391 from Liuchang0812/fixmake
856059094 Merge pull request #389 from Liuchang0812/master
01a770637 remove unused target
dc3410463 Merge branch 'fix-example'
e7620536c fix make static_lib error
543df158c Expose sst_dump functionality as library call.
e3d3567b5 Get rid of mutex in CompactionJob's state
344edbb04 Fixed the shadowing in db/compaction.cc and include/rocksdb/db.h
b8b390342 Fixed compile error in db/db_impl.cc
b622ba5d6 Fixed compile error in db/flush_job.cc
642ac9d8a Fixed compile error in db/compaction.cc and db/compaction_picker.cc
68effa034 Fix -Wshadow for tools
844786189 Fixed -WShadow errors in db/db_test.cc and include/rocksdb/metadata.h
28c82ff1b CompactFiles, EventListener and GetDatabaseMetaData
5c9309053 Turn on -Wshadow
31342c400 Fix implicit compare
a0f887c9e Fix compile
53af5d877 Redesign pending_outputs_
ec101cd49 Correctly test both compaction styles in CompactionDeletionTriggerReopen
8d87467bb Make PartialCompactionFailure Test more robust again.
64d302d30 make DropWritesFlush deterministic
cd5c0925a Merge pull request #387 from fyrz/RocksJava-WShadow-Fix
c4bf07c24 [RocksJava] -WShadow improvements
e526b7140 Make PartialCompactionFailure Test more robust.
0c2be0de3 Turn on -Wshadow for travis
5fd33d26f Turn off -Wshadow
9f20395cd Turn -Wshadow back on
c02338a69 update HISOTRY.md for new release
367a3f9cb Improve DBTest.GroupCommitTest: artificially slowdown log writing to trigger group commit
b52b144c7 Merge pull request #386 from EugenePig/java8
ac95ae1b5 Make sure WAL is synced for DB::Write() if write batch is empty
59d549798 suppress JDK8 errors for #385
ea18b944a Add db_bench option --report_file_operations
2ea1219eb Fix RecordIn and RecordDrop stats
e4211d10c Apply InfoLogLevel to the logs in util/env_hdfs.cc
76f6c7c7c CompactionFilterV2: eliminate an often unnecessary allocation.
29a9161f3 Note dynamic options in options.h
fd24ae9d0 SetOptions() to return status and also add it to StackableDB
b1267750f fix the asan check
83bf09144 Bump verison number to 3.7
da5daa061 Replace some ASSERT_TRUE() asserts in DBTest.DynamicMemtableOptions and DynamicCompactionOptions with more specific ones
b0cda4a11 DBTest.DynamicMemtableOptions to use single background compaction
8810850dd Apply InfoLogLevel to the logs in db/compaction_job.cc
71783f652 Merge pull request #377 from fyrz/RocksJava-KeyMayExist
614bbcbe2 Merge pull request #374 from fyrz/RocksJava-DBOptions-Extension-3.6
d8e119663 Apply InfoLogLevel to the logs in db/version_set.cc
2a019f1d0 Apply InfoLogLevel to the logs in db/wal_manager.cc
469d474ba Apply InfoLogLevel to the logs in db/db_impl.cc
ac6afaf9e Enforce naming convention of getters in version_set.h
09899f0b5 DB::Open() to automatically increase thread pool size if it is smaller than max number of parallel compactions or flushes
636e57b52 Fix coverage script
30ca3752b Revamp our build tools
051c67ff5 Merge pull request #378 from baotiao/master
d0e7e49ae Merge pull request #379 from fyrz/RocksJavaBuildFix
94e31ac22 [RocksJava] Extend Options with DBOptions implementation [RocksJava] Included DBOptionsTest and refactored OptionsTest
b060d3006 [RocksJava] Build fix after options refactoring
9fd65e566 add make clean in examples makefile
8e79ce68c Revert "Fix lint errors and coding style of ldb related codes."
45a612f99 Revert "Fix incorrect fixing of lint errors in ldb_cmd.cc"
27129c739 [RocksJava] KeyMayExist w/o ColumnFamilies
86905e3cb Move VersionBuilder logic to a separate .cc file
74eb4fbe9 CompactionJob
8ddddd62d Fix incorrect fixing of lint errors in ldb_cmd.cc
46c14c666 Fix #258. benchmarkharness -- make bm_min_usec uint
72cb7cf20 Add fsync / corrupt simulation to env_mem
0e526eb9d introduce TestMemEnv and use it in db_test
8db24f4b3 exclude mock test file from MOCK_SOURCES
5594d446f unfriend DBImpl and InternalStats from VersionStorageInfo
82e3ae540 fix c_test
bc9f36fd5 Fix lint errors and coding style of ldb related codes.
c645250ee CompactionStats to support larger value of RecordIn and RecordDrop
f7e6c856a Fix BaseReferencedVersionBuilder's destructor order
c76dcb44d fix
b452dede5 fix
29d83cc33 temporarily remove -Wshadow
c1a924b9f Move convenience.h to /include
7e01d1202 Add support for in place update for db_stress
9f7fc3ac4 Turn on -Wshadow
98849a35f Apply InfoLogLevel to the logs in table/block_based_table_reader.cc
4d2ba38b6 Make VersionBuilder unit testable
2b1f23dca Apply InfoLogLevel to the logs in db/db_iter.cc
ccaf1aa7c Merge pull request #372 from fyrz/RocksJava-CF-Merge-Hardening
a29118ffc Merge pull request #355 from fyrz/RocksJava-Options-Refactoring-3.6
85b04ca76 [RocksJava] Review comments - reformatted MergeTest
df7abb4e8 [RocksJava] Integrated code review comments
171be0ed5 Merge with ColumnFamilies & Hardening CFHandle
39464a990 [RocksJava] Options Refactoring 3.6
0f7f3b860 Check InfoLogLevel earlier in Log functions.
73605d917 Apply InfoLogLevel to the logs in util/db_info_dumper.cc
fda592d90 Merge pull request #356 from fyrz/RocksJava-TableOptions-3.6
c73d13bb8 [RocksJava] Integrate review comments from yhchiang
b011e201f Integrated review comments by ankgup87
2c1bd8846 BlockBasedTableConfig & PlainTableConfig enhancements
e770d6175 Merge pull request #371 from dlezama/master
41af0f56b Fix build break because of unsigned/signed mismatch
c5db7f260 Fix CompactionPickerTest.Level1Trigger2
37e9b6370 Apply InfoLogLevel to the logs in utilities/ttl/db_ttl_impl.h
217cc217d Apply InfoLogLevel to the logs in table/meta_blocks.cc
635905481 WalManager
fd95745a5 Fix compile error in table/plain_table_index.cc
c3dd0f75d comparator_db_test to cover more irregular comparators
6afafa369 Apply InfoLogLevel to the logs in utilities/merge_operators/uint64add.cc
e7ad69b9f Apply InfoLogLevel to the logs in table/plain_table_index.cc
bbd9c5345 Apply InfoLogLevel to the logs in table/block_based_table_builder.cc
065766b8d DynamicCompactionOptions: relax the check bound a little
5c82a8837 Add a test in compaction_picker_test to test the max score
86de2007b Add ComparatorDBTest to test non-default comparators
17be187ff dummy var to suppress compiler warning/error
c2999f54b Revert "tmp"
76d1c28e8 Make CompactionPicker more easily tested
01e6f8509 Apply InfoLogLevel to the logs in db/transaction_log_impl.h
082e49ba8 Apply InfoLogLevel to the logs in db/repair.cc
c4b468000 Apply InfoLogLevel to the logs in db/flush_job.cc
34d436b7d Apply InfoLogLevel to the logs in db/column_family.cc
cda9943f9 Apply InfoLogLevel to the logs in db/compaction_picker.cc
7b3a618f9 Apply InfoLogLevel to the logs in db/db_filesnapshot.cc
2d4fe048f remove dead code
9ab013236 tmp
76d54530d minor - remove default value for ChangeFilterOptions() and ChangeCompactionOptions()
44f0ff31c use fallocate(FALLOC_FL_PUNCH_HOLE) to release unused blocks at the end of file
97451f837 add an env var ROCKSDB_TESTS_FROM to control where to start from a list of tests
e130e88bc DBTest: options clean up - part 4
34f3c5a20 DBTest: options clean up - part 3
cdc7230e4 DBTest: options clean up - part 2
5a921b895 DBTest: options clean up - part 1
c9c935923 Move the check to the beginning of the loop in VersionEdit::EncodeTo()
2110e43a5 Remove an unnecessary include file in version_edit.cc
412b7f85b Include atomic in mock_table.h
c08285334 Include all the mocks
abac3d647 TableMock + framework for mock classes
fb3f8ffe5 Improve the robustness of PartialCompactionFailure test again.
60fa7d136 Improve the robustnesss of PartialCompactionFailure test.
3772a3d09 Fix the bug where compaction does not fail when RocksDB can't create a new file.
c49dedbe0 Merge pull request #366 from fyrz/RocksJava-Backup-Restore-Improvements
a39e931e5 FlushProcess
efa2fb33b make LevelFileNumIterator and LevelFileIteratorState anonymous
f7c973069 [RocksJava] Integrated review comments
7e12ae5a2 [RocksJava] - BackupInfos & Restore-/BackupableDB enhancements
eb357af58 unfriend ForwardIterator from VersionSet
f981e0813 unfriend ColumnFamilyData from VersionSet
834c67d77 rename FileLevel to LevelFilesBrief / unfriend CompactedDBImpl
a28b3c438 unfriend UniversalCompactionPicker,LevelCompactionPicker and FIFOCompactionPicker from VersionSet
5187d896b unfriend Compaction and CompactionPicker from VersionSet
75d7e2c37 Merge pull request #369 from fyrz/Small-Fix
db52419cf Merge pull request #290 from vladb38/master
45e756f04 [RocksJava] Minor correction to the previous pull request merge
f94f1a97d Merge pull request #368 from fyrz/RocksJava-Hardening-RocksIterator
b08c39e14 [RocksJava] RocksIterator: Assert for valid RocksDB instance & documentation
b680033e6 Include atomic in env_test
56ef2caaa [RocksJava] - Hardening RocksIterator
c1c68bce4 remove atomic_pointer.h references
7c303f0e7 Include atomic
179c23021 Merge pull request #351 from fyrz/RocksJava_Snapshot_Support
48842ab31 Deprecate AtomicPointer
f37048ad1 Merge pull request #367 from fyrz/FixBrokenJavaBuild
679a9671f RocksJava Fix after MutableCFOptions change.
714c63c58 db_stress for dynamic options
f1841985e dynamic inplace_update options
a04929aa4 fixed conflict in java/Makefile
a1bae76c8 Integrated changes due to review bei ankgup87
b8ce52648 [RocksJava] Support Snapshots
bc3bc4bc2 Merge pull request #357 from fyrz/JavaTest-Fix
42f0eaceb Merge pull request #354 from fyrz/RocksJava-memtables-3.6
965d9d50b Fix timing
001ce64dc Use chrono for timing
240ed0cd7 Fix uninitialized parameter caused by D24513
724fba2b3 Improve the log in Universal Compaction to include more debug information.
720c1c056 fix erro during merge
b794194ad Remove java build from travis
122f98e0b dynamic max_mem_compact_level
1fee591e7 comments for DynamicCompactionOptions test
574028679 dynamic max_sequential_skip_in_iterations
bd4fbaee3 Fixed cross platform build after introducing Java-7 dependencies
1eb545721 Fix incorrectly merged Java - Makefile
9aa9668a8 [RocksJava] Memtables update to 3.6
4b1786e95 Fix SIGSEGV when declaring Arena after ScopedArenaIterator
05b2e60dd Merge pull request #362 from adamretter/travis-jcheck
9383922cc Added java tests to travis build
90f156402 Fix CompactBetweenSnapshots
2717422e2 Merge pull request #361 from adamretter/fix-yosemite-build
3b5fe3a1f Correct the log message in VersionEdit
c584d2b53 Fix for building RocksDB Java on Mac OS X Yosemite
2a8e5203d db_bench: --batch_size used for write benchmarks too
d755e53b8 Printing number of keys in DB Stats
839c376bd fix table_test
0fd985f42 Avoid reloading filter on Get() if cache_index_and_filter_blocks == false
e11a5e776 Improve the comment of util/thread_local.h
6398e6a6a Fix DeleteFile() + enable deleting files oldest files in level 0
0d3145198 Merge pull request #231 from adamretter/master
a6fb7f312 Fix code review comments raised in https://reviews.facebook.net/D22779
c63494fb6 Tests for ComparatorOptions, Comparator and DirectComparator, and by proxy we also exercise Slice and DirectSlice
5e2527411 Fix code style problems identified by lint
25641bfc9 Fix to memory dealocation when creating a slice from a byte buffer
fc12cb83f Add locking to comparator jni callback methods which must be thread-safe
d6fe8dacc Feature - Implement Java API for Comparator and Slice. Allows use of either byte[] or DirectByteBuffer for accessing underlying data.
700f6ec3f Ignore IntelliJ idea project files and ignore java/out folder
5bfb7f5d0 db_bench: seekrandom can specify --seek_nexts to read specific keys after seek.
ff8f74c20 remove checking lower bound of level size
2dd9bfe3a Sanitize block-based table index type and check prefix_extractor
dbcfe27d6 Merge branch 'master' of https://github.com/facebook/rocksdb
6c6691864 Speed up DB::Open() and Version creation by limiting the number of FileMetaData initialization.
5db9e7664 Fix Mac compile error: C++11 forbids default arguments for lambda expressions
f4363fb81 Fix DynamicMemtableOptions test
8f01bf80c Merge pull request #353 from fyrz/FixBloomfilterRocksJava
ee80fb4b4 Total memtables size counter
c12f571d3 Fix mac compile, second try
d2e60f5ce Fix mac compile
274dc81c9 fix build failure
d6c8dba72 Log MutableCFOptions in SetOptions
4d5708aa5 dynamic soft_rate_limit and hard_rate_limit
065a67c4f dynamic disable_auto_compactions
dc50a1a59 make max_write_buffer_number dynamic
6a150c011 ldb: support --fix_prefix_len
bafbc23ba Filters getting disposed by System.gc before EOL
ca250d71a Move logging out of mutex
5cc9adf5b WriteBatchWithIndex's Iterator bug of SeekToFirst() and SeekToLast()
7658bcc1e Merge pull request #352 from fyrz/OptionsTestMergeProblem
1b97934a2 Options correction
2ef3ed86f Integrated feedback from ankgup87
a40ce219b Adding merge functions to RocksDBJava
cc6c883f5 Stop stopping writes on bg_error_
4942f6efb Merge pull request #350 from fyrz/reenable_accidentally_disabled_test
ee28f431d With the last commit a Test was accidentally disabled. This commit solves this.
b5dd7eed6 Merge pull request #319 from fyrz/column_families_java
18004d2f2 [RocksJava] Column family support
5908d08a0 Merge pull request #336 from fyrz/32BitRocksJavaBug
9e5f2a952 Merge pull request #344 from fyrz/java-doc-enhancements
4f5a68725 32-Bit RocksJava resolution for jlong overflows
16d2ebdbc Minor adjustment to prevent two warnings
70294c911 JavaDoc improvements on RocksJava
833357402 WriteBatchWithIndex supports an iterator that merge its change with a base iterator.
4f65fbd19 WriteBatchWithIndex's iterator to support SeekToFirst(), SeekToLast() and Prev()
f441b273a WriteBatchWithIndex to support an option to overwrite rows when operating the same key
3ead857a0 Fixed Mac compile error in util/options_test.cc
5a7618634 Fixed compile error on Mac: default arguments for lambda expressions
cd0d581ff convert Options from string
f18b4a484 minor update to benchmark script
b7d3d6ebc db_bench: set thread pool size according to max_background_flushes
c5f54a8f3 Merge pull request #339 from fyrz/bloomFilterSupportNewFormat
ced612957 Improved JavaDoc
5e43155b3 RocksJava should support not only BlockBased Bloomfilter
1d525891b Update HISTORY for 3.6
88edfd90a SkipListRep::LookaheadIterator
6a443309d Merge pull request #342 from fyrz/java_makefile_fix
4f272408c RocksJava Makefile includes incorrect paths to version.h
f78b832e5 Log RocksDB version
25f6a852e add db_test for changing memtable size
daab6dc51 Merge pull request #318 from criccomini/master
63eade401 Fix error introduced by merge
ba882972f Merge pull request #340 from nbougalis/nullderef
6bcff9dc2 Merge pull request #341 from fyrz/arc-lint
d6169954b Removed code which prevents `arc lint` from working properly.
b87db0715 Avoid dereferencing a null field
1a1b95347 Merge pull request #270 from tdfischer/check-with-unity
e107b6b2a Merge pull request #337 from fyrz/cross-platform-jdb_bench
70e401a2e Merge pull request #338 from fyrz/rm_obs_code_write_batch_with_index_test
1e5a52815 update release readme
d44871e80 fix java doc directory in git ignore
2a4d6e796 merge master to resolve merge conflicts
6b2c1d962 make publish jni jars depend on release jni jars
1c7c76476 Replaced obsolete comparator with builtin variant.
22c64be43 Cross platform fix for Java benchmark shell script.
81828592b Merge pull request #335 from fyrz/version-script-cross-platform
69d4c5123 Cross-platform fix version.sh
fcd13a77a Merge pull request #334 from fyrz/JavaDoc-Cleanup
bfb0246f5 Merge pull request #331 from fyrz/findbug_issues
05204bb11 Lint changes
da8ff9ff8 Fixed Findbugs issues
a5757ff3c Listing of changes
df3373fbf [Java] Fix compile error on DbBenchmark.java
4eb5a40f7 [Java] Fixed link error on library loading on Mac.
56dfd363f Fix a check in database shutdown or Column family drop during flush.
0e516a75d Fix lint errors in java/rocksjni/options.cc
8ea232b9e Add number of records dropped in compaction summary
f4086a88b perf_context.get_from_output_files_time is set for MultiGet() and ReadOnly DB too.
e869fc6a8 remove proper javadoc directory
c1273533b Merge pull request #333 from nbougalis/cleanups
99744e0c4 bump version to 3.6
45d526e22 singular javadoc directory
378f321da merge master to resolve merge conflicts
a1d3f0d2b don't fail if javadocs diretory doesn't exist
c832f1644 add not about updating pom version and rename pom to be unversioned
a213971d8 Don't return (or dereference) dangling pointer
2a1add673 use proper major/minor/micro version rather than hard coding 3.5.0
2d72f7807 update release docs in java
8322cf000 use javadoc instead of javadocs
079a612b5 Fix build_tools/version.sh
2e8012498 add javadoc and sources targets for sonatype
df08a2d03 add single rocksdbjni pom
deefcf476 make fat jar unclassified to satisfy sonatype
fd2545c80 add maven publication target and instructions
1e9af10ef Merge pull request #330 from fyrz/setFilterPolicyForBBTConfig
017354177 FilterTest
d410b39d5 BlockBasedTableConfig Filter policy support RocksJava
0908ddcea Don't keep managing two rocksdb version
d0916f452 add major minor micro version to java jars
d6987216c Merge pull request #327 from dalgaaf/wip-da-SCA-20141001
25888ae00 Merge pull request #329 from fyrz/master
89833e5a8 Fixed signed-unsigned comparison warning in db_test.cc
fcac705f9 Fixed compile warning on Mac caused by unused variables.
b3343fdea resolution for java build problem introduced by 5ec53f3edf62bec1b690ce12fb21a6c52203f3c8
187b29938 ForwardIterator: update prev_key_ only if prefix hasn't changed
5ec53f3ed make compaction related options changeable
d122e7bcf Update INSTALL.md
9d6f38086 backupable_db_test.cc: pass const string param by reference
8ff0b4095 document_db_test.cc: pass const string param by reference
177caca42 ttl/ttl_test.cc: pass const string param by reference
4a171882d db/version_set.cc: remove unnecessary checks
bf3bfd044 util/cache_test.cc: use static_cast over C-Style cast
86e29f033 document_db.cc: remove unused variable
28a6e3158 table/block_based_table_builder.cc: remove unused variable
091153493 db/db_test.cc: remove unused variable
6b6cedbb1 table/format.cc: reduce scope of some variables
55652043c table/cuckoo_table_reader.cc: pass func parameter by reference
5abd8add7 db/deletefile_test.cc: remove unused variable
d6483af87 db/db_test.cc: reduce scope of some variables
44cca0cd8 db/db_iter.cc: remove unused variable
986dad025 Merge pull request #324 from dalgaaf/wip-da-SCA-20140930
3a0d498a3 rebase master
8ee75dca2 db/memtable.cc: remove unused variable merge_result
0fd8bbca5 db/db_impl.cc: reduce scope of prefix_initialized
676ff7b1f compaction_picker.cc: remove check for >=0 for unsigned
e55aea551 document_db.cc: fix assert
d517c8364 in_table_factory.cc: use correct format specifier
b14037556 ttl/ttl_test.cc: prefer prefix ++operator for non-primitive types
43c789c8f spatialdb/spatial_db.cc: use !empty() instead of 'size() > 0'
0de452ee9 document_db.cc: pass const parameter by reference
4cc8643ba util/ldb_cmd.cc: prefer prefix ++operator for non-primitive types
af8c2b2d9 util/signal_test.cc: suppress intentional null pointer deref
33580fa39 db/db_impl.cc: fix object handling, remove double lines
873f1356a db_ttl_impl.h: pass func parameter by reference
855845714 ldb_cmd_execute_result.h: perform init in initialization list
063471bf7 table/table_test.cc: pass func parameter by reference
93548ce8f table/cuckoo_table_reader.cc: pass func parameter by ref
b8b7117e9 db/version_set.cc: use !empty() instead of 'size() > 0'
8ce050b51 table/bloom_block.*: pass func parameter by reference
53910ddb1 db_test.cc: pass parameter by reference
68ca53416 corruption_test.cc: pass parameter by reference
726ac5bca shrink vagrant commands to single line
a2f98ef61 fix tabs in Makefile
7506198da cuckoo_table_db_test.cc: add flush after delete
1f963305a Print MB per second compaction throughput separately for reads and writes
ffe3d490d Add an instruction about SSE in INSTALL.md
0b923f0f9 add centos 5.6 build instead of ubuntu.
ee1f3ccb0 Package generation for Ubuntu and CentOS
f0f795549 Fixing comile errors on OS X
99fb613e5 remove 2 space linter
b2d64a486 Fix linters, second try
747523d24 Print per column family metrics in db_bench
56ebd4087 Fix arc lint (should fix #238)
637f89179 Merge pull request #321 from eonnen/master
827e31c74 Make test use a compatible type in the size checks.
fd5d80d55 CompactedDB: log using the correct info_log
2faf49d5f use GetContext to replace callback function pointer
6a64ea617 add note about java 7
983d2de2d Add AUTHORS file. Fix #203
c4519c777 fix mis-named jar in JNI loader
abd70c5e1 Merge pull request #316 from fyrz/ReverseBytewiseComparator
2dc6f62bb handle kDelete type in cuckoo builder
8b8011a68 Changed name of ReverseBytewiseComparator based on review comment
b8e26615a since we're not sharing folders with the vm, copy built .so files and jars back to host system.
389edb6b1 universal compaction picker: use double for potential overflow
4e735bb7f Rsync files to VM rather than sync folders, since sync folders was causing clock skew and confusig make.
82a8f43cc Document RELEASE.mdgit status
9db13987b Update RocksDB's Java bindings to support multiple native RocksDB builds in the same Jar file. Cross build RocksDB for linux32 and linux64 using Vagrant. Build a cross-platform fat jar that contains osx, linux32, and linux64 RocksDB static builds.
534048426 Built-in comparator(s) in RocksJava
d439451fa delay initialization of cuckoo table iterator
94997eab5 reduce memory usage of cuckoo table builder
c6275956e improve memory efficiency of cuckoo reader
581442d44 option to choose module when calculating CuckooTable hash
fbd2dafc9 CompactedDBImpl::MultiGet() for better CuckooTable performance
3c6800610 CompactedDBImpl
f7375f39f Fix double deletes
21ddcf6e4 Remove allow_thread_local
fb4a492cc Merge pull request #311 from ankgup87/master
611e286b9 Merge branch 'master' of https://github.com/facebook/rocksdb
0103b4498 Merge branch 'master' of ssh://github.com/ankgup87/rocksdb
1dfb7bb98 Add block based table config options
cdaf44f9a Enlarge log size cap when printing file summary
7cc1ed7f0 Merge pull request #309 from naveenatceg/staticbuild
ba6d660f6 Resolving merge conflict
51eeaf65e Addressing review comments
fd7d3fe60 Addressing review comments (adding a env variable to override temp directory)
cf7ace886 Addressing review comments
0a29ce539 re-enable BlockBasedTable::SetupForCompaction()
55af37075 Remove TODO for checking index checksums
3d74f0997 Fix compile
53b003995 Fix release compile
d0de413f4 WriteBatchWithIndex to allow different Comparators for different column families
57a32f147 change target_file_size_base to uint64_t
5e6aee432 dont create backup_input if compaction filter v2 is not used
49b5f94c5 Merge pull request #306 from Liuchang0812/fix_cast
787cb4db2 remove cast, replace %llu with % PRIu64
a7574d4fa Update logging.cc
7e0dcb953 Update logging.cc
57fa3cc5b Merge pull request #304 from Liuchang0812/fix-check
cd44522a9 Merge pull request #305 from Liuchang0812/fix-logging
6a031b6a8 remove unused variable
4436f17bd fixed #303: replace %ld with % PRId64
7a1bd057f Merge pull request #302 from ankgup87/master
423e52cd4 Merge branch 'master' of https://github.com/facebook/rocksdb
bfeef94d3 Add rate limiter
ed9a2df8c fix unity build
32f2532a0 Print compression_size_percent as a signed int
976caca09 Skip AllocateTest if fallocate() is not supported in the file system
3b897cddd Enable no-fbcode RocksDB build
f44594743 RocksDB: Format uint64 using PRIu64 in db_impl.cc
e17bc65c7 Merge pull request #299 from ankgup87/master
b93797abc Fix build
adae3ca1f [Java] Fix JNI link error caused by the removal of options.db_stats_log_interval
90b8c07b4 Fix unit tests errors
51af7c326 CuckooTable: add one option to allow identity function for the first hash function
035043559 Fixed a signed-unsigned comparison in spatial_db.cc -- issue #293
2fb1fea30 Fix syncronization issues
6f0964e37 Only run make unity on travis instead of make check
9ed1b49a2 Build unity build on make check
ff7689561 Remove some unnecessary constructors
feadb9df5 fix cuckoo table builder test
3c232e164 Fix mac compile
54cada92b Run make format on PR #249
27b22f13a Merge pull request #249 from tdfischer/decompression-refactoring
fb6456b00 Replace naked calls to operator new and delete (Fixes #222)
5600c8f6e cuckoo table: return estimated size - 1
a062e1f2c SetOptions() for memtable related options
e4eca6a1e Options conversion function for convenience
a7c209452 Merge pull request #292 from saghmrossi/master
4d0523452 Merge branch 'master' of github.com:saghmrossi/rocksdb
60a4aa175 Test use_mmap_reads
94e43a1df [Java] Fixed 32-bit overflowing issue when converting jlong to size_t
f9eaaa66e added include for inttypes.h to fix nonworking printf statements
f090575e4 Replaced "built on on earlier work" by "built on earlier work" in README.md
faad439ac Fix #284
49aacd8d2 Fix make install
acb9348ff [Java] Include WriteBatch into RocksDBSample.java, fix how DbBenchmark.java handles WriteBatch.
4a27a2f19 Don't sync manifest when disableDataSync = true
9b8480d93 Merge pull request #287 from yinqiwen/rate-limiter-crash-fix
28be16b1d fix rate limiter crash #286
04ce1b25f Fix #284
add22e351 standardize scripts to run RocksDB benchmarks
dee91c259 WriteThread
540a257f2 Fix WAL synced
24f034bf4 Merge pull request #282 from Chilledheart/develop
49fe329e5 Fix build issue under macosx
ebb5c65e6 Add make install
0352a9fa9 add_wrapped_bloom_test
9c0e66ce9 Don't run background jobs (flush, compactions) when bg_error_ is set
a9639bda8 Fix valgrind test
d1f24dc7e Relax FlushSchedule test
3d9e6f775 Push model for flushing memtables
059e584dd [unit test] CompactRange should fail if we don't have space
dd641b211 fix RocksDB java build
53404d9fb add_qps_info_in cache bench
a52cecb56 Fix Mac compile
092f97e21 Fix comments and typos
6cc12860f Added a few statistics for BackupableDB
0a42295a2 Fix SimpleWriteTimeoutTest
06d986252 Always pass MergeContext as pointer, not reference
d343c3fe4 Improve db recovery
6bb7e3ef2 Merger test
88841bd00 Explicitly cast char to signed char in Hash()
52311463e MemTableOptions
1d284db21 Addressing review comments
55114e7f4 Some updates for SpatialDB
171d4ff4a remove TailingIterator reference in db_impl.h
9b0f7ffa1 rename version_set options_ to db_options_ to avoid confusion
2d57828d0 Check stop level trigger-0 before slowdown level-0 trigger
659d2d50c move compaction_filter to immutable_options
048560a64 reduce references to cfd->options() in DBImpl
011241bb9 DB::Flush() Do not wait for background threads when there is nothing in mem table
a2bb7c3c3 Push- instead of pull-model for managing Write stalls
0af157f9b Implement full filter for block based table.
9360cc690 Fix valgrind issue
02d5bff39 Merge pull request #277 from wankai/master
88a2f44f9 fix comments
7c16e3922 Merge pull request #276 from wankai/master
823773837 replace hard-coded number with named variable
db8ca520b Merge pull request #273 from nbougalis/static-analysis
b7b031f42 Merge pull request #274 from wankai/master
4c2b1f097 Merge remote-tracking branch 'upstream/master'
a5d286307 typo improvement
9f8aa0939 Don't leak data returned by opendir
d1cfb71ec Remove unused member(s)
bfee319fb sizeof(int*) where sizeof(int) was intended
d40c1f742 Add missing break statement
2e97c3898 Avoid off-by-one error when using readlink
40ddc3d6c add cache bench
9f1c80b55 Drop column family from write thread
8de151bb9 Add db_bench with lots of column families to regression tests
c9e419ccb rename options_ to db_options_ in DBImpl to avoid confusion
5cd0576ff Fix compaction bug in Cuckoo Table Builder. Use kvs_.size() instead of num_entries in FileSize() method.
0fbb3facc fixed memory leak in unit test DBIteratorBoundTest
adcd2532c fix asan check
4092b7a0b Merge pull request #272 from project-zerus/patch-1
bb6ae0f80 fix more compile warnings
6d3144118 Merge pull request #271 from nbougalis/cleanups
0cd0ec4fe Plug memory leak during index creation
4329d74e0 Fix swapped variable names to accurately reflect usage
45a5e3ede Remove path with arena==nullptr from NewInternalIterator
5665e5e28 introduce ImmutableOptions
e0b99d4f5 created a new ReadOptions parameter 'iterate_upper_bound'
51ea88900 Fix travis builds
a4816269f Relax backupable rate limiting test
f7f973d35 Merge pull request #269 from huahang/patch-2
ef5b38472 fix a few compile warnings
2fd3806c8 Merge pull request #263 from wankai/master
1785114a6 delete unused Comparator
1b1d9619f update HISTORY.md
703c3eacd comments about the BlockBasedTableOptions migration in Options
4b5ad8865 Merge pull request #260 from wankai/master
19cc588b7 change to filter_block std::unique_ptr support RAII
9b976e34f Merge pull request #259 from wankai/master
5d25a4693 Merge remote-tracking branch 'upstream/master'
dff2b1a8f typo improvement
343e98a7d Reverting import change
ddb8039e3 RocksDB static build Make file changes to download and build the dependencies .Load the shared library when RocksDB is initialized
REVERT: 1fdd726a8 Hotfix RocksDB 3.5
REVERT: d67500a59 Add `make install` to Makefile in 3.5.fb.
REVERT: 4cb631aa0 update HISTORY.md
REVERT: cfd0946be comments about the BlockBasedTableOptions migration in Options

git-subtree-dir: src/rocksdb2
git-subtree-split: aead4041720f40e305e7f9d432875749d91d5a2d
2017-12-02 13:44:49 -05:00
Brad Chase
3d6ea6737c Update soci unity build 2017-12-02 13:44:12 -05:00
Brad Chase
dc5f40bf62 Add generated soci-config.h 2017-12-02 13:44:12 -05:00
Brad Chase
1882bbdae7 Update soci 2017-12-02 13:44:06 -05:00
Brad Chase
855681a40b Squashed 'src/soci/' changes from b2855dce5..79e222e3c
79e222e3c [Travis] Switch to latest Oracle downloader v2.0.3
3992cd8f6 [Travis] Try travis-oracle downloader hotfix
958f1b010 [Travis] Use only ORACLE_LOGIN_userid and ORACLE_LOGIN_pass
f03569ffe [Travis] Oracle has changed login form
682486db9 Merge pull request #607 from rocksolidwebdesign/master
e8ed51c37 use fully qualified soci::session to fix build on macosx sierra
c98c877bc [doc] Add note on factory objects not exported from DLLs
d0552e64a Catch unhandled exception in PostgreSQL ODBC unit test
643853322 Add missing -DWITH_POSTGRESQL=ON to scripts\build.bat
82867ced7 [docs] Clarify name of MySQL package with client library
a35851478 Complete scripts\built.bat with basic CMake options.
225d5a3a4 [CMake] Simplify warning messages
d90a7acfc [docs] Fix CMake options for SQLite 3
3d32f5253 Merge pull request #596 from mloskot/ml/macro-soci-override
5d980ee98 Merge pull request #600 from mloskot/ml/cmake-update-FindDB2
05ab0bcf6 Add SOCI_OVERRIDE macro as conditional C++11 override specifier
aa9744e0a [DB2] Add additional install paths to search for DB2 client
3069f242b Merge pull request #594 from mloskot/ml/cmake-postgresql-nosinglerow
a5bb763ab Merge pull request #599 from mloskot/ml/cmake-drop-cdash
466fdf32c [docs] Update name DB2 driver/client library name
a7f5240a1 [CMake] Add SOCI_POSTGRESQL_NOSINLGEROWMODE option (default OFF)
601a89227 [CMake] Remove CDash remains
fffe6d9c8 [CMake] Tidy up FindOracle.cmake formatting
6157f8d97 [CMake] Add /usr/lib/oracle/*/client${LIB_SUFFIX} to searched paths
bbc18d73d [firebird] Add Ubuntu firebird-dev package as dependency example
fd18f5c6c [CMake] Determine LIB_SUFFIX from SOCI_TARGET_ARCH_X64
c5f59c9d3 [Travis] Revert remove of any notifications to soci-devel mailing list
f7f2a6123 [Travis] Remove any notifications to soci-devel mailing list
6df733826 [docs] Add pages for Ada language bindings
41f288bf3 Merge pull request #595 from mloskot/ml/db2-null-dereference
62f4bf5c4 [db2] Fix null pointer dereference
340a72eda [CMake] FindPostgreSQL.cmake update lost POSTGRESQL_VERSION return
5da552537 [docs] Remove Ada pages from TOC due to building failure
5e0e70c95 [docs] Add copyright footer
ea0f6c11e [docs] Add languages/ada pages to TOC
2ab0fb901 Add CHANGELOG.md generated from GitHub
961368043 Add changelog.sh utility to generate CHANGELOG.md from GitHub
0621bd610 [Circle] Fix missing checkout in workflow
2c45f2bc5 [docs] Fix issues reported by markdownlint
46071f5f6 [docs] Replace HTML tables with Markdown tables
80a86c0eb Format compact table in README
14b693e64 [docs] Avoid markdownlint warnings about line length
13031a831 [docs] Fix README.md linting issues
2d575b8d7 [docs] Add link to master branch docs on docs.html
8427054b7 [Circle] Fix markdownlint invocation
cc75d6e09 [Circle] Fix global installation of markdownlint-cli
522c7bbb6 [docs] Add .markdownlint.json configuration file
498381595 [AppVeyor] Add build job with Visual Studio 2017 (#588)
fd37e3b80 [AppVeyor] Update badge after switch to organizational account
51d058f04 Repair VC8 compile of test applications (#593)
c2310cf54 [Circle] Add markdownlint and define lint-build-deploy workflow for docs
b9f4007e4 Fix __GNUC__ condition ignoring -Wmaybe-uninitialized
08fe54076 Ignored -Wmaybe-uninitialized in GCC all versions following 4.7
29be6f860 Merge pull request #592 from mloskot/ml/replace-alternative-tokens
a161e24c1 Replace C alternative boolean operator representations with primary tokens
07a23d8a2 [CircleCI] Disable gem. Requires separate docker w/ Ruby
df87eb1eb [CircleCI] Install markdownlint gem
92de7a387 [Vagrant] Fix bach if. Silence wget. Add logging.
6b9531179 [Vagrant] Update setup with primary VM and optionals.
4cb3b636f [Travis] Disable clang jobs to save on built times
4e98cd2cf [docs] Add MySQL 8.0.1 on Windows to tested versions
275965736 Add CMake options to disable/enable individual backends.
cba05c702 Add build.bat for convenience of Visual Studio users
67c479ed9 Merge pull request #590 from mloskot/ml/cmake-update-FindPostgreSQL
35d2df6f4 [cmake] Update FindPostgreSQL.cmake from CMake 3.9
4fdfbf817 [cmake] Improve testing of Abc_FOUND and ABC_FOUND variables
3f006d3ae Fix copy-paste typo error in README
bd3ee7a48 [CI] Fix webhook specs and events
d31d17be3 [CI] Fix webhook URLs and use default events
34ced08e3 Fix URLs for badges in README
1653bd0b7 Update badges in README
7a4704be3 [Travis] Update webhook for notifications on gitter.im/SOCI/soci
17167fd97 [AppVeyor] Update webhook for notifications on gitter.im/SOCI/soci
95e55689e [Circle] Update webhook for notifications on gitter.im/SOCI/soci
68b914b19 Add footer: BSL © Maciej Sobczak and contributors.
8bf913e9c [Circle] Add webhook to receive notification on Gitter chat
25b2ab9af Actually link the generated docs
4aa8d5ab9 Link docs generated for master as (development)
a40420e4c [Circle] Use API token for the badge
fc59a621c [Circle] Fix status badge
15eba50e8 Add CircleCI setup to build docs and deploy to SF.net
3fa0a58cb [EditorConfig] Add settings for YAML and CMake scripts
b36f437bc Merge branch 'more-xml'
b85ec90c6 Check that inserting malformed XML values fails
2b89a134a Enable XML/CLOB tests for PostgreSQL via ODBC
6e4732102 Add very simple XML and CLOB support to ODBC backend
fabb8f0f0 Make XML comparison in the test work for SQL Server too
11a8982d5 Add a helper function for copying strings in ODBC backend too
556f5d336 Add exchange_type_traits<> specializations for XML and CLOB
f1243acdf Add helper function for copying string to PostgreSQL backend
5e6f37e35 Document types used for XML and CLOB support in Firebird backend
bd236c8c8 Merge branch 'xml-firebird'
e6e1ad305 Merge pull request #585 from mloskot/ml/enable-oracle-for-pulls
0cadedaf5 Enable Oracle builds for pull requests
93e844d02 [Travis] Update Oracle installation setup
3a82540aa Also throw if unsupported type is used for vector "into" in DB2
0f1756c55 Throw if unsupported type is used for vector "into" parameter
3a7677425 Merge branch 'odbc-vec-into-null'
ff2464925 Merge branch 'oracle-fix-null-str'
023f4df03 Skip running Oracle tests for PR builds on Travis CI
df4039923 Fix bug with null strings in bull selections in ODBC and DB2
6ca9cd64a Add REQUIRE_NOTHROW() around SQL statements in the string test
63bcc8944 Add workaround for empty strings being null in Oracle
2d74f9aaa Merge pull request #579 from mloskot/ml/travis-oracle-restore
c3b943c87 Restore Oracle build job on Travis CI
9943459f4 Add support for XML type to Firebird backend too
059faf5d9 Add CLOB support to Firebird backend
85159db6f Refactor: move XML and CLOB tests to common code
4744c1705 Fix the build after the previous commit
201c89f0e Fixed wrong handling of errors in single-row mode for PostgreSQL.
e26d134b4 Merge pull request #577 from mloskot/ml/bin-to-scripts
6363537e6 Add Windows shell scripts with CRLF to .editorconfig
d38b21ca6 Move directory /bin to /scripts
316885a37 Merge pull request #576 from alexott/editorconfig
461a44585 Update .editorconfig with comments from review
2c7c312d7 Add support for EditorConfig
09c26314d Allow defining SOCI_POSTGRESQL_NOSINLGEROWMODE for PostgreSQL < 9
4b451971a Avoid using overloaded virtual methods in vector type backends
f6980d2ce Merge pull request #572 from alexott/coverity-fixes
23d2f2593 fix some of warnings from fresh Coverity report
25eb5bdb3 Initialize indISCHolder_ member in firebird_into/use_type_backend classes
042dc0fd9 Merge pull request #570 from mcencora/master
9d82ee8e7 Remove unnecessary namespace qualification
3db8f4371 cmake: export SOCI public include directories
e4ab099df Fix undefined sanitizer warnings
8fdb2e7ea Merge pull request #566 from mloskot/ml/mkdocs
80941a9d9 Update structure of SOCI 4.0.0 documentation
9c8191903 Fixed Makefile build for PostgreSQL (broken by other modifications).
e7db59c74 Merge pull request #557 from msobczak/master
f6d08a75f Merge pull request #564 from Arenoros/master
43229ecfe Fix types for SQLite3 backend
ed25eea2c Fix session::get_table_names() for sqlite backend
7a6559c18 Merge branch 'odbc-string-len'
c6aef12b1 Add test checking string length when using bulk insert
51c4c1e1a Fix the length of strings in DB2 vector operations
be4f26fea Fix the length of strings in ODBC vector operations
521a84085 Improve get_affected_rows() documentation
e7e7fb78a Return -1 from get_affected_rows() in ODBC backend if unknown
97a4728cb Remove loop that could be never executed from ODBC code
1a0eeb186 Fix harmless variable shadowing warnings
e7cdd4754 Fix loss of error message in ODBC backend when using vectors
06915e483 Add check for absence of unneeded truncation too
82038018c Merge branch 'refactor-parse-std-tm'
56bc9f9c5 Return int, not long, from parse10() helper
281f54f51 Check for negative date components in parse10()
f2e84c4bf Don't pass exception message to parse10() helper
a1e07e389 Avoid duplicate code for parsing dates in different backends
e2f1ca530 Fix libraries link order when linking tests statically
a3685fd09 Fix unused parameter warnings in Oracle backend code
488825079 Explicitly use Ubuntu Precise for Travis builds
638b89d1f Merge remote-tracking branch 'upstream/master'
138b29e43 Lazy initialization of the temporary LOB objects for Oracle.
a9ab0db16 Merge pull request #541 from ckaminski/master
f938c0133 Get rid of allowed failures in Travis CI configuration
52539f8ab Merge branch 'odbc-mysql-bug'
2aeb32872 Fix reading from unallocated memory in ODBC with MySQL
dc05c8e82 Use switch over exchange type in ODBC vector backend code
7bd491cf2 Fix check for clang in CMake configuration
702c214a9 Remove dummy stream insertion overload for boost::optional
1b416275d Remove Travis CI builds using Postgression
d7c986c6b Disable MySQL unit test currently always resulting in a crash
2f65f02e8 Define SOCI_SQLITE3_SOURCE in all SQLite3 backend sources
4f1fbfcd4 Suppress memory leak report in glibc NSS under Ubuntu
d91c2228c Add get_dummy_from_{table,clause}() methods
78bedc931 Consistently check for connection in the session object methods
cf9cfa90c Fix DB2 backend build after x_xmltype and x_longstring additions
4b642ac5c Fixed handling of BINARY_DOUBLE in dynamic row.
2d621e8f3 Fixed memleak when reusing into and use elements.
9bb0f70b6 Revert "Fix inserting strings longer than 8000 bytes with ODBC/MS SQL"
7c28bd6c3 Fix inserting strings longer than 8000 bytes with ODBC/MS SQL
b510e1a63 moved to latest Catch UT Framework (#544)
33ae81a71 Merge pull request #545 from snikulov/odbc_handle_defaults
92afc1f91 Use defaults for unsupported types in ODBC
7fba06984 disable autosetting of SOCI_CXX_C11 to OFF
fa0e5b5a2 Merge pull request #536 from ddowling/master
723230fcc Support the OCI_SUCCESS_WITH_INFO return code in get_error_details
f21578e2a Fix an uninitialised variable access when using the Oracle backend with a database type not in the standard accepted set.
a912148f9 Fix uninitialized procedure::gotData_
646efa070 Merge pull request #534 from mutcher/master
87509d52d Corrections in README.md
34c534722 Export struct sqlite3_soci_error from DLL on Windows.
840100102 Update .gitignore patterns for Visual Studio (Code)
dc87a2c58 Docs markdown cleanup.
e719c44bb Merge pull request #524 from ravselj/firebird_blob_bug
2edb58395 Firebird backend blob write bug fix.
0a88814c2 Added Firebird specific test indicating BLOB write bug.
6eb1a3e97 Fixed handling of empty long strings.
e7194837e Added empty_blob() and nvl() to portable utilities.
adae5ade8 Merge pull request #509 from msobczak/xml_clob
45eaff9e9 Added handling of big string in DDL.
9b2d48f3b Merge pull request #510 from mloskot/ml/add-missing-decl
8ae0f3962 Add missing declspec to properly export exception classes.
f7b11ca71 Fixed handling of dt_xml in sqlite3.
1655a195e Added bigstring (XML and CLOB) support.
81a48efaf Fixed missing space in DDL.
d68170494 Fixed handling of DDL alter column syntax.
1eb4c2935 Merge pull request #508 from msobczak/blob_offset
4b0dbab3e Added uniform offset for BLOB read/write operations.
c5e37d273 Merge pull request #503 from wisk/cmake-package-export
e082831ce export cmake package
ba9963779 travis-ci: Allows to fail for odbc and mysql
92c430669 Merge pull request #454 from snikulov/enable_asan
ec746bd1d Merge pull request #375 from ravselj/sqlite_load_one
88b331507 Merge pull request #487 from msobczak/bulkiterators
780a5c5d2 Corrected handling of vectors with user-defined types.
9e83a50c3 Merge pull request #494 from snikulov/fix_travis
da09c7c6b Fix travis-ci build
307d94caf Merge pull request #492 from snikulov/av_odbc_driver_name
12708b190 Merge pull request #491 from snikulov/av_mingw_fix
4a0ac2ba3 Fixed driver name and passwd for PostgreSQL ODBC driver on AppVeyor
783e8b089 Fixed MinGW build with proper URL
0142d057f Merge pull request #489 from snikulov/fix_383
0723512f3 fixed #383
8d2901675 Added unit tests and docs for bulk iterators.
2f8a7a05e Added bulk iterators for Oracle and PostgreSQL.
2fcad8b24 Merge pull request #486 from msobczak/failover
002f6a9a7 Added docs for failover.
3daef94c7 Added failover callback for Oracle and PostgreSQL.
a0b29bc94 Merge pull request #484 from msobczak/portable-DDL
c959c3812 Added Oracle unit tests for DDL and metadata.
2a8e8965e Added PostgreSQL unit tests for DDL and metadata.
cbee6429a Typo fixes and improved docs.
4244fae07 Merge pull request #482 from msobczak/PostgreSQL-singlerows
8d2a75baa Added support for portable DDL statements.
a0917b7c8 Fixed multiple definitions bug with column_info.
596c6762b Merge pull request #480 from msobczak/metadata
b70a4e8b2 Added singlerows mode for PostgreSQL.
816839514 Merge remote-tracking branch 'upstream/master' into metadata
30aca6230 Added docs for error categories.
f2b2f4bc0 Added more error codes for error categories in Oracle.
a05b61f1f Added docs and removed impractical function for metadata queries.
3c3fec623 Portable metadata queries.
cd26169ef Added (partial) handling of OCI_SUCCESS_WITH_INFO in Oracle.
21a062023 Merge pull request #479 from snikulov/fix_478
bb8aaca05 fixed #478
376362493 Merge pull request #474 from wdavilaneto/master
23967e281 Merge pull request #475 from snikulov/cov_fixes
ec65da5a5 Fixed uninited local std::tm structs
8cb99538c adding oracle remote connection exemple without tnsnames.ora
56379eb81 Merge pull request #471 from snikulov/fix_travis
25ac65fc5 Travis-CI: allowed failure for DB2 backend
8d8002b7b Merge pull request #470 from snikulov/fix_appvr
2895c7d06 Appveyour now using MySQL 5.7
d419e945a Update AppVeyor badge URL
5c14d49cc Remove info on binding char[] support.
57db62210 Added basic support for error categories.
a1d45503b Documented Oracle wallet authentication option.
cae51eec9 Added Oracle wallet authentication.
8c6b47977 Added NLS support for connection parameters in Oracle.
912649c2c Merge pull request #459 from shelomentsevd/master
8b70e0983 Documentation. exchange.md cleaned from typos
c80646c0d Merge pull request #455 from snikulov/msvc2012_fix
3470079d1 compilation fix for msvc2012
d27fba19a Merge pull request #453 from snikulov/catch_updates
36e8fc91b updated catch.hpp version to 1.3.3
56b0b02b8 added Address Sanitizer to expose memory errors
f26138913 Merge pull request #452 from vadz/cxx11
c07a42da0 Merge pull request #451 from vadz/config-vs-platform
ec7d2dfc3 Define cxx_details::auto_ptr<> to get rid of preprocessor checks
e06bfe96e Include soci/soci-platform.h instead of soci-config.h
6fbd8481e Avoid recursive inclusion between soci-{config,platform}.h
6caeb0b50 Merge pull request #449 from snikulov/appvr_up
78ea85ca1 fixed #447
ffc564b70 Use noexcept(false) for once_temp_type dtor with MSVS 2015 too
5e3813f50 Use C++11 deleted members for SOCI_NOT_{ASSIGNABLE,COPYABLE}
449e743b9 Merge pull request #446 from ArnaudD-FR/version
46513d877 CMake read version from version.h
a8ab4c88b Revert "CMake generates soci/version.h"
6f68a7f00 Clean up already implemented features from TODO.
38d405935 Vagrant: update usage and development workflow.
c2a387b2f Vagrant: correct DB2 database lookup for existing soci test db.
f856f7730 Vagrant: fix accidental syntax error
fb545a9b8 Vagrant: update usage documentation
bd4d11d34 Add #define SOCI_HAVE_CXX_C11 mapped from with CMake SOCI_CXX_C11 option.
e476b9d93 Vagrant: build with SOCI_CXX_C11=ON
c6deb5d7e Vagrant: script formatting [ci skip]
f4a47bfcb Vagrant: correct connection strings for tests
9b10e0ba2 Vagrant: set DB2 connection string for the backend tests.
a84dade10 CMake: add boost_message_value as counterpart of boost_report_value.
540d33272 Vagrant: add SOCI_HOST variables for VMs networking
d9e6d687a Merge pull request #438 from mloskot/db2-sqldriverconnect
da61b6379 DB2: document option db2_option_driver_complete
838b99b62 DB2: Add sample SQLDriverConnect connection string
5d1ab2c77 DB2: Switch session from SQLConnect ot SQLDriverConnect
ba8b1aa24 DB2: SQLExecute return code was not tested for SQL_NO_DATA.
837e88dec Vagrant: reorder booting to load DBs before dev env
8afea2f90 Vagrant: add SOCI_DB2_USER and SOCI_DB2_PASS variables
4a576a0c2 Vagrant: switch back to building from /vagrant share
cd167df2e Vagrant: enable host to db2 networking on port 50000
7903d8e1a Vagrant: document networking support
04a59095d Vagrant: increase vm memory to 1024M
98ae7b206 Vagrant: try to avoid re-creation of soci DB if it exists
48a9c9797 Vagrant: do not run tests during provision
29c429ce9 Merge branch 'master' of https://github.com/SOCI/soci
d6182bd9b Vagrant: add Avahi/MDNS to support resolving .local hostnames
c22bfbcc1 Merge pull request #436 from ArnaudD-FR/test_version
094e19c68 CMake generates soci/version.h
2104cc9a6 Merge pull request #435 from ArnaudD-FR/test_definition
6908e473f Specify definitions in soci-config.h
634b2bf84 Vagrant: update DB2 CLI download steps
137efc496 Vagrant: add DB2 CLI client to soci.vm
435547064 Vagrant: define SOCI_* env variables via /etc/profile.d
569e8ecea CMake: add DB2 CLI driver locations
521f83cc0 Vagrant: correct comment [ci skip]
e50025ea9 Vagrant: install zip [ci skip]
a3e3f9671 Merge branch 'master' of https://github.com/SOCI/soci
6043cdf54 Vagrant: Add VM provisioned with DB2 instance and sample database
3a5066d9b Travis: remove sourcing of common.sh as unnecessary
baad25922 Spell-check and formatting
111f5644d Preserve LF or CRLF for certain file types.
016687f03 Vagrant: explain debconf issue while installing Firebird
8a04c61c4 Merge pull request #434 from mloskot/master
01b9b48a3 Add Vagrant configuration
0ba242f51 Merge pull request #430 from ArnaudD-FR/sqlite3_reset
d219a5790 [SQLITE3] Add reset API to reset sqlite3 statement
fa708ad9f Merge pull request #428 from MonsieurNicolas/affectedRowFixSqlite
8cd3cf584 added test that reuses prepared statement
6af865fce reset count of affected rows (sqlite3)
149c53a43 Merge pull request #427 from snikulov/pr_coverity_init
0cc5c50ab - Fixed Coverity issues for SQLite3: 12644, 12645, 12646 - Fixed gcc/clang warns produced with -Wextra switch for SQLite3
9476a7a53 Merge pull request #426 from snikulov/pr_odbc_enable
86890bd2b Enabled mysql/postgresql - fixed #407
0232debc8 Merge pull request #425 from snikulov/cmake_win_cxx11
c2b37f0d2 moved SOCI_CXX_C11 define to common section
91fb559f0 Merge pull request #422 from snikulov/pr_374_fix
2af6c5efc Initialize rowid_backend-derived classes members in ctor
10e3c768a Avoid harmless Coverity dead code warning in MySQL code
4fd5c965a If prepare, execute, fetch... scenario is used and fetch() is called after gotData=false was already returned it begins another loop instead of returning false again indicating that all the data was already read. The following backend fix resolves this issue.
e07f634a7 Added additional basic functionality test from prepare, execute, fetch scenario.
5b96f8c69 Clang: fixed #374
4576731e6 Disable email notifications to soci-devel
35bde9728 Merge pull request #420 from jeking3/feature/postgresql-uuid-unit-test
ddde1f4c8 Merge pull request #421 from jeking3/bugfix/test-access-dsn-file-ignore
315b2cb5b add ignore of cmake generated dsn file for access
60abeb88c add a unit test for the postgresql uuid data type
b1f730cd8 Merge pull request #419 from snikulov/pr_valgrind
8f51034cf Travis-CI: added valgrind check
185593f91 Merge pull request #418 from hw-dwalter/master
b63e850cc fixed get_affected_rows() to pass test and fixed formatting
1ebc2661c Update .travis.yml to change coverity invokation branch
ae3c4d2d8 Merge pull request #414 from hw-dwalter/master
90097ec73 added test to demonstrate bug #221 and make it valid with all backends
b86a7b8ca Update README.md
6fe0a64bd Merge pull request #417 from snikulov/coverity_part_2
dff81b73e coverity: updated .travis.yml
8c0f35e21 Merge pull request #415 from snikulov/pr_413_rework
59d2cf016 Merge pull request #416 from snikulov/pr_travis_upd
1fa1a9413 Travis-CI: try add Coverity tool
63ef39126 AppVeyor: enable MSSQL ODBC connection
7aab87e8d Merge pull request #410 from snikulov/pr_appvr_mysql
d36b06e26 Appveyor: added build for MySQL backend
8a67dbc63 Merge pull request #409 from snikulov/pr_appvr_postgres
c0de792ae Appveyor: added PosgreSQL 9.4 backend
58975c6aa Merge pull request #408 from snikulov/pr_appvr_sqlite
d0f6dec5f Appveyor: Added SQLite to build
4d2e19533 Merge pull request #406 from snikulov/appvr_db_services
f7278ce54 Merge pull request #405 from snikulov/pr_odbc_test_reorg
629e64231 appvr: added db services to build workers
9d06e47a7 ODBC: test updates
14dfe5195 Appveyor: run ctest in test_script step
0530f6fec Avoid use of POSIX strptime function
68a335707 Add some variations for tests for use with indicators.
0d84fef30 Add std::tm checks to the use with indicators tests
985571234 Add tests for some variants with char* query
0b2837def Add test for query string as char*
3a49359bd Request CATCH to disable all the C++11 features.
24cbf26cd Merge pull request #403 from DraconPern/minorcmakefix
4fab0bb33 fixed typo
0e8223f89 Notify Gitter on every build
474c44443 Fix Gitter invalid token error
1eac4da5d Merge pull request #401 from snikulov/pr_appvr_boost
da59e623d Merge pull request #400 from snikulov/pr_boost_opt
c02d65340 Merge pull request #402 from ArnaudD-FR/master
09d6f9c81 Name struct to avoid clang error/warning (issue #374)
87e1c8384 Appveyor: added Boost libraries to build
063e75374 fix for #370
1fd43ebf6 Fix accidentally broken YAML syntax
87492930c Add Gitter integration webhooks for Travis CI and Appveyor
21ba1ddc8 Merge pull request #398 from snikulov/mingw_final
2060fa062 Merge pull request #399 from SOCI/snikulov-patch-1
c683042f6 Update README.md
59c49ed50 mingw: not use ms extension for MinGW G++ compilation
492d04249 Merge pull request #397 from snikulov/make_verbose
e3e093b2e cmake: generate verbose build
903590290 Merge pull request #395 from snikulov/av_warn_fix
d1fd85b45 connection-pool: moved common part out of #ifdef
6c8b6cd42 Switch Appveyor URL from snikulov/soci to mloskot/soci.
b6443a4a2 Restore using -pedantic but use -Wno-pedantic-ms-format too
8fe5d2a1d Initialise in/out pos variable
96783407e Update connection-pool.cpp
21357eda7 Merge pull request #391 from snikulov/pr_appveyor_init
443beaa0b Don't add "-fPIC" explicitly, CMake does it automatically
e607b1c73 Don't use "-pedantic" option when building with g++
56207063b initial integration with AppVeyor-CI
8fda2bb37 boost: disable autolink, because soci controls required libs itself
7747cab51 updated to latest Catch UT framework to work with MinGW with PR #496
bb79b6074 cmake: updated FindODBC.cmake to search right sqlext.h on Windows
64dfb79f7 Merge pull request #381 from ravselj/sqlite_bug
23d398994 sqlite3_close moved after sqlite3_errmsg is called.
d0f718350 Merge pull request #380 from dgrafe/subproject_integration_fixed
f2261c40a Build system: Replacing CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR

git-subtree-dir: src/soci
git-subtree-split: 79e222e3c2278e6108137a2d26d3689418b37544
2017-12-02 13:44:06 -05:00
Brad Chase
db066da443 Update sqlite to 3.21.0 2017-12-02 13:43:49 -05:00
seelabs
090d813065 Set version to 0.90.0-b1 2017-12-01 14:15:09 -05:00
Scott Schurr
722917e9a6 Improved error message on mistyped command [RIPD-1527]:
Previously if you mistyped the "submit_multisigned" command as
"submit_multisign", the returned message was "Internal error".  Not
very helpful.  It turns out this was caused by a small amount of
code in RPCCall.cpp.  Removing that code improves two situations:

1. It improves the situation with a mistyped command.  Now the
   command returns "Unknown method" and provides the string of
   the mistyped command.

2. The "transaction_entry", if properly entered in its command
   line form, would fire an assert.  That assert is now removed.

In the process, it was discovered that the command line form of
the "transaction_entry" command has not worked correctly for at
least a year.  Therefore support for that the command line form
of "transaction_entry" is added along with appropriate unit
tests.
2017-12-01 14:15:05 -05:00
seelabs
8a02b76d73 Fix snprintf warning 2017-12-01 14:15:05 -05:00
Brad Chase
3e483cfa4c Improve JSON logging 2017-12-01 14:15:05 -05:00
JoelKatz
c42ea14531 Relay untrusted validations/proposals from cluster members (RIPD-1549)
It is common for a validator operator to connect their validator
only to other nodes under their control, using clustering. Relaying of
untrusted validations and proposals must be unreliable to prevent
denial of service attacks. But currently, they are unreliable even
within a cluster.

With this change, a cluster member's decisison to relay (or originate)
a validation or proposal is honored by other cluster members. This
ensures that validators in a cluster will get reliable relaying to
hubs outside the cluster, even if other members of the cluster do not
have that validator on their UNL.
2017-12-01 14:15:05 -05:00
Edward Hennis
a30af2ac89 Disable slow Travis builds
* Changes to Travis seem to be making these builds slower, and are
  resulting in spurious timeouts. Remove the builds that fail more
  often than not until we complete our migration to another build
  system.
* Use CMake for unity builds, instead of the slow build.
2017-12-01 14:15:05 -05:00
Brad Chase
83dc45db62 Default account_tx RPC to validated ledger range (RIPD-1544) 2017-12-01 14:15:05 -05:00
Howard Hinnant
3757829f8e Convert more timing code to <chrono>
* LoadMonitor
* Entry
* Import
2017-12-01 14:15:05 -05:00
Scott Schurr
db17ae8997 Increase multisign test coverage 2017-12-01 14:15:05 -05:00
Howard Hinnant
cd19246937 Enable batch rpc processing
* Can be exercised from the command line with json2

* Rewrite Env::do_rpc to call the same code as
  rpc from the command line.  This puts rpc
  handling logic in one place.
2017-12-01 14:15:05 -05:00
Mike Ellery
d61436cca5 add deprecation warning flag (CMake) 2017-12-01 14:15:05 -05:00
Howard Hinnant
4e6c8d8b35 Remove use of deprecated behavior involving copy members
*  If any of the destructor, copy assignment or copy constructor
   are user-declared, both copy members should be user-declared,
   otherwise the compiler-generation of them is deprecated.
2017-12-01 14:15:05 -05:00
Howard Hinnant
16acba1636 Remove use of deprecated behavior involving copy members in beast
*  If any of the destructor, copy assignment or copy constructor
   are user-declared, both copy members should be user-declared,
   otherwise the compiler-generation of them is deprecated.
2017-12-01 14:15:05 -05:00
Mike Ellery
50b35e2090 Remove hardcoded ports in several unit tests:
Fixes: RIPD-1522
2017-12-01 14:15:05 -05:00
seelabs
e8d02c1333 Refactor FeatureBitset:
* Remove composite helper functions
* Add set difference and Bitset/uint256 operators
* Convert tests to use new feature bitset set difference operator
2017-12-01 14:15:05 -05:00
Scott Schurr
3523cee63d Minimize use of jtx::with_only_features (RIPD-1515):
In order to automatically run unit tests with newly created
amendments, prefer to start with jtx::supported_features() and
then subtract unwanted features.

These changes identified a few bugs that were hiding in
amendments.  One of those bugs, in FlowCross, is not yet fixed.
By uncommenting the test in CrossingLimits_test.cpp you can see
failures relating to that bug.  Since FlowCross is not yet
enabled on the network we can fix the bug at our convenience.
2017-12-01 14:15:05 -05:00
Edward Hennis
aa76632bb3 Add STAmount switchover support to tx queue:
* RIPD-1513
* New fix1513 amendment
2017-12-01 14:15:05 -05:00
Scott Schurr
feb7582aca Unit tests don't enable Tickets or SHAMapV2 by default:
Both Tickets and SHAMapV2 have been around for a while and don't
look like they will be enabled on the network soon.  So they are
removed from the supportedAmendments list.  This prevents Env
from automatically testing with Tickets or SHAMapV2 enabled,
although testing with those features can still be explicitly
specified.

Drive-by cleanups:

o supportedAmendments() returns a const reference rather than
  a fresh vector on each call.

o supportedAmendments() implementation moved from Amendments.cpp
  to Feature.cpp.  Amendments.cpp deleted.

o supportedAmendments() declared in Feature.h.  All other
  declarations deleted.

o preEnabledAmendments() removed, since it was empty and only
  used in one place.  It will be easy to re-add when it is needed.

o jtx::all_features_except() renamed to
  jtx::supported_features_except(), which is more descriptive.

o jtx::all_amendments() renamed to jxt::supported_amendments()

o jtx::with_features() renamed to with_only_features()

o Env_test.cpp adjusted since featureTickets is no longer
  automatically enabled for unit tests.
2017-12-01 14:15:04 -05:00
seelabs
07e3f81b76 Run unit tests in parallel 2017-12-01 14:15:04 -05:00
seelabs
6ff5d3734f Make unit tests repeatable 2017-12-01 14:15:04 -05:00
seelabs
5fe65c5906 Use unique ports for every unit test 2017-12-01 14:15:04 -05:00
Brad Chase
2c13d9eb57 Redesign CSF framework (RIPD-1361):
- Separate `Scheduler` from `BasicNetwork`.
- Add an event/collector framework for monitoring invariants and calculating statistics.
- Allow distinct network and trust connections between Peers.
- Add a simple routing strategy to support broadcasting arbitrary messages.
- Add a common directed graph (`Digraph`) class for representing network and trust topologies.
- Add a `PeerGroup` class for simpler specification of the trust and network topologies.
- Add a `LedgerOracle` class to ensure distinct ledger histories and simplify branch checking.
- Add a `Submitter` to send transactions in at fixed or random intervals to fixed or random peers.

Co-authored-by: Joseph McGee
2017-12-01 14:15:04 -05:00
Mike Ellery
b9fc9f6334 Add jenkins multiconfig pipeline support:
Fixes: RIPD-1514

Create a Jenkinsfile to build on rippled slaves. Modify
build_and_test.sh to support a few additional ENV settings.
2017-12-01 13:49:58 -05:00
Edward Hennis
1853c0d678 Add STAmount switchover support to tx queue:
* RIPD-1513
* New fix1513 amendment
2017-12-01 13:49:58 -05:00
Brad Chase
6dc79c23ed Set version to 0.80.1 2017-11-29 17:58:11 -05:00
JoelKatz
5a9c3c797c Support python3 in SCons 2017-11-29 17:57:58 -05:00
Brad Chase
a4a43a4de9 Improve WorkSSL:
Support Server Name Indication
Ensure windows uses available certificates
2017-11-29 17:39:57 -05:00
wilsonianb
25b002b37f Add make_Manifest test
Reject manifest with invalid public key type

RIPD-1560
2017-11-28 20:33:33 -05:00
wilsonianb
40c39c4afb Verify validator token manifest matches private key
RIPD-1552
2017-11-28 20:33:31 -05:00
Nikolaos D. Bougalis
f0e1024ad6 Explicitly use std::deque for the missing node handler stack:
We need to ensure that pointers and/or references to existing
elements will not be invalidated during the course of element
insertion and removal.

Containers like std::vector do not offer this guarantee, and
cannot be used as the underlying container for the stack.

By choosing to explicitly specify std::deque as the underlying
cotnainer, we avoid:

- the unlikely possibility of the C++ standards committee
  changing the default template parameter to a container;
- the more likely possibility of an accidental change by
  a programmer, without fully considering the consequences.
2017-11-28 20:31:39 -05:00
Edward Hennis
c11e186659 Grow TxQ expected size quickly, shrink slowly (RIPD-1534):
* Stores recent history of "good" ledgers. Uses the maximum as the
  expected ledger size. When a large value drops off, use a 90%
  backoff to go down to to the new maximum.
* If consensus is unhealthy, wipe the history in addition to the current
  clamping.
* Include .md doc files in xcode and VS projects
2017-11-28 20:27:54 -05:00
Brad Chase
0a48916d98 Properly use ledger hash to break ties 2017-11-28 20:26:01 -05:00
Mark Travis
dffb999efb Set quorum to tolerate 2 failures for validator list of 6 members. 2017-11-28 20:23:07 -05:00
Brad Chase
044dd53513 Add validator list RPC commands (RIPD-1541):
In support of dynamic validator list, this changeset:

1. Adds a new `validator_list_expires` field to `server_info` that
indicates when the current validator list will become stale.
2. Adds a new admin only `validator_lists` RPC that returns the
current list of known validators and the most recent published validator
lists.
3. Adds a new admin only `validator_sites` RPC that returns the list of
configured validator publisher sites and when they were most recently
queried.
2017-11-28 20:21:19 -05:00
wilsonianb
02059a27d6 Make quorum unreachable if validator list expires (RIPD-1539) 2017-11-27 09:15:43 -05:00
Mark Travis
8f347a5333 Log error conditions when fetching validator list. 2017-11-27 09:12:14 -05:00
wilsonianb
bce9bca2ce Include validator manifests in published list:
Manifests of validators newly added to a published validator list are
not reliably propagated to network nodes.
This solves the problem by allowing a published validator list to
include the manifest.

RIPD-1559
2017-11-22 16:25:40 -06:00
Nik Bougalis
cafe18c592 Set version to 0.80.0 2017-10-19 14:37:27 -07:00
Nik Bougalis
3e5490ef6d Set version to 0.80.0-rc3 2017-09-22 19:35:54 -07:00
Brad Chase
c76656cf7f Use rounded close time in Consensus (RIPD-1528):
Switches the default behavior of Consensus to use roundCloseTime instead of
effCloseTime. effCloseTime is still used when accepting the consensus ledger to
ensure the consensus close time comes after the parent ledger close time. This
change eliminates an edge case in which peers could reach agreement on the close
time, but end up generating ledgers with different close times.
2017-09-22 19:35:29 -07:00
Nik Bougalis
c7c1b3cc3b Track escrow in recipient's owner directory (RIPD-1523):
Introduce "fix1523" which corrects a minor technical flaw with
the original implementation of the escrow feature.

When creating an escrow, the entry would only be tracked in the
owner directory of the sender; as a result, an escrow recipient
would not be able to detect incoming escrows without monitoring
the ledger in real-time for transactions of interest or without
the sender communicating this information out of band.

With the fix in place, escrows where the recipient differs from
the sender will be listed in the recipient's owner directory as
well.
2017-09-22 17:19:18 -07:00
Nik Bougalis
39f9135104 Securely erase memory & reduce public API 2017-09-22 17:19:16 -07:00
Nik Bougalis
dd52bdd2c4 Merge master (0.70.2) into develop (0.80.0-rc2) 2017-09-22 17:16:17 -07:00
Christian Ramseier
7a0fa312ea Update link to whitepaper and remove dead link 2017-09-22 17:13:19 -07:00
Edward Hennis
cd2d52acdc Set version to 0.70.2 2017-09-21 15:04:23 -04:00
Edward Hennis
62127d725d Recover open ledger transactions to the queue (RIPD-1530):
* If the transaction can't be queued, recover to the open ledger once,
  and drop it on the next attempt.
* New result codes for transactions that can not queue.
* Add minimum queue size.
* Remove the obsolete and incorrect SF_RETRY flag.
* fix #2215
2017-09-21 15:02:23 -04:00
seelabs
fc640504ba Set version to 0.80.0-rc2 2017-09-01 14:17:24 -04:00
seelabs
3c0b35092c Remove unused lambda capture 2017-09-01 14:16:09 -04:00
Edward Hennis
89e8ea436a Fix typo in TxQ log message 2017-09-01 14:15:18 -04:00
seelabs
21dc05fc33 Better error codes for payment channel claim (RIPD-1512) 2017-09-01 14:14:05 -04:00
Nik Bougalis
589570daa3 Set version to 0.80.0-rc1 2017-08-17 12:42:12 -07:00
Brad Chase
a02a469b20 Fix unit test compiler warnings 2017-08-17 12:41:45 -07:00
Mark Travis
be1f734845 Make amendment blocked state thread-safe & simplify a constructor. 2017-08-17 12:41:45 -07:00
Nik Bougalis
98d7fa3fd9 Set version to 0.80.0-b5 2017-08-10 15:57:09 -07:00
Howard Hinnant
74823cb7d1 Enable -Wunused-variable in CMake on macOS 2017-08-10 15:56:50 -07:00
Edward Hennis
e47bfa223f Stop ignoring npm paths 2017-08-10 15:56:50 -07:00
seelabs
5c1ec051f0 Resolve compiler warning 2017-08-10 15:56:50 -07:00
Mike Ellery
65094d9c90 Change common libs for XCode/apple (RIPD-305):
Removes unnecessary common link libs related to openssl, which we link
to explicitly using finder vars now. THis allows the generated XCode
project to link without error. Tested with CMake 3.9.0 and XCode 8.3.3.
2017-08-10 15:56:45 -07:00
Mike Ellery
c00341a97e Add invariant check tests (RIPD-1493):
Add coverage for a few invariant checks. Handle exception in invariant
checking code so that an check that throws an exception will still
properly return tef/tecINVARIANT_FAILED.
2017-08-10 15:56:09 -07:00
Mike Ellery
36423a5f77 Add zlib to libs when finding openssl (RIPD-1496):
if openssl is configured with compression support AND you link
to the static lib, you are going to need to link to zlib.

Fundamentally the CMake finder should take care of this (as
described in https://gitlab.kitware.com/cmake/cmake/issues/16885),
but we work around it here by adding zlib explicitly. Update
beast error test for OpenSSL 1.1.0
2017-08-10 15:56:05 -07:00
Brad Chase
60dd194b72 Use ledger hash to break ties (RIPD-1468):
When two ledgers have the same number of validations, the code
will now use the ledger hash itself to break the tie rather than
the highest node ID supporting each validation.
2017-08-10 15:55:52 -07:00
Brad Chase
9ae717c433 Move tagged_integer to ripple/basics 2017-08-10 15:55:46 -07:00
Mark Travis
d90a0647d6 Change UNL and quorum rules:
* Use fixed size UNL if the total listed validators are below
    threshold.
  * Set quorum to provide Byzantine fault tolerance until a
    threshold of total validators is exceeded, at which time
    quorum is 80%.
  * Ensure that a quorum of 0 cannot be configured.
2017-08-10 15:55:26 -07:00
Niraj Pant
35d81e65c1 Enforce TransferRate Maximum (RIPD-1201):
Sets a maximum TransferRate value of 100%. Squashes any
requested TransferRate over the limit to the max value.

This change requires an amendment ("fix1201") in rippled.

Adds test functionality for enabling an amendment mid-test.
Additionally, adds tests utilizing varying transfer rates both
with and without the amendment enabled.
2017-08-10 15:53:48 -07:00
seelabs
cca574c9a9 Set version to 0.80.0-b4 2017-07-31 18:40:02 -04:00
Mark Travis
c96c423afb Allow a newly-started validator to participate in consensus. 2017-07-31 18:39:59 -04:00
Nik Bougalis
463b154e3d Improve directory insertion & deletion (RIPD-1353, RIPD-1488):
This commit introduces the "SortedDirectories" amendment, which
addresses two distinct issues:

First, it corrects a technical flaw that could, in some edge cases,
prevent an empty intermediate page from being deleted.

Second, it sorts directory entries within a page (other than order
book page entries, which remain strictly FIFO). This makes insert
operations deterministic, instead of pseudo-random and reliant on
temporal ordering.

Lastly, it removes the ability to perform a "soft delete" where
the page number of the item to delete need not be known if the
item is in the first 20 pages, and enforces a maximum limit to
the number of pages that a directory can span.
2017-07-31 18:39:59 -04:00
Nik Bougalis
3666948610 Make code self-documenting by using symbolic constants 2017-07-31 18:39:59 -04:00
seelabs
397410bac6 Resolve memory leaks from make_SSLContext:
* Move into ssl functions that release the unique ptr
* Use string ref in make_SSLContext
* Resolve memory leaks
2017-07-31 18:39:59 -04:00
Howard Hinnant
7aa838c091 Give each Throw statement in codec.h a unique message 2017-07-31 18:39:59 -04:00
seelabs
458ac470aa Return error on rippleCalc exception 2017-07-31 18:39:59 -04:00
seelabs
a79cb95c85 Fix use after free error in test code 2017-07-31 18:39:59 -04:00
seelabs
5ad49454f1 Remove unused lambda captures 2017-07-31 18:39:58 -04:00
Scott Schurr
1a56b9c5f2 Replace DeadlineTimer with asio::steadyTimer (RIPD-1356):
The two active users of DeadlineTimer, NetworkOPs and Application,
now use asio::steady_timers rather than DeadlineTimer.
DeadlineTimer is removed since it is no longer used.

To assure that all in-flight closures on timers are done before
Stoppables call stopped(), the JobCounter is made more generic.
It's now a ClosureCounter.  The ClosureCounter is currently used
to count closures in flight for the JobQueue, NetworkOPs, and the
Application.
2017-07-31 18:39:58 -04:00
Scott Schurr
efe3700f70 Don't use JobQueue during shutdown (RIPD-1356):
If the JobQueue is used during shutdown then those Jobs may access
Stoppables after they have already stopped.  This violates the
preconditions of Stoppables and may lead to undefined behavior.

The solution taken here is to reference count all Jobs in the
JobQueue.  At stop time all Jobs already in the JobQueue are
allowed to run to completion, but no further Jobs are allowed
into the JobQueue.

If a Job is rejected from the JobQueue (because we are stopping),
then JobQueue::addJob() returns false, so the caller can make any
necessary adjustments.
2017-07-31 18:39:58 -04:00
Mike Ellery
fc89d2e014 Fix limit setting and add ServerImp tests (RIPD-1463,1458):
Add more test coverage for ServerHandlerImp.cpp. Ensure limit parameter
is propagated from parsed object to in-memory config.

Release Notes
-------------

This fixes a bug whereby the limit parameter on a port configuration was
ignored.
2017-07-31 18:39:58 -04:00
Scott Schurr
3c37539cee Address Travis compiler out of memory and timeout errors 2017-07-31 18:39:58 -04:00
seelabs
3d977aeacb Updates for gcc compiler 2017-07-31 13:09:29 -04:00
seelabs
4308b124c2 Set version to 0.80.0-b3 2017-07-20 18:13:49 -04:00
seelabs
b23e9c207d Handle build when BOOST_ROOT env var is not set 2017-07-20 18:12:28 -04:00
seelabs
c3a6b1600f Set version to 0.80.0-b2 2017-07-20 14:28:00 -04:00
Niraj Pant
138e1ba9a8 Fix spelling in Main.cpp 2017-07-20 14:27:57 -04:00
Edward Hennis
2858661bce Support CMake in Test.py
* scons will remain the default build type.
* New set of command line switches to control CMake.
2017-07-20 14:27:57 -04:00
Scott Schurr
afc791835e RequireAuth account can create offers to buy their currency 2017-07-20 14:27:56 -04:00
Mike Ellery
d981bff8ea Check amendment block status and update w/ ledgers:
Check and modify amendment blocked status with each new ledger (provided
by @wilsonianb). Honor blocked status in certain RPC commands and when
deciding whether to propose/validate.

Fixes: RIPD-1479
Fixes: RIPD-1447

Release Notes
-------------

This resolves an issue whereby an amendment blocked server would still
serve some RPC requests that are unreliable in blocked state and would
continue to publish validations.
2017-07-20 14:27:56 -04:00
Scott Schurr
b24d47c093 Correct handling of unauthorized offers (RIPD-1481) 2017-07-20 14:14:03 -04:00
Brad Chase
df086301b6 Fix consensus quorum comparison 2017-07-20 14:14:03 -04:00
Brad Chase
01b4d5cdd4 Migrate thread safety to RCLConsensus (RIPD-1389):
Moves thread safety from generic Consensus to RCLConsensus and switch generic
Consensus to adaptor design.
2017-07-20 14:14:03 -04:00
wilsonianb
8c155dd875 Make minimum quorum Byzantine fault tolerant (RIPD-1461) 2017-07-20 11:45:39 -04:00
seelabs
3f9a38697d Cache gdb in CI 2017-07-20 11:45:39 -04:00
seelabs
87742a5e6c Set version to 0.80.0-b1 2017-07-11 22:02:39 -04:00
seelabs
5b9e8a77ca Install gdb 8 for CI:
A bug in gdb is crashing when demangling some symbols. Gdb needs to be updated
to at least gdb 8.

Only run the debug build under gdb (other builds can time out).
2017-07-11 22:02:35 -04:00
Brad Chase
2821624ede Add consensus tests to CMake (RIPD-1482) 2017-07-11 12:55:06 -04:00
Mike Ellery
ac1ab720c4 Add tests for subscribe/unsubscribe error cases:
Fixes: RIPD-1417

Fix incorrect error case messages. Fix crash in NetworkOps instance when
exiting with remaining RPC subscriptions. Add code to remove URL
subscription when requested.
2017-07-11 12:55:00 -04:00
Brad Chase
e0168b98d7 Add optional consensus hash field 2017-07-11 12:54:47 -04:00
Mike Ellery
18801b81de Add jemalloc support to cmake build (RIPD-1472):
Enable jemalloc under option. Create additional option that sets flags
appropriate for use with linux perf. Tested with jemalloc on linux and
macos.
2017-07-11 12:54:38 -04:00
Mike Ellery
1daefeb594 Add unit test for owner_info (RIPD-1416)
This RPC method is deprecated, but i've added a basic test to cover it
until we actually remove it.
2017-07-11 12:54:28 -04:00
Brad Chase
068048718e Use Boost ICL for RangeSet (RIPD-1473) 2017-07-11 12:54:11 -04:00
Mike Ellery
56946e8128 Change features default behavior in Env (RIPD-1460):
Enable all supported amendments in Env by default. Rename `features()`
to `with_features()` and add `all_features_except()` to support feature
subsets in Env. Refactor internal feature handling based on a bitset.
2017-07-11 12:53:59 -04:00
Brad Chase
3dfb4a13f1 Expose consensus parameters for simulation (RIPD-1355) 2017-07-11 12:53:53 -04:00
Brad Chase
7ae3c91015 Refactor Validations (RIPD-1412,RIPD-1356):
Introduces a generic Validations class for storing and querying current and
recent validations.  Aditionally migrates the validation related timing
constants from LedgerTiming to the new Validations code.

Introduces RCLValidations as the version of Validations adapted for use in the
RCL.  This adds support for flushing/writing validations to the sqlite log and
also manages concurrent access to the Validations data.

RCLValidations::flush() no longer uses the JobQueue for its database
write at shutdown.  It performs the write directly without
changing threads.
2017-07-11 12:53:34 -04:00
Miguel Portilla
95f107d487 Update to use latest beast 2017-07-11 12:18:53 -04:00
Vinnie Falco
61316c7f95 Changes for Beast version 59 2017-07-11 12:18:17 -04:00
Miguel Portilla
49bdf2e72d Update beast subtree to version 79
Merge commit 'f0f96bd1da42ccc0490d386a4e2f0ee8f2dadb43' into develop
2017-07-11 12:17:02 -04:00
Miguel Portilla
f0f96bd1da Squashed 'src/beast/' changes from 6d5547a..3bcd986
3bcd986 Set version to 79
4f42f8c Remove spurious fallthrough guidance
fa1ac16 Set version to 78
0cb9b63 Fix warning in root ca declaration
f78c73a Tidy up file_posix unused variable
72ce9ef Tidy up dstream for existing Boost versions
efe8e58 Add Boost.Locale utf8 benchmark comparison
f7c745e Remove string_view_body
7a79efa Tidy up FieldsReader doc
e51aefd Header file tidying
69898f4 Fix warning in zlib
53723c0 Add message keep_alive, chunked, content_length members
d7af73b Fix spurious uninitialized warning
ca42cc0 Tidy up invalid characters in test vector
48d3e60 Use make_unique_noinit
a1ff804 span, string, vector bodies are public
feab6a0 Documentation work
116c0b0 Add span_body
7fb901d Tidy up includes and javadocs
f0f58be Add span
7a8982b Add vector_body
524f73a Tidy up basic_string_body
a8ad67b Set version to 77
d555859 file_posix works without large file support
1bc30cb Set version to 76
9a1e7a8 Disable SSE4.2 optimizations
09af312 Fix parse illegal characters in obs-fold
7dd684c Add file_body_win32:
1bbc71c serializing file_body is not const
9a4b55e BodyReader, BodyWriter use two-phase init (API Change):
dc400ce Serializer members are not const
1a33c37 Rename to serializer::keep_alive (API Change):
55935c5 Add serializer::chunked
63ace37 Add serializer::get
2c4047b BodyReader may construct from a non-const message
0a0a225 Use Boost.Config
6f83d07 Always go through write_some:
0e23066 Set version to 75
28f3ece Doc tidying
3495331 Using SSE4.2 intrinsics in basic_parser if available
bc1f0ac file_body tests
4e03d7e Add serializer::limit
85e3ee8 Shrink serializer buffers using buffers_ref
78bcdb1 Tidy up BEAST_NO_BIG_VARIANTS
3ea6cf2 Construct buffer_prefix_view in-place
69f9f7a Use file_body for valid requests, string_body otherwise.
6f88f01 Set version to 74
93fed8e remove redundant flush() from example:
e0f56da Fix Beast include directories for cmake targets
5ff9e0a Add file_posix
1bb5705 Remove common/file_body.hpp
5c89d87 Add file_body
67a55c8 Add file_win32
647d3b0 Add file_stdio and File concept
89c416c Set version to 73
0efc32f Fixes for gcc-4.8
c8910ab Initialize local variable in basic_parser
8a28193 Adjust benchmarks
81e51d8 Verify certificates in SSL clients
a43f6d4 Jamroot tweak
8c85ee8 Put more... links on overload reference pages
ff1104e Documentation tidy
826ff0e serializer::next replaces serializer::get (API Change):
8d67775 Refactor header and message constructors:
6c79f19 Add basic_parser tests
25127d9 basic_parser optimizations:
9d082fd Set version to 72
c88e2b9 Various improvements to http_server_fast.cpp:
20b0fdb Documentation tidying
afd1fa7 Add websocket-server-async example
954b597 Add http-server-threaded example
df8f253 Refactor file_body for best practices
11c1037 Newly constructed responses have a 200 OK result
a648817 Refine Body::size specification
40aad37 Tidy up set payload in http-server-fast
52cefbc Set version to 71
8c51c77 Tidy up Jamroot /permissive-
5efecea Update README.md
5a47acd Tidy up http_sync_port error check
a2af2b5 Concept check in basic_dynamic_body
8b80a6f Fix buffer overflow handling for string_body and mutable_body
ec3b4fd Return std::size_t from Body::writer::put (API Change)
effbb37 Check trailers in test
f5368cf Call prepare_payload in HTTP example
a3e5e01 Fix spurious on_chunk invocation
96d94eb Add options for building examples and tests. Move zlib test sources to test/zlib
e0efdc7 Allow close, ping, and write to happen concurrently
9c1a419 Refactor websocket composed ops
d5659a4 Fine tune websocket asserts
b8e8943 std::pair "last" -> "first" in http_message.qbk
c691bf4 Fix can/cannot thinko in FAQ.
6dd006b Documentation revision
6d2e315 Fix extra ; warning
78a065b Set version to 70
00c7e9d Fix HEAD response in file_service
67d70d2 Fix BEAST_FALLTHROUGH in config
4f33655 Add parser::on_header to set a callback
9c16b21 Add basic_parser header and body limits:
b64d1f7 Rename to message::base (API Change):
436c66a Serialize in one step when possible
3e1061b Set version to 69
f709273 Add /permissive- to msvc toolchain
0dae464 Use BEAST_FALLTHROUGH to silence warnings
a70d386 basic_parser optimizations
4269f35 Set version to 68
544327f Link statically on cmake MSVC
e213ffe Add const_body, mutable_body to examples
0568763 Optimize field lookups
8fc3001 Use string_ref in older Boost versions
8af77da bad_target replaces bad_path (API Change):
325dd62 Adjust buffer size in fast server
be59785 Doc erratum
d9b44f3 Small speed up in fields comparisons
3e6ce38 Use Boost master on Appveyor
09f3d64 Split common tests to a new project
adfd22a Remove BodyReader::is_deferred (API Change):
582d28d Change BodyReader, BodyWriter requirements (API Change):
8982e14 Set version to 67
daa58a2 Group common example headers
afd8f1a Rename to http-server-fast
07cb9f7 control_callback replaces ping_callback (API Change):
91e83ed Use boost::string_view
067db87 Merge stream_base to stream and tidy
d61241a Add http-server-small example
eb08e92 Fix doc example link
7fb75d0 Set version to 66
df86723 Respect debug flag for marked output
c08565a Squelch spurious warning on gcc
188ef7c Documentation work
1c62d3a Add http-server example
3f54582 basic_fields optimizations
a8b05b8 Add header aliases
b94eac3 Tidy up message piecewise ctors
9c48b52 Handle bad_alloc in parser
1b57c54 Fix costly potential value-init in parser
1edc41e Make consuming_buffers smaller
72ac918 Add serializer request/response aliases
18f7606 string_param optimizations
c675252 Set version to 65
c398cdd Enable msvc warnings in Jamfile
380cceb Fix unused variable warnings
4172e7e Enable unused variable warning on msvc cmake
f04d227 Fix integer warnings
ca975b3 Fix narrowing in deflate_stream
2fab796 Fix narrowing in inflate_stream
cff87f6 Fix narrowing in ostream
1956886 Fix narrowing in static_ostream
69cdc4b Fix integer types in deflate_stream::bi_reverse
3e3dd21 Enable narrowing warning on msvc cmake
e11a294 Set version to 64
a00e070 Remove make_serializer (API Change):
8449697 Add link_directories to cmake
7b2b066 Doc tidying
158d3e8 async_write requires a non-const message:
d13328b Better User-Agent in examples
ebcb2c0 Exemplars are compiled code
b9054d3 Simplify websocket write_op
c2571fe Simplify ssl teardown composed op
d8ad3d1 Simplify buffered_read_stream composed op
f68dc34 Set version to 63
a99f7ef Control running with valgrind explicitly
4eb7af4 Tidy up Jamfiles
49b42a5 Tidy up CMakeLists.txt
dadb54f Only run the tests under ubasan
d1c7696 Move benchmarks to a separate project
a4aada8 Only build and run tests in variant=coverage
f835b9a Don't use cached Boost
a0edd82 Put num_jobs back up on Travis
a8d5823 Use std::to_string instead of lexical_cast
45d8b81 Set version to 62
09e07ce Put slow tests back for coverage builds
295b1d7 Doc tidy
f58425c Squelch harmless not_connected errors
9b537f7 Add http::is_fields trait
d43701b message::prepare_payload replaces message::prepare (API Change):
42ba289 Refine FieldsReader concept (API Change)
bde90a1 Narrow the use of Fields parameters:
5f47526 parser requires basic_fields (API Change):
60f58e4 Avoid explicit operator bool for error
352f8de Clear the error faster
34befd8 Tidy up namespaces in examples
9e0b4b5 Doc fixes and tidy
c003a2a Tidy up test build scripts and projects
b929130 Add server-framework tests
03d4301 Increase detail::static_ostream coverage
80d7cbc Remove libssl-dev from a Travis matrix item
4c15db4 Set version to 61
1dfbd0b Don't run slow tests on certain targets
6bb1109 Use one job less on CI
6f58342 Tidy up resolver calls
530b044 Add multi_port to server-framework
bfef5d1 Tidy up http-crawl example
e2f2f33 Reorganize SSL examples
adc301b Fix shadowing warnings
c60185e Add server-framework SSL HTTP and WebSocket ports
7912fb8 Refactor WebSocket, HTTP examples:
cd4b9e0 Flush the output stream in the example
d046b20 Tidy up names in error categories
9d4a422 status-codes is unsigned (API Change)
e3599b0 header::version is unsigned (API Change)
a26b043 Add message::header_part()
fc8d2e9 Tidy up some integer conversion warnings
c91732e Reorganize SSL examples
9907b31 Documentation work
4b2e78e Use generic_cateogry for errno
38c46cd Remove Spirit dependency
c111d6f Set version to 60
d78dc12 Documentation work
141a524 New server-framework, full featured server example:
3f7ffd9 Fix response message type in async websocket accept
13f3750 String comparisons are public interfaces
4e4bcf8 Set version to 59
5015cdb Remove obsolete doc/README.md
71c3f0a Fix base64 alphabet
aa2b843 Change Body::size signature (API Change):
80a599a Documentation work
9c19449 Integrated Beast interface.
3f8097b Set version to 58
4581777 Better message formal parameter names
5879cd8 Fix parsing chunk size with leading zeroes
56bd228 Remove redundant code
534ca63 Use static string in basic_fields::reader
a7b3810 basic_parser::put doc
1e4413f basic_fields::set optimization:
9b244c1 Fix basic_fields insert ordering
4f854d0 Avoid std::string in websocket
dc8f146 Renamed to basic_fields::set (API Change):
660c465 Specification for http read
981285b Documentation tidy
983d676 Reorganize examples:
a2a5c57 Qualify size_t in message template
d86769c Fix unaligned reads in utf8-checker
8ba182c Set version to 57
42e2791 Update doc/ for docca
1ee0afd Merge commit '101d7dbfb9725674cb9ce5a4196f19aa1d4bb801' as 'doc/docca'
101d7db Squashed 'doc/docca/' content from commit c50b3ba5
900c04e Documentation work
8eee932 Fix warning in basic_parser.cpp
437a616 Fix message.hpp javadocs
18c68ce Set version to 56
b058e90 Convert buffer in range loops
cbc9212 Add Beast INTERFACE CMake target
2914b59 More basic_parser tests
ed5c317 Reset error codes
ba14251 Test error code handling
e45e50b Tidy up README.md build instructions
16efb9b Try harder to find Boost (cmake)
e281d91 HTTP/1 is the default version
916fe4a Call on_chunk when the extension is empty
9855598 Add string_view_body
19d4520 Tidy up
6e59f9b Add provisional IANA header field names
84722f2 Revert "Add a Beast CMake interface target:"
fde6929 Set version to 55
01f6cc4 Documentation work
a7a388c read_size replaces read_size_helper:
ed8f0bb Tidy up type_traits
c2f6268 Avoid a parser allocation using non-flat buffer:
906db45 Add a Beast CMake interface target:
47f2541 Don't allocate memory to handle obs-fold
6a8912a Set version to 54
296ef3b Documentation work
e3e9b61 Fix incorrect use of [[fallthrough]]
3c44398 Retain ownership when reading using a message
a71bb2b basic_fields refactor (API Change):
d8d3562 Add string_param
83b2558 basic_fields members and coverage
c4f5fa5 consuming_buffers members and coverage
e10507c multi_buffer members and coverage
0e6bd3f flat_buffer coverage
7351d6e static_buffer coverage
18a8ef5 Set version to 53
452df59 Remove extraneous doc file
3ef0359 Fix read_size_helper usage:
b64e6d3 Fix basic_parser::maybe_flatten (#462)
76402f7 Set version to 52
b0ceb2a Add drain_buffer class
4c6735a flat_buffer is an AllocatorAwareContainer
9d5d4d5 Documentation work
d4ec693 finish(error_code&) is a BodyReader requirement (API Change)
7b24cad opcode is private (API Change):
068c2ac Documentation work
a1ff89b Disable std::future snippet for libstdc++ bug
b5ef664 read_frame returns `bool` fin (API Change):
7911847 Remove opcode from read, async_read (API Change):
c72d70f ping_callback is a member of stream (API Change):
720a309 write_buffer_size is a member of stream (API Change):
7ff0178 read_message_max is a member of stream (API Change):
cd40964 read_buffer_size is a member of stream (API Change):
a58e5e1 binary, text are members of stream (API Change):
ad35846 auto_fragment is a member of stream (API Change):
ccee139 Documentation work
13c64e3 Set version to 51
cafc8e2 Fix infinite loop in basic_parser
dc4b69d Add construct, destroy to handler_alloc
58c2739 multi_buffer implementation change (API Change):
dd7f5c0 DynamicBuffer benchmarks
1c4811b Use BOOST_STRINGIZE
31051ac Use BOOST_FALLTHROUGH
8f2430b Documentation work
eb35b92 Fix file_body::get() not setting the more flag correctly
566244a Tidy up file_body
53cbeea Tune up static_buffer (API Change):
20c59b7 Fix operator<< for header
a2c1117 Set version to 50
6045b74 http read_some, async_read_some don't return bytes (API Change):
4df6885 Fix chunk header parsing
36bf32b Fix test::pipe read_size
bf69ce1 Fix chunk delimiter parsing
0c6b6b1 Add missing handler_alloc nested types
a06b8f9 Tidy up message javadoc
3bd8260 Remove obsolete serializer allocator (API Change)
001c979 Remove message free functions (API Change)
745876b Remove message connection settings (API Change)
bcf2c33 Body documentation work
1e303b0 Fields concept work
9d0464a Tidy up basic_fields, header, and concepts
3ba81b5 Use field in basic_parser
b5f6cc1 Use field in basic_fields and call sites
cfd6d14 Documentation reference tidy
2adc80a Protect basic_fields special members (API Change)
d55b079 Fix basic_fields allocator awareness
d8febda Documentation work
485a6e5 Refactor prepare (API Change)
9fd3071 Derive header from Fields (API Change)
8ad26b8 Use allocator more in basic_fields
0071039 Add verb to on_request for parsers (API Change)
74f6cbb Add field enumeration
be0d74f Documentation fixes
054ac40 Remove header_parser (API Change)
a007eba parser is constructible from other body types
d89809f Documentation work (buffer_body)
ac5bc4f Set version to 49
af47128 Documentation work
a1848f0 Add HEAD request example
ddfbfbf Use <iosfwd> instead of <ostream>
e67c0ab Refactor header status, reason, and target (API Change):
60f044a Tidy up empty_body writer error
7d267f4 Canonicalize string_view parameter types
ac175cb Refactor method and verb (API Change):
e18efed Documentation work
d77e423 Set version to 48
d3a5a05 Documentation work
acf18fb Tidy up traits
6cb188e Remove detail::sync_ostream
d6092bc Documentation work
4707b21 Rename to parser (API Change):
3cb385d Consolidate parsers to parser.hpp
290bdf1 Documentation work
7cb442c Make buffer_prefix_view public
ef0b121 Rename to buffer_cat_view (API Change)
b9df187 Tidy up chunk decorator (API Change):
458fa7e Set version to 47
fc83a03 Documentation work
1ee3013 Fix leak in basic_flat_buffer
55fbf76 Fix undefined behavior in pausation
fe75a7c Refactor HTTP serialization and parsing (API Change):
50cba32 buffer_size overload for basic_multi_buffer::const_buffers_type
d977bf2 Disable operator<< for buffer_body
5db707a Refactor treatment of status code and obsolete reason (API Change):
9a585a8 Refactor treatment of request-method (API Change):
3ae76d0 Set version to 46
6004712 Documentation work
34ea0b3 Refactor serialization algorithms:
407b046 Rename to make_serializer
c29451a Refactor type_traits (API Change):
8578419 Refactor HTTP serialization (API Change):
f8612aa Remove HTTP header aliases (API Change):
b0054e3 Add test::pipe
dfba72b Set version to 45
6ba3697 Disable reverse_iterator buffer_view test
266ebac buffer_view skips empty buffer sequences
96b9892 Documentation work
c23f1e2 Fix header::reason
9796106 Better test::enable_yield_to
9a8bcb7 Fix message doc image
7a5e87e Workaround for boost::asio::basic_streambuf type check
663c275 Set version to 44
f205976 Make buffers_adapter meet requirements
8e39c60 Tidy up is_dynamic_buffer traits test
0088f7c Add buffers_adapter regression test
8a23de1 Fix README websocket example
949504a Fix async return values in docs
cd9f41b Use BOOST_STATIC_ASSERT
1b616fa Tidy up and make get_lowest_layer public
612e616 Require Boost 1.58 or later
1b1daa7 Tidy up read_size_helper and dynamic buffers
bf0145d Use BOOST_THROW_EXCEPTION
e762818 Add GitHub issue template
dab679c Set version to 43
386b817 Reformat README.md QR code
50e5123 Additional constructors for consuming_buffers
f7289b9 Add write limit to test::string_ostream
3aa87e0 Tidy up buffer_prefix overloads and test
bee583c Fix strict aliasing warnings in buffers_view
6b54d3a Require Boost 1.64.0
76f1084 Set version to 42
0bdb148 Make buffers_view a public interface
338fc81 Add formal review notes
784f965 Fix javadoc typo
823aee2 Set version to v41
88adbdd Remove handler helpers, tidy up hook invocations (API Change)
4974af2 Rename prepare_buffer(s) to buffer_prefix (API Change)
ebd459b Tidy up websocket::close_code enum and constructors
c3fd6f9 Tidy up formal parameter names
210cd70 Remove coveralls integration
d811962 Concept revision and documentation (API Change):
bdae92a Replace asynchronous helper macros with template aliases (API Change)
df95a09 Move prepare_buffers to prepare_buffer.hpp (API Change)
787de21 Remove placeholders (API Change)
c59b544 Trim Appveyor matrix rows
b7184f3 Return http::error::end_of_stream on HTTP read eof (API Change)
f2d8255 Set version to 40
40b9194 Tidy up .travis.yml:
9b240c7 Fix basic_streambuf movable trait
76a2617 Consolidate get_lowest_layer in type_traits.hpp
6d00321 Add to_static_string:
f888136 Set version to 39
47c82b5 Better travis deps
4ed7865 Squelch openssl spurious leak and memory errors
b6bc26f Fixed braced-init error with older gcc
59b2f8f ostream workaround for gcc 4.8.4
8363d86 Increase ostream test coverage
5631936 Tidy up HTTP reason_string (API Change):
2bf5150 Harmonize concepts and identifiers with net-ts (API Change):
728e9d8 Tidy up basic_parser javadocs
1c9067b Use beast::string_view alias
771c5ca Doc fixes and tidying
e2b5c31 Rename to buffered_read_stream (API Change):
a753f1c Rename to static_buffer, static_buffer_n (API Change):
24b6686 Rename to flat_buffer, basic_flat_buffer (API Change):
69259ef Rename to multi_buffer, basic_multi_buffer (API Change):
bef9ae1 New buffers() replaces to_string() (API Change):
a7ef4f5 New ostream() returns dynamic buffer output stream (API Change):
87fd60c Fix eof error on ssl::stream shutdown
606fc9d Add websocket async echo ssl server test:
ff5e659 Refactor http::header contents (API Change):
dd02097 Set version to 1.0.0-b38
5596e97 Prevent basic_fields operator[] assignment
c2b32dc Remove websocket::keep_alive option (API Change):
32dbfb2 Refactor WebSocket error codes (API Change):
dd6b500 WebSocket doc work
0b4d87c More flat_streambuf tests
aacefb4 Add test_allocator to extras/test
931a5fb Simplify get_lowest_layer test
ba4228a Use static_string for WebSocket handshakes:
6df3ff3 Refactor base64:
19b124d Refactor static_string:
30e8d16 Set version to 1.0.0-b37
b141020 Fix narrowing warning in table constants
d554b81 Add -funsigned-char to asan build target
bcc6ad8 Add ub sanitizer blacklist
e1f08e9 Fix flat_streambuf:
7d08f59 Fix typo in documentation example
21ef97d Rename to http::dynamic_body, consolidate header:
45a2d73 Rename project to http-bench
c86fee9 Move everything in basic_fields.hpp to fields.hpp (API Change)
a14a5d6 Rename to detail::is_invocable
540d037 Rename to websocket::detail::pausation
84e1739 Document websocket::stream thread safety
dc274af Add is_upgrade() free function:
2c17d04 Refactor websocket decorators (API Change):
235fe68 Provide websocket::stream accept() overloads (API Change):
a715825 CMake hide command lines in .vcxproj Output windows
32024d8 Set version to 1.0.0-b36
f48b95f Update README.md
d8db5f1 Set version to 1.0.0-b35
dd2a514 Tidy up doc declarations
2c50aba Fix README.md CMake instructions
4ffdce2 Update .gitignore for VS2017
403011f Remove http::empty_body (API Change)
f47b661 New HTTP interfaces (API Change):
f6835b8 Rename to BEAST_DOXYGEN
7e37723 Add flat_streambuf:
5b68faa Doc XSL support for list and table markdown
3de46de Make websocket::close_code a proper enum:
0128743 Tidy up MSVC CMake configuration
ccd188e Add appveyor build script

git-subtree-dir: src/beast
git-subtree-split: 3bcd9865f80f12ba5faad35c564918f85b02e271
2017-07-11 12:17:02 -04:00
Nik Bougalis
3bfd9de677 Set version to 0.70.1 2017-06-30 14:29:55 -07:00
JoelKatz
f9b5ab4728 Support OpenSSL 1.1.0:
Work around differences between OpenSSL 1.0 and 1.1 to
permit compiling on distributions that use newer versions.
2017-06-30 14:29:45 -07:00
seelabs
7abd70356d Ensure consistent transaction processing in debug mode:
When NDEBUG is undefined (which is typical in debug configurations)
existing code would perform additional checks which could result in
a `tel` error.
2017-06-30 13:35:36 -07:00
seelabs
d8313288ad Log invariant check messages at "fatal" level 2017-06-29 08:40:50 -07:00
Brad Chase
a89be5b269 Clean up consensus logic:
* Simplify bow-out handling
* Improve dispute updating
* Filter partial validations
2017-06-29 08:40:50 -07:00
Nik Bougalis
7b0d482810 Set version to 0.70.0 2017-06-15 08:05:33 -07:00
Warren Paul Anderson
e81f3eb1d2 Add integration support notice in README:
If you work at a digital asset exchange or wallet provider
and are trying to integrate with Ripple, please contact us
at support@ripple.com. We can help guide your integration.
2017-06-15 08:03:58 -07:00
Nik Bougalis
cd0a2d6ef3 Set version to 0.70.0-rc1 2017-06-14 12:13:44 -07:00
Nik Bougalis
d04d3d3c4a Implement additional invariant checks:
Invariant checks run after a transaction has been processed and
ensure that the end result of that transaction did not violate
any protocol rules.

New checks include:

* XRP balance checks for negative balances
* Offer balance checks for negative balances
* Zero balance checks when handling escrow
2017-06-14 12:11:26 -07:00
wilsonianb
da7da5527c Redact validator token from cleaned config (RIPD-1422) 2017-06-14 11:54:44 -07:00
Nik Bougalis
6f4bc30684 Set version to 0.70.0-b8 2017-06-08 21:38:22 -07:00
Nik Bougalis
fa72795d84 Display warning when generating brain wallets:
A brain wallet is a standard wallet that is generated not from a
random seed but by hashing a user-supplied passphrase. Typically,
human-selected passphrases can contain insufficient entropy.

When generating a wallet from a passphrase, we include a warning
to this effect. The warning would be incorrectly displayed even
if the wallet was being generated from a seed.
2017-06-08 21:38:21 -07:00
Mark Travis
68b8ffdb63 Improve automatic tuning of thread pool:
The job queue can automatically tune the number of threads that
it creates based on the number of processors or processor cores
that are available.

The existing tuning was very conservative, limiting the maximum
number of threads to only 6.

Adjust the new algorithm to allow a larger number of threads and
allow server administrators to override the value in the config
file.
2017-06-08 21:37:59 -07:00
mDuo13
cb91d56d07 Document optional SField type magic 2017-06-08 21:37:22 -07:00
mDuo13
6e889e6a18 Update source code directory map 2017-06-08 21:35:03 -07:00
Frank Cash
be9c3b218b Fix README formatting 2017-06-08 21:34:57 -07:00
seelabs
a92f5b8e5a Set version to 0.70.0-b7 2017-06-01 14:07:05 -04:00
seelabs
3eeb79ee12 Use sandbox for takerCross:
Using a PaymentSandbox for taker cross can cause transaction breaking changes. A
PaymentSandbox uses a deferred credits table, which can cause tiny differences
in computations.
2017-06-01 14:05:32 -04:00
Nik Bougalis
24e1b9911a Set version to 0.70.0-b6 2017-05-17 04:06:31 -07:00
Edward Hennis
3a973ab719 Improve TxQ locking 2017-05-17 04:06:22 -07:00
Edward Hennis
6f10fe8502 Tidy up MSVC CMake configuration 2017-05-17 04:06:22 -07:00
Edward Hennis
d471e533b7 Group CMake sources from arbitrary folder:
* Instead of default PROJECT_SOURCE_DIR
* Useful when called for submodules
2017-05-17 04:06:22 -07:00
Scott Schurr
1a238048d5 Reduce JobQueue interface 2017-05-17 04:06:21 -07:00
Brad Chase
aa2ff00485 Prevent duplicate txs in book subscription (RIPD-1465):
If an offer transaction touched multiple ledger entries associated with the same
book, that offer transaction would be published multiple times to anyone subscribed
to that book stream.

Fixes #2095.
2017-05-17 04:06:21 -07:00
Brad Chase
f2787dc35c Improve pseudo-transaction handling (RIPD-1454, RIPD-1455):
Adds additional checks to prevent relaying and retrying pseudo-transactions.
2017-05-17 04:06:21 -07:00
Mike Ellery
8002a13dd2 Add test for account_currencies (RIPD-1415) 2017-05-16 19:46:58 -07:00
seelabs
7dc2fe9ce7 Handle strand creation for erroneous self-payment 2017-05-16 19:46:58 -07:00
seelabs
5f37765292 Make Paystrand tests automatic:
Only PayStrandAllPairs is still manual
2017-05-16 19:46:58 -07:00
seelabs
a56d31910f Disallow account one in payments 2017-05-16 19:46:58 -07:00
seelabs
24505a358a Remove unneeded test and std::bind:
These changes are needed to support gcc 7
2017-05-16 15:16:30 -07:00
Nik Bougalis
c570695aa1 Merge master (0.60.3) into develop (0.70.0-b5) 2017-05-16 15:12:55 -07:00
Nik Bougalis
208028a142 Set version to 0.60.3 2017-05-10 10:21:04 -07:00
Brad Chase
dceef25e2c Update Travis dependency 2017-05-09 12:43:32 -07:00
JoelKatz
256e58204a Give statically-configured bootcache entries priority:
Make sure statically-configured bootcache entries have at least
a reasonable minimum priority. This provides additional protection
against Sybil attacks.

Show the bootcache in the ouput of the print command.
2017-05-09 12:42:35 -07:00
JoelKatz
c1d64e1b1a Overlay tuning and logging improvements:
Adjust overlay tuning to reflect measured behavior of the
network under increased load.

Improve logging of peer sendq size and disconnect reasons.
2017-05-09 12:42:21 -07:00
Scott Schurr
1dbc5a57e6 Set version to 0.70.0-b5 2017-04-24 16:13:46 -07:00
Edward Hennis
9cc542fe67 Fix include ordering 2017-04-24 15:37:23 -07:00
Edward Hennis
f7a7f13287 Run Travis CI unit tests using arguments from config 2017-04-24 15:36:06 -07:00
Edward Hennis
96ece1b9f0 Fix levelization
* Move `chooseLedgerEntryType` from protocol to RPC
2017-04-24 14:47:29 -07:00
Edward Hennis
46004158a2 Allow Json parser understand TER strings where appropriate 2017-04-24 13:44:45 -07:00
Edward Hennis
7e9ac16c22 Fix Json Int/UInt comparison limit check 2017-04-24 13:20:40 -07:00
Miguel Portilla
2e5ab4e0e3 Make Websocket send queue configurable 2017-04-24 13:19:10 -07:00
Brad Chase
00c60d408a Improve Consensus interface and documentation (RIPD-1340):
- Add Consensus::Result, which represents the result of the
establish state and includes the consensus transaction set, final
proposed position and disputes.
- Add Consensus::Mode to track how we are participating in
consensus and ensures the onAccept callback can distinguish when
we entered the round with consensus versus when we recovered from
a wrong ledger during a round.
- Rename Consensus::Phase to Consensus::State and eliminate the
processing phase.  Instead, accept is a terminal phase which
notifies RCLConsensus via onAccept callbacks.  Even if clients
dispatch accepting to another thread, all future calls except to
startRound will not change the state of consensus.
- Move validate_ status from Consensus to RCLConsensus, since
generic implementation does not directly reference whether a node
is validating or not.
- Eliminate gotTxSetInternal and handle externally received
TxSets distinct from locally generated positions.
- Change ConsensusProposal::changePosition to always update the
internal close time and position even if we have bowed out. This
enforces the invariant that our proposal's position always
matches our transaction set.
2017-04-24 13:13:23 -07:00
Scott Schurr
d5dc715d9c Unit test offer crossing with lsfRequireAuth (RIPD-1346) 2017-04-24 10:10:31 -07:00
Scott Schurr
369909df84 Use payment flow code for offer crossing (RIPD-1094):
Replace Taker.cpp with calls to the payment flow() code.

This change required a number of tweaks in the payment flow code.
These tweaks are conditionalized on whether or not offer crossing
is taking place.  The flag is explicitly passed as a parameter to
the flow code.

For testing, a class was added that identifies differences in the
contents of two PaymentSandboxes.  That code may be reusable in
the future.

None of the Taker offer crossing code is removed.  Both versions
of the code are co-resident to support an amendment cut-over.

The code that identifies differences between Taker and Flow offer
crossing is enabled by a feature.  That makes it easy to enable
or disable difference logging by changing the config file.  This
approach models what was done with the payment flow code.  The
differencing code should never be enabled on a production server.

Extensive offer crossing unit tests are added to examine and
verify the behavior of corner cases.  The tests are currently
configured to run against both Taker and Flow offer crossing.
This gives us confidence that most cases run identically and
some of the (few) differences in behavior are documented.
2017-04-24 09:24:46 -07:00
Vinnie Falco
2cd55ebf98 Fix json_body for Beast API changes 2017-04-20 13:45:28 -07:00
Vinnie Falco
4e43e22a3a Update to Beast 1.0.0-b34:
Merge commit 'd8dea963fa5dc26b4be699ce6d4bf699a429ca92' into develop
2017-04-20 13:42:52 -07:00
Vinnie Falco
d8dea963fa Squashed 'src/beast/' changes from 1b9a714..6d5547a
6d5547a Set version to 1.0.0-b34
6fab138 Fix and tidy up CMake build scripts:
ccefa54 Set version to 1.0.0-b33
32afe41 Set internal state correctly when writing frames:
fe3e20b Add write_frames unit test
578dcd0 Add decorator unit test
aaa3733 Use fwrite return value in file_body
df66165 Require Visual Studio 2015 Update 3 or later
b8e5a21 Set version to 1.0.0-b32
ffb1758 Update CMake scripts for finding packages:
b893749 Remove http Writer suspend and resume feature (API Change):
27864fb Add io_service completion invariants tests
eba05a7 Set version to 1.0.0-b31
484bcef Fix badge markdown in README.md
5663bea Add missing dynabuf_readstream member
0d7a551 Tidy up build settings
0fd4030 Move the handler, don't copy it

git-subtree-dir: src/beast
git-subtree-split: 6d5547a32c50ec95832c4779311502555ab0ee1f
2017-04-20 13:40:52 -07:00
Nik Bougalis
84816d1c21 Set version to 0.70.0-b4 2017-04-19 12:25:04 -07:00
MarkusTeufelberger
8430f9deff Fix video link in README 2017-04-19 12:24:56 -07:00
Edward Hennis
fcceb0aac1 Update developer documentation 2017-04-19 12:24:56 -07:00
seelabs
2680b78b5b Rename featureToStrandV2 to fix1373 2017-04-19 12:24:56 -07:00
seelabs
068889e5b1 Cleanup fix1449 2017-04-19 12:24:56 -07:00
seelabs
3bd9772c04 Rename timebase switches from 'amendment' to 'fix' 2017-04-19 12:24:56 -07:00
Mike Ellery
af66c62814 Add Unit Test for peers RPC Request (RIPD-1419) 2017-04-19 12:24:56 -07:00
Mike Ellery
5bc8f2e3e8 Add test for noripple_check (RIPD-1400):
Add tests. Fix an error type returned in the handler.
2017-04-19 12:24:56 -07:00
Mike Ellery
22c97ba801 Use beast::temp_dir in tests (RIPD-1414):
Use non-throwing fs function in temp_dir destructor. Eliminate only use
of BOOST_SCOPE_EXIT.
2017-04-19 12:24:56 -07:00
Mike Ellery
026a249173 Implement transaction invariant checks (RIPD-1425):
Add new functionality to enforce one or more sanity checks (invariants)
on transactions. Add tests for each new invariant check. Allow
for easily adding additional invariant checks in the future.

Also Resolves
-------------

  - RIPD-1426
  - RIPD-1427
  - RIPD-1428
  - RIPD-1429
  - RIPD-1430
  - RIPD-1431
  - RIPD-1432

Release Notes
-------------

Creates a new ammendment named "EnforceInvariants" which must be
enabled in order for these new checks to run on each transaction.
2017-04-19 12:24:49 -07:00
JoelKatz
e52614ac81 HTTPClient should support large replies (RIPD-1366):
A full ledger on the production Ripple network could
exceed the default maximum reply size for the
HTTPClient code. Remove the reply size maximum for
responses that include a Content-Length header.
2017-04-19 12:24:45 -07:00
JoelKatz
10a7f5b933 ledger_request should confirm ledger is present (RIPD-1365):
The ledger_request RPC call, under some conditions, did not
actually check that the entire ledger was present in the
database, making it unsuitable for use in cases where the
database was believed to be incorrect or incomplete.
With this change, the full ledger will be checked for
integrity unless it has already recently been checked
(according to the InboundLedgers cache).
2017-04-19 12:24:37 -07:00
Nik Bougalis
c6b6d82a75 Set version to 0.70.0-b3 2017-03-31 14:53:57 -07:00
Mike Ellery
9a0249e793 Add unit test for tx_history RPC (RIPD-1402) 2017-03-31 14:53:44 -07:00
Mike Ellery
e92760eec8 Add unit test for crypto_prng class 2017-03-31 14:53:44 -07:00
Mike Ellery
7b82051bdb Add test for feature RPC (RIPD-1391):
Create unit test for feature RPC method. Add client_error field to env
RPC requests to provide information about parsing errors.
2017-03-31 13:17:26 -07:00
Mike Ellery
aea54b7230 Add RPC filters for Escrow an PayChan (RIPD-1414) 2017-03-31 12:10:48 -07:00
Howard Hinnant
1a7a6f22e2 Add 'type' param to ledger_data and ledger rpc commands (RIPD-1446):
The 'type' field allows the rpc client to specify what type of ledger
entries to retrieve. The available types are:

    "account"
    "amendments"
    "directory"
    "fee"
    "hashes"
    "offer"
    "signer_list"
    "state"
    "ticket"
2017-03-31 12:10:11 -07:00
Edward Hennis
fab3ec0b56 CMake: build consistently with default (unspecified) target 2017-03-31 12:05:47 -07:00
Brad Chase
2449f9c18d Fix handleLCL consensus bug:
Consensus::checkLCL can change state_ but it was being called inside
timerEntry after a switch on the current state_.  In rare cases, this might
end up calling stateEstablish even when the state_ was open.
2017-03-31 11:54:51 -07:00
Nik Bougalis
fee30262ac Merge master (0.60.2) into develop (0.70.0-b2) 2017-03-31 11:53:49 -07:00
seelabs
7cd4d78897 Set version to 0.60.2 2017-03-30 14:43:14 -04:00
seelabs
4ff40d4954 Enforce rippling constraints between offers and direct steps 2017-03-30 14:42:01 -04:00
seelabs
0d4fe469c6 Set version to 0.60.1 2017-03-29 15:53:21 -04:00
Miguel Portilla
8b43d67a73 Cancel websocket timer on failure:
This fixes a problem where the timeout timer
would not be canceled with some errors.
fix #2026
2017-03-29 15:53:16 -04:00
Vinnie Falco
128f7cefb1 Send a websocket ping before timing out in server:
This fixes a problem where idle websocket client
connections could be disconnected due to inactivity.
2017-03-29 15:53:16 -04:00
seelabs
09f9720ebb Correctly calculate Escrow and PayChan identifiers:
This change fixes a technical flaw that resulted from using
32-bit space identifiers instead of the protocol-defined
16-bit values.

Details: https://ripple.com/build/ledger-format/#tree-format
2017-03-29 15:52:42 -04:00
Brad Chase
dbe74dffcb Set version to 0.70.0-b2 2017-03-21 19:14:26 -04:00
Brad Chase
b958fa413e Fix may be used uninitialized warnings 2017-03-21 19:14:21 -04:00
Scott Schurr
c453df927f NetworkOPs isn't stopped() until Jobs done (RIPD-1356):
A new JobCounter class is introduced.  The JobCounter keeps
a reference count of Jobs in flight to the JobQueue.  When
NetworkOPs needs to stop, in addition to other work, it calls
JobCounter::join(), which waits until all Jobs in flight
have been destroyed before returning.  This ensures that all
NetworkOPs Jobs are completed before NetworkOPs declares
itself stopped().

Also, once a JobCounter is join()ed, it refuses to produce
more counted Jobs for the JobQueue.  So, once all old Jobs
in flight are done, then NetworkOPs will add no additional
Jobs to the JobQueue.

Other classes besides NetworkOPs should also be able to use
JobCounter.  NetworkOPs is a first test case.

Also unneeded #includes were removed from files touched for
other reasons.
2017-03-21 18:55:05 -04:00
seelabs
1bb92d40aa Fix tx re-ordering bug in test:
`env.fund` requires two transactions: `pay` and `set account`. If there is a
`trust` transaction in the same set of txs, the txs may be reordered so
`pay` -> `trust` -> `set account` so the wrong `no ripple` flag would be used
on the trust line.

Adding a `close` between `env.fund` and `env.trust` resolves this problem.
2017-03-21 18:55:05 -04:00
Vinnie Falco
15f969a469 Send a websocket ping before timing out in server:
This fixes a problem where idle websocket client
connections could be disconnected due to inactivity.
2017-03-21 18:55:05 -04:00
Brad Chase
bc5a74057d Refactor consensus for simulation (RIPD-1011):
This is a substantial refactor of the consensus code and also introduces
a basic consensus simulation and testing framework.  The new generic/templated
version is in src/ripple/consensus and documents the current type requirements.
The version adapted for the RCL is in src/ripple/app/consensus.  The testing
framework is in src/test/csf.

Minor behavioral changes/fixes include:
* Adjust close time offset even when not validating.
* Remove spurious proposing_ = false call at end of handleLCL.
* Remove unused functionality provided by checkLastValidation.
* Separate open and converge time
* Don't send a bow out if we're not proposing
* Prevent consensus stopping if NetworkOPs switches to disconnect mode while
  consensus accepts a ledger
* Prevent a corner case in which Consensus::gotTxSet or Consensus::peerProposal
  has the potential to update internal state while an dispatched accept job is
  running.
* Distinguish external and internal calls to startNewRound.  Only external
  calls can reset the proposing_ state of consensus
2017-03-21 18:54:57 -04:00
Scott Schurr
fc0d64f5ee Set version to 0.70.0-b1 2017-03-20 19:10:26 -07:00
wilsonianb
885aaab8c8 Remove ledger and manifest Python tools 2017-03-20 18:58:50 -07:00
Scott Schurr
9d4500cf69 Prevent low-likelihood crash on shutdown (RIPD-1392):
The DatabaseImp has threads that asynchronously call JobQueue to
perform database reads.  Formerly these threads had the same
lifespan as Database, which was until the end-of-life of
ApplicationImp.  During shutdown these threads could call JobQueue
after JobQueue had already stopped.  Or, even worse, occasionally
call JobQueue after JobQueue's destructor had run.

To avoid these shutdown conditions, Database is made a Stoppable,
with JobQueue as its parent.  When Database stops, it shuts down
its asynchronous read threads.  This prevents Database from
accessing JobQueue after JobQueue has stopped, but allows
Database to perform stores for the remainder of shutdown.

During development it was noted that the Database::close()
method was never called.  So that method is removed from Database
and all derived classes.

Stoppable is also adjusted so it can be constructed using either
a char const* or a std::string.

For those files touched for other reasons, unneeded #includes
are removed.
2017-03-20 18:08:49 -07:00
Scott Schurr
9ff9fa0aea Prevent low-likelihood hang on shutdown (RIPD-1392):
Calling OverlayImpl::list_[].second->stop() may cause list_ to be
modified (OverlayImpl::remove() may be called on this same thread).
So iterating directly over OverlayImpl::list_ to call
OverlayImpl::list_[].second->stop() could give undefined behavior.
On MacOS that undefined behavior exhibited as a hang.

Therefore we copy all of the weak/shared ptrs out of
OverlayImpl::list_ before we start calling stop() on them.  That
guarantees OverlayImpl::remove() won't be called until
OverlayImpl::stop() completes.
2017-03-20 18:08:24 -07:00
Scott Schurr
1d482eeecb Prevent DatabaseRotateImp crash on shutdown (RIPD-1392):
The DatabaseImp holds threads that access DatabaseRotateImp.  But
the DatabaseRotateImp's destructor runs before the DatabaseImp
destructor.  The DatabaseRotateImp now assures that the
DatabaseImp threads are stopped before the DatabaseRotateImp
destructor completes.
2017-03-20 18:08:02 -07:00
Scott Schurr
b4e765362b Remove timing window from RootStoppable (RIPD-1392):
RootStoppable was using two separate flags to identify that it
was stopping.  LoadManager was being notified when one flag was
set, but checking the other flag (not yet set) to see if we were
stopping.  There is no strong motivation for two flags.  The
timing window is closed by removing one flag and moving around
a chunk of code.
2017-03-20 17:49:16 -07:00
Brad Chase
c981eb81d9 Improve log warnings:
Log non-account transaction in warning (RIPD-1440)
Log warning on PeerImp::fail (RIPD-1444)
2017-03-20 17:08:57 -07:00
Mike Ellery
95aebfc38c Add timer start param to Application (RIPD 1405):
Modify doStart Application method to specify whether or not to start the
DeadlineTimers. Specify inactive timers for jtx::Env Applications and
active timers for standard Applications.
2017-03-20 16:22:26 -07:00
Edward Hennis
7265729446 TxQ full queue RPC info (RIPD-1404):
* RPC `ledger` command returns all queue entries in "queue_data"
  when requesting open ledger, and including boolean "queue: true".
  * Includes queue state. e.g.: fee_level, retries, last_result, tx.
  * Respects "expand" and "binary" parameters for the txs.
* Remove some unused code.
2017-03-20 16:18:48 -07:00
seelabs
846723d771 New rules for payment paths:
* Sanity check on newly created strands
* Better loop detection
* Better tests (test every combination of path element pairs)
* Disallow any root issuer (even for xrp)
* Disallow compount element typs in path
* Issue was not reset when currency was XRP
* Add amendment
2017-03-20 14:56:40 -07:00
Mike Ellery
80d9b0464a Add helper to modify Env configs (RIPD-1247)
Add envconfig test helper for manipulating Env config via
callables. Create new common modifiers for non-admin config,
validator config and one for using different server port values.
2017-03-20 14:38:15 -07:00
David Schwartz
09a1d1a593 Improve getMissingNodes:
* Clean up and refactor
* Resume parents of nodes read asynchronously
* Resume at tip of new stack if exhausted prior stack
* No need to restart at root
2017-03-20 14:25:38 -07:00
JoelKatz
aebcc2115d Don't send a bow out if we're not proposing 2017-03-20 14:19:49 -07:00
David Schwartz
6fac038320 Make ledger fetch tuning saner 2017-03-20 14:12:06 -07:00
Nik Bougalis
0df1b09a73 Set version to 0.60.0 2017-03-16 14:04:39 -07:00
Nik Bougalis
f432095532 Merge master (0.50.3) into release (0.60.0-rc4) 2017-03-16 13:55:29 -07:00
seelabs
e27a38939e Set version to 0.60.0-rc4 2017-03-13 20:21:26 -04:00
seelabs
ffa79ac6a5 Enforce rippling constraints during payments 2017-03-13 20:20:09 -04:00
Nik Bougalis
2e632b1660 Set version to 0.50.3 2017-03-13 17:05:17 -07:00
seelabs
0b187a6a4e Enforce rippling constraints during payments 2017-03-13 17:05:09 -07:00
seelabs
6cea5d0838 Set version to 0.60.0-rc3 2017-03-10 16:33:26 -05:00
wilsonianb
ffc7cf8f6c Use lower quorum for smaller validator sets 2017-03-10 16:33:24 -05:00
seelabs
69bc58c5f6 Set version to 0.60.0-rc2 2017-03-08 14:47:03 -05:00
seelabs
f423181b94 Rename amendment featureRIPD1368 -> fix1368 2017-03-07 20:47:45 -05:00
seelabs
112a863e73 Set version to 0.60.0-rc1 2017-03-06 15:00:16 -05:00
Nik Bougalis
cfde591ac9 Add Escrow support:
Escrow replaces the existing SusPay implementation with improved
code that also adds hashlock support to escrow payments, making
RCL ILP enabled.

The new functionality is under the `Escrow` amendment, which
supersedes and replaces the `SusPay` amendment.

This commit also deprecates the `CryptoConditions` amendment
which is replaced by the `CryptoConditionSuite` amendment which,
once enabled, will allow use of cryptoconditions others than
hashlocks.
2017-03-06 14:59:32 -05:00
JoelKatz
0c97dda276 Make "wss" work the same as "wss2" 2017-03-06 14:57:41 -05:00
seelabs
35f4698aed Check for malformed public key on payment channel 2017-03-06 14:41:44 -05:00
seelabs
b7e2a3bd5f Set version to 0.60.0-b7 2017-03-01 13:20:26 -05:00
seelabs
bb61b398a6 Use gnu gold or clang lld linkers if available 2017-03-01 13:18:30 -05:00
Brad Chase
1e438f51c5 Handle protoc targets in scons ninja build 2017-03-01 13:18:30 -05:00
Brad Chase
60416b18a5 Add quiet unit test reporter 2017-03-01 13:18:30 -05:00
Mike Ellery
4b0a0b0b85 Add test for transaction_entry request (RIPD-1401):
Test transaction_entry request. Remove unreachable redundant ledger
lookup check. Fix check for request against the current ledger
(disallowed).
2017-03-01 13:18:29 -05:00
Brad Chase
f1377d5d30 Publish server stream when fee changes (RIPD-1406):
Resolves #1991

Publish a server status update after every ledger close or open
ledger update if there is a change in fees.
2017-03-01 13:18:29 -05:00
seelabs
30b6e4e2e5 Do not close socket on a foreign thread:
* Closing a socket in WSClient's cleanup method was not thread safe. Force the
close to happen on the WSClient's strand.
2017-03-01 13:18:29 -05:00
Brad Chase
5cf38bf88a Reduce LEDGER_MIN_CONSENSUS:
Make LEDGER_MIN_CONSENSUS slightly smaller and not a multiple of
LEDGER_GRANULARITY to avoid fluctuations in the heartbeat timer needlessly
delaying consensus.
2017-03-01 13:18:29 -05:00
Mike Ellery
9e3dadce0d Add unit test for get_counts RPC method (RIPD-1399) 2017-03-01 13:18:29 -05:00
Edward Hennis
73b4c818c5 Add more 'sign' tests:
fix #229
2017-03-01 13:18:29 -05:00
Edward Hennis
2c2b0eb2f1 Fix CMake ordering to find correct compiler:
* `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` must be defined
  before `project`. However, it will clear `CMAKE_BUILD_TYPE`.
  Use `CACHE` variables and reorder some code to work around
  these constraints.
* Also correct a couple of copy paste errors.
2017-03-01 13:18:29 -05:00
Howard Hinnant
17726c2cac Fix rpc type-o in two places 2017-03-01 13:18:29 -05:00
MarkusTeufelberger
af79c9007e Specify syntax version for ripple.proto file:
This change eliminates a warning about unspecified syntax version when using
a newer proto3 compiler.
2017-03-01 13:18:29 -05:00
Howard Hinnant
3de623bf66 Enable -Wunused-variable on macOS 2017-03-01 13:18:29 -05:00
seelabs
7ec58cc554 Update build scripts to support latest boost and ubuntu distros 2017-03-01 13:18:29 -05:00
Mike Ellery
3d6a1781e7 Add tests for lookupLedger (RIPD-1268):
Cover additional input cases for lookupLedger.
2017-03-01 13:18:29 -05:00
Scott Schurr
ce9238b389 Remove beast::Thread (RIPD-1189):
All uses of beast::Thread were previously removed from the code
base, so beast::Thread is removed.  One piece of beast::Thread
needed to be preserved: the ability to set the current thread's
name.  So there's now a beast::CurrentThreadName that allows the
current thread's name to be set and returned.

Thread naming is also cleaned up a bit.  ThreadName.h and .cpp
are removed since beast::CurrentThreadName does a better job.
ThreadEntry is also removed, but its terminateHandler() is
preserved in TerminateHandler.cpp.  The revised terminateHandler()
uses beast::CurrentThreadName to recover the name of the running
thread.

Finally, the NO_LOG_UNHANDLED_EXCEPTIONS #define is removed since
it was discovered that the MacOS debugger preserves the stack
of the original throw even if the terminateHandler() rethrows.
2017-03-01 11:43:59 -05:00
seelabs
2c6b0f3193 Fix limiting step re-execute bug (RIPD-1368):
The deferred credits table can compute a balance that's different from the
ledger balance.

Syntax:
A number written with no decimal means that number exactly. I.e. "12". A number
written with a decimal means that number has a non-zero digit at the lowest
order digit. I.e. "12.XX" means a number like "12.00000000000005"

Consider the following payment:
alice (USD) -> USD/XRP -> (XRP) Bob
Alice initially has 12.XX USD in her account.
The strand is used to debit alice the following amounts:
1) Debit alice 5
2) Debit alice 0.XX
3) Debit alice 3.XX

The next time the strand is explored, alice has a USD/XRP offer on the books,
and her account is credited:

1) Credit alice 20

When the beginning of the strand is reached, consider what happens when alice is
a limiting step. Calculate how much we can get out the step. According to the
deferred credit table this is:
12.XX - (5 + 0.XX + 3.XX)

This is also limited by alice's balance, which is large thanks to the credit she
received in the book step.

Now that the step has calculated how much we can get out, throw out the
sandbox (the one with the credit), and re-execute. However, the following error
occurs. We asked for 12.XX - (5 + 0.XX + 3.XX). However, the ledger has
calculated that alice has:
((12.XX - 5) - 0.XX) - 3.XX

That's a problem, because that number is smaller. Notice that there are two
precision losing operations in the deferred credits table:
1) The 5 + 0.XX step
2) The 12.XX - (total of debits). (Notice total of debits is < 10)

However, there is only one precision losing operation in the ledger calculation:
1) (Subtotal of 12.XX-5) - 0.XX

That means the calculation for the ledger results in a number that's smaller
than the deferred credits. Flow detects this as a re-execution error.
2017-03-01 11:42:31 -05:00
wilsonianb
b4a16b165b Add validator key revocations:
Allow manifest revoking validator keys to be stored in a separate
[validator_key_revocation] config field, so the validator can run
again with new keys and token.
2017-03-01 11:41:07 -05:00
wilsonianb
a8cf5e0a5c Add validator token to config (RIPD-1386) 2017-03-01 11:41:07 -05:00
wilsonianb
2fcde0e0b6 Add SecretKey comparison operator (RIPD-1382) 2017-03-01 11:41:07 -05:00
wilsonianb
b45f45dcef Fetch validator lists from remote sites:
Validator lists from configured remote sites are fetched at a regular
interval. Fetched lists are expected to be in JSON format and contain the
following fields:

* "manifest": Base64-encoded serialization of a manifest containing the
  validator publisher's master and signing public keys.

* "blob": Base64-encoded JSON string containing a "sequence",
  "expiration" and "validators" field. "expiration" contains the Ripple
   timestamp (seconds since January 1st, 2000 (00:00 UTC)) for when the
  list expires. "validators" contains an array of objects with a
  "validation_public_key" field.

* "signature": Hex-encoded signature of the blob using the publisher's
  signing key.

* "version": 1

* "refreshInterval" (optional)
2017-03-01 11:41:07 -05:00
wilsonianb
e823e60ca0 Dynamize trusted validator list and quorum (RIPD-1220):
Instead of specifying a static list of trusted validators in the config
or validators file, the configuration can now include trusted validator
list publisher keys.

The trusted validator list and quorum are now reset each consensus
round using the latest validator lists and the list of recent
validations seen. The minimum validation quorum is now only
configurable via the command line.
2017-03-01 11:41:07 -05:00
wilsonianb
74977ab3db Consolidate parseUrl arguments into a struct 2017-03-01 11:41:07 -05:00
wilsonianb
80dfb7d72d Remove validator manager 2017-03-01 11:41:07 -05:00
wilsonianb
c30fe3066a Remove deprecated unl_add and unl_delete commands 2017-03-01 11:41:07 -05:00
Vinnie Falco
0b605b3609 Set version to 0.60.0-b6 2017-03-01 10:08:48 -05:00
Vinnie Falco
9bb337fb1f Set Beast version to 1.0.0-b30:
Squashed 'src/beast/' changes from 9f10b11..1b9a714

1b9a714 Set version to 1.0.0-b30
faed9e5 Allow concurrent websocket async ping and writes:
31cda06 Fix race when write suspends
48dd38e Fix race in close frames during reads
e2d1bb0 Fix race in pings during reads
36143be Set version to 1.0.0-b29
f0399b6 Fix doc link typo
787b7c2 Check ostream modifier correctly
4fa0bf6 Fix Writer return value documentation
6406da0 Document type-pun in buffer_cat
66cdb37 Fix illegal HTTP characters accepted as hex zero
e64ca2f Fix Body requirements doc
6dfd9f9 Fix compilation error in non-template class
fa7fea8 Fix race in writes during reads:

git-subtree-dir: src/beast
git-subtree-split: 1b9a71483347b7027b2fb7fe27ecea148d2e79ba
2017-03-01 10:05:46 -05:00
Vinnie Falco
460dd8f186 Set version to 0.60.0-b5 2017-02-24 12:45:11 -05:00
Vinnie Falco
6b0817b7ba Update .vcxproj for Beast 1.0.0-b28 2017-02-24 12:44:49 -05:00
Vinnie Falco
7698477e86 Merge commit '8b60ef9db43089f08444ede0d9171d4903b6a174' into develop 2017-02-24 12:42:36 -05:00
Vinnie Falco
8b60ef9db4 Squashed 'src/beast/' changes from 06f74f0..9f10b11
9f10b11 Set version to 1.0.0-b28
195f974 Fix HTTP split parse edge case:
264fd41 Restyle async result constructions
572a0eb Split out and rename test stream classes
95b6646 Tidy up some WebSocket javadocs
f6938d3 Set version to 1.0.0-b27
a6120cd Update copyright dates
c7bfe7d Add documentation building instructions
f6c91ce Tidy up tests and docs:
f03985f Move basic_streambuf to streambuf.hpp (API Change):
b8639a7 Invoke callback on pings and pongs (API Change):

git-subtree-dir: src/beast
git-subtree-split: 9f10b11eff58aeb793b673c8a8cb6e2bee3db621
2017-02-24 12:42:36 -05:00
Vinnie Falco
209fe8f7a9 Set version to 0.60.0-b4 2017-02-07 19:32:34 -05:00
Edward Hennis
b514f1aae9 Config test uses unique directories for each test:
* This fixes an uncommon, but annoying, spurious failure running this
  test, particularly in release builds. This appears to be an issue with
  Windows of the FS where quickly creating and deleting the same
  directory repeatedly will eventually fail.
* RIPD-1390
2017-02-07 19:31:46 -05:00
Vinnie Falco
f6a0345831 Add permessage-deflate WebSocket support (RIPD-1409):
This also fixes a defect where the Server HTTP header was
incorrectly set in WebSocket Upgrade handshake responses.
2017-02-07 18:59:56 -05:00
Vinnie Falco
ce7e83f763 Add Section::value_or 2017-02-07 18:59:56 -05:00
Scott Schurr
71b42dcec5 Exercise debugLog writes in jtx unit tests (RIPD-1393) 2017-02-07 18:59:56 -05:00
seelabs
f5af8b03de Add the config preset features to the view:
It is often difficult to get access to the preset features in the config. Adding
the preset features solves this problem.
2017-02-07 18:59:56 -05:00
Mike Ellery
e01f6e7455 Use log/journal instead of std::cerr (RIPD-1377):
Change some uses of std::cerr to log or cout.
2017-02-07 18:59:56 -05:00
Vinnie Falco
b3eada1dc2 Set version to 0.60.0-b3 2017-02-02 09:10:40 -05:00
Vinnie Falco
a3e3b9321e Merge commit 'c652cf066d0b43c7c5bc10b4d56ff99a867e7873' into develop 2017-02-02 09:10:17 -05:00
Vinnie Falco
c652cf066d Squashed 'src/beast/' changes from c00cd37..06f74f0
06f74f0 Set version to 1.0.0-b26
68f535f Tidy up warnings and tests:
4ee5fa9 Set version to 1.0.0-b25
229d390 Update README.md for CppCast 2017
c3e3a55 Fix deflate setup bug
439a224 WebSocket server examples and test tidying:
29565c8 Remove unnecessary include
caa3b39 Fix 32-bit arm7 warnings
0474cc5 Better handler_ptr (API Change):
ca38657 Fixes for websocket echo server:
797631c Set version to 1.0.0-b24
a450968 Add permessage-deflate WebSocket extension:
67e965e Make decorator copyable
42899fc Add optional yield_to arguments
61aef03 Simplify Travis package install specification
9d0d7c9 bjam use clang on MACOSX

git-subtree-dir: src/beast
git-subtree-split: 06f74f05f7de51d7f791a17c2b06840183332cbe
2017-02-02 09:05:27 -05:00
Nik Bougalis
c218417d1a Set version to 0.60.0-b2 2017-02-01 11:42:34 -08:00
JoelKatz
69db2ace58 Upgrade SQLite3 to version from 3.14.1 to 3.16.2 2017-02-01 11:42:33 -08:00
Mike Ellery
79149b4c0c Eliminate protocol header dependency (RIPD-1234):
Eliminate checks using sha512half, add coverage for xor and SetHex.
2017-02-01 11:42:33 -08:00
Edward Hennis
232ec62c75 CMake -Dassert=true properly enables asserts in Release:
* CMake defaults CMAKE_CXX_FLAGS_RELEASE, etc. to include defining
  NDEBUG, regardless of other options set elsewhere, for most or all
  generators. This change explicitly removes that flag from the relevant
  variables.
* Also move the project command earlier, since it wipes out some local
  changes.
2017-02-01 11:42:32 -08:00
MarkusTeufelberger
7ca03d3bca Remove superfluous assert
The size of lines_ gets checked at runtime in the legacy() function below.
2017-02-01 11:42:32 -08:00
Nik Bougalis
15a30c745c Remove unused code & refactor and simplify event load timing 2017-02-01 11:42:32 -08:00
Nik Bougalis
8345475bc3 Simplify fee handling during transaction submission:
Avoid custom overflow code; simply use 128-bit math to
maintain precision and return a saturated 64-bit value
as the final result.

Disallow use of negative values in the `fee_mult_max`
and `fee_div_max` fields. This change could potentially
cause submissions with negative values that would have
previously succeeded to now fail.
2017-02-01 11:42:31 -08:00
Nik Bougalis
c7de7950c4 Correctly compare default-constructed Slice instances 2017-02-01 11:42:30 -08:00
Vinnie Falco
b6126f219f Set version to 0.60.0-b1 2017-02-01 12:37:01 -05:00
Vinnie Falco
e05bf0844d Changes for secp256k1 2017-02-01 12:36:51 -05:00
Vinnie Falco
fdff943262 Merge commit 'a1a8ba7f53f42397b1f1f4a8882634085ffe4f71' into develop 2017-02-01 12:36:42 -05:00
Vinnie Falco
a1a8ba7f53 Squashed 'src/secp256k1/' changes from 0cbc860..9d560f9
9d560f9 Merge #428: Exhaustive recovery
2cee5fd exhaustive tests: add recovery module
8225239 Merge #433: Make the libcrypto detection fail the newer API.
12de863 Make the libcrypto detection fail the newer API.
678b0e5 exhaustive tests: remove erroneous comment from ecdsa_sig_sign
2928420 Merge #427: Remove Schnorr from travis as well
03ff8c2 group_impl.h: remove unused `secp256k1_ge_set_infinity` function
a724d72 configure: add --enable-coverage to set options for coverage analysis
b595163 recovery: add tests to cover API misusage
8eecc4a Remove Schnorr from travis as well
6f8ae2f ecdh: test NULL-checking of arguments
25e3cfb ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign
a8abae7 Merge #310: Add exhaustive test for group functions on a low-order subgroup
b4ceedf Add exhaustive test for verification
83836a9 Add exhaustive tests for group arithmetic, signing, and ecmult on a small group
20b8877 Add exhaustive test for group functions on a low-order subgroup
80773a6 Merge #425: Remove Schnorr experiment
e06e878 Remove Schnorr experiment
04c8ef3 Merge #407: Modify parameter order of internal functions to match API parameter order
6e06696 Merge #411: Remove guarantees about memcmp-ability
40c8d7e Merge #421: Update scalar_4x64_impl.h
a922365 Merge #422: Restructure nonce clearing
3769783 Restructure nonce clearing
0f9e69d Restructure nonce clearing
9d67afa Update scalar_4x64_impl.h
7d15cd7 Merge #413: fix auto-enabled static precompuatation
00c5d2e fix auto-enabled static precompuatation
91219a1 Remove guarantees about memcmp-ability
7a49cac Merge #410: Add string.h include to ecmult_impl
0bbd5d4 Add string.h include to ecmult_impl
353c1bf Fix secp256k1_ge_set_table_gej_var parameter order
541b783 Fix secp256k1_ge_set_all_gej_var parameter order
7d893f4 Fix secp256k1_fe_inv_all_var parameter order
c5b32e1 Merge #405: Make secp256k1_fe_sqrt constant time
926836a Make secp256k1_fe_sqrt constant time
e2a8e92 Merge #404: Replace 3M + 4S doubling formula with 2M + 5S one
8ec49d8 Add note about 2M + 5S doubling formula
5a91bd7 Merge #400: A couple minor cleanups
ac01378 build: add -DSECP256K1_BUILD to benchmark_internal build flags
a6c6f99 Remove a bunch of unused stdlib #includes
65285a6 Merge #403: configure: add flag to disable OpenSSL tests
a9b2a5d configure: add flag to disable OpenSSL tests
b340123 Merge #402: Add support for testing quadratic residues
e6e9805 Add function for testing quadratic residue field/group elements.
efd953a Add Jacobi symbol test via GMP
fa36a0d Merge #401: ecmult_const: unify endomorphism and non-endomorphism skew cases
c6191fd ecmult_const: unify endomorphism and non-endomorphism skew cases
0b3e618 Merge #378: .gitignore build-aux cleanup
6042217 Merge #384: JNI: align shared files copyright/comments to bitcoinj's
24ad20f Merge #399: build: verify that the native compiler works for static precomp
b3be852 Merge #398: Test whether ECDH and Schnorr are enabled for JNI
aa0b1fd build: verify that the native compiler works for static precomp
eee808d Test whether ECDH and Schnorr are enabled for JNI
7b0fb18 Merge #366: ARM assembly implementation of field_10x26 inner (rebase of #173)
001f176 ARM assembly implementation of field_10x26 inner
0172be9 Merge #397: Small fixes for sha256
3f8b78e Fix undefs in hash_impl.h
2ab4695 Fix state size in sha256 struct
6875b01 Merge #386: Add some missing `VERIFY_CHECK(ctx != NULL)`
2c52b5d Merge #389: Cast pointers through uintptr_t under JNI
43097a4 Merge #390: Update bitcoin-core GitHub links
31c9c12 Merge #391: JNI: Only call ecdsa_verify if its inputs parsed correctly
1cb2302 Merge #392: Add testcase which hits additional branch in secp256k1_scalar_sqr
d2ee340 Merge #388: bench_ecdh: fix call to secp256k1_context_create
093a497 Add testcase which hits additional branch in secp256k1_scalar_sqr
a40c701 JNI: Only call ecdsa_verify if its inputs parsed correctly
faa2a11 Update bitcoin-core GitHub links
47b9e78 Cast pointers through uintptr_t under JNI
f36f9c6 bench_ecdh: fix call to secp256k1_context_create
bcc4881 Add some missing `VERIFY_CHECK(ctx != NULL)` for functions that use `ARG_CHECK`
6ceea2c align shared files copyright/comments to bitcoinj's
70141a8 Update .gitignore
7b549b1 Merge #373: build: fix x86_64 asm detection for some compilers
bc7c93c Merge #374: Add note about y=0 being possible on one of the sextic twists
e457018 Merge #364: JNI rebased
86e2d07 JNI library: cleanup, removed unimplemented code
3093576 JNI library
bd2895f Merge pull request #371
e72e93a Add note about y=0 being possible on one of the sextic twists
3f8fdfb build: fix x86_64 asm detection for some compilers
e5a9047 [Trivial] Remove double semicolons
c18b869 Merge pull request #360
3026daa Merge pull request #302
03d4611 Add sage verification script for the group laws
a965937 Merge pull request #361
83221ec Add experimental features to configure
5d4c5a3 Prevent damage_array in the signature test from going out of bounds.
419bf7f Merge pull request #356
6c527ec Merge pull request #357
445f7f1 Fix for Windows compile issue
03d84a4 Benchmark against OpenSSL verification
2bfb82b Merge pull request #351
06aeea5 Turn secp256k1_ec_pubkey_serialize outlen to in/out
970164d Merge pull request #348
64666251 Improvements for coordinate decompression
e2100ad Merge pull request #347
8e48787 Change secp256k1_ec_pubkey_combine's count argument to size_t.
c69dea0 Clear output in more cases for pubkey_combine, adds tests.
269d422 Comment copyediting.
b4d17da Merge pull request #344
4709265 Merge pull request #345
26abce7 Adds 32 static test vectors for scalar mul, sqr, inv.
5b71a3f Better error case handling for pubkey_create & pubkey_serialize, more tests.
3b7bc69 Merge pull request #343
eed87af Change contrib/laxder from headers-only to files compilable as standalone C
d7eb1ae Merge pull request #342
7914a6e Make lax_der_privatekey_parsing.h not depend on internal code
73f64ff Merge pull request #339
9234391 Overhaul flags handling
1a36898 Make flags more explicit, add runtime checks.
1a3e03a Merge pull request #340
96be204 Add additional tests for eckey and arg-checks.
bb5aa4d Make the tweak function zeroize-output-on-fail behavior consistent.
4a243da Move secp256k1_ec_privkey_import/export to contrib.
1b3efc1 Move secp256k1_ecdsa_sig_recover into the recovery module.
e3cd679 Eliminate all side-effects from VERIFY_CHECK() usage.
b30fc85 Avoid nonce_function_rfc6979 algo16 argument emulation.
70d4640 Make secp256k1_ec_pubkey_create skip processing invalid secret keys.
6c476a8 Minor comment improvements.
131afe5 Merge pull request #334
0c6ab2f Introduce explicit lower-S normalization
fea19e7 Add contrib/lax_der_parsing.h
3bb9c44 Rewrite ECDSA signature parsing code
fa57f1b Use secp256k1_rand_int and secp256k1_rand_bits more
49b3749 Add new tests for the extra testrand functions
f684d7d Faster secp256k1_rand_int implementation
251b1a6 Improve testrand: add extra random functions
31994c8 Merge pull request #338
f79aa88 Bugfix: swap arguments to noncefp
c98df26 Merge pull request #319
67f7da4 Extensive interface and operations tests for secp256k1_ec_pubkey_parse.
ee2cb40 Add ARG_CHECKs to secp256k1_ec_pubkey_parse/secp256k1_ec_pubkey_serialize
7450ef1 Merge pull request #328
68a3c76 Merge pull request #329
98135ee Merge pull request #332
37100d7 improve ECDH header-doc
b13d749 Fix couple of typos in API comments
7c823e3 travis: fixup module configs
cc3141a Merge pull request #325
ee58fae Merge pull request #326
213aa67 Do not force benchmarks to be statically linked.
338fc8b Add API exports to secp256k1_nonce_function_default and secp256k1_nonce_function_rfc6979.
52fd03f Merge pull request #320
9f6993f Remove some dead code.
357f8cd Merge pull request #314
118cd82 Use explicit symbol visibility.
4e64608 Include public module headers when compiling modules.
1f41437 Merge pull request #316
fe0d463 Merge pull request #317
cfe0ed9 Fix miscellaneous style nits that irritate overactive static analysis.
2b199de Use the explicit NULL macro for pointer comparisons.
9e90516 Merge pull request #294
dd891e0 Get rid of _t as it is POSIX reserved
201819b Merge pull request #313
912f203 Eliminate a few unbraced statements that crept into the code.
eeab823 Merge pull request #299
486b9bb Use a flags bitfield for compressed option to secp256k1_ec_pubkey_serialize and secp256k1_ec_privkey_export
05732c5 Callback data: Accept pointers to either const or non-const data
1973c73 Bugfix: Reinitialise buffer lengths that have been used as outputs
788038d Use size_t for lengths (at least in external API)
c9d7c2a secp256k1_context_set_{error,illegal}_callback: Restore default handler by passing NULL as function argument
9aac008 secp256k1_context_destroy: Allow NULL argument as a no-op
64b730b secp256k1_context_create: Use unsigned type for flags bitfield
cb04ab5 Merge pull request #309
a551669 Merge pull request #295
81e45ff Update group_impl.h
85e3a2c Merge pull request #112
b2eb63b Merge pull request #293
dc0ce9f [API BREAK] Change argument order to out/outin/in
6d947ca Merge pull request #298
c822693 Merge pull request #301
6d04350 Merge pull request #303
7ab311c Merge pull request #304
5fb3229 Fixes a bug where bench_sign would fail due to passing in too small a buffer.
263dcbc remove unused assignment
b183b41 bugfix: "ARG_CHECK(ctx != NULL)" makes no sense
6da1446 build: fix parallel build
5eb4356 Merge pull request #291
c996d53 Print success
9f443be Move pubkey recovery code to separate module
d49abbd Separate ECDSA recovery tests
439d34a Separate recoverable and normal signatures
a7b046e Merge pull request #289
f66907f Improve/reformat API documentation secp256k1.h
2f77487 Add context building benchmarks
cc623d5 Merge pull request #287
de7e398 small typo fix
9d96e36 Merge pull request #280
432e1ce Merge pull request #283
14727fd Use correct name in gitignore
356b0e9 Actually test static precomputation in Travis
ff3a5df Merge pull request #284
2587208 Merge pull request #212
a5a66c7 Add support for custom EC-Schnorr-SHA256 signatures
d84a378 Merge pull request #252
72ae443 Improve perf. of cmov-based table lookup
92e53fc Implement endomorphism optimization for secp256k1_ecmult_const
ed35d43 Make `secp256k1_scalar_add_bit` conditional; make `secp256k1_scalar_split_lambda_var` constant time
91c0ce9 Add benchmarks for ECDH and const-time multiplication
0739bbb Add ECDH module which works by hashing the output of ecmult_const
4401500 Add constant-time multiply `secp256k1_ecmult_const` for ECDH
e4ce393 build: fix hard-coded usage of "gen_context"
b8e39ac build: don't use BUILT_SOURCES for the static context header
baa75da tests: add a couple tests
ae4f0c6 Merge pull request #278
995c548 Introduce callback functions for dealing with errors.
c333074 Merge pull request #282
18c329c Remove the internal secp256k1_ecdsa_sig_t type
74a2acd Add a secp256k1_ecdsa_signature_t type
23cfa91 Introduce secp256k1_pubkey_t type
4c63780 Merge pull request #269
3e6f1e2 Change rfc6979 implementation to be a generic PRNG
ed5334a Update configure.ac to make it build on OpenBSD
1b68366 Merge pull request #274
a83bb48 Make ecmult static precomputation default
166b32f Merge pull request #276
c37812f Add gen_context src/ecmult_static_context.h to CLEANFILES to fix distclean.
125c15d Merge pull request #275
76f6769 Fix build with static ecmult altroot and make dist.
5133f78 Merge pull request #254
b0a60e6 Merge pull request #258
733c1e6 Add travis build to test the static context.
fbecc38 Add ability to use a statically generated ecmult context.
4fb174d Merge pull request #263
4ab8990 Merge pull request #270
bdf0e0c Merge pull request #271
31d0c1f Merge pull request #273
eb2c8ff Add missing casts to SECP256K1_FE_CONST_INNER
55399c2 Further performance improvements to _ecmult_wnaf
99fd963 Add secp256k1_ec_pubkey_compress(), with test similar to the related decompress() function.
145cc6e Improve performance of _ecmult_wnaf
36b305a Verify the result of GMP modular inverse using non-GMP code
e2a07c7 Fix compilation with C++
2b4cf41 Use pkg-config always when possible, with failover to manual checks for libcrypto

git-subtree-dir: src/secp256k1
git-subtree-split: 9d560f992db26612ce2630b194aef5f44d63a530
2017-02-01 12:36:05 -05:00
Nik Bougalis
d8a5f5b094 Set version to 0.50.2 2017-01-30 15:49:01 -08:00
Nik Bougalis
1ede09760e Set version to 0.50.1 2017-01-28 22:00:03 -08:00
Nik Bougalis
708fc6cd6f Improve SSL handshaking & cipher negotiation:
The default SSL cipher list introduced with 0.50.0 in
commit 2c87739 was overly restrictive and resulted in
clients unable to negotiate SSL connections.

Adjust the default cipher to the more sensible:

    HIGH:MEDIUM:!aNULL:!MD5:!DSS:!3DES:!RC4:!EXPORT

Correct a bug that would not allow an SSL handshake
to properly complete if the port was configured using
the `wss` keyword.
2017-01-28 22:00:02 -08:00
Nik Bougalis
77999579b5 Set version to 0.50.0 2017-01-26 21:57:49 -08:00
Nik Bougalis
d24bb65639 Set version to 0.50.0-rc2 2017-01-26 12:12:21 -08:00
Nik Bougalis
d810f29e99 Merge release (0.40.1) into develop (0.50.0-rc1) 2017-01-26 12:11:24 -08:00
Nik Bougalis
6e3e717876 Set version to 0.50.0-rc1 2017-01-17 17:20:52 -08:00
Nik Bougalis
2c87739d6c Harden default TLS configuration (RIPD-1332, RIPD-1333, RIPD-1334):
The existing configuration includes 512 and 1024 bit DH
parameters and supports ciphers such as RC4 and 3DES and
hash algorithms like SHA-1 which are no longer considered
secure.

Going forward, use only 2048-bit DH parameters and define
a new default set of modern ciphers to use:

    HIGH:!aNULL:!MD5:!DSS:!SHA1:!3DES:!RC4:!EXPORT:!DSS

Additionally, allow administrators who wish to have different
settings to configure custom global and per-port ciphers suites
in the configuration file using the `ssl_ciphers` directive.
2017-01-17 17:19:58 -08:00
Nik Bougalis
b00b81a861 Require at least OpenSSL 1.0.1g or 1.0.2j and later (RIPD-1331) 2017-01-17 17:19:58 -08:00
Vinnie Falco
a0a4eedc27 Set version to 0.50.0-b6 2017-01-17 15:28:44 -05:00
Vinnie Falco
c0e9e3df49 Update Beast subtree to 1.0.0-b23:
Merge commit '7028579170d83cb81a97478b620f3cb15a2fd693' into develop
2017-01-17 15:27:51 -05:00
Vinnie Falco
7028579170 Squashed 'src/beast/' changes from 1ab7a2f..c00cd37
c00cd37 Set version to 1.0.0-b23
f662e36 Travis CI improvements:
b05fa33 Fix message constructor and special members
b4722cc Add copy special members
420d1c7 Better logging in async echo server
149e3a2 Add file and line number to thrown exceptions
3e88b83 Tune websocket echo server for performance

git-subtree-dir: src/beast
git-subtree-split: c00cd37b8a441a92755658014fdde97d515ec7ed
2017-01-17 14:50:38 -05:00
Nik Bougalis
84ada74d53 Set version to 0.50.0-b5 2017-01-13 15:01:35 -08:00
Mike Ellery
be0fb67d8d Add ledger save/load test (RIPD-1378)
Provide unit test to invoke ledger load at startup.
2017-01-13 15:01:20 -08:00
Brad Chase
fb60cc9b5b Cleanup unit test support code (RIPD-1380):
* Remove `src/test/support/mao`
* Flatten `src/test/support/jtx` to `src/test/jtx`
2017-01-13 15:01:20 -08:00
Brad Chase
3c4d3b10c1 Update RPC handler role/usage (RIPD-557):
* Properly use the RPC method to determine required role for HTTP/S RPC calls.
* Charge for malformed RPC calls over HTTP/S
2017-01-13 15:01:20 -08:00
Edward Hennis
d9ef5ef98f Fix broken Intellisense (MSVC):
* MSVC Intellisense will ignore all file-level static_asserts.
2017-01-13 15:01:20 -08:00
Scott Schurr
be9c955506 Convert Workers to std::thread (RIPD-1189) 2017-01-13 15:01:20 -08:00
Edward Hennis
1989b1028f Add ledger_current_index to fee RPC result (RIPD-1300) 2017-01-13 15:01:20 -08:00
Mike Ellery
0d577d9349 Remove unused websocket files (RIPD-1293) 2017-01-13 15:01:20 -08:00
Mike Ellery
7536c53a48 Eliminate ledger data setup in test (RIPD-1372):
Change ledger-data json test fixture to simple jtx/Env setup.
2017-01-13 15:01:20 -08:00
Mike Ellery
e3ff30657c Eliminate npm tests (RIPD-1369)
Remove mention of npm tests in developer docs. Eliminate `npm test` from
automation and ci scripts.
2017-01-13 15:01:20 -08:00
Mike Ellery
698ea58b39 Improve setup for account_tx paging test (RIPD-1371):
Remove dependency on external fixture data by creating a ledger state
using jtx Env.
2017-01-13 10:38:21 -08:00
MarkusTeufelberger
a5500721db Don't consider function for ASAN
ge25519_scalarmult_base_choose_niels leads to errors (#1668) when compiled with address sanitizer.
2017-01-13 10:38:21 -08:00
Vinnie Falco
fd4ad29418 Set version to 0.50.0-b4 2017-01-11 16:53:13 -05:00
Vinnie Falco
905c627043 Check error on HTTP request in server 2017-01-11 16:52:45 -05:00
Vinnie Falco
8d8907e340 Update for Beast changes 2017-01-11 16:52:39 -05:00
Vinnie Falco
6724a63230 Update .vcxproj 2017-01-11 16:52:31 -05:00
Vinnie Falco
af4fe24939 Squashed 'src/beast/' changes from 2f9a844..1ab7a2f
1ab7a2f Set version to 1.0.0-b22
2eb4b0c Fix code sample in websocket.qbk
58802f4 Fix typos in design.qbk
19dc4bb Update documentation examples
10dbc5b Disable Boost.Coroutine deprecation warning
01c76c7 Fix websocket stream read documentation
d152c96 Update README.md example programs
995d86f Avoid copies in handler_alloc
851cb62 Add handler helpers
114175c Implement asio dealloc-before-invoke guarantee:
681db2e Add missing include
7db3c6e Fix broken Intellisense (MSVC)
09c183d Set version to 1.0.0-b21
1cb01fe Remove extraneous includes
62e65ed Set version to 1.0.0-b20
45eaa8c Increase utf8 checker code coverage
9ff1a27 Add zlib module:
a0a3359 Refactor HTTP identifier names (API Change):
79be7f8 Set version to 1.0.0-b19
eda1120 Tidy up internal name
4130ad4 Better buffer_cat:
f94f21d Fix consuming_buffers value_type (API Change):
2c524b4 prepared_buffers is private (API Change)
df2a108 Fix prepare_buffers value_type:
a4af9d6 Use boost::lexical_cast instead of std::to_string
62d670b Fix with_body example:
a63bd84 Increase code coverage
84a6775 Boost library min/max guidance:
02feea5 Add read, async_read for message_headers:
f224585 Add write, async_write, operator<< for message_headers:
ea48bcf Make chunk_encode public:
f6dd744 Refactor message and message_headers declarations:
9fd8aed Move sync_ostream to core/detail
c98b2d3 Optimize mask operations
d4dfc1a Optimize utf8 validation
7b4de4b Set version to 1.0.0-b18
feb5204 Add websocket::stream pong and async_pong
d4ffde5 Close connection during async_read on close frame:
644d518 Move clamp to core
427ba38 Fix write_frame masking and auto-fragment handling
54a51b1 Write buffer option does not change capacity
591dbc0 Meet DynamicBuffer requirements for static_streambuf
46d5e72 Reorganize source files and definitions
efa4b8f Override incremental link flags:
eef6e86 Higher optimization settings for MSVC builds
b6f3a36 Check invariants in parse_op:
47b0fa6 Remove unused field in test
8b8e57e unit_test improvements:
e907252 Clean up message docs
1e3543f Set version to 1.0.0-b17
de97a69 Trim unused code
796b484 Doc fixes
95c37e2 Fix unused parameter warnings and missing includes:
8b0d285 Refactor read_size_helper
97a9dcb Improve websocket example in README.md
236caef Engaged invokable is destructible:
d107ba1 Add headers_parser:
2f90627 Fix handling of body_what::pause in basic_parser_v1
9353d04 Add basic_parser_v1::reset
658e03c Add on_body_what parser callback (API Change):
50bd446 Fix parser traits detection (API Change):
df8d306 Tidy up documentation:
47105f8 Tidy up basic_headers for documentation
ada1f60 Refine message class hierarchy:
cf43f51 Rework HTTP concepts (API Change):
8a261ca HTTP Reader (API Change):
183055a Parser callbacks may not throw (API Change)
ebebe52 Add basic_streambuf::alloc_size
c9cd171 Fix basic_streambuf::capacity
0eb0e48 Tidying:
c5c436d Change implicit_value to default_value
01f939d Set version to 1.0.0-b16
206d0a9 Fix websocket failure tests
6b4fb28 Fix Writer exemplar in docs
4224a3a Relax ForwardIterator requirements in FieldSequence
14d7f8d Refactor base_parser_v1 callback traits:
d812344 Add pause option to on_headers interface:
c59bd53 Improve first line serialization
78ff20b Constrain parser_v1 constructor
2765a67 Refine Parser concept:
c329d33 Fix on_headers called twice from basic_parser_v1
55c4c93 Put back missing Design section in docs
90cec54 Make auto_fragment a boolean option
03642fb Rename to write_buffer_size
0ca8964 Frame processing routines are member functions
d99dfb3 Make value optional in param-list
325f579 Set version to 1.0.0-b15
c54762a Fix handling empty HTTP headers in parser_v1.hpp
c39cc06 Regression test for empty headers
60e637b Tidy up error types:
d54d597 Tidy up DynamicBuffer requirements
707fb5e Fix doc reference section
38af0f7 Fix message_v1 constructor
027c4e8 Add Secure WebSocket example
5baaa49 Add HTTPS example
076456b rfc7230 section 3.3.2 compliance
a09a044 Use bin/sh
1ff192d Update README.md for CppCon 2016 presentation
70b8555 Set version to 1.0.0-b14
b4a8342 Update and tidy documentation
8607af5 Update README.md
4abb43e Use BOOST_ASSERT
b5bffee Don't rely on undefined behavior
8ee7a21 Better WebSocket decorator:
38f0d95 Update build scripts for MSVC, MinGW
2a5b116 Fix error handling in server examples
4c7065a Add missing rebind to handler_alloc

git-subtree-dir: src/beast
git-subtree-split: 1ab7a2f04ca9a0b35f2032877cab78d94e96ebad
2017-01-11 16:50:38 -05:00
Vinnie Falco
c1c80dfc52 Merge commit 'af4fe2493925bc57c5c3343c383719fa72dea262' into b4.2 2017-01-11 16:50:38 -05:00
Vinnie Falco
87273e21d8 Set version to 0.50.0-b3 2017-01-10 12:44:52 -05:00
Nik Bougalis
610e51a162 Increase sqlite database limits 2017-01-10 12:43:55 -05:00
Nik Bougalis
e91aacc9a3 Set version to 0.40.1 2017-01-05 09:38:28 -08:00
Nik Bougalis
6e54461f4b Increase sqlite database limits 2017-01-05 09:32:17 -08:00
Brad Chase
ef23d72562 Set version to 0.50.0-b2 2016-12-29 13:53:19 -05:00
Edward Hennis
a1c0d15a1f Provide BOOST_ROOT to CMake docs target (RIPD-1364):
* Should make building docs with CMake incrementally easier and more
reliable.
* Wrap makeqbk in explicit bash shell (if available).
2016-12-29 13:50:57 -05:00
Brad Chase
b6a01ea41c Move support test code to src/test/support (RIPD-1313) 2016-12-23 20:39:02 -05:00
Nik Bougalis
8425e4558a Set version to 0.50.0-b1 2016-12-23 14:43:54 -08:00
Nik Bougalis
5a688f9236 Correct a check during RsaSha256 fulfillment loading:
The specification requires that we verify that the
signature and modulus of an RSA-SHA256 fulfillment
are both the same length (specifically that they
have "the same number of octets") referring to the
encoded length.

We were, instead, checking the number of bytes that
the signature and modulus had after decoding.
2016-12-23 14:43:53 -08:00
Miguel Portilla
effd8c9737 Fix scons 64bit OS detection 2016-12-23 14:36:11 -08:00
Miguel Portilla
a7c4d682d2 Ledger header RPC enhancements (RIPD-692):
This combines two enhancements to the ledger_data RPC
command and related commands.

The ledger_data RPC command will now return the ledger header
in the first query (the one with no marker specified).

Also, ledger_data and related commands will now provide the
ledger header in binary if binary output is specified.

Modified existing ledgerdata unit test to cover new functionality.
2016-12-23 14:36:11 -08:00
JoelKatz
e00a6b0e5a Enable amendments in genesis ledger (RIPD-1281)
When started with "--start", put all known, non-vetoed
amendments in the genesis ledger. This avoids the need
to wait 256 ledgers before amendments are enabled when
testing with a fresh ledger.
2016-12-23 14:36:11 -08:00
JoelKatz
dc3571184a Add a flag to the ledger for SHAMapV2
This will allow code that looks at the ledger header to know what version the
SHAMap uses. This is helpful for code that rebuilds ledger binary structures
from the leaves.
2016-12-23 14:36:11 -08:00
JoelKatz
22a375a5f4 Add support for tick sizes (RIPD-1363):
Add an amendment to allow gateways to set a "tick size"
for assets they issue. There are no changes unless the
amendment is enabled (since the tick size option cannot
be set).

With the amendment enabled:

AccountSet transactions may set a "TickSize" parameter.
Legal values are 0 and 3-15 inclusive. Zero removes the
setting. 3-15 allow that many decimal digits of precision
in the pricing of offers for assets issued by this account.

For asset pairs with XRP, the tick size imposed, if any,
is the tick size of the issuer of the non-XRP asset. For
asset pairs without XRP, the tick size imposed, if any,
is the smaller of the two issuer's configured tick sizes.

The tick size is imposed by rounding the offer quality
down to nearest tick and recomputing the non-critical
side of the offer. For a buy, the amount offered is
rounded down. For a sell, the amount charged is rounded up.

Gateways must enable a TickSize on their account for this
feature to benefit them.

The primary expected benefit is the elimination of bots
fighting over the tip of the order book. This means:

- Quicker price discovery as outpricing someone by a
  microscopic amount is made impossible. Currently
  bots can spend hours outbidding each other with no
  significant price movement.

- A reduction in offer creation and cancellation spam.

- More offers left on the books as priority means
  something when you can't outbid by a microscopic amount.
2016-12-23 14:36:11 -08:00
Scott Schurr
3337d17fdd Convert DeadlineTimer to std::thread (RIPD-1189) 2016-12-23 14:36:11 -08:00
Scott Schurr
8ab2236cdd Convert DeadlineTimer to chrono (RIPD-1189) 2016-12-23 14:36:10 -08:00
Rome Reginelli
0cb6a0f961 Correct PaymentChannelClaim flag names in comment 2016-12-23 14:36:10 -08:00
Mike Ellery
28ae522ea2 Migrate freeze-test to cpp (RIPD-1154):
Port all active tests in freeze-test.coffee to c++.
2016-12-23 14:36:10 -08:00
Mike Ellery
c0cf7bd3c1 Port discrepancy-test.coffee to c++ (RIPD-1352):
Add jtx unit test that verifies a transaction net balance against the
reported fee.
2016-12-23 14:36:10 -08:00
Mike Ellery
fd7a2835e4 Migrate path tests to cpp (RIPD-1155):
Implement the existing declarative-path-test in jtx framework.
2016-12-23 14:36:10 -08:00
Mike Ellery
3d0314c621 Remove websocketpp support (RIPD-1293) 2016-12-23 14:36:10 -08:00
Mike Ellery
8d83aa5c07 Add server/connection tests (RIPD-1336):
Migrate tests in uniport-test.js to cpp/jtx. Handle exceptions in
WSClient and JSONRPClient constructors. Use shorter timeout
for HTTP and WS Peers when client is localhost. Add missing call to
start_timer in HTTP Peer. Add incomplete WS Upgrade request test
to prove that server timeout is working.
2016-12-23 14:36:10 -08:00
Lieefu Way
7ff243ade9 Remove redundant call to clearNeedNetworkLedger 2016-12-23 14:36:10 -08:00
Howard Hinnant
2fd0540ed4 Recognize ripplerpc 2.0 requests and respond in kind:
* Force jtx to request/receive the 2.0 API
* Force the JSON and WebSocket tests to use 2.0 API
*  This specifically allows the Websocket to create 2.0 json/ripple
   and get back a 2.0 response.
* Add test for malformed json2
* Add check for parse failure
* Add check for params to be in array form.
* Correct type-o discovered in tests due to stricter checking.
* Add API version to the WSClient & JSONRPCClient test
* Update source.dox with more headers
2016-12-23 14:36:10 -08:00
wilsonianb
cdf470e68d Forward manifests from new peer (RIPD-1325):
Previously, manifests sent to new peers were marked as history so that
they would not be forwarded. However, this prevented a starting up
node's new manifest from being forwarded beyond its directly connected
peers. Stale or invalid manifests are still not forwarded.
2016-12-23 14:36:10 -08:00
Nik Bougalis
7fc780dd70 Set version to 0.40.0 2016-12-20 09:20:17 -08:00
seelabs
4d7b1a3b61 Set version to 0.40.0-rc3 2016-12-07 11:52:51 -05:00
seelabs
9a9dffa4ff Merge release into develop 2016-12-07 11:51:56 -05:00
seelabs
51e7f595bb Set version to 0.40.0-rc2 2016-12-06 21:38:13 -05:00
seelabs
293e520efc Set unfunded offers fix switch date 2016-12-06 21:38:10 -05:00
Nik Bougalis
9e960ff6b8 Set version to 0.40.0-rc1 2016-11-21 09:27:12 -08:00
Brad Chase
0a8e690917 Remove duplicate translation unit names 2016-11-21 09:22:43 -08:00
Brad Chase
cf60d4c30e Improve dependency installation during CI builds. 2016-11-21 09:21:55 -08:00
Nik Bougalis
8f2480225b Set version to 0.40.0-b11 2016-11-18 12:17:36 -08:00
Nik Bougalis
44167a6bcb Cleanup code identified in code review 2016-11-18 12:17:30 -08:00
seelabs
db95808206 Set unfunded offers fix switch date 2016-11-18 12:17:29 -08:00
Edward Hennis
fd901f8081 Support parallel 64- and 32-bit boost binaries (RIPD-1317):
* CMake and scons
* Update Visual Studio build docs
* Cache Appveyor PIP downloads for scons builds
* Rename the CMakeFuncs `find_` functions to `use_`
2016-11-18 12:17:29 -08:00
Mike Ellery
b6ce0aa75a Add build instructions for macOS:
Update existing wiki build instructions for macOS and migrate to
in-repo markdown file.
2016-11-18 12:17:29 -08:00
Mike Ellery
b712125bc0 Add TrustAndBalance Tests (RIPD-1153):
Migrate tests in send-test.js to cpp/jtx.
2016-11-18 12:17:29 -08:00
Nik Bougalis
d69b16895c Conditional Suspended Payments (RIPD-1140):
A conditional suspended payment is a suspended payment where
completion of the payment is contingent upon the fulfillment
of a condition defined by the sender during creation of the
suspended payment.

This commit also introduces the "CryptoConditions" amendment
which controls whether cryptoconditions will be supported
in suspended payments. The existing "SusPay" amendment can
be used to enable suspended payments without enabling the
cryptoconditions code.
2016-11-18 12:17:28 -08:00
Nik Bougalis
d198b439fd Cryptoconditions: RSA-SHA-256 (RIPD-1213) 2016-11-18 12:17:27 -08:00
Nik Bougalis
83aa5517c0 Cryptoconditions: PREFIX-SHA-256 (RIPD-1211) 2016-11-18 12:17:26 -08:00
Nik Bougalis
5711e7caa9 Cryptoconditions: ED25519 (RIPD-1214) 2016-11-15 21:42:31 -08:00
Nik Bougalis
8d0c93691d Cryptoconditions: PREIMAGE-SHA-256 (RIPD-1210) 2016-11-15 21:41:48 -08:00
Nik Bougalis
d8d0cb17ba Cryptoconditions Framework (RIPD-1139):
Cryptoconditions provide a mechanism to describe a signed message such
that multiple actors in a distributed system can all verify the same
signed message and agree on whether it matches the description. This
provides a useful primitive for event-based systems that are distributed
on the Internet since we can describe events in a standard deterministic
manner (represented by signed messages) and therefore define generic
authenticated event handlers.

The cryptoconditions specification implemented is available at:
    https://tools.ietf.org/html/draft-thomas-crypto-conditions-01
2016-11-15 21:41:25 -08:00
Nik Bougalis
47a919faf0 Set version to 0.40.0-b10 2016-11-09 13:58:53 -08:00
Nik Bougalis
d572de769b Improve peer iteration in overlay 2016-11-09 13:58:04 -08:00
seelabs
810a6b0f30 Add pthread flag 2016-11-09 13:58:04 -08:00
seelabs
665ad180cb Set unfunded offers fix switch date 2016-11-09 13:58:04 -08:00
Edward Hennis
361917e902 CMake unity and nonunity builds per project (RIPD-1326):
* Still respects "-Dtarget" unity/nonunity selection. Still defaults to
  unity.
* Adds a new target (rippled_classic or rippled_unity) depending on
  unity/nonunity selection.
* New target does not build by default.
  eg. Use `cmake --build . -target rippled_classic`
* Copy all config variables (Debug/Release to DebugClassic/ReleaseClassic) for nonunity builds
* CI uses the more generic "cmake --build" command
2016-11-09 13:58:04 -08:00
Miguel Portilla
4b261b12a4 Prevent misuse of JobQueue header files:
* Move `JobCoro` to `JobQueue::Coro` and remove separate JobCoro.h
2016-11-09 13:58:04 -08:00
wilsonianb
afd4b45036 Fix overlay README.md (RIPD-1330) 2016-11-09 13:58:04 -08:00
wilsonianb
47adc728db Add Linux instructions to docs/README.md 2016-11-09 13:58:04 -08:00
Mike Ellery
7e39d645b9 Add Ticket Tests (RIPD-1328):
Migrate ticket-test.js to cpp. Add coverage for Change/Cancel ticket
handlers.
2016-11-09 13:58:03 -08:00
Mike Ellery
35504f1723 Add Ledger RPC Tests (RIPD-1297):
Migrate tests in remote-test.js to cpp/jtx. Add coverage for
ledger_entry RPC request.
2016-11-09 13:58:03 -08:00
Brad Chase
61d9dda4e0 Expand unit test coverage of SetTrust:
* Unit test malformed/tem responses
* Update free trust line test to cover the case where creation is actually adding the opposite trust direction to an existing account lines ledger entry
* Add unit tests for setting and removing quality on trust lines.
2016-11-09 13:58:03 -08:00
Brad Chase
38ca9d4a97 Set version to 0.40.0-b9 2016-10-27 15:18:37 -04:00
Edward Hennis
f37aa1d6c8 Improve CMake find_boost compatibility:
* Put all the relevant calls together.
* Sensibly handle stage vs. stage64 lib directories.
* Unable to move target_link_libraries acur_project not defined in new location, so breaks non-win builds
2016-10-27 15:17:21 -04:00
Scott Schurr
db13ddf844 Fix unused variable warning from clang 2016-10-27 12:45:01 -04:00
Miguel Portilla
bf642404c7 Use ws2 as default in unit tests 2016-10-27 12:43:14 -04:00
S. Matthew English
d53d5cfc42 Fix typos/style issues in documentation 2016-10-27 12:41:11 -04:00
wilsonianb
bbf52056f9 Publish new manifest signature 2016-10-27 12:39:20 -04:00
Brad Chase
b8cae2dfaf Unit test for free trust lines (RIPD-911) 2016-10-27 12:36:01 -04:00
Scott Schurr
795ee8bb5e Add MacOS documentation to docs/README.md 2016-10-27 12:33:48 -04:00
Mike Ellery
cfcd618aa6 Add Offer tests (RIPD-938):
Migrate tests in offer-test.js to cpp/jtx. Minimally reformat existing
test code. Augment self-cross test to include partner account as well as bridged and
direct crossing.
2016-10-27 12:30:54 -04:00
Miguel Portilla
19258cf980 Remove application dependency from SyncFilters 2016-10-27 12:19:26 -04:00
seelabs
cdaafeb4b6 Improve openssl directory finding 2016-10-18 14:18:41 -04:00
Edward Hennis
7688a97d95 Set version to 0.40.0-b8 2016-10-17 15:32:34 -04:00
Nik Bougalis
027b289c91 Remove an unused argument from ripple::verify 2016-10-17 15:28:21 -04:00
wilsonianb
b55edfa8f0 Sign manifest with ephemeral and master keys (RIPD-1083) 2016-10-17 15:28:12 -04:00
Edward Hennis
7d46d153c6 Add CMake target for docs:
* Includes docs/ files in VC and xcode projects.
* Does NOT build automatically, so will not affect systems without the
  build toolchain.
2016-10-17 15:25:39 -04:00
Edward Hennis
96b17749af Setup instructions for doc toolchain for Windows 2016-10-17 15:18:49 -04:00
Vinnie Falco
f27348c4d5 Add HTML documentation framework 2016-10-17 15:18:40 -04:00
seelabs
c6923dcf88 Report error if OS is not 64-bit 2016-10-17 15:10:19 -04:00
David Schwartz
f456355da2 Begin consensus refactor (RIPD-1011):
* New RCLCx* classes
* Refactor consensus positions
* Refactor proposed transaction sets
* Refactor disputed transactions
* Refactor position broadcast/replay
2016-10-17 15:02:36 -04:00
JoelKatz
97806b42c4 Consensus refactor preliminary changes (RIPD-1011):
* Remove extraneous passing of transaction set hashes
* Remove recentPositions_. InboundTXs does the job now
* Move responsibility for sending "have TX set" out of consensus
2016-10-17 15:01:33 -04:00
JoelKatz
ed02b0717e Snapshotting an unbacked SHAMap should yield an unbacked SHAMap 2016-10-17 15:01:24 -04:00
Edward Hennis
2963e91752 Improve CI / cmake for ripple-libpp support (RIPD-1255):
* Simplify Travis APT config.
* Automatically retry Travis build and test script. Will result in fewer
  false negatives.
* Travis install scripts use absolute paths.
* Build a library of cmake functions for reuse.
* Disallow cmake builds in project root.
* Disallow cmake default 32-bit Visual Studio builds.
* Add several missing nonunity / header files, including all unit tests to
  cmake.
* Change gcc.debug.nounity Travis build to use cmake, instead of adding
  builds.
* Change Appveyor build to cmake. Eliminates most spurious failures, which
  are caused by python or scons failing to download.
2016-10-03 12:04:46 -04:00
Nik Bougalis
aa11effdd6 Set version to 0.40.0-b7 2016-10-01 19:10:17 -07:00
Nik Bougalis
6e9c15af92 Correctly parse multi-buffer JSON messages (RIPD-1306):
When attempting to parse a BufferSequence as a JSON object,
if the sequence contained more than buffer, the JSON parser
would incorrectly attempt to decode each buffer as a separate
JSON object, instead of one complete object.
2016-10-01 19:10:16 -07:00
Edward Hennis
0ddeb29c35 Add regression test for multi-buffer JSON message parsing (RIPD-1306) 2016-10-01 19:10:06 -07:00
Vinnie Falco
98f878cf10 Set version to 0.33.0-hf1 2016-10-01 12:36:40 -04:00
Nik Bougalis
69b47890e6 Correctly parse multi-buffer JSON messages (RIPD-1306):
When attempting to parse a BufferSequence as a JSON object,
if the sequence contained more than buffer, the JSON parser
would incorrectly attempt to decode each buffer as a separate
JSON object, instead of one complete object.
2016-10-01 12:36:37 -04:00
Edward Hennis
41851022d3 Add regression test for multi-buffer JSON message parsing (RIPD-1306) 2016-10-01 12:36:37 -04:00
Nik Bougalis
a7630aaa55 Set version to 0.40.0-b6 2016-09-30 08:46:47 -07:00
Nik Bougalis
1d15af6afd Merge master into develop 2016-09-30 08:46:07 -07:00
Nik Bougalis
dd0075f2b8 Set version to 0.40.0-b5 2016-09-29 16:28:37 -07:00
Nik Bougalis
4b0d8b630c Improve Buffer and Slice:
* Make Buffer constructible from a Slice
* Fix self-move-assignment in Buffer
* Add unit tests
2016-09-29 16:28:37 -07:00
Howard Hinnant
b421559a47 Prepare for boost 1.62
These changes are compatible with previous boost releases.
2016-09-29 19:24:49 -04:00
Mike Ellery
05e7373086 Add book_offers RPC tests (RIPD-1283):
Migrate orderbook-test.js to cpp tests. Provide
coverage for error conditions in book_offers
RPC method.
2016-09-29 19:24:49 -04:00
seelabs
bb0b97f46b Fix unfunded offer not removed (RIPD-1298):
If the mantissas of two non-native amounts differ by less than 10, then
subtracting them leaves a result of zero. This can cause situations
where `a>b`, yet `a-b == 0`.

One consequence of this is unfunded offers were incorrectly left in
order books. The code would check if the offer would be
consumed (`amount in offer > amount needed`), assume it wouldn't be,
yet when `amount needed` was subtracted from `amount in offer` the
result was zero and the offer was unfunded. This unfunded offer
incorrectly remained on the order book.

This patch fixes this bug.
2016-09-29 19:24:49 -04:00
Vinnie Falco
3b639afac2 Integrate NuDB 2016-09-29 19:24:15 -04:00
Vinnie Falco
bd93ecbd6b Merge commit '79159ffd87bf86e92ab5af6fffd5cc93c205a630' as 'src/nudb' 2016-09-29 19:24:13 -04:00
Vinnie Falco
79159ffd87 Squashed 'src/nudb/' content from commit 00adc6a
git-subtree-dir: src/nudb
git-subtree-split: 00adc6a4f16679a376f40c967f77dfa544c179c1
2016-09-29 19:24:12 -04:00
Nik Bougalis
f05321d501 Set version to 0.33.0 2016-09-29 12:02:57 -07:00
johannakate
8734458cfb add the getInfoRippled.sh support script:
The script can be used to quickly and easily retrieve
information to assess the health of a rippled server
2016-09-29 12:02:47 -07:00
Nik Bougalis
bdbb3caf47 Set version to 0.33.0-rc3 2016-09-21 12:11:44 -07:00
seelabs
076658e0f6 Set issuer fix switch date 2016-09-21 11:40:53 -07:00
Miguel Portilla
b2499c8fa0 Add Status page:
* Make HTTP(S) requests on websocket ports reply with Status page
* Fix isWebsocketUpgrade to compare case insensitive
* Make websocket upgrades with no websocket protocols configured report error
* Create unit test for unauthorized requets and the status page
2016-09-21 14:17:32 -04:00
Nik Bougalis
231a5ae6fb Set version to 0.40.0-b4 2016-09-21 11:02:54 -07:00
seelabs
45249e8746 Set issuer fix switch date 2016-09-21 09:03:55 -07:00
Miguel Portilla
e6ed9ae4d8 Add Status page:
* Make HTTP(S) requests on websocket ports reply with Status page
* Fix isWebsocketUpgrade to compare case insensitive
* Make websocket upgrades with no websocket protocols configured report error
* Create unit test for unauthorized requests and the status page
2016-09-21 09:03:55 -07:00
Aishraj Dahal
aca6db5601 Fix typo 2016-09-21 09:03:54 -07:00
Vinnie Falco
8e9f9599b8 Set version to 0.40.0-b3 2016-09-15 17:05:41 -04:00
Vinnie Falco
71d7d87bf3 Update for Beast 1.0.0-b13 2016-09-15 17:05:08 -04:00
Vinnie Falco
7ffef30f1c Add 'src/beast/' from commit '2f9a8440c2432d8a196571d6300404cb76314125'
git-subtree-dir: src/beast
git-subtree-mainline: 7c90b9ef88
git-subtree-split: 2f9a8440c2
2016-09-15 15:07:45 -04:00
Vinnie Falco
7c90b9ef88 Remove Beast subtree in preparation for git-subtree add 2016-09-15 15:07:34 -04:00
Vinnie Falco
4bb74196c0 Merge commit '2f9a8440c2432d8a196571d6300404cb76314125' into develop 2016-09-15 14:21:55 -04:00
seelabs
35fa20a110 Set version to 0.40.0-b2 2016-09-13 18:53:50 -04:00
seelabs
ddaeae2855 Set version to 0.33.0-rc2 2016-09-13 18:33:40 -04:00
seelabs
9c8e3776de Set issuer fix switch date 2016-09-13 18:31:47 -04:00
seelabs
633cf86ad8 Set issuer fix switch date 2016-09-13 18:18:58 -04:00
Nik Bougalis
66ce8779e8 Set version to 0.40.0-b1 2016-09-12 09:23:42 -07:00
Nik Bougalis
a9b3042d7e Remove unused tables from wallet.db 2016-09-12 09:23:41 -07:00
Nik Bougalis
4df24c0e8e Upgrade SQLite to 3.14.1 2016-09-12 09:23:40 -07:00
Nik Bougalis
9a988963e9 Refactor STObject, STLedgerEntry:
* Normalize names
* Remove unused and deprecated members
2016-09-12 09:23:39 -07:00
Nik Bougalis
5be33a650d Report ledger information in account_lines RPC (RIPD-1276) 2016-09-12 09:23:38 -07:00
Will
5b09dc731f Add jtx cpp test for noripple flag (RIPD-1259):
- Set and clear noripple flag
 - DefaultRipple on account
 - Set noripple on trustline with -ve balance
 - Pairwise noripple
2016-09-12 09:23:30 -07:00
Mike Ellery
51d7e7336f Improve multisign tests (RIPD-1273):
* Migrate some error case tests from js into jTx.
* Create test that invokes sign_for and submit_multisigned rpc methods.
2016-09-12 09:23:29 -07:00
Mike Ellery
ad9be4dbf6 Add LedgerClosed test (RIPD-1272)
Migrate the logic in monitor-test.js to a new jtx test
that covers the ledger_closed RPC method.
2016-09-11 14:01:36 -07:00
seelabs
87756b9324 Set version to 0.33.0-rc1 2016-09-07 16:56:37 -04:00
seelabs
e611a7a0f8 Set issuer fix switch date 2016-09-07 14:35:37 -04:00
Vinnie Falco
2f9a8440c2 Set version to 1.0.0-b13 2016-09-02 16:56:33 -04:00
Vinnie Falco
a40dd2690a Better dstream:
* non-Windows dstream is a simple reference alias
* dstream constructor takes a target ostream argument
* dstream inherits the unitbuf setting of the target stream
2016-09-02 16:56:19 -04:00
Vinnie Falco
802c2395c1 Set version to 0.33.0-b8 2016-09-02 15:31:19 -04:00
Brad Chase
8f97889176 Don't include unit test sources in code coverage (RIPD-1132):
Most files containing unit test code are moved to
src/test. JTx and the test client code are not yet moved.
2016-09-02 15:26:16 -04:00
Vinnie Falco
104f12a9e2 Tidy up CMakeLists 2016-09-02 10:38:43 -04:00
Vinnie Falco
e499743cdd Remove bin and bin64 directories:
These directories are removed, to make it easier for developers
to delete the entire directory contents when rebuilding CMake targets
after a configuration change.
2016-09-02 10:01:32 -04:00
Vinnie Falco
241795cd73 Set version to 1.0.0-b12 2016-08-29 15:07:23 -04:00
Vinnie Falco
411b2534ed Use -p to print suites from unit test main 2016-08-29 15:07:15 -04:00
Vinnie Falco
253f138aff Add BEAST_EXPECTS test failure macro:
New overloads of suite::expect take the file and line number
as individual parameters, cleaning up the file name output
by showing only the filename part (to not leak the full path,
which might contain sensitive information).

A new macro BEAST_EXPECTS allows an additional reason
string as well as reporting the file and line. Typical usage:

    ```
    error_code ec;
    ...
    if(! BEAST_EXPECTS(! ec, ec.message()))
        return;
    ```
2016-08-29 13:46:31 -04:00
Vinnie Falco
dadbab4c0f Fix unit test runner to output all case names:
Also fixes a bug where suite::log was incorrectly flushed.
2016-08-29 11:48:45 -04:00
Vinnie Falco
d9017a3f76 Tidy up whitespace 2016-08-29 11:47:01 -04:00
Vinnie Falco
aedfaab93d Update README, rename CHANGELOG 2016-08-29 10:29:07 -04:00
Nik Bougalis
8687f64429 Set version to 0.33.0-b7 2016-08-27 18:00:05 -07:00
Nik Bougalis
1d08075c43 Simplify Beast code:
- Use std instead of custom Beast classes
- Remove Beast heap block allocator
- Remove function call timer
2016-08-27 18:00:00 -07:00
Howard Hinnant
8a6c7f9208 Move varint out of NuDB
varint is no longer used by NuDB.  It is now only used by codec.h in
nodestore and so has been moved there.
2016-08-27 17:59:36 -07:00
Mike Ellery
fd061bba8a Augment LedgerRequestRPC tests (RIPD-1270):
Add basic ledger_request validation tests to replace the existing
ledger.js tests. Provide tests that trigger some error conditions
in RPC handling code.
2016-08-27 17:59:36 -07:00
Mike Ellery
8f41817cb9 Add ledger_data RPC tests (RIPD-1260):
Migrate ledger-data-test.js to cpp tests. Provide coverage for
paging limits and input error cases.
2016-08-27 17:59:27 -07:00
seelabs
cf8b6be494 Set issuer in balanceHook 2016-08-26 16:08:30 -07:00
Vinnie Falco
d263d4d449 Set version to 1.0.0-b11 2016-08-26 13:06:51 -04:00
Keaton Okkonen
b39e4817e5 Update README.md (fix #62) 2016-08-26 13:06:44 -04:00
Vinnie Falco
4dfa250a34 Rename websocket echo servers (fix #46) 2016-08-26 13:06:44 -04:00
Vinnie Falco
8a6908c072 Rename to DynamicBuffer (fix #47) 2016-08-26 13:06:43 -04:00
Vinnie Falco
d8fe737ad7 Number error codes from 1 (fix #54) 2016-08-26 13:06:43 -04:00
Vinnie Falco
61023c3f4a Update HTTP documentation (fix #61, #60, #59) 2016-08-26 13:06:42 -04:00
Vinnie Falco
b607d47bd3 Restyle sources 2016-08-26 13:06:42 -04:00
Vinnie Falco
878c0f2a19 Set URI in generated WebSocket Upgrade requests (fix #64):
The 'resource' parameter in the call to stream::handshake is
used when building the HTTP request to perform the upgrade.
2016-08-26 13:06:42 -04:00
Vinnie Falco
19dd983d2b Fix integer warnings in 64-bit Windows build 2016-08-26 13:06:41 -04:00
Vinnie Falco
c15751ced6 Update documentation and images 2016-08-26 13:06:41 -04:00
Vinnie Falco
a55d9aa4c3 Tidy up 32 and 64 bit build support (fix #49):
This fixes up support for building both 32 and 64 bit targets, especially on Windows.
2016-08-26 13:06:39 -04:00
Nik Bougalis
037d52114a Print the testcase header prior to logging (fix #56) 2016-08-26 07:33:43 -07:00
seelabs
68e123a8d6 Set version to 0.33.0-b6 2016-08-18 11:34:59 -04:00
seelabs
b92a7d415e Use deferred credits in XRPEndpointStep:
The XRPEndpointStep bypassed the logic in deferred credits and
incorrectly counted funds acquired during a payment as available for
use in the payment. It also incorrectly used the current ownerCount when
calculating the reserve instead of the owner count as it was at the
beginning of the payment (reducing the owner count is analogous to
acquiring funds during a payment.)
2016-08-18 11:34:12 -04:00
JoelKatz
fc73fbd050 Remove old-style pathfinding code
All cases that still used the old RPF code now use new-style pathfinding.
This includes unit tests, RPF requests with a ledger specified, and RPF
requests in standalone mode.
2016-08-18 11:34:12 -04:00
seelabs
ab45c490d7 Require empty string for empty peer account on account_lines:
A recent commit (0d0227e744) broke the
parser for the rpc command `account_lines` such that an empty
string ("") was no longer required for the second parameter. This commit
fixes that bug.

Note the empty peer field string requirement only applies to the rippled
command line. It can be comitted with a ledger via HTTP or WebSocket.
2016-08-16 08:29:01 -04:00
Nik Bougalis
d8b85c00e8 Set version to 0.33.0-b5 2016-08-15 11:21:27 -07:00
Howard Hinnant
e453c14b0a Add SHAMapV2 to supportedAmendments 2016-08-15 11:21:10 -07:00
Mike Ellery
1c6e32ccc2 Migrate SetRegularKey unit tests (RIPD-1258):
Create SetRegularKey test to replace existing js test. Copy and simplify
some existing test logic from Env_test.cpp and MultiSign.test.cpp. Add
coverage for tfUniversalMask tx flag error case.
2016-08-15 11:18:40 -07:00
Mike Ellery
c4e581179c Migrate AccountSet unit tests (RIPD-1249):
Move existing functionality of account_set-tests.js into a native
unit test. Improve coverage by testing more cases.
2016-08-15 11:15:35 -07:00
Mike Ellery
0d803e0fa2 Refactor uses of strCopy (RIPD-1256)
Replace the sparsely used strCopy function with Slice. Change some of
the SHAMap interface to use Slice instead of Blob, which should
eliminate a copy.
2016-08-15 11:09:45 -07:00
Edward Hennis
c1b8efb7af Clear queue for account with high fee tx (RIPD-1246):
* If an account has any transactions in the transaction queue, submitting
  a transaction that covers the differences to the open ledger fee level
  for prior queued transactions plus itself will cause all those
  transactions to be applied to the open ledger.
* tel failures in `TxQ::accept` will leave tx in the queue to retry later.
2016-08-15 11:09:18 -07:00
seelabs
b0704b47e8 Remove _FORTIFY_SOURCES from build:
This option is silently ignorned at -O0
2016-08-15 11:08:38 -07:00
seelabs
2fa84e95b9 Add test for path with offer that changes issuer only 2016-08-15 11:08:21 -07:00
seelabs
b02ec47b4f Fix signed comparison bug in range_check_cast 2016-08-15 11:07:58 -07:00
Vinnie Falco
3ff56eb071 Set version to 1.0.0-b10 2016-08-12 21:02:44 -04:00
Vinnie Falco
9e8a5a5765 Update README.md for CppCon 2016 2016-08-12 21:02:40 -04:00
Vinnie Falco
461a8ea846 Add WebSocket implementation comparison doc 2016-08-12 21:02:40 -04:00
Vinnie Falco
8d9c0daa9d Add BEAST_EXPECT macro:
This macro is used in the unit test framework to assist in
reporting the file and line number of test failures.
2016-08-12 21:02:40 -04:00
Ties Jan Hefting
1537527927 Fix warnings 2016-08-12 21:02:39 -04:00
seelabs
d51a2785ee Set version to 0.33.0-b4 2016-08-08 12:25:57 -04:00
Nik Bougalis
e8a7ad4748 Prevent concurrent write operations in websockets 2016-08-07 13:15:19 -07:00
seelabs
2ca18670d2 Set version to 0.33.0-b3 2016-08-05 11:13:59 -04:00
seelabs
d4a56f223a Payment Channels (RIPD-1224):
Payment channels permit off-ledger checkpoints of XRP payments flowing
in a single direction. A channel sequesters the owner's XRP in its own
ledger entry. The owner can authorize the recipient to claim up to a
give balance by giving the receiver a signed message (off-ledger). The
recipient can use this signed message to claim any unpaid balance while
the channel remains open. The owner can top off the line as needed. If
the channel has not paid out all its funds, the owner must wait out a
delay to close the channel to give the recipient a chance to supply any
claims. The recipient can close the channel at any time. Any transaction
that touches the channel after the expiration time will close the
channel. The total amount paid increases monotonically as newer claims
are issued. When the channel is closed any remaining balance is returned
to the owner. Channels are intended to permit intermittent off-ledger
settlement of ILP trust lines as balances get substantial. For
bidirectional channels, a payment channel can be used in each direction.
2016-08-05 11:13:57 -04:00
seelabs
2e7f5502bf Fix RPC parsing bug 2016-08-05 11:13:57 -04:00
seelabs
4483079181 Remove extra path separator from CMAKE_SOURCE_DIR 2016-08-05 11:13:57 -04:00
Nik Bougalis
2f0b3bd427 Set version to 0.33.0-b2 2016-08-02 15:13:11 -07:00
Edward Hennis
d1ce07ef5d Minor refactor of LoadFeeTrack (RIPD-956):
* Load scaling functions are free, and take `Fees`.
* Move LoadFeeTrack to app/misc.
* Update naming convention.
2016-08-02 18:05:08 -04:00
Edward Hennis
a252fefede Report escalated ledger fee in load_factor (RIPD-1207):
* Updates both server_info and server_state
* Adds "load_factor_server", which reports the server-only portion of the
  load (if appropriate) so clients can decide an appropriate fee to pay if
  the open ledger fee is higher than they're willing to pay.

=== Release Notes ===
==== Updated Features ====

Both `server_info` and `server_state` report the escalated ledger fee in
the `load_factor` result parameter. If appropriate, `load_factor_server`
reports the server-only portion of the load so clients can submit a fee
between those two values to get into the queue.
2016-08-02 18:04:47 -04:00
Edward Hennis
e762d09e7e Tx queue enhancements and RPC info (RIPD-1205, RIPD-1206):
* Account-related queue stats (RIPD-1205). Boolean "queue" parameter to
  account_info only if requesting the open ledger.
* Account for the TxQ when autofilling sequence in sign-and-submit (RIPD-1206)
* Tweak TxQ::accept edge case when choosing which tx to try next.
* Labels for experimental "x_" submit parameters use correct separator.

=== Release Notes ===
==== New features ====

When requesting `account_info` for the open ledger, include the `queue :
true` to get extra information about any queued transactions for this
account. (RIPD-1205).

==== Bug fixes ====

When using sign-and-submit mode to autofill a transaction's sequence
number, the logic will not reuse a sequence number that is in the queue
for this account. (RIPD-1206).

Labels for experimental "x_queue_okay" and "x_assume_tx" parameters to
`sign` and `submit` updated to use correct separator.
2016-08-02 18:03:53 -04:00
Will
348e65074e fix bug in error propagation for account badSeed (RIPD-1248) 2016-08-02 13:25:48 -07:00
Will
64f2576fc8 Add jtx cpp test for account_objects RPC (RIPD-1230)
port of js test, account_objects-test.js
- bob account setup and rpc invoke
- error tests; no account, non-existant account, bad seed, validation
- combined unstepped testcase then stepped with limit/marker
2016-08-02 13:25:48 -07:00
Mike Ellery
9926d3188a Add jtx test for account_offers RPC (RIPD-1236)
Details
 -------

  * covers existing account_offers-test.js
  * adds new coverage for results limiting and some
    negative tests (bad input)
  * fix bug in json value copying logic for bad seed/account error
    case
  * using new BEAST_EXPECT macros
2016-08-02 13:25:48 -07:00
seelabs
cc8671b8b2 Add OwnerPays to supportedAmendments 2016-08-02 13:25:48 -07:00
wilsonianb
f5fcdd0b80 Update pywin32 version in appveyor 2016-08-02 13:25:48 -07:00
Miguel Portilla
71a30a57cb Fix scons vcxproj in OS X 2016-08-02 13:25:48 -07:00
Miguel Portilla
f9fe2ef90f Fix inbound ledger add peers logic 2016-08-02 13:25:48 -07:00
Scott Schurr
6c8673c7c3 Remove unused member variable in ApplyBaseView 2016-08-02 13:25:48 -07:00
JoelKatz
11b64e049c Report frozen lines in gateway_balances(RIPD-1217):
* Report lines frozen by the gateway separately
* Add unit test for gateway_balances
* Clean up some existing code
2016-08-02 13:25:48 -07:00
JoelKatz
33f153fc9a Consensus refactor preliminary changes (RIPD-1011):
* Standardize names of LedgerConsensusImp members
* Rework visitStoredProposals
* Clean up mapComplete
* Move status helpers out of LedgerConsensusImp
* Move applyTransaction out of LedgerConsensusUmp
* Clean up applyTransactions
2016-08-02 13:25:48 -07:00
JoelKatz
4758050444 SHAMap fixups:
* Change state_ to Invalid if inner node types mismatch
* flushDirty before unsharing to ensure modified nodes get written
* Remove unnecessary code
* Fix updateHash for V2 inner nodes
* In descend, call isInconsistentNode only if node is found
* getMissingNodes could request duplicates in some cases
* An invalid node with the right hash is useful, it proves the map invalid
2016-08-02 13:25:48 -07:00
Nik Bougalis
a5589dcec6 Set version to 0.33.0-b1 2016-07-29 17:58:26 -07:00
Nik Bougalis
08ea245101 Hoist version string to namespace level 2016-07-29 17:58:24 -07:00
seelabs
3b58e36621 Add CMake support:
cmake support in rippled. Currently supports:

 * unity/nounity debug/release
 * running protobuf
 * sanitizer builds
 * optional release build with assert turned on
 * `target` variable to easily set compiler/debug/unity
    (i.e. -Dtarget=gcc.debug.nounity)
 * gcc/clang/visual studio/xcode
 * linux/mac/win
 * gcc 4 ABI, when needed
 * ninja builds
 * check openssl for acceptably recent release
 * static builds

TBD:
 * jemalloc support
 * count

Notes:
 * Use the -G"Visual Studio 14 2015 Win64" generator on Windows. Without
   this a 32-bit project will be created. There is no way to set the
   generator or force a 64-bit build in CMakeLists.txt (setting
   CMAKE_GENERATOR_PLATFORM won't work). The best solution may be to
   wrap cmake with a script.

 * It is not possible to generate a visual studio project on linux or
   mac. The visual studio generator is only available on windows.

 * The visual studio project can be _either_ unity or
   non-unity (selected at generation time).  It does not appear possible
   to disable compilation based on configuration.

 * Language is _much_ worse than python, poor documentation and "quirky"
   language support (for example, generator expressions can only be used
   in limited contexts and seem to work differently based on
   context (set_property can set multiple values, add_compile_options
   can not/or is buggy)

 * Could not call out to `sed` because cmake messed with the regular
   expression before calling the external command. I did not see a way
   around this.

 * Makefile generators want to be single target. It wants a separate
   directory for each target type. I saw some mentions on the web for
   ways around this bug haven't look into it. The visual studio project
   does support debug/release configurations in the same project (but
   not unity/non-unity).
2016-07-29 17:57:50 -07:00
Miguel Portilla
b343b0468a Use lock_guard over unique_lock 2016-07-29 17:57:49 -07:00
Will
69b91065c5 Remove OpenSSL Base64 encoding dependency (RIPD-1238) 2016-07-29 17:57:49 -07:00
Vinnie Falco
e39316882e Add BEAST_EXPECT, replace calls to expect 2016-07-29 17:46:56 -07:00
Nik Bougalis
1ff972fbd3 Set version to 0.32.1 2016-07-29 12:52:26 -07:00
Vinnie Falco
8204d9524e Set version to 1.0.0-b9 2016-07-22 11:57:13 -04:00
wilsonianb
07bf106cd3 Handle undefined VARIANT in cmake 2016-07-22 11:56:40 -04:00
Vinnie Falco
225b5a1204 Set version to 1.0.0-b8 2016-07-21 17:03:54 -04:00
Vinnie Falco
054d5de877 Fix rfc2616 Section 4.2 compliance:
basic_headers no longer combines fields with the same name by appending
a comma and concatenating the two values together. This was breaking
certain header fields which expect each value to be distinct, such as
the "Set-Cookie" header.

Now the container behaves more like a multi set with respect to insertion
of multiple values with the same field name. Additional member functions
are provided to provide extra functionality.
2016-07-21 17:03:19 -04:00
Vinnie Falco
5349bcc1c5 Update Example code in documentation 2016-07-21 17:03:18 -04:00
Jack Bond-Preston
17fd2ef2e2 Fix to_string.hpp include path in example code 2016-07-21 17:03:18 -04:00
wilsonianb
e199c0555c Build coverage and usan Travis CI targets with CMake 2016-07-21 17:03:18 -04:00
seelabs
42557b800c Add cmake and clang build to travis 2016-07-21 17:03:18 -04:00
Casey Bodley
ef2330d477 Use Threads::Threads interface library in cmake
in addition to passing ${CMAKE_THREAD_LIBS_INIT} to the linker, this
interface library will also add -pthread to the compile options when
supported

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-07-21 17:03:17 -04:00
Nik Bougalis
cb7d0b508d Set version to 0.32.1-rc1 2016-07-14 17:31:32 -07:00
Nik Bougalis
cf72d70eca Clarify owner reserve requirements for trust lines (DOC-456) 2016-07-12 13:35:27 -07:00
seelabs
cf9d65f973 Set version to 0.32.1-b4 2016-07-07 14:45:17 -04:00
seelabs
dd2feb8d1f Use boost::thread_specific_ptr instead of thread_local:
`thread_local` causes deployment problems with CentOS 7
2016-07-07 14:45:15 -04:00
seelabs
d790c3b671 Set version to 0.32.1-b3 2016-07-06 14:09:41 -04:00
seelabs
a56c43f3b3 Rename file to avoid duplicate object file name 2016-07-06 14:08:31 -04:00
seelabs
6f3a35e8be Better unhandled exception handling:
Log thread name and exception type on unhandled exceptions and use a
terminate handler to get a stack trace that includes the function that
thows the exception.
2016-07-06 14:07:57 -04:00
seelabs
c9d8fa9e96 Rename reportUncaughtExceptions to threadEntry 2016-07-06 14:07:57 -04:00
wilsonianb
b72724a4a4 Ignore empty CONFIG_DIR for validators file (RIPD-1221) 2016-07-06 14:06:56 -04:00
Vinnie Falco
f8a1ec0348 Set Beast version to 1.0.0-b7 2016-07-06 13:37:28 -04:00
Vinnie Falco
8375ae647e Add skip_body parser option 2016-07-06 13:36:15 -04:00
Vinnie Falco
69da298aa7 Remove extraneous header file status.hpp 2016-07-06 13:36:15 -04:00
Vinnie Falco
6765507cc4 Add usage example to rfc7230 javadocs 2016-07-06 13:36:14 -04:00
Vinnie Falco
e2c67a1666 Fixes and documentation for teardown and use with SSL:
This solves a problem where clang and gcc locate the deleted
version of teardown and async_teardown instead of the overloaded
version. It requires overloads to add `teardown_tag` into the signature
so that the rules for argument dependent lookup can find the
right function. Improve documentation of teardown requirements

The documentation is updated to clearly explain the need for including
<beast/websocket/ssl.hpp> to use SSL streams with WebSocket.

The default implementations of teardown and async_teardown now use
static_assert to alert the user of improper usage, with comments
providing guidance for resolving the error.
2016-07-06 13:36:14 -04:00
Vinnie Falco
6397025435 Remove deprecated example http::stream wrapper 2016-07-06 13:36:12 -04:00
Vinnie Falco
2a448065da Simplify HTTP crawler example 2016-07-06 13:36:00 -04:00
Vinnie Falco
5c7130e4fd Fixes and simplifications to HTTP example server:
The example HTTP server is updated to provide the correct MIME-type.
It no longer uses the now-deprecated http::stream class, since that
implementation does not provide flow control. A new example async_write
function is provided in the asynchronous server for managing the
lifetime of a message sent asynchronously.

The logging is thread-safe, and a bug causing connections to
malfunction is fixed.
2016-07-06 13:36:00 -04:00
Vinnie Falco
bbad20c66f Qualify some calls:
This fixes a problem where a call to read() is ambiguous because
the argument list contains objects from both boost::asio and
beast::http.

Users invoking read may need to do so fully qualified, by writing:
    beast::http::read(...);
2016-07-06 13:35:57 -04:00
seelabs
e29163e922 Set version to 0.32.1-b2 2016-07-01 17:14:37 -04:00
JoelKatz
2633949d5b Fix access to obsolete reference in PathRequest (RIPD-1219):
* Don't access jvArray if newStatus is replaced
* Remove iLastLevel and use just iLevel
2016-07-01 17:13:16 -04:00
Nik Bougalis
16a38f3979 Catch unhandled exceptions in I/O service threads (RIPD-1166) 2016-07-01 17:13:16 -04:00
Scott Schurr
c4f8b38148 Remove undesirable Journal::Stream constructor:
Constructing a Stream from a Sink would elide specifying the
Severity level of the Stream.  That constructor is removed so
if a Stream is constructed from a Sink the Severity must be
specified.
2016-07-01 17:13:16 -04:00
Scott Schurr
40678e9a78 Make debugLog() return a beast::Journal (RIPD-1209):
Previously, writes using debugLog() tagged every entry with
"TRC:".  Now users of debugLog() must specify the severity
level they want their information logged at.
2016-07-01 17:13:16 -04:00
Miguel Portilla
8f5449dafb Fix BaseHTTPPeer::write strand thread context 2016-07-01 17:13:16 -04:00
Nik Bougalis
8c90ef810a Catch exception from websocketpp 2016-07-01 17:13:16 -04:00
Edward Hennis
177a52473a Improve TxQ edge-case handling logic (RIPD-1200):
* HashRouter: Track relay expiration separately from item lifespan.
** Renamed `swapSet` to `shouldRelay`.
** Cleaned up `HashRouter` member names and removed unused code.
** Remove `SF_RELAYED` flag.
* Fix TxQ edge case replacing dropped transactions.
* Fix TxQ bug in maximumTxnPerAccount check.
2016-07-01 17:13:11 -04:00
Miguel Portilla
a22fa21ce4 Set version to 0.32.1-b1 2016-06-28 14:54:04 -04:00
Miguel Portilla
beb9883705 Remove incompatible OS X switches in Test.py 2016-06-28 14:53:49 -04:00
Edward Hennis
654772a860 Autofill with x-queue-okay uses mult_max fee (RIPD-1194):
* Only relevant if escalated fee is larger than mult_max.
* Will improved queue position, giving tx more chance to succeed.
2016-06-28 14:53:49 -04:00
Edward Hennis
9cc80b7cb6 Test.py exit code accurate in all cases (RIPD-1193):
* Also remove some redundant output.
2016-06-28 14:53:48 -04:00
seelabs
d46c21cc5f Travis install clang from tar file:
The llvm apt repos are offline. This is a workaround to install clang
directly from a tar file.
2016-06-28 14:53:48 -04:00
seelabs
da18f7c053 Fix V2 line-quality bugs 2016-06-28 14:53:47 -04:00
Scott Schurr
0952ebfc1d Add jtx support for trust line quality (RIPD-1094) 2016-06-28 14:53:47 -04:00
Nik Bougalis
a698104c55 Use Rate to represent transfer rates (RIPD-201, RIPD-983):
The Ripple protocol represent transfer rates and trust line
qualities as fractions of one billion. For example, a transfer
rate of 1% is represented as 1010000000.

Previously, such rates where represented either as std::uint32_t
or std::uint64_t. Other, nominally related types, also used an
integral representation and could be unintentionally substituted.

The new Rate class addresses this by providing a simple, type
safe alternative which also helps make the code self-documenting
since arithmetic operations now can be clearly understood to
involve the scaling of an amount by a rate.
2016-06-28 14:53:46 -04:00
Edward Hennis
f060820f3b Sign-and-submit: Test escalated fee autofill (RIPD-1188) 2016-06-28 14:53:46 -04:00
Edward Hennis
119d5c1e47 JTx sign-and-submit mode support 2016-06-28 14:53:45 -04:00
seelabs
2d53ee4051 Add FlowV2 to supportedAmendments 2016-06-28 14:53:45 -04:00
seelabs
66f0caa309 Use protobuf int64 type 2016-06-28 14:53:45 -04:00
Howard Hinnant
d88b63d4c8 Complete SHAMap V2 cutover 2016-06-28 14:53:44 -04:00
Miguel Portilla
63a5522406 Add custom define to disable uncaught exception logging. 2016-06-27 14:35:21 -04:00
seelabs
d22eb0caa2 Set version to 0.32.0 2016-06-24 14:12:17 -04:00
seelabs
138cadc01c Set version to 0.32.0-rc2 2016-06-23 18:29:59 -04:00
seelabs
b590e2c96f Change RIPD-1141 Switchover date 2016-06-23 18:20:15 -04:00
Vinnie Falco
c4c8a620c8 Initialize Writer in prepare:
Writer requires a call to Writer::init to call content_length. This
changes prepare to correctly call init. A consequences is that
prepare can now throw unexpectedly for user-defined writers that
can fail their initialization.
2016-06-20 11:12:26 -04:00
seelabs
5dd8f28290 Set version to 0.32.0-rc1 2016-06-07 13:26:29 -04:00
seelabs
078436212c Resolve warning 2016-06-07 13:26:27 -04:00
Miguel Portilla
10521de2fc Remove obsolete Internal command (RIPD-888) 2016-06-07 13:00:55 -04:00
Edward Hennis
7d11471619 clang: Allow Travis CI builds to succeed 2016-06-07 13:00:53 -04:00
seelabs
434855f500 Fix sendMax path bug 2016-06-07 10:36:13 -04:00
seelabs
11c4ca00d5 Put flowV2 on an amendment only 2016-06-06 20:01:58 -04:00
seelabs
f16d701a2c Add FlowDebugInfo to easily compare diffs between flow V1 and V2 2016-06-06 20:01:53 -04:00
seelabs
34d590d93a Add balanceChanges to PaymentSandbox
fold
2016-06-06 20:01:53 -04:00
seelabs
a87f56448a Prefer paths with more liquidity when qualities are equal 2016-06-06 19:52:25 -04:00
Nik Bougalis
bb61ad2afe Set version to 0.32.0-b18 2016-06-06 07:28:38 -07:00
Nik Bougalis
57b8eb6ccd Merge remote-tracking branch 'upstream/release' into develop 2016-06-06 07:27:30 -07:00
Edward Hennis
7f52249e40 Change fee escalation algorithms (RIPD-1177):
* Minimum factor 256*500, don't multiply by base fee
* Change autofill fee behavior to pay the open ledger fee.
** Experimental options: x-assume-tx - assume <int> more transactions in
   the open queue when computing escalated fee, x-queue-okay - if true
   and escalated fee is over limit, try with load fee.
* Port of 75af4ed.
2016-06-06 07:24:56 -07:00
Nik Bougalis
321e2a94fe Revert "Increase minimum local fee":
The code is no longer necessary, as the fee is now dynamically
adjusted using the new fee escalation logic.

This reverts commit 57625e06ed.
2016-06-06 07:24:56 -07:00
Nik Bougalis
ceb01fb6a3 Correctly handle validations with no LedgerSequence 2016-06-06 07:24:54 -07:00
Nik Bougalis
2206d0ef65 Remove unused functions & cleanup code:
* Remove superseded ECDSA key functions
* Remove unused string helper functions
* Remove beast::FatalError
* Cleanup SSL context generation
* Improve parsing of RPC commands during startup
2016-06-06 07:24:52 -07:00
Nik Bougalis
279c2a6f82 Simplify PeerSet, InboundLedger and TransactionAcquire:
* Use std::mutex instead of std::recursive_mutex
* Remove unnecessary type alias
* Use std::set instead of ripple::hash_map
* Don't reinvent virtual functions
2016-06-06 07:24:50 -07:00
Nik Bougalis
d1200224e2 Update Release Notes 2016-06-06 07:24:48 -07:00
Scott Schurr
fdd1f2ec36 Log uncaught exceptions at the top of threads (RIPD-1166) 2016-06-06 07:10:36 -07:00
Edward Hennis
7295d7f4bb RPC fee command checks open ledger rules (RIPD-1183):
* Matches internal getMetric() to avoid races.
2016-06-06 07:10:36 -07:00
wilsonianb
05d98f4380 Generate master validator public key from master secret 2016-06-06 07:10:36 -07:00
wilsonianb
a187750b32 Include config manifest in server_info admin response (RIPD-1172) 2016-06-03 18:24:11 -07:00
MarkusTeufelberger
55377c12d3 Add build_all script to Builds:
This script will compile rippled, run unit tests and then delete all build
artifacts in many possible configurations (in Linux).

The script will automatically use all available cores to improve compile
speed. All commands are chained via &&, so if any of them fail, the script
will stop at the error.
2016-06-03 16:29:04 -07:00
Vinnie Falco
cd11f3755e Set version to 0.32.0-b17 2016-06-03 18:16:22 -04:00
Vinnie Falco
289c8c9f09 Refactor Server (RIPD-1120):
* Make Handler a template argument
2016-06-03 18:16:18 -04:00
Vinnie Falco
80a9a2bf5d Changes for Beast 1.0.0-b6 2016-06-03 17:54:29 -04:00
Vinnie Falco
1b0b8d7043 Merge subtree Beast 1.0.0-b6:
Merge commit '999e2fa0318b5982736d3ea01a418770ea802671'
2016-06-03 17:05:45 -04:00
Nik Bougalis
b81ec3545f Set version to 0.31.2 2016-06-03 09:05:22 -07:00
Vinnie Falco
999e2fa031 Set Beast version to 1.0.0-b6 2016-06-03 11:49:43 -04:00
Vinnie Falco
c060d08767 rfc7230 compliance, limits, and tests for basic_parser_v1:
New parser set_option function for controlling independent size limits
on headers and body. By default request and response parsers are set up
with reasonable limits to prevent resource exhaustion attacks.

* Parser adheres strictly to rfc7230
* Increased test coverage
* Headers and body maximum size limit options
2016-06-03 11:49:11 -04:00
The Gitter Badger
27ca1b2698 Add Gitter badge 2016-06-03 11:43:56 -04:00
Edward Hennis
75af4ed9b5 Change fee escalation algorithms (RIPD-1177):
* Minimum factor 256*500, don't multiply by base fee
* Change autofill fee behavior to pay the open ledger fee.
** Experimental options: x-assume-tx - assume <int> more transactions in
   the open queue when computing escalated fee, x-queue-okay - if true
   and escalated fee is over limit, try with load fee.
2016-06-02 15:50:17 -07:00
Nik Bougalis
1edc5e5ee0 Revert "Increase minimum local fee":
The code is no longer necessary, as the fee is now dynamically
adjusted using the new fee escalation logic.

This reverts commit 57625e06ed.
2016-06-01 14:52:50 -07:00
Nik Bougalis
28f90d17ac Set version to 0.31.1 2016-05-31 18:10:49 -07:00
Vinnie Falco
50b5dab5df Rename concept to DynamicBuffer (API change):
Conform to the Networking TS by renaming the Streambuf concept
to DynamicBuffer in all places. Values of types meeting the
requirements of DynamicBuffer are renamed to dynabuf.

See:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4478.html#requirements.dynamic_buffers

* Headers renamed
* Formal parameter names renamed
* Template argument types renamed
* Documentation updated
2016-05-28 18:39:18 -04:00
Vinnie Falco
8afdcb9e9f Add message swap members and free functions 2016-05-28 18:39:18 -04:00
Vinnie Falco
7e8f5401b2 Add HTTP field value parsers:
ext_list:
    Iterable container of comma separated extensions, where each extension
    is a token followed an optional list of semicolon delimited parameters,
    with each parameter consisting of a name / value pair. The value can
    be a token or quoted-string.

param_list:
    Iterable container of semicolon delimited parameters, where each parameter
    is a name / value pair. The value can be a token or quoted-string.

token_list
    Iterable container of comma delimited tokens.

* Remove obsolete rfc2616 functions

* Refactor and consolidate case-insensitive string helpers
2016-05-28 18:39:17 -04:00
Vinnie Falco
5a0a47cbae Tidy up use of GENERATING_DOCS 2016-05-28 07:59:34 -04:00
Vinnie Falco
bc2642f423 Use beast::error_code instead of nested types 2016-05-28 07:59:19 -04:00
Vinnie Falco
cd41a0decd Use SFINAE on return values 2016-05-28 07:59:17 -04:00
Vinnie Falco
803d145a5e Add CHANGELOG 2016-05-28 07:59:03 -04:00
Nicholas Dudfield
8303266430 Travis CI updates:
* Run autobahn/valgrind tests when target branch in {master, develop}
* Add coveralls
* Show full stacktrace for usan (RIPD-1150)
* Manual launch of coverage (RIPD-1152)
* Use lldb on Darwin (RIPD-1152)
* Set defaults if not CI (RIPD-1152)
* Add autobahn result parser (RIPD-1147)
2016-05-28 07:16:31 -04:00
seelabs
44e33121c7 Set version to 0.32.0-b16 2016-05-26 12:41:45 -04:00
seelabs
8a6ff4803c Set flowV2 switchover time 2016-05-26 12:41:43 -04:00
Miguel Portilla
abbf4b82b0 Consolidate RPC utility functions (RIPD-947) 2016-05-26 12:41:43 -04:00
Edward Hennis
9752268308 Standalone mode uses temp DB files by default (RIPD-1129):
* If a [database_path] is configured, it will always be used, and tables
  will be upgraded on startup.
2016-05-26 12:31:46 -04:00
Vinnie Falco
1fe983948f Set version to 0.32.0-b15 2016-05-25 15:08:52 -04:00
Nik Bougalis
39829a09cb Update test logging text for change in newlines 2016-05-25 15:05:32 -04:00
Vinnie Falco
3de738429f Changes for beast logging 2016-05-25 15:05:20 -04:00
Vinnie Falco
fa0ef25ffb Merge subtree Beast 1.0.0-b5
Merge commit 'a9e507da9b636d394bb43d6bf8002d013530f57a' into develop
2016-05-25 14:49:07 -04:00
Vinnie Falco
a9e507da9b Set Beast version to 1.0.0-b5 2016-05-25 12:00:25 -04:00
Vinnie Falco
20dfecd2b6 HTTP improvements:
* Increased code coverage

* New Body concepts:
    is_Body
    is_ReadableBody
    is_WritableBody
2016-05-25 12:00:14 -04:00
Vinnie Falco
eb7bd6a2f1 WebSocket ping, fixes, coverage:
* Improve test coverage
* tests for invokable in composed ops

* Update documentation
* Add License badge to README
* Target Windows 7 SDK and later
* Make role_type private
* Remove extra unused masking functions
* Allow stream reuse / reconnect after failure
* Restructure logic of composed operations
* Allow 0 for read_message_max meaning no limit
* Respect keep alive when building HTTP responses
* Check version in upgrade request
* Response with 426 status on unsupported WebSocket version
* Remove unnecessary Sec-WebSocket-Key in HTTP responses
* Rename to mask_buffer_size

* Remove maybe_throw
* Add ping, async_ping, async_on_pong
* Add ping_op
* Add pong_op
* Fix crash in accept_op
* Fix suspend in close_op
* Fix read_frame_op logic
* Fix crash in read_op
* Fix races in echo sync and async echo servers
2016-05-25 12:00:14 -04:00
Vinnie Falco
a570b74038 Fix parser off by one accessing buffer bug:
This fixed a bug where in some cases the parser could dereference
past the end of the caller provided buffer. The unit test is
improved to allocate memory in separate pieces for the split-buffer
matrix test, to give address-sanitizer more to work with.
2016-05-25 12:00:13 -04:00
Vinnie Falco
18c82465b2 Always flush reporter output stream on log 2016-05-25 12:00:13 -04:00
Vinnie Falco
d46db18a31 Update documentation:
* http parse functions
* Parser concept
* More detail on concepts
* Better hyperlinking
2016-05-25 12:00:13 -04:00
Vinnie Falco
5cf4f4a5e2 Fix resume of invokables in websocket composed operations:
When a suspended composed operation is resumed, the operation
now posts to the io_service to get in the correct context. Previously,
invokables resumed in the context of a different completion handler.

* asio_handler_invoke for any resumed invokable will return `true`.
2016-05-25 12:00:12 -04:00
seelabs
e3ee23bcfd Do not run coverage until all jobs have finished:
Sometimes lcov would report negative counts. This may be related to lcov
running while the job it was collecting counts for was also running.
This patch makes two changes: Do not run the coverage build under
gdb, and wait for all jobs to finish before running lcov.
2016-05-25 12:00:12 -04:00
Nik Bougalis
846cbf8c78 Set version to 0.32.0-b14 2016-05-24 12:44:06 -07:00
Miguel Portilla
b14555c742 Improve websocket send performance (RIPD-1158) 2016-05-24 12:40:27 -07:00
Miguel Portilla
154e90b1ca Fix StreambufWSMsg prepare (RIPD-1144).
Return value was set incorrect in some cases.
The buffer was not being prepared.
Add websocket log support.
2016-05-24 12:40:23 -07:00
Nik Bougalis
97c89168f7 Improve exception handling:
* Self-document the code by renaming Throw to Rethrow.
* Write a message to the debug log when we throw or
  rethrow an exception.
2016-05-24 12:37:46 -07:00
Nik Bougalis
a039e7593a Serialize access to the debug journal 2016-05-24 12:37:46 -07:00
Nik Bougalis
acebbf58eb Use only requested amount of aligned_storage 2016-05-24 12:37:46 -07:00
Nik Bougalis
84e3184106 Stricter validation of JSON input (RIPD-1100):
Passing in objects, arrays or non-string objects previously generated
nondescript errors. Improve the error messages returned to clients.

Add unit tests to ensure that incorrect inputs are reliably detected
and generate descriptive and accurate errors.
2016-05-24 12:29:00 -07:00
Scott Schurr
3a1fa4a552 Add "seed" to JSONRPC unit tests (RIPD-1099):
There was a bug in version 0.30.1 where signing with an ed25519
key and a corrupt seed would cause the "sign" and "sign_for"
commands to return an unexpected error.  That bug was fixed in
the 0.31.0 release.

These unit tests verify the fix.  The error message for a corrupt
seed is also slightly improved.
2016-05-24 12:29:00 -07:00
seelabs
1cf518e82c Set version to 0.32.0-b13 2016-05-24 12:36:41 -04:00
Nik Bougalis
951f479a1b Update README.md file (#1656) 2016-05-24 12:36:38 -04:00
Edward Hennis
a6e408510a Update ter documentation:
* terQUEUED txns can be forwarded.
2016-05-24 12:29:23 -04:00
wilsonianb
f2f195f43e Use sys.exit() in Manifests.py to run as program 2016-05-24 12:29:23 -04:00
seelabs
21c563f83a Fix false dry and other payment bugs:
The Owner count could decrease while evaluating a strand, causing
different behavior in forward passes and reverses passes. The fix treats
a decreased owner count like a deferred credit.

In some situations, deferred credits could cause an XRP balance to be
calculated as negative, triggering some asserts.

When XRP is used as a bridge currency, a path could be falsely marked as
dry. This happens when the XRP/XXX offer recursively checks the XXX/XRP
offer and the XXX/XRP offer could not satisfy the request in a single
call.

With a single strand and limit quality the old payment code incorrectly
computed with multiquailty set to true. This could cause the total
quality to go below the requested quality even if there was liquidity
available above the requested quality value.
2016-05-24 12:29:23 -04:00
seelabs
67b1acbf78 Resolve warnings:
Add boost to system path when compiling with clang.
Remove check for null for a var that can never be null.
2016-05-24 12:29:23 -04:00
wilsonianb
4ed6cbdd5b Get quorum and trusted master validator keys from validators.txt:
* Load specified [validators_file] relative to config dir
* Add default [validators_file] to rippled-example.cfg
* Remove [validators] and [validation_quorum] from rippled-example.cfg
* Add [validation_quorum] to validators-example.txt
* Allow validators.txt to be a symlink
* Throw for invalid [validators_file] instead of logging
* Trust own master public key from configured manifest
* Do not load untrusted manifests from database

Trusted validators are loaded from [validators] and [validator_keys]
sections from both rippled.cfg and validators.txt

Quorum is loaded from [validation_quorum] section in validators.txt
only if it is not configured in rippled.cfg
2016-05-24 12:29:23 -04:00
Edward Hennis
7e3dbce3d2 Access base_uint through public members (RIPD-898):
* Updates many (but probably not all) locations that access base_uint
  private storage.
* More calls to access base_uint through members.
* Use an iterator to write Serializer collections.
2016-05-24 10:37:01 -04:00
Edward Hennis
e38f01d1f4 Additional base_uint and stVector256 serialization tests 2016-05-24 10:36:54 -04:00
Nik Bougalis
32a01df0e1 Improve directory creation (RIPD-928):
* Simplify quality describer
* Use keylet instead of naked uint256
2016-05-24 10:29:17 -04:00
Nik Bougalis
814a8258fd Simplify Ledger fetching and construction:
* Remove single-use functions
2016-05-24 10:16:52 -04:00
Nicholas Dudfield
f3b2153ba7 Travis CI updates:
* Use clang 3.8
* Add msan/usan variants
* Build only gcc.coverage and clang.{asan,usan,msan}
* Make sure (correct) llvm-symbolizer is on PATH
2016-05-23 07:30:37 -04:00
Vinnie Falco
651fb45598 Refactor unit_test logging:
The log member is changed to derive from std::ostream. A new
class dstream is derived from std::ostream to support redirection
to the Visual Studio Output Window if a debugger is attached.

Obsolete classes abstract_ostream and its derived variants are
removed.
2016-05-23 07:30:37 -04:00
Vinnie Falco
b5dc8eb9ce Add dstream 2016-05-23 07:30:37 -04:00
Vinnie Falco
b12d1570a7 Set version to 0.32.0-b12 2016-05-12 19:26:21 -04:00
Vinnie Falco
cd38492ceb Changes for Beast 2016-05-12 19:24:35 -04:00
Vinnie Falco
411a12693d Merge subtree Beast 1.0.0-b4:
Merge commit 'c0952e54db7bd519440dc0611db7347cb048296d' into
2016-05-12 19:24:11 -04:00
Vinnie Falco
c0952e54db Set Beast version to 1.0.0-b4 2016-05-12 19:22:59 -04:00
seelabs
09c566a6eb Tidying and fix warnings 2016-05-12 19:22:00 -04:00
seelabs
97b1ac6eab Update CMakeLists for non-Windows platforms 2016-05-12 19:20:57 -04:00
Vinnie Falco
2a8de0fd6b Parser concept, fixes:
A new concept Parser is introduced with routines to read from a stream
into the parser. This solves a problem with the old read interface where
messages must be default constructible and move assignable.

Parser fixes:

* Fix detect invalid reason-phrase octets
* Fix write_eof to set the 'complete' state on success
* Fix consider parse complete if eof received on empty body

WebSocket:

* Increase coverage
2016-05-12 19:20:57 -04:00
Vinnie Falco
8921da91b8 Fixes, fail testing:
Core:

* Test buffer_cat iterator move members

HTTP:

* Fixed yield / resume in writer
* Fixed message serialization with chunked encoding

* Test yield / resume in writer
* Test all conditional branches during message serialization
* Test chunked encoding
* Increase coverage on parse_error
* Add parse_error::general

WebSocket:

* Add error::general
* Increase coverage in error
2016-05-12 19:20:57 -04:00
Vinnie Falco
2b69831f49 New constructors for message:
The message class now behaves like a pair with respect to the construction
of the body and headers. Additional constructors allow construction of
just the body portion from a tuple, leaving the headers default
constructed.

Previous constructors are removed as they were a notational convenience
for assembling HTTP/1 requests and responses. They are not necessary
as this library aims at library writers and not end users.
2016-05-12 19:20:55 -04:00
Howard Hinnant
e9f924ca31 Set version to 0.32.0-b11 2016-05-10 18:16:25 -04:00
Howard Hinnant
595912f82d Remove unused GenericScopedLock and GenericScopedTryLock.
* Update documentation of GenericScopedUnlock.
2016-05-10 17:38:38 -04:00
wilsonianb
ec1ffa2945 Publish all validation fields for signature verification:
Publish own validations to subscription stream
2016-05-10 17:38:38 -04:00
JoelKatz
45ff08b6aa Fix advisory delete affect on history acquisition (RIPD-1112):
* Revert 0efb929898
* Advisory delete setting of 0 (never) does not affect history fetching

The previous commit addressing RIPD-1112 could interact with
advisory delete and cause some history not to be acquired even
configured to acquire. This reverts that commit and provides
a better fix.

The advisory delete setting protects ledgers from being
removed by online delete by exempting them until they are
approved for purge by administrative command. However, not
connecting this with history acquisition could cause new
ledgers in the protected range not to be acquired if the
server loses sync.

With this change, the default advisory delete setting, zero (never)
causes the regular server history setting to control the acquisition
of history. Setting advisory delete to a value greater than zero,
if advisory delete is enabled, will cause the server to fetch and
maintain history back to that point.

This should produce sane behavior across server restarts, losses of
sync, and so on. You can no longer use the "hack" of setting
advisory delete to zero to tell the server to fetch and keep as much
history as possible, but you can achieve the same effect by setting
it to one.
2016-05-10 17:38:38 -04:00
Nik Bougalis
ab9e0c06b8 Log when number of available FDs is insufficient (RIPD-1125) 2016-05-10 17:38:38 -04:00
seelabs
c549c9dff0 Transfer fee changes:
An offer owner pays the transfer fee and only change a transfer fee
when transfering an IOU (as the old code does).
2016-05-10 17:38:37 -04:00
Miguel Portilla
d7a778ce6a Add support for Beast Websockets (RIPD-1097) 2016-05-10 17:38:37 -04:00
Nik Bougalis
f45e279e06 Run CircleCI unit tests under gdb 2016-05-10 17:38:37 -04:00
Nik Bougalis
4d19b8be07 Reject invalid MessageKey in SetAccount handler (RIPD-308, RIPD-990) 2016-05-10 17:38:37 -04:00
Nik Bougalis
2ae68923cc Remove unused legacy endpoint reporting 2016-05-10 17:38:36 -04:00
Nik Bougalis
d197c9780a Remove obsolete sendGetPeers support (RIPD-164) 2016-05-10 17:38:36 -04:00
Nik Bougalis
3d063edb72 Remove unused ECIES routines 2016-05-10 17:38:36 -04:00
Nik Bougalis
f081e80c28 Remove legacy arbitrary precision integer support:
The CBigNum class is a wrapper around OpenSSL's BIGNUM implementation
to make use simpler.

Replacing the implementation with boost::multiprecision helps reduce
the size of the codebase and improves performance (benchmarks show
the new boost-based implementation is ~7x faster).
2016-05-10 17:38:36 -04:00
Howard Hinnant
1c3ee48146 Install SHAMapInnerNodeV2
* Inner node optimization.
2016-05-10 17:38:35 -04:00
MarkusTeufelberger
e499e908d2 CI: get lcov from github
...instead of sourceforge.com (which seems to be in its final breaths)
2016-05-10 17:38:35 -04:00
Vinnie Falco
e0956c36c1 Tidy up core sources:
The core headers are moved to their own directory (but remain in
the same namespace).
2016-05-10 13:41:28 -04:00
Vinnie Falco
2893f8c82a Improvements to code coverage:
More tests and test cases are added to bring up
the percentage of library code covered by tests.
2016-05-10 13:41:27 -04:00
Vinnie Falco
036c3098f3 Tidy up test sources:
Test support classes are moved to beast/extras/test.
2016-05-10 13:41:26 -04:00
seelabs
24612eba4c Fix invalid access after async initiation 2016-05-10 13:41:26 -04:00
Vinnie Falco
6512b8894a Refactor extras:
A new directory extras/ is added, and code not part of the official
public Beast interface is moved there.
2016-05-10 13:41:26 -04:00
Vinnie Falco
1b44c9a3df Improvements to increase code coverage:
* Don't include the test code in coverage reports
* Add test code for missing coverage

Other:

* Improve the README.md
* Fix warning in sha1_context
* Tidy up the examples use of namespaces
* Various fixes to documentation and javadocs
2016-05-10 13:41:25 -04:00
Vinnie Falco
8499cc9767 websocket::stream fail testing 2016-05-10 13:41:25 -04:00
Vinnie Falco
d49faa0f5c Put echo peer logging on toggle, default to off 2016-05-10 13:41:25 -04:00
Vinnie Falco
258cd2cb87 Tidy up declarations and files:
* Adjust formatting
* Fix inline namespace warning in main.cpp
* Fix streambuf op ambiguous variadic constructor
* Rename variables for clarity
2016-05-10 13:41:24 -04:00
Vinnie Falco
7eed701682 Don't perform an extra clear 2016-05-10 13:41:24 -04:00
Vinnie Falco
e62b9dc4c1 Fix SHA1 calculation 2016-05-06 15:23:52 -04:00
Vinnie Falco
36ac1124f4 Set version to 0.32.0-b10 2016-05-06 14:53:33 -04:00
Vinnie Falco
ddb34f1ed1 Update for beast changes:
* Use simplified http::headers
* Use new beast::http::message:
  - Call beast::http::prepare
  - message::method is now a string
* Remove deprecated_http
2016-05-06 14:53:24 -04:00
Nicholas Dudfield
76b761d8e2 Adjustments to code coverage reports:
* src/beast is removed since it has its own coverage and CI integration.
2016-05-06 14:53:16 -04:00
Vinnie Falco
92b3cdb6f8 Merge subtree Beast 1.0.0-b3
Merge commit '47eb7fcc2f30df883b0036d97aac6a0fa90b0e9f'
2016-05-06 14:52:21 -04:00
Vinnie Falco
47eb7fcc2f Set Beast version to 1.0.0-b3 2016-05-06 14:51:41 -04:00
Vinnie Falco
6d8c73cc52 Tidy up tests, build scripts, and documentation:
* Concepts split up into individual files
* Function definitions moved to .ipp files
* Add more tests to fill gaps in coverage
* Fix documentation Xsl
2016-05-06 12:58:10 -04:00
Vinnie Falco
9e5e16c18d Distinguish HTTP/1 messages from general HTTP messages:
The version field is moved into message_v1, all public interfaces
are reworked to identify HTTP/1 wire format operations (suffix "_v1")
versus general HTTP.
2016-05-06 12:58:09 -04:00
Nicholas Dudfield
3af4cf0a28 Travis-CI additions:
* Address sanitizer target
* Code coverage target
* Results for codecov.io
2016-05-06 12:58:09 -04:00
seelabs
d6903efc0c Fix invokable order of invocation:
The call to the final handler in a composed operation MUST be
the last thing performed, as the handler may cause the end of
object lifetimes before it returns.
2016-05-05 11:22:13 -04:00
Vinnie Falco
9390eb016c WebSocket refactoring and tests:
websocket:

* Move echo server to test/
* Fix warnings
* Fix maskgen being uncopyable
* Simplify utf8_checker special member declarations
* Fix stream move assignable when owning the next layer
* Add javadocs for stream special members
* Add stream unit tests
* Move throwing member definitions to the .ipp file
* Use get_lowest_layer in stream declaration
* Perform type checks at each call site instead of constructor
* Demote close_code to a non-class enum:
    Otherwise, application specific close codes
    cannot be assigned without using static_cast.

core:

* Add streambuf_readstream special members tests
* Add move assignment operator to streambuf_readstream
* Add detail/get_lowest_layer trait
* Add static_string tests
* Move static_string from websocket to core
2016-05-05 11:22:13 -04:00
Vinnie Falco
47dc31d8c2 Refactor beast core, http, tests, and examples:
* Fix warnings
* Port cmake scripts to linux
* Add command line options for running test suites
* Add examples to CMakeLists
* Return std::uint64_t from writer::content_length
* basic_parser::write takes asio::const_buffer instead of pointer and size
* Turn message test back on now that it passes
* Rename to http::headers, use std::allocator, remove http_headers
* http::message::method is now a string
* Refactor to_string for ConstBufferSequence
* Remove chunk_encode from the public interface
* Initialize members for default constructed iterators
* Disallow default construction for dependent buffer sequences

Refactor http::message serialization:

* Serialization no longer creates a copy of the
  headers and modifies them
* New function prepare(), sets Connection, Transfer-Encoding,
  Content-Length based on the body attributes and caller options.
  Callers can use prepare() to have the fields set automatically,
  or they can set the fields manually.
* Use write for operator<<
* Tests for serialization
2016-05-05 11:22:12 -04:00
seelabs
f3c3e0bfff Fix destruction of basic_headers elements:
* Add missing call to destroy
* Use traits to destroy the element
2016-05-04 15:12:16 -04:00
Vinnie Falco
fbb5a753b1 Set version to 0.32.0-b9 2016-05-03 13:52:25 -04:00
Miguel Portilla
a1951aff02 Fix buffer to string conversion escaping vertical white space 2016-05-03 13:52:17 -04:00
Nik Bougalis
c28d36b500 Always run unit tests under gdb 2016-05-03 13:52:16 -04:00
JoelKatz
0efb929898 Fix history acquire check (RIPD-1112)
The various history acquire conditions were not combined
properly, resulting in historical ledgers being acquired
in cases where they should not be.
2016-05-03 13:52:16 -04:00
mDuo13
3f84dd8cf9 Add historical release notes through 0.30.1 2016-05-03 13:52:16 -04:00
Howard Hinnant
5d9e53a37d Migrate off of posix_time and most uses of C time_t. 2016-05-03 13:52:15 -04:00
Edward Hennis
2e2a7509cd Multiple transactions per account in TxQ (RIPD-1048):
* Tweak account XRP balance and sequence if needed before preclaim.
* Limit total fees in flight to minimum reserve / account balance.
* LastLedgerSequence must be at least 2 more than the current ledger to be queued.
* Limit 10 transactions per account in the queue at a time.
* Limit queuing multiple transactions after transactions that affect authentication.
* Zero base fee transactions are treated as having a fixed fee level of 256000 instead of infinite.
* Full queue: new txn can only kick out a tx if the fee is higher than that account's average fee.
* Queued tx retry limit prevents indefinitely stuck txns.
* Return escalation factors in server_info and _state when escalated.
* Update documentation.
* Update experimental config to only include the % increase.
* Convert TxQ metric magic numbers to experimental config.
2016-05-03 13:52:15 -04:00
Vinnie Falco
7f97b7bc05 Remove unused directory 2016-05-01 10:55:28 -04:00
Vinnie Falco
073ccf2705 Set version to 0.32.0-b8 2016-04-29 08:51:16 -04:00
Vinnie Falco
6d8b25fdf8 Use new beast::http::message: 2016-04-29 08:51:00 -04:00
Vinnie Falco
22f62af9be Merge subtree Beast 1.0.0-b2:
Merge commit '6c8b4b2f8dde72b01507e4ac7fde4ffea57ebc99'
2016-04-29 05:24:45 -04:00
Vinnie Falco
2a014df60d Merge Beast subtree:
Merge commit 'ba7031cb3b4840c1135515eccd77b002f2ceae9f'
2016-04-29 05:24:18 -04:00
Vinnie Falco
6c8b4b2f8d Set Beast version to 1.0.0-b2 2016-04-29 05:22:59 -04:00
Vinnie Falco
8dad543671 Add CMake scripts 2016-04-29 05:22:59 -04:00
Miguel Portilla
cf0cea38fd Add UTF8_checker unit test 2016-04-29 05:17:59 -04:00
Vinnie Falco
db7b65ed42 Various fixes, warnings:
* Fix sig_wait
* Fix websocket strict aliasing warning
* Fix invokable strict aliasing
* Silence fread warning in examples
* Silence integer conversion warnings
* Build parser-bench as test
* Disable unused variable warning for asio:
    Caused by static variables declared in <boost/asio/error.hpp>
    No known workaround.
2016-04-29 05:17:59 -04:00
Vinnie Falco
61a8f7f078 New header-only basic_parser:
The basic_parser is rewritten to be header-only. The nodejs parser is
removed from the include subtree and placed into the test directory.
Other changes:

* Parser specific error codes in parse_error.hpp
* Add parser-bench performance testing, nodejs vs beast
* New random message generator for fuzz tests
* Test for header-only parser using random message generator
* Augmented some existing message tests to check more cases
2016-04-29 05:17:59 -04:00
Nik Bougalis
e4f0b36f61 Set version to 0.32.0-b7 2016-04-26 18:00:58 -07:00
Nik Bougalis
b7c34d8a96 Improve validation of JSON-formatted ledgers during load 2016-04-26 17:59:29 -07:00
Nik Bougalis
b5dbd7942f Correctly handle connections that fail security checks (RIPD-1114):
* Return error code 400 to the peer along with a descriptive message
* Release the slot and decrement IP connection counters.
2016-04-26 17:59:28 -07:00
wilsonianb
5e5d5fdee4 Make wallet_propose seed generation consistent:
Allow 'seed' or 'seed_hex' if 'key_type' is not specified.
Use legacy passphrase seed generation if 'key_type' is specified.
2016-04-26 17:59:09 -07:00
Miguel Portilla
89c05efe22 Remove UTF8_checker from WSClient unit test. 2016-04-26 17:57:20 -07:00
Edward Hennis
e5bf824c3b Stricter checking on integer json inputs. 2016-04-26 17:57:20 -07:00
Edward Hennis
b509263ef5 Make fee command public (RIPD-1113) 2016-04-26 17:57:19 -07:00
seelabs
13ec104154 Update dependency scripts for Ubuntu 16.04 2016-04-26 17:57:19 -07:00
Vinnie Falco
4cfa1d5cd3 Add streambuf write():
This function performs serialization of a variable list of arguments
to a streambuf. It accepts a wide variety of argument types, using
boost::asio::buffer and boost::lexical_cast where possible.
2016-04-26 18:38:02 -04:00
Nik Bougalis
48396aebd1 Correctly handle validations with no LedgerSequence 2016-04-25 18:04:15 -07:00
Vinnie Falco
7cfdab936c Beast documentation work 2016-04-25 05:08:47 -04:00
Vinnie Falco
010444d77a Add WebSocket tests 2016-04-22 15:01:37 -04:00
Vinnie Falco
1c8c3207fe Set version to 0.32.0-b6 2016-04-22 12:56:22 -04:00
Vinnie Falco
ba7031cb3b Complete examples in beast html documentation 2016-04-22 12:49:02 -04:00
Vinnie Falco
7e88fdd0f1 Complete examples in beast html documentation 2016-04-22 12:49:02 -04:00
Vinnie Falco
af3d721f82 Reduce requirements to C++11 only 2016-04-22 11:59:03 -04:00
Vinnie Falco
e09249abad Reduce requirements to C++11 only 2016-04-22 11:59:03 -04:00
sublimator
0061f03cef Add Travis support 2016-04-22 11:38:11 -04:00
sublimator
53c82d54ea Add Travis support 2016-04-22 11:38:11 -04:00
Vinnie Falco
5602a24b22 Fix basic_streambuf:
prepare() is rewritten to operate more simply; the state of
the container is always consistent even between internal operations.
2016-04-21 15:17:04 -04:00
Vinnie Falco
f4cbb9d8e9 Fix basic_streambuf:
prepare() is rewritten to operate more simply; the state of
the container is always consistent even between internal operations.
2016-04-21 15:17:04 -04:00
Howard Hinnant
df82a734af Fix includes, remove unused type checks 2016-04-21 11:22:06 -04:00
Howard Hinnant
2179ea85f8 Fix includes, remove unused type checks 2016-04-21 11:22:06 -04:00
Vinnie Falco
f5299209d4 Set version to 0.32.0-b5 2016-04-20 13:15:00 -04:00
Vinnie Falco
ca2384f230 beast doc/test work 2016-04-20 12:01:26 -04:00
Vinnie Falco
9c88f76338 beast doc/test work 2016-04-20 12:01:26 -04:00
Vinnie Falco
f07cd8ceb4 Reorganize source files 2016-04-20 12:01:25 -04:00
Vinnie Falco
4469ff4b9a Reorganize source files 2016-04-20 12:01:25 -04:00
Vinnie Falco
54f6f0ceba Beast.WebSocket:
Beast.WebSocket provides developers with a robust WebSocket
implementation built on Boost.Asio with a consistent asynchronous
model using a modern C++ approach.
2016-04-20 12:01:24 -04:00
Vinnie Falco
2cb3834bbb Beast.WebSocket:
Beast.WebSocket provides developers with a robust WebSocket
implementation built on Boost.Asio with a consistent asynchronous
model using a modern C++ approach.
2016-04-20 12:01:24 -04:00
Vinnie Falco
2e302a43aa Add SHA1 algorithm 2016-04-20 12:01:23 -04:00
Vinnie Falco
5e8d028da2 Add SHA1 algorithm 2016-04-20 12:01:23 -04:00
Vinnie Falco
8b62c23ab6 Beast.HTTP:
New classes are introduced to represent HTTP messages and their
associated bodies. The parser interface is reworked to use CRTP,
error codes, and trait checks.

New classes:

* basic_headers

  Models field/value pairs in a HTTP message.

* message

  Models a HTTP message, body behavior defined by template argument.
  Parsed message carries metadata generated during parsing.

* parser

  Produces parsed messages.

* empty_body, string_body, basic_streambuf_body

  Classes used to represent content bodies in various ways.

New functions:

* read, async_read, write, async_write

  Read and write HTTP messages on a socket.

New concepts:

* Body: Represents the HTTP Content-Body.
* Field: A HTTP header field.
* FieldSequence: A forward sequence of fields.
* Reader: Parses a Body from a stream of bytes.
* Writer: Serializes a Body to buffers.

basic_parser changes:

* add write methods which throw exceptions instead
* error_code passed via parameter instead of return value
* fold private member calls into existing callbacks
* basic_parser uses CRTP instead of virtual members
* add documentation on Derived requirements for CRTP

impl/http-parser changes:

* joyent renamed to nodejs to reflect upstream changes
2016-04-20 12:01:15 -04:00
Vinnie Falco
bcbe22c780 Beast.HTTP:
New classes are introduced to represent HTTP messages and their
associated bodies. The parser interface is reworked to use CRTP,
error codes, and trait checks.

New classes:

* basic_headers

  Models field/value pairs in a HTTP message.

* message

  Models a HTTP message, body behavior defined by template argument.
  Parsed message carries metadata generated during parsing.

* parser

  Produces parsed messages.

* empty_body, string_body, basic_streambuf_body

  Classes used to represent content bodies in various ways.

New functions:

* read, async_read, write, async_write

  Read and write HTTP messages on a socket.

New concepts:

* Body: Represents the HTTP Content-Body.
* Field: A HTTP header field.
* FieldSequence: A forward sequence of fields.
* Reader: Parses a Body from a stream of bytes.
* Writer: Serializes a Body to buffers.

basic_parser changes:

* add write methods which throw exceptions instead
* error_code passed via parameter instead of return value
* fold private member calls into existing callbacks
* basic_parser uses CRTP instead of virtual members
* add documentation on Derived requirements for CRTP

impl/http-parser changes:

* joyent renamed to nodejs to reflect upstream changes
2016-04-20 12:01:15 -04:00
Vinnie Falco
3461bafaa2 Beast.Asio:
New classes:

  class async_completion:
    Helper class for implementing asynchronous initiation functions.
    See n3964:
        Library Foundations for Asynchronous Operations, Revision 1
        http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3964.pdf

  class basic_streambuf:
    Meets the requirements of Streambuf.

  class buffered_readstream:
    Buffers a ReadStream with a ConstBufferSequence.

  class consuming_buffers:
    Adapts a BufferSequence which wraps the underlying buffer
    sequence and presents fewer bytes, with the retained bytes
    occurring at the end of the sequence.

  class handler_alloc:
    A C++ Allocator the uses asio handler allocation hooks.

  class static_streambuf:
    An implementation of the Streambuf concept that uses a
    fixed size buffer with size determined at compile-time.

  class streambuf_readstream:
    Buffers a ReadStream with a Streambuf.

New functions:

  append_buffers()
    Returns a new BufferSequence which efficiently concatenates
    two or more buffer sequences together.

  prepare_buffers()
    Shortens a buffer sequence. The bytes excluded are at the
    end of the underlying buffer sequence.

  boost::asio::read_until()
    A copy of boost::asio::read_until overloads, modified to work
    with a beast::asio::basic_streambuf.

Debugging:

  buffers_to_string()

    Convert a ConstBufferSequence to a human readable string
    suitable for diagnostics.

type_check.h:

  Metafunctions for checking asio concepts:
    AsyncReadStream, AsyncWriteStream
    SyncReadStream, SyncWriteStream
    ConstBufferSequence, MutableBufferSequence
    Streambuf
    Handler

Changes:

* All symbols moved up a namespace level.
* streambuf provides all move and copy special members,
  behavior of moved from objects is well-defined.

Fixes:

* Fix basic_streambuf iterator category.
2016-04-20 05:16:38 -04:00
Vinnie Falco
f25b448a49 Beast.Asio:
New classes:

  class async_completion:
    Helper class for implementing asynchronous initiation functions.
    See n3964:
        Library Foundations for Asynchronous Operations, Revision 1
        http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3964.pdf

  class basic_streambuf:
    Meets the requirements of Streambuf.

  class buffered_readstream:
    Buffers a ReadStream with a ConstBufferSequence.

  class consuming_buffers:
    Adapts a BufferSequence which wraps the underlying buffer
    sequence and presents fewer bytes, with the retained bytes
    occurring at the end of the sequence.

  class handler_alloc:
    A C++ Allocator the uses asio handler allocation hooks.

  class static_streambuf:
    An implementation of the Streambuf concept that uses a
    fixed size buffer with size determined at compile-time.

  class streambuf_readstream:
    Buffers a ReadStream with a Streambuf.

New functions:

  append_buffers()
    Returns a new BufferSequence which efficiently concatenates
    two or more buffer sequences together.

  prepare_buffers()
    Shortens a buffer sequence. The bytes excluded are at the
    end of the underlying buffer sequence.

  boost::asio::read_until()
    A copy of boost::asio::read_until overloads, modified to work
    with a beast::asio::basic_streambuf.

Debugging:

  buffers_to_string()

    Convert a ConstBufferSequence to a human readable string
    suitable for diagnostics.

type_check.h:

  Metafunctions for checking asio concepts:
    AsyncReadStream, AsyncWriteStream
    SyncReadStream, SyncWriteStream
    ConstBufferSequence, MutableBufferSequence
    Streambuf
    Handler

Changes:

* All symbols moved up a namespace level.
* streambuf provides all move and copy special members,
  behavior of moved from objects is well-defined.

Fixes:

* Fix basic_streambuf iterator category.
2016-04-20 05:16:38 -04:00
Vinnie Falco
874bbd0b8a C++17 compatibility:
* std::void_t
* std::bool_constant
2016-04-20 05:16:37 -04:00
Vinnie Falco
73ddda4651 C++17 compatibility:
* std::void_t
* std::bool_constant
2016-04-20 05:16:37 -04:00
Vinnie Falco
a433804ee6 unit_test::suite fix warning 2016-04-20 05:16:33 -04:00
Vinnie Falco
08171dad5e unit_test::suite fix warning 2016-04-20 05:16:33 -04:00
Vinnie Falco
f60eeaf08c unit_test::thread fixes:
* Fail on exception in unit_test::thread
* Add unit_test:🧵:detach()
2016-04-20 05:16:32 -04:00
Vinnie Falco
7b3550c46e unit_test::thread fixes:
* Fail on exception in unit_test::thread
* Add unit_test:🧵:detach()
2016-04-20 05:16:32 -04:00
Vinnie Falco
db8fb177b8 Remove unused or obsolete classes and files 2016-04-20 05:16:32 -04:00
Vinnie Falco
203739f7a4 Remove unused or obsolete classes and files 2016-04-20 05:16:32 -04:00
Nik Bougalis
735c341fae Set version to 0.32.0-b4 2016-04-19 17:17:46 -07:00
Edward Hennis
7bb9264c3d Update Travis to Boost 1.60 2016-04-19 17:17:32 -07:00
seelabs
4b8d227922 Better numerical stability for deferred credits:
Before this change, the deferred credits algorithm took the current
balance and subtracted the recorded credits. Conceptually, this is the
same as taking the original balance, adding all the credits,
subtracting all the debits, and subtracting all the credits. The new
algorithm records the original balance and subtracts the debits. This
prevents errors that occur when the original balance and the recorded
credits have large differences in magnitude.

Additionally, XRP credits were recorded incorrectly in the deferred
credits table (the line was between the sender and receiver, rather than
the root account).
2016-04-19 17:17:23 -07:00
Nik Bougalis
4124850481 Merge remote-tracking branch 'upstream/release' into develop 2016-04-19 17:17:08 -07:00
Nik Bougalis
637fee5ecc Set version to 0.31.0 2016-04-19 17:01:48 -07:00
Nik Bougalis
47eb4da080 Check file handle limit on startup (RIPD-442, RIPD-1024):
Calculate the number of file descriptors that are needed during
execution based on the configuration file, with a hard floor
of 1024, adjusting the limit if possible. Refuse to run if enough
fds are not available.

Additionally, allow administrators to limit the number of incoming
connections a configured port will accept. By default no limit is
imposed.
2016-04-19 17:01:33 -07:00
Nik Bougalis
79ca82c078 Improve watchdog start logic 2016-04-19 17:01:25 -07:00
Miguel Portilla
d2a787805a Fix secured Websocket closing.
Websocketpp was incorrectly handling close before or during protocol negotiation. This issue addresses lingering CLOSE_WAIT file descriptors.
2016-04-19 17:01:15 -07:00
David Schwartz
d2071b7ea7 Small Websocket cleanups. 2016-04-19 17:01:09 -07:00
Edward Hennis
61ba1743ef Lock Appveyor CI build to scons 2.5.0
* Workaround for misbehaving 2.5.0.post1, and can be reverted if the next version works better.
2016-04-19 16:53:07 -04:00
Vinnie Falco
d60426a19f .gitignore: VS Update 2 database files 2016-04-19 16:50:44 -04:00
Vinnie Falco
a88bc564ee .gitignore: VS Update 2 database files 2016-04-19 16:50:44 -04:00
Nik Bougalis
a5d5856638 Set version to 0.31.0 2016-04-18 14:23:18 -07:00
Nik Bougalis
4e64e3f1dd Check file handle limit on startup (RIPD-442, RIPD-1024):
Calculate the number of file descriptors that are needed during
execution based on the configuration file, with a hard floor
of 1024, adjusting the limit if possible. Refuse to run if enough
fds are not available.

Additionally, allow administrators to limit the number of incoming
connections a configured port will accept. By default no limit is
imposed.
2016-04-18 14:23:18 -07:00
Nik Bougalis
51850ded05 Improve watchdog start logic 2016-04-18 14:23:17 -07:00
Miguel Portilla
76d7c1c01a Fix secured Websocket closing.
Websocketpp was incorrectly handling close before or during protocol negotiation. This issue addresses lingering CLOSE_WAIT file descriptors.
2016-04-18 14:23:00 -07:00
David Schwartz
dabc5567f7 Small Websocket cleanups. 2016-04-18 14:23:00 -07:00
Nik Bougalis
5c5ee6f763 Set version to 0.31.0-rc2 2016-04-01 14:32:00 -07:00
Nik Bougalis
06bfcad671 Validate the tx_json field in sign_for (RIPD-1100) 2016-04-01 14:31:40 -07:00
Nik Bougalis
73e48e6595 Only object instances can have members (RIPD-1100) 2016-04-01 14:31:34 -07:00
Nik Bougalis
64a005565d Set version to 0.32.0-b3 2016-04-01 10:51:07 -07:00
Nik Bougalis
aa5098866c Remove unused HTTPRequest class 2016-04-01 10:18:07 -07:00
Nik Bougalis
60ff83f280 Validate the tx_json field in sign_for (RIPD-1100) 2016-04-01 10:18:07 -07:00
Nik Bougalis
8dbad62153 Only object instances can have members (RIPD-1100) 2016-04-01 10:18:07 -07:00
Nik Bougalis
4a78b343d9 Annotate Throw functions as noreturn 2016-04-01 10:18:07 -07:00
Nik Bougalis
ab8102f927 Warn if a low-entropy passphrase is used to create a wallet 2016-04-01 10:18:07 -07:00
wilsonianb
fa02409c92 Include amendments in validations subscription 2016-04-01 10:18:07 -07:00
wilsonianb
3a45ef0e65 Test on CircleCI with Boost 1.60:
* Run on Ubuntu 14.04
* Do not build Docker images
2016-04-01 10:18:07 -07:00
Edward Hennis
f2cdeb7d9a Simplify Transaction ordering unit test 2016-03-31 18:46:21 -07:00
JoelKatz
ff7a2c63f2 Remove unused fields
These fields were likely added in error. They are
needed in the corresponding transaction formats but
not in the ledger formats.
2016-03-31 18:44:33 -07:00
Miguel Portilla
efe4c9cae3 Convert throws to Throws. 2016-03-31 18:43:49 -07:00
Miguel Portilla
c37261858a Normalize WSClient JSON output (RIPD-1095):
JSON returned from the WSClient is normalized to resemble JSON-RPC
output, to make unit tests agnostic to the transport used.
2016-03-31 18:43:13 -07:00
seelabs
ef3dc5bb58 Return unfunded and expired offers when flow fails:
Payments do not remove unfunded and expired offers when a payment
fails. However, offer crossing is now using the payment engine and needs
to know what offers were found in a removable state, even on failure.
2016-03-31 18:42:55 -07:00
seelabs
968327d577 Set version to 0.32.0-b2 2016-03-23 15:32:29 -04:00
Vinnie Falco
eedf724ccd Fix streambuf::prepare:
In some edge cases, calling prepare could leave the output
sequence with the incorrect size. This happens when out_end_
is non-zero and the call to prepare should leave out_end_ at 0.
2016-03-23 15:32:26 -04:00
Vinnie Falco
bf3f33f8cb Fix streambuf::prepare:
In some edge cases, calling prepare could leave the output
sequence with the incorrect size. This happens when out_end_
is non-zero and the call to prepare should leave out_end_ at 0.
2016-03-23 15:32:26 -04:00
seelabs
271feb02b8 Add command-line switch to enable asserts 2016-03-23 15:32:26 -04:00
seelabs
f254ebb4ca Improve BookStep precision:
A computation like: `amount_remaining = amount_wanted - amount_got`, can
leave `amount_remaining == 0` without `amount_wanted == amount_got`.
This happens if the amounts differ by less than the smallest
representable value. Fix BookStep to handle this case.
2016-03-23 15:32:26 -04:00
Scott Schurr
c9f1966e08 Remove Env::disable_testing() stub 2016-03-23 15:32:26 -04:00
wilsonianb
095f85f159 List all trusted validator keys under single config section:
Trusted master public keys can be listed under either [validators] or
[validator_keys] config sections. All keys listed under [validators] are
added to permanent trusted keys list regardless of key type.

A master public key is moved from permanent key list to manifest cache
when one of its manifests is received. This allows rippled operators to
list all trusted keys under the [validators] config section.
2016-03-23 15:30:56 -04:00
Howard Hinnant
fdd2740f8b Align mutex and condition_variable 2016-03-23 15:24:15 -04:00
Edward Hennis
8268162cac Fix SHAMapStore test timing consistency 2016-03-18 15:01:32 -04:00
seelabs
30eff2b520 Set version to 0.32.0-b1 2016-03-17 17:36:30 -04:00
wilsonianb
d3962718aa Mark validations as full or partial:
Set kFullFlag in STValidation constructor and include validation
type (full or partial) in subscription stream.
2016-03-17 17:35:39 -04:00
Scott Schurr
388fd1262a Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors
in order to make Journal lighter weight.  The change makes a
Journal cheaper to pass by value.

Also add missing stream checks (e.g., calls to JLOG) to avoid
text processing that ultimately will not be stored in the log.
2016-03-17 17:35:06 -04:00
Scott Schurr
7a4bd2278d Access Journal::Stream using member functions (RIPD-1087):
Replace Journal public data members with member function accessors
in order to make Journal lighter weight.  The change makes a
Journal cheaper to pass by value.

Also add missing stream checks (e.g., calls to JLOG) to avoid
text processing that ultimately will not be stored in the log.
2016-03-17 17:35:06 -04:00
Miguel Portilla
b3f5986c83 Charge pathfinding consumers per source currency (RIPD-1019):
The IP address used to perform pathfinding operations is now charged an
additional resource increment for each source currency in the path set.

* NOTE: This charge is a local resource charge, not a transaction fee
  charge.
2016-03-17 17:35:06 -04:00
Miguel Portilla
48d28826d0 Pathfinding cleanup 2016-03-17 17:35:06 -04:00
seelabs
122a5cdf89 Add V2 implementation of payments:
Add a new algorithm for finding the liquidity in a payment path. There
is still a reverse and forward pass, but the forward pass starts at the
limiting step rather than the payment source. This insures the limiting
step is completely consumed rather than potentially leaving a 'dust'
amount in the forward pass.

Each step in a payment is either a book step, a direct step (account to
account step), or an xrp endpoint. Each step in the existing
implementation is a triple, where each element in the triple is either
an account of a book, for a total of eight step types.

Since accounts are considered in pairs, rather than triples, transfer
fees are handled differently. In V1 of payments, in the payment path
A -> gw ->B, if A redeems to gw, and gw issues to B, a transfer fee is
changed. In the new code, a transfer fee is changed even if A issues to
gw.
2016-03-17 17:34:37 -04:00
seelabs
f3e93bbbeb Add operator!= to STPathElement 2016-03-17 17:34:24 -04:00
seelabs
6d2f7e46dd Add IOU/XRP Amount support to Offers 2016-03-17 17:34:08 -04:00
seelabs
3d9589f010 Add IOU and XRP Amounts 2016-03-17 17:31:47 -04:00
Miguel Portilla
906ef761ba Set version to 0.31.0-rc1 2016-03-15 15:12:35 -04:00
Miguel Portilla
6b87a67592 Merge remote-tracking branch 'upstream/release' into develop 2016-03-15 15:10:05 -04:00
Edward Hennis
e16361826e Set version to 0.31.0-b14 2016-03-10 15:02:04 -05:00
Edward Hennis
a327cecee6 Create new Validations columns properly:
* Thread-safe preparation of Validations cleanup query
* Followup to RIPD-870
2016-03-10 14:57:59 -05:00
Vinnie Falco
64d9f7c23e Set version to 0.31.0-b13 2016-03-09 17:48:58 -05:00
Vinnie Falco
4f16a1cee9 Disable SHAMapStore test:
The test depends on an asynchronous operation completing
in a certain time, failing periodically due to timing.
2016-03-09 17:47:37 -05:00
Miguel Portilla
8f83f69325 RPC robust transaction unit test (RIPD-1079) 2016-03-09 16:23:26 -05:00
Miguel Portilla
1d0ca51c88 RPC book unit test (RIPD-1077) 2016-03-09 16:23:25 -05:00
Miguel Portilla
ca70f4fab1 RPC subscribe unit test (RIPD-1076) 2016-03-09 16:23:25 -05:00
Miguel Portilla
72cdf3f555 Improve held transaction submission:
Removed redundant validity checks for held transactions in NetworkOPsImp::apply.
2016-03-09 16:23:24 -05:00
Miguel Portilla
1c68fddad7 Subscribe cleanup 2016-03-09 16:23:24 -05:00
Miguel Portilla
2f3b5f6d0a Log websocket received messages 2016-03-09 16:23:24 -05:00
Miguel Portilla
5663c45a0d Add jtx::json string constructor 2016-03-09 16:23:23 -05:00
Miguel Portilla
172356d299 Add JobCoro destructor completion assert
Make JobCoro non copyable
2016-03-09 16:23:23 -05:00
Vinnie Falco
2323ea4493 Add WSClient 2016-03-09 16:23:23 -05:00
Vinnie Falco
d6a666f4e0 Add wsproto 2016-03-09 16:23:22 -05:00
Vinnie Falco
6e70a6c6f5 Remove 'skip on stop' job attribute 2016-03-09 16:23:22 -05:00
Vinnie Falco
b82be0a9b0 Skip websocket commands on stop 2016-03-09 16:23:22 -05:00
Vinnie Falco
94a47569d6 Check suspended coros for JobQueue stop condition 2016-03-09 16:23:21 -05:00
Vinnie Falco
73df97f2d0 Add JobQueue::rendezvous 2016-03-09 16:23:21 -05:00
Vinnie Falco
e8b75b80c2 Remove obsolete JobQueue thread tracking 2016-03-09 16:23:21 -05:00
Vinnie Falco
f6bec473d5 Reduce the runtime of nudb.recover test 2016-03-09 16:23:20 -05:00
Vinnie Falco
9ab5611c65 Fix destructor race in Job 2016-03-09 16:23:20 -05:00
Vinnie Falco
92391332d7 Reduce the runtime of nudb.recover test 2016-03-09 16:23:20 -05:00
Vinnie Falco
8e26b187be Set TCP_NODELAY on plain, loopback JSONRPC clients 2016-03-09 16:23:20 -05:00
Vinnie Falco
79ce5901f3 Improved write buffering in JSONRPC client 2016-03-09 16:23:19 -05:00
Vinnie Falco
29a4849024 Improve socket writes in BaseHTTPPeer 2016-03-09 16:23:19 -05:00
Nik Bougalis
0a1731c4c9 Assign non-default Rules correctly 2016-03-09 13:48:12 -05:00
Nik Bougalis
5cac2befb0 Avoid deriving a known PublicKey 2016-03-09 13:32:16 -05:00
Vinnie Falco
be60348f8f Update parser for http-parser:
* Remove unused raw_parser
* C++ parser wrapper is updated
2016-03-08 12:01:41 -05:00
Vinnie Falco
e6d4436e9d Update parser for http-parser:
* Remove unused raw_parser
* C++ parser wrapper is updated
2016-03-08 12:01:41 -05:00
Vinnie Falco
c4e9a464e7 Update http-parser subtree:
Source: https://github.com/nodejs/http-parser/commits/master
Commit: fd65b0fbbdb405425a14d0e49f5366667550b1c2
Merge commit '404d58d77c3ecbea68e0bd4fa1e7ff4b7c000fc5' into parser
2016-03-04 12:27:24 -05:00
Vinnie Falco
16b1adfa86 Update http-parser subtree:
Source: https://github.com/nodejs/http-parser/commits/master
Commit: fd65b0fbbdb405425a14d0e49f5366667550b1c2
Merge commit '404d58d77c3ecbea68e0bd4fa1e7ff4b7c000fc5' into parser
2016-03-04 12:27:24 -05:00
Vinnie Falco
404d58d77c Squashed 'src/beast/beast/http/impl/http-parser/' changes from cba704c..fd65b0f
fd65b0f src: refactor method parsing
678a9e2 test: Assert against correct error messages
e2e467b Update http-parser to 2.6.1
4e382f9 readme: fix build status badge
bee4817 Bump version to 2.6.0
777ba4e src: introduce `http_parser_url_init`
483eca7 doc: updated README.md to include multi-threading example
e557b62 src: support LINK/UNLINK (RFC 2068, draft-snell-link-method)
e01811e src: fixed compile error C2143 for vs2012
b36c2a9 header: treat Wine like MinGW
eb5e992 src: support ACL (WebDAV, RFC3744, Section 8.1).
4f69be2 readme: update WebSocket link to RFC6455
b5bcca8 test: `SEARCH`, `PURGE` and `MKCALENDAR`
8b1d652 src: support BIND/REBIND/UNBIND (WebDAV, RFC5842)
7d75dd7 src: support IPv6 Zone ID as per RFC 6874
ab0b162 src: use ARRAY_SIZE instead of sizeof()
39ff097 src: remove double check
f6f436a src: fix invalid memory access in http_parse_host
2896229 make: fix dynamic library extension for OS X
39c2c1e Bump version to 2.5.0
dff604d src: support body in Upgrade requests
d767545 src: callbacks chunk boundaries: header/complete
2872cb7 test: regression test for incomplete/corrupted hdr
5d414fc makefile: add un/install targets
d547f3b url_parser: remove mixed declarations
7ecf775 src: partially revert 959f4cb to fix nread value
7ba3123 header: fix field sizes
53063b7 Add function to initialize http_parser_settings
1b31580 Bump version to 2.4.2
59569f2 src: skip lws between `connection` values
36f107f Bump version to 2.4.1
280af69 src: fix build on MSVC
956c8a0 Bump version to 2.4.0
167dcdf readme: fix typo
3f7ef50 src: annotate with likely/unlikely
265f9d0 bench: add chunked bytes
091ebb8 src: simple Connection header multi-value parsing
959f4cb src: remove reexecute goto
0097de5 src: use memchr() in h_general header value
c6097e1 src: faster general header value loop
2630060 src: less loads in header_value loop
0cb0ee6 src: tighten header field/value loops
6132d1f src: save progress
3f1a05a benchmark: initial
94a55d1 send travis irc notifications to #node-ci
5fd51fd Fix warning on test suite found by Clang Analyzer
0b43367 http_parser: Follow RFC-7230 Sec 3.2.4
11ecb42 Docs fix
7bbb774 doc: add very basic docs for `http_parser_execute`
17ed7de header: typo fix in a comment
5b951d7 src: fix clang warning
1317eec Added support for MKCALENDAR
08a2cc3 very minor spelling/grammar changes in README.md
158dd3b signing the CLA is no longer a requirement
8d9e5db fix typo in README comment
d19e129 contrib: fixed resource leak in parsertrace
24e2d2d Allow HTTP_MAX_HEADER_SIZE to be defined externally
56f7ad0 Bump version to 2.3.0
76f0f16 Fix issues around multi-line headers
5d9c382 Include separating ws when folding header values

git-subtree-dir: src/beast/beast/http/impl/http-parser
git-subtree-split: fd65b0fbbdb405425a14d0e49f5366667550b1c2
2016-03-04 12:26:41 -05:00
Nik Bougalis
6c712ff2df Set version to 0.31.0-b12 2016-03-03 13:16:06 -08:00
Scott Schurr
e3414bf042 Test how beast::is_call_possible<> handles const-ness. 2016-03-03 13:16:02 -08:00
Scott Schurr
308aaa6f78 Test how beast::is_call_possible<> handles const-ness. 2016-03-03 13:16:02 -08:00
Edward Hennis
eb62959216 Clear old Validations during online delete (RIPD-870):
* Add Validations.LedgerSeq and .InitialSeq fields.
* Clean up logging.
* Lower online delete minimum for standalone mode.
* Unit tests of online_delete.
2016-03-03 13:16:02 -08:00
JoelKatz
70d5c4eca7 Avoid passing SHAMapNodeID's to sync filters 2016-03-03 13:10:28 -08:00
Nik Bougalis
a025d365b8 Verify that returned RPC codes are known 2016-03-03 13:05:11 -08:00
Nik Bougalis
89fa10b40b Add description of rpcSENDMAX_MALFORMED error 2016-03-03 13:05:04 -08:00
Nik Bougalis
34e85ccb62 Refactor treatment of Ledger:
All handling of Ledger in shared_ptr is modified to
use a const managed object when the context requires
immutable semantics.
2016-03-03 13:02:13 -08:00
Nik Bougalis
77a4218a9e Set version to 0.31.0-b11 2016-02-29 13:46:37 -05:00
seelabs
93bcdf5318 Chrono fixes for VS Update 2 2016-02-29 13:42:55 -05:00
seelabs
d8ee487c19 Fix underflow issue for XRP:
In some cases multiplying or dividing STAmounts gave incorrect results.

This happens when:

1) The result should be rounded up
2) The STAmount represents a native value (XRP)
3) The rounded up value was less than one drop

In this case, the result was zero, instead of one drop. This could
cause funded offers to be removed as unfunded.
2016-02-29 13:42:55 -05:00
Nik Bougalis
bac303273f Report slow stop times only in release builds 2016-02-29 13:42:55 -05:00
seelabs
3605bf1f60 Chrono fixes for VS Update 2 2016-02-29 13:42:55 -05:00
Scott Schurr
7c2e5f3ac8 Cleanups in beast::Journal:
The Journal API is affected.  There are two uses for the
Journal::Severity enum:

 o It is used to declare a threshold which log messages must meet
   in order to be logged.

 o It declares the current logging level which will be compared
   to the threshold.

Those uses that affect the threshold are now named threshold()
rather than severity() to make the uses easier to distinguish.

Additionally, Journal no longer carries a Severity variable.
All handling of the threshold() is now delegated to the
Journal::Sink.

Sinks are no longer constructed with a default threshold of
kWarning; their threshold must be passed in on construction.
2016-02-29 13:42:55 -05:00
Nik Bougalis
d3b43bfa37 Report slow stop times only in release builds 2016-02-29 13:42:55 -05:00
Nik Bougalis
bf6079797f Simplify logging:
* Construct Logs with the correct severity
* Remove deprecatedLogs and log squelching support
* Use debugJournal for AutoSocket logging
2016-02-29 13:42:55 -05:00
Scott Schurr
6366f62f11 Cleanups in beast::Journal:
The Journal API is affected.  There are two uses for the
Journal::Severity enum:

 o It is used to declare a threshold which log messages must meet
   in order to be logged.

 o It declares the current logging level which will be compared
   to the threshold.

Those uses that affect the threshold are now named threshold()
rather than severity() to make the uses easier to distinguish.

Additionally, Journal no longer carries a Severity variable.
All handling of the threshold() is now delegated to the
Journal::Sink.

Sinks are no longer constructed with a default threshold of
kWarning; their threshold must be passed in on construction.
2016-02-29 13:42:55 -05:00
Nik Bougalis
427c33dbd7 Set version to 0.30.1-hf2 2016-02-26 15:58:09 -08:00
seelabs
675cbb72a6 Fix underflow issue for XRP:
When specifying that a result should be rounded up,
the code rounded up to a value suitable for a non-xrp
amount. When called with an xrp amount, if that rounded-up
value was less than one drop, the code rounded down to zero.

This could cause funded offers to be removed as unfunded.
2016-02-26 15:57:39 -08:00
Vinnie Falco
f846b1a88f Set version to 0.31.0-b10 2016-02-25 13:57:10 -05:00
Vinnie Falco
4bfcd12897 Disable Rules assignment in Ledger::setup:
This is a temporary fix for a thread-unsafe access.
2016-02-25 13:57:04 -05:00
Nik Bougalis
d736232142 Pathfinding cleanup:
* Remove unused code
* Do not use `pointer` and `ref` type aliases
* Misc. cleanups
2016-02-25 13:38:46 -05:00
Scott Schurr
9cb02028ed Increase JLOG usage. 2016-02-25 13:38:45 -05:00
Scott Schurr
0703441ee7 Extend View.cpp unit test coverage. 2016-02-25 13:34:58 -05:00
Vinnie Falco
2c3128d9ba Ignore error on socket shutdown 2016-02-25 13:34:57 -05:00
Vinnie Falco
7837eed21b Disable Rules assignment in Ledger::setup:
This is a temporary fix for a thread-unsafe access.
2016-02-22 14:40:44 -05:00
Nik Bougalis
db092449f9 Set version to 0.31.0-b9 2016-02-18 13:54:15 -08:00
Nik Bougalis
d321b446db Remove tracking by public key in Overlay 2016-02-18 13:54:10 -08:00
Nik Bougalis
78ce7a08c0 Return correct error code during unfunded offer cross (RIPD-1082):
When placing an offer that sells XRP, if the account's balance was
low enough that paying the transaction fee would drop the balance
below the reserve, the transaction should return tecUNFUNDED_OFFER.

The existing implementation returned a tesSUCCESS instead. Although
the net result is the same as far as the transaction's effects are
concerned (the offer is not placed on the books and the transaction
fee is charged) the incorrect result code makes deciphering metadata
difficult.

Add unit test that verifies the new behavior.
2016-02-18 13:54:10 -08:00
Nik Bougalis
15adb73a13 Unit tests for offer creation:
* Test whether offers which either already below the reserve (or
  would go below during processing) can execute if they cross.
* Test the "Fill or Kill" and "Immediate or Cancel" flags.
2016-02-18 13:54:10 -08:00
Scott Schurr
f15cc6c4f6 Document feature RPC command in --help. 2016-02-17 16:33:02 -08:00
seelabs
61e6e5694c Add virtual destructor to Logs 2016-02-17 16:33:02 -08:00
Edward Hennis
66bc0bb424 Copy rules from parent ledger 2016-02-17 16:33:02 -08:00
David Schwartz
25589bacea Ensure fee change transactions have a unique transaction ID
Include the ledger sequence number in fee change transactions to ensure
each such transaction has a unique transaction ID.

We tolerate the absence of a ledger sequence in fee change transactions so
that past fee change transactions remain parseable. Since no live amendment
transactions have yet happened, there is no need to tolerate an absent
ledger sequence there.
2016-02-17 16:33:02 -08:00
JoelKatz
d721d35a2d Update SQLite from 3.8.11.1 to 3.11.0 2016-02-17 16:29:00 -08:00
Vinnie Falco
ba84fc2c77 Set version to 0.31.0-b8 2016-02-11 18:43:06 -05:00
Vinnie Falco
0f7dbc7bc0 Fix Server race conditions:
Class io_list manages children that perform asynchronous
I/O operations. The treatment of close and destruction is
refactored to fix race conditions during exit.
2016-02-11 18:42:34 -05:00
Vinnie Falco
137dd351b8 Refactor Server:
* Remove HTTP namespace
* Rename connection classes
* Mark Server test automatic
* Build server sources in classic
2016-02-11 18:42:33 -05:00
Vinnie Falco
ba38bfad9d Server deadlock fixes 2016-02-11 18:42:33 -05:00
Vinnie Falco
be71e8afa2 Get X-Forwarded-For from Session request 2016-02-11 18:42:33 -05:00
Vinnie Falco
076a061997 Add suite::this_suite 2016-02-11 18:42:32 -05:00
Vinnie Falco
de416adadd Disable WebSocket logging 2016-02-11 18:42:32 -05:00
Vinnie Falco
1fda99ba82 Add suite::this_suite 2016-02-11 18:42:32 -05:00
Vinnie Falco
9f5b58c8ab Fix short_read test race/deadlock 2016-02-11 18:42:31 -05:00
Vinnie Falco
a5131515ec Increase severity on Stoppable logging 2016-02-11 18:42:30 -05:00
Vinnie Falco
8c11d24454 Reinforce Env Application log severity 2016-02-11 18:42:30 -05:00
Vinnie Falco
924b6b663e Increase severity on Stoppable logging 2016-02-11 18:42:30 -05:00
Nik Bougalis
688452d971 Fix OptionalProxy<T> equality comparison 2016-02-11 18:41:42 -05:00
Scott Schurr
2f94e16359 Add SignerList to account_info response (RIPD-1061):
The caller of the account_info RPC command can optionally
specify that they want the account's SignerList returned by
adding the argument:

"signer_lists": "true"

The returned SignerList is in an array.  This leaves us room to
support multiple signer lists on an account in the future without
changing the syntax of the result.

The command-line version of account_info does not support the new
option.
2016-02-11 18:41:03 -05:00
Miguel Portilla
fbf736f169 Improved reporting for delivered_amount:
* Determine tx success from metadata result.
* Report delivered_amount for legacy account_tx queries.
2016-02-11 18:39:12 -05:00
Vinnie Falco
f0624581d1 Set version to 0.30.1-hf1 2016-02-11 18:19:31 -05:00
Vinnie Falco
cb23352a35 Revert "Set version to 0.30.1-hf1"
This reverts commit 9fea06ad84.
2016-02-11 18:19:08 -05:00
Vinnie Falco
9fea06ad84 Set version to 0.30.1-hf1 2016-02-11 15:48:32 -05:00
Miguel Portilla
2beeb9a293 Improved reporting for delivered_amount:
* Determine tx success from metadata result.
* Report delivered_amount for legacy account_tx queries.
2016-02-11 15:47:40 -05:00
Nik Bougalis
1e92ac3cf5 Set version to 0.31.0-b7 2016-02-08 15:50:12 -08:00
Scott Schurr
acaf91a2f7 Add AccountLinesRPC unit tests. 2016-02-08 15:50:02 -08:00
seelabs
41125a0a34 Support for clang specific boost and protobuf dirs:
Clang does not understand gcc 5's new ABI. On linux systems
that default to the new ABI (such as ubuntu 15.10), building
with clang requires using C++ libraries built with the the old
gcc ABI.

When building with the clang protobuf lib, a common error is to
load the gcc protobuf library at run time. When set, PROTOBUF_ROOT
is added to rpath to make sure the correct lib is loaded.

Adds a script to install clang and download and build boost and
protobuf with boost.
2016-02-08 15:50:02 -08:00
Nik Bougalis
35ed095dbf Cleanup ledger fetching 2016-02-08 15:50:02 -08:00
Nik Bougalis
ce31e26f58 Enable amendment support 2016-02-08 15:47:57 -08:00
Nik Bougalis
2b640532f2 Merge remote-tracking branch 'upstream/release' into develop 2016-02-08 15:45:10 -08:00
Nik Bougalis
c717006c44 Set version to 0.30.1 2016-02-08 15:37:02 -08:00
Nik Bougalis
fd33d693c4 Merge remote-tracking branch 'upstream/master' 2016-02-08 15:36:04 -08:00
Nik Bougalis
31ecb4dcf3 Revert "Set version to 0.30.1"
This reverts commit 5a4e900a21.
2016-02-08 15:35:22 -08:00
Nik Bougalis
5a4e900a21 Set version to 0.30.1 2016-02-03 14:49:07 -08:00
Nik Bougalis
94ed5b3a53 Set version to 0.31.0-b6 2016-02-01 21:07:52 -08:00
Scott Schurr
2eaf211e9b Improve error message when signing fails (RIPD-1066):
With the addition of multisigning there are a variety of reasons
a signature may fail.  We now return a more descriptive message
for the reason certain signature checks fail.
2016-02-01 21:07:41 -08:00
Miguel Portilla
ed9f5639a8 Throws, explicits and trivial cleanups 2016-02-01 21:07:41 -08:00
Edward Hennis
8e842b5893 Disable tx sig checking at the Application level:
* Only skip sig checking on the RPC/Websocket interface.
* Used by Env tests which submit unsigned transactions.
2016-02-01 21:07:41 -08:00
JoelKatz
1b378172b6 Clean up some consensus edge cases:
* Ensure sufficient time for proposals before increasing avalanche threshold
* Only validators should count themselves towards 80% needed for consensus
2016-02-01 21:07:41 -08:00
Markus Teufelberger
0dc911c091 Do not show progess bar on npm install on CI
See https://github.com/npm/npm/issues/11283 for more discussion on this.
2016-02-01 21:07:41 -08:00
Vinnie Falco
2be11874e3 Improved unit test logging:
Logging from the Application object in the Env is
redirected to the suite::log, with the severity level
set to error and above.
2016-02-01 21:07:41 -08:00
Nik Bougalis
5ac744ff66 Implement a debug Journal 2016-02-01 21:06:56 -08:00
Nik Bougalis
57d6ab091c Cleanups:
* Use Throw instead of directly throwing an exception
2016-02-01 21:06:56 -08:00
Nik Bougalis
f13668371e Amendment RPC enhancements:
* RPC command to veto/unveto
* Store votes
* Add vote information to JSON
* Add ledger majority information to JSON
* Config section for vetos
2016-02-01 21:06:56 -08:00
Nik Bougalis
c9486863c3 Set version to 0.31.0-b5 2016-01-28 12:05:08 -08:00
Nik Bougalis
e9e0277b7c Improve manifest loading 2016-01-28 12:05:00 -08:00
Miguel Portilla
b69f0356ec Convert PathRequest to use std::chrono (RIPD-1069) 2016-01-28 12:05:00 -08:00
Edward Hennis
4d72fc225a Unit test of RPC ledger_request 2016-01-28 12:04:58 -08:00
Edward Hennis
9786e432f8 ledger_request index must be positive 2016-01-28 12:04:57 -08:00
Vinnie Falco
040d7ebb46 Refactor Env for AbstractClient:
Env is changed to use the AbstractClient interface,
which generalizes the transport for submitting client
requests to the Env server instance.

The JSONRPCClient implementation is added, supporting
a simple, synchronous interface. Env is changed to
use the JSONRPCClient implementation instead of the
built in JSON-RPC client.
2016-01-28 12:04:57 -08:00
Scott Schurr
f9f2b8124d Add cmdLineToJSONRPC (RIPD-1074) 2016-01-28 12:04:55 -08:00
Vinnie Falco
dd5d938aa3 Make ParsedPort public 2016-01-28 12:04:55 -08:00
Edward Hennis
7c82adcc84 Avoid missing node errors on genesis ledger creation 2016-01-28 12:04:53 -08:00
Howard Hinnant
bdb1966573 Remove lvalue overload of SHAMap::addItem:
This overload was mistakenly used, but not needed
in the Ledger logic.  Removing this overload turns
this performance bug into a compile time error.
2016-01-28 09:39:30 -08:00
Howard Hinnant
a1582c610e Consolidate getStack into walkTowardsKey:
*  This removes duplicate functionality.
2016-01-28 09:39:30 -08:00
Howard Hinnant
2f9f217c11 Remove NodeStack:
*  This gets all parts of SHAMap using a single type of stack.
*  This paves the way for more code sharing.
2016-01-28 09:39:30 -08:00
seelabs
278f679bb1 Enable underflow fix after specified date 2016-01-28 09:39:30 -08:00
seelabs
96bc727fcb Enforce no-ripple constraints 2016-01-27 17:05:31 -05:00
seelabs
7d2809eb27 Unit test for enforcing no ripple 2016-01-27 17:05:31 -05:00
Nik Bougalis
5062e65277 Set version to 0.30.1-rc4 2016-01-27 13:33:07 -08:00
seelabs
bd44880d5a Enforce no-ripple constraints 2016-01-27 13:32:38 -08:00
Nik Bougalis
ad2383bd4b Set version to 0.30.0-hf2 2016-01-27 12:27:27 -08:00
Nik Bougalis
5b5a01989c Improve compile-time OpenSSL version check 2016-01-27 12:27:18 -08:00
seelabs
c17f7e8b37 Enforce no-ripple constraints 2016-01-26 13:52:41 -08:00
Nik Bougalis
9b8133f65f Set version to 0.31.0-b4 2016-01-25 10:35:56 -08:00
Vinnie Falco
77c0236cae Serialize Application start up:
These changes ensure the caller can block until the
Application object can be fully prepared (especially
listening sockets). Solves the problem where tests
can attempt connections before the server sockets are
ready.

* WebSocket blocks until listening
* Application setup blocks until prepared and started
2016-01-25 10:35:54 -08:00
seelabs
07c4262392 Fix websocket deadlock:
A copy of the connection list is made on stop so it
can be iterated without holding the endpoint lock.
2016-01-25 10:35:54 -08:00
Vinnie Falco
10a5421987 Remove unused websocket04 2016-01-25 10:35:54 -08:00
Scott Schurr
06beddcee6 Convert fast manual unit tests to automatic 2016-01-25 10:35:53 -08:00
Scott Schurr
48f0e1f51d CBigNum unit tests 2016-01-25 10:35:53 -08:00
seelabs
6701b7f1d0 Do not destroy objects until all threads exit in Stoppable test
Objects of class `A` could be destroyed before all their member
functions finished running.
2016-01-25 10:35:53 -08:00
Scott Schurr
9063953ee7 Convert fast manual unit tests to automatic 2016-01-25 10:35:53 -08:00
seelabs
7315d9c300 Do not destroy objects until all threads exit in Stoppable test
Objects of class `A` could be destroyed before all their member
functions finished running.
2016-01-25 10:35:53 -08:00
wilsonianb
05c248f297 Include ledger_index in validations subscription stream 2016-01-25 10:35:53 -08:00
wilsonianb
b92a58d11e Allow random seed with specified wallet_propose key_type (RIPD-1030) 2016-01-25 10:35:53 -08:00
Nik Bougalis
767d253593 Improve manifest public key loading 2016-01-25 10:35:53 -08:00
Nik Bougalis
046a8f443d Add unit tests for Endpoint string parsing 2016-01-25 09:07:41 -08:00
Nik Bougalis
78e59191ed Add unit tests for Endpoint string parsing 2016-01-25 09:07:41 -08:00
Nik Bougalis
958b3a1dc0 Simplify Beast:
* Remove asio HTTP classes
 * Remove beast::File, beast::String, beast::Stream, beast::Array,
   beast::MemoryBlock, beast::CriticalSection and other unused
   classes.
 * Remove unused platform-specific code.
 * Reduce Beast custom assert and debugging helper macros.
2016-01-25 09:07:41 -08:00
Nik Bougalis
de4d872b7a Simplify Beast:
* Remove asio HTTP classes
 * Remove beast::File, beast::String, beast::Stream, beast::Array,
   beast::MemoryBlock, beast::CriticalSection and other unused
   classes.
 * Remove unused platform-specific code.
 * Reduce Beast custom assert and debugging helper macros.
2016-01-25 09:07:41 -08:00
Nik Bougalis
921b34eafd Use boost::filesystem instead of beast::File 2016-01-25 09:07:41 -08:00
Nik Bougalis
77955c74bc Use boost::filesystem instead of beast::File 2016-01-25 09:07:41 -08:00
Nik Bougalis
555cd59a59 Cleanups:
* Reduce Beast dependencies
* Remove unnecessary includes
* Don't use deprecated bassert macros
* Don't use beast::String in Json::Value
2016-01-25 09:07:41 -08:00
Edward Hennis
b4f8dc7abf Set version to 0.31.0-b3 2016-01-20 22:46:38 -05:00
Miguel Portilla
14dde47173 Convert STAmount switchovers to tls (RIPD-1068) 2016-01-20 22:46:09 -05:00
Miguel Portilla
4fb6bf3e67 Add coroutine thread specific storage 2016-01-20 22:46:07 -05:00
Miguel Portilla
f73c55a922 Add JobCoro::join 2016-01-20 22:46:06 -05:00
Vinnie Falco
49c86768e6 Peer to peer network simulator:
* Refine the Peer concept
* Remove incremental consensus simulations (coverage)
* Add unit test (coverage)
* Fix BasicNetwork::remove
2016-01-20 22:46:04 -05:00
Scott Schurr
0fca91c6c1 Remove tapENABLE_TESTING. 2016-01-20 22:46:02 -05:00
wilsonianb
749b4adc7c Add manifests subscriptions
Add verify method to manifest script to check signature
2016-01-20 22:46:00 -05:00
Edward Hennis
a67e4ab9f1 Port test/transaction_ordering_test.js to C++ 2016-01-20 22:45:58 -05:00
Edward Hennis
e0b2a26805 TxQ unit tests account for localTx. 2016-01-20 22:45:56 -05:00
Edward Hennis
6c5b23b317 OpenLedger::accept, flip order of modifier and locals:
* And call in to the TxQ if enabled.
2016-01-20 22:45:55 -05:00
Edward Hennis
8da2a724fb Close/advance Env ledgers through RPC interface 2016-01-20 22:45:54 -05:00
Vinnie Falco
d5363d1a85 Submit Env transactions through RPC interface 2016-01-20 22:45:53 -05:00
seelabs
8f74ee1d96 Add sanitize build support 2016-01-20 22:45:52 -05:00
Miguel Portilla
796ee8e3de Path find source currency limits (RIPD-1062) 2016-01-20 22:45:50 -05:00
Nik Bougalis
25f611d0ec Delete unfunded offers in predictable order 2016-01-20 22:45:49 -05:00
Nik Bougalis
08e518af73 Correctly interrogate child process status 2016-01-20 22:36:57 -05:00
Nik Bougalis
5f4fe9fccb Set version to 0.30.1-rc3 2016-01-20 15:56:16 -08:00
Nik Bougalis
db9885e1fc Delete unfunded offers in predictable order 2016-01-20 15:56:10 -08:00
Nik Bougalis
27673c1c3f Set version to 0.31.0-b2 2016-01-19 15:43:13 -08:00
Miguel Portilla
3394129894 Remove unused declaration 2016-01-19 15:43:03 -08:00
Nik Bougalis
57625e06ed Increase minimum local fee 2016-01-14 14:11:20 -08:00
Nik Bougalis
bdfb5fa2bc Set version to 0.30.1-rc2 2016-01-14 13:36:34 -08:00
Nik Bougalis
b2c9179100 Increase minimum local fee 2016-01-14 13:36:18 -08:00
Nik Bougalis
d7935192dd Set version to 0.31.0-b1 2016-01-12 18:50:58 -08:00
Howard Hinnant
dd3e170e08 Correct handling of comparators in boost::intrusive:
This facilitates the port of rippled to boost 1.60 while
maintaining compatibility with previous versions of boost.
2016-01-12 18:50:53 -08:00
Howard Hinnant
97d5325468 Correct handling of comparators in boost::intrusive:
This facilitates the port of rippled to boost 1.60 while
maintaining compatibility with previous versions of boost.
2016-01-12 18:50:53 -08:00
Scott Schurr
8433851652 Add SignerList support to account_objects (RIPD-1061):
Return just SignerList objects on an account using the
account_objects RPC command with "type":"signer_list".
2016-01-12 18:45:36 -08:00
Edward Hennis
f7b2b84ece Integration test for transaction ordering. 2016-01-12 18:45:36 -08:00
Edward Hennis
8be67c1766 Speed up out of order transaction processing (RIPD-239):
* After successfully applying a transaction to the open ledger, resubmit any held transactions from the same account.
* All held transactions will continue to be retried after consensus round.
2016-01-12 18:45:36 -08:00
Edward Hennis
4d2e7ed404 LedgerMaster hash lookups return boost::optional. 2016-01-12 18:45:36 -08:00
Edward Hennis
e1018546ac Devirtualize LedgerMaster. 2016-01-12 18:45:36 -08:00
JoelKatz
44fcab1081 SHAMap improvements:
* Run key SHAMap unit tests on both backed and unbacked maps
* Remove obsolete version of SHAMapTree::addRootNode
* Our position maps should be unbacked and immutable
* Minimize hash operations for unbacked SHAMaps
  Not setting the sequence numbers to zero in
  SHAMap::walkSubTree causes extra hashes to be
  performed on subsequent operations
2016-01-12 18:45:36 -08:00
JoelKatz
6dab1657b1 Some pathfinding cleanups and optimizations:
* Reduce the log level of an expensive debug message
* Don't hold the request lock while pathfinding
2016-01-12 18:45:36 -08:00
Nik Bougalis
60ad21ae0d Pathfinding cleanups:
* Return std::pair instead of returning by reference
* Use std algorithms when possible
* Use auto and C++14 lambdas
2016-01-12 18:45:36 -08:00
Nik Bougalis
3974ddd8f7 Remove RippleAddress:
The RippleAddress class was used to represent a number of fundamentally
different types: account public keys, account secret keys, node public
keys, node secret keys, seeds and generators.

The class is replaced by the following types:
* PublicKey for account and node public keys
* SecretKey for account and node private keys
* Generator for generating secp256k1 accounts
* Seed for account, node and generator seeds
2016-01-12 18:45:36 -08:00
Nik Bougalis
8064e82774 Simplify Beast:
* Remove obsolete RNG facilities
* Flatten directory structure
* Use std::recursive_mutex instead of beast::RecursiveMutex
2016-01-12 18:45:35 -08:00
Nik Bougalis
e0af6ec567 Streamlined UNL/validator list:
The new code removes the ability to specify domain names
in the [validators] configuration block, and no longer
supports the [validators_site] option.

More details on the supported configurations are available
under doc/rippled-example.cfg.
2016-01-12 18:45:35 -08:00
Nik Bougalis
0a96f3a249 Simplify Beast:
* Remove obsolete RNG facilities
* Flatten directory structure
* Use std::recursive_mutex instead of beast::RecursiveMutex
2016-01-12 18:45:35 -08:00
Nik Bougalis
40363f96a9 Generic PRNG framework:
* A new, unified interface for generating random numbers and
  filling buffers supporting any engine that fits the
  UniformRandomNumberGenerator concept;
* Automatically seeded replacement for rand using the fast
  xorshift+ PRNG engine;
* A CSPRNG engine that can be used with the new framework
  when needing to to generate cryptographically secure
  randomness.
* Unit test cleanups to work with new engine.
2016-01-12 18:45:35 -08:00
Nik Bougalis
1c9577a1ac Simplify blob encoding 2016-01-12 16:06:18 -08:00
Nik Bougalis
a7a30396be Define NOMINMAX for Windows 2016-01-12 16:06:18 -08:00
Nik Bougalis
fee19390f5 Improve watchdog restart logic:
Stop attempting to restart the server after five consecutive
restarts fail to remain operational for at least ten seconds.
2016-01-12 16:06:18 -08:00
Nik Bougalis
ff6c9e329f Set version to 0.30.1-rc1 2016-01-12 10:40:21 -08:00
Vinnie Falco
f997384fca Merge remote-tracking branch 'upstream/release' into develop 2016-01-12 13:38:06 -05:00
seelabs
edbd3794e0 Set version to 0.30.1-b15 2016-01-08 15:14:47 -05:00
Miguel Portilla
1f90b177a1 Require boost 1.57 2016-01-08 15:14:13 -05:00
JoelKatz
a064fcd8e5 Don't pass websocket messages to coroutine 2016-01-08 15:14:13 -05:00
Miguel Portilla
457ad333b2 Websocket dispatch fix 2016-01-08 15:14:13 -05:00
seelabs
034e99562f Force install of clang 3.6 on CircleCI 2016-01-08 15:14:13 -05:00
Scott Schurr
b4d2f66d43 Use canonical method to access base fee in unit tests. 2016-01-08 15:14:13 -05:00
Scott Schurr
32fcf28e1f Test handling of secp256r1 signatures (RIPD-1040):
Commit 6ec5fa9cae fixed a bug that
would cause a crash when a transaction signed with a secp256r1 was
presented. This adds a regression test, ensuring that such
signatures fail gracefully.
2016-01-08 15:14:13 -05:00
Miguel Portilla
5fce652890 Improve sub and unsub errors (RIPD-702) 2016-01-08 15:14:13 -05:00
Edward Hennis
7728f69100 Allow fractional fee multipliers (RIPD-626):
* Auto-fill fee maximum is `base * fee_mult_max / fee_div_max`.
* `fee_div_max` defaults to 1 to preserve backward compatibility.
2016-01-08 15:14:13 -05:00
Edward Hennis
e78b8e4cf3 mulDiv returns 0 if numerator is 0 and denominator isn't:
* Otherwise overflow checks result in divide by 0.
* If denominator is 0, let the divide by 0 exception throw.
* Move mulDiv out of STAmount
2016-01-08 15:14:13 -05:00
Vinnie Falco
2c9c3f4b6e Set version to 0.30.1-b14 2016-01-05 12:37:37 -05:00
Scott Schurr
1e1aa76139 Fix CircleCI "g++ can't be a slave of gcc" error. 2016-01-05 12:37:10 -05:00
Vinnie Falco
39b95903e3 Set version to 0.30.1-b13 2015-12-29 12:43:43 -05:00
Edward Hennis
1bce85d7b6 Don't use tapENABLE_TESTING for TxQ.
* Enable FeeEscalation feature in TxQ tests.
* Elapsed time for simulated consensus.
2015-12-29 12:38:23 -05:00
Vinnie Falco
a5583de6e6 Use features instead of ApplyFlags:
tapENABLE_TESTING is removed from checks, and feature enablement
is the sole method for activating features. Unit tests are updated
to enable required features in the construction of the Env.

Tickets are put on a feature switch instead of a build macro.
2015-12-29 12:38:22 -05:00
Edward Hennis
48e0466a2b Use temp folder for Env test sqlite files:
* Moved empty path check to DatabaseCon, and only for non-standalone.
* No more "DummyForUnitTest" files getting left behind in repo after running unit tests.
2015-12-29 12:38:22 -05:00
Vinnie Falco
1320898fbe Refactor jtx::Env:
These changes eliminate the Env's OpenLedger member and make
transactions go through the Application associated with each
instance of the Env, making the unit tests follow a code path
closer to the production code path.

* Add Env::open() for open ledger
* Add Env::now()
* Rename to Env::current()

* Inject ManualTimeKeeper in Env Application
* Make Config mutable
* Move setupConfigForUnitTests
* Launch Env Application thread
* Use Application ledgers in Env
* Adjust Application clock on ledger close
* Adjust close time for close resolution
* Scrub obsolete clock types
* Enable features via Env ctor
* Make Env::master Account object global

* Cache SSL context (performance)
* Cache master wallet keys in Ledger ctor (performance)
2015-12-29 12:38:21 -05:00
Scott Schurr
90466d6cde Use addWithoutSigningFields in jtx::sign 2015-12-29 12:34:02 -05:00
Vinnie Falco
3c6534dc91 Add Stoppable::alertable_sleep_for 2015-12-23 11:58:38 -05:00
Vinnie Falco
889afd0cbd Don't check free disk space in stand-alone mode. 2015-12-23 11:58:38 -05:00
Vinnie Falco
0141aadf3e Use alertable_sleep_for in LoadManager:
This allows the LoadManager to exit immediately
instead of sleeping for up to 1 second on a stop.
2015-12-23 11:58:38 -05:00
Vinnie Falco
0d6ad47051 Add Stoppable::alertable_sleep_for 2015-12-23 11:58:38 -05:00
Vinnie Falco
95dcdf7ddc Log slow calls to Stoppable::onStop 2015-12-23 11:58:36 -05:00
Vinnie Falco
035b308d7c Log slow calls to Stoppable::onStop 2015-12-23 11:58:36 -05:00
Nik Bougalis
81a03285ec Set version to 0.30.1-b12 2015-12-18 22:34:00 -08:00
Miguel Portilla
cb280b10c1 Improve ledger_request response 2015-12-18 22:33:57 -08:00
JoelKatz
4f40e94c99 Fix proposal relaying (RIPD-1057):
Stash the signature so we can relay a proposal later
2015-12-18 22:33:57 -08:00
JoelKatz
bb944466f2 Consensus singleton and lock changes (RIPD-1054):
* Make LedgerConsensus object a singleton
* Protect consensus structures with their own locks
* Simplify NetworkOPs interaction with LedgerConsensus
* Log when we build and validate the same ledger
2015-12-18 22:17:03 -08:00
Nik Bougalis
2a97bd3848 Do not open peer port in standalone mode 2015-12-18 21:33:03 -08:00
Nik Bougalis
e91f18946e Improve STTx construction:
* Remove the ability to construct an empty transaction by type, only
  to then have to add fields to it. Instead, offer a constructor that
  accepts a transaction type and a lambda that can insert fields into
  the STTx during construction.
* Remove now obsolete boost::optional transaction ID.
2015-12-18 16:39:29 -08:00
Nik Bougalis
6fd11db5a9 Set version to 0.30.1-b11 2015-12-17 10:29:27 -08:00
Nik Bougalis
5185fa3a92 Check validations for currency based on close time 2015-12-17 00:00:28 -08:00
Mark Travis
f26835e507 Command line option to not log to console after startup 2015-12-17 00:00:24 -08:00
Howard Hinnant
5423fa25d4 Change the use of integrals to chrono types as appropriate 2015-12-16 11:35:59 -08:00
Miguel Portilla
d17c8e235f Fix RPF early response (RIPD-1064) 2015-12-16 11:35:59 -08:00
Miguel Portilla
754dea8d47 Handle account_objects empty response (RIPD-958) 2015-12-16 11:35:59 -08:00
Miguel Portilla
3fa2028eb2 Add expiration to account_offers (RIPD-1049) 2015-12-16 11:35:59 -08:00
Miguel Portilla
d5c14755ce Add owner_funds to txs in RPC ledger (RIPD-1050) 2015-12-16 11:35:59 -08:00
Howard Hinnant
e86ff5daa1 Change the use of integrals to chrono types as appropriate 2015-12-16 11:35:59 -08:00
Howard Hinnant
bacf2605a4 Simplify SHAMap::firstBelow:
* Add SHAMap iteration test
2015-12-16 11:35:59 -08:00
Howard Hinnant
382c9c68b8 Have upper_bound use logic in walkToPointer:
*  Rename walkToPointer to walkToKey
*  Have walkToKey optionally take a stack
2015-12-16 11:35:54 -08:00
Howard Hinnant
bdd733bc0b Simplify initial node-finding loop in SHAMap::upper_bound 2015-12-16 11:35:40 -08:00
Howard Hinnant
05ac32064f Remove unused SHAMap::fetch 2015-12-16 11:35:40 -08:00
Howard Hinnant
bbe7457049 Make SHMapSyncFilter virtual functions const 2015-12-16 11:35:37 -08:00
Howard Hinnant
48ed44d117 Change SHAMapSyncFilter to use SHAMapHash:
*  This also involves changing TaggedCache to use SHAMapHash
2015-12-16 11:35:35 -08:00
Howard Hinnant
0dbacedb58 Change signature of SHAMap::getFetchPack to use SHAMapHash 2015-12-16 11:35:33 -08:00
Nik Bougalis
493752e1c6 Set version to 0.30.1-b10 2015-12-09 12:11:35 -08:00
Nik Bougalis
25fe66bafc Report server uptime in server_info 2015-12-09 12:11:27 -08:00
Mark Travis
496fea5995 Secure gateway:
This is designed for use by proxies in front of rippled. Configured IPs
can forward identifying user data in HTTP headers, including
user name and origin IP. If the user name exists, then resource limits
are lifted for that session. However, administrative commands are still
reserved only for administrative sessions.
2015-12-09 11:25:57 -08:00
Miguel Portilla
810175ae95 Remove ScopedMetrics 2015-12-09 11:24:45 -08:00
JoelKatz
45b07ff9ec Consensus ledger switch improvements
* Expire validations faster based on when we first saw them.
* Never jump to a ledger prior to the latest fully-valid ledger
* Drop validations with signing times too far in the future immediately
2015-12-08 10:35:41 -08:00
seelabs
469d5494ea Search /etc/opt/ripple for rippled.cfg 2015-12-08 10:28:49 -08:00
seelabs
e19e6c6b0a Change link order for static links 2015-12-08 03:59:36 -08:00
Nik Bougalis
f6f4452231 Set version to 0.30.1-b9 2015-12-04 20:52:35 -08:00
JoelKatz
a8cdd4f66d Must hold lock to call LedgerConsensusImp::getJson. 2015-12-04 20:51:58 -08:00
seelabs
999701e384 Fix underflow rounding issue:
Very small payment could fail when STAmount::mulRound underflowed
and returned zero, when it should have rounded up to the smallest
representable value.
2015-12-01 11:02:27 -08:00
wltsmrz
4626992474 Disable deprecation warnings 2015-12-01 10:59:56 -08:00
wltsmrz
6066c254c8 Add multi-sign test 2015-12-01 10:59:56 -08:00
wltsmrz
f2dfde3ee1 Add patches for ripple-lib core 2015-12-01 10:59:55 -08:00
Vinnie Falco
2401b44bed Use qalloc for RawStateTable and OpenView::txs_ 2015-12-01 10:59:55 -08:00
Miguel Portilla
3e5ec91977 Store index before publish (RIPD-1052, RIPD-1053) 2015-12-01 10:59:55 -08:00
Miguel Portilla
108906cb20 Implement new coroutines (RIPD-1043) 2015-12-01 10:59:55 -08:00
Miguel Portilla
880f354b90 Convert throws and catch alls (RIPD-1046) 2015-12-01 10:59:55 -08:00
Nik Bougalis
0633ef1ba1 Remove already-triggered ledger switches 2015-12-01 05:48:46 -08:00
Nik Bougalis
298ef4ac4d Improve error code lookup 2015-12-01 05:48:46 -08:00
Nik Bougalis
01c9baf8ca Set version to 0.30.1-b8 2015-11-24 13:22:26 -08:00
JoelKatz
3c496b07f9 Don't include zero traffic levels 2015-11-24 01:34:34 -08:00
JoelKatz
9f96d7ea38 Correct delivered_amount reporting for minor ledgers (RIPD-1051)
The existing delivered_amount logic will erroneously report
unavailable for ledgers that aren't in the network's live
chain because it is based solely on ledger sequence number.
This adds a check based on the ledger close time to permit
the code to give correct results in standalone mode and on
test networks.
2015-11-24 01:34:34 -08:00
David Schwartz
d9905ec719 Ledger close time optimizations (RIPD-998, RIPD-791):
Add a LedgerMaster function to get a ledger's
close time from either its hash or sequence number.
Use this function when adding the 'date' fields to
transaction JSON. This avoids constructing large numbers
of ledgers.
2015-11-24 01:33:55 -08:00
JoelKatz
3a039fff66 Add "tx" option to "ledger" command line 2015-11-24 01:33:55 -08:00
JoelKatz
c726377012 Add SeritalIter::skip 2015-11-24 01:33:55 -08:00
JoelKatz
1601f6bbc9 Improve ledger close timing
Added a safety to close the ledger quickly if there's
evidence validators we trust have already closed the
ledger. Base the minimum ledger open time on how long
we saw the ledger open. Do not rely on the rounded
close time for enforcing the minimum ledger open time.
2015-11-24 01:33:55 -08:00
Edward Hennis
b87eff2115 Improve TxQ test coverage:
* LastLedgerSequence
* Zero-fee txn has infinite fee level.
* Remove pseudo-transaction fee levels, since pseudos never get to the open ledger.
* preflight/preclaim failure cases
* Queued transaction failure handling.
2015-11-24 01:33:55 -08:00
Edward Hennis
9c8204f945 Fix TxQ LastLedgerSequence handling 2015-11-24 01:33:53 -08:00
Scott Schurr
289bc7deb3 Reduce interface to STAccount (RIPD-994):
Since a non-default STAccount is now guaranteed to always be
160 bits, it was possible to reduce the number of methods that
it provides.

In the process of narrowing the STAccount interface it became
reasonable to remove some methods that duplicated functionality.
A few classes offered both a value() and a getValue() method.
The getValue() method is removed from those classes.
2015-11-24 01:33:53 -08:00
Scott Schurr
f72b14ec36 Make STAccount only constructible with 160 bits (RIPD-994):
If someone attempts to construct an STAccount with something
other than 160 bits the constructor now throws.

Since an STAccount now enforces that it always stores exactly
160 bits, we use a fixed-sized uint160 for the storage, replacing
a variable sized STBlob.

In order to leave the ledger and wire formats unaffected, the
STAccount still serializes and deserializes itself as though
it were variable length.
2015-11-24 01:33:53 -08:00
Scott Schurr
f63867e958 Add STAccount unit tests (RIPD-994) 2015-11-24 01:33:51 -08:00
Scott Schurr
fa05ded88e Use std::thread in LedgerCleaner (RIPD-236) 2015-11-24 01:33:51 -08:00
Nik Bougalis
7bb4ff901e Set version to 0.30.1-b7 2015-11-12 21:55:48 -08:00
Nik Bougalis
03516a14da Defer checking whether master key was used for signing 2015-11-12 21:54:44 -08:00
Nik Bougalis
0c67364e6c Allow multiple incoming connections from the same IP:
Multiple servers behind NAT might share a single public IP, making it
difficult for them to connect to the Ripple network since multiple
incoming connections from the same non-private IP are currently not
allowed.

RippleD now automatically allows between 2 and 5 incoming connections,
from the same public IP based on the total number of peers that it is
configured to accept.

Administrators can manually change the limit by adding an "ip_limit"
key value pair in the [overlay] stanza of the configuration file and
specifying a positive non-zero number. For example:

[overlay]
ip_limit=3

The previous "one connection per IP" strategy can be emulated by
setting "ip_limit" to 1.

The implementation imposes both soft and hard upper limits and will
adjust the value so that a single IP cannot consume all inbound slots.
2015-11-12 21:54:44 -08:00
Nik Bougalis
f00c09d9fc Case-insensitive configuration file option parsing 2015-11-12 21:54:44 -08:00
Howard Hinnant
21a7b62c2b Make the SHAMap hash a distinct type from a uint256.
* Implement a type safe distinction between a node hash and a node id.
* This is just the first phase, limited to SHAMap's internals.
2015-11-12 21:54:44 -08:00
Vinnie Falco
49c4a063c1 Exit immediately in Resource::ManagerImp::~ManagerImp 2015-11-12 21:54:44 -08:00
Miguel Portilla
f8edc203e7 Reduce DeliverNodeReverse log severity 2015-11-12 21:54:44 -08:00
JoelKatz
9a6a064307 Be more robust about storing/replaying proposals:
Store a proposal even if it arrives outside a round. Make sure we catch
up on any missed proposals as we start a round.
2015-11-12 21:54:32 -08:00
JoelKatz
22678b5cfa Rework close time voting:
Properly take close time rounding and monotonic ledger close times
into account when determining if we have a close time consensus.

In some cases, we send an extra proposal at the end of a round. This
can be removed once all servers have the correct end of round detection
logic.
2015-11-12 21:53:53 -08:00
JoelKatz
269008b311 Better logging of built/validated discrepancies:
If we built a different ledger from the one we ultimately
validate, log the status of the consensus round. This will
make it easier to rule out transaction processing issues
as the cause of these discrepancies and generally make them
easier to diagnose.
2015-11-12 21:53:28 -08:00
JoelKatz
0458d1910e Cleanups 2015-11-12 21:52:10 -08:00
wilsonianb
98bdb9de68 Use [ips_fixed] over r.ripple.com as the default [ips] 2015-11-12 21:40:20 -08:00
Nik Bougalis
aa4f347e7c Set version to 0.30.0-hf1 2015-11-05 16:47:41 -08:00
Vinnie Falco
0a0adaac6d Set admin privileges on websocket:
When the websocket connection is established, any configured administrative
privileges are applied to resource limits.
2015-11-05 16:45:19 -08:00
Nik Bougalis
124ea41d85 Set version to 0.30.1-b6 2015-11-05 14:52:05 -08:00
Nik Bougalis
818130a8c0 Separate cluster tracking from UNL:
* Simplify code
* Leverage C++14 transparent comparators
2015-11-05 14:51:29 -08:00
seelabs
41ff751cd2 Fix ABI settings for clang on linux 2015-11-05 14:51:29 -08:00
Scott Schurr
a8cc9033b4 Add unit test for zero fee transaction. 2015-11-05 14:50:16 -08:00
Mark Travis
fdd012c420 State accounting:
Record total duration spent in and every transition to each
possible server state. Display as counters through server_info
RPC call.
2015-11-05 14:49:05 -08:00
JoelKatz
3d2aae9ea5 Make close time consensus detection use montonic close time rules 2015-11-04 13:49:54 -08:00
JoelKatz
3d5ff2b4cd Prevent some missed proposals, faster consensus catch up 2015-11-04 13:49:54 -08:00
David Schwartz
d20f0d5014 Make sure LedgerHistory::builtLedger gets called 2015-11-03 14:00:28 -08:00
Nik Bougalis
b71ff4cb88 Set version to 0.30.1-b5 2015-10-28 14:45:55 -07:00
Nik Bougalis
ca17adf7ec Avoid serializing ledger proposals 2015-10-28 14:45:35 -07:00
Scott Schurr
323164877c Make submit_multisigned command line consistent (RIPD-182):
In command line usage (only), the "sign", "submit", and "sign_for"
commands do not require the submitted JSON to be wrapped in a
tx_json object.  Make the submit_multisigned command line behave
consistently with the command line form of those other commands.
2015-10-28 14:45:35 -07:00
JoelKatz
6dbbb7406c Allow subscription to peer status changes (RIPD-579)
Subscribe to "peer_status" stream (admin only) permits
reception of "peerStatusChange" notifications.

These can include the event the peer is reporting, the peer's
new status, the peer's currently accepted ledger hash and sequence,
the peer's network time, and the range of ledgers the peer has
available for remote querying.
2015-10-28 14:45:35 -07:00
JoelKatz
75bed5efcf Permit pathfinding to be disabled. (RIPD-271)
If you do not need pathfinding, you can disable it and save some
resources by setting path_search_max to zero in your config file.
2015-10-28 14:45:35 -07:00
JoelKatz
45f00362db Report connection uptime in peer command (RIPD-927) 2015-10-28 14:45:34 -07:00
seelabs
ded2a5c076 Automate process of using gcc5:
* SConstruct will set ABI based on ubuntu flavor
* Script to bring in packages for various ubuntu flavors
* Script to bring in packages for various fedora 22
* Remove unneeded environment variable from travis
* Script to build boost with correct API flags
* `--static` flag to control static linking
2015-10-28 14:45:34 -07:00
Edward Hennis
b6cb981a8b Update VS2015 build instructions.
* Include Python and Scons, and new OpenSSL lib path.
2015-10-28 10:20:35 -07:00
Edward Hennis
d0770cdb1a Use C++14 lambda declaration. 2015-10-28 10:15:58 -07:00
Edward Hennis
6464d1abc1 Clean up src/ripple/app/tx directory:
* Move InboundTransactions to app/ledger
* Move TransactionAcquire to app/ledger
* Move LocalTxs to app/ledger
* Move Transaction to app/misc
* Move TransactionMaster to app/ledger
2015-10-28 11:37:15 -04:00
Edward Hennis
7d0d89faae Convert HashRouter to use aged_unordered_map. 2015-10-28 11:25:50 -04:00
Edward Hennis
9329aafe53 Transaction queue and fee escalation (RIPD-598):
The first few transactions are added to the open ledger at
the base fee (ie. 10 drops).  Once enough transactions are
added, the required fee will jump dramatically. If additional
transactions are added, the fee will grow exponentially.

Transactions that don't have a high enough fee to be applied to
the ledger are added to the queue in order from highest fee to
lowest. Whenever a new ledger is accepted as validated, transactions
are first applied from the queue to the open ledger in fee order
until either all transactions are applied or the fee again jumps
too high for the remaining transactions.

Current implementation is restricted to one transaction in the
queue per account. Some groundwork has been laid to expand in
the future.

Note that this fee logic escalates independently of the load-based
fee logic (ie. LoadFeeTrack). Submitted transactions must meet
the load fee to be considered for the queue, and must meet both
fees to be put into open ledger.
2015-10-28 11:15:19 -04:00
Edward Hennis
dc1276efa3 OpenLedger::current returns OpenView const. 2015-10-28 11:15:11 -04:00
Edward Hennis
5707988155 Env::postconditions function for alternate validation. 2015-10-28 11:15:10 -04:00
Edward Hennis
382adcc93c Move mulDiv and lowestTerms to STAmount.cpp 2015-10-28 11:15:08 -04:00
Vinnie Falco
656a6c5eb5 Add modify function to OpenLedger::accept 2015-10-28 11:12:47 -04:00
Vinnie Falco
a8859b495b Set version to 0.30.0 2015-10-21 18:26:02 -07:00
seelabs
6700e44793 Set version to 0.30.1-b4 2015-10-20 13:37:41 -04:00
JoelKatz
d6df73747f Remove the small fetch optimization
In some cases, it significantly increased ledger fetch traffic.
2015-10-20 13:37:07 -04:00
seelabs
d8f265e8ac Upgrade to C++-14:
* Remove cxx14 compatibility layer from ripple
  * Update travis to clang 3.6 and drop gcc 4.8
  * Remove unneeded beast CXX14 defines
  * Do not run clang build with gdb with travis
  * Update circle ci to clang 3.6 & gcc-5
  * Don't run rippled in gdb, clang builds crash gdb
  * Staticly link libstdc++, boost, ssl, & protobuf
  * Support builds on ubuntu 15.10
2015-10-20 11:35:24 -04:00
seelabs
8db0094c73 Remove cxx14 compatibility layer from beast 2015-10-20 09:52:25 -04:00
seelabs
d67d8c2ced Remove cxx14 compatibility layer from beast 2015-10-20 09:52:25 -04:00
Scott Schurr
4568c38597 Use std::thread in WebSocket (RIPD-236). 2015-10-20 09:52:25 -04:00
Mark Travis
e636669850 Fix display of default websocket test page. 2015-10-20 09:52:25 -04:00
Scott Schurr
7149765892 sign_for RPC command improvements (RIPD-1036):
o The sign_for RPC command automatically fills in an empty
   "SigningPubKey" field if the field is missing.

 o The sign_for command returns the Signers list inside the
   tx_json.  This re-establishes symmetry with the
   submit_multisigned command.  It also means the returned
   tx_blob might be useful, since it contains the multisignature.

 o The sign_for command also now allows the inclusion of a Signers
   array field in the input tx_json.  If a Signers array is present,
   the new signature is incorporated into the passed array.  This
   supports a model where multisignatures are accumulated serially.

 o Syntax hints are improved.
2015-10-20 09:52:25 -04:00
Scott Schurr
c28c516b22 sign_for RPC command fixes (RIPD-182):
o Remove warning written to log by sign_for command.

 o The sign_for RPC command previously only worked in the
   "json sign_for" form.  The command now works as a straight
   "sign_for".  The "offline" parameter also works.

 o Don't autofill Fee or Paths when signing offline.
2015-10-16 15:36:53 -07:00
Vinnie Falco
780a553662 Set version to 0.30.1-b3 2015-10-16 08:18:08 -07:00
wilsonianb
c755a7ff9b Remove rippled.spec rpm file 2015-10-16 08:18:03 -07:00
Vinnie Falco
8296d81edf Cache tid in STTx:
The digest for a transaction (its transaction ID, or tid) is
computed once upon constructed when the STTx is deserialized.
Subsequent calls to retrieve the digest use the cached value.

Any code which modifies the STTx and then attempts to
retrieve the digest will terminate the process with a
logic error contract violation.

* Nested types removed
* All STTx are contained as const
  (Except in transaction sign, which must modify)
* tid in STTx is computed once on deserialization
2015-10-16 08:18:03 -07:00
JoelKatz
0622e4fd44 Process batch during OpenLedger::modify 2015-10-15 18:14:32 -07:00
JoelKatz
3e8e2c2fee Fix incorrect capture in handleLCL 2015-10-15 18:10:08 -07:00
Scott Schurr
8296041f9e Convert Resource::Manager to use std::thread (RIPD-236) 2015-10-15 18:10:07 -07:00
Nik Bougalis
43a480f02d Set version to 0.30.1-b2 2015-10-13 17:33:35 -07:00
Edward Hennis
9154cbf8e1 Consolidate transaction signature checking.
* All checks flow through ripple::checkValidity, which transparently caches result flags.
* All external transaction submission code paths use checkValidity.
* SF_SIGGOOD flag no longer appears outside of HashRouter / checkValidity.
* Validity can be forced in known or trusted scenarios.
2015-10-13 17:33:16 -07:00
Edward Hennis
66b55f91ba Aggressive HashRouter cache expiration 2015-10-13 17:33:16 -07:00
David Schwartz
fe89c74e3b Tuning and cleanups for ledger fetching
* Track stats for ledger fetch and output
* Reduce entries queried on timeout
* Allow duplicate node requests on timeout
* Don't query deep on timeout
* Adjust latency tuning
* Change high latency cutoff
* Set absolute limit on reply entries
* Small optimizations
2015-10-13 17:15:46 -07:00
JoelKatz
61e5359231 Track peer traffic by category 2015-10-13 17:15:46 -07:00
Nik Bougalis
7373a26333 Use more C++11 features:
* Remove beast::static_initializer
* Remove noexcept VS2013 workaround
* Use [[noreturn]] attribute
2015-10-13 17:15:45 -07:00
JoelKatz
5ee94f8928 Fix some account_tx issues: (RIPD-1035)
* Sanely handled specified ledger in account_tx
* Reject un-validated ledger in account_tx
* Wait to publish a ledger until it's indexed
* Add unit test for PendingSaves
2015-10-13 17:15:45 -07:00
Nik Bougalis
d4c4a03e42 Remove beast::SharedData 2015-10-13 17:15:45 -07:00
Scott Schurr
caa4ed31de Convert LoadManager to use std::thread (RIPD-236) 2015-10-13 17:15:45 -07:00
Nik Bougalis
570bb2e139 Use more C++11 features:
* Remove beast::static_initializer
* Remove noexcept VS2013 workaround
* Use [[noreturn]] attribute
2015-10-13 17:15:45 -07:00
Nik Bougalis
b7c3b96516 Remove beast::SharedData 2015-10-13 17:15:45 -07:00
Nik Bougalis
0e7c8ce554 Use OpenSSL for digests 2015-10-13 17:15:44 -07:00
Vinnie Falco
97feec6b5e Set version to 0.30.1-b1 2015-10-06 17:01:26 -07:00
Edward Hennis
9b80081122 Add preclaim functionality to transactors:
The preclaim() function performs static validity
analysis of transactions using limited information
from a ledger.
2015-10-06 17:01:21 -07:00
Miguel Portilla
ad8e9a76ed Add BookDir container and iterator (RIPD-1027) 2015-10-06 16:03:39 -07:00
Miguel Portilla
20f186d855 Path find cleanup (RIPD-1023) 2015-10-06 16:03:39 -07:00
Miguel Portilla
3af0c38315 Remove BookRef and IssueRef (RIPD-1028) 2015-10-06 16:03:38 -07:00
Nik Bougalis
6db0ceaf81 Allow multiple connections from private IPs 2015-10-06 15:52:59 -07:00
Nik Bougalis
6f81d2e45d Warn if no outbound connections will be made 2015-10-06 15:52:59 -07:00
seelabs
442ad4e445 Suppress warnings & allow copy elision:
* Suppress warnings from rocksdb2
* Add `override` to rippled rocksdb functions
* Remove moves preventing copy elision
2015-10-06 13:08:48 -07:00
Vinnie Falco
9315d98aa9 Isolate Application object in Env:
This change causes each instance of Env to construct its own
isolated Application object for testing. Also included is
part of a framework to create multiple Application objects
in the same unit test and connect them together.
2015-10-06 13:08:47 -07:00
Scott Schurr
19903674af Improve syntax of submit_multisigned [RIPD-182]
In usage it was determined that the submit_multisigned RPC
command could be improved by moving the Signers array inside the
tx_json in the submitted form of the command.  This has the
advantage that the RPC command is more similar to the native form.
Also the returned JSON looks more like the submitted JSON.
2015-10-06 13:08:47 -07:00
Scott Schurr
434a63fa07 Improve tecNO_ALTERNATIVE_KEY error text (RIPD-182) 2015-10-06 13:08:47 -07:00
Scott Schurr
b44d68ea5d Trap another malformed transaction form (RIPD-182):
A transaction with both a Signers array and a TxnSignature field
is malformed.
2015-10-06 13:08:46 -07:00
Nik Bougalis
f424ae6942 Use standard C++ types instead of type aliases:
* Remove ripple::RippleMutex and ripple::RippleRecursiveMutex
  and use std::mutex and std::recursive_mutex respectively.
* Use std::lock_guard instead of std::unique_lock when the
  additional features of std::unique_lock are not needed.
2015-10-06 13:08:46 -07:00
JoelKatz
333ba69d60 Some trivial cleanups/fixes:
* Avoid throwing in OrderBookDB::processTxn
* Fix missing space in debug output
* Avoid duplicate lock of PathRequest in updateAll
* Avoid shadowing in insertPathRequest
* Improve indentation in runOnCoroutine
* Remove extraneous space in ServerHandlerImp::processRequest
2015-10-06 13:08:46 -07:00
David Schwartz
5b6cc3b036 Make sure LedgerHistory::builtLedger gets called 2015-10-06 13:08:45 -07:00
Vinnie Falco
8b8334af86 Set admin privileges on websocket:
When the websocket connection is established, any configured administrative
privileges are applied to resource limits.
2015-10-06 13:08:45 -07:00
Vinnie Falco
84c0ae1c6d OpenSSL: Visual Studio 2015 support 2015-10-06 13:08:45 -07:00
Miguel Portilla
caccee1d98 Set version to 0.30.0-rc1 2015-10-01 14:18:56 -04:00
seelabs
379110a8a2 Improve treatment of signature components 2015-09-30 21:44:02 -04:00
Miguel Portilla
8d37cd9169 Disable RPC coroutines 2015-09-30 19:05:00 -04:00
Nik Bougalis
b40ade5165 Set version to 0.30.0-b1 2015-09-28 17:30:42 -07:00
wilsonianb
c475b23c7d Fix and update rippled.spec for rpm builds 2015-09-28 17:24:05 -07:00
Miguel Portilla
d6b9cfcc34 Enable websocket coroutines 2015-09-28 17:24:05 -07:00
JoelKatz
0c05bd3def Improve transport security:
* Add fields for local and remote IP addresses in hello.
* Add configuration for known local public IP address
* Set fields appropriately
* Check the fields
* Disallow self connection by key
2015-09-28 17:24:05 -07:00
JoelKatz
206cd3b529 IPAddressV4 fixes:
* Loopback addresses are not publicly routable
* The Internet is not classful
2015-09-28 17:24:04 -07:00
JoelKatz
8f7ab21423 IPAddressV4 fixes:
* Loopback addresses are not publicly routable
* The Internet is not classful
2015-09-28 17:24:04 -07:00
JoelKatz
07418cfb34 Make transaction ordering much more difficult to predict
Randomize the initial transaction execution order for closed
ledgers based on the hash of the consensus set. Transaction
processing change will take effect October 27, 2015 at
11:00 AM Pacific time.
2015-09-28 17:24:04 -07:00
Vinnie Falco
ac9816c01d Release PeerFinder slot on error 2015-09-28 17:24:04 -07:00
Nik Bougalis
bd3e4ac11c Correctly parse the --rpc_port command line argument 2015-09-28 16:49:46 -07:00
Nik Bougalis
926d08db6f Adjust ledger switch time and disambiguate logging:
- The new activation date for 1e9624270d
  is now October 27, 2015 at 11:00 PDT
2015-09-28 16:49:35 -07:00
Nik Bougalis
a23f6457dc Initialize HTTP client after the config is loaded 2015-09-27 13:17:20 -07:00
Vinnie Falco
4f9dba22c7 Set version to 0.29.1-rc1 2015-09-25 16:21:44 -07:00
Vinnie Falco
97e1a7db25 Merge branch 'release' into develop 2015-09-25 16:21:16 -07:00
JoelKatz
e03effd63b Disable compatible ledger safety if quorum is strict 2015-09-25 14:18:18 -07:00
JoelKatz
f9a65e4966 Add '--valid" command line option to consider starting ledger valid 2015-09-25 14:18:06 -07:00
JoelKatz
3c52fdfabe Allow the "quorum" command line option to lock the quorum 2015-09-25 14:18:03 -07:00
Vinnie Falco
938b2fed7c Set version to 0.29.1-b14 2015-09-25 13:43:32 -07:00
JoelKatz
d6875975ab Fix OpenLedger::empty:
* Fix logic of OpenLedger::empty
* Add regression test
* Remove some dead code
2015-09-25 11:37:54 -07:00
seelabs
92b2ca70b7 Inject journals:
Calls to WriteLog are replaced with injected journals
2015-09-25 06:29:08 -07:00
Vinnie Falco
df6ac8f7f5 Use injected Logs 2015-09-25 06:29:07 -07:00
Nik Bougalis
fa796a2eb5 Inject Config:
* Use dependency injections instead
* Remove deprecated fee interfaces
2015-09-25 06:29:07 -07:00
Miguel Portilla
c7b3153958 Upgrade ripple-lib. Fix OS X warnings 2015-09-24 20:22:07 -04:00
Vinnie Falco
5bbb89753d Set version to 0.29.1-b13 2015-09-22 17:06:23 -07:00
Miguel Portilla
654084d181 Allow partialPayment with path_find 2015-09-22 17:05:51 -07:00
Nik Bougalis
094f08211a Set version to 0.29.1-b12 2015-09-21 10:55:57 -07:00
JoelKatz
74b0a7c633 Improve SHAMap missing node behavior:
* Prevent recursive invocation of missing node handler
* Do not throw from ledger constructor
2015-09-21 10:55:30 -07:00
JoelKatz
8f09d3449d Improve ledger replay logic
Build a replay structure holding the transactions
in execution order along with the close time. Use
this structure when replaying a ledger close.
2015-09-21 10:55:30 -07:00
JoelKatz
0c7a7903b6 Use the new OpenView/OpenLedger classes
The server's open ledger is now an instance of the OpenView
class, managed by an instance of the OpenLedger class. This
should improve the performance of operations on open ledgers
because they are no longer Ledger/SHAMap operation.
2015-09-21 10:55:30 -07:00
seelabs
6a8d24372e Fix Travis compile 2015-09-21 08:59:15 -07:00
Edward Hennis
884dc11365 Set version to 0.29.1-b11 2015-09-18 12:19:32 -04:00
Howard Hinnant
83830ef9c0 Install upper_bound in ReadView:
*  And use it in doLedgerData.
2015-09-18 12:18:41 -04:00
Tom Ritchford
849e1ce5f4 Bring some constants into RPC::Tuning.h. 2015-09-18 12:18:40 -04:00
Nicholas Dudfield
4eb6020813 Add npm test for ledger_data command. 2015-09-18 12:18:39 -04:00
Tom Ritchford
d655fdca56 Honor markers in ledger_data requests (RIPD-1010). 2015-09-18 12:18:39 -04:00
seelabs
b6df6748df Use gcc-5 in travis 2015-09-18 12:18:38 -04:00
seelabs
269809dd1a Transitional support gcc 5.2 2015-09-18 12:18:37 -04:00
Vinnie Falco
65fdf1dc5e Add order book stuffing tests:
* PlumpBook makes sure large order books remain sane
* OversizeMeta checks for tecOVERSIZE handling
* FindOversizeBook probes metadata offer limits
2015-09-18 11:51:49 -04:00
Vinnie Falco
60002bf9bc Improve Env::ter and ter() funclet 2015-09-18 11:51:48 -04:00
Vinnie Falco
dd94de2830 jtx: Allow disabling of sig checks 2015-09-18 11:51:47 -04:00
Howard Hinnant
37bf76692d Add override keyword on all derived functions:
This silences warnings on latest clang compiler.
2015-09-18 11:50:33 -04:00
Howard Hinnant
e1fc81f66f Add override keyword on all derived functions:
This silences warnings on latest clang compiler.
2015-09-18 11:50:33 -04:00
Tom Ritchford
b2cf1e4c65 Extract common function RPC::readLimitField. 2015-09-18 11:18:17 -04:00
Miguel Portilla
a65f692ab7 Disable RPC websocket coroutines 2015-09-18 11:16:12 -04:00
Howard Hinnant
44e4a50050 Fix stack bug in upper_bound 2015-09-18 11:14:34 -04:00
Vinnie Falco
ffbcb96eff Inject Application (cont.) 2015-09-18 11:09:40 -04:00
Scott Schurr
eed1a891a7 Remove TxnSignApiFacade (RIPD-945):
Replace TxnSignApiFacade with separate passed in arguments to
the various sign/submit RPC commands.

Also increase unit test coverage of the submit_multisign RPC
command.
2015-09-18 11:09:37 -04:00
Vinnie Falco
9b787434c9 Inject Application:
Calls to getApp are replaced with dependency injections.
2015-09-18 11:09:22 -04:00
Nicholas Dudfield
f4fe55caff Add coverage tracking via codecov.io
Conflicts:
	.travis.yml
2015-09-17 15:57:56 -04:00
Edward Hennis
8df88238cd Migrate Travis to container-based infrastructure
* http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade
2015-09-17 11:46:06 -04:00
Nik Bougalis
ea0bd08660 Set version to 0.29.1-b10 2015-09-13 14:28:46 -07:00
Tom Ritchford
c1f50ca7b3 Use lambdas everywhere in JobQueue.
Conflicts:
	src/ripple/app/ledger/impl/LedgerConsensusImp.cpp
2015-09-13 14:28:38 -07:00
Tom Ritchford
a6f866b4d8 Use std::function in JobQueue. 2015-09-13 14:28:38 -07:00
Tom Ritchford
545b2fd6b1 Better suspend for continuation 2015-09-13 14:28:38 -07:00
JoelKatz
b0a855a10e Upgrade SQLite from 3.8.8.2 to 3.8.11.1 2015-09-13 14:28:37 -07:00
seelabs
b5600e940a Minor VS2015 doc update 2015-09-13 14:28:37 -07:00
seelabs
7f5d273e53 Tidy SetHex* function calls & misc cleanups
* Renamed SetHexExact -> SetHexUnchecked
* Removed calls to SetHexUnchecked with empty strings
* Marked ledger class as final, as it calls virtuals in its ctor
2015-09-13 14:28:37 -07:00
Nik Bougalis
b0e6be93ff Add Rate class to support scaling of IOU and XRP amounts 2015-09-13 14:28:37 -07:00
Nik Bougalis
324c42ae09 Support to_string for IOUAmount and XRPAmount 2015-09-11 14:10:35 -07:00
Nik Bougalis
acd03faee5 Use XRPAmount for fees and ledger headers 2015-09-11 14:10:35 -07:00
Nik Bougalis
94af42da44 Support STAmount conversions to XRPAmount and IOUAmount 2015-09-11 14:10:35 -07:00
Nik Bougalis
1e9624270d Make ledger close times increase strictly monotonically 2015-09-11 12:50:26 -07:00
Nik Bougalis
a50d67257c Limit the total number of offers processed while crossing 2015-09-11 12:46:03 -07:00
JoelKatz
3759c553b0 Remove unfunded offers on tecOVERSIZE 2015-09-11 12:39:08 -07:00
JoelKatz
332114c02a Allow more deliver loops when multiquality 2015-09-11 12:33:19 -07:00
Nik Bougalis
5d841c13b7 Set version to 0.29.0-hf2 2015-09-09 15:19:59 -07:00
Nik Bougalis
caecf78a6d Limit the total number of offers processed while crossing 2015-09-09 15:18:58 -07:00
JoelKatz
408a62f7d0 Remove unfunded offers on tecOVERSIZE 2015-09-09 15:18:58 -07:00
JoelKatz
b822d061ef Allow more deliver loops when multiquality 2015-09-09 09:50:57 -07:00
Vinnie Falco
020a112e77 Set version to 0.29.1-b9 2015-09-08 19:20:54 -07:00
Vinnie Falco
8e33ae78f8 Create zero balance trust lines with auth flag (RIPD-1003):
This allows a TrustSet transaction to create a trust line
if the only thing being changed is setting the tfSetfAuth
flag.
2015-09-08 19:18:08 -07:00
wltsmrz
dbddc6b7f2 Update integration tests 2015-09-08 19:14:42 -07:00
Vinnie Falco
f32be2b28d Fix SusPay condition check in Finish:
On a SusPayFinish, a check is added to make sure that the
presented digest matches the digest in the SusPay ledger
entry. Another check is added to make Finish transactions
containing sfProof fields that are not 32 bytes malformed.

This includes regression unit tests.
2015-09-07 18:12:46 -07:00
Vinnie Falco
0f05ebd834 Set version to 0.29.1-b8 2015-09-07 14:05:27 -07:00
Edward Hennis
26fc812e21 Changes to support VS2015 2015-09-07 14:04:53 -07:00
Edward Hennis
14db51e3e4 Visual Studio 2015 support 2015-09-07 14:04:53 -07:00
Edward Hennis
8f3bb286f2 Changes to support VS2015 2015-09-07 14:04:53 -07:00
Nik Bougalis
258c93f8d8 Set version to 0.29.1-b7 2015-09-07 11:28:28 -07:00
JoelKatz
88f885f2e7 Limit changed node count 2015-09-07 11:27:15 -07:00
Nik Bougalis
91eee1a42d Limit the number of offers that can be consumed during crossing 2015-09-07 11:27:09 -07:00
Nik Bougalis
6a55f99ede Set version to 0.29.0-hf1 2015-09-07 09:17:06 -07:00
JoelKatz
0b457497d0 Limit changed node count 2015-09-07 09:16:30 -07:00
Nik Bougalis
b7c9e33343 Limit the number of offers that can be consumed during crossing 2015-09-07 09:00:25 -07:00
Scott Schurr
502d5689bf Set version to 0.29.1-b6 2015-09-03 16:53:12 -07:00
seelabs
d015debe2b Remove unused config param 2015-09-03 15:45:24 -07:00
Howard Hinnant
d8aab5a749 Optimize SHAMapItem construction 2015-09-03 14:18:43 -07:00
Vinnie Falco
7ed2094a6a Fix missing 'age' field from server_info 2015-09-03 14:11:46 -07:00
Miguel Portilla
464410d8be Differentiate path_find response (RIPD-1013) 2015-09-03 14:05:48 -07:00
Vinnie Falco
aa0e17dd93 Add consensus simulations 2015-09-03 13:44:37 -07:00
Vinnie Falco
4e345b1c8a Make suite::log_t public 2015-09-03 13:27:16 -07:00
Vinnie Falco
b2cb4df29a Make suite::log_t public 2015-09-03 13:27:16 -07:00
Miguel Portilla
3d777f3f5d Convert all of an asset (RIPD-655) 2015-09-03 13:10:50 -07:00
Vinnie Falco
1842878c40 Tidy up STPathElement constructor 2015-09-03 12:59:15 -07:00
Vinnie Falco
23f47adb60 Add jtx::path funclet 2015-09-03 12:52:02 -07:00
Nicholas Dudfield
377e3d479c Always show fields that contribute to the hash in ledger header json 2015-09-03 12:30:33 -07:00
Tom Ritchford
d5193a776e Replace calls to new(). (#243)
* Replace all unavoidable uses of `new` with `std::make_unique` or
  `std::make_shared`.

* Fix some 80-column issues.
2015-09-03 12:09:44 -07:00
Scott Schurr
ef51128270 Enable simple multisign with a Feature (RIPD-182):
Eventually multisign will need to be enabled onto the network, at
which point compiling it in or out will no longer be an option.
In preparation, the compile guards are removed and multisign is
being enabled with a Feature.

You can locally enable a Feature using your config file.  To
enable multisign with your config file add a section like this:

[features]
MultiSign

The exact spelling and capitalization of both "features" and
"MultiSign" is important.  If you don't get those right multisign
will not be enabled.

There is a minor issue.  The "sign_for" and "submit_multisigned"
RPC commands are only enabled if multisign is enabled.  However
those commands are still shown in the help message even if
multisign is disabled.  This is because the code that produces
the help message doesn't read the config file (where the Features
are kept).  This problem will become irrelevant once multisign is
enabled onto the network.
2015-09-03 11:43:25 -07:00
Scott Schurr
9b15c88b0e Make Rules available outside of Transactors (RIPD-182):
Allows multisign to be enabled with a Feature.
2015-09-03 11:36:23 -07:00
Scott Schurr
f1c29ae20b Allow an account to be exclusively multisigned (RIPD-182):
An account can be made signable with only its regular key by
disabling the master key.  Now an account can also be made
exclusively multisigned by both disabling the master key and
having no regular key.

In order to prevent an account from becoming unsignable the
network uses these rules:

 o An account can always add or replace a regular key or a
   SignerList as long as the fee and reserve can be met by the
   account.

 o The master key on an account can be disabled if either a
   regular key or a SignerList (or both) is present on the account.
   Either the regular key or the SignerList can be used to
   re-enable the master key later if that is desired.

 o The regular key on an account may only be removed if either the
   master key is enabled or the account has a SignerList (or both).

 o The SignerList on an account may only be removed if either the
   master key is enabled or a regular key is present (or both).

As a consequence of this change, the tecMASTER_DISABLED error
code is renamed to tecNO_ALTERNATIVE_KEY.  The error code number
(130 decimal) is unchanged.
2015-09-03 11:16:36 -07:00
Nik Bougalis
6d2e3da306 Set version to 0.29.1-b5 2015-08-18 11:16:25 -07:00
seelabs
7695ea2822 Remove obsolete test file 2015-08-18 11:16:18 -07:00
seelabs
c729ceab20 Add includes for boost in_place 2015-08-18 11:16:18 -07:00
seelabs
e8643dd8cc Fix calling incorrect require function in tests 2015-08-18 11:16:18 -07:00
Miguel Portilla
7b69592fe1 Pass by reference in succ 2015-08-18 11:16:18 -07:00
Howard Hinnant
12e11721f9 Eliminate redundant traversal logic of SHAMap:
*  Only the const_iterator interface remains.
2015-08-18 11:16:18 -07:00
Tom Ritchford
96c13f0d98 Restrict source files to 80 columns. 2015-08-18 11:16:18 -07:00
Edward Hennis
df728cd2cd Reference fee unit clean up
* Use config object or ledger instead of hard coded value.
* The value is still const, and has no change mechanism.
2015-08-18 11:16:18 -07:00
Edward Hennis
0d7cad8d64 Devirtualize HashRouter
* Include some simple renames
2015-08-18 11:16:17 -07:00
Nicholas Dudfield
d69285f6ad Use unabbreviated "SuspendedPayment" for LedgerEntryType 2015-08-18 11:16:17 -07:00
Scott Schurr
b8e192e058 Increased fees for multisigned transactions (RIPD-182):
Multisigned transactions place a higher load on the network than
non-multisigned transactions, requiring a higher fee.

- A non-multisigned transaction always has a minimum fee - the
  network base fee.

- A multisigned transaction has a minimum fee equal to the number
  of multisigners plus one times the network base fee.
2015-08-18 11:16:17 -07:00
Vinnie Falco
aeebfeab10 Remove unused unl module code 2015-08-18 11:16:17 -07:00
Vinnie Falco
8aafebbb75 Move tests to app/tests 2015-08-18 09:02:25 -07:00
Vinnie Falco
c3da2e1f03 Update to soci 3.2 2015-08-18 08:48:16 -07:00
Nik Bougalis
c8c8003677 Merge commit 'caab155a00ca0158dcb16844bea5326e2a2c2562' into dn 2015-08-18 08:47:41 -07:00
Nik Bougalis
caab155a00 Squashed 'src/soci/' changes from 6e9312c..b2855dc
b2855dc Merge pull request #378 from ravselj/sqlite_memory_leak
bf5dad9 Memory leak fix in sqlite3_session_backend.
165737c Fix incorrect pointer instead pointee comparison.
625db74 Merge pull request #376 from ravselj/cmake_debug_postfix2
f3a1055 Added proper support for SOCI_DEBUG_POSTFIX by changing backend-loader macro. If debug postfix is specified in CMake then it is passed forward to soci-core backend loader which then combines proper name based on build configuration.
3459d7d Minor CMake fix that checks if shared mode is set before adding shared test(s).
66d407a Merge pull request #373 from musopr/ambiguous_session
9070742 Merge pull request #372 from musopr/clang_cxx_c11
7b08ec7 Fixed ambiguous 'session' reference
e9748de Include SOCI_CXX_VERSION_FLAGS when compiling Clang
abd6775 Merge pull request #368 from ravselj/cmake_debug_postfix
cae0086 Added CMAKE_DEBUG_POSTFIX to SOCI_LIB_SUFFIX. This fixes backend loading when CMAKE_DEBUG_POSTFIX is used.
3dd4726 Enable MSVC multi process compiling by setting /MP flag.( VS2005+ )
e5f577f Merge pull request #365 from ravselj/sqlite_msvc_fixes
c4dde08 Some trivial fixes in code to resolve MSVC warnings in SQLite back-end
330f0e0 Merge pull request #364 from ravselj/connection_pars
b78c8ef Merge pull request #358 from ArnaudD-FR/bind_clean_up
9f415ee Merge pull request #362 from ArnaudD-FR/sqlite3_optim_split
f1f0162 sqlite3 backend optimizations
0b1a835 Include soci-platform.h because of snprintf
ac65d58 Merge pull request #361 from ArnaudD-FR/blob
24c8383 Bug fix - std::map with key type of const char* is replaced with std::string
3e02a54 Changes due to compiler warnings.
0c88f8c New data_type dt_blob and simple-interface support
403b8de Fix bind_clean_up when using 'row'
92ada95 Merge pull request #363 from ravselj/oracle_win_fix
d1ad52f Add a unit test for CHAR(N) fields padding behaviour.
274d08a Explicitly set character set in Firebird unit tests for CHAR(N).
7623f76 More and better MSVC warnings fixes.
caa2370 Removed dummy and not compilable operator<<(boost::optional).
c025cc8 Fix inserting strings longer than 8000 bytes with ODBC/MS SQL.
d8d765f Update documentations
b5d6507 - oracle cmake Windows fix - test oracle compilation error fix
a6b3514 Split Statement::clean_up into bind_clean_up and clean_up
ba453c7 Make SQL state in ODBC backend error messages more clear.
a374e54 Make ODBC backend error messages more homogeneous.
c4255c9 Delete old /docs folder.
0d3b6b9 Merge pull request #344 from OniDaito/markdown_doc
04f9461 Merge pull request #352 from ravselj/cmake_bug_shared
955a915 - CMake bug fix when building MSVC with SHARED option enabled
f7be373 Merge pull request #348 from msobczak/classic-makefiles
36f373f Added classic Makefile for PostgreSQL test.
615cb94 Updated classic Makefile for PostgreSQL backend.
821092c Don't use both -ansi and -std=gnu++98 flags with g++.
07543f5 Merge pull request #346 from msobczak/classic-makefiles
291fbe7 Merge pull request #347 from jsonn/master
a87776e Make it easier to override SOCI_LIBDIR.
96e66f5 Corrected handling of generated file with backend search path.
0b26c32 Updated classic Makefiles for Oracle Express 11.2.
15a3705 Removed all the crap debian packaging threw in
6db2a65 Merge pull request #343 from OniDaito/master
cf11404 Added Markdown docs
ffbfdc0 Inlined the pragmas for the C++11 tests
ae3ac9d Mistake with CXX11 pragma fixed in session.h
303a966 Merge pull request #341 from mloskot/issues/340
7d7516d Add more qualifications uses of session class with namespace soci::session.
caa3e2b Merge pull request #335 from mloskot/issues/258
1e89d43 Fully qualify uses of session class with namespace soci::session.
1ed81ca Restore setting session with query transformation
84d29e2 Merge branch 'pull/336'
949924a Cope with GNU <=4.6 warning about the #pragma
3494b2b Wrap stream operator for boost::optional<int> with HAVE_BOOST
af4b1a3 Report SOCI_CXX_C11 in CMake output
5744a16 Merge branch 'master' of https://github.com/OniDaito/soci into pull/336
0ab7b37 Remove old build .tcl scripts.
8f2195a Check Postgression availability before proceeding with build.
cd3af53 Remove #include "error.h" of non-existent header
48a8bfa Added the C++11 changes back in
1aee2d1 Add -Wl,-flat_namespace -Wl,-undefined -Wl,suppress to LINK_FLAGS on Apple/OSX
2bf3aa7 Disable test of set_query_transformation with C++ lambda
1d26033 CMake should not terminate on unknown toolset
d8b64cb Remove SociSystemInfo.cmake modul as redundant.
fc3391f List Boost.DateTime in core dependencies
f4ff281 Indicate Travis CI builds Oracle WITH_BOOST=OFF
4863376 Merge pull request #326 from mloskot/issues/224
0c18240 Restore Oracle build with tests on Travis CI.
bc4abd7 Throw instead of truncating VARCHAR columns in Firebird backend.
4c612af No changes, just small code simplification in Firebird backend.
ba206ed Extract common part of MySQL and ODBC MySQL tests in a header.
a0fd859 Remove asserts from the SOCI headers and code.
b36944c Check vector indices instead of asserting that they are valid.
75ef8d8 Handle dt_unsigned_long_long in the "simple" SOCI layer.
2e2f60b Remove asserts on unknown type from the "simple" SOCI layer.
e21aef7 Throw instead of asserting if connection_pool::lease() fails.
4b4cecb Replace left over asserts with CATCH CHECK in the tests code.
388a8d3 Use compile-time asserts to check SQLINTEGER size.
af80fd8 Use SQLT_BDOUBLE instead of SQLT_FLT in Oracle backend.
c74132b Fix warning about pointer-to-int conversion in Firebird backend.
4916551 Reorganize more unit tests to use CATCH sections.
787b428 Fix duplicate test name in Oracle unit tests.
7f65799 Avoid warnings about int-to-pointer conversions in DB2 backend.
7e80c68 Use parameter names from the query, if given, in error messages.
8b0c372 Don't clean up SQLite3 statement prematurely.
9119ed8 Rename db2_statement_backend::names field to names_.
f5c86b7 Make SOCI_NORETURN public and use it in declaration.
62c17b2 Add mktime_from_ymdhms() helper.
ee0b9e4 Fix a clash between CATCH test cases defined in different files.
60a33f4 Reorganize "Use and into" unit test to use CATCH sections.
db59a48 Merge pull request #314 from rpiotaix/release/3.2
82ea95f Don't add DB2_INCLUDE_DIR to global include directories.
4f570d7 Restore Travis CI builds for other databases
71edca9 Merge pull request #306 from mloskot/postgression
1e4b365 Add a Travis build using PostgreSQL server at Postgression.
6abb7e1 Typo
1ccff47 Replace raw & with &amp; entity.
56d3aa6  No real changes, just remove trailing whitespace.
ef6d90d Fix previous attempt to correct include of SQLite3 backend header
31a22a1 Include SQLite3 backend public headers using soci/ prefix.
e4376ed Merge branch 'master' into develop-3.2.3
111b50a Merge branch 'hotfix/3.2.3'
0ef4912 Add 3.2.3 release notes
8da98b2 Add new contributors
ee7e155 Bump version number in docs
30c02f3 Merge branch 'master' of git://github.com/Alex-Vol/soci into hotfix/3.2.3-PR263
5577606 Improve readability of ODBC error message Closes #229
8e14c5b Improve error message when an odbc error occurs
8a50af6 Merge branch 'hotfix/3.2.3' of https://github.com/SOCI/soci into hotfix/3.2.3
a948ab3 Remove unused HAVE_XXX defines
2c85be1 Fix missing strtoll on Cygwin and MinGW
d9c059e Clarify documenation and examples on bulk operations.
a08d750 [travis] Disable Oracle build
70e67aa Replace prefix underscore with suffix in private member names
c799e4f Append each member of tuple/fusion instead of adding tuple/fusion
645e7a2 Merge github.com:pacocamberos/soci into pacocamberos-branch-mysql-blob
e96bc2b Ignore CMakeLists.txt.user created by Qt Creator IDE
f694e30 Bump library version number to 3.2.3
5ecebe9 fixed link error for msvc 64 bit
3278579 Fix email notifications for Travis CI builds.
ad9075c Configure Travis CI to fail the build a.s.a.p.
7481868 Explicitly set extra_float_digits when using PostgreSQL in ODBC.
83bbbd4 update sqlite3 backend documentation
57530a1 Merge pull request #302 from vadz/rich-exceptions
5cda82a Avoid throwing from soci_error copy ctor and assignment operator.
8bb6610 Provide context of the error in soci_error when possible.
a8ba1cb Add use_type_base::dump_value() for richer diagnostics.
76b3089 Add soci_error::get_error_message() method.
e8e5978 No real changes, just remove trailing whitespace.
a90018b Merge catch-tests branch.
7b8b37b Use REQUIRE() and not CHECK() for a test that can't be allowed to fail.
c9dbe19 Move all tests from tests/assert to tests directory itself.
246f657 Convert the tests to use CATCH testing framework.
b2060fb Add single header version of CATCH testing framework.
b87407e Add values::get_number_of_columns() accessor.
9628081 Define SOCI_NORETURN: a portable __attribute__((noreturn)) equivalent.
6ebcbcd Remove the never used details::statement_impl::namedUses_.
0f1f295 Add helper exchange_type_cast<>() template function.
02207fc Rename "version" class in the ODBC test to "odbc_version".
42549d0 Merge pull request #297 from nbougalis/unshadow
7d5eb2d Use a base-class member instead of shadowing it.
37fbe8f Don't always disable ODBC MS SQL test under Unix, just when using Travis.
ed37399 Fix ODBC backend get_affected_rows() when using FreeTDS driver.
f212ca9 Skip test which fails when using ODBC with MS SQL Server.
629386f Merge pull request #294 from denisarnaud/develop
294becb Fix for the issue #169: cleaner way to include headers.
120b88c Accept oraocci12 as a possible Oracle library name too.
8e1ddcd Merge pull request #213 from ayllon/develop
6552eb1 No real changes, just simplify Firebird backend code a little.
34be702 Test exact round trip for NUMERIC values for all backends.
24c0539 Fix rounding error in Firebird NUMERIC/DECIMAL conversions.
69352bc Speculatively enable exact floating point comparisons for all backends.
f497fb8 Disable exact floating point when using PostgreSQL ODBC driver.
6f9dd54 No changes, just fix a repetitive typo in "assert" in comments.
02f0a69 No changes, just remove annoying "EXECEPTION" typo.
4bf2d3c Explicitly disable exact floating point comparison in MySQL test.
1f3dd92 Replace accidental assignment with a comparison in Firebird unit test.
c3cd309 Make text-to-double conversion exact in PostgreSQL backend.
ff9146a Explicitly disable exact floating point comparison in SQLite test.
7039d00 Compare floating point values exactly in tests whenever possible.
53cd24e Don't start implicit transaction too eagerly in Firebird backend.
66f0d82 Add possibility to build Firebird using embedded library.
1489811 Update version to 4.0.0 in cmake too.
5838cc6 Reenable building, if not testing, Oracle backend.
dc4fb73 Move ORACLE_HOME to Oracle-specific script.
f9167a1 Avoid many warnings about floating point values comparison.
c85744b Define GCC_WARNING_SUPPRESS and GCC_WARNING_RESTORE macros.
ef7e9a9 Avoid warning about set but unused variable in Oracle backend.
86a4598 Avoid g++ warnings about casting away const with C-style casts.
2c887b3 Ignore CMake-generated files.
f61d7f5 Add missing include for std::max
21824a1 fixed deadlock in soci::connection_pool::try_lease
6e6bd46 Documentation for SQLite3 result code support.
97cbb0a Update PostgreSQL backend documentation for UUID type support.
5448cf1 Spelling fix in an error message: s/Commiting/Committing/.
5b073e3 Remove the unnecessary "error.h" inclusion from PostgreSQL code.
5776dd4 Introduced sqlite3_soci_error exception as subclass of soci_error. This new exception exposes the SQLite3 result code returned when any failure happens. Using this method is preferable to scrubbing string error messages in soci_error exceptions. Useful when there needs to be a distinction between general errors and database constraint errors. Unit test added to prove the funtionality does what is expected.
6d766e7 Introduced support for UUID column type in PostgreSQL statement.cpp. Unit test added for UUID column support testing all supported kinds of UUID formatted strings on input and standardized UUID formatted strings on output.
e106dc0 Optionally use the environment locale in the tests.
1b65061 Make sqlite3 and mysql backends work with any locale too.
8548642 Use locale-independent function for converting doubles to strings.
1260d4f Reimplement cstring_to_double() without using C++ standard library.
bc884fe Remove unused HAVE_XXX defines
4ffb21b Fix missing strtoll on Cygwin and MinGW
7bd4991 Clarify documenation and examples on bulk operations.
4d0785e Temporarily disable using Oracle backend on Travis.
da7e42c Merge pull request #242 from vadz/pgsql8-bytea
070b278 Merge branch 'fix_odbc_msvc_x86_64' of github.com:snikulov/soci into snikulov-fix_odbc_msvc_x86_64
fce8560 [travis] Disable Oracle build
0ff0e01 Replace prefix underscore with suffix in private member names
65a5ee3 Append each member of tuple/fusion instead of adding tuple/fusion
8e9fb42 Merge github.com:pacocamberos/soci into pacocamberos-branch-mysql-blob
3dca4e3 Ignore CMakeLists.txt.user created by Qt Creator IDE
de7e6f0 Bump library version number to 3.2.3
946dd5a Fix PostgreSQL unit test to pass with PostgreSQL < 9.0.
0a47eaf vs2013 got strtoll/strtoull
58d31f9 Update version to 4.0.0.
89df841 Merge pull request #239 from vadz/soci-headers-prefix
417ef5c Include all public headers using "soci/" prefix inside SOCI itself.
5a99a15 Merge pull request #238 from vadz/cstrtod
0585bb1 Merge pull request #237 from vadz/odbc-header-fix
6f4162c Add helper cstring_to_double() and use it in PostgreSQL backend.
73119cb Fix compilation of ODBC-specific SOCI header with new include paths.
d877390 Delete obsolete src/<backend>/test directories
06a970f Revert CMake setup for ODBC DB2 test
f04147a Move ODBC test DSN files to new tests location
0219c43 Fix paths to ODBC test DSN files
928174c Fix Firebird includes of private headers
bc171b6 Fix copy-n-paste error in CMake macro parameter name
1f4d6ef Fix includes to point to backend headers in subdirectories
552e81c Enable other tests in tests/assert
7a018a3 Move tests/assert into separate subdirectories
e2ec7ff Ignore Qt Creator and Eclipse files
5d527ec Fix windows.h case for cross-compilation
024ccc8 Firebird: fix harmless warning in 64 bit builds.
802f78e Merge pull request #216 from dgrambow/develop
32c5f88 Add get_last_insert_id tests for sqlite3 and mysql backends
ccd4c0d Add get_last_insert_id for sqlite3 and mysql backends Update docs/beyond.html accordingly
42aec23 Fix in soci::oracle to allow spaces in the params
b2ea9f7 fixed link error for msvc 64 bit
ef69fa9 [travis] Disable building tests due to #199
09acb8c [travis] Fix bash script syntax error
cba671f [travis] Disable ctest run due to #199
d8f7d9d [travis] Restore soci-devel notifications
22257b3 [cmake] Remove unused log message
0cffb8a CMake 2.8.7 have problems with per target includes
b430cb0 Attempt to correct -I paths for backend test
6c0721d Attempt to correct -I paths for backend folders
69d70c5 [travis] Disable tempoarily soci-devel notifications
f4802f1 [travis] Log build script name
8890aea [travis] Set CMAKE_VERBOSE_MAKEFILE=ON
717c38a [travis] Remove superfluos ] from make invocation
843a43c Fix travis-ci to run CMake from root directory
9e43795 Update copyright year
da025df Merge branch 'feature/125-new-layout' into develop
04a34f2 Link presentation from London C++ Meeting
11ef1fa Fix doc/index.html menu links
5393ee5 Merge branch 'hotfix/3.2.2' into develop
b6d97ff Implement new source tree layout #125

git-subtree-dir: src/soci
git-subtree-split: b2855dce54340522f149221c6ebe2d14fd1129ba
2015-08-18 08:43:51 -07:00
Nik Bougalis
1b85b6eaba Set version to 0.29.1-b4 2015-08-04 14:55:43 -07:00
JoelKatz
863add6a19 Remove spurious format string from log 2015-08-04 14:55:30 -07:00
JoelKatz
64b80e0573 Fix ledger loading on startup 2015-08-04 14:55:30 -07:00
Nik Bougalis
ed902d9dea Set feature activation date to Aug 17 2015-08-04 14:55:30 -07:00
Nik Bougalis
f38b373cb6 Exit if OpenSSL doesn't have secp256k1 support (RIPD-900) 2015-08-04 14:40:16 -07:00
Nik Bougalis
b8f2fdb6ac Remove obsolete DHUtil 2015-08-04 14:40:16 -07:00
Nik Bougalis
182f570f24 Reduce Transactor virtual interface 2015-08-04 14:40:16 -07:00
Nik Bougalis
5b90ccf65d Validate fee during preflight 2015-08-04 14:40:16 -07:00
Edward Hennis
22a8e25538 Fix display discrepancy in fee. 2015-08-04 14:40:16 -07:00
Edward Hennis
d63aab6312 Test display discrepancy in fee. 2015-08-04 14:40:16 -07:00
Tom Ritchford
641ab8ddaf Replace tabs with spaces. 2015-08-04 13:51:02 -07:00
seelabs
774dcad392 Remove common_ledger 2015-08-04 13:51:02 -07:00
Tom Ritchford
7b7b27ee9e Replace tabs with spaces. 2015-08-04 13:51:02 -07:00
Vinnie Falco
c5adbc859a Fix OpenView::sles 2015-08-04 13:51:02 -07:00
Vinnie Falco
2cc12b2f2f Add Env::meta() 2015-08-04 13:51:02 -07:00
Vinnie Falco
13b33b5d4d Store STTx in JTx
Conflicts:
	src/ripple/test/jtx/impl/Env.cpp
2015-08-04 13:51:02 -07:00
Howard Hinnant
c7dea3ed17 Improve LoadFeeTrack::scaleFeeLoad:
* Move lock protection to where it is needed.
* Use gcd to reduce problem to lowest terms.
* Use improved overflow avoidance to retain
  as much precision as possible.
* Detect overflow if it can be shown that the
  final result will not fit in a uint64_t.
2015-08-04 13:51:01 -07:00
Edward Hennis
a7e6ecb5b3 Devirtualize LoadFeeTrack 2015-08-04 13:51:01 -07:00
Nik Bougalis
5964710f73 Set version to 0.29.0 2015-08-04 13:22:45 -07:00
Nik Bougalis
262a61564c Set feature activation date to Aug 17 2015-08-04 13:22:17 -07:00
Edward Hennis
4cc4421c82 Fix display discrepancy in fee. 2015-08-04 11:22:38 -07:00
JoelKatz
2786950c16 Fix ledger loading on startup 2015-08-04 11:05:02 -07:00
Nik Bougalis
e45c1b238f Set version to 0.29.1-b3 2015-07-31 17:42:16 -07:00
Tom Ritchford
d166e6a45e Add more documentation to Builds/Test.py. 2015-07-31 17:41:27 -07:00
Vinnie Falco
e759137f15 Thread SusPay to all affected accounts 2015-07-31 17:41:05 -07:00
JoelKatz
0bb570a36d Be paranoid about ledger compatibility:
* Consider ledgers incompatible based on last valid ledger
* Test against even ledgers not acquired yet
* Don't validate an incompatible ledger
* Don't switch to an incompatible ledger
* Protect against an unreasonably small quorum
2015-07-31 17:40:39 -07:00
JoelKatz
38c6083a2f Reduce some logging severity 2015-07-31 17:39:39 -07:00
JoelKatz
cfdf0d2f0a Remove a ledger from the set of present ledgers where needed
* If we encounter it in RPC
* If we fully-validate a ledger that doesn't have it in its history
2015-07-31 17:39:35 -07:00
JoelKatz
f0dc2bc425 Confirm valid suspend before relying on suspension 2015-07-31 17:39:14 -07:00
Tom Ritchford
b783e353c4 Remove trailing spaces. 2015-07-31 17:39:03 -07:00
Tom Ritchford
32ec3fe089 Remove trailing spaces. 2015-07-31 17:39:03 -07:00
Scott Schurr
9e69bd5c56 Simple multisigning (RIPD-182):
With this changeset two-level multisigning is removed from the
codebase and replaced with single-level multisigning.

Additionally, SignerLists in the ledger are prepared for the
possibility of multiple SignerLists per account.  This was done
by adding a defaulted 32-bit SignerListID to each SignerList.
The SignerListIndex calculation incorporates the SignerListID.

There are three known missing elements:

 1. Multisigned transactions should require higher fees than
    regular (single-signed) transaction.  That's not yet
    implemented.

 2. It should be possible to disable the master key on an account
    if that account is multisign enabled (has a signer list).
    That's not yet implemented.

 3. Documentation about multisigning needs to be improved.

Multisigning is still compiled out of the code base.  To enable
multisigning for a stand-alone rippled, change the
RIPPLE_ENABLE_MULTI_SIGN macro (in BeastConfig.h) to "1" and
rebuild.

This commit also addresses:
 o RIPD-912: Remove multisign APIs from STObject, and
 o RIPD-944: Replace common_transactor with jtx at call sites.
2015-07-31 17:31:18 -07:00
Vinnie Falco
ceeb36039e New peer to peer network simulators 2015-07-31 17:31:01 -07:00
Vinnie Falco
2bfae2f0ac Tidy up UNL module:
* Renamed module to unl
* Renamed classes and members
* Removed cyclic dependency in Horizon
2015-07-31 17:30:56 -07:00
Vinnie Falco
b25f322c93 Set version to 0.29.0-rc6 2015-07-29 18:43:02 -07:00
JoelKatz
f77ecba896 Confirm valid suspend before relying on suspension 2015-07-29 18:42:14 -07:00
Nik Bougalis
5d2d88209f Set version to 0.29.1-b2 2015-07-29 12:50:58 -04:00
Nik Bougalis
ecf1a3c69c Initialize close offset 2015-07-29 12:50:41 -04:00
Vinnie Falco
3f0eacf5e7 Add SuspendedPayment feature (RIPD-992):
The code is enabled in jtx::Env, and enabled in production
ledgers only if the SuspendedPayment amendment is voted
into a ledger.
2015-07-29 11:56:10 -04:00
Vinnie Falco
d49f9ea109 Add [features] section to .cfg:
This non-production config section allows features to be enabled
by listing their text descriptions, one line each, in the config
section titled "features".

NOTE: Feature names with leading or trailing whitespace, or
      containing an equals sign ('=') are not supported.
2015-07-29 11:56:08 -04:00
Vinnie Falco
2ec40cb6f1 Add operator[] field accessors to STObject:
New array index operators allow for concise reading and
writing of fields in the STObject, with associated unit test.
2015-07-29 11:56:07 -04:00
Vinnie Falco
3e342e4b71 Add st.h module header 2015-07-29 11:56:05 -04:00
Vinnie Falco
147fee0272 Add describeOwnerDir 2015-07-29 11:56:04 -04:00
Vinnie Falco
fa900de548 Fix applyFlags when testing is disabled 2015-07-29 11:56:02 -04:00
Vinnie Falco
1883b40083 Add except, unexcept in suite 2015-07-29 11:56:01 -04:00
Vinnie Falco
8cd44c637d Add except, unexcept in suite 2015-07-29 11:56:01 -04:00
Vinnie Falco
729caaacff Add THROW contract call 2015-07-29 11:56:00 -04:00
Edward Hennis
2f5d721ec1 Track STTx validity with HashRouter. (RIPD-977) 2015-07-29 11:55:58 -04:00
Edward Hennis
c15394c42a Add preflight functionality to transactors:
The preflight() function performs static validity
analysis of transactions without requiring a ledger.

* Use tx in ApplyContext
* Remove unused journal
* Document apply()
* Add preflight(), which takes an OpenView, uses its rules.
* Change `TER preCheck` to `void preCompute` since it can no longer fail.
2015-07-29 11:55:57 -04:00
JoelKatz
36a62f110c Switch some Ledger instances to ReadView instances
* Remove ltCURRENT
* Change getOwnerInfo
* Use ReadView in TransactionSign
* Change AcceptedLedger and ProposedTransaction to use ReadView
* Change RPC::accounts
2015-07-29 11:46:01 -04:00
Nik Bougalis
2d02b46253 Fix parsing in ledger_request 2015-07-28 20:27:00 -07:00
Miguel Portilla
6cf75f0fc2 Add uptime to crawl data (RIPD-997) 2015-07-28 20:26:51 -07:00
Nik Bougalis
1a3e2e3f36 Set features activation to Aug 10 2015-07-28 20:26:41 -07:00
Tom Ritchford
645e32b19e Fix coroutine suspend 2015-07-28 20:26:30 -07:00
Tom Ritchford
fa0a61b5d7 Revert "Always use co-routines:"
This reverts commit 3d6e76046c.
2015-07-28 20:26:19 -07:00
Nik Bougalis
2336fe2708 Set version to 0.29.0-rc5 2015-07-28 20:14:10 -07:00
Nik Bougalis
0cbd81146f Fix parsing in ledger_request 2015-07-28 20:07:53 -07:00
Miguel Portilla
a268c1a7ad Add uptime to crawl data (RIPD-997) 2015-07-28 20:07:53 -07:00
Nik Bougalis
3b7107b255 Set features activation to Aug 10 2015-07-28 20:07:53 -07:00
Tom Ritchford
a2ea89c64e Fix coroutine suspend 2015-07-28 20:07:19 -07:00
Tom Ritchford
b44cb1a64c Revert "Always use co-routines:"
This reverts commit 3d6e76046c.
2015-07-28 19:27:27 -07:00
Vinnie Falco
1dc3acb071 Set version to 0.29.1-b1 2015-07-23 14:23:23 -07:00
Vinnie Falco
0cf58cc505 Add Rules to ReadView:
An instance of Rules provides information on the tx
processing rules in a particular ledger.

* OpenView allows rules to be set on construction.

Conflicts:
	src/ripple/unity/ledger.cpp
2015-07-23 14:23:13 -07:00
Vinnie Falco
eb49e1bf47 Convert OrderBookDB to ReadView 2015-07-23 14:23:13 -07:00
Vinnie Falco
0627d3487b Add OpenLedger::empty 2015-07-23 14:23:13 -07:00
Vinnie Falco
5063839ce5 Remove deprecated abstract_clock::elapsed 2015-07-23 14:23:12 -07:00
Vinnie Falco
84161b86c7 Add ReadView::sles 2015-07-23 14:23:12 -07:00
Vinnie Falco
110bbf3956 Add CachedLedger:
This type alias provide cache-wrapping for Ledger objects.
Through the CachedLedger interface, access to the underlying
Ledger is permitted to allow for cases where the implementation
must perform Ledger specific activities. For example, building
a fetch pack from the contained SHAMap objects.

The CachingReadView is refactored:

* Renamed to CachedView
* Templated on Base, the base type
* base() returns a shared_ptr to the wrapped object
* Constructor requires a shared_ptr<Base>
2015-07-23 14:23:12 -07:00
Vinnie Falco
fad9998f9d Remove deprecated abstract_clock::elapsed 2015-07-23 14:23:12 -07:00
Vinnie Falco
b38a96ae82 Add TimeKeeper:
This class tracks Ripple network time and closing time.

Conflicts:
	src/ripple/ledger/ReadView.h
2015-07-23 14:23:11 -07:00
Vinnie Falco
e82d774d32 Move SNTPClient to core:
* Refactor SNTPClient
* asio best practices
* Not derived from Stoppable
2015-07-23 14:23:11 -07:00
Miguel Portilla
8d1b169f5a Skip List unit test (RIPD-926) 2015-07-23 14:23:11 -07:00
Miguel Portilla
70ccdabf7c Squelch logs in Env (RIPD-982) 2015-07-23 14:23:10 -07:00
Nik Bougalis
af36942e1f Tidy up offer crossing:
* Clarify use of cancel view in OfferCreate transactor
* Reduce OfferStream public interface
* Reduce severity of some developer-only logging from ERROR to DEBUG
2015-07-23 14:23:10 -07:00
Nik Bougalis
b1b98fa3b0 Tidy up JLOG 2015-07-23 14:23:08 -07:00
Tom Ritchford
bb251063fc Remove deprecated 'accepted' parameter. 2015-07-23 12:34:08 -07:00
Tom Ritchford
663742e0d1 Fix compilation warnings in secp256k1. 2015-07-23 12:34:07 -07:00
Nik Bougalis
16c89aee04 Set version to 0.29.0-rc4 2015-07-23 12:32:43 -07:00
Nik Bougalis
abe735102a Fix metadata during apply:
Metadata is correctly generated for the case where a ledger entry is only changed as
a consequence of threading. This changes the result compared to previous versions,
which produced more than necessary for these cases.
2015-07-23 12:29:35 -07:00
David Schwartz
70a37811bd Set the fees in Ledger::setImmutable 2015-07-21 11:40:41 -07:00
Nik Bougalis
edab96e973 Set version to 0.29.0-rc3 2015-07-20 15:41:25 -07:00
Nik Bougalis
e7a50e2a5a Fix apply table metadata updates 2015-07-20 15:40:46 -07:00
Vinnie Falco
e18ba24670 Set version to 0.29.0-rc2 2015-07-17 13:31:08 -07:00
Vinnie Falco
f41fc87a33 Put OfferCreate bug fix on a ledger switch:
The fix for an off-by one bug that overstates the account reserve
during OfferCreate is set to become active on August 3rd. Before
this date, the program will exhibit the old behavior.
2015-07-17 13:25:03 -07:00
Vinnie Falco
5ec3534fea Set version to 0.29.0-rc1 2015-07-15 16:56:48 -07:00
Vinnie Falco
6bd39a316e Tidy up amendment feature macro 2015-07-15 16:56:45 -07:00
Yana
8434203e71 Add copyright notice 2015-07-15 16:56:44 -07:00
Nik Bougalis
59431c513a Add IOUAmount and XRPAmount (RIPD-976):
These numeric types replace the monolithic functionality
found in STAmount. They are not used yet.
2015-07-15 16:56:44 -07:00
Miguel Portilla
edc1bc35fd Add path find response field full_reply (RIPD-894) 2015-07-15 16:56:44 -07:00
Miguel Portilla
18ccdf8bd4 Add Directory container and iterator (RIPD-968) 2015-07-15 16:56:43 -07:00
seelabs
a0dcc4da8c Enable rm funded offer fix after a switch over date 2015-07-15 16:56:43 -07:00
seelabs
2b91e62d5d Fix funded offer removal during payment (RIPD-113):
In some cases, funded offers were incorrectly removed. This happened
when:

1) There are multiple payment paths.
2) A payment path has several offers in a row.
3) An offer causes a previous offer to become unfunded when calculating
   reverse liquidity and that offer does not satisfy the payment and
   there is another offer at the same quality.
4) The payment path is not used to satisfy the payment (there are other
   paths at better quality that do the job).
2015-07-15 16:56:43 -07:00
Vinnie Falco
bc5a25168a Update chrono types
Conflicts:
	src/ripple/test/jtx/impl/Env.cpp
2015-07-15 16:56:43 -07:00
Vinnie Falco
f453c58389 Fix manifest message handler 2015-07-15 16:56:42 -07:00
Vinnie Falco
ad74606ab3 Fix fees in Ledger construction
Conflicts:
	src/ripple/app/ledger/Ledger.cpp
	src/ripple/app/ledger/Ledger.h
	src/ripple/app/main/Application.cpp
	src/ripple/ledger/impl/View.cpp
	src/ripple/ledger/tests/View_test.cpp
	src/ripple/test/jtx/impl/Env.cpp
2015-07-15 16:56:42 -07:00
Vinnie Falco
bb15295935 Refactor computation of Ledger hash 2015-07-15 16:56:42 -07:00
Vinnie Falco
f0c1fbb098 Use LedgerInfo hash in applyHeldTransactions 2015-07-15 16:56:41 -07:00
Vinnie Falco
692f224e1c Tidy up genesis Ledger construction 2015-07-15 16:56:41 -07:00
Vinnie Falco
5bd9cd2ee8 Tidy up and move sources 2015-07-15 16:56:41 -07:00
Tom Ritchford
70fc091e74 Split up RPC handlers for classic build. 2015-07-15 16:56:40 -07:00
Tom Ritchford
1d09c54fdc Replace Ledger with ReadView in most RPC handlers. 2015-07-15 16:56:40 -07:00
Tom Ritchford
c7ebe7205c Move fields from Ledger to LedgerInfo. 2015-07-15 16:56:39 -07:00
Tom Ritchford
1b6c707abb Extract LedgerToJson.cpp from LedgerToJson.h. 2015-07-15 16:56:39 -07:00
Tom Ritchford
a0010effbc Simplify lookupLedger to use an RPC::Context. 2015-07-15 16:56:39 -07:00
Tom Ritchford
c094772bc0 Restrict Ledger.cpp to 80 columns. 2015-07-15 16:56:38 -07:00
Vinnie Falco
7ce871f3b2 Merge branch 'release' into develop
Conflicts:
	Builds/rpm/rippled.spec
	src/ripple/protocol/impl/BuildInfo.cpp
2015-07-15 16:56:10 -07:00
Nik Bougalis
77b3ad5de1 Set version to 0.29.0-b12 2015-07-13 16:38:40 -07:00
Tom Ritchford
a75a0c0b84 Mention rippled in the websocket test page. 2015-07-13 16:38:40 -07:00
Tom Ritchford
072fc53019 Rename duplicate .cpp files. 2015-07-13 16:38:39 -07:00
wilsonianb
5bad2db667 Add validations subscriptions (RIPD-504) 2015-07-13 16:38:39 -07:00
Miguel Portilla
7c2478480d DeliverMin enable switch and precheck greater than dest amount 2015-07-13 16:38:39 -07:00
Nik Bougalis
761f218c0a Refactor NetworkOPs:
* Reduce public API
* Use LedgerMaster interface from RPC
* Remove fetch pack management to LedgerMaster
2015-07-13 16:38:39 -07:00
Vinnie Falco
163e8eb8fc Use SecretKey, PublicKey 2015-07-13 16:37:04 -07:00
Vinnie Falco
6fccd07479 Add new cryptographic token types:
This replaces the equivalent functionality in RippleAddress.

* New PublicKey, SecretKey, Seed, Generator
* Removed AnyPublicKey, AnySecretKey
2015-07-13 16:37:04 -07:00
Vinnie Falco
c86a40a361 Tidy up digest functions:
* Add sha512_half_hasher
* Move sha512Half functions to digest.h
* Add explicit OpenSSL equivalents
2015-07-13 15:25:20 -07:00
Vinnie Falco
362726de4a Slice improvements:
* Rename to makeSlice
* Well defined default construction
* Add `empty`
* Add operator[]
* Buffer arithmetic
2015-07-13 15:25:20 -07:00
Vinnie Falco
5962a4817a Add secp256k1 module 2015-07-12 12:03:27 -07:00
Vinnie Falco
2e05471d72 Fix compilation with C++ 2015-07-12 12:03:27 -07:00
Vinnie Falco
94f13fb606 Squashed 'src/secp256k1/' content from commit 0cbc860
git-subtree-dir: src/secp256k1
git-subtree-split: 0cbc8600f3147c97ff0b404abebf5db19025b20b
2015-07-12 12:03:20 -07:00
Vinnie Falco
d998c6461e Merge commit '94f13fb6061ead96fd5bc6ecd6ee5d9c5565a966' as 'src/secp256k1' 2015-07-12 12:03:20 -07:00
Vinnie Falco
7edf783102 Set version to 0.29.0-b11 2015-07-12 11:51:27 -07:00
JoelKatz
efc2159441 Implement new amendment majority semantics :
This implements the tracking of when an amendment achieved a majority
in the ledger, ensuring that there's always network-wide agreement
on which amendments have achieved a majority and how long they've
held it.

* New fields
* Change transactor changes
* AmendmentTable API and implementation changes
* Update amendment enabled status on validated ledgers
* Reinstate support for ledger sequence in fee transactions
2015-07-12 11:51:27 -07:00
David Schwartz
3078c6da12 Check if synchronized in ripple_path_find
If a call to ripple_path_find does not specify a ledger,
the call should fail if the server is not synchronized
to the network.
2015-07-12 11:51:27 -07:00
Miguel Portilla
de6f678de7 Pass by reference in processTransaction 2015-07-12 11:51:26 -07:00
Nicholas Dudfield
d8d51e8103 Add quality to account_offers 2015-07-12 11:51:26 -07:00
Howard Hinnant
361f1da5b8 Optimize and clean up SHAMap::iterator:
* Remove dependence on boost::iterator_facade.
* Rename iterator to const_iterator.
* Change value_type from shared_ptr<SHAMapItem const> to SHAMapItem.
* Install a stack-path to the current SHAMapItem in the const_iterator.
2015-07-12 11:51:26 -07:00
Vinnie Falco
30e068ae17 Tidy up compilation units 2015-07-12 11:50:34 -07:00
Mark Travis
3b751cc6e6 Set version to 0.28.2-hf1 2015-07-09 22:57:16 +00:00
Miguel Portilla
6d60f19d73 Change NetOps processTransaction to use ref param 2015-07-09 22:56:03 +00:00
Vinnie Falco
94235d4b4f Set version to 0.29.0-b10 2015-07-09 14:21:49 -07:00
Vinnie Falco
367c3a5bfc Refactor View classes:
The View hierarchy of classes is reorganized to include new
classes with member functions moved and renamed, to solve
defects in the original design:

OpenView accumulates raw state and tx changes and
can be applied to the base. ApplyView accumulates changes
for a single transaction, including metadata, and can be
applied to an OpenView. The Sandbox allows changes with
the option to apply or throw them out. The PaymentSandbox
provides a sandbox with account credit deferral.

Call sites are changed to use the class appropriate for
the task.
2015-07-09 13:25:18 -07:00
Vinnie Falco
f3b172b0c9 Use OpenLedger in Env 2015-07-09 13:25:18 -07:00
Vinnie Falco
023715474c Add OpenLedger:
The OpenLedger class encapsulates the functionality of
maintaining the open ledger. It uses an OpenView with the
last closed ledger as its base. Routines are provided to
modify the open ledger to add new transactions, and to
accept a new last closed ledger. Business logic for
performing transaction retries is rewritten to fit this
framework and used in the implementation of accept.

When the RIPPLE_OPEN_LEDGER macro is set to 1 (BeastConfig.h),
the global Application OpenLedger singleton maintains
its open ledger in parallel by applying new transactions
and accepting new last closed ledgers. In the current
implementation this does not affect transaction processing
but logs any differences in the results as compared to
the original code.

Logging shows an occasional mismatch in what the OpenLedger
builds versus the original code, usually an OfferCreate
which gets a terINSUF_RESERVE instead of tesSUCCESS.
2015-07-09 13:20:28 -07:00
Vinnie Falco
f5873bcad0 Add unfunded account Env test 2015-07-07 12:55:56 -07:00
Vinnie Falco
9f27801b8d Log metadata differences on built ledger mismatch 2015-07-07 12:55:56 -07:00
Vinnie Falco
9eb0c2964c Pass a reference in SHAMap::compare 2015-07-07 12:22:50 -07:00
Vinnie Falco
73d64bbafc Set version to 0.29.0-b9 2015-07-07 10:14:31 -07:00
Tom Ritchford
ea67a2d051 Remove jss::account_index and jss::peer_index. 2015-07-07 10:14:31 -07:00
Vinnie Falco
1e7588d0ab Fix open ledger flag when jumping 2015-07-07 10:14:31 -07:00
Vinnie Falco
b6b3548c0c Remove redundant unit test 2015-07-07 10:14:27 -07:00
Vinnie Falco
097a8ce640 Merge branch 'release' into develop
Conflicts:
	Builds/VisualStudio2013/RippleD.vcxproj
	Builds/VisualStudio2013/RippleD.vcxproj.filters
	Builds/rpm/rippled.spec
	src/ripple/app/misc/NetworkOPs.cpp
	src/ripple/app/tx/impl/TransactionEngine.cpp
	src/ripple/protocol/impl/BuildInfo.cpp
	src/ripple/unity/app_tx.cpp
2015-07-07 09:35:41 -07:00
Vinnie Falco
6374aad9bc Set version to 0.28.2 2015-07-07 09:21:44 -07:00
Vinnie Falco
fed3f7b74b Set version to 0.29.0-b8 2015-07-02 15:53:05 -07:00
Vinnie Falco
c079d9ae38 Env_test fixes 2015-07-02 15:53:00 -07:00
Nik Bougalis
6a093b1b44 Fix SHAMapTreeNode deserialization 2015-07-02 15:50:11 -07:00
Miguel Portilla
4dc573f195 Add DeliverMin transaction field (RIPD-930) 2015-07-02 15:50:11 -07:00
Vinnie Falco
b7f07aed00 Add BasicView::txs memberspace interface 2015-07-02 15:09:10 -07:00
Vinnie Falco
cb791482a0 Serializer improvements:
* Add getSlice()
* Make getVLDataLength public
2015-07-02 15:09:10 -07:00
Vinnie Falco
95eaf254c9 Tidy up abstract_clock:
* Add clock_type
* Make elapsed() const
2015-07-02 15:09:09 -07:00
Vinnie Falco
bd7eb94d69 Refactor clock declarations in chrono.h 2015-07-02 15:09:09 -07:00
Vinnie Falco
223389a464 Tidy up abstract_clock:
* Add clock_type
* Make elapsed() const
2015-07-02 15:09:09 -07:00
Vinnie Falco
575f124fb8 Tidy up transactors:
* Rename some members
* Don't use SLE cached from the base view
2015-07-02 15:09:09 -07:00
Vinnie Falco
483f768370 Use BasicView:
Many functions and classes that used a Ledger now use a BasicView.

Calls to cachedRead are changed to call member read on the view,
note that this bypasses the SLECache optimization. To restore the
optimization, the BasicView passed at the top of call stacks
should be wrapped with a caching view, coming in future commits.
2015-07-02 15:09:08 -07:00
Vinnie Falco
ab20ca95aa Add hash to ViewInfo 2015-07-02 15:09:08 -07:00
Vinnie Falco
bf775036bc Add MetaView hold parameter 2015-07-02 15:09:08 -07:00
Vinnie Falco
08bfd302fe Apply tx to new open ledger on switch (RIPD-972):
When the last closed ledger jumps, transactions from the
old open ledger and local transactions need to be applied
to the new open ledger or else transactions could get lost
locally (but still relayed, and therefore make it into a ledger).

A harmful effect is that rippled will report that the transaction
was not applied even when it was, making robust transaction
submission malfunction.
2015-07-02 15:09:07 -07:00
Vinnie Falco
3b6ea02920 Fix missing tefEXCEPTION handling in apply 2015-07-02 15:09:07 -07:00
Howard Hinnant
26bfeb1319 Replace Serializer with Blob in SHAMapItem:
* This helps decouples SHAMap and Serializer.
* Restyle data member names.
* Rename getTag() to key().
2015-07-02 15:06:09 -07:00
Vinnie Falco
72659d431e Set version to 0.29.0-b7 2015-07-01 13:06:51 -07:00
Howard Hinnant
53dabe68ef Fix warning 2015-07-01 13:06:47 -07:00
Nik Bougalis
ccd6b46995 Fix shadowing 2015-07-01 12:34:00 -07:00
Vinnie Falco
91b3227a0f Fix canonicalization race in batch apply 2015-07-01 12:29:46 -07:00
Vinnie Falco
adebba94dc Set version to 0.28.2-rc3 2015-07-01 12:27:21 -07:00
Vinnie Falco
9d3b3f7a01 Fix canonicalization race in batch apply 2015-07-01 12:27:21 -07:00
seelabs
b354360bc0 Port DeferredCredits test to jtx and views 2015-07-01 13:45:56 -04:00
seelabs
8c24f7eb03 Account for deferred credits of parent views 2015-07-01 10:59:02 -04:00
Vinnie Falco
f473eade5a Set version to 0.29.0-b6 2015-06-30 19:52:28 -07:00
mDuo13
dc74a44b70 Update command-line usage message (RIPD-922) 2015-06-30 19:51:23 -07:00
Vinnie Falco
f96ac3db67 Refactor View, MetaView, and tx processing:
This tidies up the View interface and makes transaction
application a free function, with the removal of the
TransactionEngine class. A new class ApplyContext provides
all the state information needed to apply a Transactor. The
Transactor is refactored to perform all the processing
activities previously part of TransactionEngine.

The calculation of metadata from a MetaView is improved.
A new apply function performs all the steps for calculating
and inserting metadata into the tx map.

Transaction processing code path is passed a Config instead
of retrieving the global, and uses the Journal supplied in
the call to apply() consistently.

To support transaction processing and RPC operations, a
new POD type ViewInfo is added which consolidates static
information about open and closed ledgers, such as the ledger
sequence number or the closing times. Ledger and MetaView are
refactored to use this info.

The ViewInfo now contains the "open ledger" setting. The
tapOPEN_LEDGER ViewFlag is removed. The view property of
being an open ledger is obtained from the base or by using
the MetaView constructor which presents a closed ledger as
an open one.

View, MetaView:

* Fix missing includes
* Add apply free function
* Use Journal in TransactionEngine
* Use BasicView in TransactionEngine
* inline NetworkOPs::batchApply
* Add shallow_copy, open_ledger MetaView ctor tags
* Add ViewInfo with open flag, seq, close times
* Make parent_ a reference
* Tidy up ctor arguments and base_ name
* Remove tapOPEN_LEDGER
* add assert to MetaView::apply
* ViewInfo comment
* Throw, pass Journal in txInsert
* Add BasicView::txCount

TransactionEngine:

* Add apply
* Make TransactionEngine private
* Refactor MetaView::apply and apply()
* Rename to TxMeta
* Refactor treatment of metadata in MetaView, TransactionEngine
* Rename to ApplyContext
* Use ApplyContext& in Transactor
* Pass Config in ApplyContext
* Declare Transactor classes in headers
* Use view flags in Transactor
2015-06-30 19:26:02 -07:00
Vinnie Falco
b11b9939f4 Add contract interface 2015-06-30 12:29:58 -07:00
Vinnie Falco
e595fd5e02 Add JLOG macro 2015-06-30 12:29:57 -07:00
Vinnie Falco
af52276cd9 Set version to 0.29.0-b5 2015-06-30 11:33:45 -07:00
Vinnie Falco
2eec47415e Add enableTesting flag to applyTransactions 2015-06-30 11:33:45 -07:00
Vinnie Falco
4a2af70c2c Return tefEXCEPTION in TransactionEngine 2015-06-30 11:11:34 -07:00
Vinnie Falco
6211065802 Disable Websocket ping timer 2015-06-30 11:01:34 -07:00
Vinnie Falco
a338d9efe0 Return tefEXCEPTION in transaction engine 2015-06-30 10:59:39 -07:00
Vinnie Falco
e2ef423624 Disable Websocket ping timer 2015-06-30 10:56:48 -07:00
Nik Bougalis
0f8206e269 Set version to 0.29.0-b4 2015-06-29 17:19:52 -07:00
Nik Bougalis
4ccc3751d6 Remove unused function 2015-06-29 17:19:48 -07:00
Tom Ritchford
7ef6e58024 Tidy Json:
* Remove unused code.
  * Rename .inl file to .cpp.
  * Remove duplicate macros.
2015-06-29 17:11:17 -07:00
Vinnie Falco
57689c4e66 Refine View interfaces:
This shores up the View interface support for contextual
transaction processing by putting params in the View, and
provides support for replacing the open ledger with the
open MetaView.

Transaction metadata is now part of the View interface.
Stacked MetaViews correctly apply their transaction
metadata to the parent.

* Add lastCloseTime to View
* Add insertTx to View, implement in MetaView
* Add View::txExists for transaction checking
* Add Fees to View, cache fees in Ledger and MetaView
* Use ViewFlags in View
* Use tapENABLE_TESTING flag for features
* Use cached Fees in View
* Rename to ViewFlags
* Move FreezeHandling to View.h, remove ViewAPIBasics.h
* Remove BasicView::parent hack
* Remove calls to getLedger in Transactors
2015-06-29 17:06:48 -07:00
Nik Bougalis
2fc8d70655 Set version to 0.29.0-b3 2015-06-26 20:02:45 -07:00
Edward Hennis
7ee9f8513c Levelize RipplePathFind.h 2015-06-26 20:02:45 -07:00
Nik Bougalis
1a843fb4f6 Refactor consensus:
Classes implementing the consensus process on Ripple are cleaned
up in preparation for modularizations and compartmentalization.

Functions and state related to inter-round consensus are moved out
of NetworkOPs and into Consensus, where they are more effectively
isolated.

Some member functions are changed to free functions and some free
functions have their scope reduced to specific translation units.

* Track inter-round consensus state using new Consensus object
* Devirtualize interfaces
* Reduce NetworkOPs, Consensus and LedgerConsensus interfaces
* Add comments
2015-06-26 20:02:45 -07:00
Tom Ritchford
9111ad1a9d Handle empty Json values:
* Replace Json::Value::isNull() and Json::Value::empty with operator bool()
2015-06-26 20:01:02 -07:00
Tom Ritchford
a5a9242f4e Handle empty strings in Json::Value::empty() 2015-06-26 20:00:44 -07:00
Nik Bougalis
3fcf4ae8b7 Set version to 0.28.2-rc2 2015-06-25 14:46:43 -07:00
Nik Bougalis
c3d34aaf4d Fix shadowing 2015-06-25 14:45:32 -07:00
Vinnie Falco
e4f585b7fe Set version to 0.29.0-b2 2015-06-25 11:17:10 -07:00
Tom Ritchford
874b685a83 Remove duplicate and shadow variables. 2015-06-25 11:17:09 -07:00
Tom Ritchford
e3ac1001be Tidy up locks and locals. 2015-06-25 11:17:09 -07:00
Tom Ritchford
67f2a5d9d6 Remove duplicate and shadow variables. 2015-06-25 11:17:09 -07:00
Edward Hennis
89b9fa0b35 Fix shadowing 2015-06-25 10:57:03 -07:00
JoelKatz
4c0de726c8 Require longer delays before disconnecting peers 2015-06-25 10:55:59 -07:00
JoelKatz
7d96075e14 Avoid lock overlap:
Prefer to release the InboundLedgers lock before acquiring
a lock on a specific ledger
2015-06-25 10:55:40 -07:00
JoelKatz
924a8cdd4b Rework of InboundLedgers::mRecentFailures:
This provides more precise tracking of failed ledger acquires
and more useful information in fetch_info.
2015-06-25 10:55:36 -07:00
Miguel Portilla
b27d078c67 Path finding unit tests (RIPD-731)
Conflicts:
	src/ripple/app/paths/tests/Path_test.cpp
	src/ripple/unity/app_paths.cpp
2015-06-25 10:54:45 -07:00
JoelKatz
c64ec9cfb9 Use continuation in legacy pathfinding:
Handle legacy (ripple_path_find) requests that don't specify a ledger
the same way regular path_find requests are. This provides a
performance improvement for these requests and reduces the problem
of server busy errors.

Conflicts:
	src/ripple/app/paths/PathRequest.cpp
2015-06-25 10:32:04 -07:00
JoelKatz
3d6e76046c Always use co-routines:
This permits RPC handlers to suspend and reschedule:
2015-06-25 10:30:06 -07:00
Vinnie Falco
48d6a4ab6a Refactor MetaView (RIPD-954):
Obsolete functionality is removed. DeferredCredits is moved
to a new class PaymentView, and used in RippleCalc.
2015-06-25 10:27:15 -07:00
JoelKatz
f535304e1b Use new MetaView functionality in RippleCalc (RIPD-954):
RippleCalc is changed to stack views when calculating results
instead of making a copy of the MetaView, improving efficiency.
2015-06-25 10:23:36 -07:00
Vinnie Falco
2f485672fa Refactor AccountID (RIPD-953):
All AccountID functionality is removed from RippleAddress and
replaced with free functions. The AccountID to string conversion
cache is factored out as an explicit type with an instance in
the Application object. New base58 conversion functions are used,
with no dependence on OpenSSL.

All types and free functions related to AccountID are consolidated
into one header file. Routines to operate on "tokens" are also
introduced and consolidated into a single header file.

A token one of the cryptographic primitives used in Ripple:

    Secret Seed
    Server Public Key
    Server Secret Key
    Account ID
    Account Public Key
    Account Private Key

    and these deprecated primitives:

    Account Family Seed
    Account Family Generator
2015-06-25 09:05:06 -07:00
Vinnie Falco
63d438c979 Add digest.h and protocol digest classes 2015-06-24 16:28:36 -07:00
Vinnie Falco
ea5fe35b54 Add SHA256 and RIPEMD-160:
* Renamed files to reflect digest family names
* Add SHA256 to SHA2
* Add RIPEMD-160 to RIPEMD
* Reduce duplicated code
2015-06-24 16:28:35 -07:00
Vinnie Falco
c955c03197 Add SHA256 and RIPEMD-160:
* Renamed files to reflect digest family names
* Add SHA256 to SHA2
* Add RIPEMD-160 to RIPEMD
* Reduce duplicated code
2015-06-24 16:28:35 -07:00
Vinnie Falco
ceff6bc271 Set version to 0.29.0-b1 2015-06-22 19:32:26 -07:00
seelabs
80a5f5878f Add offer jtx test 2015-06-22 19:32:26 -07:00
Howard Hinnant
1e6111c09c Make the data of a SHAMap const:
* Hold a shared_ptr<SHAMapItem const> instead of a shared_ptr<SHAMapItem>.
* Compiler helps us enforce data immutability.
* Make SHAMapAbstractNode::addRaw const

Conflicts:
	src/ripple/app/ledger/Ledger.cpp
	src/ripple/app/ledger/Ledger.h
	src/ripple/app/ledger/LedgerHistory.cpp
	src/ripple/app/ledger/LedgerToJson.h
2015-06-22 18:39:33 -07:00
Vinnie Falco
d468deee12 Refactor Ledger and LedgerEntrySet:
Member functions and free functions on Ledger and LedgerEntrySet are
rewritten in terms of new abstract interfaces `BasicView` and `View`,
representing the set of non-decomposable primitives necessary to read
and write state map items in a ledger, and to overlay a discardable
view onto a Ledger that can calculate metadata during transaction
processing. const-correctness is enforced through the parameter and
return types.

The MetaView now supports multi-level stacking: A MetaView can be
stacked on top of either a Ledger or another MetaView, up to any
number of levels.

The getSLEi member function is removed. The CachedView wrapper
replaces it, wrapping a View such that any function called with a
CachedView will go through the SLECache.

* Add BasicView, View, CachedView
* Rename LedgerEntrySet to MetaView
* Factor out free functions
* Consolidate free functions in ViewAPI
* Remove unused class members and free functions
2015-06-22 18:39:33 -07:00
Vinnie Falco
e7eb3aa63d Set version to 0.28.2-rc1 2015-06-19 16:03:42 -07:00
JoelKatz
749f31f69d Tidy up SHAMap node handling of invalid wire formats 2015-06-19 16:03:42 -07:00
Vinnie Falco
2d6af1da1d Add SigningPubKey regression test 2015-06-19 16:03:42 -07:00
JoelKatz
6ec5fa9cae Fix null pointer in ec wrapper 2015-06-19 15:53:41 -07:00
JoelKatz
72832c0fa2 More robust call to get the valid ledger index 2015-06-19 15:53:32 -07:00
Vinnie Falco
7d329570f4 Set version to 0.28.2-b10 2015-06-18 15:35:48 -07:00
Edward Hennis
c334093223 jtx: Add ledger advance.
Conflicts:
	src/ripple/test/jtx/impl/Env_test.cpp
2015-06-18 15:35:46 -07:00
Edward Hennis
27274c9620 jtx: Add JTx properties. 2015-06-18 15:34:41 -07:00
Vinnie Falco
cd5e36045c jtx: json, memo funclets, fixes, improvements:
* Add json funclet
* Add memo funclet
* Add Env::trace
* Add PrettAmount regression test
* Fix PrettyAmount construction
* Make Env::trust balance-neutral
* Log parse errors during signing
2015-06-18 15:33:44 -07:00
Tom Ritchford
3ed1382bbe Fix warning 2015-06-18 13:56:15 -07:00
Tom Ritchford
0062a260b9 Fix warning 2015-06-18 13:56:15 -07:00
Nik Bougalis
fdd2ea8feb Set version to 0.28.2-b9 2015-06-15 19:43:03 -07:00
Tom Ritchford
fbc1768784 Fix JobQueue synchronization. 2015-06-15 19:43:03 -07:00
Vinnie Falco
c53b9f3713 Add SHAMap::iterator 2015-06-15 19:43:03 -07:00
Vinnie Falco
b3749e4d95 Fix MSVC link 2015-06-15 19:43:02 -07:00
Vinnie Falco
eb709f415b Tidy up jtx:
* Tidy declaration order
* Remove AccountInfo
* Remove Env autofill settings
2015-06-15 19:43:02 -07:00
Vinnie Falco
9dd08e4dab Rename Account to AccountID 2015-06-15 19:43:02 -07:00
Tom Ritchford
e1cd1e9e32 Add header 2015-06-15 19:43:02 -07:00
Howard Hinnant
f875603525 Split SHAMapTreeNode into leaf and inner nodes.
* This reduces the memory requirements of both leaf and inner nodes.
* The name SHAMapTreeNode is retained for leaf nodes so as to keep
  the public API of SHAMap stable.
2015-06-15 19:43:02 -07:00
JoelKatz
e95ab65396 Improve peer send queue management:
* Disconnect peers on sustained large send queues
* Disconnect peers on sustained failure to pong
* Refuse some queries if send queue is at target
* Allow latency to exceed ping timer interval
2015-06-15 19:43:02 -07:00
JoelKatz
e0907ede4f GatewayBalances RPC command
RPC command to get a gateway's hot wallet balances
and total obligations.
2015-06-15 19:43:02 -07:00
Vinnie Falco
17020ffc54 Fix MSVC link 2015-06-15 19:43:02 -07:00
Vinnie Falco
237b5e704f Convert to bool in suite::expect 2015-06-13 21:02:51 -07:00
Nik Bougalis
abd05a6378 Set version to 0.28.2-b8 2015-06-13 21:02:51 -07:00
Vinnie Falco
189592938a Improvements to jtx framework:
This adds "require" functionality which allows invariants
to be checked after processing transactions using a simple,
terse interface. Also adds more comprehensive test coverage
for the framework itself, verifying that the more sophisticated
language constructs work in all ways.

All functions and classes have been split up into individual
files which may be included a-la carte, or accessed through
a single convenience header <ripple/test/jtx.h>

* Move, rename all sources
* Put everything in the jtx namespace
* Add sendmax funclet
* Rename funclet to paths
* Correctly set input issue and destination amount in path
* Conditionally invoke funclets using is_call_possible
* Add any() function means "any currency they will accept"
* Add None, none modifiers on amounts to mean "no amount"
* Add require conditions to JTx
* Add Env::require variadic condition checker
* Add le, rename some items for consistency
* Add require functors, balance, flags, nflags
* Add require functors lines, owners, offers, tickets
* Add ticket example of extending the system
* Add noripple modifier for funding accounst
* Add Env::st to parse Json into STTx
* Add tests to ensure correctness of fund()
* Add virtual Env member hooks
* Add Env::balance
* Add Env::seq
* Add PrettyAmount
* Add all container Account support
* IOU and XRP return PrettyAmount amounts
* IOUs print the issuer's name instead of base58
* Fix int and double conversions to XRP
* Fix autofill of Env::fund with noripple
2015-06-13 21:02:51 -07:00
Vinnie Falco
4f34724c5a Conditionally enable tickets at run time 2015-06-13 21:02:51 -07:00
Vinnie Falco
e958f72ba9 Convert to bool in suite::expect 2015-06-13 21:02:51 -07:00
Vinnie Falco
0fcd3da046 Add is_call_possible 2015-06-13 21:02:50 -07:00
Vinnie Falco
5c5b121b62 Add is_call_possible 2015-06-13 21:02:50 -07:00
Vinnie Falco
d21171b21e Refactor LedgerEntrySet:
* Remove duplicate:
    This changes behavior to fix an apparent bug. The
    copy will now correctly inherit mParams instead
    of reverting to tapNONE

* Tidy up LedgerEntrySet declarations
* Tidy up TransactionEngine
* Tidy PathCursor declarations
* Add LedgerEntrySet::apply
* Add LedgerEntrySet ctor
* Add Keylet, keylet namespace
* Add defaulted copy members
* Use optional in TransactionEngine
* Use optional<LedgerEntrySet> in PathState
* Return shared_ptr in Ledger::fetch
* Don't call entryCache with zero
* Deprecate invalidate
* Remove default constructor
* Remove unused container API
* Remove CountedObject base class
* Remove insert, clear
* Remove entryCreate overload
* Remove unused and tidy up STLedgerEntry
* Make getEntry private and tidy
* Replace members with adjustOwnerCount free function
* Replace accountFunds with funds free function
2015-06-13 21:02:50 -07:00
MarkusTeufelberger
aead038215 Fix docs 2015-06-13 12:02:28 -07:00
Nik Bougalis
a16c07c78a Remove unused NodeIdentity table fields 2015-06-13 12:02:22 -07:00
Nik Bougalis
9930b12d9d Beast clean up:
* Remove binding, dispatch handling and exit hooks in favor
  of std alternatives; remove crash-handling infrastructure,
  error message framework, system-specific process handling
  and Objective-C interop helpers.
* Simplify Beast function profiling
* Simplify beast::Time interface
* Simplify beast::String interface
* Simplify beast::File interface
2015-06-13 11:55:03 -07:00
Nik Bougalis
3aebabce3d Revert "Enable EDH only for anonymous SSL contexts":
The issue was caused by client-side functionality added to IE
to protect against LOGJAM. By properly supporting larger keys
we no longer need to disable Ephemeral DH.

This reverts commit 3028ffd083.
2015-06-13 11:55:03 -07:00
JoelKatz
7239bcf0b7 Support larger EDH keys:
In the past we used only 512-bit EDH keys. To protect against the
LOGJAM attack, OpenSSL 1.0.1n and later versions reject EDH keys
that are less than 768 bits and a future version will increase the
minimum to 1024.

We now have DH parameters for 1024-bit and 2048-bit EDH keys and
will correctly return and use those, when asked. Note that at this
time, OpenSSL will only ask for 512 or 1024 bit keys.
2015-06-13 11:55:03 -07:00
Tom Ritchford
623faa1550 Fix warning 2015-06-13 11:55:03 -07:00
Nik Bougalis
60fad25476 Beast clean up:
* Remove binding, dispatch handling and exit hooks in favor
  of std alternatives; remove crash-handling infrastructure,
  error message framework, system-specific process handling
  and Objective-C interop helpers.
* Simplify Beast function profiling
* Simplify beast::Time interface
* Simplify beast::String interface
* Simplify beast::File interface
2015-06-13 11:55:03 -07:00
Tom Ritchford
d06e07ef0e Correctly compare JSON values. 2015-06-13 11:55:03 -07:00
Mark Travis
ca800f9e8d Batched transaction application:
Applying multiple transactions to the open ledger
reduces SHAMap modification overhead.
2015-06-13 11:53:45 -07:00
Nik Bougalis
4225b78bf5 Set version to 0.28.2-b7 2015-06-10 16:02:29 -07:00
Nik Bougalis
8c68eff460 Cleanup object templates:
* Avoid exposing class members - use boost::iterator_range instead
* Use std::make_unique instead of naked new
2015-06-10 15:59:52 -07:00
Tom Ritchford
c2814308f1 Remove unused parameters to accountFromString. 2015-06-10 15:56:24 -07:00
Nik Bougalis
f237187b0d Remove cache sweep profiling 2015-06-10 15:55:05 -07:00
Nik Bougalis
187b4caf3c Add logging support to Taker:
Log progress during offer crossing and flow calculations to
allow for easier debugging and transaction analysis. All
logging is done at debug and trace level and will normally
not be visible.
2015-06-10 15:54:27 -07:00
Tom Ritchford
b8526f7894 Allow RPC yield to be a continuation. 2015-06-10 15:54:07 -07:00
Tom Ritchford
b2b0377717 New method JobQueue::getJobForThread().
* Clean up mutability.
* Add override specifiers.
* Get rid of unused parameters.
2015-06-10 15:53:59 -07:00
Nik Bougalis
24ea1ab035 Parse pathsets when accounts are specified in hex 2015-06-10 15:53:04 -07:00
Nik Bougalis
e980e69eca Acquire logic fixes:
In InboundLedgers::acquire, properly return a ledger if we are
able to create one immediately.

In LedgerMaster::walkHashBySeq, don't walk the whole ledger if
we already know we have it.
2015-06-10 15:52:48 -07:00
Vinnie Falco
2904add428 Set version to 0.28.2-b6 2015-06-08 17:25:17 -07:00
Vinnie Falco
babaac9305 Refactor Ledger and support classes:
This performs a deep refactor on the Ledger class and its supporting
classes, in preparation for the move to shared_ptr<SLE const> in
places where the SLE is immutable and we are currently using
shared_ptr<SLE>.

Member functions are converted to free functions, the SLECache is an
explicit parameter, one line convenience functions are removed to
streamline the interface. Some callers are changed to use <SLE const>
instead of <SLE>

SLECache:
* Moved to its own header file

RippleState:
* Remove unused functions
* Store the SLE as const
* Simplify callers

AccountState:
* Remove unused members
* Simplify existing members

Ledger:
* Replace writeBack with insert and update
* Remove unused functions
* Remove LedgerStateParams
* Move getLastFullLedger to Application
* add entryCacheI, exists, fetch, erase
* Use boost::optional where it makes sense
* Make member functions free functions

Free functions:
* fetch: cache-aware SLE retrieval
* forEachItem, forEachItemAfter
* (various)
2015-06-08 17:25:16 -07:00
Howard Hinnant
9cdc06ce43 C++14 readiness 2015-06-08 15:38:19 -07:00
Vinnie Falco
454d2f8c45 Add SHAMap::fetch returning SHAMapItem const 2015-06-08 15:38:19 -07:00
Howard Hinnant
5d42d52660 C++14 readiness 2015-06-08 15:38:19 -07:00
Edward Hennis
a0e87c7aee ConnectedAddresses stores Addresses to avoid port issues.
* Also change log level on a couple of Overlay messages.
2015-06-08 15:07:06 -07:00
Edward Hennis
49c4ec6f93 Travis build unity and nounity. 2015-06-08 15:06:28 -07:00
Nik Bougalis
eb0ece417d Fix move sequencing 2015-06-08 15:05:33 -07:00
seelabs
7b5bf7f129 Add support for scons ninja backend 2015-06-08 15:05:20 -07:00
Vinnie Falco
ab8ffc1a00 Set version to 0.28.2-b5 2015-06-02 18:00:31 -07:00
Vinnie Falco
64c8335e22 New Env transaction testing framework:
This adds a suite of tools used to write unit tests. The Env provides
a context containing a ledger, and routines that assemble transactions
from JSON with optional "funclets" that add details in an exensible, terse
notation.
2015-06-02 18:00:31 -07:00
Vinnie Falco
4cfffdf76f Add pretty(Json::Value) 2015-06-02 16:52:23 -07:00
Vinnie Falco
8adc4c1e3c Add rpcErrorString function 2015-06-02 16:52:22 -07:00
Vinnie Falco
02c118981f Add jss fields 2015-06-02 16:52:22 -07:00
Vinnie Falco
4825cefbf8 Add strHex(Slice) 2015-06-02 16:52:22 -07:00
Vinnie Falco
4b91a18532 Remove linefeed from JSON to string conversion 2015-06-02 16:52:21 -07:00
Vinnie Falco
ff2453e42c Add missing include 2015-06-02 12:55:25 -07:00
Vinnie Falco
269ad321e6 Allow multi-sign to be enabled at runtime:
This lets unit tests exercise multi-sign interfaces
without having to set RIPPLE_MULTI_SIGN_ENABLE.
2015-06-02 12:55:25 -07:00
Vinnie Falco
7382a0c142 Refactor Serializer, SerialIter, SHAMapItem, NodeObject:
* Make LessThan private
* Make NodeObject::isSame private
* Remove hotTRANSACTION
* Remove some Serializer members
* Remove unused SHAMapItem::getRaw
* Remove unused STLedgerEntry::getOwners
* Remove Serializer constructors
* Remove unused Serializer members
* Remove SerialIter ctor
2015-06-02 12:55:07 -07:00
Vinnie Falco
8be4e7e65f Refactor Serializer, SerialIter, SHAMapItem, NodeObject:
* Make LessThan private
* Make NodeObject::isSame private
* Remove hotTRANSACTION
* Remove some Serializer members
* Remove unused SHAMapItem::getRaw
* Remove unused STLedgerEntry::getOwners
* Remove Serializer constructors
* Remove unused Serializer members
* Remove SerialIter ctor
2015-06-02 12:55:07 -07:00
Vinnie Falco
c25184cc88 Add sha512Half and SHA512HashHasher:
These routines replace existing code to compute SHA512-Half hashes.
The new code accumulates serialized data into a hashing context
instead of allocating a buffer, for improved performance.
2015-06-02 12:52:10 -07:00
Vinnie Falco
360e3fb81e Add SHA512 hasher:
* Remove unused SHA256
2015-06-02 12:49:30 -07:00
Vinnie Falco
06823349f9 Tidy up Serializer:
* Remove getSHA512Half size parameter
* Remove unused Serializer::getSHA256
* Remove Serializer::getRIPEMD160
2015-06-02 12:49:30 -07:00
Vinnie Falco
d11510c34c Update hash_append to latest draft specification 2015-06-02 12:49:30 -07:00
Vinnie Falco
e18c6f63cc Add SHA512 hasher:
* Remove unused SHA256
2015-06-02 12:49:30 -07:00
Vinnie Falco
36a864106d Update hash_append to latest draft specification 2015-06-02 12:49:30 -07:00
JoelKatz
3028ffd083 Enable EDH only for anonymous SSL contexts
Enabling EDH breaks compatibility with some versions of IE. Disabling
EDH is an acceptable workaround.
2015-06-02 12:49:11 -07:00
Nik Bougalis
a3d5a97df6 Remove unused old-style unity files 2015-06-02 12:48:44 -07:00
Mark Travis
52879d964e Revert "Reduce SHAMapTreeNode copying during SHAMap unsharing:"
This reverts commit 47c6ab0ced.
2015-06-02 12:48:30 -07:00
Vinnie Falco
aaf209485c Merge remote-tracking branch 'david/lz4' into develop 2015-06-02 12:47:51 -07:00
Scott Schurr
4515ac0bca Replace base_uint(string) with from_hex_text<> (RIPD-897)
Removes the base_uint constructor that took a string.  Replaces
that functionality with two free functions named from_hex_text<>.
Use of from_hex_text<> looks like this:

auto v = from_hex_text<uint256>("AAA555");
static_assert (std::is_same<decltype(v), uint256>::value, "Huh!");

from_hex_text<> only operates on base_uint types.  At the moment the
list of those types include:

 o uint128,
 o uint160,
 o uint256,
 o Directory,
 o Account,
 o Currency, and
 o NodeID.

Using from_hex_text<> with any other types will not compile due to
an enable_if.
2015-06-02 12:46:03 -07:00
seelabs
d7def5509d Remove temp_db (RIPD-887) 2015-06-02 12:45:29 -07:00
JoelKatz
df26c08a34 Squashed 'src/lz4/' changes from e25b51d..baf78e7
baf78e7 Merge pull request #111 from Cyan4973/dev
6f50184 Updated NEWS
acae59a Fixed : default sparse mode disabled on stdout, to support ` >>`  redirection scenario reported by Takayuki Matsuoka (#110)
91c1b9a Performance fix : big compression speed boost for clang (+30%)
0fb0392 Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
bb22103 Merge pull request #107 from t-mat/issue/103pr2
7d72c0c Added LZF
e769a0e Combine unique .lz4 file info
ffff9ee Support iterative edit and testing
a8fdeb4 Add log output of succeeded decompression to test script
5151c30 Add log of same files and sha1 hash of unique files to versionstest
26065c3 Fixed  : LZ4IO exits too early when frame crc not present, reported by Yongwoon Cho (#106)
87e560e minor tests improvements
a9ff13a minor test refactor
58b5aad Fixed sparse issue with non seekable streams (#105)
60d657a removed "flush" argument to please Travis's python version
cdb136d cosmetic changes, 2nd try
c779c80 minor cosmetic changes for Takayuki's testVersions
26021db Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
e3b5bf3 Merge pull request #104 from t-mat/issue/103pr2
fe11e0b Issue #103 : Add compatibility test between releases
f02c467 Added a few more interoperability tests (32bits vs 64 bits)
05c3f66 Updated a few comments
9607848 Fixed minor typo
45e1995 minor introduction update
7d182b8 Merge pull request #102 from Cyan4973/dev
fdd0029 minor parsing update
672bfde Updated comments
b4ef93a Fixed typo
efbebd2 Added : LZ4_compress_destSize()
1c3e633 Added compilation flag -Wcast-qual
05b0aa6 Updated readme
e05088d Updated lz4hc API
b4348a4 Fixed minor Visual warning
1171303 Updated streaming examples
1b17bf2 New lz4 API, using LZ4_compress_fast()
b495c91 Merge pull request #99 from eberge/dev
791512c Fixed bug 9318
2a974d7 refactored lz4hc
1e751a7 Install the lz4frame.h header in the cmake build
ad2dd6d moved lz4frame context types to incomplete typedef
c9cbb8f Increased aligment requirement for lz4frame context pointer
ef55dfb Modified lz4frame context typedef, to enforce stricter alignment condition
87a1c70 Fixed minor static analyzer warning
d6dc0a4 streaming API : Improved ring buffer management
bda38fd Merge pull request #98 from eberge/dev
a9a24e8 cmake support for AIX, HPUX, Solaris and Windows
9c6fb8b Added LZ4_compress_fast_extState()
b05d3d7 Frame content size disabled by default when using LZ4F_compressFrame(), to be in better coherence with the advanced API LZ4F_compress_update()
b805d58 Removed obsolete functions from lz4 cli
f11afaf Removed LZ4_compress() (obsolete) from lz4
72e6794 Updated LZ4F_freeDecompressionContext(), to provide stage hint as result
a01e10d Changed LZ4F compressionLevel from unsigned to signed, in anticipation for LZ4_compress_fast() integration.
cbcdd88 Fixed frame concatenation
e18aa90 Fixed frametest
c035b7a Restored make-lz4
197982e Fixed unfinished frame (issue #75)
409f816 Updated LZ4F_getFrameInfo() behavior, related to uncomplete frame header decoding attempts
47c3040 added --no-sparse test
9fd4f1f Sparse file support is now enabled by default
7644bee test error message in multiple files mode
bce2eeb Reclassified some notification messages as errors
9e92bee stronger arm tests
2ed9dcc fix minor "divide by zero" risk
633c1ca fixed minor leak
0ed2e71 Static analyzer generates error codes on bug suspicion
2cf8a19 minor header refactoring
634e4ee Merge pull request #96 from t-mat/improve-pr-95
e328d41 minor optimization for small files
13c6e16 Removed status notification in multiple-files mode
d153aaa Add LZ4F_OBSOLETE_ENUM() to describe obsolete enums
a430b85 Multiple files decompression refactoring
4e574e7 Updated lz4frame error names
d37926b Merge pull request #95 from t-mat/issue/90
240b554 Merge pull request #94 from t-mat/dev
3d46d4b Fix LZ4_DEPRECATED() in lz4hc.h
5f732e1 Merge pull request #91 from t-mat/dev
175890f Issue#90 : Change old enum names to new one
585bab8 Issue#90 : Change old enum to macro to maximize compatibility
081bcca Issue#90 : Add LZ4F_ prefix
e1283c7 Fix LZ4_DEPRECATED() for older/non-gcc/clang/MSVC compilers
d7298d2 Replace GCC_VERSION with LZ4_GCC_VERSION
9851583 Merge pull request #93 from drcrallen/descriptiveFrameErrors
b664a72 Revert "Revert "Add more descriptive frame errors""
3f4f623 Valgrind tests generate errors
83e350d Merge branch 'dev' of github.com:Cyan4973/lz4 into dev
066e9d3 Merge pull request #92 from Cyan4973/revert-89-descriptiveFrameErrors
5a66527 Revert "Add more descriptive frame errors"
0dc8308 Merge pull request #89 from drcrallen/descriptiveFrameErrors
05a46fc Changes LZ4F_compressBound() definition using NULL prefsPtr to cover worst case instead of default.
348f509 lz4io refactoring
eabc6d8 New valgrind test with multiple files
113b150 Fix leak issue with compression of multiple files
c64200d Improved performance when compressing a lot of small files
cc24124 minor compatibility fixes
ccba7a0 Merge pull request #86 from KyleJHarper/origin/r129/multiple_inputs_patch
d535214 Add more descriptive frame errors
bc28fc1 Merge pull request #87 from t-mat/fix-example2
fd77bad Replace obsolete functions
b036eaa Add snprintf macro for MSVC
7f2f1fc Added support for continuation of file compression and decompression if input files are missing.  Should more closely match gzip/bzip2/xz and so forth.  Also removed a debug print accidentally left in.
0169502 Added new LZ4IO_decompressMultipleFilenames to allow decompression of multiple files with the -m switch added in r128 (ref: google code issue 151).  Limitation: will only process files matching LZ4_EXTENSION macro, which for now seems reasonable.
da11725 new memory leak test for fullbench using multi-files
2c79887 Shortened tests durations
42e5bc4 Updated badges
2852b9e Fixed issue #84
8f49666 Fixed : minor coverity warning
8a61000 Fixed a few coverity warnings
138673d fixed minor g++ warning
cc8d617 Merge pull request #82 from t-mat/add-lz4-prefix
81fdd9d Fixed a few Valgrind warnings
ad86910 Add LZ4 prefix to deprecation macros
66b8a4a Fixed : minor Visual warnings
62ed153 Fixed : a few minor coverity warnings
9443f3d Extended obsolete warning messages to lz4hc
973e385 Implemented obsolete warning message
be9d248 Update lz4hc API : LZ4_compressHC_safe()
a07db74 Clarified lz4frame.h inline doc
8b8e5ef fixed minor sanitize warning
c22a0e1 Updated : fuzzer tests can be programmed for a timelength
a2864fd Fixed a few minor sanitize warnings
33134fb Added : sanitize test
f344fbd Fixed a few warnings from -fsanitize=undefined
2f8a4c3 New LZ4_compress_safe() API
1853622 fixed over-cautious visual warning
b41137f minor Makefile test refactoring
327cb04 minor memory leak fix and test
43e0535 fix g++ typecast
61d7416 updated doc
17f8614 added : memtest on fullbench
d38b0b6 Merge pull request #73 from funcodeio/dev
979a991 memcpy speed as reference
157a739 Merge pull request #74 from Cyan4973/fastMode
dd69902 Removed unused lines.
43eaf8f Merge pull request #72 from fzort/master
f72761f new tests for large files with content size support (#70)
90c0104 Added : progress indicator, in fast and decompression modes
1d3ab5d Cygwin has fileno, so there's no need to use _fileno.
78d2dfd fullbench : tests of _limitedOutput variants intentionnally provides less memory space than safe (LZ4_compressBound())
ef7cd83 Fixed issue 160, reported by Eric Berge
28e237e simplified LZ4_compress_limitedOutput()
89eee0d Removed make dist
0615eb4 Stricter tests : treat warnings as errors
76a03c1 simplified LZ4_compress_withState()
6625068 simplified LZ4_compress()
886b199 Modified files rights
7b5e945 Removed Visual 2013 solution, as AppVeyor automated mode only works with a single solution
117ab8c Added : Visual 2013 solution
08b24af Updated Visual 2012 solution : + 3 projects (fullbench, frametest, datagen)
a761546 Fix : minor warning under Visual
bf146ec Removed .suo & .user files from Visual solutions
7db6678 Restored proper credit
3bba55c Fixed : Windows compilation Added : Appveyor badge
160661c Merge pull request #69 from Cyan4973/dev
8437a0e Fixed : Visual compilation
7c26b03 Updated make dist
f174964 Added : Frame documentation in MarkDown format
880381c Removed HTML Frame Format documentation
5b9fb69 minor tweak
4783cb8 Updated readme
4c227a4 Added LZ4_compress_fast()
003af71 Merge pull request #67 from Cyan4973/dev
2a82619 fixed fullbench memory allocation error
6c69dc1 faster compression in 64 bits mode
44793b8 Updated documentation
b93f629 changed file name
eeb8bea Updated comments on LZ4F_getFrameInfo()
002ec60 restored lz4hc compression ratio
987e78c Merge pull request #66 from Cyan4973/dev
8cb06d5 lz4frame validates contentSize during decompression
d5da787 Changed struct member to contentSize
2d4fed5 Merge pull request #65 from Cyan4973/dev
ce71b07 converted to markdown friendly syntax
1ba37f3 Reference format doc
5780864 Fixed : Makefile
b009767 windows friendly make clean
27f7d06 minor beautifier (make clean)
b4755c7 Added : arm cross-compilation test
a357f43 Fixed cast-align warnings on 32-bits
4a9335b Added : doc authorship
e652285 Merge pull request #63 from t-mat/comment-on-example-directory
2af52a9 Add "Examples" subtree
679afea Add README.md as table of contents
19665c9 Add document for "Line by Line Text Compression" example
438fee9 Add document for "Double Buffer" example
a38166b Add document : "Streaming API Basics"
80e71c6 Updated man page : "--[no-]X"
5950f72 Updated tests
6b923d5 Updated long commands, with reverse "--no-" variants
d0f8d40 updated dist list
00c3208 Merge pull request #61 from Cyan4973/dev
7f436a1 lz4 cli supports frame content size
a28b147 removed useless man pages
7cf4e5c Updates tests & Man pages
f02adc7 new long commands
86715b2 Some more tests related to frame content size
7ee7256 frame content size support
7d87d43 Updated lz4io sparse file support (alignment properties)
b54d256 minor lz4frame optimisation (no more malloc() on using LZ4F_compressFrame() in fast mode)
da9402c minor lz4frame refactoring
859fe3b Updated LZ4 frame format documentation
8edb7f1 Added : Readme into lib directory, to explain what does each file
e7fb4d1 lz4 utility supports "pass-through" mode
2a02455 minor refactoring
3a68324 skippable frames support
93849d1 minor CMakeLists update
471eabe Merge pull request #60 from Cyberunner23/master
ef029a1 Removed checking of CMAKE_SYSTEM_PROCESSOR when adding -fPIC, breaks when that var is '64bit'.
c9a2b14 removed -s command from lz4c specific list of legacy commands
207aafd Added :  unlz4 symbolic link to "lz4 -d"
2b55752 changed "make install" default install directory to /usr/local
bbcfe21 Added : clang test
8a87769 Fix : static analyzer test on Travis
45b0642 scan-build tests
a18fb43 Merge pull request #58 from Cyan4973/sparseFile
248b761 windows sparse file support
d11ac40 Improved sparse files support
45a357f Improved sparse file support
e38c268 Fixed minor g++ warnings
12ab415 Preliminary support for sparse files
e3f33d2 Fixed minor warnings
74a6b14 Merge pull request #57 from alexDarcy/master
f2cc4be Updated Cmake configuration for non-gnu compiler
ceec6fa g++ compatibility
6b0c39b Updated datagen (can create sparse files)
e277511 Merge pull request #54 from t-mat/gc-issue/155
e1d9b59 Fixed : static library (x64 binary)
32a85fc NetBSD compatibility (#48)
488029e Updated : compress multiple files
046bd3a Merge pull request #52 from KyleJHarper/r128/multiple_inputs
dcdd628 Fix sentinel bit pattern
de5c930 Fix sentinel size miscalculation
eed7952 Add GNU coreutil's is_nul() method to isSparse()
b372f45 Add Neil's method to isSparse()
01a24af Improve isSparse()
4a5d92b Adjust coding style
97679fa Google Code Issue 155: lz4 cli should support sparse file https://code.google.com/p/lz4/issues/detail?id=155
fa27d23 Added support for multiple input files to act more like other compressors. For example: gzip file1 file2 file3. You can now do: lz4 [args] -m file1 file2 file3. Fixes 151.
67f3b41 Merge pull request #49 from t-mat/msvc-fseeki64
e68d1c9 restored lz4 hc compression ratio
41b6ed3 Replace fseek with _fseeki64 to avoid MSVC's 2GiB barrier
8f4e201 Fix : lz4frame.h within uninstaller
9fd92de Added : Visual project directory

git-subtree-dir: src/lz4
git-subtree-split: baf78e7e4dcbdf824a76f990ffeb573d113bbbdb
2015-05-29 15:03:27 -07:00
JoelKatz
4ff845ac91 Merge commit 'df26c08a34b4e07235d33fcd7e2fb311d83f069f' into HEAD
Synchronize LZ4 with upstream
2015-05-29 15:03:27 -07:00
Tom Ritchford
e9d147f4b8 Set version to 0.28.2-b4 2015-05-29 13:45:23 -04:00
Tom Ritchford
f1a1ef49d5 Remove duplicate types. 2015-05-29 13:45:16 -04:00
Tom Ritchford
fd03c3297c Fix dangling pointer in websocketpp/error.hpp. 2015-05-29 13:45:07 -04:00
wilsonianb
ffd2e884f2 Clean up LedgerConsensus log message
Add missing space and use consistent pluralization.
2015-05-29 13:44:59 -04:00
Nik Bougalis
0d700d9833 Unsubscribe from normal data feeds on destruction 2015-05-29 13:44:52 -04:00
Nik Bougalis
dd902292ed Consensus cleanup:
* Inject dependencies, make functions free and levelize
* Add comments to document the intent behind the code
* Reduce class public interfaces
* Remove support for proposals without ledger hashes
2015-05-29 13:44:44 -04:00
seelabs
1b4e0f5f48 Tidying & Selectively forward manifests to peers:
* Do not forward manifests to peers that already know that manifest
* Do not forward historical manifests to peers
* Save/Load ValidatorManifests from a database
* Python test for setting ephmeral keys
* Cleanup manifest interface
2015-05-28 08:16:56 -07:00
Tom Ritchford
31d352b3aa Productionize manifest generator.
* Better output.
* Better error checking and reporting.
* Clearer names.
* Python style.
2015-05-28 07:22:34 -07:00
Tom Ritchford
c26b8124e5 Add original manifest.py. 2015-05-28 07:22:34 -07:00
Tom Ritchford
6bf7de2415 Add ecdsa Python library. 2015-05-28 07:22:33 -07:00
Tom Ritchford
18c51f4e4a Add ed25519 Python library. 2015-05-28 07:22:33 -07:00
Tom Ritchford
adf4860988 Move Python code to its own directory. 2015-05-28 07:22:33 -07:00
Josh Juran
0dd6b95ac2 Add Validator Manifests (RIPD-772):
A Validator Manifest allows validators to use a generated ed25519
secret key as a master key for generating new validator public/secret
key pairs. Using this mechanism, rippled instances trust the master
ed25519 public key instead of the now-ephemeral validator public key.

Through a new message and propagation scheme, this lets a validator
change its ephemeral public key without requiring that all rippled
instances on the network restart after maintaining the configuration
file.
2015-05-28 07:22:32 -07:00
Vinnie Falco
41a840e776 Tidying:
* Add missing includes
* Use preincrement
* Rearrange some declarations
* Fix some comments
2015-05-28 07:21:08 -07:00
Josh Juran
7d75041fb1 Fixes to cryptographic containers:
* Include Sign.cpp in unity builds
* Fix AnySecretKey publicKey and sign
* Make AnyPublicKey copyable
* Define op != for Slice
* Overload op << for Slice
* Overload op << for KeyType
2015-05-27 13:25:20 -07:00
Vinnie Falco
6675ee7f5c Set version to 0.28.2-b3 2015-05-22 11:12:44 -07:00
Howard Hinnant
845c9f8a51 Change typedef to using.
Conflicts:
	src/ripple/app/TODO.md
	src/ripple/app/ledger/Ledger.h
	src/ripple/protocol/Protocol.h
2015-05-22 11:09:50 -07:00
Howard Hinnant
155fcdbcd0 Change typedef to using.
Conflicts:
	src/ripple/app/TODO.md
	src/ripple/app/ledger/Ledger.h
	src/ripple/protocol/Protocol.h
2015-05-22 11:09:50 -07:00
Vinnie Falco
52f298f150 Tidy up app unity sources 2015-05-22 10:58:16 -07:00
Vinnie Falco
860ab3523c Refactor Ledger:
* Consolidate constructors
* Use pointer/size instead of Serializer
* Factor out PendingSaves
* Make some members free functions
* Reduce size of constructor initializer lists
2015-05-22 10:58:04 -07:00
Nik Bougalis
36ac3bc672 Set version to 0.28.2-b2 2015-05-21 14:51:46 -07:00
crazyquark
fc9ab12bf9 Add build instructions for Eclipse CDT + SConsolidator plugin. 2015-05-21 14:51:46 -07:00
Miguel Portilla
b39c1eb92c Require port in ips (RIPD-893) 2015-05-21 14:51:46 -07:00
JoelKatz
6994423a49 Don't consider broken peers candidates for history 2015-05-21 14:51:46 -07:00
JoelKatz
172e967a73 Latency-aware fetch pack target selection 2015-05-21 14:51:46 -07:00
Nik Bougalis
6f5d8bba2d Reduce STAmount public interface (RIPD-867):
* Implement subtraction as addition to the additive inverse
* Do not allow comparison with, addition to or subtraction from integers
* Remove unused functions
* Convert member functions to free functions
* Isolate unit-test specific code into the unit test
2015-05-21 14:51:41 -07:00
Nik Bougalis
67b18e4bea Check the fee early and return an error if it's malformed 2015-05-21 14:50:49 -07:00
Vinnie Falco
9ad5644a8c Reduce thread count in static_initializer test (RIPD-864) 2015-05-20 13:24:13 -07:00
Vinnie Falco
e932ba591f Set version to 0.28.2-b1 2015-05-20 13:24:13 -07:00
Vinnie Falco
f58399d2f3 Reduce thread count in static_initializer test (RIPD-864) 2015-05-20 13:24:13 -07:00
Nik Bougalis
730cd5d513 Cleanup consensus helper functions:
* Reduce public class interfaces
* Use free functions when possible
* Add self-documenting function return values
* Simplify ledger close resolution calculations
2015-05-20 13:24:12 -07:00
Edward Hennis
e838b30def Integration test to validate the WS ledger results.
* Also replace a couple of magic values with the relevant Tuning param.
2015-05-20 13:24:12 -07:00
Howard Hinnant
dddcc09378 Restrict access to data members. 2015-05-20 13:24:12 -07:00
JoelKatz
5adb68bba4 Easier way to get the validated ledger index 2015-05-20 13:24:12 -07:00
Scott Schurr
d6ef66646f 2-level transaction multi-signatures (RIPD-182):
This commit provides support for 2-level multi-signing of
transactions.  The ability is usually compiled out, since other
aspects of multi-signing are not yet complete.

Here are the missing parts:

 o Full support for Tickets in transactions.
 o Variable fees based on the number of signers,
 o Multiple SignerLists with access control flags on accounts,
 o Enable / disable operations based on access control flags,
 o Enable / disable all of multi-signing based on an amendment,
 o Integration tests, and
 o Documentation.
2015-05-20 13:24:06 -07:00
Scott Schurr
cf1638e6de sign_for RPC command (RIPD-182):
The sign_for RPC command returns a field suitable for
signing a multi-signed transaction.  Actual multi-signed
transactions are in the next commit.
2015-05-20 13:23:59 -07:00
Scott Schurr
64ebd64d2b SignerListSet txn and InnerObjectFormats (RIPD-182):
Add support for the SignerListSet transaction as a step toward
multi-sign support.

As part of the SignerListSet implementation, add InnerObjectFormat
templates (similar to TxFormats and LedgerFormats) and enforce them
in STObject, STArray, and STParsedJSON.
2015-05-20 13:23:52 -07:00
Scott Schurr
92799187ed Improvements to protocol serialization:
A few serialization changes coming from m-of-n development:

 o Improve readability of SField.cpp.
 o Better initialization of STObject.
 o Trimming of STObject public methods.
 o Add STObject::getFieldObject and STObject::setFieldObject.
 o Make STObject::isEquivalent more robust.
 o Improvements to whitespace, overrides, and virtuals.
2015-05-20 12:34:20 -07:00
Vinnie Falco
2f3834359e Modularize app/tx:
* Move LedgerView declaration
* Move CrossType
* Move Clock declaration
* Move Quality to protocol/
* Move Amounts to protocol/
* Move book to tx/impl
* Remove 0.27 legacy support
* Remove unused AmountType
* Remove core namespace
* Use STAmount
2015-05-20 12:34:19 -07:00
Miguel Portilla
399c43cae6 Set version to 0.28.1 2015-05-20 13:34:29 -04:00
Tom Ritchford
80acbe6f6b Change ArchLinux/PKGBUILD to have correct ripple build line. 2015-05-20 13:29:54 -04:00
Miguel Portilla
d90ba775e8 Require port in ips_fixed (RIPD-892) 2015-05-20 13:24:21 -04:00
Miguel Portilla
ea4161d880 Change example configuration protocol on loopback IP (RIPD-886) 2015-05-20 13:24:04 -04:00
Torrie Fischer
172a060330 circle: docker: Don't tag branches if its a PR (PKG-33) 2015-05-20 13:23:38 -04:00
Nik Bougalis
231efb5aa5 Set version to 0.28.1-rc3 2015-05-18 13:00:15 -07:00
JoelKatz
079475e491 Only touch InboundLedgers on success so failed acquires can expire 2015-05-18 13:00:15 -07:00
Tom Ritchford
aa775b4d3d Clean up rippled-example.cfg and update for new node_db settings 2015-05-18 13:00:00 -07:00
Nik Bougalis
216c8125e2 Expedite zero flow handling 2015-05-18 12:52:03 -07:00
Vinnie Falco
c61d0c663e Merge branch 'master' into develop 2015-05-13 13:29:54 -07:00
Nik Bougalis
0187c6a5a1 Set version to 0.28.0-hf2 2015-05-13 13:21:32 -07:00
Nik Bougalis
8289d4140a Correctly clamp when the taker balance is the limiting factor 2015-05-13 13:21:26 -07:00
Vinnie Falco
c7118a183a Set version to 0.28.1-rc2 2015-05-13 12:41:04 -07:00
JoelKatz
b1881e798b Control query depth based on latency:
This changes TMGetLedger protocol in a backward-compatible way to include
a "query depth" parameter - the number of extra levels in the SHAMap tree
that a server should return in the corresponding TMLedgerData. Depending
on the value or absence of the field, a server may adjust the amount of
returned data based on the observed latency of the requestor: higher
latencies will return larger data sets (to compensate for greater
request/response turnaround times).
2015-05-13 12:40:16 -07:00
Nik Bougalis
d44230b745 Correctly clamp when the taker balance is the limiting factor 2015-05-13 12:40:09 -07:00
Vinnie Falco
7b417b9d51 Set version to 0.28.1-rc1 2015-05-12 17:21:48 -07:00
Vinnie Falco
cc05e5727d Merge release into develop 2015-05-12 17:20:43 -07:00
Vinnie Falco
764a8f2644 Set version to 0.28.1-b10 2015-05-12 12:47:56 -07:00
JoelKatz
a15785eb64 Reduce severity of some logging messages 2015-05-12 12:47:56 -07:00
Vinnie Falco
688f8c5f3f Add historical ledger fetches per minute to get_counts 2015-05-12 12:47:56 -07:00
Vinnie Falco
dde5ccf7fa Add DecayWindow implementation 2015-05-12 12:47:55 -07:00
Vinnie Falco
d5a6313c71 Add RangeSet::lebesgue_sum 2015-05-12 09:50:12 -07:00
Vinnie Falco
f030aab759 Set version to 0.28.1-b9 2015-05-11 18:14:45 -07:00
JoelKatz
4393f98a2c History fetch changes:
* Don't pollute ledger cache with history
* Avoid race condition when getting ledger sequence numbers
* Make fetch packs larger
2015-05-11 18:14:45 -07:00
JoelKatz
c377d6c94b InboundLedgers improvements:
* Change findCreate to acquire
* Return Ledger rather than InboundLedger
2015-05-11 18:14:45 -07:00
JoelKatz
16aa015682 Fix off-by-one error in SHAMapNodeID:
Limit is 64 inner nodes at depth 0-63, and one leaf at depth 64
2015-05-11 18:14:45 -07:00
Miguel Portilla
9cded76cf0 Fix RPC ledger synchronization requirements:
* Better rules specific to each lookup case:
* By hash: Any ledger found by hash is valid.
* By numeric index: If rippled is out of sync, and the index is after the
* validated ledger, return "InsufficientNetworkMode" error.
* By named index: If rippled is out of sync, or closed/current is requested and significantly older than the validated ledger, return "InsufficientNetworkMode" error.
2015-05-11 18:14:45 -07:00
Vinnie Falco
4ad07bb6b2 Fix hops adjustment for validations 2015-05-11 18:14:45 -07:00
David Schwartz
d0b28a6700 Compute validated ledger age from signing time 2015-05-11 18:14:39 -07:00
Vinnie Falco
18299c3f7a Tidy up PeerSet:
* Move PeerSet to overlay/
* Remove unused functions
* Make some public members private
* Rename some functions
* Add comments
2015-05-11 12:06:14 -07:00
Miguel Portilla
ca07a1230b Add filtering to Account Objects (RIPD-868) 2015-05-11 11:58:35 -07:00
Edward Hennis
e0ad66d967 Fail Travis if scons vcxproj produces differences 2015-05-11 11:56:45 -07:00
seelabs
5615c4a2a7 Force scons to include soci version file:
Running `scons vcxproj` will sometimes include
soci's version.h and sometimes it will not. This
patch forces it to always include the file.
2015-05-11 11:56:42 -07:00
Nik Bougalis
d7fbef6764 Set version to 0.28.1-b8 2015-05-06 14:00:34 -07:00
JoelKatz
e95bda3bdf Peer latency tracking (RIPD-879):
Track peer latency, report in RPC, make peer selection for
fetching latency aware.

This also cleans up the PeerImp timer to minimize
resetting. Indirect routing is made latency-aware as well.
2015-05-06 13:38:59 -07:00
JoelKatz
c010a85ef5 Check the correct progress flag on transaction root node receipt 2015-05-06 13:38:59 -07:00
MarkusTeufelberger
798d36efcf Fix typo in LedgerMaster.cpp 2015-05-06 13:25:50 -07:00
Nik Bougalis
2d44c8568f Eliminate need for ledger in delivered_amount calculation (RIPD-860) 2015-05-06 13:25:50 -07:00
Nik Bougalis
7232bdb40c Reduce PeerFinder log verbosity 2015-05-06 13:25:50 -07:00
David Schwartz
45f092488a Simplify InboundLedger expiration (RIPD-873)
Let sweep logic remove obsolete ledger requests.
Touch inbound ledgers to prevent sweeping on requests.
Update sequence number if possible.
2015-05-06 13:25:50 -07:00
JoelKatz
4244e1070d Improvements to STParsedJSON:
* Cleanups and reduction of copying
* Add STArray::back, operator[], push_back(&&)
* Add make_stvar
* Rework STParsedJSON
* Fix code and unit tests that use STParsedJSON
* STTx move constructor
2015-05-06 13:11:24 -07:00
Nik Bougalis
5a7fa8cfa9 Reduce STAmount public interface (RIPD-867):
The STAmount class includes a number of functions which serve as thin
wrappers, which are unused or used only in one place, or which break
encapsulation by exposing internal implemenation details. Removing
such functions simplifies the interface of the class and ensures
consistency.

* getSNValue and getNValue are now free functions
* canonicalizeRound is no longer exposed
* Removed addRound and subRound
* Removed overloads of multiply, mulRound, divide and divRound
2015-05-06 13:11:24 -07:00
Josh Juran
daf4f8fcde Remove wallet_accounts and generator maps (RIPD-804):
* Remove the deprecated wallet_accounts command.
 * Remove dead code for generator maps.
 * Remove the help for the obsolete wallet_add and wallet_claim commands
   (which have already been removed).
2015-05-06 13:11:24 -07:00
Miguel Portilla
d182d1455e Relax RPC ledger synchronization requirements (RIPD-27, RIPD-840):
This enhances the reporting capability of RPC::LookupLedger and reduces
the requirement of a current ledger for many RPC commands.

The perceived up-time of client handlers improves since requests will
not depend on the server being fully synced.
2015-05-06 13:10:47 -07:00
Vinnie Falco
dc2260adbe Set version to 0.28.1-b7 2015-04-29 16:44:47 -07:00
Vinnie Falco
83a01e0c7d Set hopsAware version cutoff to 0.28.1-b7 2015-04-29 16:44:05 -07:00
Tom Ritchford
53c1269ebd Set version to 0.28.1-b6 2015-04-29 14:34:54 -04:00
Nik Bougalis
f8bfe3a550 Terminate process on SIGINT in all cases 2015-04-29 14:34:54 -04:00
Vinnie Falco
90bb53af20 Structured Overlay support for TTL limited messages:
When the [overlay] configuration key "expire" is set to 1, proposals
and validations will include a hops field. The hops is incremented with
each relay. Messages with a hop count will be dropped when they exceed
the TTL (Time to Live). Messages containing a hops field will not be
relayed or broadcast to older versions of rippled that don't understand
the field.

This change will not affect normal operation of the network or rippled
instances that do not set "expire" to 1.
2015-04-29 14:34:54 -04:00
Vinnie Falco
ef1604a729 Tidy up aged container declarations 2015-04-29 14:34:53 -04:00
Vinnie Falco
c77a2f335a Tidy up some business logic:
* Add OverlayImpl::for_each to tidy up some call sites
* Add comment about computing the unique ID for message routing
* Remove unused code
2015-04-29 14:34:53 -04:00
Vinnie Falco
8e34a1f6a7 Tidy up aged container declarations 2015-04-29 14:34:53 -04:00
Tom Ritchford
2564b62f5c Fix C++ style issues.
* Restrict files to 80 columns.
* Function names in GenerateDeterministicKey now start with lower case.
* Remove deprecated boost::format calls.
2015-04-29 14:34:53 -04:00
seelabs
a7598c5610 Remove unused database table (RIPD-755) 2015-04-29 14:34:52 -04:00
seelabs
8377f2516b Cache and apply account credits after payment processing (RIPD-821):
Credits made to any account during the processing of a payment are delayed until
the payment completes, enforcing a new invariant: liquidity for any paths
during a payment's execution may never increase. This eliminates the need for special
code to handle a variety of corner cases where consuming liquidity in one path
increases liquidity in others.
2015-04-29 14:34:52 -04:00
Vinnie Falco
7efd0ab0d6 Set version to 0.28.0 2015-04-24 18:57:36 -07:00
Vinnie Falco
14d38a1a8d Fix --rpc_ip and --rpc_port (RIPD-679)
This reverts commit 2b040569e7.
2015-04-24 18:57:04 -07:00
seelabs
c8447c190c Report the inbound listening port during crawl (RIPD-866) 2015-04-24 18:55:53 -07:00
Mark Travis
aa5d16b3d8 Skip inefficent SQL query (RIPD-870):
For large data sets the JOIN may not make forward progress in time.
This prevents the deletion of those entries in the database during
online delete. The number of such entries is very small compared to
the total size of the data anyway. A future version will address
this more thoroughly.
2015-04-24 18:55:49 -07:00
Vinnie Falco
fd1135315c Set version to 0.28.1-b5 2015-04-24 18:44:30 -07:00
Vinnie Falco
98c915b2ca Fix --rpc_ip and --rpc_port (RIPD-679)
This reverts commit 2b040569e7.
2015-04-24 18:44:30 -07:00
seelabs
9114f3d2e6 Report the inbound listening port during crawl (RIPD-866) 2015-04-24 18:19:10 -07:00
Mark Travis
5b0109055d Skip inefficent SQL query (RIPD-870):
For large data sets the JOIN may not make forward progress in time.
This prevents the deletion of those entries in the database during
online delete. The number of such entries is very small compared to
the total size of the data anyway. A future version will address
this more thoroughly.
2015-04-24 17:21:27 -07:00
Tom Ritchford
5a3168c9ff Set version to 0.28.1-b4 2015-04-23 16:47:23 -04:00
seelabs
a14f29f84f Remove obsolete code 2015-04-23 16:47:23 -04:00
Tom Ritchford
6c1190a361 Remove unnecessary thread in Soci (RIPD-862). 2015-04-23 16:47:22 -04:00
Howard Hinnant
100a76f0e8 Remove nested types SField::ref and SField::ptr...
* This silences a warning about a redundant cv-qualifier.
* This makes future coding mistakes about redundant
  cv-qualifiers much less likely.
* This makes the code easier to read.
2015-04-23 16:47:22 -04:00
JoelKatz
47482acf83 In consensus, get relative times from a steady clock (RIPD-859)
Using the system clock to get relative times for consensus
timing can result in performance issues if the system time
changes frequently.
2015-04-23 16:47:21 -04:00
seelabs
1185103a3d Fix ownership of memory buffers in StatsDCollector (RIPD-756):
* Ownership of buffer memory in StatsDCollector is passed to the
boost::asio callback function. Before this, the memory may have been
freed before async_send was finished with the memory.
2015-04-23 16:47:20 -04:00
Nik Bougalis
54ef4ee6ef Reduce severity level of offer cancellation logging 2015-04-23 16:47:20 -04:00
seelabs
2389abc295 Fix ownership of memory buffers in StatsDCollector (RIPD-756):
* Ownership of buffer memory in StatsDCollector is passed to the
boost::asio callback function. Before this, the memory may have been
freed before async_send was finished with the memory.
2015-04-23 16:47:20 -04:00
Nik Bougalis
67c666b033 Clean up LedgerEntrySet and TransactionEngine:
* Reduce public interfaces
* Remove wrapper functions
* Remove freeze timed cutover code
* Return results directly instead of via ref parameters
2015-04-23 16:47:19 -04:00
Vinnie Falco
5ce3ed3555 Set version to 0.28.1-b3 2015-04-21 14:01:44 -07:00
Nik Bougalis
d30b32fcde Set TX processing change date to 2015-05-12 13:00:00PDT 2015-04-21 14:01:25 -07:00
Miguel Portilla
568e4cebda Fix check for current ledger ID in RPC 2015-04-21 14:01:18 -07:00
Tom Ritchford
29d644e9d3 Fix WebSockets treatment of ping timer:
This solves a problem that caused a hang on shutdown related to
the lifetime of the ping timer completion handlers used in WebSockets.

* Turn the ping timer back on
* Use std::weak_ptr for WebSockets timer callbacks.
* Disable WebSocket pings if frequency in the .cfg is non-positive.
2015-04-21 14:01:13 -07:00
Torrie Fischer
2dbb7301fb Fix circleci 2015-04-21 14:01:09 -07:00
seelabs
d2cba1c54f Tidy up SQLite table creation:
* Check if tables and indexes exist
* Remove commands for unused table
2015-04-21 14:01:05 -07:00
seelabs
6a0c26a709 Fix return value when looking up non existent transactions 2015-04-21 14:01:00 -07:00
JoelKatz
e44ae6af93 Give ledger data requests their own job type:
This gives requests for ledger data (and transaction set data)
from peers a separate job type and prioritizes it appropriately.
Previously it was lumped in with fetch packs which have a low
concurrency limit. This should improve the performance of
retrieving historical information.
2015-04-21 14:00:54 -07:00
Vinnie Falco
837b0799ac Set version to 0.28.0-rc3 2015-04-21 13:48:39 -07:00
Nik Bougalis
bc85a8b24f Set TX processing change date to 2015-05-12 13:00:00PDT 2015-04-21 13:48:38 -07:00
Miguel Portilla
15d68649d5 Fix check for current ledger ID in RPC 2015-04-21 13:48:30 -07:00
Tom Ritchford
e0d96ae807 Fix WebSockets treatment of ping timer:
This solves a problem that caused a hang on shutdown related to
the lifetime of the ping timer completion handlers used in WebSockets.

* Turn the ping timer back on
* Use std::weak_ptr for WebSockets timer callbacks.
* Disable WebSocket pings if frequency in the .cfg is non-positive.
2015-04-21 12:26:11 -07:00
Torrie Fischer
3aa39ced60 Fix circleci 2015-04-21 12:23:23 -07:00
seelabs
1f1c0618e1 Tidy up SQLite table creation:
* Check if tables and indexes exist
* Remove commands for unused table
2015-04-21 12:21:27 -07:00
seelabs
7788aa25b5 Fix return value when looking up non existent transactions 2015-04-21 12:20:53 -07:00
JoelKatz
d5b460a85c Give ledger data requests their own job type:
This gives requests for ledger data (and transaction set data)
from peers a separate job type and prioritizes it appropriately.
Previously it was lumped in with fetch packs which have a low
concurrency limit. This should improve the performance of
retrieving historical information.
2015-04-21 12:15:59 -07:00
Vinnie Falco
9019f3a4f2 Set version to 0.28.1-b2 2015-04-20 15:57:02 -07:00
seelabs
006020aef2 Support for boost 1.58 2015-04-20 15:55:48 -07:00
seelabs
dfda0d566a Support for boost 1.58 2015-04-20 15:55:48 -07:00
Vinnie Falco
99c2fac143 STVar: optimized storage for STObject (RIPD-825):
This introduces the STVar container, capable of holding any STBase-derived
class and implementing a "small string" optimization. STObject is changed
to store std::vector<STVar> instead of boost::ptr_vector<STBase>. This
eliminates a significant number of needless dynamic memory allocations and
deallocations during transaction processing when ledger entries are
deserialized. It comes at the expense of larger overall storage requirements
for STObject.
2015-04-20 15:54:26 -07:00
Nicholas Dudfield
4c5308da8d Update account_objects test:
* Use Request over json-rpc
* Use lodash to filter irrelevant fields from expectations
* Use LedgerState for state setup
* Test using limit and marker

Conflicts:
	test/account_objects-test.js
2015-04-20 15:54:14 -07:00
Miguel Portilla
4d0ed3d857 RPC account_objects (RIPD-777)
General RPC command that can retrieve objects in the account root.
  * Add account objects integration test.
  * Support tickets.

* Add removeElement in Json::Value
2015-04-20 15:54:09 -07:00
Vinnie Falco
0b5582ed0d Disable redundant ping timer 2015-04-20 15:52:38 -07:00
Tom Ritchford
17734f833c Revert "Checkpoint SOCI exactly every 1000 pages."
This reverts commit e874a2624f.
2015-04-20 15:52:33 -07:00
Vinnie Falco
98a9d5d424 Lower the severity of some PeerFinder logging 2015-04-20 15:52:29 -07:00
Vinnie Falco
6d74f36449 Fix Crawl handshake header parsing in Overlay 2015-04-20 15:52:20 -07:00
Vinnie Falco
22d08b70ec Fix beast::ci_equal 2015-04-20 15:52:16 -07:00
Vinnie Falco
47a5bf6aa5 Fix beast::ci_equal 2015-04-20 15:52:16 -07:00
Vinnie Falco
2805e9eb3b Set version to 0.28.0-rc2 2015-04-20 15:19:07 -07:00
Vinnie Falco
72a1a86886 Disable redundant ping timer 2015-04-20 13:42:00 -07:00
Tom Ritchford
ec190bae33 Revert "Checkpoint SOCI exactly every 1000 pages."
This reverts commit e874a2624f.
2015-04-20 11:01:23 -07:00
Vinnie Falco
83003e43d7 Lower the severity of some PeerFinder logging 2015-04-20 11:01:20 -07:00
Vinnie Falco
3b20dc2994 Fix Crawl handshake header parsing in Overlay 2015-04-20 11:00:03 -07:00
Vinnie Falco
a7198298e7 Fix beast::ci_equal 2015-04-20 10:59:58 -07:00
Vinnie Falco
f3d76d5780 Set version to 0.28.1-b1 2015-04-17 11:43:51 -07:00
Vinnie Falco
e2305c3c5e Merge branch 'release' into develop
Conflicts:
	Builds/rpm/rippled.spec
	src/ripple/protocol/impl/BuildInfo.cpp
2015-04-17 11:43:09 -07:00
Vinnie Falco
ba737d7e58 Set version to 0.28.0-rc1 2015-04-17 11:41:50 -07:00
Vinnie Falco
88f69204c8 Merge 0.28.0-b21 into release 2015-04-17 11:41:17 -07:00
Vinnie Falco
bb4561c2b8 Set version to 0.28.0-b22 2015-04-16 11:31:57 -07:00
seelabs
4710f764e4 Quiet unused variable warning 2015-04-16 11:31:57 -07:00
JoelKatz
11a59a767e Adjust cache parameters for 'huge' node size 2015-04-16 11:31:54 -07:00
Miguel Portilla
4cf3157aad Set version to 0.28.0-b21 2015-04-14 18:54:31 -04:00
Miguel Portilla
b1f6cb349b Improved parsing of universal port configuration settings (RIPD-856) 2015-04-14 18:51:53 -04:00
David Schwartz
0c134582ca Track peer "sanity" (RIPD-836)
* Each peer has a "sane/insane/unknown" status
* Status updated based on peer ledger sequence
* Status reported in peer json
* Only sane peers preferred for historical ledgers
* Overlay endpoints only accepted from known sane peers
* Untrusted proposals not relayed from insane peers
* Untrusted validations not relayed from insane peers
* Transactions from insane peers are not processed
* Periodically drop outbound connections to bad peers
* Bad peers get bootcache valence of zero

Peer "sanity" is based on the ledger sequence number they are on.  We
quickly become able to assess this based on current trusted validations.
We quarrantine rogue messages and disconnect bad outbound connections to
help maintain the configured number of good outbound connections.
2015-04-14 18:51:52 -04:00
Nik Bougalis
acf2833362 Set version to 0.28.0-b20 2015-04-13 10:24:47 -07:00
Nik Bougalis
20f9971096 Finalize date for switchover to 0.28.0 processing semantics 2015-04-13 10:24:47 -07:00
Nik Bougalis
cefeaceef0 Signal error for incorrect configuration during unit test 2015-04-13 10:24:47 -07:00
Howard Hinnant
1ba7c4b6ee Remove unneeded member initializer:
* This works around a clang bug.
* Also un-commented correctly deleted copy members.
2015-04-13 10:24:47 -07:00
Vinnie Falco
1b49776819 Add fetchBatch Backend interface 2015-04-10 19:14:57 -07:00
Vinnie Falco
41c68f4bbc Use static_initializer in KnownFormats singleton 2015-04-10 19:14:57 -07:00
Nik Bougalis
56ac830405 Refund owner's ticket reserve when a ticket is canceled (RIPD-855) 2015-04-10 19:12:51 -07:00
Nik Bougalis
ebcf821d81 Return descriptive error from account_currencies RPC (RIPD-806):
The 'account_index' field is expected to be an integer. If something
else is specified, the error message should clearly indicate which
field is at fault.
2015-04-10 19:11:28 -07:00
Tom Ritchford
e874a2624f Checkpoint SOCI exactly every 1000 pages. 2015-04-10 19:11:28 -07:00
Tom Ritchford
03d1c0ed21 Clean SOCI code.
* Throw exception rather than SEGV.
* Hide details of checkpointing from clients.
* Restrict to 80 columns and minor style tweaks.
2015-04-10 19:11:28 -07:00
Tom Ritchford
1b8c77eee0 Allow logging to be used outside the ripple namespace.
* Split logging macros over multiple lines.
* Restrict Log.h to 80 columns.
2015-04-10 19:11:28 -07:00
Tom Ritchford
d575cd50b1 Clean up Sustain.h and Sustain.cpp.
* Bring out magic numbers.
  * Get rid of boost::format.
2015-04-10 19:11:28 -07:00
Tom Ritchford
2b040569e7 Remove deprecated flags --rpc_ip and --rpc_port. 2015-04-10 19:11:28 -07:00
Miguel Portilla
7a53f86fff Compare current seq vs validated (RIPD-669) 2015-04-10 19:11:28 -07:00
Torrie Fischer
a90bb53cd2 Drop nexmo SMS support. Reverts 58b3cc1d. 2015-04-10 19:11:27 -07:00
Tom Ritchford
b450d62138 Port to Python: Build and run tests for multiple build configurations. 2015-04-10 19:11:27 -07:00
seelabs
ab77e36c70 Add workaround include for Windows.h NOMINMAX 2015-04-10 19:00:45 -07:00
Nik Bougalis
1a9d65c52a Set version to 0.28.0-b19 2015-04-10 19:00:45 -07:00
seelabs
05f4746bbe Add workaround include for Windows.h NOMINMAX 2015-04-10 19:00:45 -07:00
seelabs
a2530de06a Safer macro restoration using MSVC extensions 2015-04-10 19:00:34 -07:00
seelabs
1c587723fa Safer macro restoration using MSVC extensions 2015-04-10 19:00:34 -07:00
Nik Bougalis
b2a9c79de5 Fix transaction enumeration in account_tx (RIPD-734):
In some corner cases, an incorrect resume marker could be
returned, preventing the complete enumeration of account
transactions.

* Robust markers via improved paging support
* New unit tests
* Cleanup
2015-04-10 19:00:22 -07:00
Nik Bougalis
64259c7bcb Better transaction analysis (RIPD-755):
The analysis of differences between locally built ledgers and consensus
ledgers is now more intelligent. Differences in these values will be
categorized:

 - Operation results
 - Transaction ordering
 - Generated metadata
2015-04-10 18:58:52 -07:00
Nik Bougalis
a7efdb4e52 Improve version switchover semantics:
* Support PreviousTxnID until the switchover
* Implement "No Ripple" for issue_iou and redeem_iou.
* Do not utilize issue_iou and redeem_iou from legacy code
* Rename 0.27.x legacy files to account for VS build process
* Misc. cleanups
2015-04-10 18:56:52 -07:00
Tom Ritchford
091ff0cce0 Set version to 0.28.0-b18 2015-03-31 21:50:45 -04:00
seelabs
7e25a3a942 Fix SQL in online delete cleanup:
* SQL statement is corrected to perform an implicit JOIN
* Add unit test
2015-03-31 21:50:45 -04:00
Nik Bougalis
b3254e2b18 Remove unsupported proof-of-work command parsing 2015-03-31 21:50:44 -04:00
JoelKatz
9a0fa79144 Fix duplication of full below cache and tree node cache 2015-03-31 21:50:43 -04:00
JoelKatz
352db260b2 STArray optimization 2015-03-31 21:50:43 -04:00
Nik Bougalis
f072b5b679 Avoid copying and improve optimization opportunities 2015-03-31 21:50:43 -04:00
Vinnie Falco
c7c7084423 NuDB: Enforce pool_thresh minimum of 1:
pool_thresh is prevented from going to zero. This solves a problem when
using callgrind where the CPU is monopolized, causing operations that
should complete quickly to take days.
2015-03-31 21:50:42 -04:00
JoelKatz
b4058a813b Small changes to improve transaction benchmarking:
* Set transaction valid in hash router correctly
* Properly account for root nodes in walkLedger
* If loaded ledger is insane, log details
* Extra logging while loading replay ledger
* Don't test unsigned transactions expecting them to succeed
* Don't be too noisy about signature failures
2015-03-31 21:50:42 -04:00
Vinnie Falco
b27e152ead NuDB: Enforce pool_thresh minimum of 1:
pool_thresh is prevented from going to zero. This solves a problem when
using callgrind where the CPU is monopolized, causing operations that
should complete quickly to take days.
2015-03-31 21:50:42 -04:00
Tom Ritchford
936e83759d Remove three warnings. 2015-03-31 21:50:41 -04:00
Tom Ritchford
18fdc175c6 Clean structure of RPC::addPaymentDeliveredAmount 2015-03-31 21:50:41 -04:00
JoelKatz
47c6ab0ced Reduce SHAMapTreeNode copying during SHAMap unsharing:
In some code paths, we bump the SHAMap sequence number
before we unshare. This forces SHAMapTreeNode to be
copied. By making the ledger immutable we cause the
unsharing to occur earlier, eliminating the copies.
2015-03-31 21:50:40 -04:00
seelabs
4868135d47 Improve build times:
* Get classic & unity sources once only
* Use MD5-Timestamp
* Use implicit cache for specific debug builds
* Skip prep work for targets what will not be built
2015-03-31 21:50:39 -04:00
Miguel Portilla
5e70db651d Improved local tx error messages (RIPD-720)
Failed local built transactions report the specific error.
2015-03-31 21:50:39 -04:00
David Schwartz
1fedede771 Remove transaction set acquire logic from consensus object
This creates a new InboundTransactions object that handles transaction sets,
removing this responsibility from the consensus object. The main benefit is
that many inbound transaction operations no longer require the master lock.

Improve logic to decide which peers to query, when to add more peers, and
when to re-query existing peers.
2015-03-31 21:50:38 -04:00
seelabs
00596f1436 Reduce memory allocation, remove some functions in Serializer. 2015-03-31 21:50:37 -04:00
Nik Bougalis
db840b5604 Perform Transactor checks early (RIPD-751):
Certain checks that determine if a transaction is malformed can be performed
without needing to look up accounts or access the ledger.

Perform those checks as early as possible to optimize transaction processing.
2015-03-31 06:49:53 -07:00
Nik Bougalis
45070d0e51 Reduce Transaction public interface 2015-03-30 13:05:42 -07:00
Howard Hinnant
30121de963 Change several uses of std::list to alternative containers:
*  Performance motivated.
*  Several of these called size() which is O(N) in gcc-4.8.
*  Remove container copy from LedgerConsensusImp::playbackProposals().
*  Addresses RIPD-284.
2015-03-26 12:38:33 -04:00
Tom Ritchford
8a1081f9ef Set version to 0.28.0-b17 2015-03-26 12:38:33 -04:00
Howard Hinnant
fbf9c86c5c Remove unnecessary allocation/deallocation from masterLock
* Add make_lock.
* Rename Application::LockType to Application::MutexType:
* Rename getMasterLock to getMasterMutex.
* Use getMasterMutex and make_lock.
* Remove unused code.
2015-03-26 12:38:33 -04:00
seelabs
ac84e44161 Correct missing semicolons on sql statements 2015-03-26 12:38:33 -04:00
seelabs
836dfb6503 Do not log errors from initial database statements 2015-03-26 12:38:33 -04:00
Edward Hennis
35a8ce2349 Pathfinding unit tests:
* Refactor ripple path find to be more testable.
* Reimplements the first 4 tests from `tests\path-test.js`
* Verify balances in Ledger test.
2015-03-26 12:38:33 -04:00
Tom Ritchford
bb7d68b3b9 Add notes about Rippled's container classes. 2015-03-26 12:38:33 -04:00
Howard Hinnant
1979846e5e Change several uses of std::list to alternative containers:
*  Performance motivated.
*  Several of these called size() which is O(N) in gcc-4.8.
*  Remove container copy from LedgerConsensusImp::playbackProposals().
*  Addresses RIPD-284.
2015-03-26 12:38:33 -04:00
Howard Hinnant
a61ffab3f9 Remove unnecessary allocation/deallocation from masterLock
* Add make_lock.
* Rename Application::LockType to Application::MutexType:
* Rename getMasterLock to getMasterMutex.
* Use getMasterMutex and make_lock.
* Remove unused code.
2015-03-26 12:38:33 -04:00
Howard Hinnant
698fe73608 Move SHAMap hash computations from dirtyUp to walkSubTree
in order to reduce the total number of hash computations.
2015-03-26 12:38:33 -04:00
Josh Juran
0083c32629 Update VS project files 2015-03-26 12:38:33 -04:00
Nik Bougalis
f313caaa73 Set version to 0.28.0-b16 2015-03-19 07:55:19 -07:00
Edward Hennis
6e3f07ddce Remove unused / redundant functions. 2015-03-19 07:41:57 -07:00
Mark Travis
11d28c4856 Always increment payment pass counter 2015-03-19 07:41:57 -07:00
Nik Bougalis
e9394ca85a Implement "Default Ripple" logic in active direction:
When a balance change invokes trustCreate, we need to set the no ripple flag
if the "active" account's asfRippleDefault flag is cleared.
2015-03-19 07:41:57 -07:00
Nik Bougalis
9445a30e72 Implement "Default Ripple" logic in LedgerEntrySet::checkState 2015-03-19 07:41:57 -07:00
JoelKatz
185b1a3d36 Add noripple_check RPC command
To help gateways make the changes needed to adjust to the
"default ripple" flag, we've added the "noripple_check"
RPC command. This command tells gateways what they need
to do to set this flag and fix any trust lines created
before they set the flag.

Once your server is running and synchronized, you can run
the tool from the command line with a command like:
  rippled json noripple_check '
  {
    "account" : "<gateway_trusted_address_here>",
    "role" : "gateway",
    "transactions" : "true"
  }'

The server will respond with a list of "problems" that it
sees with the configuration of the account and its trust
lines. It will also return a "transactions" array suggesting
the transactions needed to fix the problems it found.
2015-03-19 07:41:57 -07:00
JoelKatz
1c2f5d60a5 Subscribe/Unsubscribe improvements:
* Don't acquire the master lock where it's not needed
* InfoSub tracks RT and validated accounts separately
* Correctly remove accounts from the InfoSub
2015-03-19 07:41:57 -07:00
JoelKatz
2f32910bef Reduce master lock scope in some RPC functions 2015-03-19 07:41:57 -07:00
JoelKatz
8de1b20bb5 Defer/avoid acquiring the master lock on proposals 2015-03-19 07:41:57 -07:00
David Schwartz
60a7abcef6 Decongest the master lock:
* Reduce scope of lock in ledger accept
* Remove duplicate tracking of transaction sets
* Need master lock to secure ledger sequencing
2015-03-19 07:41:57 -07:00
David Schwartz
e44e75fa6b Track and report peer load:
* PeerImp::charge only calls fail if dispatched from the peer
* Add "load" to output of RPC command "peer"
* Add Resource::Charge values for peer commands
* Impose some fee for every peer command
* Cleanup fee imposition
2015-03-19 07:41:57 -07:00
JoelKatz
ff7dc0b446 Reduce chatty log outputs 2015-03-19 07:41:57 -07:00
JoelKatz
f813cb2310 Tolerate LedgerSequence field in pseudo-transactions:
This will enable a forthcoming change to prevent pseudo-transactions
from reusing a transaction ID
2015-03-19 07:41:57 -07:00
JoelKatz
cba19d7e23 Document and cleanup ledger advance logic
* Don't acquire if validated ledger is old
* Don't try to publish if no valid ledger
* Update README.md file
2015-03-19 07:41:57 -07:00
Miguel Portilla
233127393f Better admin IP management in .cfg (RIPD-820):
* Deprecate rpc_admin_allow section from configuration file
* New port-specific setting 'admin':
  * Comma-separated list of IP addresses that are allowed administrative
    privileges (subject to username & password authentication if configured)
  * 127.0.0.1 is no longer a default admin IP.
  * 0.0.0.0 may be specified to indicate "any IP" but cannot be combined
    with other IP addresses.
2015-03-18 19:39:30 -07:00
Nicholas Dudfield
9479c0e12d Update uniport tests to use new config 2015-03-18 19:39:30 -07:00
Nicholas Dudfield
65c9c45ec6 Rename test file so npm test finds it 2015-03-18 19:39:30 -07:00
Miguel Portilla
6d79004d4f Better admin IP management in .cfg (RIPD-820):
* Deprecate rpc_admin_allow section from configuration file
* New port-specific setting 'admin':
  * Comma-separated list of IP addresses that are allowed administrative
    privileges (subject to username & password authentication if configured)
  * 127.0.0.1 is no longer a default admin IP.
  * 0.0.0.0 may be specified to indicate "any IP" but cannot be combined
    with other IP addresses.
2015-03-18 19:39:30 -07:00
seelabs
97623d20c5 Use soci in more places:
* Validator, peerfinder, SHAMapStore,
  RpcDB, TxnDB, LedgerDB, WalletDB use soci backend.
2015-03-18 19:39:26 -07:00
seelabs
d37802a42f Remove SqliteFactory. 2015-03-18 19:37:09 -07:00
seelabs
4a47ba9b35 Remove beast's sqdb module.
Conflicts:
	src/beast/beast/module/sqdb/api/backend.h
	src/beast/beast/module/sqdb/api/blob.h
	src/beast/beast/module/sqdb/api/into.h
	src/beast/beast/module/sqdb/api/session.h
	src/beast/beast/module/sqdb/api/statement.h
	src/beast/beast/module/sqdb/api/transaction.h
	src/beast/beast/module/sqdb/api/type_conversion_traits.h
	src/beast/beast/module/sqdb/api/use.h
	src/beast/beast/module/sqdb/detail/error_codes.h
	src/beast/beast/module/sqdb/detail/exchange_traits.h
	src/beast/beast/module/sqdb/detail/into_type.h
	src/beast/beast/module/sqdb/detail/once_temp_type.h
	src/beast/beast/module/sqdb/detail/prepare_temp_type.h
	src/beast/beast/module/sqdb/detail/ref_counted_prepare_info.h
	src/beast/beast/module/sqdb/detail/ref_counted_statement.h
	src/beast/beast/module/sqdb/detail/statement_imp.h
	src/beast/beast/module/sqdb/detail/type_conversion.h
	src/beast/beast/module/sqdb/detail/type_ptr.h
	src/beast/beast/module/sqdb/detail/use_type.h
	src/beast/beast/module/sqdb/sqdb.h
2015-03-18 19:37:08 -07:00
seelabs
9b837a24aa Remove beast's sqdb module.
Conflicts:
	src/beast/beast/module/sqdb/api/backend.h
	src/beast/beast/module/sqdb/api/blob.h
	src/beast/beast/module/sqdb/api/into.h
	src/beast/beast/module/sqdb/api/session.h
	src/beast/beast/module/sqdb/api/statement.h
	src/beast/beast/module/sqdb/api/transaction.h
	src/beast/beast/module/sqdb/api/type_conversion_traits.h
	src/beast/beast/module/sqdb/api/use.h
	src/beast/beast/module/sqdb/detail/error_codes.h
	src/beast/beast/module/sqdb/detail/exchange_traits.h
	src/beast/beast/module/sqdb/detail/into_type.h
	src/beast/beast/module/sqdb/detail/once_temp_type.h
	src/beast/beast/module/sqdb/detail/prepare_temp_type.h
	src/beast/beast/module/sqdb/detail/ref_counted_prepare_info.h
	src/beast/beast/module/sqdb/detail/ref_counted_statement.h
	src/beast/beast/module/sqdb/detail/statement_imp.h
	src/beast/beast/module/sqdb/detail/type_conversion.h
	src/beast/beast/module/sqdb/detail/type_ptr.h
	src/beast/beast/module/sqdb/detail/use_type.h
	src/beast/beast/module/sqdb/sqdb.h
2015-03-18 19:37:08 -07:00
seelabs
d0ef2f7dd8 Use soci in some places:
* Brings the soci subtree into rippled.
* Validator, peerfinder, and SHAMapStore use new soci backend.
* Optional postgresql backend for soci (if POSTGRESQL_ROOT env var is set).
2015-03-18 19:37:08 -07:00
seelabs
44932b170f Update sqlite3 to 3.8.8.2. 2015-03-18 19:37:03 -07:00
seelabs
c7cfd23580 Update sqlite3 to 3.8.8.2. 2015-03-18 19:37:03 -07:00
Vinnie Falco
9708a12607 Squashed 'src/soci/' content from commit 6e9312c
git-subtree-dir: src/soci
git-subtree-split: 6e9312c4bb3748907bd28d62c40feca42878cfef
2015-03-18 19:36:00 -07:00
Vinnie Falco
7cf1ec3f89 Merge commit '9708a1260720d879d76a10f894925962f20611bc' as 'src/soci' 2015-03-18 19:36:00 -07:00
Nik Bougalis
92812fe723 Set version to 0.27.4 2015-03-18 17:54:57 -07:00
JoelKatz
79417ac59a Limit passes in the payment engine to prevent endless looping:
This adds a limit of 1,000 passes to the payment engine. It protects against
possible cases where the execution of a pass fails to exhaust the liquidity
that made the pass possible or cases where two passes alternate providing
liquidity for each other.
2015-03-18 17:53:52 -07:00
Mark Travis
984f66e083 Don't VACUUM SQLite databases on startup with online delete enabled. 2015-03-18 17:53:42 -07:00
Tom Ritchford
ef2a436769 Set version to 0.28.0-b15 2015-03-16 20:54:17 -04:00
Edward Hennis
7f1a95550f Clean up unit test logs on success.
* Add a little bit of shell variable safety and tweak output.
2015-03-16 20:54:17 -04:00
seelabs
803f5b5613 Use buffer in STBlob 2015-03-16 20:54:15 -04:00
Nicholas Dudfield
8ca9fa1c26 Fix testutils.create_accounts
* Don't call ledger_wait inside parallel async loop
2015-03-16 20:54:14 -04:00
David Schwartz
3b3b897193 Add "Default Ripple" account flag and associated logic:
AccountSet set/clear, asfDefaultRipple = 8

AccountRoot flag, lsfDefaultRipple = 0x00800000

In trustCreate, set no ripple flag if appropriate.

If an account does not have the default ripple flag set,
new ripple lines created as a result of its offers being
taken or people creating trust lines to it have no ripple
set by that account's side automatically

Trust lines can be deleted if the no ripple flag matches
its default setting based on the account's default ripple
setting.

Fix default no-rippling in integration tests.
2015-03-16 20:54:14 -04:00
Torrie Fischer
6c364f63cc Build docker images on circleci based on travis.yml 2015-03-16 20:54:14 -04:00
seelabs
6b9e842ddd Replaces StringPairArray with Section in Config. 2015-03-16 20:54:13 -04:00
Nik Bougalis
8f88d915ba Support switchover from 0.27 to 0.28 processing semantics based on time:
Changes made to support autobridging and improve the offer-crossing and
pathfinding logic result in transaction-breaking changes which cause
incompatibilities between 0.27 and 0.28 builds of RippleD.

This patch simplifies deployment of 0.28 on the Ripple network by allowing
RippleD to emulate the 0.27 semantics while the last closed ledger closed
before March 30, 2015 at 13:00:00 PDT, after which time the new 0.28
semantics will become active.

The transaction-breaking changes addressed in this commit are:
    3ccbd7c9b2
    b203db27a4
2015-03-16 20:54:12 -04:00
JoelKatz
eaa1f47f00 Limit passes in the payment engine to prevent endless looping:
This adds a limit of 1,000 passes to the payment engine. It protects against
possible cases where the execution of a pass fails to exhaust the liquidity
that made the pass possible or cases where two passes alternate providing
liquidity for each other.
2015-03-16 20:54:11 -04:00
JoelKatz
cbeae85731 Fix specified destination issuer in pathfinding (RIPD-812)
* Compute the effective recipient.
* Make sure the effective recipient exists.
* Prohibit paths to the recipient, if not the effective recipient.
* Treat paths to the effective recipient as complete.
* Don't find looped paths.
* Use the effective recipient for getPathsOut weight.
2015-03-16 20:54:09 -04:00
Nik Bougalis
84e618b3f2 Improve pool seeding during startup:
* When starting up, we no longer rely just on the standard
  system RNG to generate entropy: we attempt to squeeze some
  from the execution state, and to recover any entropy that
  we had previously stored.

* When shutting down, if sufficient entropy has been accumulated
  attempt to store it for future use.
2015-03-16 20:54:08 -04:00
JoelKatz
382a16ff07 Avoid excess ledger header requests 2015-03-16 20:54:07 -04:00
JoelKatz
7bd339b645 Balance peer selection in getFetchPack 2015-03-16 20:54:07 -04:00
David Schwartz
70d8b2c4b7 getMissingNode performance and logging improvements 2015-03-16 20:54:07 -04:00
David Schwartz
3764a83c6b Ledger binary option
Conflicts:
	src/ripple/app/ledger/Ledger.cpp
	src/ripple/app/ledger/Ledger.h
	src/ripple/rpc/handlers/Ledger.cpp
2015-03-16 20:54:06 -04:00
Tom Ritchford
c3d200ddcd Set version to 0.28.0-b14 2015-03-13 11:21:02 -04:00
Tom Ritchford
44c5e337ab Remove obsolete comments from doc/CHANGELOG. 2015-03-13 11:21:02 -04:00
Nik Bougalis
040982e321 Only report 'delivered_amount' for executed payments (RIPD-827) 2015-03-13 11:21:00 -04:00
Nik Bougalis
6c81ea846c Calculate deep offer quality 2015-03-13 11:20:59 -04:00
Josh Juran
d082a0696d Support Ed25519 keys and signatures:
Recognize a new JSON parameter `key_type` in handlers for wallet_propose
and sign/submit.  In addition to letting the caller to specify either of
secp256k1 or ed25519, its presence prohibits the (now-deprecated) use of
heuristically polymorphic parameters for secret data -- the `passphrase`
parameter to wallet_propose will be not be considered as an encoded seed
value (for which `seed` and `seed_hex` should be used), and the `secret`
parameter to sign and submit will be obsoleted entirely by the same trio
above.

* Use constants instead of literals for JSON parameter names.
* Move KeyType to its own unit and add string conversions.
* RippleAddress
  * Pass the entire message, rather than a hash, to accountPrivateSign()
    and accountPublicVerify().
  * Recognize a 33-byte value beginning with 0xED as an Ed25519 key when
    signing and verifying (for accounts only).
  * Add keyFromSeed() to generate an Ed25519 secret key from a seed.
  * Add getSeedFromRPC() to extract the seed from JSON parameters for an
    RPC call.
  * Add generateKeysFromSeed() to produce a key pair of either type from
    a seed.
* Extend Ledger tests to cover both key types.
2015-03-12 21:53:59 -07:00
Nik Bougalis
f999839e59 Set version to 0.27.3-sp2 2015-03-12 13:37:47 -07:00
JoelKatz
f1bc662a24 Add noripple_check RPC command
To help gateways make the changes needed to adjust to the
"default ripple" flag, we've added the "noripple_check"
RPC command. This command tells gateways what they need
to do to set this flag and fix any trust lines created
before they set the flag.

Once your server is running and synchronized, you can run
the tool from the command line with a command like:
  rippled json noripple_check '
  {
    "account" : "<gateway_trusted_address_here>",
    "role" : "gateway",
    "transactions" : "true"
  }'

The server will respond with a list of "problems" that it
sees with the configuration of the account and its trust
lines. It will also return a "transactions" array suggesting
the transactions needed to fix the problems it found.
2015-03-12 13:37:06 -07:00
Nik Bougalis
232693419a Set version to 0.27.3-sp1 2015-03-11 10:26:39 -07:00
Nicholas Dudfield
ed66b951c6 Fix testutils.create_accounts
* Don't call ledger_wait inside parallel async loop
2015-03-11 10:25:27 -07:00
Nik Bougalis
70c2854f7c Set version to 0.27.3 2015-03-10 14:06:33 -07:00
David Schwartz
e9381ddeb2 Add "Default Ripple" account flag and associated logic:
AccountSet set/clear, asfDefaultRipple = 8

AccountRoot flag, lsfDefaultRipple = 0x00800000

In trustCreate, set no ripple flag if appropriate.

If an account does not have the default ripple flag set,
new ripple lines created as a result of its offers being
taken or people creating trust lines to it have no ripple
set by that account's side automatically

Trust lines can be deleted if the no ripple flag matches
its default setting based on the account's default ripple
setting.

Fix default no-rippling in integration tests.
2015-03-10 14:05:18 -07:00
Tom Ritchford
1b46e003c3 Set version to 0.28.0-b13 2015-03-09 17:49:39 -04:00
Howard Hinnant
4611d5a35f Remove unused SyncUnorderedMap 2015-03-09 17:49:39 -04:00
Nicholas Dudfield
2e59378ab7 Fix AppVeyor:
* Detect continuous integration environment via `CI` variable
* Use double quotes for build cache path
2015-03-09 17:49:39 -04:00
JoelKatz
fc8bf39043 Simplify tracking of recently requested ledger entries
Instead of tracking recently-requested entries from inbound
ledgers by node ID, track by hash. This allows state and
transaction entries to be tracked in the same set.
2015-03-09 17:49:38 -04:00
Vinnie Falco
0675c2b374 Fix gentex usage in nudb 2015-03-09 17:49:37 -04:00
Vinnie Falco
2cccd8ab28 Fix gentex usage in nudb 2015-03-09 17:49:37 -04:00
Vinnie Falco
bc5fcbbc88 Tidy up nudb:
* Define WIN32_LEAN_AND_MEAN before including Windows.h
* Remove unnecessary template argument
* Rename to identity
* Make identity default api codec
2015-03-09 17:49:37 -04:00
Vinnie Falco
d537ceedd6 Tidy up nudb:
* Define WIN32_LEAN_AND_MEAN before including Windows.h
* Remove unnecessary template argument
* Rename to identity
* Make identity default api codec
2015-03-09 17:49:37 -04:00
Tom Ritchford
ac7243b309 Remove unused static function. 2015-03-02 17:40:12 -05:00
Tom Ritchford
607e983f37 Set version to 0.28.0-b12 2015-03-02 16:50:01 -05:00
Mark Travis
02f7326b7e Remove orphan function. 2015-03-02 16:50:01 -05:00
Edward Hennis
b688f69031 Builds/test-only.sh will build and test by scons target.
* test-all.sh simplified to call test-only.sh.
* Script fails if build or tests fail. Allows chaining and git bisect run.
* Add copyright notice
* Ignore gprof performance data created by testing the profile builds.
2015-03-02 16:50:00 -05:00
Tom Ritchford
df41329df9 Replace "it's" with "its" in several places. 2015-03-02 16:49:59 -05:00
Tom Ritchford
0825bd7076 Cleanups to Json Object code.
* Replace Json::JsonException with std::logic_error.
* Move two functions definitions to Object.cpp.
* Fix include guards.
2015-03-02 16:49:56 -05:00
Tom Ritchford
e9b7003cf5 Move streaming Json objects to ripple/json. 2015-03-02 16:49:56 -05:00
Tom Ritchford
c5d673c426 Better integration between JsonObject and Json::Value. 2015-03-02 16:49:56 -05:00
Nik Bougalis
9cc8eec773 Set version to 0.27.2 2015-03-01 14:56:44 -08:00
Nik Bougalis
0b45535061 Calculate deep offer quality 2015-02-28 13:28:54 -08:00
Tom Ritchford
9f64ad8d89 Add WebSocket 04 interface.
* New WebSocket04 traits class implements strategies.
* New "websocket_version" configuration setting selects between 0.2 and 0.4.
2015-02-28 14:57:38 -05:00
Tom Ritchford
e5b0b7e9a7 Expose a method and add a handler in websocketpp.
* Expose websocketpp::transport::asio::connection::get_strand().
* Add new send_empty_handler to websocketpp::endpoint.
2015-02-28 14:57:38 -05:00
Tom Ritchford
9c3522cb70 Isolate WebSocket 0.2-specific code.
* Hide implementation details of the WebSocket server from clients.
* Extract a generic traits class.
2015-02-28 14:57:38 -05:00
Tom Ritchford
b357390215 Remove redundant post to strand in websocket. 2015-02-27 12:11:54 -05:00
Tom Ritchford
c66fc2f656 Rename all WebSocket code into one directory. 2015-02-27 12:11:54 -05:00
Tom Ritchford
64554aca6d Set version to 0.28.0-b11 2015-02-26 21:02:39 -05:00
Nik Bougalis
f1df9a02fa Fix declaration/implementation mismatches 2015-02-26 21:02:38 -05:00
JoelKatz
f3725bdd2e Return a validated ledger if there is one (RIPD-814)
LedgerMaster::getLedgerBySeq should return a validated
ledger (rather than the the open or closed ledger) for
a sequence number for which it has a fully-validated ledger.
2015-02-26 21:02:37 -05:00
Tom Ritchford
cb92b94d55 Remove unused variable. 2015-02-26 21:02:36 -05:00
Vinnie Falco
da21c77ae3 Support per-target ExcludeFromBuild in VSProject 2015-02-26 21:02:35 -05:00
Vinnie Falco
ef01f82e0c Add nounity targets to msvc projects 2015-02-26 21:02:35 -05:00
Vinnie Falco
4ba7ee8c92 Support per-target ExcludeFromBuild in VSProject 2015-02-26 21:02:35 -05:00
Howard Hinnant
c59633a588 Make SHAMap::fetchNodeFromDB const
When fetchNodeFromDB discovers a missing node in the database it
must reset the ledger sequence to 0.  By treating this as a logically
const operation, even though not physically const, many other member
functions can be made const, including compare.
2015-02-26 21:02:33 -05:00
Vinnie Falco
f56e37398c Always use HTTP handshaking in overlay:
Inbound and outbound peer connections always use HTTP handshakes to
negotiate connections, instead of the deprecated TMHello protocol
message.

rippled versions 0.27.0 and later support both optional HTTP handshakes
and legacy TMHello messages, so always using HTTP handshakes should not
cause disruption. However, versions before 0.27.0 will no longer be
able to participate in the overlay network - support for handshaking
via the TMHello message is removed.
2015-02-26 21:02:32 -05:00
Tom Ritchford
e43ffa6f2b Set version to 0.28.0-b10 2015-02-25 20:26:12 -05:00
Yana
6991bc9723 Spelling corrections 2015-02-25 20:26:12 -05:00
Miguel Portilla
9d6106a80b Require boost 1.57 2015-02-25 20:26:12 -05:00
Tom Ritchford
9e70404411 Get rid of compilation warning. 2015-02-25 20:26:12 -05:00
Nik Bougalis
bc48d299b6 Report server versions when crawling the overlay network 2015-02-25 20:26:12 -05:00
mDuo13
a8db5650a5 Add online_delete reminder to ledger_history in example cfg 2015-02-25 19:56:47 -05:00
Nicholas Dudfield
91871b418b Changes to Universal Port:
* Add tests
* Introduce requestRole helper
* Always honor admin=no
* Welcome guests anywhere admin privileges aren't required
2015-02-25 19:46:56 -05:00
Tom Ritchford
aaf98082e9 Set version to 0.28.0-b9 2015-02-24 20:28:43 -05:00
Tom Ritchford
ac228deeda Replace LEDGER_JSON_ macros with an enum. 2015-02-24 20:28:43 -05:00
Edward Hennis
fc661c83ef Build and run tests on all available build types
* Tests include unit and integration (npm)
2015-02-24 20:28:43 -05:00
Vinnie Falco
a2acffdfa3 New serialized object, public key, and private key interfaces
This introduces functions get and set, and a family of specialized
structs called STExchange. These interfaces allow efficient and
seamless interchange between serialized object fields and user
defined types, especially variable length objects.

A new base class template TypedField is mixed into existing SField
declarations to encode information on the field, allowing template
metaprograms to both customize interchange based on the type and
detect misuse at compile-time.

New types AnyPublicKey and AnySecretKey are introduced. These are
intended to replace the corresponding functionality in the deprecated
class RippleAddress. Specializations of STExchange for these types
are provided to allow interchange. New free functions verify and sign
allow signature verification and signature generation for serialized
objects.

* Add Buffer and Slice primitives
* Add TypedField and modify some SField
* Add STExchange and specializations for STBlob and STInteger
* Improve STBlob and STInteger to support STExchange
* Expose raw data in RippleAddress and Serializer
2015-02-24 20:28:43 -05:00
David Schwartz
79ce4ed226 Document cluster configuration and monitoring (RIPD-732) 2015-02-24 20:28:43 -05:00
Nik Bougalis
e3a7aa0033 Constrain valid inputs for memo fields (RIPD-712) 2015-02-24 20:25:34 -05:00
Vinnie Falco
95973ba3e8 Set version to 0.27.1 2015-02-24 13:31:13 -08:00
Vinnie Falco
49673c33b4 Use all parts of suite name to detect duplicates 2015-02-24 12:33:59 -05:00
Tom Ritchford
fde6303ae6 Set version to 0.28.0-b8 2015-02-24 12:33:59 -05:00
Miguel Portilla
c489975015 Display human readable SSL error codes 2015-02-24 12:33:59 -05:00
Vinnie Falco
b4a1948951 Use all parts of suite name to detect duplicates 2015-02-24 12:33:59 -05:00
Miguel Portilla
b927028416 Display human readable SSL error codes 2015-02-24 12:33:59 -05:00
Tom Ritchford
fe5d1ff6c5 Set version to 0.28.0-b7 2015-02-23 11:53:21 -08:00
Yana
1308656000 Update README.md file (RIPD-802) 2015-02-23 11:53:20 -08:00
Howard Hinnant
ec1e6b9385 Cleanup and simplifications to SHAMap:
SHAMapTreeNode
* Remove SHAMapTreeNode::pointer and SHAMapTreeNode::ref.
* Add std includes necessary to make the header standalone.
* Remove implementation from the SHAMapTreeNode declaration.
* Make clear what part of SHAMapTreeNode is:
  1) Truly public.
  2) Used only by SHAMap.
  3) Truly private to SHAMapTreeNode.

SHAMapItem
* Remove SHAMapItem::pointer and SHAMapItem::ref.
* Add std includes necessary to make the header standalone.
* Remove implementation from the SHAMapItem declaration.
* Make clear what part of SHAMapItem is:
  1) Truly public.
  2) Used only by SHAMapTreeNode.
  3) Truly private to SHAMapItem.

SHAMapSyncFilter
* Add override for SHAMapSyncFilter-derived functions.
* Add missing header.
* Default the destructor and delete the SHAMapSyncFilter copy members.

SHAMapNodeID
* Remove unused mHash member.
* Remove unused std::hash and boost::hash specializations.
* Remove unused constructor.
* Remove unused comparison with uint256.
* Remove unused getNodeID (int depth, uint256 const& hash).
* Remove virtual specifier from getString().
* Fix operator<= and operator>=.
* Document what API is used outside of SHAMap.
* Move inline definitions outside of the class declaration.

SHAMapMissingNode
* Make SHAMapType a enum class to prevent unwanted conversions.
* Remove needless ~SHAMapMissingNode() declaration/definition.
* Add referenced std includes.

SHAMapAddNode
* Make SHAMapAddNode (int good, int bad, int duplicate) ctor private.
* Move all member function definitions out of the class declaration.
* Remove dependence on beast::lexicalCastThrow.
* Make getGood() const.
* Make get() const.
* Add #include <string>.

SHAMap
* Remove unused enum STATE_MAP_BUCKETS.
* Remove unused getCountedObjectName().
* Remove SHAMap::pointer
* Remove SHAMap::ref
* Remove unused fetchPackEntry_t.
* Remove inline member function definitions from class declaration.
* Remove unused getTrustedPath.
* Remove unused getPath.
* Remove unused visitLeavesInternal.
* Make SHAMapState an enum class.
* Explicitly delete SHAMap copy members.
* Reduce access to nested types as much as possible.
* Normalize member data names to one style.

* Change last of the typedefs to usings under shamap.
* Reorder some includes ripple-first, beast-second.
* Declare a few constructions from make_shared with auto.
* Mark those SHAMap member functions which can be, with const.

* Add missing includes
2015-02-23 11:44:57 -08:00
Tom Ritchford
315a8b6b60 Use jss for many Json fields.
* Document JsonFields.
  * Remove some unused JsonFields values.
2015-02-23 14:36:34 -05:00
Nik Bougalis
558c6b621b Clean up JSON code:
* Remove obsolete files
* Remove obsolete preprocessor configuration tags and decorations
* Remove arcane functionality (YAML compatibility, comment support)
* Enforce strict mode (single root)
* Improve parsing of numerical types
* Misc. cleanups
2015-02-23 14:36:34 -05:00
Edward Hennis
6d91d02c62 Unit test simulated ledgers can do signature verification. 2015-02-23 14:34:37 -05:00
Josh Juran
436ded68b7 Add unit tests for wallet keypair generation:
* Allow `passphrase` to be a seed encoded in any of three formats or a
    literal passphrase.
  * Recognize the absence of `passphrase` as requesting a random seed.

Extract walletPropose() and keypairForSignature() as separately factored
functions (from doWalletPropose() and transactionSign() respectively) to
facilitate unit testing.
2015-02-23 14:34:35 -05:00
JoelKatz
3ec88b3665 Implement getFetchPack using visitDifferences 2015-02-23 14:34:34 -05:00
Tom Ritchford
2caedb38a6 Set version to 0.28.0-b6 2015-02-18 13:31:31 -05:00
Vinnie Falco
9bbcbd546b Fix streambuf bug:
The buffers_type::iterator could hold a pointer to a buffers_type that
was destroyed. This changes buffers_type::iterator to point to the
original streambuf instead, which always outlives the iterator.
2015-02-18 13:31:18 -05:00
Vinnie Falco
49378ab7fe Fix streambuf bug:
The buffers_type::iterator could hold a pointer to a buffers_type that
was destroyed. This changes buffers_type::iterator to point to the
original streambuf instead, which always outlives the iterator.
2015-02-18 13:31:18 -05:00
Tom Ritchford
7aa6b6b21d Update nudb comments. 2015-02-18 13:31:18 -05:00
Vinnie Falco
982dc6aa8c Reject invalid requests on peer port sooner. 2015-02-18 13:31:18 -05:00
Mark Travis
33175187b7 Don't VACUUM SQLite databases on startup with online delete enabled. 2015-02-18 13:31:18 -05:00
Tom Ritchford
0339904920 Update nudb comments. 2015-02-18 13:31:18 -05:00
Vinnie Falco
8bda9487c6 Add shamap::Family injection bundle 2015-02-18 13:31:18 -05:00
seelabs
617d84c0ef BasicConfig support for legacy values:
* A legacy value is a config section with a single-line.
* These values may be read from the BasicConfig interface so
  the deprecated Config class does not need to be exposed to
  clients.
* Made Config class more testable.
2015-02-18 13:31:18 -05:00
Vinnie Falco
ac64731d55 Set version to 0.27.1-rc3 2015-02-12 12:59:48 -08:00
Vinnie Falco
5dc064e971 Revert "Disable Overlay socket handoffs"
This reverts commit 8eb05d0950.
2015-02-12 12:59:48 -08:00
Vinnie Falco
c24732ed4e Fix streambuf bug:
The buffers_type::iterator could hold a pointer to a buffers_type that
was destroyed. This changes buffers_type::iterator to point to the
original streambuf instead, which always outlives the iterator.
2015-02-12 12:59:35 -08:00
Vinnie Falco
ba710bee86 Reject invalid requests on peer port sooner. 2015-02-12 12:43:42 -08:00
Vinnie Falco
c20392ca80 Set version to 0.27.1-rc2 2015-02-11 20:53:27 -08:00
Vinnie Falco
8eb05d0950 Disable Overlay socket handoffs 2015-02-11 20:53:27 -08:00
Howard Hinnant
0a0795328f Add missing includes. 2015-02-11 20:42:38 -05:00
Tom Ritchford
b11ad375cd Set version to 0.28.0-b5 2015-02-11 20:42:38 -05:00
Vinnie Falco
df89999891 Remove obsolete classes:
Legacy workarounds for Visual Studio non thread-safe initialization
of function local objects with static storage duration are removed:

* Remove LeakChecked
* Remove StaticObject
* Remove SharedSingleton
2015-02-11 20:42:38 -05:00
Josh Juran
7a6d533014 Refactor GenerateDeterministicKey and its call sites:
Remove the use of ec_key parameters and return values from ECDSA crypto
prototypes.  Don't store key data into an ec_key variable only to fetch
it back into the original type again.  Use uint256 and Blob explicitly.

Pass private keys as uint256, and pass public keys as either pointer and
length or Blob in calls to ECDSA{Sign,Verify}() and {en,de}cryptECIES().

Replace GenerateRootDeterministicKey() with separate functions returning
either the public or private key, since no caller needs both at once.

Simplify the use of GenerateDeterministicKey within RippleAddress.  Call
a single routine rather than pass the result of one as input to another.

Add openssl unit with RAII classes for bignum, bn_ctx, and ec_point plus
free utility functions.

Rewrite the functions in GenerateDeterministicKey.cpp to use RAII rather
than explicit cleanup code:
  * factor out secp256k1_group and secp256k1_order for reuse rather than
    computing them each time
  * replace getPublicKey() with serialize_ec_point(), which makes, sets,
    and destroys an ec_key internally (sparing the caller those details)
    and calls i2o_ECPublicKey() directly
  * return bignum rather than ec_key from GenerateRootDeterministicKey()
  * return ec_point rather than EC_KEY* from GenerateRootPubKey()

Move ECDSA{Private,Public}Key() to a new ECDSAKey unit.
Move ec_key.h into impl/ since it's no longer used outside crypto/.

Remove now-unused member functions from ec_key.

Change tabs to spaces; trim trailing whitespace (including blank lines).
2015-02-11 20:42:38 -05:00
Howard Hinnant
be44f75d2d Add missing includes. 2015-02-11 20:42:38 -05:00
Vinnie Falco
ab14123aed Remove obsolete classes:
Legacy workarounds for Visual Studio non thread-safe initialization
of function local objects with static storage duration are removed:

* Remove LeakChecked
* Remove StaticObject
* Remove SharedSingleton
2015-02-11 20:42:38 -05:00
Tom Ritchford
a963a6d10d Add noexcept qualifier to swaps and moves. 2015-02-11 20:42:38 -05:00
Vinnie Falco
11c472d701 Speed up some unit tests:
A few of the slowest unit tests are modified to process a smaller data
set size, to reduce the time required to run all unit tests.
2015-02-11 20:14:44 -05:00
Vinnie Falco
69b4cd22a2 Speed up some unit tests:
A few of the slowest unit tests are modified to process a smaller data
set size, to reduce the time required to run all unit tests.
2015-02-11 20:14:44 -05:00
Vinnie Falco
e81d35c4db Add elapsed time report for unit test runner:
When unit tests are complete, the longest running tests if any are logged.
2015-02-11 20:14:44 -05:00
Vinnie Falco
958325653f Add elapsed time report for unit test runner:
When unit tests are complete, the longest running tests if any are logged.
2015-02-11 20:14:44 -05:00
Josh Juran
c5dc419f9e Remove unused source file 2015-02-11 20:14:44 -05:00
Vinnie Falco
2a201f9525 Add RocksDB to nudb import tool (RIPD-781,785):
This custom tool is specifically designed for very fast import of
RocksDB nodestore databases into NuDB.
2015-02-11 20:14:44 -05:00
Vinnie Falco
b7ba509618 NuDB: Use nodeobject codec in Backend (RIPD-793):
This adds codecs for snappy and lz4, and a new nodeobject codec. The
nodeobject codec provides a highly efficient custom compression scheme
for inner nodes, which make up the majority of nodestore databases.
Non inner node objects are compressed using lz4.

The NuDB backend is modified to use the nodeobject codec. This change
is not backward compatible - older NuDB databases cannot be opened or
imported.
2015-02-11 14:41:33 -08:00
Vinnie Falco
f946d7b447 Remove obsolete NodeObject fields:
Legacy fields of NodeObject are removed, as they are no longer
used and there is a space savings from omitting them:

* Remove LedgerIndex
2015-02-11 14:41:32 -08:00
Vinnie Falco
33c5f98824 NuDB: Performance improvements (RIPD-793,796):
This introduces changes in nudb to improve speed, reduce database size,
and enhance correctness. The most significant change is to store hashes
rather than entire keys in the key file. The output of the hash function
is reduced to 48 bits, and stored directly in buckets.

The API is also modified to introduce a Codec parameter allowing for
compression and decompression to be supported in the implementation
itself rather than callers.

THe data file no longer contains a salt, as the salt is applicable
only to the key and log files. This allows a data file to have multiple
key files with different salt values. To distinguish physical files
belonging to the same logical database, a new field UID is introduced.
The UID is a 64-bit random value generated once on creation and stored
in all three files.

Buckets are zero filled to the end of each block, this is a security
measure to prevent unintended contents of memory getting stored to
disk. NuDB offers the varint integer type, this is identical to
the varint described by Google.

* Add varint
* Add Codec template argument
* Add "api" convenience traits
* Store hash in buckets
* istream can throw short read errors
* Support std::uint8_t format in streams
* Make file classes part of the public interface
* Remove buffers pessimization, replace with buffer
* Consolidate creation utility functions to the same header
* Zero fill unused areas of buckets on disk
* More coverage and improvements to the recover test
* Fix file read/write to loop until all bytes processed
* Add verify_fast, faster verify for large databases

The database version number is incremented to 2; older databases can
no longer be opened and should be deleted.
2015-02-11 14:41:31 -08:00
Vinnie Falco
e2a5535ed6 NuDB: Performance improvements (RIPD-793,796):
This introduces changes in nudb to improve speed, reduce database size,
and enhance correctness. The most significant change is to store hashes
rather than entire keys in the key file. The output of the hash function
is reduced to 48 bits, and stored directly in buckets.

The API is also modified to introduce a Codec parameter allowing for
compression and decompression to be supported in the implementation
itself rather than callers.

THe data file no longer contains a salt, as the salt is applicable
only to the key and log files. This allows a data file to have multiple
key files with different salt values. To distinguish physical files
belonging to the same logical database, a new field UID is introduced.
The UID is a 64-bit random value generated once on creation and stored
in all three files.

Buckets are zero filled to the end of each block, this is a security
measure to prevent unintended contents of memory getting stored to
disk. NuDB offers the varint integer type, this is identical to
the varint described by Google.

* Add varint
* Add Codec template argument
* Add "api" convenience traits
* Store hash in buckets
* istream can throw short read errors
* Support std::uint8_t format in streams
* Make file classes part of the public interface
* Remove buffers pessimization, replace with buffer
* Consolidate creation utility functions to the same header
* Zero fill unused areas of buckets on disk
* More coverage and improvements to the recover test
* Fix file read/write to loop until all bytes processed
* Add verify_fast, faster verify for large databases

The database version number is incremented to 2; older databases can
no longer be opened and should be deleted.
2015-02-11 14:41:31 -08:00
Vinnie Falco
0f94e2c0c3 Set version to 0.27.1-rc1 2015-02-10 16:22:14 -08:00
Vinnie Falco
a25508b98d Add RocksDB to nudb import tool (RIPD-781,785):
This custom tool is specifically designed for very fast import of
RocksDB nodestore databases into NuDB.
2015-02-10 16:22:14 -08:00
Vinnie Falco
e825433a38 NuDB: Use nodeobject codec in Backend (RIPD-793):
This adds codecs for snappy and lz4, and a new nodeobject codec. The
nodeobject codec provides a highly efficient custom compression scheme
for inner nodes, which make up the majority of nodestore databases.
Non inner node objects are compressed using lz4.

The NuDB backend is modified to use the nodeobject codec. This change
is not backward compatible - older NuDB databases cannot be opened or
imported.
2015-02-10 16:22:13 -08:00
Vinnie Falco
d1c08889fe Remove obsolete NodeObject fields:
Legacy fields of NodeObject are removed, as they are no longer
used and there is a space savings from omitting them:

* Remove LedgerIndex
2015-02-10 16:22:13 -08:00
Vinnie Falco
0b82b5a0d6 NuDB: Performance improvements (RIPD-793,796):
This introduces changes in nudb to improve speed, reduce database size,
and enhance correctness. The most significant change is to store hashes
rather than entire keys in the key file. The output of the hash function
is reduced to 48 bits, and stored directly in buckets.

The API is also modified to introduce a Codec parameter allowing for
compression and decompression to be supported in the implementation
itself rather than callers.

THe data file no longer contains a salt, as the salt is applicable
only to the key and log files. This allows a data file to have multiple
key files with different salt values. To distinguish physical files
belonging to the same logical database, a new field UID is introduced.
The UID is a 64-bit random value generated once on creation and stored
in all three files.

Buckets are zero filled to the end of each block, this is a security
measure to prevent unintended contents of memory getting stored to
disk. NuDB offers the varint integer type, this is identical to
the varint described by Google.

* Add varint
* Add Codec template argument
* Add "api" convenience traits
* Store hash in buckets
* istream can throw short read errors
* Support std::uint8_t format in streams
* Make file classes part of the public interface
* Remove buffers pessimization, replace with buffer
* Consolidate creation utility functions to the same header
* Zero fill unused areas of buckets on disk
* More coverage and improvements to the recover test
* Fix file read/write to loop until all bytes processed
* Add verify_fast, faster verify for large databases

The database version number is incremented to 2; older databases can
no longer be opened and should be deleted.
2015-02-10 16:22:13 -08:00
Vinnie Falco
a33d0d4fb6 Add general delimiter split() to rfc2616 2015-02-08 19:43:37 -08:00
Vinnie Falco
ba42334d36 Add lz4
Conflicts:
	Builds/VisualStudio2013/RippleD.vcxproj
	Builds/VisualStudio2013/RippleD.vcxproj.filters
2015-02-08 19:43:26 -08:00
Vinnie Falco
dad460dcfc Squashed 'src/lz4/' content from commit e25b51d
git-subtree-dir: src/lz4
git-subtree-split: e25b51de7b51101e04ceea194dd557fcc23c03ca
2015-02-08 19:43:04 -08:00
Vinnie Falco
2e62641aa4 Merge commit 'dad460dcfc8466a8e1c59529d490829fcfaeee73' as 'src/lz4' 2015-02-08 19:43:04 -08:00
Vinnie Falco
3ae23b6a54 Remove spurious call to fetch in NuDBBackend 2015-02-08 19:42:07 -08:00
Vinnie Falco
97126f18b1 Add /crawl cgi request feature to peer protocol (RIPD-729):
This adds support for a cgi /crawl request, issued over HTTPS to the configured
peer protocol port. The response to the request is a JSON object containing
the node public key, type, and IP address of each directly connected neighbor.
The IP address is suppressed unless the neighbor has requested its address
to be revealed by adding "Crawl: public" to its HTTP headers. This field is
currently set by the peer_private option in the rippled.cfg file.
2015-02-08 19:42:01 -08:00
Vinnie Falco
3838d222c2 NuDB: limit size of mempool (RIPD-787):
Insert now blocks when the size of the memory pool exceeds a predefined
threshold. This solves the problem where sustained insertions cause the
memory pool to grow without bound.
2015-02-08 19:41:54 -08:00
Vinnie Falco
96c3292210 Add missing include 2015-02-08 19:41:48 -08:00
Vinnie Falco
b0fd92cb3f Fix unsafe iterator dereference in PeerFinder 2015-02-08 19:41:43 -08:00
Vinnie Falco
b70cd27bda Add general delimiter split() to rfc2616 2015-02-07 15:19:55 -08:00
Vinnie Falco
62c5b5e570 Add general delimiter split() to rfc2616 2015-02-07 15:19:55 -08:00
Vinnie Falco
feaa0871ac Add lz4 2015-02-07 06:38:37 -08:00
Vinnie Falco
9f41976926 Merge commit '1784f24c5f81e864bf0ad8dcfdf4266ca1108290' as 'src/lz4' 2015-02-05 15:40:04 -08:00
Vinnie Falco
1784f24c5f Squashed 'src/lz4/' content from commit e25b51d
git-subtree-dir: src/lz4
git-subtree-split: e25b51de7b51101e04ceea194dd557fcc23c03ca
2015-02-05 15:40:04 -08:00
Vinnie Falco
fc47d9fc4d Set version to 0.28.0-b4 2015-02-03 16:24:34 -08:00
Vinnie Falco
eade9f8f2b Revert RocksDB backend settings:
This reverts the change that makes RocksDBQuick the default settings for
node_db "type=rocksdb". The quick settings can be obtained by setting
"type=rocksdbquick".

RocksDBQuick settings are implicated in memory over-utilization problems
seen recently.
2015-02-03 16:24:34 -08:00
Vinnie Falco
6276c55cc9 Set version to 0.27.0-sp1 2015-02-03 14:58:02 -08:00
Vinnie Falco
afa6ff7c4b Revert RocksDB backend settings:
This reverts the change that makes RocksDBQuick the default settings for
node_db "type=rocksdb". The quick settings can be obtained by setting
"type=rocksdbquick".

RocksDBQuick settings are implicated in memory over-utilization problems
seen recently.
2015-02-03 14:57:54 -08:00
Vinnie Falco
f4dcbe3a84 Remove spurious call to fetch in NuDBBackend 2015-02-03 12:56:35 -08:00
Vinnie Falco
9c02cc1b17 Add /crawl cgi request feature to peer protocol (RIPD-729):
This adds support for a cgi /crawl request, issued over HTTPS to the configured
peer protocol port. The response to the request is a JSON object containing
the node public key, type, and IP address of each directly connected neighbor.
The IP address is suppressed unless the neighbor has requested its address
to be revealed by adding "Crawl: public" to its HTTP headers. This field is
currently set by the peer_private option in the rippled.cfg file.
2015-02-03 12:56:35 -08:00
seelabs
70a27b900a Add missing include:
* Compile previously failed on Mac with clang
2015-02-03 12:56:32 -08:00
seelabs
0cc3ef8f90 Add missing include:
* Compile previously failed on Mac with clang
2015-02-03 12:56:32 -08:00
Tom Ritchford
4cbbacc946 Set version to 0.28.0-b3 2015-02-02 17:01:50 -08:00
Vinnie Falco
18c63a75fb NuDB: limit size of mempool (RIPD-787):
Insert now blocks when the size of the memory pool exceeds a predefined
threshold. This solves the problem where sustained insertions cause the
memory pool to grow without bound.
2015-02-02 17:01:19 -08:00
Vinnie Falco
9a0c71d4a7 NuDB: limit size of mempool (RIPD-787):
Insert now blocks when the size of the memory pool exceeds a predefined
threshold. This solves the problem where sustained insertions cause the
memory pool to grow without bound.
2015-02-02 17:01:19 -08:00
Vinnie Falco
d9aec19c87 Add missing include 2015-02-02 17:01:18 -08:00
Vinnie Falco
0f1b831de7 Add missing include 2015-02-02 17:01:18 -08:00
Tom Ritchford
bff5212386 Fix C++ guards in beast. 2015-02-02 17:01:18 -08:00
Vinnie Falco
37a7a2aacd Fix unsafe iterator dereference in PeerFinder 2015-02-02 17:01:18 -08:00
Tom Ritchford
635b157b11 Fix C++ guards in beast. 2015-02-02 17:01:18 -08:00
Tom Ritchford
c3ae4da83a Fix include guards in rippled. 2015-02-02 17:01:17 -08:00
Tom Ritchford
c3809ece67 New RPC method "version". 2015-02-02 17:01:17 -08:00
Howard Hinnant
bfc436dccd Add metadata to transaction difference logging: RIPD-775 2015-02-02 17:01:16 -08:00
Vinnie Falco
3c32d0fbc3 Remove buffer_view 2015-01-28 16:34:33 -08:00
Nik Bougalis
71d6874236 Set version to 0.28.0-b2 2015-01-28 16:34:33 -08:00
Vinnie Falco
9bf1f994ae Remove buffer_view 2015-01-28 16:34:33 -08:00
Vinnie Falco
bb4127a6fb Refactor Serializer and SerializerIterator interfaces:
* Remove unused members
* SerialIter holds only a pointer and offset now
* Use free functions for some Serializer members
* Use SerialIter in some places instead of Serializer
2015-01-28 16:34:33 -08:00
Edward Hennis
a691632995 Support a "--noserver" command line option in tests:
* Run npm/integration tests without launching rippled, using a
  running instance of rippled (possibly in a debugger) instead.
* Works for "npm test" and "mocha"
2015-01-28 16:34:33 -08:00
Miguel Portilla
5d6ea3d75f Combine history_ledger_index and online_delete (RIPD-774) 2015-01-28 16:34:33 -08:00
Mark Travis
43873b1b2c Initialize canDelete_ properly in the constructor. 2015-01-28 16:34:33 -08:00
Mark Travis
9430f3665b Speed up access to ledger index value that can be deleted. 2015-01-28 16:34:33 -08:00
Vinnie Falco
f3c1f63444 Remove LevelDB and HyperLevelDB backends:
The LevelDB and HyperLevelDB are removed from the backend choices. Neither
were recommended for production environments. As RocksDB is not available
on Windows platforms yet, the recommended backend choice for Windows is NuDB.
2015-01-28 13:43:00 -08:00
Nik Bougalis
b5c7232d6f Set version to 0.28.0-b1 2015-01-27 18:21:54 -08:00
Edward Hennis
2f3677d593 Change timing on "sequence realignment" test. 2015-01-27 18:21:54 -08:00
Howard Hinnant
1e0efaffe8 Add missing includes. 2015-01-27 18:21:54 -08:00
Vinnie Falco
fc79754750 Remove unused SHAMap fields 2015-01-26 19:25:38 -08:00
Miguel Portilla
0e4de42be8 Add RPC metrics (RIPD-705)
Add metrics to record the number of RPC requests received. Record the number of
node store fetches performed per request. Additionally record the byte size of
each request response and measure the response time of each request in
milliseconds.

A new class, ScopedMetrics, uses the Boost Thead Local Storage mechanism to
efficiently record NodeStore metrics within the same thread.
2015-01-26 19:25:38 -08:00
Scott Determan
4e389127b5 Use microsecond granularity for sqlite lock backoff algorithm:
When sql tries to acquire a lock that is already held, it sleeps for some
microseconds using the usleep function and then try to acquire the lock
again. However, if the HAVE_USLEEP macro is not defined then the sleep
function will be used.

This fix will define HAVE_USLEEP even when it is not already defined by
the system. Although some Linux distros may not define HAVE_USLEEP,
all supported versions provide usleep. If the system does not actually
have a usleep function, then the compiler will flag the error.
2015-01-26 19:13:40 -08:00
Nik Bougalis
47593730d6 Modernize code:
* Clean STBase-derived class creation interfaces
* Annotate overriden STBase virtual functions
* Optimize path deserialization
* Prefer range-based for
* Prefer std::unique_ptr
* Remove BOOST_FOREACH
2015-01-26 19:13:40 -08:00
Tom Ritchford
e742da73bd Simplify lookupLedger(). 2015-01-26 19:13:40 -08:00
Vinnie Falco
890bf3cce1 Add PeerFinder Logic backoff unit test 2015-01-26 19:13:40 -08:00
Nik Bougalis
60eb312e3b Fix order of construction of Application members 2015-01-26 19:13:40 -08:00
Tom Ritchford
06207da185 Move Context.h up into rpc/. 2015-01-26 19:13:40 -08:00
Nicholas Dudfield
4dc2cf8a6b Update tests to support latest ripple-lib:
* Update ripple-lib api usage
* Use latest npm ripple-lib
  * Tested with bignumber.js branch and tip of develop
* Use new version of coffee-script
  * Better source maps
* Update mocha
* Add assert-diff for better error reporting
* Add rconsole, enabled via USE_RCONSOLE env var
  * For use with manual installation only
2015-01-26 19:13:40 -08:00
Scott Determan
44450bf644 Enable Amendments from config file or static data (RIPD-746):
* The rippled.cfg file has a new section called "amendments"

* Each line in this section contains two white-space separated items
** The first item is the ID of the amendment (a 256-bit hash)
** The second item is the friendly name

* Replaces config section name macros with variables

* Make addKnown arguments safer

* Added lock to addKnown
2015-01-26 19:13:02 -08:00
Nik Bougalis
312aec79ca Remove WalletAdd (RIPD-725) 2015-01-26 12:39:13 -08:00
Nik Bougalis
a8578c73f8 Remove support for deprecated PreviousTxnID field (RIPD-710):
The PreviousTxnID field has been deprecated and should not be used for
transactions that use the field will now be rejected.

The AccountTxnID feature should be used instead by enabling transaction
tracking and specifying a transaction ID at submission. More details
are available at: https://ripple.com/build/transactions/#accounttxnid
2015-01-26 12:39:13 -08:00
Miguel Portilla
c522ffa6db Eliminate temREDUNDANT_SEND_MAX (RIPD-590):
The rules for when a SendMax is redundant are complicated. It is easier to
always allow a SendMax and eliminate temREDUNDANT_SEND_MAX.
2015-01-26 12:39:13 -08:00
Nik Bougalis
93b7599b1c Fix missing 'else' when handling sfMessageKey:
When clearing out a message key the transactor would incorrectly
create an empty `sfMessageKey` field instead of simply deleting
the field.

Clarify logic by reordering checks.
2015-01-26 12:39:13 -08:00
Nik Bougalis
3ccbd7c9b2 Finalize autobridging implementation (RIPD-179):
Autobridging uses XRP as a natural bridge currency to allow IOU-to-IOU orders
to be satisfied not only from the direct IOU-to-IOU books but also over the
combined IOU-to-XRP and XRP-to-IOU books.

This commit addresses the following issues:

* RIPD-486: Refactoring the taker into a unit-testable architecture
* RIPD-659: Asset-aware offer crossing
* RIPD-491: Unit tests for IOU to XRP, XRP to IOU and IOU to IOU
* RIPD-441: Handle case when autobridging over same owner offers
* RIPD-665: Handle case when autobridging over own offers
* RIPD-273: Groom order books while crossing
2015-01-26 12:39:13 -08:00
Nik Bougalis
385a87db31 Claim a fee when a required destination tag is not specified (RIPD-574) 2015-01-26 12:39:12 -08:00
Nik Bougalis
5530353eef Add simplified explicit interfaces to handle XRP and IOU transfers:
The new interfaces take into account the different semantics of XRP, which
do not have an issuer or transfer fees, and IOUs which have issuers and
(optional) transfer fees.

For XRP, the new `LedgerEntrySet::transfer_xrp` will transfer the specified
amount of XRP between from a given source to a given destination.

For IOU, two new functions are introduced:
* `LedgerEntrySet::issue_iou` which transfers the specified amount of an
IOU from the IOU's issuer to an account.
* `LedgerEntrySet::redeem_iou` which transfers the specified amount of an
IOU from an account to the IOU's issuer.

A transfer from user-to-user (e.g. to fill an order during offer crossing)
requires the use of `redeem_iou` followed by `issue_iou`. This helps to
enforce the Ripple invariant that IOUs never flow directly from user to
user, but only through a gateway. Additionally, this  allows for the
explicit calculation and application of transfer fees by varying the
amounts redeemed and issued.

The new interfaces promote type safety since you cannot use the issue
and redeem APIs with XRP or the transfer API with IOU, and the issuer
to be used is implied by the currency being issued or redeemed.
2015-01-26 12:39:12 -08:00
Nik Bougalis
d1193093ef Require the master key when performing certain operations (RIPD-666):
* When disabling the use of the master key; or
* When enabling 'no freeze'.
2015-01-26 12:39:12 -08:00
David Schwartz
b203db27a4 Fix offer->ACCOUNT->offer 2015-01-26 12:39:12 -08:00
JoelKatz
0a3e1af04c When pathfinding, don't output a redundant account node 2015-01-26 12:39:12 -08:00
Vinnie Falco
c6c8e5d70c Set version to 0.27.0 2015-01-26 10:56:11 -08:00
Nik Bougalis
fa354ec8d9 Set version to 0.27.0-b11 2015-01-23 17:37:18 -08:00
Nik Bougalis
4699b17508 Invoke correct deleter 2015-01-23 17:34:30 -08:00
Nik Bougalis
d0375f697d Invoke correct deleter 2015-01-23 17:34:30 -08:00
Vinnie Falco
33c8257d25 Set version to 0.27.0-b10 2015-01-21 15:25:11 -08:00
Scott Determan
b8c716a918 VSProject: Handle tuples in CPPDEFINES:
The VSProject generator now handles tuples in addition to strings and
dicts when converting environment variables such as CPPDEFINES.
2015-01-21 15:20:06 -08:00
Scott Determan
f389bc33c3 VSProject: Handle tuples in CPPDEFINES:
The VSProject generator now handles tuples in addition to strings and
dicts when converting environment variables such as CPPDEFINES.
2015-01-21 15:20:06 -08:00
Vinnie Falco
4d5dca71ce Squelch Peerfinder fixed connection attempts 2015-01-21 14:59:47 -08:00
Vinnie Falco
a9c44a1b9c Set version to 0.27.0-b9 2015-01-21 14:23:50 -08:00
Vinnie Falco
4144f800a1 Fix PeerImp concurrent access of socket:
The PeerImp::run launch function is now dispatched on the strand to prevent
undefined behavior resulting from concurrent access to the ssl::stream object.
2015-01-21 14:21:43 -08:00
Vinnie Falco
6ef9a81017 Set version to 0.27.0-b8 2015-01-21 14:21:43 -08:00
Vinnie Falco
8c6722f3c5 Remove use of date and time from rocksdb unity build 2015-01-21 14:21:43 -08:00
Vinnie Falco
34f0f9dcf1 Fix Journal::Stream::active to return the correct value 2015-01-21 10:48:32 -08:00
Vinnie Falco
40e138627b Fixes to Overlay:
* Make ~Peer virtual
* Call close in ConnectAttempt::stop
* Handle nullptr return in new_outbound_slot
* Check gracefulClose_ in read loop
2015-01-21 10:48:32 -08:00
Vinnie Falco
a470dda4e6 Fix Journal::Stream::active to return the correct value 2015-01-21 10:48:32 -08:00
Edward Hennis
b725410623 Option to specify rippled path on command line.
* --rippled=<absolute or relative path>
* Works for "npm test" and "mocha"
* Remove "rippled_path" from config.js to require CLI path.
2015-01-21 10:48:31 -08:00
Miguel Portilla
a9dfb33126 Log abnormal close time offsets (RIPD-572) 2015-01-21 10:48:31 -08:00
Miguel Portilla
8b848770dc Add config "ledger_history_index" functionality (RIPD-559) 2015-01-21 10:48:31 -08:00
Vinnie Falco
8d1cfaabe7 Add NuDB: A Key/Value Store For Decentralized Systems
NuDB is a high performance key/value database optimized for insert-only
workloads, with these features:

* Low memory footprint
* Values are immutable
* Value sizes from 1 2^48 bytes (281TB)
* All keys are the same size
* Performance independent of growth
* Optimized for concurrent fetch
* Key file can be rebuilt if needed
* Inserts are atomic and consistent
* Data file may be iterated, index rebuilt.
* Key and data files may be on different volumes
* Hardened against algorithmic complexity attacks
* Header-only, nothing to build or link
2015-01-21 10:48:30 -08:00
Vinnie Falco
94629edb9b Add NuDB backend:
The NuDB database backend is a high performance key/value store presented
as an alternative to RocksDB on Mac and Linux deployments, and the preferred
backend option for Windows deployments. The LevelDB backend is deprecated for
all platforms.

This includes these changes:

* Add Backend::verify API for doing consistency checks
* Add Database::close so caller can catch exceptions
* Improved Timing test for NodeStore creates a simulated workload
2015-01-21 10:48:30 -08:00
Vinnie Falco
2a3f2ca28d Add NuDB: A Key/Value Store For Decentralized Systems
NuDB is a high performance key/value database optimized for insert-only
workloads, with these features:

* Low memory footprint
* Values are immutable
* Value sizes from 1 2^48 bytes (281TB)
* All keys are the same size
* Performance independent of growth
* Optimized for concurrent fetch
* Key file can be rebuilt if needed
* Inserts are atomic and consistent
* Data file may be iterated, index rebuilt.
* Key and data files may be on different volumes
* Hardened against algorithmic complexity attacks
* Header-only, nothing to build or link
2015-01-21 10:48:30 -08:00
Edward Hennis
8ab1e7d432 Integration test to subscribe to offer books. 2015-01-20 16:45:04 -08:00
Miguel Portilla
b2ba6a0c85 Fix RPC subscribe with multiple books 2015-01-20 16:45:04 -08:00
Tom Ritchford
cca5421aed Fix Subscribe RPC to correctly distinguish bids and asks. 2015-01-20 16:45:04 -08:00
Nik Bougalis
f78269b02d Ensure that hash_append will never throw
Conflicts:
	src/beast/beast/net/IPAddress.h
2015-01-20 16:45:03 -08:00
Nik Bougalis
799d9a73e6 Ensure that hash_append will never throw
Conflicts:
	src/beast/beast/net/IPAddress.h
2015-01-20 16:45:03 -08:00
Scott Determan
b0781622b2 Handle nullptr return values to InboundLedgers::findCreate
In normal operation, InboundLedgers::findCreate never returns null, but
during system shutdown, it will return null.

Since this only happens in system shutdown, when findCreate returns null
the calling function stops what it was doing and returns.

During testing, an issue where destroying the application object
and creating a new one caused problems with a static PathTable. This table
is now cleared when re-initialized.
2015-01-20 16:45:03 -08:00
Tom Ritchford
0d0eec6345 Clean up test documentation and a log message. 2015-01-20 16:45:03 -08:00
Nik Bougalis
1af79f7960 Properly validate the configured online delete interval 2015-01-20 16:45:03 -08:00
Vinnie Falco
15b570bbdd Add profile targets for gcc and clang 2015-01-20 16:45:02 -08:00
Tom Ritchford
7aa5599cc2 Remove unused parameter in two lambdas. 2015-01-20 16:45:02 -08:00
JoelKatz
676293ec42 Ensure account_tx queries over and returns correct range 2015-01-20 16:45:02 -08:00
Vinnie Falco
e8c07717fc Tidy up container hash functions:
* Add xxhasher
* Move fnv1a, siphash, spookyto hash/
* Move hash_append, uhash to hash/
* Move hash_speed_test to hash/
* Move hash classes to individual header files
* Remove hardened_hash
2015-01-20 16:45:01 -08:00
Nik Bougalis
abc4fb81b1 Improve RippleLineCache hashing 2015-01-20 16:45:01 -08:00
Vinnie Falco
9ca6740db3 Add rngfill 2015-01-20 16:45:01 -08:00
Vinnie Falco
53a16f354f Add hardened_hash to basics/:
xxhasher is the default hash function for hardened_hash.
2015-01-20 16:45:01 -08:00
Vinnie Falco
6ab1ecd836 Tidy up container hash functions:
* Add xxhasher
* Move fnv1a, siphash, spookyto hash/
* Move hash_append, uhash to hash/
* Move hash_speed_test to hash/
* Move hash classes to individual header files
* Remove hardened_hash
2015-01-20 16:45:01 -08:00
Vinnie Falco
e7b16e7b47 Add rngfill 2015-01-20 16:45:01 -08:00
Vinnie Falco
92c9ebb0d6 Optimize calls to unit_test::suite::expect:
This changes expect and unexpected to receive the reason text as a
template argument, allowing the std::string conversion of char const*
parameters to take place only if the condition evaluates to false. This
cuts all calls to malloc and free on tests that pass.
2015-01-20 16:45:00 -08:00
Vinnie Falco
14804f81a8 Optimize calls to unit_test::suite::expect:
This changes expect and unexpected to receive the reason text as a
template argument, allowing the std::string conversion of char const*
parameters to take place only if the condition evaluates to false. This
cuts all calls to malloc and free on tests that pass.
2015-01-20 16:45:00 -08:00
Vinnie Falco
8432b9e29a Improve streambuf unit test 2015-01-20 16:45:00 -08:00
Vinnie Falco
9a61b8d77d Declare base_uints with using statements 2015-01-20 16:45:00 -08:00
Vinnie Falco
f42c2763d5 Improve streambuf unit test 2015-01-20 16:45:00 -08:00
Vinnie Falco
98d4e0e1b5 Fix ZeroCopyOutputStream:
Added a destructor that commits the last block of data
if there was no final call to BackUp.
2015-01-20 16:45:00 -08:00
Tom Ritchford
9156633baf Set version to 0.27.0-b7 2015-01-20 17:59:55 -05:00
Tom Ritchford
bcf4f836b4 Use websocketpp_02 namespace. 2015-01-20 17:08:15 -05:00
Vinnie Falco
dbc1d70f99 Set version to 0.27.0-b6 2015-01-20 09:41:27 -08:00
Vinnie Falco
78bc190a85 Merge commit '02855d7fed46d3c1aa1f2cefbcf4a42720575c3f' as 'src/websocketpp' 2015-01-20 09:35:00 -08:00
Vinnie Falco
02855d7fed Squashed 'src/websocketpp/' content from commit 875d420
git-subtree-dir: src/websocketpp
git-subtree-split: 875d420952
2015-01-20 09:35:00 -08:00
Vinnie Falco
6fdd5d32be Rename websocket/ to websocketpp_02 2015-01-20 09:34:54 -08:00
Vinnie Falco
d7f32b105b Set version to 0.27.0-b5 2015-01-13 11:50:58 -08:00
Vinnie Falco
0ac480a0bd Fix extra increment in GenerateRootDeterministicKey 2015-01-13 11:49:59 -08:00
Tom Ritchford
417996de02 Set version to 0.27.0-b4 2015-01-13 11:30:23 -05:00
Tom Ritchford
6c2d60cec2 Prevent RPC handlers from returning non-objects. 2015-01-13 11:30:23 -05:00
Tom Ritchford
743bd6c917 Fix RPC command logrotate to return a Json object. 2015-01-13 11:30:14 -05:00
Edward Hennis
ab61aa41d9 Set version to 0.27.0-b3 2015-01-12 18:00:55 -05:00
Edward Hennis
36396ae29e rippled.cfg [db_node] options for RocksDB
* open_files and compression.
2015-01-12 18:00:54 -05:00
Vinnie Falco
749e083e6e NodeStore improvements:
* Add Backend::verify API for doing consistency checks
* Add Database::close so caller can catch exceptions
* Improved Timing test for NodeStore creates a simulated workload
2015-01-12 18:00:52 -05:00
Vinnie Falco
faf91d6697 Improved support for exceptions in threads spawned by unit tests:
Unit tests that wish to spawn threads for testing concurrency may now do so
by using unit_test::thread as a replacement for std::thread. These threads
propagate unhandled exceptions to the unit test, and work with the abort on
failure feature.
2015-01-12 17:17:09 -05:00
Vinnie Falco
67b9cf9e82 Improved support for exceptions in threads spawned by unit tests:
Unit tests that wish to spawn threads for testing concurrency may now do so
by using unit_test::thread as a replacement for std::thread. These threads
propagate unhandled exceptions to the unit test, and work with the abort on
failure feature.
2015-01-12 17:17:09 -05:00
Vinnie Falco
adc69e72df Add xor_shift_engine 2015-01-12 17:17:07 -05:00
Vinnie Falco
27fb20f3ab Add xor_shift_engine 2015-01-12 17:17:07 -05:00
Josh Juran
1c71b274f0 SConstruct: Add ed25519.c
Conflicts:
	Builds/VisualStudio2013/RippleD.vcxproj
	Builds/VisualStudio2013/RippleD.vcxproj.filters
	SConstruct
2015-01-12 12:16:26 -08:00
Vinnie Falco
fcd20b63fe Merge commit '8ec344ac1b6c66d936fa0f7005490e126a434a70' as 'src/ed25519-donna' 2015-01-12 11:27:15 -08:00
Vinnie Falco
8ec344ac1b Squashed 'src/ed25519-donna/' content from commit 04223b0
git-subtree-dir: src/ed25519-donna
git-subtree-split: 04223b04e22f5eff32c6c27e25194d4d984c6f41
2015-01-12 11:27:15 -08:00
Vinnie Falco
df966a9ac6 Set version to 0.27.0-b2 2015-01-05 18:49:18 -08:00
Vinnie Falco
f634666dc6 Make rocksdbquick settings default:
This removes the old default configuration for the "rocksdb" backend and
replaces it with the configuration that was formerly available using
the experimental backend "rocksdbquick".

The new configuration setting improves the performance of the key/value
database by changing the compaction style and tuning the size parameters for
the typical rippled workload. Testing shows a decrease in I/O spikes for both
reading and writing.
2015-01-05 18:49:17 -08:00
Tom Ritchford
e2f9f5d7e5 Fix compilation warnings. 2015-01-05 18:49:17 -08:00
Tom Ritchford
d078b0d143 Extract the git ID into a separate compilation unit. 2015-01-05 18:49:15 -08:00
Nik Bougalis
0ccdea3cd8 Disable Ticket transactions and tests 2015-01-05 14:18:27 -08:00
Vinnie Falco
df54b47cd0 Tidy up includes and add modules to the classic build:
An alternative to the unity build, the classic build compiles each
translation unit individually. This adds more modules to the classic build:

* Remove unity header app.h
* Add missing includes as needed
* Remove obsolete NodeStore backend code
* Add app/, core/, crypto/, json/, net/, overlay/, peerfinder/ to classic build
2015-01-05 13:35:57 -08:00
Vinnie Falco
c8ae3d1751 Levelize SHAMap:
The SHAMap class is refactored into a separate module where each translation
unit compiles separate without errors. Dependencies on higher level business
logic are removed. SHAMap now depends only on basics, crypto, nodestore,
and protocol:

* Inject NodeStore::Database& to SHAMap
* Move sync filter instances to app/ledger/
* Move shamap to its own module
* Move FullBelowCache to shamap/
* Move private code to shamap/impl/
* Refactor SHAMap treatment of missing node handler
* Inject and use Journal for logging in SHAMap
2015-01-05 11:46:11 -08:00
Vinnie Falco
2e595830b3 Levelize SHAMap:
The SHAMap class is refactored into a separate module where each translation
unit compiles separate without errors. Dependencies on higher level business
logic are removed. SHAMap now depends only on basics, crypto, nodestore,
and protocol:

* Inject NodeStore::Database& to SHAMap
* Move sync filter instances to app/ledger/
* Move shamap to its own module
* Move FullBelowCache to shamap/
* Move private code to shamap/impl/
* Refactor SHAMap treatment of missing node handler
* Inject and use Journal for logging in SHAMap
2015-01-05 11:46:11 -08:00
Vinnie Falco
96fbcc9a5a Refactor NodeStore:
Manager is changed to be a Meyer's singleton, with factories automatically
registering upon construction.
2015-01-05 11:46:11 -08:00
Vinnie Falco
6283801981 Add non-unity build targets:
The SConstruct is modified to provide a new family of targets, ending with
the suffix ".nounity", which compile individual translation units instead of
some of the unity translation units ("classic" builds). Two modules updated
for this treatment are ripple/basics/ and ripple/protocol/, with plans to
update more in the future. A consequence is longer build times in some cases.
A benefit of classic builds is that missing includes can be identified
through compiler errors.
2015-01-05 11:46:11 -08:00
Vinnie Falco
9a3214d46e Normalize files containing unit test code:
Source files are split to place all unit test code into translation
units ending in .test.cpp with no other business logic in the same file,
and in directories named "test".

A new target is added to the SConstruct, invoked by:
    scons count
This prints the total number of source code lines occupied by unit tests,
in rippled specific code and excluding library subtrees.
2015-01-05 11:46:07 -08:00
Vinnie Falco
79f9cc534d Don't leak track StringPairArray 2015-01-05 11:44:15 -08:00
Vinnie Falco
9eb7c8344f Don't leak track StringPairArray 2015-01-05 11:44:15 -08:00
Vinnie Falco
4140bbb1f7 Set version to 0.27.0-b1 2015-01-05 11:37:01 -08:00
Vinnie Falco
ea44497136 Fix msvc ICE on initializer-list 2015-01-05 11:37:00 -08:00
Howard Hinnant
5100eadf12 Fix undefined behavior 2014-12-31 01:55:10 -08:00
Nik Bougalis
07737c6e5b Add 'delivered_amount' to Transaction JSON (RIPD-643):
The synthetic field 'delivered_amount' can be used to determine the exact
amount delivered by a Payment without having to check the DeliveredAmount
field, if present, or the Amount field otherwise.

The field is only returned when metadata is available and the data is not
returned in binary format.
2014-12-31 01:55:10 -08:00
Nik Bougalis
1d6721d345 Reduce Beast dependencies by leveraging C++11 features:
* Remove beast::Atomic (RIPD-728):
  * Use std-provided alternatives
  * Eliminate atomic variables where possible

* Cleanup beast::Thread interface:
  * Use std::string instead of beast::String
  * Remove unused functions and parameters

* Remove unused code:
  * beast::ThreadLocalValue
  * beast::ServiceQueue
2014-12-31 01:55:10 -08:00
JoelKatz
98d5eefc86 Pathfinding bugfixes (RIPD-735):
* Fix specifying paths and search level for ripple_path_find
* Don't modify the pathfinder, it has issuer-neutral paths.
* Handle previous paths correctly
* Compare paths correctly
2014-12-31 01:55:10 -08:00
JoelKatz
4f2d93bb65 Avoid processing transactions if we need a network ledger
Not processing tranasctions without a network ledger makes
initial network synchronization faster.
2014-12-31 01:55:10 -08:00
Edward Hennis
a5df3f1747 Support a "no_server" flag in test config.
* Will use a running instance of rippled (possibly in a debugger).
* Modify all tests to respect the server_default value.
* Fail test if new account already exists and has a balance.
* README.md with instructions for advanced test debugging, particularly using no_server.
2014-12-31 01:55:10 -08:00
Howard Hinnant
7f5f73887d Fix undefined behavior 2014-12-31 01:55:10 -08:00
Nik Bougalis
91ce7807b9 Remove legacy LoadTypes (RIPD-365) 2014-12-31 01:55:10 -08:00
Nik Bougalis
d26fae9875 Reduce Beast dependencies by leveraging C++11 features:
* Remove beast::Atomic (RIPD-728):
  * Use std-provided alternatives
  * Eliminate atomic variables where possible

* Cleanup beast::Thread interface:
  * Use std::string instead of beast::String
  * Remove unused functions and parameters

* Remove unused code:
  * beast::ThreadLocalValue
  * beast::ServiceQueue
2014-12-31 01:55:10 -08:00
Nik Bougalis
60bdc79ec4 Remove unused sitefiles module 2014-12-30 12:33:41 -08:00
Tom Ritchford
253ddf2998 Split off CheckLibraryVersions.test.cpp. 2014-12-30 12:33:41 -08:00
Nik Bougalis
9fa15b390a Always initialize LedgerHandler options field 2014-12-29 11:21:19 -08:00
Josh Juran
e7d6fe6c8b Cull duplicate/unused code in RippleAddress:
Deduplicate a call to GeneratePublicDeterministicKey().
Remove unused member functions.
2014-12-29 11:21:19 -08:00
Tom Ritchford
9650b1aa70 New ripple::TestSuite with method expectEquals(). 2014-12-29 11:21:19 -08:00
Howard Hinnant
eafa6f960f API for improved Unit Testing (RIPD-432):
* Added new test APIs allowing easy ways to create ledgers, apply
  transactions to them, close and advance them.

* Moved Ledger tests from Ledger.cpp to Ledger.test.cpp.

* Changed several TransactionEngine log priorities from lsINFO to lsDEBUG to
  reduce unnecessary verbosity in the log messages while running these tests.

* Moved LedgerConsensus:applyTransactions from a private member function to a
  free function so that it could be accessed externally, and without having to
  reference a LedgerConsensus object.  This was done to facilitate the new
  testing API.
2014-12-29 11:21:19 -08:00
Yana
c62ccf4870 Update README.md (RIPD-601) 2014-12-29 11:21:19 -08:00
Vinnie Falco
ef34439a79 Set version to 0.26.5-rc1 2014-12-22 15:20:03 -08:00
Nik Bougalis
b328ec2462 Prevent passing of non-POD types to POD-only interfaces:
This tidies up the code that produces random numbers to conform
to programming best practices and reduce dependencies.

* Use std::random_device instead of platform-specific code
* Remove RandomNumbers class and use free functions instead
2014-12-22 15:19:48 -08:00
Vinnie Falco
60f27178b8 Levelization, improve structure of source files:
Source files are moved between modules, includes changed and added,
and some code rewritten, with the goal of reducing cross-module dependencies
and eliminating cycles in the dependency graph of classes.

* Remove RippleAddress dependency in CKey_test
* ByteOrder.h, Blob.h, and strHex.h are moved to basics/. This makes
  the basics/ module fully independent of other ripple sources.
* types/ is merged into protocol/. The protocol module now contains
  all primitive types specific to the Ripple protocol.
* Move ErrorCodes to protocol/
* Move base_uint to basics/
* Move Base58 to crypto/
* Remove dependence on Serializer in GenerateDeterministicKey
* Eliminate unity header json.h
* Remove obsolete unity headers
* Remove unnecessary includes
2014-12-22 10:23:49 -08:00
Vinnie Falco
c01b4e6baa Tidy up usage of std::begin, std::end 2014-12-19 11:55:43 -08:00
Vinnie Falco
e3fbb83ad0 Tidy up usage of std::begin, std::end 2014-12-19 11:55:43 -08:00
Nik Bougalis
28b70a7b9a Remove 'Proof of Work' code 2014-12-19 11:00:29 -08:00
Nicholas Dudfield
dcdc341d0f Add appveyor 2014-12-19 11:00:29 -08:00
Tom Ritchford
fce77c9372 Configuration for yielding RPC server. 2014-12-19 11:00:28 -08:00
Tom Ritchford
a360c481c2 Refactor out a version of lookupLedger returning Status. 2014-12-19 11:00:28 -08:00
Tom Ritchford
c72db5fa5f Refactor away RPCHandler::doRpcCommand 2014-12-19 11:00:28 -08:00
Tom Ritchford
fc9a23d6d4 Send output incrementally in ServerHandlerImp. 2014-12-19 11:00:27 -08:00
Tom Ritchford
167f4666e2 New generic Ledger RPC handler. 2014-12-19 11:00:27 -08:00
Tom Ritchford
1cbcc7be21 Allow the Ledger to generically output to both Json models. 2014-12-19 11:00:27 -08:00
Tom Ritchford
8053598069 Better interoperation between Json::Value and JsonObject.
* Generic functions to add entries to both object models.
* Add Json::Value into JsonObjects.
* Write Json::Value to string incrementally.
* Get rid of ripple::RPC::New namespace
2014-12-19 11:00:26 -08:00
Tom Ritchford
7cfac1a91a Wrap Output in a coroutine that periodically yields. 2014-12-19 11:00:26 -08:00
Tom Ritchford
192cdd028e Change Output to be a generic std::function. 2014-12-19 11:00:26 -08:00
Tom Ritchford
029c143922 Add a comment to ledger/Ledger.h. 2014-12-19 11:00:26 -08:00
Tom Ritchford
00298cc68c Simplify LedgerData.cpp. 2014-12-19 11:00:25 -08:00
Tom Ritchford
d9c7db51af Make three ErrorCode functions generic. 2014-12-19 11:00:25 -08:00
Vinnie Falco
f12b15d22b Fix logic in HTTP/S server:
These bugs do not affect production code since callers do not invoke
`write` multiple times, but these would become a problem in the future.

* Access to Peer::write_queue_ is synchronized correctly.
* Remove unsafe access to deleted container element.
2014-12-19 11:00:25 -08:00
Vinnie Falco
409b8bac00 Remove unused and obsolete Ripple identifiers and tidy up:
These identifiers were part of a failed set of classes to replace
the functionality combined into RippleAddress. They are not used
and therefore can be removed.

* Remove RippleAccountPrivateKey
* Remove RippleAccountPublicKey
* Remove RippleAccountID
* Remove RipplePrivateKey
* Remove RipplePublicKeyHash
* Remove RippleLedgerHash
* Remove unused withCheck argument
* Remove CryptoIdentifier
* Remove IdentifierStorage
* Remove IdentifierType
* Remove SimpleIdentifier
* Add missing include
2014-12-19 11:00:24 -08:00
Vinnie Falco
28b09bde4b Simplify RipplePublicKey:
This implements the bare minimum necessary to store a 33 byte public
key and use it in ordered containers. It is an efficient and well
defined alternative to RippleAddress when the caller only needs
a node public key.
2014-12-19 11:00:24 -08:00
Vinnie Falco
2f6af906f4 Validators work (RIPD-703):
This replaces the experimental validators module with foundational
code to implement a new system for tracking validators, validations and
the UNL. The code is turned off by default, in BeastConfig.h

* Remove obsolete public Manager interfaces
* Remove obsolete database methods
* Remove obsolete ChosenList concept
* Remove obsolete code
* Add missing includes
* Tidy up STValidation.h
* Move factory function to Validators::make_Manager
* Add Connection object for tracking STValidations
2014-12-19 11:00:23 -08:00
Vinnie Falco
16021591b2 Add waitable_executor 2014-12-18 10:26:55 -08:00
Vinnie Falco
628e3ac1eb Add waitable_executor 2014-12-18 10:26:55 -08:00
Josh Juran
fbf5785e35 Combine STTx::checkSign overloads:
Callers don't need to specify the signing key -- they're just retrieving
the key from the SerializedTransaction and then passing it back.

This simplifies Ed25519 implementation.
2014-12-12 20:14:02 -08:00
Nicholas Dudfield
eeea2b1ff8 Use ppa:afrank/boost 1.57 for Travis 2014-12-12 20:14:02 -08:00
Vinnie Falco
32062e439f Split peer connect logic to another class (RIPD-711):
All of the logic for establishing an outbound peer connection including
the initial HTTP handshake exchange is moved into a separate class. This
allows PeerImp to have a strong invariant: All PeerImp objects that exist
represent active peer connections that have already gone through the
handshake process.
2014-12-12 20:14:02 -08:00
Vinnie Falco
930a0beaf1 Add ZeroCopyOutputStream and tidy up 2014-12-12 20:14:02 -08:00
Nik Bougalis
4a49fefdd9 Various cleanups:
* Replace SYSTEM_NAME and other macros with C++ constructs
* Remove RIPPLE_ARRAYSIZE and use std::extent or ranged for loops
* Remove old-style, unused offer crossing unit test
* Make STAmount::saFromRate free and remove default argument
2014-12-12 20:14:02 -08:00
Nik Bougalis
8e792855e0 Do not use path if path expansion fails 2014-12-10 16:55:06 -08:00
Tom Ritchford
69f5c6987a Whitespace: clean WebSockets to 80 columns. 2014-12-10 16:55:06 -08:00
Nik Bougalis
85fc9e4ecf Revert e4c9822d78 "Enable processor-specific optimizations when available:" 2014-12-08 14:54:03 -08:00
Mark Travis
d5c3f0c9cf Stability bugfixes for online delete SHAMapStore:
The correct ledger age is necessary for checking health
status, and the previous behavior caused the online deletion process to
abort if the process took too long.

The tuning parameter added and the parameter whose default was modified both
minimize impact of SQL DELETE operations by decreasing the default batch size
for deletes and for increasing the backoff period between deletion batches.
These parameters decrease contention for the SQLite and I/O with the trade-off
of longer processing time for online delete. Online-delete is not a
time-critical function, so a little slowness in wall-clock time is not harmful.
2014-12-08 14:54:03 -08:00
JoelKatz
a48120e675 Fix incorrect source issuer for XRP source 2014-12-08 14:54:03 -08:00
Nik Bougalis
36f8e4f2ad Improve hex conversion & parsing routines 2014-12-08 14:54:03 -08:00
David Schwartz
1084a39a45 Improve the humanAccountID cache (RIPD-693)
Profiling indicated some performance issues coming from the
cache of 160-bit account IDs to base58 format. This replaces
the single cache with two caches and rotates out old
entries.
2014-12-08 14:54:03 -08:00
Tom Ritchford
86df482842 Make sure that handlers always return Json::objectValue. 2014-12-01 17:16:24 -05:00
Tom Ritchford
b0d47ebcc6 Use better base64 handling in ServerHandlerImp. 2014-12-01 17:15:23 -05:00
Tom Ritchford
a237f9d28c Make beast::detail::chunk_encoded_buffers::to_hex() static 2014-12-01 11:12:59 -05:00
Tom Ritchford
fffdf1dfba Make beast::detail::chunk_encoded_buffers::to_hex() static 2014-12-01 11:12:59 -05:00
Tom Ritchford
f1eb9d4f89 Remove unused BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES. 2014-12-01 10:56:03 -05:00
Tom Ritchford
3273ed2616 Remove unused BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES. 2014-12-01 10:56:03 -05:00
Vinnie Falco
aa7b0a31b0 Refactor protocol message parsing:
This replaces the stateful class parser with a stateless free function.
The protocol buffer message is parsed using a ZeroCopyInputStream.

* Invoke method is now a free function.
* Protocol handler doesn't need to derive from an abstract interface
* Only up to one message is processed at a time by the invoker.
* Remove error_code return from the handler's message processing functions.
* Add ZeroCopyInputStream implementation that wraps a BufferSequence.
* Free function parses up to one protocol message and calls the handler.
* Message type and size can be calculated from an iterator
  range or a buffer sequence.
2014-11-26 12:23:21 -08:00
Vinnie Falco
fb0d44d403 Use cluster state in Slot instead of PeerImp 2014-11-26 12:23:10 -08:00
Vinnie Falco
cd8ec89cbb Use injections from OverlayImpl in PeerImp 2014-11-26 12:23:02 -08:00
Vinnie Falco
1da5e090d5 Fixes to beast::asio::streambuf:
* Fix to_string conversion
* Fix assert on debug invariant checks
* Fix the treatment of the output position when the entire output is committed.
* Add unit test
2014-11-26 12:22:55 -08:00
Vinnie Falco
252f271dc5 Fixes to beast::asio::streambuf:
* Fix to_string conversion
* Fix assert on debug invariant checks
* Fix the treatment of the output position when the entire output is committed.
* Add unit test
2014-11-26 12:22:55 -08:00
Vinnie Falco
62d400c3a9 Move the call to cancel_timer to the right place 2014-11-26 12:22:46 -08:00
Scott Schurr
f9aa3e0da5 Add more unit tests to rpc/impl/TransactionSign (RIPD-480):
By adding a mock it is possible to test the transactionSign
function without interacting with the ledger.  This is the
smallest change I could come up with that allows transactionSign
to be unit tested.

The unit tests are white boxed.  Each test case is a result
of examining the code and identifying behavior associated with
different JSON fields.  That means the tests are not based on
requirements, they are based on observed behavior.
2014-11-26 12:07:44 -08:00
Vinnie Falco
5cde522d5e Remove unused chrono::time_point stream conversions 2014-11-25 19:19:56 -08:00
Vinnie Falco
685fe5b0fb Don't call std::exit on clean exit 2014-11-25 19:19:56 -08:00
Vinnie Falco
8aa4a027bb Template abstract_clock on Clock:
The abstract_clock is now templated on a type meeting the requirements of
the Clock concept. It inherits the nested types of the Clock on which it
is based. This resolves a problem with the original design which broke the
type-safety of time_point from different abstract clocks.
2014-11-25 19:19:56 -08:00
Vinnie Falco
5180e71a0d Remove unused chrono::time_point stream conversions 2014-11-25 19:19:56 -08:00
Vinnie Falco
55637f7508 Template abstract_clock on Clock:
The abstract_clock is now templated on a type meeting the requirements of
the Clock concept. It inherits the nested types of the Clock on which it
is based. This resolves a problem with the original design which broke the
type-safety of time_point from different abstract clocks.
2014-11-25 19:19:56 -08:00
Nicholas Dudfield
7d72dfe0be Updated freeze tests:
* Always run freeze tests (and  enforcement tests)
* book_offers filtering tests are broken
2014-11-25 11:46:34 -08:00
Mark Travis
02529a0fc2 SHAMapStore Online Delete (RIPD-415):
Makes rippled configurable to support deletion of all data in its key-value
store (nodestore) and ledger and transaction SQLite databases based on
validated ledger sequence numbers. All records from a specified ledger
and forward shall remain available in the key-value store and SQLite, and
all data prior to that specific ledger may be deleted.

Additionally, the administrator may require that an RPC command be
executed to enable deletion. This is to align data deletion with local
policy.
2014-11-25 11:44:02 -08:00
JoelKatz
b44974677e Cleanup some stray formatting left in logs 2014-11-21 17:13:13 -08:00
Vinnie Falco
d4fd5e4fce HTTP Handshaking for Peers on Universal Port (RIPD-446):
This introduces a considerable change in the way that peers handshake. Instead
of sending the TMHello protocol message, the peer making the connection (client
role) sends an HTTP Upgrade request along with some special headers. The peer
acting in the server role sends an HTTP response completing the upgrade and
transition to RTXP (Ripple Transaction Protocol, a.k.a. peer protocol). If the
server has no available slots, then it sends a 503 Service Unavailable HTTP
response with a JSON content-body containing IP addresses of other servers to
try. The information that was previously contained in the TMHello message is
now communicated in the HTTP request and HTTP response including the secure
cookie to prevent man in the middle attacks. This information is documented
in the overlay README.md file.

To prevent disruption on the network, the handshake feature is rolled out in
two parts. This is part 1, where new servents acting in the client role will
send the old style TMHello handshake, and new servents acting in the server
role can automatically detect and accept both the old style TMHello handshake,
or the HTTP request accordingly. This detection happens in the Server module,
which supports the universal port. An experimental .cfg setting allows clients
to instead send HTTP handshakes when establishing peer connections. When this
code has reached a significant fraction of the network, these clients will be
able to establish a connection to the Ripple network using HTTP handshakes.

These changes clean up the handling of the socket for peers. It fixes a long
standing bug in the graceful close sequence, where remaining data such as the
IP addresses of other servers to try, did not get sent. Redundant state
variables for the peer are removed and the treatment of completion handlers is
streamlined. The treatment of SSL short reads and secure shutdown is also fixed.

Logging for the peers in the overlay module are divided into two partitions:
"Peer" and "Protocol". The Peer partition records activity taking place on the
socket while the Protocol partition informs about RTXP specific actions such as
transaction relay, fetch packs, and consensus rounds. The severity on the log
partitions may be adjusted independently to diagnose problems. Every log
message for peers is prefixed with a small, unique integer id in brackets,
to accurately associate log messages with peers.

HTTP handshaking is the first step in implementing the Hub and Spoke feature,
which transforms the network from a homogeneous network where all peers are
the same, into a structured network where peers with above average capabilities
in their ability to process ledgers and transactions self-assemble to form a
backbone of high powered machines which in turn serve a much larger number of
'leaves' with lower capacities with a goal to improve the number of
transactions that may be retired over time.
2014-11-21 16:47:12 -08:00
Vinnie Falco
d9c49386cb Add WrappedSink:
This class puts a configured string prefix in front of
each line of Journal output.
2014-11-21 16:46:57 -08:00
Vinnie Falco
30123eaa4a Add WrappedSink:
This class puts a configured string prefix in front of
each line of Journal output.
2014-11-21 16:46:57 -08:00
Nik Bougalis
454ec97d51 Replace custom exceptions with std::runtime_error 2014-11-21 13:15:41 -08:00
Vinnie Falco
cd98d1c1f9 Fix unit_test suite matching with full names 2014-11-21 12:59:32 -08:00
Vinnie Falco
c2ac331e78 Fix unit_test suite matching with full names 2014-11-21 12:59:32 -08:00
Nik Bougalis
756ac603db Simplify the Beast fatal error reporting framework:
* Reduce interface to a single function which reports error details
* Remove unused functions
2014-11-21 12:59:32 -08:00
Nik Bougalis
be4a35af11 Clarify SetAccount logic and clean up existing code 2014-11-21 12:59:32 -08:00
Tom Ritchford
445b29ad0d Fix RPC handlers to use the results of lookupLedger. 2014-11-21 12:59:32 -08:00
Vinnie Falco
64d0f7fffd Fix DecayingSample treatment of the window 2014-11-21 12:59:32 -08:00
Nik Bougalis
baf0d09455 Simplify the Beast fatal error reporting framework:
* Reduce interface to a single function which reports error details
* Remove unused functions
2014-11-21 12:59:32 -08:00
Vinnie Falco
933a98b97c Add http::chunk_encode:
This transforms a ConstBufferSequence into a new ConstBufferSequence whose
data is encoded according to the Content transfer encoding rules of RFC2616.
The implementation does not copy any memory.
2014-11-20 20:15:29 -08:00
Vinnie Falco
08a81a0ab9 Tidy up the structure of sources in protocol/:
Split out and rename STValidation
Split out and rename STBlob
Split out and rename STAccount
Split out STPathSet
Split STVector256 and move UintTypes to protocol/
Rename to STBase
Rename to STLedgerEntry
Rename to SOTemplate
Rename to STTx
Remove obsolete AgedHistory
Remove types.h and add missing includes
Remove unnecessary includes in app.h
Remove unnecessary includes in app.h
Remove include app.h from app1.cpp
2014-11-20 20:15:29 -08:00
Donovan Hide
b14751aad9 Use asio signal handling in Application (RIPD-140):
* Use signal_set as cross platform way of handling SIGINT
* Remove polling on main thread for shutdown.
* Add extra logging for received signal.
* Clean up exit handling on error in setup routines.
* Reuse isStopped() from Stoppable for status (could be isStopping() instead).
* Ctrl-C should now work for standalone mode as well on Windows.

Also small fixes to Resolver:
* Add Resolver prefix to logging.
* Fix AsyncObject::removeReference() logic.
* Fix work remaining logic.
2014-11-20 20:15:29 -08:00
Nik Bougalis
31110c7fd9 Cleanup ripple::Ledger:
* Convert static member functions to free functions
* Adopt consistent naming convention
* De-inline code
2014-11-20 20:15:29 -08:00
Vinnie Falco
0e1dd92d9b Fix case where slot==nullptr in Overlay:
This changes the Overlay to correctly handle the case when nullptr is
returned by PeerFinder new_inbound_slot on a detected self-connection.
2014-11-20 20:15:29 -08:00
Vinnie Falco
a3204a4df7 Add http::chunk_encode:
This transforms a ConstBufferSequence into a new ConstBufferSequence whose
data is encoded according to the Content transfer encoding rules of RFC2616.
The implementation does not copy any memory.
2014-11-20 20:15:29 -08:00
Donovan Hide
2288ab48b9 Use asio signal handling in Application (RIPD-140):
* Use signal_set as cross platform way of handling SIGINT
* Remove polling on main thread for shutdown.
* Add extra logging for received signal.
* Clean up exit handling on error in setup routines.
* Reuse isStopped() from Stoppable for status (could be isStopping() instead).
* Ctrl-C should now work for standalone mode as well on Windows.

Also small fixes to Resolver:
* Add Resolver prefix to logging.
* Fix AsyncObject::removeReference() logic.
* Fix work remaining logic.
2014-11-20 20:15:29 -08:00
mDuo13
670401884c Improve the human-readable description of the tesSUCCESS code:
Transactions that return tesSUCCESS have only been accepted and
propagated on the Ripple network and should not be considered
final until they have been included in a validated ledger.
2014-11-20 20:14:04 -08:00
Yana
37181c341e Changed doc/rippled-example.cfg to specify default for ssl_verify 2014-11-14 11:19:42 -08:00
wltsmrz
be7e677448 Update integration tests for changes to ripple-lib account request API:
Account requests expect an object as first argument
2014-11-14 11:10:12 -08:00
Josh Juran
b2eeb49a45 Clean up CKey and RippleAddress (RIPD-672)
* Remove CKey dependency on RippleAddress
* Create RAII ec_key wrapper that hides EC_KEY and other OpenSSL details
* Move CKey member logic into free functions
* Delete CKey class
* Rename units that are no longer CKey-related
* Delete code that was unused
2014-11-14 11:10:12 -08:00
Vinnie Falco
f3ebd508d6 Accept generic arguments in ci_equal 2014-11-14 11:10:11 -08:00
Vinnie Falco
9aa040d917 Accept generic arguments in ci_equal 2014-11-14 11:10:11 -08:00
Vinnie Falco
5d33ce352e Tidy up split_commas function and use it in Server
Conflicts:
	src/ripple/server/impl/ServerHandlerImp.cpp
2014-11-14 11:10:11 -08:00
Vinnie Falco
c2043a223b Tidy up split_commas function and use it in Server
Conflicts:
	src/ripple/server/impl/ServerHandlerImp.cpp
2014-11-14 11:10:11 -08:00
Vinnie Falco
f24e859f17 Construct Server after Overlay and WSDoors:
When the ServerHandler is constructed before the Overlay, an incoming
connection received after the server's listening ports have been opened
but before the Overlay object has been created causes a crash.
2014-11-14 11:10:11 -08:00
Vinnie Falco
737b33f9d1 Merge branch 'release' into develop 2014-11-14 10:56:45 -08:00
David Schwartz
00791d2151 Set version to 0.26.4-sp3 2014-11-11 16:33:52 -08:00
David Schwartz
b141598f9b Fix bugs in pathfinding with XRP as the source currency 2014-11-11 16:27:39 -08:00
Tom Ritchford
d1618d79b0 Fix pathfinding with multiple issuers for one currency (RIPD-618).
* Allow pathfinding requests where the starting currency may have
  multiple issuers.

* Cache paths over all issuers to avoid repeating work.

* Clear the ledger checkpoint in one retry case.

* Add an additional node at the front of paths when the starting issuer
  is not the source account.
2014-11-11 16:27:03 -08:00
Tom Ritchford
00c84dfe5c Clean up Pathfinder.
* Restrict to 80-columns and other style cleanups.
* Make pathfinding a free function and hide the class Pathfinder.
* Split off unrelated utility functions into separate files.
2014-11-11 16:26:38 -08:00
Vinnie Falco
95f31b98a8 Set version to 0.26.4-sp2 2014-11-11 14:22:37 -08:00
Miguel Portilla
10d74ed100 Fix account_lines, account_offers and book_offers result (RIPD-682):
The RPC account_lines and account_offers commands respond with the correct ledger info. account_offers, account_lines and book_offers allow admins unlimited size on the limit param. Specifying a negative value on limit clamps to the minimum value allowed. Incorrect types for limit are correctly reported in the result.
2014-11-11 14:21:49 -08:00
Vinnie Falco
8a7f612d5b Revert pathfinding changes:
* 5e7c527 Revert "Fix account_lines, account_offers and book_offers result (RIPD-682):"
* b3417ca Revert "Fix pathfinding with multiple issuers for one currency (RIPD-618)."
* 00db7f5 Revert "Clean up Pathfinder."
2014-11-11 14:21:40 -08:00
Tom Ritchford
c1e070c042 Add missing header needed for boost 1.57 compatibility. 2014-11-10 23:23:53 -05:00
Tom Ritchford
0829ee9234 Add missing header needed for boost 1.57 compatibility. 2014-11-10 23:23:53 -05:00
Nik Bougalis
ade26e2c86 Make Stoppable unit tests manual 2014-11-10 23:23:53 -05:00
Nik Bougalis
b22e33444b Make Stoppable unit tests manual 2014-11-10 23:23:53 -05:00
David Schwartz
d115a12cbe Remove dead TxQueue code 2014-11-10 23:23:53 -05:00
Nik Bougalis
b7b744de94 Remove sole use of beast::MurmurHash 2014-11-10 15:00:20 -08:00
Nik Bougalis
b668b79341 Remove MurmurHash from Beast 2014-11-10 14:00:54 -08:00
Nik Bougalis
68e46e406a Remove MurmurHash from Beast 2014-11-10 14:00:54 -08:00
Miguel Portilla
a46ae4efec Set version to 0.26.4-sp1 2014-11-10 16:25:45 -05:00
Miguel Portilla
62777a794e Fix account_lines, account_offers and book_offers result (RIPD-682):
The RPC account_lines and account_offers commands respond with the correct ledger info. account_offers, account_lines and book_offers allow admins unlimited size on the limit param. Specifying a negative value on limit clamps to the minimum value allowed. Incorrect types for limit are correctly reported in the result.
2014-11-10 16:25:14 -05:00
Tom Ritchford
329a969761 Remove unused RPCServer. 2014-11-10 12:53:21 -08:00
Vinnie Falco
7bc26c5ea0 Add WrappedSink 2014-11-10 12:52:57 -08:00
Vinnie Falco
30170bc394 Add short_read manual unit test:
This manual unit test explores the outcomes of shutting down
SSL stream connections at various point during a session.
2014-11-10 12:52:57 -08:00
Vinnie Falco
f193302e15 Add WrappedSink 2014-11-10 12:52:57 -08:00
Vinnie Falco
5ece1fa568 Add operator<< for basic_streambuf 2014-11-10 12:52:43 -08:00
Vinnie Falco
7c4870d641 Add operator<< for basic_streambuf 2014-11-10 12:52:43 -08:00
Vinnie Falco
98ea17f7fc Make ci_equal a function 2014-11-10 12:52:42 -08:00
Vinnie Falco
8b84a76d5d Make ci_equal a function 2014-11-10 12:52:42 -08:00
Vinnie Falco
8d25cc3c92 Add rfc2616::parse_csv 2014-11-10 12:52:42 -08:00
Vinnie Falco
a4cd761372 Add rfc2616::parse_csv 2014-11-10 12:52:42 -08:00
Miguel Portilla
63d2cfd6ba Fix account_lines, account_offers and book_offers result (RIPD-682):
The RPC account_lines and account_offers commands respond with the correct
ledger info. account_offers, account_lines and book_offers allow admins
unlimited size on the limit param. Specifying a negative value on limit clamps
to the minimum value allowed. Incorrect types for limit are correctly reported
in the result.
2014-11-10 12:46:36 -08:00
Tom Ritchford
bb44bdd047 Fix pathfinding with multiple issuers for one currency (RIPD-618).
* Allow pathfinding requests where the starting currency may have
  multiple issuers.

* Cache paths over all issuers to avoid repeating work.

* Clear the ledger checkpoint in one retry case.

* Add an additional node at the front of paths when the starting issuer
  is not the source account.
2014-11-10 12:07:57 -05:00
Tom Ritchford
6904e66384 Clean up Pathfinder.
* Restrict to 80-columns and other style cleanups.
* Make pathfinding a free function and hide the class Pathfinder.
* Split off unrelated utility functions into separate files.
2014-11-10 12:06:49 -05:00
Vinnie Falco
15c1055ff4 Fix weak_fn unit test. 2014-11-09 20:27:05 -08:00
Vinnie Falco
fbffe2367e Fix weak_fn unit test. 2014-11-09 20:27:05 -08:00
Vinnie Falco
e442a2846d Overlay improvements and bug fixes:
PeerImp::detach had a default argument graceful=true which did not
correctly close the socket and cause the Overlay to often hang on exit.
The logging for Overlay and Peers has been reworked. All the socket activity
is logged to Peers while protocol activity goes to Protocol. Every log line
is prefixed by a small integer ID unique to the connection.
* Removed graceful PeerImp::detach option
* Peer and Protocol log message handle respective types of logging
* Log messages prefixed with peer unique integer
* Prevent call to timer ancel from throwing an exception
2014-11-08 14:39:46 -08:00
Vinnie Falco
f6985586ea Better logging when opening Server ports. 2014-11-08 14:36:45 -08:00
Vinnie Falco
2bae5b0959 Throw if rippled.cfg is missing a [server] section 2014-11-08 14:36:45 -08:00
Vinnie Falco
c930151a95 Remove obsolete get_pointer 2014-11-08 14:36:44 -08:00
Vinnie Falco
1e58809fcc Remove obsolete get_pointer 2014-11-08 14:36:44 -08:00
Vinnie Falco
3d7c6f831c Add weak_fn 2014-11-08 14:36:44 -08:00
Vinnie Falco
6b1d213cc2 Add weak_fn 2014-11-08 14:36:44 -08:00
David Schwartz
ef57b3954c Add missing include needed for std::bad_cast in LexicalCast.h 2014-11-07 15:23:43 -08:00
David Schwartz
42bec13a83 Add missing include needed for std::bad_cast in LexicalCast.h 2014-11-07 15:23:43 -08:00
Vinnie Falco
4415a179b3 Update freeze test for moved TxFlags.h 2014-11-07 14:12:43 -08:00
Vinnie Falco
878070084e Refactor the structure of source files:
* New src/ripple/crypto and src/ripple/protocol directories
* Merged src/ripple/common into src/ripple/basics
* Move resource/api files up a level
* Add headers for "include what you use"
* Normalized include guards
* Renamed to JsonFields.h
* Remove obsolete files
* Remove net.h unity header
* Remove resource.h unity header
* Removed some deprecated unity includes
2014-11-07 13:40:43 -08:00
Vinnie Falco
5d42604efd Refactor the structure of source files:
* New src/ripple/crypto and src/ripple/protocol directories
* Merged src/ripple/common into src/ripple/basics
* Move resource/api files up a level
* Add headers for "include what you use"
* Normalized include guards
* Renamed to JsonFields.h
* Remove obsolete files
* Remove net.h unity header
* Remove resource.h unity header
* Removed some deprecated unity includes
2014-11-07 13:40:43 -08:00
Vinnie Falco
ef5adc507a Add missing includes. 2014-11-07 12:24:02 -08:00
Vinnie Falco
b134b7d3f6 Add missing includes. 2014-11-07 12:24:02 -08:00
Vinnie Falco
788219fe05 Adjust SSL context generation for Server:
The creation of self-signed certificates slows down the command
line client when launched repeatedly during unit test.
* Contexts are no longer generated for the command line client
* A port with no secure protocols generates an empty context
2014-11-07 06:13:56 -08:00
Tom Ritchford
9a7f66cfe9 Fix compilation errors in RPC/RipplePathFind.cpp 2014-11-06 21:58:13 -05:00
Tom Ritchford
daa4d16e61 Remove unused isXRP(Issue) function. 2014-11-06 20:17:13 -05:00
Tom Ritchford
cf05f87795 Fix pathfinding with multiple issuers for one currency (RIPD-618).
* Allow pathfinding requests where the starting currency may have
  multiple issuers.

* Cache paths over all issuers to avoid repeating work.

* Clear the ledger checkpoint in one retry case.

* Add an additional node at the front of paths when the starting issuer
  is not the source account.
2014-11-06 20:14:01 -05:00
Tom Ritchford
c2f2f83b7c Clean up Pathfinder.
* Restrict to 80-columns and other style cleanups.
* Make pathfinding a free function and hide the class Pathfinder.
* Split off unrelated utility functions into separate files.

Conflicts:
	src/ripple/rpc/handlers/RipplePathFind.cpp
2014-11-06 16:58:10 -08:00
Tom Ritchford
b30b2a523f Fix public member names of RPC::Context.
Conflicts:
	src/ripple/rpc/handlers/AccountTx.cpp
	src/ripple/rpc/handlers/AccountTxOld.cpp
	src/ripple/rpc/handlers/Ledger.cpp
	src/ripple/rpc/handlers/LedgerData.cpp
	src/ripple/rpc/handlers/RipplePathFind.cpp
	src/ripple/rpc/handlers/ServerInfo.cpp
	src/ripple/rpc/handlers/ServerState.cpp
	src/ripple/rpc/handlers/Submit.cpp
	src/ripple/rpc/handlers/Subscribe.cpp
	src/ripple/rpc/handlers/TxHistory.cpp
	src/ripple/rpc/handlers/Unsubscribe.cpp
	src/ripple/rpc/impl/Context.h
2014-11-06 16:55:20 -08:00
Nicholas Dudfield
150a3810a8 Update npm test rippled.cfg to use [server]:
The test now generates a configuration file with the new
configuration sections define by the Universal Port feature.
2014-11-06 16:10:00 -08:00
Vinnie Falco
ac0eaa912b Universal Port (RIPD-160):
This changes the behavior and configuration specification of the listening
ports that rippled uses to accept incoming connections for the supported
protocols: peer (Peer Protocol), http (JSON-RPC over HTTP), https (JSON-RPC)
over HTTPS, ws (Websockets Clients), and wss (Secure Websockets Clients).
Each listening port is now capable of handshaking in multiple protocols
specified in the configuration file (subject to some restrictions). Each
port can be configured to provide its own SSL certificate, or to use a
self-signed certificate. Ports can be configured to share settings, this
allows multiple ports to use the same certificate or values. The list of
ports is dynamic, administrators can open as few or as many ports as they
like. Authentication settings such as user/password or admin user/admin
password (for administrative commands on RPC or Websockets interfaces) can
also be specified per-port.

As the configuration file has changed significantly, administrators will
need to update their ripple.cfg files and carefully review the documentation
and new settings.

Changes:

* rippled-example.cfg updated with documentation and new example settings:
  All obsolete websocket, rpc, and peer configuration sections have been
  removed, the documentation updated, and a new documented set of example
  settings added.

* HTTP::Writer abstraction for sending HTTP server requests and responses
* HTTP::Handler handler improvements to support Universal Port
* HTTP::Handler handler supports legacy Peer protocol handshakes
* HTTP::Port uses shared_ptr<boost::asio::ssl::context>
* HTTP::PeerImp and Overlay use ssl_bundle to support Universal Port
* New JsonWriter to stream message and body through HTTP server
* ServerHandler refactored to support Universal Port and legacy peers
* ServerHandler Setup struct updated for Universal Port
* Refactor some PeerFinder members
* WSDoor and Websocket code stores and uses the HTTP::Port configuration
* Websocket autotls class receives the current secure/plain SSL setting
* Remove PeerDoor and obsolete Overlay peer accept code
* Remove obsolete RPCDoor and synchronous RPC handling code
* Remove other obsolete classes, types, and files
* Command line tool uses ServerHandler Setup for port and authorization info
* Fix handling of admin_user, admin_password in administrative commands
* Fix adminRole to check credentials for Universal Port
* Updated Overlay README.md

* Overlay sends IP:port redirects on HTTP Upgrade peer connection requests:
  Incoming peers who handshake using the HTTP Upgrade mechanism don't get
  a slot, and always get HTTP Status 503 redirect containing a JSON
  content-body with a set of alternate IP and port addresses to try, learned
  from PeerFinder. A future commit related to the Hub and Spoke feature will
  change the response to grant the peer a slot when there are peer slots
  available.

* HTTP responses to outgoing Peer connect requests parse redirect IP:ports:
  When the [overlay] configuration section (which is experimental) has
  http_handshake = 1, HTTP redirect responses will have the JSON content-body
  parsed to obtain the redirect IP:port addresses.

* Use a single io_service for HTTP::Server and Overlay:
  This is necessary to allow HTTP::Server to pass sockets to and from Overlay
  and eventually Websockets. Unfortunately Websockets is not so easily changed
  to use an externally provided io_service. This will be addressed in a future
  commit, and is one step necessary ease the restriction on ports configured
  to offer Websocket protocols in the .cfg file.
2014-11-06 16:10:00 -08:00
Vinnie Falco
05a04aa801 Set version to 0.26.4 2014-11-03 16:53:37 -08:00
Vinnie Falco
ea7013a34d Improved beast::http::message:
* Add headers::erase
* Set http::message version with std::pair
* Use std::pair for headers::value_type
2014-11-03 16:40:57 -08:00
Vinnie Falco
e37d4043f6 Add missing includes to make headers compile separately 2014-11-03 16:40:57 -08:00
Vinnie Falco
d073425b44 Improved beast::http::message:
* Add headers::erase
* Set http::message version with std::pair
* Use std::pair for headers::value_type
2014-11-03 16:40:57 -08:00
Nicholas Dudfield
825b18cf71 Add bin/stop-test.js shutdown testing script:
This script launches rippled repeatedly and then issues a stop command
after a variable amount of time. This is to test the shutdown of the
application and catch errors.
2014-11-03 16:31:21 -08:00
Vinnie Falco
549ad3204f Fix race conditions closing HTTP I/O objects:
This fixes a case where stop can sometimes skip calling close on some
I/O objects or crash in a rare circumstance where a connection is in the
process of being torn down at the exact time the server is stopped. When
the acceptor receives errors, it logs the error and continues listening
instead of stopping.
2014-11-03 14:11:06 -08:00
Vinnie Falco
35f9499b67 Fix Overlay stop on exit:
The stop sequence for Overlay had a race condition where autoconnect could
be called after close_all, resulting in a hang on exit. This resolves the
problem by putting the close and timer operations on a strand:
* Rename some Overlay members
* Put close on strand and tidy up members
* Use completion handler instead of coroutine for timer
* Use App io_service in PeerFinder
2014-11-03 14:11:05 -08:00
Vinnie Falco
db82c35c17 Remove spurious assert in ResolverAsioImpl 2014-11-03 14:11:05 -08:00
Vinnie Falco
73c74f753c Change to the Application io_service:
* Simplified the implementation and removed class IoServicePool
* The io_service outlives the components of the Application
2014-11-03 14:11:05 -08:00
JoelKatz
a38fb2a5dc Clear the acquiring ledger when shutting down NetworkOPs:
This solves a circular destruction problem on exit.
2014-11-03 14:11:04 -08:00
Donovan Hide
38e99e01f9 Improve nodestore benchmarking:
* Use more succinct while loops on NodeFactory.
* Better formatting of multiple test results.
* Updated benchmarks.
* Use simpler and faster RNG to generate test data.
2014-11-02 07:16:08 -08:00
Donovan Hide
a1f46e84b8 Add new RocksDBQuickFactory for benchmarking:
This new factory is intended for benchmarking against the existing RocksDBFactory and has the following differences.
* Does not use BatchWriter
* Disables WAL for writes to memtable
* Uses a hash index in blocks
* Uses RocksDB OptimizeFor… functions
See Benchmarks.md for further discussion of some of the issues raised by investigation of RocksDB performance.
2014-11-01 07:12:09 -07:00
Donovan Hide
6540804571 Add repeatable NodeStore timing benchmark:
The timing test is changed to overcome possible file buffer cache effects by creating different read access patterns. The unittest-arg command line arguments allow running the benchmarks against any of the available backends and altering the parameters passed in the same format as rippled.cfg. The num_objects parameter permits variation of the number of key/values inserted. The data is random but matches reasonably well the values that rippled might generate.
2014-11-01 07:12:08 -07:00
Howard Hinnant
eb64a4387d Refactor Stoppable:
The Stoppable interface aids in the enforcement of invariants needed to
successful start and stop a multi-threaded application composed of classes
that depend on each other in complex ways.
* Test written to confirm the current behavior.
* Comments updated to reflect the current behavior.
* Public API reduced to what is currently in use.
* Protected data members made private.
* volatile bool members changed to std::atomic<bool>.
* std::atomic<int> members changed to std::atomic<bool>.
* Name storage uses std::string
2014-10-31 21:29:16 -07:00
Howard Hinnant
ffe6707595 Refactor Stoppable:
The Stoppable interface aids in the enforcement of invariants needed to
successful start and stop a multi-threaded application composed of classes
that depend on each other in complex ways.
* Test written to confirm the current behavior.
* Comments updated to reflect the current behavior.
* Public API reduced to what is currently in use.
* Protected data members made private.
* volatile bool members changed to std::atomic<bool>.
* std::atomic<int> members changed to std::atomic<bool>.
* Name storage uses std::string
2014-10-31 21:29:16 -07:00
Tom Ritchford
68fe1a7c8f New class TempDirectory in UnitTestUtilities. 2014-10-31 21:21:54 -07:00
Tom Ritchford
9b21740c9f Delete temporary directories at the end of tests (RIPD-460). 2014-10-31 21:21:54 -07:00
Tom Ritchford
bd12e2ab95 New class TempDirectory in UnitTestUtilities. 2014-10-31 21:21:54 -07:00
Donovan Hide
bffb5ef8b4 Avoid zero initialization of Blob:
This seemed to improve the performance of the copy, although there did seem to be some byte by byte copying still present. Further investigation recommended.
2014-10-31 20:12:39 -07:00
Donovan Hide
e4c9822d78 Enable processor-specific optimizations when available:
The SConstruct is modified to enable processor specific optimizations on clang and gcc toolchains. This improves the performance of RocksDB's CRC function. It might also enable other used libraries that are in the codebase now or in the future to apply cpu-specific optimisations. The mtune option ensures that a binary compiled on one machine will function on another,
2014-10-31 20:12:39 -07:00
Vinnie Falco
73187d8832 Remove obsolete multitls and proxy websocket features 2014-10-31 15:15:40 -07:00
Vinnie Falco
8101154d5e Remove obsolete websocket PROXY port 2014-10-31 15:15:40 -07:00
Vinnie Falco
c02937fd6f Remove obsolete sections from rippled-example.cfg:
* peer_port_proxy is obsolete since the MultiSocket was removed.
* peer_ssl_cipher_list has no effect, SSL ciphers are hard coded for security.
2014-10-31 15:15:40 -07:00
Vinnie Falco
3430be4075 Add PeerFinder onRedirects function 2014-10-31 13:27:55 -07:00
Vinnie Falco
320897bad6 Add streambuf to_string function 2014-10-31 13:27:38 -07:00
Vinnie Falco
3f2b6f771f Add streambuf to_string function 2014-10-31 13:27:38 -07:00
Vinnie Falco
6e39b49cc2 Add Json::stream to write Value to a Streambuf 2014-10-31 13:27:33 -07:00
Vinnie Falco
71c34ed4e0 Remove unused ErrorReply function 2014-10-31 13:25:54 -07:00
Vinnie Falco
477178675c Fix parseIniFile for duplicate sections 2014-10-31 13:25:30 -07:00
Vinnie Falco
dbdf68b248 Refactor HTTP::Server to support Universal Port:
These changes are necessary to support the Universal port feature. Synopsis:

* Persist HTTP peer io_service::work lifetime:
This simplification eliminates any potential for bugs caused by incorrect
lifetime management of the io_service::work object.

* Restructure Door to prevent data races, and handle clean exit:
The Server, Door, Door::detector, and Peer objects work together to
correctly implement graceful stop and destructors that block until
all child objects have been destroyed.

Cleanups:
* De-pimpl HTTP::Server
* Rename ServerImpl data members
* Tidy up HTTP::Port interface
2014-10-30 16:02:19 -07:00
Vinnie Falco
2fd139b307 Refactor Overlay and add [overlay] config section (experimental):
These changes prepare Overlay for the Universal Port and Hub and Spoke
features.

* Add [overlay configuration section:
The [overlay] section uses the new BasicConfig interface that
supports key-value pairs in the section. Some exposition is added to the
example cfg file. The new settings for overlay are related to the Hub and
Spoke feature which is currently in development. Production servers should
not set these configuration options, they are clearly marked experimental
in the example cfg file.

Other changes:
* Use _MSC_VER to detect Visual Studio
* Use ssl_bundle in Overlay::Peer
* Use shared_ptr to SSL context in Overlay:
* Removed undocumented PEER_SSL_CIPHER_LIST configuration setting
* Add Section::name: The Section object now stores its name for better diagnostic messages.
2014-10-30 13:55:01 -07:00
Vinnie Falco
0b692080cd Add shared_ptr<boost::asio::ssl::context> to ssl_bundle:
This gives the ssl_bundle shared ownership of the underlying ssl context
so that ownership of the bundle may be transferred to other classes without
introduce lifetime issues.
2014-10-30 13:55:00 -07:00
Vinnie Falco
a6c2657062 Add shared_ptr<boost::asio::ssl::context> to ssl_bundle:
This gives the ssl_bundle shared ownership of the underlying ssl context
so that ownership of the bundle may be transferred to other classes without
introduce lifetime issues.
2014-10-30 13:55:00 -07:00
Vinnie Falco
eaa021c2e2 Make streambuf buffers_type iterators default constructible 2014-10-30 13:55:00 -07:00
Vinnie Falco
78a0bc0e2c Make streambuf buffers_type iterators default constructible 2014-10-30 13:55:00 -07:00
Edward Hennis
d352a744a5 Enable std::array overloads for boost::asio on clang:
* Remove Boost config option from beast config.
* Define from compiler, or let Boost figure out itself.
2014-10-30 13:55:00 -07:00
Edward Hennis
d7116d6867 Enable std::array overloads for boost::asio on clang:
* Remove Boost config option from beast config.
* Define from compiler, or let Boost figure out itself.
2014-10-30 13:55:00 -07:00
Josh Juran
edc15b9fa2 Use a self-signed certificate for peers (RIPD-108):
Generate a new RSA key pair and a self-signed X.509v3 certificate to use
with SSL connections to rippled peers.  New credentials are created each
startup.
2014-10-30 13:54:49 -07:00
Josh Juran
93d4b73b2f RippleSSLContext: Add openssl wrappers 2014-10-30 10:52:37 -07:00
Vinnie Falco
8e3849e591 Create Ripple SSL contexts using std::make_shared. 2014-10-30 10:52:36 -07:00
Vinnie Falco
14b439ce43 Separate beast::http::body from beast::http::message (RIPD-660):
This changes the http::message object to no longer contain a body. It modifies
the parser to store the body in a separate object, or to pass the body data
to a functor. This allows the body to be stored in more flexible ways. For
example, in HTTP responses the body can be generated procedurally instead
of being required to exist entirely in memory at once.
2014-10-29 19:23:53 -07:00
Vinnie Falco
acaa1098f7 Separate beast::http::body from beast::http::message (RIPD-660):
This changes the http::message object to no longer contain a body. It modifies
the parser to store the body in a separate object, or to pass the body data
to a functor. This allows the body to be stored in more flexible ways. For
example, in HTTP responses the body can be generated procedurally instead
of being required to exist entirely in memory at once.
2014-10-29 19:23:53 -07:00
Vinnie Falco
9e4c4ad8e5 Add beast::asio::basic_streambuf (RIPD-661):
This is class whose interface is identical to the boost::asio::basic_streambuf,
and uses an implementation that stores the data in multiple discontiguous
linear buffers, expanding and shrinking as needed.
2014-10-29 19:23:53 -07:00
Vinnie Falco
c1a5e88752 Use beast::asio::streambuf in Overlay 2014-10-29 19:23:53 -07:00
Vinnie Falco
74b99014d2 Add beast::asio::basic_streambuf (RIPD-661):
This is class whose interface is identical to the boost::asio::basic_streambuf,
and uses an implementation that stores the data in multiple discontiguous
linear buffers, expanding and shrinking as needed.
2014-10-29 19:23:53 -07:00
Tom Ritchford
9cba944d21 Add Json::to_string:
This allows the declaration for FastWriter to be hidden and makes
conversion of Json::Value objects to strings a little less clunky.
2014-10-29 19:23:52 -07:00
Tom Ritchford
8c1c2f5d05 Eliminate a copy of the string returned by FastWriter 2014-10-29 19:22:44 -07:00
Tom Ritchford
bf0fa8c562 Add 'sample' npm test:
test/sample-test.js is the smallest possible npm test.
2014-10-28 10:59:59 -07:00
Donovan Hide
3e1fc9ba6c Update unit testing command line parser parameters:
A string passed by the '--unittest-arg' command line parameter is passed to
suites when unit tests run and can be used to customize test behavior.
* Add '--unittest-arg' command line argument
* Remove obsolete '--unittest-format' command line argument
2014-10-28 10:55:44 -07:00
Vinnie Falco
f5941041d4 Improvements to beast::unit_test framework:
* Some runner member functions are now thread-safe.
* De-inline and tidy up declarations and definitions.
* arg() interface allows command lines to be passed to suites.
2014-10-28 10:41:10 -07:00
Vinnie Falco
4ceba603e4 Improvements to beast::unit_test framework:
* Some runner member functions are now thread-safe.
* De-inline and tidy up declarations and definitions.
* arg() interface allows command lines to be passed to suites.
2014-10-28 10:41:10 -07:00
Vinnie Falco
6591c21ace Set version to 0.26.4-rc4 2014-10-27 11:49:39 -07:00
Vinnie Falco
e8d03c7b9b Update rocksdb unity file 2014-10-27 11:48:21 -07:00
Vinnie Falco
6fbce4c2f7 Update src/rocksdb2 to rocksdb-3.5.1:
Merge commit 'c168d54495d7d7b84639514f6443ad99b89ce996' into develop
2014-10-27 11:37:01 -07:00
Vinnie Falco
c168d54495 Squashed 'src/rocksdb2/' changes from 25888ae..1fdd726
1fdd726 Hotfix RocksDB 3.5
d67500a Add `make install` to Makefile in 3.5.fb.
4cb631a update HISTORY.md
cfd0946 comments about the BlockBasedTableOptions migration in Options
REVERT: 25888ae Merge pull request #329 from fyrz/master
REVERT: 89833e5 Fixed signed-unsigned comparison warning in db_test.cc
REVERT: fcac705 Fixed compile warning on Mac caused by unused variables.
REVERT: b3343fd resolution for java build problem introduced by 5ec53f3edf62bec1b690ce12fb21a6c52203f3c8
REVERT: 187b299 ForwardIterator: update prev_key_ only if prefix hasn't changed
REVERT: 5ec53f3 make compaction related options changeable
REVERT: d122e7b Update INSTALL.md
REVERT: 986dad0 Merge pull request #324 from dalgaaf/wip-da-SCA-20140930
REVERT: 8ee75dc db/memtable.cc: remove unused variable merge_result
REVERT: 0fd8bbc db/db_impl.cc: reduce scope of prefix_initialized
REVERT: 676ff7b compaction_picker.cc: remove check for >=0 for unsigned
REVERT: e55aea5 document_db.cc: fix assert
REVERT: d517c83 in_table_factory.cc: use correct format specifier
REVERT: b140375 ttl/ttl_test.cc: prefer prefix ++operator for non-primitive types
REVERT: 43c789c spatialdb/spatial_db.cc: use !empty() instead of 'size() > 0'
REVERT: 0de452e document_db.cc: pass const parameter by reference
REVERT: 4cc8643 util/ldb_cmd.cc: prefer prefix ++operator for non-primitive types
REVERT: af8c2b2 util/signal_test.cc: suppress intentional null pointer deref
REVERT: 33580fa db/db_impl.cc: fix object handling, remove double lines
REVERT: 873f135 db_ttl_impl.h: pass func parameter by reference
REVERT: 8558457 ldb_cmd_execute_result.h: perform init in initialization list
REVERT: 063471b table/table_test.cc: pass func parameter by reference
REVERT: 93548ce table/cuckoo_table_reader.cc: pass func parameter by ref
REVERT: b8b7117 db/version_set.cc: use !empty() instead of 'size() > 0'
REVERT: 8ce050b table/bloom_block.*: pass func parameter by reference
REVERT: 53910dd db_test.cc: pass parameter by reference
REVERT: 68ca534 corruption_test.cc: pass parameter by reference
REVERT: 7506198 cuckoo_table_db_test.cc: add flush after delete
REVERT: 1f96330 Print MB per second compaction throughput separately for reads and writes
REVERT: ffe3d49 Add an instruction about SSE in INSTALL.md
REVERT: ee1f3cc Package generation for Ubuntu and CentOS
REVERT: f0f7955 Fixing comile errors on OS X
REVERT: 99fb613 remove 2 space linter
REVERT: b2d64a4 Fix linters, second try
REVERT: 747523d Print per column family metrics in db_bench
REVERT: 56ebd40 Fix arc lint (should fix #238)
REVERT: 637f891 Merge pull request #321 from eonnen/master
REVERT: 827e31c Make test use a compatible type in the size checks.
REVERT: fd5d80d CompactedDB: log using the correct info_log
REVERT: 2faf49d use GetContext to replace callback function pointer
REVERT: 983d2de Add AUTHORS file. Fix #203
REVERT: abd70c5 Merge pull request #316 from fyrz/ReverseBytewiseComparator
REVERT: 2dc6f62 handle kDelete type in cuckoo builder
REVERT: 8b8011a Changed name of ReverseBytewiseComparator based on review comment
REVERT: 389edb6 universal compaction picker: use double for potential overflow
REVERT: 5340484 Built-in comparator(s) in RocksJava
REVERT: d439451 delay initialization of cuckoo table iterator
REVERT: 94997ea reduce memory usage of cuckoo table builder
REVERT: c627595 improve memory efficiency of cuckoo reader
REVERT: 581442d option to choose module when calculating CuckooTable hash
REVERT: fbd2daf CompactedDBImpl::MultiGet() for better CuckooTable performance
REVERT: 3c68006 CompactedDBImpl
REVERT: f7375f3 Fix double deletes
REVERT: 21ddcf6 Remove allow_thread_local
REVERT: fb4a492 Merge pull request #311 from ankgup87/master
REVERT: 611e286 Merge branch 'master' of https://github.com/facebook/rocksdb
REVERT: 0103b44 Merge branch 'master' of ssh://github.com/ankgup87/rocksdb
REVERT: 1dfb7bb Add block based table config options
REVERT: cdaf44f Enlarge log size cap when printing file summary
REVERT: 7cc1ed7 Merge pull request #309 from naveenatceg/staticbuild
REVERT: ba6d660 Resolving merge conflict
REVERT: 51eeaf6 Addressing review comments
REVERT: fd7d3fe Addressing review comments (adding a env variable to override temp directory)
REVERT: cf7ace8 Addressing review comments
REVERT: 0a29ce5 re-enable BlockBasedTable::SetupForCompaction()
REVERT: 55af370 Remove TODO for checking index checksums
REVERT: 3d74f09 Fix compile
REVERT: 53b0039 Fix release compile
REVERT: d0de413 WriteBatchWithIndex to allow different Comparators for different column families
REVERT: 57a32f1 change target_file_size_base to uint64_t
REVERT: 5e6aee4 dont create backup_input if compaction filter v2 is not used
REVERT: 49b5f94 Merge pull request #306 from Liuchang0812/fix_cast
REVERT: 787cb4d remove cast, replace %llu with % PRIu64
REVERT: a7574d4 Update logging.cc
REVERT: 7e0dcb9 Update logging.cc
REVERT: 57fa3cc Merge pull request #304 from Liuchang0812/fix-check
REVERT: cd44522 Merge pull request #305 from Liuchang0812/fix-logging
REVERT: 6a031b6 remove unused variable
REVERT: 4436f17 fixed #303: replace %ld with % PRId64
REVERT: 7a1bd05 Merge pull request #302 from ankgup87/master
REVERT: 423e52c Merge branch 'master' of https://github.com/facebook/rocksdb
REVERT: bfeef94 Add rate limiter
REVERT: 32f2532 Print compression_size_percent as a signed int
REVERT: 976caca Skip AllocateTest if fallocate() is not supported in the file system
REVERT: 3b897cd Enable no-fbcode RocksDB build
REVERT: f445947 RocksDB: Format uint64 using PRIu64 in db_impl.cc
REVERT: e17bc65 Merge pull request #299 from ankgup87/master
REVERT: b93797a Fix build
REVERT: adae3ca [Java] Fix JNI link error caused by the removal of options.db_stats_log_interval
REVERT: 90b8c07 Fix unit tests errors
REVERT: 51af7c3 CuckooTable: add one option to allow identity function for the first hash function
REVERT: 0350435 Fixed a signed-unsigned comparison in spatial_db.cc -- issue #293
REVERT: 2fb1fea Fix syncronization issues
REVERT: ff76895 Remove some unnecessary constructors
REVERT: feadb9d fix cuckoo table builder test
REVERT: 3c232e1 Fix mac compile
REVERT: 54cada9 Run make format on PR #249
REVERT: 27b22f1 Merge pull request #249 from tdfischer/decompression-refactoring
REVERT: fb6456b Replace naked calls to operator new and delete (Fixes #222)
REVERT: 5600c8f cuckoo table: return estimated size - 1
REVERT: a062e1f SetOptions() for memtable related options
REVERT: e4eca6a Options conversion function for convenience
REVERT: a7c2094 Merge pull request #292 from saghmrossi/master
REVERT: 4d05234 Merge branch 'master' of github.com:saghmrossi/rocksdb
REVERT: 60a4aa1 Test use_mmap_reads
REVERT: 94e43a1 [Java] Fixed 32-bit overflowing issue when converting jlong to size_t
REVERT: f9eaaa6 added include for inttypes.h to fix nonworking printf statements
REVERT: f090575 Replaced "built on on earlier work" by "built on earlier work" in README.md
REVERT: faad439 Fix #284
REVERT: 49aacd8 Fix make install
REVERT: acb9348 [Java] Include WriteBatch into RocksDBSample.java, fix how DbBenchmark.java handles WriteBatch.
REVERT: 4a27a2f Don't sync manifest when disableDataSync = true
REVERT: 9b8480d Merge pull request #287 from yinqiwen/rate-limiter-crash-fix
REVERT: 28be16b fix rate limiter crash #286
REVERT: 04ce1b2 Fix #284
REVERT: add22e3 standardize scripts to run RocksDB benchmarks
REVERT: dee91c2 WriteThread
REVERT: 540a257 Fix WAL synced
REVERT: 24f034b Merge pull request #282 from Chilledheart/develop
REVERT: 49fe329 Fix build issue under macosx
REVERT: ebb5c65 Add make install
REVERT: 0352a9f add_wrapped_bloom_test
REVERT: 9c0e66c Don't run background jobs (flush, compactions) when bg_error_ is set
REVERT: a9639bd Fix valgrind test
REVERT: d1f24dc Relax FlushSchedule test
REVERT: 3d9e6f7 Push model for flushing memtables
REVERT: 059e584 [unit test] CompactRange should fail if we don't have space
REVERT: dd641b2 fix RocksDB java build
REVERT: 53404d9 add_qps_info_in cache bench
REVERT: a52cecb Fix Mac compile
REVERT: 092f97e Fix comments and typos
REVERT: 6cc1286 Added a few statistics for BackupableDB
REVERT: 0a42295 Fix SimpleWriteTimeoutTest
REVERT: 06d9862 Always pass MergeContext as pointer, not reference
REVERT: d343c3f Improve db recovery
REVERT: 6bb7e3e Merger test
REVERT: 88841bd Explicitly cast char to signed char in Hash()
REVERT: 5231146 MemTableOptions
REVERT: 1d284db Addressing review comments
REVERT: 55114e7 Some updates for SpatialDB
REVERT: 171d4ff remove TailingIterator reference in db_impl.h
REVERT: 9b0f7ff rename version_set options_ to db_options_ to avoid confusion
REVERT: 2d57828 Check stop level trigger-0 before slowdown level-0 trigger
REVERT: 659d2d5 move compaction_filter to immutable_options
REVERT: 048560a reduce references to cfd->options() in DBImpl
REVERT: 011241b DB::Flush() Do not wait for background threads when there is nothing in mem table
REVERT: a2bb7c3 Push- instead of pull-model for managing Write stalls
REVERT: 0af157f Implement full filter for block based table.
REVERT: 9360cc6 Fix valgrind issue
REVERT: 02d5bff Merge pull request #277 from wankai/master
REVERT: 88a2f44 fix comments
REVERT: 7c16e39 Merge pull request #276 from wankai/master
REVERT: 8237738 replace hard-coded number with named variable
REVERT: db8ca52 Merge pull request #273 from nbougalis/static-analysis
REVERT: b7b031f Merge pull request #274 from wankai/master
REVERT: 4c2b1f0 Merge remote-tracking branch 'upstream/master'
REVERT: a5d2863 typo improvement
REVERT: 9f8aa09 Don't leak data returned by opendir
REVERT: d1cfb71 Remove unused member(s)
REVERT: bfee319 sizeof(int*) where sizeof(int) was intended
REVERT: d40c1f7 Add missing break statement
REVERT: 2e97c38 Avoid off-by-one error when using readlink
REVERT: 40ddc3d add cache bench
REVERT: 9f1c80b Drop column family from write thread
REVERT: 8de151b Add db_bench with lots of column families to regression tests
REVERT: c9e419c rename options_ to db_options_ in DBImpl to avoid confusion
REVERT: 5cd0576 Fix compaction bug in Cuckoo Table Builder. Use kvs_.size() instead of num_entries in FileSize() method.
REVERT: 0fbb3fa fixed memory leak in unit test DBIteratorBoundTest
REVERT: adcd253 fix asan check
REVERT: 4092b7a Merge pull request #272 from project-zerus/patch-1
REVERT: bb6ae0f fix more compile warnings
REVERT: 6d31441 Merge pull request #271 from nbougalis/cleanups
REVERT: 0cd0ec4 Plug memory leak during index creation
REVERT: 4329d74 Fix swapped variable names to accurately reflect usage
REVERT: 45a5e3e Remove path with arena==nullptr from NewInternalIterator
REVERT: 5665e5e introduce ImmutableOptions
REVERT: e0b99d4 created a new ReadOptions parameter 'iterate_upper_bound'
REVERT: 51ea889 Fix travis builds
REVERT: a481626 Relax backupable rate limiting test
REVERT: f7f973d Merge pull request #269 from huahang/patch-2
REVERT: ef5b384 fix a few compile warnings
REVERT: 2fd3806 Merge pull request #263 from wankai/master
REVERT: 1785114 delete unused Comparator
REVERT: 1b1d961 update HISTORY.md
REVERT: 703c3ea comments about the BlockBasedTableOptions migration in Options
REVERT: 4b5ad88 Merge pull request #260 from wankai/master
REVERT: 19cc588 change to filter_block std::unique_ptr support RAII
REVERT: 9b976e3 Merge pull request #259 from wankai/master
REVERT: 5d25a46 Merge remote-tracking branch 'upstream/master'
REVERT: dff2b1a typo improvement
REVERT: 343e98a Reverting import change
REVERT: ddb8039 RocksDB static build Make file changes to download and build the dependencies .Load the shared library when RocksDB is initialized

git-subtree-dir: src/rocksdb2
git-subtree-split: 1fdd726a8254c13d0c66d8db8130ad17c13d7bcc
2014-10-27 11:36:32 -07:00
Vinnie Falco
9ab4f7bcc6 Update SQLite to 3.8.7:
sha1: 3e23079f062fc06705eead4db108ee429878b532
2014-10-27 11:04:46 -07:00
Vinnie Falco
2cce22052b Update SQLite to 3.8.7:
sha1: 3e23079f062fc06705eead4db108ee429878b532
2014-10-27 11:04:46 -07:00
Tom Ritchford
4e19d5f625 Adjust paths and costs in Pathfinder. 2014-10-27 11:03:19 -07:00
Tom Ritchford
5b667da526 Squelch some warnings in rippled and third-party code. 2014-10-27 10:00:03 -07:00
Nik Bougalis
f9fc9a3518 Reduce RippleD dependencies on Beast:
* Use static_assert where appropriate
* Use std::min and std::max where appropriate
* Simplify RippleD error reporting
* Remove use of beast::RandomAccessFile
2014-10-27 09:55:58 -07:00
Nik Bougalis
186ca9c235 Reduce Beast public interface and eliminate unused code:
Beast includes a lot of code for encapsulating cross-platform differences
which are not used or needed by rippled. Additionally, a lot of that code
implements functionality that is available from the standard library.

This moves away from custom implementations of features that the standard
library provides and reduces the number of platform-specific interfaces
andfeatures that Beast makes available.

Highlights include:
* Use std:: instead of beast implementations when possible
* Reduce the use of beast::String in public interfaces
* Remove Windows-specific COM and Registry code
* Reduce the public interface of beast::File
* Reduce the public interface of beast::SystemStats
* Remove unused sysctl/getsysinfo functions
* Remove beast::Logger
2014-10-27 09:55:43 -07:00
Nik Bougalis
e005cfd70e Reduce Beast public interface and eliminate unused code:
Beast includes a lot of code for encapsulating cross-platform differences
which are not used or needed by rippled. Additionally, a lot of that code
implements functionality that is available from the standard library.

This moves away from custom implementations of features that the standard
library provides and reduces the number of platform-specific interfaces
andfeatures that Beast makes available.

Highlights include:
* Use std:: instead of beast implementations when possible
* Reduce the use of beast::String in public interfaces
* Remove Windows-specific COM and Registry code
* Reduce the public interface of beast::File
* Reduce the public interface of beast::SystemStats
* Remove unused sysctl/getsysinfo functions
* Remove beast::Logger
2014-10-27 09:55:43 -07:00
Vinnie Falco
feb997481c Refactor the structure of ServerHandler:
This is a cleanup to the structure of the sources.
* Rename to ServerHandler
* Move private implementation declaration to separate header
* De-inline function definitions in the class declaration.
2014-10-27 09:50:03 -07:00
Vinnie Falco
2c8e90c9d8 Remove obsolete RPCServerHandler:
This removes the legacy RPCServerHandler, which has been replaced by the
asynchronous RPC-HTTP/S server and corresponding RPCHTTPHandler.
2014-10-27 09:50:03 -07:00
Vinnie Falco
fefdb32d08 Remove unused and obsolete classes and tidy up:
Many classes required to support type-erasure of handlers and boost::asio
types are now obsolete, so these classes and files are removed:
HTTPClientType, FixedInputBuffer, PeerRole, socket_wrapper,
client_session, basic_url, abstract_socket, buffer_sequence, memory_buffer,
enable_wait_for_async, shared_handler, wrap_handler, streambuf,
ContentBodyBuffer, SSLContext, completion-handler based handshake detectors.
These structural changes are made:
* Some missing includes added to headers
* asio module directory flattened
2014-10-26 08:40:52 -07:00
Vinnie Falco
ec96d5afa0 Remove unused and obsolete classes and tidy up:
Many classes required to support type-erasure of handlers and boost::asio
types are now obsolete, so these classes and files are removed:
HTTPClientType, FixedInputBuffer, PeerRole, socket_wrapper,
client_session, basic_url, abstract_socket, buffer_sequence, memory_buffer,
enable_wait_for_async, shared_handler, wrap_handler, streambuf,
ContentBodyBuffer, SSLContext, completion-handler based handshake detectors.
These structural changes are made:
* Some missing includes added to headers
* asio module directory flattened
2014-10-26 08:40:52 -07:00
Vinnie Falco
8be8853c33 Remove obsolete classes, disable unused code, and tidy up:
* Removed MultiSocket. Code that previously used the MultiSocket now uses
  a combination of boost::asio coroutines and CRTP.
* Sitefiles headers rolled up and directory flattened.
* Disabled Sitefiles use of deprecated HTTPClient.
* Validators headers tidied up.
* Disabled Validators use of deprecated HTTPClient.
2014-10-26 08:38:37 -07:00
Vinnie Falco
c228f5a244 Set version to 0.26.4-rc3 2014-10-25 08:07:40 -07:00
Vinnie Falco
d4c8b4e3ac Merge branch 'release' into develop 2014-10-25 08:07:30 -07:00
Vinnie Falco
6564f6c164 Fix incorrect socket closure in Overlay peers:
On Application exit, Overlay was calling PeerImp::close for each peer.
The implementation of PeerImp::close only canceled all pending I/O and did not
call functions necessary for proper transition of Peer state during socket
closure. The correct transition is ensured by calling PeerImp::detach. This
changes PeerImp::close to call PeerImp::detach instead, ensuring that Overlay
invariants are maintained. Specifically, that reference counts for pending I/O
on peers will be correctly unwound by canceling operations and that the Peer
object will be destroyed, thus allowing the Overlay to stop correctly.
2014-10-25 08:01:57 -07:00
Vinnie Falco
1e37a5509c Add missing includes 2014-10-24 08:13:55 -07:00
Vinnie Falco
1e9503deaa Set version to 0.26.2-rc2 2014-10-23 13:49:22 -07:00
Vinnie Falco
ab1f36c565 Revert "Add [overlay] configuration section (experimental):"
This reverts commit 856fd9d69f.
2014-10-23 13:48:52 -07:00
Vinnie Falco
5a212cd626 Set version to 0.26.4-rc1 2014-10-23 13:01:12 -07:00
Vinnie Falco
856fd9d69f Add [overlay] configuration section (experimental):
This configuration section uses the new BasicConfig interface that supports
key-value pairs in the section. Some exposition is added to the example cfg
file. The new settings for overlay are related to the Hub and Spoke feature
which is currently in development. Production servers should not set
these configuration options, they are clearly marked experimental in the
example cfg file.

Conflicts:
	src/ripple/overlay/impl/OverlayImpl.cpp
	src/ripple/overlay/impl/OverlayImpl.h
	src/ripple/overlay/impl/PeerImp.cpp
	src/ripple/overlay/impl/PeerImp.h
2014-10-23 12:56:16 -07:00
Vinnie Falco
4606d99951 Don't use MultiSocket in Overlay:
The MultiSocket is obsolete technology which is superceded by a more
straightforward, template based implementation that is compatible with
boost::asio::coroutines. This removes support for the unused PROXY handshake
feature. After this change a large number of classes and source files may be
removed.
2014-10-23 12:56:16 -07:00
Tom Ritchford
dbd75169e5 New JsonWriter for improved client performance (RIPD-439):
When JSON-RPC and Websocket responses are calculated, the result is stored
in intermediate Json::Value objects and later composed in a single linear
memory buffer before being sent to the socket.  These classes support a
new model for building responses that supports incremental construction
of JSON replies in constant time and removes the requirement that all
data returned be located in continuguous memory.
* New JsonWriter incrementally writes JSON with O(1) granularity and memory.
* Array, Object are RAII wrappers for the O(1) JsonWriter.
2014-10-23 07:04:47 -07:00
Vinnie Falco
3cd391daa6 Return error_code from beast::http::basic_parser:
This changes the HTTP parser interface to return an error_code instead
of a bool. This eliminates the need for the error() member function and
simplifies calling code.
2014-10-22 19:36:28 -07:00
Vinnie Falco
f5b39ee911 Remove HTTP::ScopedStream:
This class was used to allow stream style operator<< to write to the
HTTP::Session. This is being superceded by a more robust object-based model
that supports coroutines.
2014-10-22 19:36:28 -07:00
Vinnie Falco
88cb0a1f7a Add beast::asio::ssl_bundle workaround:
This works around the limitation that 1.56 boost::asio::ssl::stream objects
do not support r-value move or construction. It is required when the stream
does not own the socket.
2014-10-22 19:36:28 -07:00
Vinnie Falco
db5d52b4b2 Keep a list of section config values that are not key/value pairs:
This change to BasicConfig stores all appended lines which are not key/value
pairs in a separate values vector which can be retrieved later. This is to
support sections containing both key/value pairs and a list of values.
2014-10-22 19:36:28 -07:00
Vinnie Falco
dfeb9967b8 Return error_code from beast::http::basic_parser:
This changes the HTTP parser interface to return an error_code instead
of a bool. This eliminates the need for the error() member function and
simplifies calling code.
2014-10-22 19:36:28 -07:00
Vinnie Falco
673e860c18 Add beast::asio::ssl_bundle workaround:
This works around the limitation that 1.56 boost::asio::ssl::stream objects
do not support r-value move or construction. It is required when the stream
does not own the socket.
2014-10-22 19:36:28 -07:00
Vinnie Falco
9deae34b20 Workaround for MSVC stdlib and coroutine interaction:
If beast::Time::currentTimeMillis is first called from a coroutine launched
using boost::asio::spawn, Win32 throws an exception. This workaround calls
getCurrentTime once in main to prevent the exception.
Reference:
    https://svn.boost.org/trac/boost/ticket/10657
2014-10-22 19:36:27 -07:00
Vinnie Falco
ec92344fb4 Use autotls instead of multitls in websocket:
The MultiSocket class implements a socket that handshakes in multiple
protocols including SSL and PROXY. Unfortunately the way it type-erases the
handlers and buffers is incompatible with boost::asio coroutines. To pave the
way for coroutines this is part of a larger set of changes that roll back the
usage of MultiSocket to older code, and some custom implementations that use
templates. The custom implementations are more simple since they use
coroutines. Removing MultiSocket will make many other classes and source files
unused, a big win for trimming down the codebase size.
2014-10-22 19:34:48 -07:00
Donovan Hide
44c68d6174 Change NodeStore::Backend tests to reflect observed patterns:
Empirical evidence shows a database access pattern with few hits
and many misses (objects that don't exist). This changes the timing
tests so they more accurately reflect rippled's actual usage:
* Add read missing keys test
* Increase numObjectsToTest to 1,000,000
* Alter PredictableObjectFactory to seed RNG once only
* Make NodeStoreTiming a manual test
2014-10-22 19:29:29 -07:00
Howard Hinnant
f0f082d3e3 Fix OS X version parsing/error related to OS X 10.10 update. 2014-10-22 19:29:28 -07:00
Howard Hinnant
5b7f172d03 Fix OS X version parsing/error related to OS X 10.10 update. 2014-10-22 19:29:28 -07:00
JoelKatz
65125eac87 Add "deferred" flag to transaction relay message
If we receive a deferred transaction from a server in our
cluster, treat it as if it wasn't received from a server
in our cluster.

This currently has no effect but is needed for server to
interoperate with future code that will relay deferred
transactions.
2014-10-22 19:29:28 -07:00
Scott Schurr
761902864a Refactor STParsedJSON to parse an object or array [RIPD-480]
The implementation of multi-sign has a SigningAccounts array as a
member of the outermost object.  This array could not be parsed
by the previous implementation of STParsedJSON, which only knew
how to parse objects.  This refactor supports the required parsing.

The refactor divides the parsing into three separate functions:

 o parseNoRecurse() which parses most rippled data types.
 o parseObject() which parses object types that may contain
   arbitrary other types.
 o parseArray() which parses object types that may contain
   arbitrary other types.

The change is required by the multi-sign implementation, but is
independent.  So the parsing change is going in as a separate
commit.

The parsing is still far from perfect.  But this was as much as
needs doing to accomplish the ends and mitigate risk of breaking
the parser.
2014-10-22 19:29:28 -07:00
Vinnie Falco
4a8555b3bf Workaround for MSVC move special members. 2014-10-18 08:16:12 -07:00
Vinnie Falco
af24d541d1 Workaround for MSVC move special members. 2014-10-18 08:16:12 -07:00
Nik Bougalis
9d33e4bd7b Fix URL compositing in Beast (RIPD-636). 2014-10-16 21:44:36 -04:00
Donovan Hide
3ad68a617e Fix dependency on boost::thread on OS/X. 2014-10-16 21:44:36 -04:00
Nik Bougalis
9e1a6589d4 Return descriptive error message from memo validation (RIPD-591). 2014-10-16 21:44:36 -04:00
Josh Juran
da8ceed07e RippleSSLContext.cpp cleanup.
* These cleanups precede work on RIPD-108.
2014-10-16 21:44:36 -04:00
Nik Bougalis
35935adc98 Fix URL compositing in Beast (RIPD-636). 2014-10-16 21:44:36 -04:00
Howard Hinnant
75c8d7aa57 Detab beast 2014-10-15 19:39:30 -04:00
Howard Hinnant
5b4a501f68 Detab beast 2014-10-15 19:39:30 -04:00
Tom Ritchford
5425a90f16 Fix tabs and trailing whitespace. 2014-10-15 19:39:30 -04:00
Mark Travis
f034b02b92 Disable SSLv3 2014-10-15 19:37:25 -04:00
Donovan Hide
7eaca149c1 Remove boost_thread dependency (RIPD-216).
Fixes RIPD-216
2014-10-15 19:37:25 -04:00
Mark Travis
4b5fd95657 Disable SSLv3 2014-10-15 19:37:25 -04:00
Nik Bougalis
96dedf553e Refactor SerializedTransaction:
* Use boost:tribool instead of two intertwined bool variables
* Trim down public interface, reduce member variables
2014-10-15 19:37:25 -04:00
sublimator
23219f2662 Disable transaction submission tests under Travis. 2014-10-15 19:37:25 -04:00
Vinnie Falco
af78ed608e Call Stoppable::stopped in PeerFinder onStop. 2014-10-15 19:37:25 -04:00
Vinnie Falco
51dc59e019 Fix outgoing bytes calculation in HTTP server. 2014-10-15 19:37:25 -04:00
Tom Ritchford
afc102e90a New class RPC::Status enforces JSON-RPC 2.0 error format.
* Relevant issues:
  * RIPD-92
  * RIPD-97
  * RIPD-98
  * RIPD-439
2014-10-15 19:37:25 -04:00
David Schwartz
fc560179e0 SHAMap performance improvements (RIPD-434)
This reworks the way SHAMaps are stored, flushed, backed, and
traversed. Rather than storing the linkages in the SHAMap itself,
that information is now stored in the nodes. This makes
snapshotting much cheaper and also allows traverse work done on
behalf of one SHAMap to be used by other SHAMaps that share inner
nodes with that SHAMap.

When a SHAMap is modified, nodes are modified all the way up to the
root. This means that the modified nodes in a SHAMap can easily be
traversed for flushing. So they don't need to be separately tracked.

Summary
* Remove mTNByID
* Remove mDirtyNodes
* Much faster traverses
* Much Faster snapshots
* New algorithm for flushing
* New vistNodes/visitLeaves
* Avoid I/O if a map is unbacked
2014-10-14 13:32:17 -04:00
sublimator
d26241de0e Remove Og from debug mode
Last time I used gdb, iterating over a directory's `Indexes`, each uint256 printed as `<optimized out>`.

Debug mode is for debugging ...
2014-10-14 12:57:41 -04:00
Howard Hinnant
96a3a34fa4 Gracefully cast from std:🧵:hardware_concurrency 2014-10-14 12:35:17 -04:00
Howard Hinnant
00310f4f10 Silence clang warnings 2014-10-14 12:35:17 -04:00
Howard Hinnant
e965b7c0da Guarantee C locale
*  Remove all calls to setlocale to ensure that the global
   locale is always C.

*  Also replace beast::SystemStats::getNumCpus() with
   std:🧵:hardware_concurrency()
2014-10-14 12:35:17 -04:00
Howard Hinnant
8caae219cf Gracefully cast from std:🧵:hardware_concurrency 2014-10-14 12:35:17 -04:00
Howard Hinnant
2264ae9247 Guarantee C locale
*  Remove all calls to setlocale to ensure that the global
   locale is always C.

*  Also replace beast::SystemStats::getNumCpus() with
   std:🧵:hardware_concurrency()
2014-10-14 12:35:17 -04:00
Nicholas Dudfield
29225bbe75 Attempt to fix spurious travis failures 2014-10-14 12:35:17 -04:00
Vinnie Falco
4b5625fd59 Load PeerFinder database in Stoppable::onPrepare:
OverlayImpl::onStart calls into PeerFinder before PeerFinder::Manager::onStart,
causing tests to sometimes fail and the application to intermittently not start.
The order of calls to Stoppable::onStart is implementation defined and not
predictable.

This changes PeerFinder to load the database in Stoppable::onPrepare, before
threads are launched. In general, creation and initialization of resources that
are shared between classes should happen in onPrepare rather than onStart,
to solve this problem.
2014-10-10 19:38:52 -07:00
Vinnie Falco
7c0c2419f7 Refactor PeerFinder:
Previously, the PeerFinder manager constructed with a Callback object
provided by the owner which was used to perform operations like connecting,
disconnecting, and sending messages. This made it difficult to change the
overlay code because a single call into the PeerFinder could cause both
OverlayImpl and PeerImp to be re-entered one or more times, sometimes while
holding a recursive mutex. This change eliminates the callback by changing
PeerFinder functions to return values indicating the action the caller should
take.

As a result of this change the PeerFinder no longer needs its own dedicated
thread. OverlayImpl is changed to call into PeerFinder on a timer to perform
periodic activities. Furthermore the Checker class used to perform connectivity
checks has been refactored. It no longer uses an abstract base class, in order
to not type-erase the handler passed to async_connect (ensuring compatibility
with coroutines). To allow unit tests that don't need a network, the Logic
class is now templated on the Checker type. Currently the Manager provides its
own io_service. However, this can easily be changed so that the io_service is
provided upon construction.

Summary
* Remove unused SiteFiles dependency injection
* Remove Callback and update signatures for public APIs
* Remove obsolete functions
* Move timer to overlay
* Steps toward a shared io_service
* Templated, simplified Checker
* Tidy up Checker declaration
2014-10-10 15:04:37 -07:00
Vinnie Falco
5f59282ba1 Clean up Overlay and PeerFinder sources:
* Tidy up identifiers and declarations
* Merge PeerFinder headers into one file
* Merge handout classes and functions into one file
2014-10-10 15:04:36 -07:00
Vinnie Falco
7847ac3144 Add pending_handlers 2014-10-10 13:26:08 -07:00
Vinnie Falco
db03ce939c Add pending_handlers 2014-10-10 13:26:08 -07:00
Vinnie Falco
6708311a66 Add missing include in beast header 2014-10-10 13:26:08 -07:00
Vinnie Falco
68bcbbb701 Add missing include in beast header 2014-10-10 13:26:08 -07:00
David Schwartz
8bdf7b3983 Remove unused file 2014-10-10 10:27:47 -07:00
Vinnie Falco
4ab427d315 Cleanup: Combine Section and BasicConfig, move to basics 2014-10-09 14:49:10 -07:00
Vinnie Falco
9a0a434dd8 Fix incorrect address in connectivity check report:
The remoteAddress is the address as seen on the socket, which for
incoming connections has a random port chosen by the remote implementation
that is different from the port number used to accept connections by the
remote listening socket. The checkedAddress is the remote address as seen
on the socket, combined with the port advertised in the TMEndpoints message.
This fixes the reporting and metadata associated with addresses tested
for connectivity.

The README has been updated to reflect that uptime is no longer part of
the metadata associated with IP addresses saved for bootstrapping.
2014-10-09 14:48:54 -07:00
Nik Bougalis
33d1dda954 Handle BIGNUM conversion failure 2014-10-06 11:24:42 -07:00
Howard Hinnant
8e9efb4ceb Remove unused transaction code. 2014-10-06 11:18:15 -07:00
Nik Bougalis
8835af11d5 Cleanups and surface reduction:
* Don't use friendship unless needed
* Trim down interfaces
* Make classes feel more like std containers
2014-10-06 11:18:15 -07:00
Nik Bougalis
cfb6b678f1 Remove HashMaps 2014-10-02 14:58:14 -07:00
miguelportilla
365500da98 Create orderbook integration test (RIPD-483) 2014-10-02 14:58:14 -07:00
Miguel Portilla
f14d75e798 Optimize account_lines and account_offers (RIPD-587)
Conflicts:
	src/ripple/app/ledger/Ledger.h
2014-10-02 14:58:14 -07:00
Tom Ritchford
0f71b4a378 Fix most compilation warnings for gcc, clang, release, debug. 2014-10-02 14:58:14 -07:00
JoelKatz
b651e0146d Fix some fee logic: (RIPD-614)
* fee_default sets cost in drops of reference transaction
* Offline signing uses fee_default
* Signing multiplier maximum works correctly
* Fix bugs in load fee track
* Remove dead code, add comments
2014-10-02 14:58:14 -07:00
Tom Ritchford
a0dbbb2d84 Update and sort ErrorCode descriptions 2014-10-02 14:57:31 -07:00
Torrie Fischer
a85fbf69e0 Update rocksdb 2014-10-02 14:57:31 -07:00
Torrie Fischer
92b8c7961b Squashed 'src/rocksdb2/' changes from 37c6740..25888ae
25888ae Merge pull request #329 from fyrz/master
89833e5 Fixed signed-unsigned comparison warning in db_test.cc
fcac705 Fixed compile warning on Mac caused by unused variables.
b3343fd resolution for java build problem introduced by 5ec53f3edf62bec1b690ce12fb21a6c52203f3c8
187b299 ForwardIterator: update prev_key_ only if prefix hasn't changed
5ec53f3 make compaction related options changeable
d122e7b Update INSTALL.md
986dad0 Merge pull request #324 from dalgaaf/wip-da-SCA-20140930
8ee75dc db/memtable.cc: remove unused variable merge_result
0fd8bbc db/db_impl.cc: reduce scope of prefix_initialized
676ff7b compaction_picker.cc: remove check for >=0 for unsigned
e55aea5 document_db.cc: fix assert
d517c83 in_table_factory.cc: use correct format specifier
b140375 ttl/ttl_test.cc: prefer prefix ++operator for non-primitive types
43c789c spatialdb/spatial_db.cc: use !empty() instead of 'size() > 0'
0de452e document_db.cc: pass const parameter by reference
4cc8643 util/ldb_cmd.cc: prefer prefix ++operator for non-primitive types
af8c2b2 util/signal_test.cc: suppress intentional null pointer deref
33580fa db/db_impl.cc: fix object handling, remove double lines
873f135 db_ttl_impl.h: pass func parameter by reference
8558457 ldb_cmd_execute_result.h: perform init in initialization list
063471b table/table_test.cc: pass func parameter by reference
93548ce table/cuckoo_table_reader.cc: pass func parameter by ref
b8b7117 db/version_set.cc: use !empty() instead of 'size() > 0'
8ce050b table/bloom_block.*: pass func parameter by reference
53910dd db_test.cc: pass parameter by reference
68ca534 corruption_test.cc: pass parameter by reference
7506198 cuckoo_table_db_test.cc: add flush after delete
1f96330 Print MB per second compaction throughput separately for reads and writes
ffe3d49 Add an instruction about SSE in INSTALL.md
ee1f3cc Package generation for Ubuntu and CentOS
f0f7955 Fixing comile errors on OS X
99fb613 remove 2 space linter
b2d64a4 Fix linters, second try
747523d Print per column family metrics in db_bench
56ebd40 Fix arc lint (should fix #238)
637f891 Merge pull request #321 from eonnen/master
827e31c Make test use a compatible type in the size checks.
fd5d80d CompactedDB: log using the correct info_log
2faf49d use GetContext to replace callback function pointer
983d2de Add AUTHORS file. Fix #203
abd70c5 Merge pull request #316 from fyrz/ReverseBytewiseComparator
2dc6f62 handle kDelete type in cuckoo builder
8b8011a Changed name of ReverseBytewiseComparator based on review comment
389edb6 universal compaction picker: use double for potential overflow
5340484 Built-in comparator(s) in RocksJava
d439451 delay initialization of cuckoo table iterator
94997ea reduce memory usage of cuckoo table builder
c627595 improve memory efficiency of cuckoo reader
581442d option to choose module when calculating CuckooTable hash
fbd2daf CompactedDBImpl::MultiGet() for better CuckooTable performance
3c68006 CompactedDBImpl
f7375f3 Fix double deletes
21ddcf6 Remove allow_thread_local
fb4a492 Merge pull request #311 from ankgup87/master
611e286 Merge branch 'master' of https://github.com/facebook/rocksdb
0103b44 Merge branch 'master' of ssh://github.com/ankgup87/rocksdb
1dfb7bb Add block based table config options
cdaf44f Enlarge log size cap when printing file summary
7cc1ed7 Merge pull request #309 from naveenatceg/staticbuild
ba6d660 Resolving merge conflict
51eeaf6 Addressing review comments
fd7d3fe Addressing review comments (adding a env variable to override temp directory)
cf7ace8 Addressing review comments
0a29ce5 re-enable BlockBasedTable::SetupForCompaction()
55af370 Remove TODO for checking index checksums
3d74f09 Fix compile
53b0039 Fix release compile
d0de413 WriteBatchWithIndex to allow different Comparators for different column families
57a32f1 change target_file_size_base to uint64_t
5e6aee4 dont create backup_input if compaction filter v2 is not used
49b5f94 Merge pull request #306 from Liuchang0812/fix_cast
787cb4d remove cast, replace %llu with % PRIu64
a7574d4 Update logging.cc
7e0dcb9 Update logging.cc
57fa3cc Merge pull request #304 from Liuchang0812/fix-check
cd44522 Merge pull request #305 from Liuchang0812/fix-logging
6a031b6 remove unused variable
4436f17 fixed #303: replace %ld with % PRId64
7a1bd05 Merge pull request #302 from ankgup87/master
423e52c Merge branch 'master' of https://github.com/facebook/rocksdb
bfeef94 Add rate limiter
32f2532 Print compression_size_percent as a signed int
976caca Skip AllocateTest if fallocate() is not supported in the file system
3b897cd Enable no-fbcode RocksDB build
f445947 RocksDB: Format uint64 using PRIu64 in db_impl.cc
e17bc65 Merge pull request #299 from ankgup87/master
b93797a Fix build
adae3ca [Java] Fix JNI link error caused by the removal of options.db_stats_log_interval
90b8c07 Fix unit tests errors
51af7c3 CuckooTable: add one option to allow identity function for the first hash function
0350435 Fixed a signed-unsigned comparison in spatial_db.cc -- issue #293
2fb1fea Fix syncronization issues
ff76895 Remove some unnecessary constructors
feadb9d fix cuckoo table builder test
3c232e1 Fix mac compile
54cada9 Run make format on PR #249
27b22f1 Merge pull request #249 from tdfischer/decompression-refactoring
fb6456b Replace naked calls to operator new and delete (Fixes #222)
5600c8f cuckoo table: return estimated size - 1
a062e1f SetOptions() for memtable related options
e4eca6a Options conversion function for convenience
a7c2094 Merge pull request #292 from saghmrossi/master
4d05234 Merge branch 'master' of github.com:saghmrossi/rocksdb
60a4aa1 Test use_mmap_reads
94e43a1 [Java] Fixed 32-bit overflowing issue when converting jlong to size_t
f9eaaa6 added include for inttypes.h to fix nonworking printf statements
f090575 Replaced "built on on earlier work" by "built on earlier work" in README.md
faad439 Fix #284
49aacd8 Fix make install
acb9348 [Java] Include WriteBatch into RocksDBSample.java, fix how DbBenchmark.java handles WriteBatch.
4a27a2f Don't sync manifest when disableDataSync = true
9b8480d Merge pull request #287 from yinqiwen/rate-limiter-crash-fix
28be16b fix rate limiter crash #286
04ce1b2 Fix #284
add22e3 standardize scripts to run RocksDB benchmarks
dee91c2 WriteThread
540a257 Fix WAL synced
24f034b Merge pull request #282 from Chilledheart/develop
49fe329 Fix build issue under macosx
ebb5c65 Add make install
0352a9f add_wrapped_bloom_test
9c0e66c Don't run background jobs (flush, compactions) when bg_error_ is set
a9639bd Fix valgrind test
d1f24dc Relax FlushSchedule test
3d9e6f7 Push model for flushing memtables
059e584 [unit test] CompactRange should fail if we don't have space
dd641b2 fix RocksDB java build
53404d9 add_qps_info_in cache bench
a52cecb Fix Mac compile
092f97e Fix comments and typos
6cc1286 Added a few statistics for BackupableDB
0a42295 Fix SimpleWriteTimeoutTest
06d9862 Always pass MergeContext as pointer, not reference
d343c3f Improve db recovery
6bb7e3e Merger test
88841bd Explicitly cast char to signed char in Hash()
5231146 MemTableOptions
1d284db Addressing review comments
55114e7 Some updates for SpatialDB
171d4ff remove TailingIterator reference in db_impl.h
9b0f7ff rename version_set options_ to db_options_ to avoid confusion
2d57828 Check stop level trigger-0 before slowdown level-0 trigger
659d2d5 move compaction_filter to immutable_options
048560a reduce references to cfd->options() in DBImpl
011241b DB::Flush() Do not wait for background threads when there is nothing in mem table
a2bb7c3 Push- instead of pull-model for managing Write stalls
0af157f Implement full filter for block based table.
9360cc6 Fix valgrind issue
02d5bff Merge pull request #277 from wankai/master
88a2f44 fix comments
7c16e39 Merge pull request #276 from wankai/master
8237738 replace hard-coded number with named variable
db8ca52 Merge pull request #273 from nbougalis/static-analysis
b7b031f Merge pull request #274 from wankai/master
4c2b1f0 Merge remote-tracking branch 'upstream/master'
a5d2863 typo improvement
9f8aa09 Don't leak data returned by opendir
d1cfb71 Remove unused member(s)
bfee319 sizeof(int*) where sizeof(int) was intended
d40c1f7 Add missing break statement
2e97c38 Avoid off-by-one error when using readlink
40ddc3d add cache bench
9f1c80b Drop column family from write thread
8de151b Add db_bench with lots of column families to regression tests
c9e419c rename options_ to db_options_ in DBImpl to avoid confusion
5cd0576 Fix compaction bug in Cuckoo Table Builder. Use kvs_.size() instead of num_entries in FileSize() method.
0fbb3fa fixed memory leak in unit test DBIteratorBoundTest
adcd253 fix asan check
4092b7a Merge pull request #272 from project-zerus/patch-1
bb6ae0f fix more compile warnings
6d31441 Merge pull request #271 from nbougalis/cleanups
0cd0ec4 Plug memory leak during index creation
4329d74 Fix swapped variable names to accurately reflect usage
45a5e3e Remove path with arena==nullptr from NewInternalIterator
5665e5e introduce ImmutableOptions
e0b99d4 created a new ReadOptions parameter 'iterate_upper_bound'
51ea889 Fix travis builds
a481626 Relax backupable rate limiting test
f7f973d Merge pull request #269 from huahang/patch-2
ef5b384 fix a few compile warnings
2fd3806 Merge pull request #263 from wankai/master
1785114 delete unused Comparator
1b1d961 update HISTORY.md
703c3ea comments about the BlockBasedTableOptions migration in Options
4b5ad88 Merge pull request #260 from wankai/master
19cc588 change to filter_block std::unique_ptr support RAII
9b976e3 Merge pull request #259 from wankai/master
5d25a46 Merge remote-tracking branch 'upstream/master'
9b58c73 call SanitizeDBOptionsByCFOptions() in the right place
a84234a Ignore missing column families
8ed70fc add assert to db Put in db_stress test
7f19bb9 Merge pull request #242 from tdfischer/perf-timer-destructors
8438a19 fix dropping column family bug
6614a48 Refactor PerfStepTimer to stop on destruct
076bd01 Fix compile
990df99 Fix ios compile
7dcadb1 Don't let flush preempt compaction in certain cases
dff2b1a typo improvement
985a31c Merge pull request #251 from nbougalis/master
f09329c Fix candidate file comparison when using path ids
7e9f28c limit max bytes that can be read/written per pread/write syscall
d20b8cf Improve Cuckoo Table Reader performance. Inlined hash function and number of buckets a power of two.
0f9c43e ForwardIterator: reset incomplete iterators on Seek()
722d80c reduce recordTick overhead in compaction loop
22a0a60 Merge pull request #250 from wankai/master
be25ee4 delete unused struct Options
0c26e76 Merge pull request #237 from tdfischer/tdfischer/faster-timeout-test
1d23b5c remove_internal_filter_policy
2a8faf7 Compact SpatialDB as we go, not at the end
7f71448 Implementing a cache friendly version of Cuckoo Hash
d977e55 Don't let other compactions run when manual compaction runs
d5bd6c7 Fix ios compile
6b46f78 Merge pull request #248 from wankai/master
528a11c Update block_builder.h
536e997 Remove assert in vector rep
4142a3e Adding a user comparator for comparing Uint64 slices.
1913ce2 more concurrent flushes in SpatialDB
808e809 Adjust SpatialDB column family options
0c39f54 Use Vector memtable when bulk loading SpatialDB
b6fd781 Don't do memtable lookup in db_impl_readonly if memtables are empty while opening db.
9dcb75b Add is-file-deletions-enabled property
1755581 improve OptimizeForPointLookup()
d9c0785 Fix assertion in PosixRandomAccessFile
bda6f33 fix valgrind error in c_test caused by BlockBasedTableOptions
0db6b02 Update timeout to 50ms instead of 3.
ff6ec0e Optimize SpatialDB
2386185 ReadOptions.total_order_seek to allow total order seek for block-based table when hash index is enabled
a98badf print table options
66f62e5 JNI changes corresponding to BlockBasedTableOptions migration
3844001 move block based table related options BlockBasedTableOptions
17b54ae Merge pull request #243 from andybons/patch-1
0508691 Add missing include to use std::unique_ptr
42ea795 Fix concurrency issue in CompactionPicker
bb530c0 Merge pull request #240 from ShaoYuZhang/master
f76eda7 Fix compilation issue on OSX
08be7f5 Implement Prepare method in CuckooTableReader
47b452c Fix the error of c_test.c
562b7a1 Add missing implementaiton of SanitizeDBOptions in simple_table_db_test.cc
63a2215 Improve Options sanitization and add MmapReadRequired() to TableFactory
e173bf9 Eliminate VersionSet memory leak
10720a5 Revert the unintended change that DestroyDB() doesn't clean up info logs.
01cbdd2 Optimize storage parameters for spatialDB
045575a Add CuckooHash table format to table_reader_bench
7c5173d test: db: fix test to have a smaller timeout for when it runs on faster hardware
6929b08 Remove BitStream* tests
50b790c Removing BitStream* functions
162b815 Adding Column Family support in db_bench.
28b5c76 WriteBatchWithIndex: a wrapper of WriteBatch, with a searchable index
5585e00 Update release note of 3.4
343e98a Reverting import change
ddb8039 RocksDB static build Make file changes to download and build the dependencies .Load the shared library when RocksDB is initialized
68eed8c Bump up version
36e759d Adding Cuckoo Table SST option to db_bench
a6fd14c Fix valgrind error in c_test
c703715 attempt to fix auto_roll_logger_test
c8ecfae Merge pull request #230 from cockroachdb/spencerkimball/send-user-keys-to-v2-filter
570ba5a Avoid retrying to read property block from a table when it does not exist.
625b9ef Merge pull request #234 from bbiao/master
59a2763 Fix typo huage => huge
f611935 Fix autovector iterator increment/decrement comments
58b0f9d Support purging logs from separate log directory
2da53b1 [Java] Add purgeOldBackups API
6c4c159 fix_sst_dump_for_old_sst_format
8dfe2fd fix compile error under Mac OS X
58c4946 Allow env_posix to lower background thread IO priority
6a2be31 fix_valgrind_error_caused_in_db_info_dummper
e91ebf1 print compaction_filter name in Options.Dump
5a5953b Add histogram for DB_SEEK
5e64240 log db path info before open
0c9dc9f Remove malloc from FormatFileNumber
bcefede Update HISTORY.md
4808177 Revert "Include candidate files under options.db_log_dir in FindObsoleteFiles()"
0138b8e Fixed compile errors (signed / unsigned comparison) in cuckoo_table_db_test on Mac
1562653 Fixed a signed-unsigned comparison error in db_test
218857b remove tailing_iter.h/cc
5d0074c set bytes_per_sync to 1MB if rate limiter is enabled
3fcf7b2 Pass parsed user key to prefix extractor in V2 compaction
2fa6434 Add scope guard
06a52bd Flush only one column family
9674c11 Integrating Cuckoo Hash SST Table format into RocksDB

git-subtree-dir: src/rocksdb2
git-subtree-split: 25888ae0068c9b8e3d9421ea8c78a7be339298d8
2014-10-02 10:47:26 -07:00
Torrie Fischer
225f8ac12f Merge commit '92b8c7961b433d12d9d77da5d61c26a920bbd370' into updated-rocksdb 2014-10-02 10:47:26 -07:00
Howard Hinnant
1161511207 Fix two Wunused-private-field warnings. 2014-10-01 08:47:56 -07:00
Nicholas Dudfield
ca8eda412e Make travis build and use debug variants for tests 2014-10-01 08:47:56 -07:00
Mark Travis
ec4ec48fb8 Add counters to track nodestore read and write activities. 2014-10-01 08:47:56 -07:00
Tom Ritchford
af7f0b5074 Fix compiler warnings under gcc. 2014-10-01 08:47:55 -07:00
Nik Bougalis
c0b69e8ef7 Remove the use of beast::String from rippled (RIPD-443) 2014-10-01 08:47:55 -07:00
Tom Ritchford
4241dbb600 Clean and harden Transaction.
* Replace boolean parameter with enumerated type.
* Get rid of std::ref.
* 80-column cleanups.
* Replace an std::bin with a lambda.
2014-10-01 08:47:55 -07:00
Tom Ritchford
f54280aaad New DatabaseReader reads ledger numbers from database. 2014-10-01 08:47:55 -07:00
Tom Ritchford
6069400538 Fix compiler warnings under gcc. 2014-10-01 08:47:55 -07:00
Nik Bougalis
78dfb6bcf5 Allow beast::lexicalCast to parse 'true' & 'false' into a bool 2014-10-01 08:47:54 -07:00
Howard Hinnant
616be1d76c Miscellaneous cleanups:
* Limit HashPrefix construction and disallow assignment

* Give KnownFormats deleted copy members so that derived
  classes will give the right answers if queried with the
  std::is_copy_constructible/assignable traits.

* Replace SharedSingleton with a local static in
  LedgerFormats::getInstance() to be consistent with
  similar code in other places.  This also allows the
  LedgerFormats default constructor to be marked private
  so that the compiler enforces the design that
  LedgerFormats is a singleton type.

* Change return types of LedgerFormats::getInstance() and
  TxFormats::getInstance() from pointer to non-const to
  reference to const so as follow more established design
  guidelines for singletons.  This prevents pointers being
  mistaken for heap-allocated objects, and the const
  ensures the singleton isn't mutable.

* Change RippleAddress to inherit privately from
  CBase58Data instead of publicly.  This lets the compiler
  enforce that there are no unintended conversions from
  RippleAddress to CBase58Data.  This change allows us
  to remove a comment warning about unwanted conversions.
2014-10-01 08:47:54 -07:00
Nik Bougalis
8e91ce67c5 Allow beast::lexicalCast to parse 'true' & 'false' into a bool 2014-10-01 08:47:54 -07:00
JoelKatz
c1ecd661c3 Fix broken assert in built/validated ledger mismatch handler 2014-10-01 08:47:54 -07:00
JoelKatz
b27e2aad07 Improve transaction security
* Check signatures of every transaction on every validator
* Remove obsolete code
* Check transaction status in submit/sign RPC handler
2014-10-01 08:47:54 -07:00
MarkusTeufelberger
5ce508e09d Change output range names of ledger_cleaner
The input parameters are called "min_ledger" and "max_ledger", they are also called "minRange" and "maxRange" in the code BUT "ledger_min" and ledger_max" if printed. This is inconsistent and should be changed, as it might lead to confusion on how to call this module via RPC.
2014-10-01 08:47:53 -07:00
Nik Bougalis
3cfa5a41b1 Improve BuildInfo interface:
* Remove unnecessary beast::String dependency
* Explicitly cast to result type while packing a version
* Add unit tests for version formatting
2014-10-01 08:47:53 -07:00
Vinnie Falco
6c072f37ef Remove unused testoverlay module 2014-10-01 08:47:53 -07:00
Nik Bougalis
4640079f55 Use namespaces instead of static-only classes 2014-10-01 08:47:52 -07:00
Nik Bougalis
dbd993ed2b Use namespaces instead of static-only classes 2014-10-01 08:47:52 -07:00
Nik Bougalis
60330da25c Use deleted members to prevent copying in Beast (RIPD-268) 2014-10-01 08:47:52 -07:00
Nik Bougalis
45b5c4ba7a Use deleted members to prevent copying in Beast (RIPD-268) 2014-10-01 08:47:52 -07:00
Nik Bougalis
7933e5d1f9 Use deleted members to prevent copying in rippled (RIPD-268) 2014-10-01 06:28:32 -07:00
Vinnie Falco
01e52e6f9f Use trusted validators median fee
Conflicts:
	src/ripple/app/misc/Validations.cpp
2014-10-01 06:28:32 -07:00
Vinnie Falco
40a955e192 Consume handshake data in HTTP/S server 2014-10-01 06:28:12 -07:00
Vinnie Falco
a8296f7301 Set version to 0.26.3-sp4 2014-09-30 18:04:59 -07:00
Vinnie Falco
590c3b876b Use trusted validators median fee 2014-09-30 18:03:53 -07:00
Vinnie Falco
6dfc805eaa Rewrite HTTP/S server to use coroutines:
* Fix bug with more than one complete request in a read buffer
* Use stackful coroutines for simplified control flow
* Door refactored to detect handshakes
* Remove dependency on MultiSocket
* Remove dependency on handshake detect logic framework
2014-09-30 13:29:32 -07:00
Vinnie Falco
cd97b5beec Remove obsolete SharedArg 2014-09-29 07:18:51 -07:00
Vinnie Falco
5ce6068df5 Remove obsolete SharedArg 2014-09-29 07:18:51 -07:00
Nik Bougalis
bf9b8f4d1b Use secure RPC connections when configured 2014-09-28 04:39:49 -07:00
Vinnie Falco
d618581060 Config improvements:
* More fine-grained Section mutators
* Add remap for mapping legacy single sections to key value pairs
* Add output stream operators for BasicConfig and Section
* Allow section values to be overwritten from command line
* Update rpc key/value configs from command line
* Add RPC::Setup with defaults and remap legacy rpc sections
2014-09-28 04:39:49 -07:00
David Schwartz
2936bbfae8 Make path filtering smarter (RIPD-561)
* Break path liquidity checking into its own function
* Measure initial quality over minimum destination amount
* Test for available liquidity
2014-09-24 11:54:12 -07:00
Nik Bougalis
47b08bfc02 Add --quorum command line argument (RIPD-563) 2014-09-24 11:19:39 -07:00
Nik Bougalis
da4f77ca1f Return correct error message for invalid fields 2014-09-24 11:19:38 -07:00
David Schwartz
1c0a75d467 Distinguish Byzantine failure from tx bug (RIPD-523) 2014-09-24 11:19:38 -07:00
Nik Bougalis
659cf0c221 Decouple LedgerMaster from configuration 2014-09-24 11:19:38 -07:00
Howard Hinnant
430229fd84 Mark several Ledger member functions as const. 2014-09-24 11:19:37 -07:00
Howard Hinnant
81699a0971 Add +DEBUG to the raw version string for DEBUG builds.
This will show up in the rpc server_info command.
There is no impact on the version string for release builds.
2014-09-24 11:19:37 -07:00
MarkusTeufelberger
c54aff74b3 Build gcc.debug using -Og flag
Since gcc 4.8 is required anyways, it might be nice to use its features.

Intro to feature (second bullet point):
https://gcc.gnu.org/gcc-4.8/changes.html

-g (line 328) is still needed:
http://stackoverflow.com/questions/12970596/gcc-4-8-does-og-imply-g
2014-09-24 11:19:37 -07:00
Mark Travis
7f43ab9097 Improvements to SConstruct:
* Default target is release instead of debug (scons with no arguments).
* All targets now include debug symbols, including release.
Rationale: "out of the box" builds of rippled using plain "scons" or "scons -j4" will produce
a debug instead of a release build, which could underperform.
2014-09-24 11:19:36 -07:00
Miguel Portilla
d78f740250 Add account_offers paging (RIPD-344) 2014-09-19 16:38:10 -07:00
Miguel Portilla
cd1bd18a49 Add account_lines paging (RIPD-343) 2014-09-19 16:18:50 -07:00
sublimator
f81b084448 Set page sizes for ledger_data correctly (RIPD-249) 2014-09-19 16:16:49 -07:00
Vinnie Falco
02d9c77402 Set version to 0.26.3-sp2 2014-09-19 11:57:22 -07:00
Howard Hinnant
a0c903c68c Add needed #include <istream>
This is needed for the combination of boost 1.56 and libc++
2014-09-19 10:29:14 -07:00
JoelKatz
6aa325d3da On missing node in consensus, bow out (RIPD-567) 2014-09-18 15:12:45 -07:00
JoelKatz
041f874d4c Improve transaction security
* Check signatures of every transaction on every validator
* Remove obsolete code
* Check transaction status in submit/sign RPC handler
2014-09-18 14:25:09 -07:00
Nik Bougalis
526ecd6a81 Detect invalid inputs during STAmount conversion (RIPD-570):
* More robust validation of input
* XRP may not be specified using fractions
* Prevent creating native amounts larger than max possible value
* Add unit tests to verify correct parsing
2014-09-18 12:46:21 -07:00
Nik Bougalis
30eb927ad4 Templetize and improve beast string-to-integer conversions:
* Properly handle numbers at the edge of precision
* Improve and expand unit test coverage
2014-09-18 12:46:16 -07:00
Nik Bougalis
d373054fc4 Templetize and improve beast string-to-integer conversions:
* Properly handle numbers at the edge of precision
* Improve and expand unit test coverage
2014-09-18 12:46:16 -07:00
Vinnie Falco
b6d9f1d4b2 Add fee voting configuration and docs (RIPD-564) 2014-09-17 12:22:51 -07:00
Vinnie Falco
3fef916972 Move some constants to core/SystemParameters.h 2014-09-17 12:22:49 -07:00
Vinnie Falco
89a51e5b91 Split Section to its own header and add convenience accessors 2014-09-17 12:22:49 -07:00
miguelportilla
f87a6ccc7a Fix missing includes for boost 1.56.0 2014-09-16 15:22:00 -07:00
Nik Bougalis
f65cea66ef Remove unused macros, config variables, and file 2014-09-16 14:15:13 -07:00
Vinnie Falco
4239880acb Clean up and restructure sources 2014-09-16 14:15:12 -07:00
Vinnie Falco
579b1e6f79 Add missing includes and tidy up 2014-09-16 14:03:50 -07:00
Vinnie Falco
1dcd06a1c1 Add missing includes and tidy up 2014-09-16 14:03:50 -07:00
Vinnie Falco
0f30191d10 Refactor STAmount:
* Remove unused functions
* Remove unused constructor
* Use delegating constructors
* Mark some observers deprecated
* Clean up declaration parameter names
* Add checked and unchecked constructors
* De-inline unnecessary inlined functions
* Reorder and regroup members into sections
* Move globals from the unity file to the .cpp
* Change some member functions to be free functions
* Put implementation in one .cpp and the test in another .cpp

Remove unused STAmount constructor and delegate two others No change in functionality.
2014-09-16 07:39:50 -07:00
Vinnie Falco
8fb9d5daaa Set version to 0.26.4-alpha 2014-09-15 18:20:47 -07:00
Nik Bougalis
ed3c942ff1 Inject JobQueue in NetworkOPs 2014-09-15 16:05:01 -07:00
Nik Bougalis
80436d4a8b Cleanups:
* Remove obsolete string formatting function
* Remove unused ADDRESS macro
* Re-scope functions
2014-09-15 16:04:48 -07:00
Howard Hinnant
b5384cc964 Fix beast::http::headers move members 2014-09-15 16:03:36 -07:00
Howard Hinnant
cfc702c766 Fix beast::http::headers move members 2014-09-15 16:03:36 -07:00
Vinnie Falco
146d706343 Add base64 conversions and tests 2014-09-15 14:52:42 -07:00
Vinnie Falco
88ae15ea8e Add base64 conversions and tests 2014-09-15 14:52:42 -07:00
Vinnie Falco
b69ecfe75c Use transform_iterator in http::headers 2014-09-15 14:52:42 -07:00
Vinnie Falco
6bafca7386 Use transform_iterator in http::headers 2014-09-15 14:52:42 -07:00
Vinnie Falco
379e842080 Add BasicConfig simplified config interface 2014-09-15 12:46:04 -07:00
Vinnie Falco
c41ce469d0 Cleanup:
* Move QUALITY_ONE to Quality.h
* Move functional files up one level
* Remove core.h
* Merge routines into Config.cpp
* Rename Section to IniFileSections
* Rename IniFileSections routines
2014-09-15 12:21:36 -07:00
Vinnie Falco
a1ca68473d Merge branch 'release' into develop 2014-09-14 15:39:09 -07:00
Nik Bougalis
3345d03433 Avoid conversions whenever possible during RippleState lookups 2014-09-13 11:06:38 -07:00
Nik Bougalis
81a426608a Make log partitions case-insensitive 2014-09-13 11:06:19 -07:00
Vinnie Falco
2ad6f0a65e Set version to 0.26.3-sp1 2014-09-12 15:22:54 -07:00
Vinnie Falco
ee8bd8ddae Fix handling of HTTP/S keep-alives (RIPD-556):
* Proper shutdown for ssl and non-ssl connections
* Report session id in history
* Report histogram of requests per session
* Change print name to 'http'
* Split logging into "HTTP" and "HTTP-RPC" partitions
* More logging and refinement of logging severities
* Log the request count when a session is destroyed

Conflicts:
	src/ripple/http/impl/Peer.cpp
	src/ripple/http/impl/Peer.h
	src/ripple/http/impl/ServerImpl.cpp
	src/ripple/module/app/main/Application.cpp
	src/ripple/module/app/main/RPCHTTPServer.cpp
2014-09-12 15:19:17 -07:00
Vinnie Falco
319ac14e7d Add is_short_read() 2014-09-12 15:19:04 -07:00
Vinnie Falco
0215a7400d Fix handling of HTTP/S keep-alives (RIPD-556):
* Proper shutdown for ssl and non-ssl connections
* Report session id in history
* Report histogram of requests per session
* Change print name to 'http'
* Split logging into "HTTP" and "HTTP-RPC" partitions
* More logging and refinement of logging severities
* Log the request count when a session is destroyed
2014-09-12 14:20:30 -07:00
Vinnie Falco
02d834e9bb Add is_short_read() 2014-09-12 14:10:33 -07:00
Vinnie Falco
79db0ca7a6 Add is_short_read() 2014-09-12 14:10:33 -07:00
JoelKatz
1a7eafb699 Add ledger cleaner documentation (RIPD-555) 2014-09-09 22:33:42 -07:00
Nik Bougalis
81a06ea6cd Cleanups:
* Remove obsolete config variables
* Reduce coupling
* Use C++11 ownership containers
* Use auto when it makes sense
* Detect edge-case in unit tests
* Reduce the number of LedgerEntrySet public members
2014-09-09 22:33:42 -07:00
Nik Bougalis
e4ecc762c6 Refactor string-to-integer conversions 2014-09-09 21:38:09 -07:00
Nik Bougalis
de4be649ab Refactor string-to-integer conversions 2014-09-09 21:38:09 -07:00
sublimator
4f515adafe Normalize sort paths in Visual Studio project generator 2014-09-08 11:17:40 -07:00
sublimator
d90ec5f06c Normalize sort paths in Visual Studio project generator 2014-09-08 11:17:40 -07:00
Vinnie Falco
32065ced6e Add peer count to HTTP server properties 2014-09-08 11:17:39 -07:00
Scott Schurr
b5224a2227 Improve regularity of STObject and STArray (RIPD-448, RIPD-544):
* reduce duplicated code using templates
* replace BOOST_FOREACH with C++11 for loops
* remove most direct calls to new
* limit line length to 80 characters
* clearly identify virtual and overridden methods
* split STObject and STArray into their own files
* name files after the class they contain
2014-09-05 13:02:07 -07:00
Nik Bougalis
c55777738f Refactor LedgerEntrySet:
* Split adjustOwnerCount to increment and decrement paths.
* Move pathfinding-specific functions out of LedgerEntrySet
* Convert members to free functions
2014-09-05 11:50:17 -07:00
JoelKatz
c72dff5a24 Make more RocksDB tunables
Add support for universal compaction
2014-09-05 11:50:17 -07:00
JoelKatz
6b09e49c08 Increase the size of the tree cache:
This change will not significantly increase memory consumption
because most entries are pinned anyway.
2014-09-05 11:48:00 -07:00
Nik Bougalis
413218c4c4 Create the directory for the debug_logfile (RIPD-551) 2014-09-04 16:51:31 -07:00
Miguel Portilla
16c04b50ee Add date to tx command (RIPD-542) 2014-09-04 16:51:31 -07:00
Nik Bougalis
56c18f7768 Cleanups and fixes (RIPD-532):
* Properly handle sfWalletLocator field
* Plug a tiny memory leak
* Avoid naked pointers
* Remove unused variables
* Other small cleanups
2014-09-04 16:51:31 -07:00
Tom Ritchford
22ca13bc78 Cleanups to RPC code 2014-09-04 16:51:31 -07:00
Nicholas Dudfield
4c7fd18230 Ticket integration tests 2014-09-04 16:51:31 -07:00
Nik Bougalis
39730fc13e Ticket issuing (RIPD-368):
* New CreateTicket transactor to create tickets
* New CancelTicket transactor to cancel tickets
* Ledger entries for tickets & associated functions
* First draft of M-of-N documentation
2014-09-04 16:11:44 -07:00
Nik Bougalis
889c0a0d0f Transactor refactor:
* Allocate transactors on the stack instead of the heap.
* Remove header files and reduce transactor public interface.
2014-09-04 16:11:44 -07:00
Nik Bougalis
4f0a20ec68 Handle whitespace separating an 'ip port' correctly (RIPD-552) 2014-09-04 12:26:27 -07:00
Nik Bougalis
624a803955 Handle whitespace separating an 'ip port' correctly (RIPD-552) 2014-09-04 12:26:27 -07:00
Vinnie Falco
9f5c21f80e Set version to 0.26.3 2014-09-03 16:15:07 -07:00
Nik Bougalis
a3fe089367 Fix missing return value error check 2014-09-02 08:45:19 -07:00
Nik Bougalis
85d5cd3118 Fix missing return value error check 2014-09-01 21:11:31 -07:00
Vinnie Falco
61006e626d Also report mismatched built ledger 2014-08-28 18:03:50 -07:00
Nik Bougalis
15aad1cb24 Optimize pathfinding operations (RIPD-537):
* Calculate and cache Account hashes without holding locks.
* Fast hash-based path element comparison.
* Use emplace instead of find/insert
2014-08-28 15:57:29 -07:00
Tom Ritchford
95c1c5f54e Stream generated JSON. 2014-08-28 12:38:21 -07:00
Vinnie Falco
b12676f701 Fix special members for http classes 2014-08-28 12:38:03 -07:00
Vinnie Falco
c65fb91878 Fix special members for http classes 2014-08-28 12:38:03 -07:00
Vinnie Falco
d5a7e1331e Set version to 0.26.3-rc3 2014-08-27 15:58:41 -07:00
Vinnie Falco
b968821cc1 HTTP message and parser improvements:
* streambuf wrapper supports rvalue move
* message class holds a complete HTTP message
* body class holds the HTTP content body
* headers class holds RFC-compliant HTTP headers
* basic_parser provides class interface to joyent's http-parser
* parser class parses into a message object
* Remove unused http get client free function
* unit test for parsing malformed messages
2014-08-27 18:06:30 -04:00
Vinnie Falco
04bcd93ba3 HTTP(S)-RPC server improvements (RIPD-489, RIPD-533):
* Correct handling of Keep-Alive in socket handlers
* Report session history in print command
2014-08-27 18:06:30 -04:00
Vinnie Falco
f97ef7039a HTTP message and parser improvements:
* streambuf wrapper supports rvalue move
* message class holds a complete HTTP message
* body class holds the HTTP content body
* headers class holds RFC-compliant HTTP headers
* basic_parser provides class interface to joyent's http-parser
* parser class parses into a message object
* Remove unused http get client free function
* unit test for parsing malformed messages
2014-08-27 18:06:30 -04:00
Tom Ritchford
9160b46c1e Bug fixes and new features for LedgerTool:
* Fix RIPD-509, RIPD-514, RIPD-519, RIPD-525, RIPD-527, RIPD-529,
  RIPD-530 and RIPD-531.
* Protect people from ledger-spew and remove cruft.
* Better error messages and handling.
* Cache command lists or clears ledger cache.
* Better ledger summaries.
* Offline mode.
2014-08-27 18:05:44 -04:00
Edward Hennis
aa4b116498 Wrap RippleCalc into a single function (RIPD-500):
* Change public members of Input and Output to remove trailing _.
* Remove Input constructor and separate flags in RippleCalc to reduce
  duplication and confusion.
* Make calculation result private; add getter.
* Narrow scope of some of the results of calls to rippleCalculate.
2014-08-27 18:05:30 -04:00
Edward Hennis
d81154bf6c Add enable_if_lvalue 2014-08-27 17:10:24 -04:00
Edward Hennis
612bb71165 Add enable_if_lvalue 2014-08-27 17:10:24 -04:00
Torrie Fischer
5c67f99ef9 Remove old rocksdb/ 2014-08-27 12:37:13 -07:00
Torrie Fischer
101a4808a0 Update includes and scons 2014-08-27 12:37:05 -07:00
Torrie Fischer
1d38671f5e Squashed 'src/rocksdb2/' content from commit 37c6740
git-subtree-dir: src/rocksdb2
git-subtree-split: 37c6740c383bb9a6ee2747b04f08bc77fcfa10c5
2014-08-27 12:36:50 -07:00
Torrie Fischer
7f25d88f02 Merge commit '1d38671f5edc2322bc58417816674cc629ae7a70' as 'src/rocksdb2' 2014-08-27 12:36:50 -07:00
Vinnie Falco
be830d3dad Set version to 0.26.3-rc2 2014-08-26 10:00:03 -07:00
Nik Bougalis
5bc949d70f Fix a unit test warning 2014-08-26 10:00:03 -07:00
Vinnie Falco
43817bd722 Merge remote-tracking branch 'upstream/release' into tmp 2014-08-26 09:46:29 -07:00
JoelKatz
61623d6d75 Improve parallelization of getRippleLines 2014-08-26 09:28:10 -07:00
David Schwartz
9aad60f56d Make sure we update mTNByID when we replace the root 2014-08-26 09:28:09 -07:00
Vinnie Falco
e7cf3e8084 Add ledger.history.mismatch insight statistic 2014-08-26 09:28:07 -07:00
Tom Ritchford
c7c9a725b8 Compile git tags now include name and branch. (RIPD-493) 2014-08-22 18:10:17 -04:00
Tom Ritchford
e024e7c2ec Compile git tags now include name and branch. (RIPD-493) 2014-08-22 18:10:17 -04:00
Edward Hennis
6fc136ae9a Update npm tests & config to pass in Windows. (RIPD-209)
* Extend timeout for WebSocket test.
* Windows networking doesn't like connecting to 0.0.0.0. Use 127.0.0.1
* Additional command line options in config. Can potentially be used to run rippled in a debugger.
2014-08-22 18:10:17 -04:00
Edward Hennis
2b69ded1ea Convert rvalue to an lvalue. (RIPD-494)
* The rvalue gets destructed as soon as "rc" is constructed.
2014-08-22 18:10:17 -04:00
Tom Ritchford
8dd799aa6f New command line LedgerTool. (RIPD-243)
* Retrieve and process summary or full ledgers.
* Search using arbitrary criteria (any Python function).
* Search using arbitrary formats (any Python function).
* Caches ledgers as .gz files to avoid repeated server requests.
* Handles ledger numbers, ranges, and special names like validated or closed.
2014-08-22 18:10:11 -04:00
Vinnie Falco
83add658f9 Fix warnings and compile errors 2014-08-20 17:44:00 -07:00
Vinnie Falco
7230ef41ee Fix warnings and compile errors 2014-08-20 17:44:00 -07:00
Edward Hennis
a86f0a743c Clean up some docs
* Consistent line endings in rippled-example.cfg
* Rewrite CodingStyle.md. Get down to top priorities
2014-08-20 16:20:15 -07:00
Josh Juran
af75b55ef7 src/README.md: s/addded/added/ 2014-08-20 16:19:28 -07:00
Vinnie Falco
9ecb37dd4f Add validators aged container test 2014-08-20 16:09:52 -07:00
Scott Schurr
cb0e91c602 Use aged containers in Validators module (RIPD-349) 2014-08-20 16:09:51 -07:00
Vinnie Falco
2e3784a914 Tidy up sources 2014-08-20 16:09:51 -07:00
Scott Schurr
019c1af435 Use aged containers in Validators module (RIPD-349) 2014-08-20 16:09:51 -07:00
Vinnie Falco
97d87dff09 Fix exception safety in aged containers 2014-08-20 16:09:50 -07:00
Vinnie Falco
5322955f2b Fix exception safety in aged containers 2014-08-20 16:09:50 -07:00
Howard Hinnant
fe9d77734f Fix move constructor of aged_unordered_container (RIPD-490) 2014-08-20 16:08:59 -07:00
Howard Hinnant
a8ea4ce283 Fix move constructor of aged_unordered_container (RIPD-490) 2014-08-20 16:08:59 -07:00
Mark Travis
c12862f60d Enable heap profiling with jemalloc:
The jemalloc library (which must be downloaded and installed separately)
is required to perform heap profiling. Instructions on how to enable heap
profiling with rippled are available in doc/HeapProfiling.md
2014-08-13 20:36:38 -07:00
Tom Ritchford
e889183fc5 JSON cleanups:
* Fix Json headers to include what they use.
* Get rid of ripple/json/api directory.
2014-08-13 20:36:36 -07:00
Jeff Trull
7be695c6bd Handle changes to boost::optional in newly released boost 1.56:
To improve compatibility with the proposed std::optional a number
of changes were made, one of which is the removal of the implicit
conversion to bool.  As a result, returning boost::optional as a
bool value now fails.  Explicit conversion to bool used for clarity.
2014-08-13 19:00:17 -07:00
Nik Bougalis
956901ae02 Properly handle edge-cases when parsing JSON integers (RIPD-470):
* Properly handle both unsigned and signed integers
* Return parsing error for overlong JSON numbers
* Implement unit test checking the edge cases that are of interest
2014-08-13 18:46:32 -07:00
Nik Bougalis
d562c5b2d5 Account for high-ascii (RIPD-464) 2014-08-13 18:46:32 -07:00
Nik Bougalis
d7b054c3f6 When compiling debug builds with GCC use _FORTIFY_SOURCE=2:
This gcc/glibc feature adds some (supposedly) lightweight checks which can
help detect errors such as buffer overflows.
2014-08-13 18:33:30 -07:00
Tom Ritchford
901ccad0cf Clarify unfunded offer deletion strategy. 2014-08-13 18:33:03 -07:00
Vinnie Falco
b9454e0f0c Set version to 0.26.2 2014-08-12 12:19:13 -07:00
Vinnie Falco
26181907fc Merge branch 'release-next' into release
Conflicts:
	src/ripple/module/app/paths/cursor/ForwardLiquidity.cpp
	src/ripple/overlay/tests/peer_info.test.cpp
	src/ripple/unity/http.h
2014-08-12 12:19:04 -07:00
Miguel Portilla
8368798ad2 Add owner_funds to subscription streams (RIPD-377) 2014-08-12 11:56:07 -07:00
Miguel Portilla
ed597e5e99 Add owner_funds to subscription streams (RIPD-377) 2014-08-12 11:54:49 -07:00
Miguel Portilla
2c88c15f7f Fix unhandled exception in async HTTP server (RIPD-475) 2014-08-12 11:54:02 -07:00
Miguel Portilla
af7cd3cc04 Fix unhandled exception in async HTTP server (RIPD-475) 2014-08-12 11:46:45 -07:00
Howard Hinnant
9552551f9a Refactor SField (RIPD-431)
* Restrict access to SField constructors.
* Make all SField access const.
* Hide and simplify databases used to hold SField constants.
* Separate the two concerns of representing a field,
  and maintaining a database of fields.
2014-08-08 19:16:51 -07:00
Edward Hennis
1c73a0f649 Remove unused code:
* StringConcat was only being referenced by unit test.
* `runall.sh` is no longer needed. Use `npm test` instead.
2014-08-08 19:16:42 -07:00
Tom Ritchford
e3698b2a07 Fix Pathfinder::getPathsOut to use Issue 2014-08-08 19:16:34 -07:00
Tom Ritchford
8b59a2f6b6 Add the git tag to the compile (RIPD-238) 2014-08-08 19:16:33 -07:00
Tom Ritchford
c841f8b360 Add the git tag to the compile (RIPD-238) 2014-08-08 19:16:33 -07:00
Nik Bougalis
0857c6350d Refactor beast::SemanticVersion (RIPD-199) 2014-08-08 14:57:39 -07:00
wltsmrz
50f9b68d61 Bump ledger_wait timeout for Travis 2014-08-08 14:57:39 -07:00
Nik Bougalis
27b48bc16e Refactor beast::SemanticVersion (RIPD-199) 2014-08-08 14:57:39 -07:00
Edward Hennis
bccdbaed2b Update Doxyfile (RIPD-175):
* Clean up the include path to reflect updated code structure.
* Update PROJECT_BRIEF to more accurate title.
* Fix location of logo graphic.
* Hide all undocumented classes.
2014-08-08 14:57:39 -07:00
Nik Bougalis
398095a667 Cleanups and performance optimizations (RIPD-450):
* Remove AccountItems and AccountItem
* Restructure RippleLineCache to not require shared_ptr
* Avoid expensive copies of base_uint<160> in RippleState
2014-08-08 14:57:39 -07:00
Nik Bougalis
80095824b9 Remove obsolete nickname support 2014-08-08 14:57:39 -07:00
Nik Bougalis
d91c1f96cc Detect node store batch write failures (RIPD-270):
* Raise open file limit from the soft max to the hard max.
2014-08-08 14:57:39 -07:00
Howard Hinnant
1c005a0292 Fix macro setting for rocksdb unity file 2014-08-08 14:50:15 -07:00
miguelportilla
c7ced496ac Update rocksdb unity file (RIPD-352) 2014-08-08 15:42:41 -04:00
Vinnie Falco
d4ff18834c Merge commit 'f86d9fd626df1cee55bce4c577d06bb064dc827b' as 'src/rocksdb' 2014-08-08 11:57:41 -07:00
Vinnie Falco
f86d9fd626 Squashed 'src/rocksdb/' content from commit 224932d
git-subtree-dir: src/rocksdb
git-subtree-split: 224932d4d0
2014-08-08 11:57:41 -07:00
Vinnie Falco
854604f724 Remove rocksdb in preparation for subtree add 2014-08-08 11:57:29 -07:00
Vinnie Falco
cfd3642cb1 Set version to 0.26.2-alpha-4 2014-08-07 17:13:55 -07:00
Tom Ritchford
f493590604 Logic fix for multiquality issues. 2014-08-07 17:10:38 -07:00
Vinnie Falco
8c084a3de8 Set version to 0.26.2-alpha-3 2014-08-07 10:13:22 -07:00
Tom Ritchford
985aa803a4 Fix error with multi-quality paths. 2014-08-07 10:12:09 -07:00
Vinnie Falco
9e319d7bd6 Set version to 0.26.2-alpha-2 2014-08-06 10:16:13 -07:00
David Schwartz
a122e176d7 Pathfinding fixes:
* Don't consider global freeze if not enforcing
 * Log if a covering path fails to cover
2014-08-06 10:16:12 -07:00
Tom Ritchford
88a6f2931e Fix local variable unfundedOffers that was shadowing a class variable. 2014-08-06 09:26:22 -07:00
Vinnie Falco
bf403a6142 Fix missing return values in headers_t 2014-08-05 16:43:13 -07:00
Vinnie Falco
54f3a83e25 Fix missing return values in headers_t 2014-08-05 16:43:13 -07:00
Vinnie Falco
0955c0d8d3 Set version to 0.26.2-alpha-1 2014-08-05 15:40:34 -07:00
JoelKatz
6bb5be5216 Avoid a mutex 99+% of the time in SField::getField 2014-08-05 15:36:12 -07:00
JoelKatz
c9cd7e4be0 Rewrite STObject::setType for improved performance 2014-08-05 15:36:05 -07:00
Miguel Portilla
ce2cecf046 Add owner_funds to client subscription data (RIPD-377)
Conflicts:
	src/ripple/module/app/ledger/AcceptedLedger.cpp
2014-08-05 15:04:50 -07:00
Vinnie Falco
6e934ee6a1 HTTP handshake in peer protocol (RIPD-351):
* New I/O paths for client and server role
* New handshake_analyzer detects the peer protocol
* New basic_message class for parsing and storing HTTP messages
* Conditional compilation for selective feature enabling.
* Server supports both current handshake and HTTP handshake
2014-08-05 13:17:02 -07:00
Vinnie Falco
5b8bb822ba HTTP support improvements:
* RFC2616 compliance
* Case insensitive equality, inequality operators for strings
* Improvements to http::parser
* Tidy up HTTP method enumeration
2014-08-05 13:17:01 -07:00
Vinnie Falco
723d7d1263 HTTP support improvements:
* RFC2616 compliance
* Case insensitive equality, inequality operators for strings
* Improvements to http::parser
* Tidy up HTTP method enumeration
2014-08-05 13:17:01 -07:00
Scott Schurr
df32f27762 Improvements to aged_containers (RIPD-363)
- Added unit tests for element erase
- Added unit tests for range erase
- Added unit tests for touch
- Added unit tests for iterators and reverse_iterators
- Un-inlined operator== for unordered containers
- Fixed minor problems with ordered_container erase()
- Made ordered_container...
  - erase (reverse_iterator pos) not compile
  - erase (reverse_iterator first, reverse_iterator last) not compile
  - touch (reverse iterator pos) not compile
- Verified that ordered container...
  - insert() already rejects reverse_iterator
  - emplace_hint() already rejects reverse_iterator
- Made set/multiset iterators const

Regarding the set/multiset iterators, see section 1.5 of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf
as pointed out by Vinnie.
2014-08-04 15:25:30 -07:00
Scott Schurr
298572893e Improvements to aged_containers (RIPD-363)
- Added unit tests for element erase
- Added unit tests for range erase
- Added unit tests for touch
- Added unit tests for iterators and reverse_iterators
- Un-inlined operator== for unordered containers
- Fixed minor problems with ordered_container erase()
- Made ordered_container...
  - erase (reverse_iterator pos) not compile
  - erase (reverse_iterator first, reverse_iterator last) not compile
  - touch (reverse iterator pos) not compile
- Verified that ordered container...
  - insert() already rejects reverse_iterator
  - emplace_hint() already rejects reverse_iterator
- Made set/multiset iterators const

Regarding the set/multiset iterators, see section 1.5 of
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2913.pdf
as pointed out by Vinnie.
2014-08-04 15:25:30 -07:00
Mark Travis
405f6f7368 Make NetworkOPs::isFull() thread-safe 2014-08-04 11:19:07 -07:00
Tom Ritchford
648ccc7c17 Replace const Type& with Type const& for common types.
* std::string
* RippleAccount
* Account
* Currency
* uint256
* STAmount
* Json::Value
2014-08-04 11:18:44 -07:00
Mark Travis
f5afe0587f Fix filter_policy object leak in NodeStore backends 2014-08-04 11:16:44 -07:00
Tom Ritchford
91a227a475 Correct Pathfinder::getPaths out to handle order books (RIPD-427) 2014-08-02 10:38:57 -07:00
Tom Ritchford
4b905fe9ff Clean OrderBookDB::getBooksBy methods. 2014-08-02 10:38:57 -07:00
Howard Hinnant
0f409b7bec ASCII clean 2014-08-02 10:38:56 -07:00
Vinnie Falco
295c8de858 Detect inconsistency in PeerFinder self-connects (RIPD-411) 2014-07-31 16:10:54 -07:00
Nik Bougalis
e5252f90af Remove LedgerBase and decongest Ledger locks 2014-07-31 16:05:08 -07:00
Miguel Portilla
c2276155bf Add pubkey_node and hostid to server stream messages (RIPD-407) 2014-07-31 16:05:08 -07:00
Miguel Portilla
dbe49bcd87 Remove TRUST_NETWORK directive (RIPD-331) 2014-07-31 16:04:59 -07:00
David Schwartz
7b936de32c Freeze enforcing: (RIPD-399)
* Set enforce date: September 15, 2014
 * Enforce in stand alone mode
 * Enforce at source
 * Enforce intermediary nodes
 * Enforce global freeze in get paths out
 * Enforce global freeze in create offer
 * Don't consider frozen links a path out
 * Handle in getBookPage
 * Enforce in new offer transactors
2014-07-30 23:28:48 -07:00
evhub
ee570a49d0 More fixes to VSProject sorting algorithm 2014-07-30 08:56:54 -07:00
evhub
9eb34f542c More fixes to VSProject sorting algorithm 2014-07-30 08:56:54 -07:00
Tom Ritchford
194304e544 Refactor RippleCalc:
* Rationalize method and filenames, move to subdirectory.
* Use Issue in Node.
* Restrict access to PathState variables.
* Line length and readability cleanups.
* New PathCursor stores path calculation data during rippleCalc.
* Extract methods PathCursor::node(), PathCursor::previousNode()
  and RippleCalc::addPath
2014-07-30 08:29:29 -07:00
Howard Hinnant
c59fc332d5 Make CBase58Data/RippleAddress movable (RIPD-428):
This significantly increases the performance in returning
these types from factory functions.
2014-07-30 07:25:24 -07:00
Nik Bougalis
b43832fe57 Use std::atomic 2014-07-29 21:50:58 -04:00
Howard Hinnant
c24a497a23 Further documentation improvements to Ledger Consensus. 2014-07-29 21:41:19 -04:00
Tom Ritchford
4096fcd1bf Reduce scope of RPC locks and general cleanup (RIPD-458) 2014-07-29 16:24:44 -04:00
Vinnie Falco
9a0e806f78 Set version to 0.26.1 2014-07-28 12:05:01 -07:00
Vinnie Falco
20c9632996 Enable asynchronous handling of HTTP-RPC (RIPD-390)
* Activate async code path
* Tidy up HTTP server code
* Use shared_ptr in HTTP server
* Remove check for unspecified IP
* Remove hairtrigger
* Fix missing HTTP authorization check
* Fix multisocket flags in RPC-HTTP server
* Fix authorization failure when no credentials required
* Addresses RIPD-159, RIPD-161, RIPD-390
2014-07-28 12:05:01 -07:00
Vinnie Falco
65a628ca88 Add HTTPHeaders::build_map 2014-07-28 12:05:00 -07:00
Vinnie Falco
d82dbba096 Make bind_handler variadic ctor explicit 2014-07-28 12:05:00 -07:00
Howard Hinnant
58547f6997 Tidy up hardened containers (RIPD-380):
* Rename hardened containers for clarity
* Fixes https://ripplelabs.atlassian.net/browse/RIPD-380
2014-07-28 09:06:35 -07:00
Howard Hinnant
6a1071ccd3 Tidy up hardened_hash:
* Added siphash as a HashAlgorithm
* Refactored class responsibilities
2014-07-28 09:06:22 -07:00
Howard Hinnant
e6f4eedb1e Tidy up hardened_hash:
* Added siphash as a HashAlgorithm
* Refactored class responsibilities
2014-07-28 09:06:22 -07:00
Vinnie Falco
11d667c830 Fix intrinsic calls in static_initializer 2014-07-28 09:04:41 -07:00
Vinnie Falco
c5b963141f Fix intrinsic calls in static_initializer 2014-07-28 09:04:41 -07:00
Nik Bougalis
5df40bd746 Fix auth handling during OfferCreate (RIPD-414) 2014-07-28 08:57:22 -07:00
Howard Hinnant
403f15dc48 Documentation for Ledger Consensus implementation (RIPD-405) 2014-07-28 08:56:23 -07:00
Nik Bougalis
704d7451a0 Fix auth handling during OfferCreate (RIPD-414) 2014-07-25 11:42:42 -07:00
Vinnie Falco
fa11071443 Enable asynchronous handling of HTTP-RPC (RIPD-390)
* Activate async code path
* Tidy up HTTP server code
* Use shared_ptr in HTTP server
* Remove check for unspecified IP
* Remove hairtrigger
* Fix missing HTTP authorization check
* Fix multisocket flags in RPC-HTTP server
* Fix authorization failure when no credentials required
* Addresses RIPD-159, RIPD-161, RIPD-390
2014-07-24 20:22:55 -07:00
Vinnie Falco
cc11b498cc Add HTTPHeaders::build_map 2014-07-24 20:18:51 -07:00
Vinnie Falco
87351c8a0c Add HTTPHeaders::build_map 2014-07-24 20:18:51 -07:00
Vinnie Falco
ca71f18a6d Make bind_handler variadic ctor explicit 2014-07-24 20:18:51 -07:00
Vinnie Falco
2f5fb1e68e Make bind_handler variadic ctor explicit 2014-07-24 20:18:51 -07:00
Tom Ritchford
6b79b5fc74 Fix build warnings and .gitignore.
* Comment out unused local function for both clang and g++.
* Get rid of numerous Boost warnings for clang.
* Remove some unused local variables.
* Put TAGS into the .gitignore.
2014-07-24 20:18:51 -07:00
Tom Ritchford
96e1ec6d31 Fix build warnings and .gitignore.
* Comment out unused local function for both clang and g++.
* Get rid of numerous Boost warnings for clang.
* Remove some unused local variables.
* Put TAGS into the .gitignore.
2014-07-24 20:18:51 -07:00
Nik Bougalis
ac3cf05f1a Properly order warning suppression flags during compile 2014-07-24 20:18:51 -07:00
Tom Ritchford
6335e34395 Simplify locking and move a typedef.
* Make DatabaseCon's lock private and expose a scoped lock_guard.
* Get rid of DeprecatedRecursiveMutex and DeprecatedScopedLock entirely.
* Move CancelCallback to Job where it logically belongs.
2014-07-23 19:38:52 -07:00
Scott Schurr
02c2029ac1 Add more documentation of ledger acquisition (RIPD-373)
Capturing information from a seminar on the topic into the source tree.
2014-07-23 19:29:13 -07:00
David Schwartz
6914aa3e27 Check for payment increments that make no progress. (RIPD-374) 2014-07-23 19:27:55 -07:00
David Schwartz
f4fcb1cc9a Remove some dead SHAMapMissingNode code 2014-07-23 19:27:50 -07:00
David Schwartz
b6eec21ec0 Pathfinder cleanups, more efficient 'd' handling (RIPD-156) 2014-07-23 19:27:46 -07:00
David Schwartz
0ce3aeb189 Stop finding paths when enough are found (RIPD-156) 2014-07-23 19:27:42 -07:00
Nicholas Dudfield
713c8efcbe Fix intermittently failing send test 2014-07-23 02:27:19 -07:00
Vinnie Falco
9fa5e39872 Set version to 0.26.0 2014-07-22 09:59:45 -07:00
Vinnie Falco
ace53fa405 Set version to 0.26.0-rc2 2014-07-21 10:39:48 -07:00
Vinnie Falco
3c06980107 Merge branch 'release' into develop 2014-07-21 10:25:23 -07:00
Vinnie Falco
1f26fbb5af Set version to 0.26.0-rc1 2014-07-21 10:00:16 -07:00
Howard Hinnant
84c6622122 Fix bugs, typo in SHAMapNodeID 2014-07-18 17:45:51 -07:00
Miguel Portilla
63f099f2f6 Fix book_offers limit parameter (RIPD-295)
Conflicts:
	src/ripple/module/app/misc/NetworkOPs.cpp
2014-07-18 10:37:45 -07:00
Nicholas Dudfield
373ce72984 Update freeze tests
* Conditionally skip freeze enforcement tests
* Honour remote.fee_cushion setting
* Workaround ripple-lib regression
* Don't use mocha features from wrong version
2014-07-18 10:35:06 -07:00
JoelKatz
4cf29455e4 Freeze flags: (RIPD-394)
* Define all flags
 * Set/clear bits in transactors
 * Frozen line counts towards reserve, is non-default
 * Report trust line state
2014-07-18 10:35:06 -07:00
David Schwartz
07db5d497c Remove SHAMapNodeID from SHAMapTreeNode (RIPD-347)
This resolves the "right data, wrong ID" issue in the
tree node cache.
2014-07-18 10:35:06 -07:00
JoelKatz
f1bb0afc4e Improve transaction fee and execution logic (RIPD-323):
* tecINSUFF_FEE if balance doesn't cover fee
* Ensure transaction recovery is deterministic
* Reduce transaction retries
2014-07-18 10:35:06 -07:00
Vinnie Falco
d791fe3013 Fix msvc static initialization in SHAMapNodeID 2014-07-17 20:05:39 -07:00
Miguel Portilla
c16e22a5c6 Fix book_offers limit parameter (RIPD-295) 2014-07-17 18:01:20 -07:00
Miguel Portilla
db7a720445 Fix static initializers in RippleSSLContext (RIPD-375) 2014-07-17 18:01:19 -07:00
Miguel Portilla
df24ae0fbb Workaround gcc bug with static_initializer default ctor 2014-07-17 18:00:43 -07:00
Miguel Portilla
6c09a02099 Workaround gcc bug with static_initializer default ctor 2014-07-17 18:00:43 -07:00
Howard Hinnant
1b3356cafd Remove calls to SHAMapNode::getID (RIPD-347):
Calls in SHAMap::getCache and SHAMap::canonicalize are
purposefully left in place at this time (to be removed
later).
2014-07-17 15:58:03 -07:00
Scott Schurr
5869902f2c Tidy up Resource::Manager (RIPD-362):
* Style improvements
* More documentation
2014-07-17 14:18:18 -07:00
Howard Hinnant
28898031f0 Eliminate spurious SHAMap::getFetchPack failure (RIPD-379) 2014-07-17 10:38:07 -07:00
Vinnie Falco
1ce0f94638 Define OPENSSL_NO_SSL2 2014-07-17 10:18:37 -07:00
Vinnie Falco
b74cdb2f9d Fix static_initializer: …
* Prevents double construction, invalid access
* Unit test works on MSVC and non MSVC
2014-07-16 16:43:17 -07:00
Vinnie Falco
f876ad973f Fix static_initializer: …
* Prevents double construction, invalid access
* Unit test works on MSVC and non MSVC
2014-07-16 16:43:17 -07:00
Tom Ritchford
6014b13234 Use Books in Ledger. 2014-07-15 21:16:42 -07:00
Vinnie Falco
bb730c00e9 Support stream composition of testcase names 2014-07-15 18:23:01 -07:00
Vinnie Falco
3e9c702c47 Support stream composition of testcase names 2014-07-15 18:23:01 -07:00
Vinnie Falco
3ff919ccf1 Fix version to say 'rippled' 2014-07-15 13:03:40 -07:00
evhub
7a92ac91d0 Fix VSProject item sorting (again)
Conflicts:
	src/beast/site_scons/site_tools/VSProject.py
2014-07-15 12:51:57 -07:00
evhub
8dc0844c79 Fix VSProject item sorting (again)
Conflicts:
	src/beast/site_scons/site_tools/VSProject.py
2014-07-15 12:51:57 -07:00
David Schwartz
a2764b68ca Rate-limit SSL client renegotiation (RIPD-360) 2014-07-14 10:42:29 -07:00
Tom Ritchford
bbbae072ea Simplify initialization of Pathfinder using C++11 constructs. 2014-07-14 10:04:27 -07:00
evhub
e68b989af5 Fix VSProject item sorting:
* Use object type in the sort key
* Call _key recursively over containers
* Prevent passing of iterators to xsorted
* Fix VSProject generator with new sorting
2014-07-14 10:04:07 -07:00
evhub
b4735b5931 Fix VSProject item sorting:
* Use object type in the sort key
* Call _key recursively over containers
* Prevent passing of iterators to xsorted
* Fix VSProject generator with new sorting
2014-07-14 10:04:07 -07:00
Tom Ritchford
418638ad16 Serialization code improvements:
* Add generics to eliminate duplicate code in STHash
* Use generics in Serializer and callers
2014-07-11 12:00:49 -07:00
Scott Schurr
9fb09d3109 Pass and use time_point in DecayingSample ctor (RIPD-359)
Switches a number of places in Resource::Logic to use abstract_clock::now()
which returns a time_point.  Unfortunately Resource::Logic tracks time
locally also, but with ints, not time_point.  So Resource::Logic uses a
delicate mix of abstract_clock::now() and abstract_clock::elapsed() with
this commit.  That inconsistency could be addressed in a second commit.
2014-07-11 12:00:39 -07:00
Tom Ritchford
fd27bcd7ee Various tidying:
* Fix unused variable warnings.
* Clean unused items from TER.
* Improvement to LES use of shared_ptr.
2014-07-10 15:11:33 -07:00
Tom Ritchford
d7e08f96a5 Various tidying:
* Fix unused variable warnings.
* Clean unused items from TER.
* Improvement to LES use of shared_ptr.
2014-07-10 15:11:33 -07:00
JoelKatz
4d49d272eb Fix account_tx resume (RIPD-314) 2014-07-10 15:11:33 -07:00
JoelKatz
faa6890950 Find 'sabfd' paths (RIPD-335)
This permits USD/GW1 to be bridged to USD/GW2 by BTC/GW3 or
USD/GW1 to be bridged to BTC/GW2 by CNY/GW3.
2014-07-10 15:11:33 -07:00
David Schwartz
9c390f6da4 Impose a local limit on path lengths (RIPD-350) 2014-07-10 15:09:06 -07:00
Scott Schurr
6842277977 Add documentation for ledger entries (RIPD-361) 2014-07-10 15:08:07 -07:00
Mark Travis
ddf68d464d Set version to 0.25.2 2014-07-07 12:41:46 -07:00
JoelKatz
b2f19e8dc6 Find 'sabfd' paths
This permits USD/GW1 to be bridged to USD/GW2 by BTC/GW3 or
USD/GW1 to be bridged to BTC/GW2 by CNY/GW3. See RIPD-335.
2014-07-07 12:41:46 -07:00
David Schwartz
5714b42975 Impose a local limit on path lengths 2014-07-07 11:42:24 -07:00
David Schwartz
c4e9c49c10 Set version to 0.25.2-rc2 2014-07-07 11:33:26 -07:00
Mark Travis
9210efb051 In JSON, output unprintable currency codes as hex 2014-07-07 11:33:26 -07:00
Tom Ritchford
b9f1b05625 Use swapWith to save CPU; edit comment. 2014-07-07 11:33:26 -07:00
sublimator
828c2e3c71 Restore checkpointed ledger under all paths in PathFind. 2014-07-07 11:33:12 -07:00
Nik Bougalis
10150a7352 Patch Boost to suppress warnings on clang 2014-07-06 15:17:58 -07:00
Scott Schurr
baaa45f8c7 SHAMap Documentation 2014-07-06 14:57:59 -07:00
Tom Ritchford
322af30d6a Pathfinding Documentation 2014-07-06 14:57:59 -07:00
Tom Ritchford
206efbf30d Rename RippleAsset to Issue and RippleBook to Book:
* Split STAmount out of SerializedTypes.h
* New concept of "Issue consistency": when either both or neither of its
  currency and account are XRP.
* Stop checking for consistency of Issue in its constructor.
* Clarification of mIsNative logic in STAmount.
* Usual cleanups.
2014-07-06 14:57:59 -07:00
Tom Ritchford
a96dee85d2 Remove recursions from computeLiquidity 2014-07-06 14:57:58 -07:00
Vinnie Falco
d307568cbc Update rocksdb unity file 2014-07-03 17:49:17 -07:00
Vinnie Falco
0ee27b143c Merge commit '7bfb4a9ba5a2822f7d9ef7122b1388aea4be9404' as 'src/rocksdb' 2014-07-03 17:49:00 -07:00
Vinnie Falco
7bfb4a9ba5 Squashed 'src/rocksdb/' content from commit 78b8a7d
git-subtree-dir: src/rocksdb
git-subtree-split: 78b8a7d908
2014-07-03 17:49:00 -07:00
Vinnie Falco
110c73fc8d Remove rockdb subtree 2014-07-03 17:43:48 -07:00
Vinnie Falco
424d9b8385 Add preliminary Structured Overlay docs 2014-07-03 14:34:38 -07:00
Vinnie Falco
1b48ccc868 Fix base log partition severity 2014-07-03 11:57:14 -07:00
Howard Hinnant
f5eb22253d Remove boost::hash_value() overloads.
This addresses https://ripplelabs.atlassian.net/browse/RIPD-102
2014-07-02 15:33:11 -07:00
Howard Hinnant
fac82204b6 Remove boost::hash_value() overloads.
This addresses https://ripplelabs.atlassian.net/browse/RIPD-102
2014-07-02 15:33:11 -07:00
David Schwartz
61f114e655 Cleanup confusion of ledger base versus ledger header
The "ledger header" is the chunk of data that hashes to the
ledger's hash. It contains the sequence number, parent hash,
hash of the previous ledger, hash of the root node of the
state tree, and so on.

The term "ledger base" refers to a particular type of query
and response used in the ledger fetch process that includes
the ledger header but may also contain other information
such as the root node of the state tree.
2014-07-02 15:33:10 -07:00
MarkusTeufelberger
24410bf1bb Update Sconstruct 2014-07-01 19:12:47 -07:00
Vinnie Falco
aa24969eee Add README.md for ledger process 2014-07-01 12:42:41 -07:00
David Schwartz
a5297d13c4 Add new memo restrictions 2014-07-01 12:13:47 -07:00
David Schwartz
b06bdb83cb Fix a case where we put an extra node in the SHAMapDiff 2014-07-01 12:13:13 -07:00
David Schwartz
d06092212f Tighten up some serialization checks 2014-06-30 16:53:38 -07:00
David Schwartz
914778eae1 In JSON, output unprintable currency codes as hex 2014-06-30 16:40:53 -07:00
Nicholas Dudfield
e14c700c60 New integration tests:
* New tests for autobridging and freeze
* Discrepancy detection tests
* Don't let Mocha suppress load time errors
2014-06-28 18:27:33 -07:00
wltsmrz
0848e348bb Update ripple-lib integration tests 2014-06-28 13:17:31 -07:00
Vinnie Falco
3d5ae42660 Structured Overlay support:
* Add Peer Protocol detector
* Add RIPPLE_SINGLE_IO_SERVICE_THREAD setting
* Preliminary HTTP header parsing logic (disabled)
2014-06-26 18:24:50 -07:00
Vinnie Falco
0c5c901222 Improvements to HTTP parsing 2014-06-26 17:41:12 -07:00
Vinnie Falco
f207b6b4c9 Improvements to HTTP parsing 2014-06-26 17:41:12 -07:00
David Schwartz
ed2c5078ad Tighten up some serialization checks 2014-06-26 17:16:34 -07:00
sublimator
aec792f5b8 Restore checkpointed ledger under all paths in PathFind. 2014-06-26 17:16:34 -07:00
Nik Bougalis
17d64de3d5 During playback close ledger before accepting 2014-06-26 17:16:34 -07:00
Tom Ritchford
f6bea08535 Update state during pathfinding 2014-06-26 17:16:33 -07:00
Tom Ritchford
feab6c39b3 New types Account, Currency, Directory:
* New tagged uint types.
* Extract to_string functions from header to hide dependencies.
* Include what you use and C++11 for cleanups.
2014-06-26 17:16:30 -07:00
Nik Bougalis
e999c76882 Autobridging:
* Remove legacy OfferCreate transactor
* Misc. cleanups on LedgerEntrySet
* Fix a subtle bug with arithmetic operations on Quality
* Sanity check offers after taking
2014-06-26 12:03:52 -07:00
Miguel Portilla
0a93f8db22 Add ASIO strand to StatsDCollector 2014-06-26 12:03:51 -07:00
Miguel Portilla
686cc599a2 Add ASIO strand to StatsDCollector 2014-06-26 12:03:51 -07:00
Vinnie Falco
875f4c87ff Fix bug in VSProject when no LIBPATH in env 2014-06-26 12:03:51 -07:00
Vinnie Falco
92983556a0 Fix bug in VSProject when no LIBPATH in env 2014-06-26 12:03:51 -07:00
Scott Schurr
837872c3f3 Move static treeNodeCache from SHAMap to the Application
These changes address two JIRA issues:

 - 291 unittest reported leaked objects
 - 292 SHAMap::treeNodeCache should be a dependency injection

The treeNodeCache was a static member of SHAMap.  It's now a
non-static member of the Application accessed through
getTreeNodeCache().  That addressed JIRA 291

The SHAMap constructors were adjusted so the treeNodeCache is
passed in to the constructor.  That addresses JIRA 292,  It required
that any code constructing a SHAMap needed to be edited to pass
the new parameter to the constructed SHAMap.

In the mean time, SHAMap was examined for dead/unused code and
interfaces that could be made private.  Dead and unused interfaces
were removed and methods that could be private were made private.
2014-06-26 11:10:51 -07:00
Tom Ritchford
55222dc5d1 New types Account, Currency, Directory:
* New tagged uint types.
* Extract to_string functions from header to hide dependencies.
* Include what you use and C++11 for cleanups.
2014-06-24 11:11:25 -07:00
Howard Hinnant
7b4c705a3f Improve Journal logging framework:
* Allow partition log levels to be adjusted
* Cleanups
2014-06-23 20:19:53 -07:00
David Schwartz
adce6ae851 Ledger loading cleanups:
* Fix close time settings for ledger load
* More info in ledger_request and inbound ledger JSON replies
2014-06-23 20:19:53 -07:00
Howard Hinnant
9dc32cb791 SHAMap refactoring:
* Rename SHAMapNode to SHAMapNodeID.
* Cleanups
2014-06-23 20:19:53 -07:00
Howard Hinnant
23dc08c925 Improve Journal logging framework:
* Allow partition log levels to be adjusted
* Cleanups
2014-06-23 20:19:53 -07:00
Vinnie Falco
b11e857148 Fix case-sensitivity for NOLOGO in booltable 2014-06-18 17:04:31 -07:00
Vinnie Falco
488a44b88e Fix case-sensitivity for NOLOGO in booltable 2014-06-18 17:04:31 -07:00
evhub
530bdf975e Fix VSProject generation issues with SConstruct:
* Always describe the Visual Studio targets
* Prevent checking nonexistant enviro vars
* Prevent pkg-config protobuf env vars if not clang/gcc
* Don't use any pkg-config enviro vars unless clang/gcc
* Make all VSProject/config directories windows-style
* Prevent beastobjc.mm from showing up in vcxproj
* Remove duplicate \src\protobuf\src
* Consistent quoting
2014-06-18 16:41:34 -07:00
evhub
0568a40d8d Fixes to VSProject generator:
* Canonical sorting for all platforms
* Fix incorrect path separator
* Filter predefined duplicate environment switches
2014-06-18 16:38:26 -07:00
evhub
d7a6627a1f Fixes to VSProject generator:
* Canonical sorting for all platforms
* Fix incorrect path separator
* Filter predefined duplicate environment switches
2014-06-18 16:38:26 -07:00
Vinnie Falco
d6066183b9 Refactor Overlay for Structured Network support:
* Move overlay up one directory
* Add abstract_protocol_handler, message_stream
* Add peer_protocol_detector
* Tidy up some declarations
* Use strand::running_in_this_thread instead of bool
* Update README.md
* Replace protocol message read loop:
  - Process data in arbitrary size chunks
  - message_stream extracts individual messages
  - peer_protocol_detector identifies the handshake
  - abstract_protocol_handler used for dispatching messages
* Remove unused protocol message types:
  - mtACCOUNT
  - mtCONTACT
  - mtERROR
  - mtGET_ACCOUNT
  - mtGET_CONTACTS
  - mtGET_VALIDATIONS
  - mtSEARCH_TRANSACTION
  - mtUNUSED_FIELD

Conflicts:
	src/ripple/module/app/main/Application.cpp
	src/ripple/module/app/misc/NetworkOPs.cpp
	src/ripple/module/app/peers/PeerSet.cpp
2014-06-18 15:17:18 -07:00
Vinnie Falco
94dea7c06f Add missing beast includes 2014-06-18 14:07:18 -07:00
Vinnie Falco
3e2c3ba035 Add missing beast includes 2014-06-18 14:07:18 -07:00
Tom Ritchford
e24cba8c35 Better types and more comments in RippleCalc.
* Better automatic conversions to and from tagged uint160 varints.
* Start using tagged variants of uint160 for Currency, Account.
* Comments from 2014/6/11 RippleCalc session.
2014-06-18 12:38:06 -07:00
Tom Ritchford
a23013abc1 Tidy up rpc module:
* Move directory up to ripple/module/rpc
* Use C++11 idioms and best practices
2014-06-18 12:37:53 -07:00
evhub
8cd2ba48fc Process switches with regex in VSProject generator:
* Handles "DisableSpecificWarnings" switches
2014-06-16 19:01:28 -07:00
evhub
27a4f44de5 Process switches with regex in VSProject generator:
* Handles "DisableSpecificWarnings" switches
2014-06-16 19:01:28 -07:00
Vinnie Falco
4e07dbbefc Fix state check in PeerImp::recvHello 2014-06-16 18:14:25 -07:00
David Schwartz
dcf4ad2c21 Ledger load and ledger replay fixes:
* Stash the loaded ledger where consensus can find it.
 * When loading a ledger for startup, try the backend too
 * Apply replay transactions to a mutable snapshot
2014-06-16 17:29:11 -07:00
Nik Bougalis
04dd861fe3 Cleanup:
* Remove is_bit_set and use regular bitwise operations instead.
* Remove the function-like macro "nothing".
2014-06-16 17:29:11 -07:00
Vinnie Falco
c8ee6c6f6d Use std::thread instead of boost::thread 2014-06-16 16:18:10 -07:00
Vinnie Falco
9d819b95bf Fix MSVC workaround in basic_seconds_clock 2014-06-16 16:18:09 -07:00
Vinnie Falco
a57e4263d7 Fix MSVC workaround in basic_seconds_clock 2014-06-16 16:18:09 -07:00
Vinnie Falco
d26dadd9d8 Add static_initializer 2014-06-16 16:18:09 -07:00
Vinnie Falco
3d58f0d941 Add static_initializer 2014-06-16 16:18:09 -07:00
Vinnie Falco
a52c9232c4 Tidy up basics module:
* Move directory up
* Remove unity includes and "include what you use"
2014-06-15 18:51:05 -07:00
Vinnie Falco
55ca9fb090 Remove ScopedPointer, ContainerDeletePolicy 2014-06-15 18:35:12 -07:00
Vinnie Falco
7a059c7a73 Remove ScopedPointer, ContainerDeletePolicy 2014-06-15 18:35:12 -07:00
Vinnie Falco
58ec5d5afe Tidy up includes:
* Replace boost with std equivalents:
  - bind, ref, cref, function, placeholders
* More "include what you use"
* Remove unnecessary includes
2014-06-15 18:26:50 -07:00
Vinnie Falco
506910147f Tidy up includes:
* Replace boost with std equivalents:
  - bind, ref, cref, function, placeholders
* More "include what you use"
* Remove unnecessary includes
2014-06-15 18:26:50 -07:00
Vinnie Falco
cf3eb24eb0 Move nodestore to its own module 2014-06-15 12:50:44 -07:00
Vinnie Falco
c00a976ff6 Add missing beast includes 2014-06-15 12:37:52 -07:00
Vinnie Falco
d965b23b2a Add missing beast includes 2014-06-15 12:37:52 -07:00
Vinnie Falco
f660743065 Remove unused SHAMap::getItem 2014-06-13 14:00:17 -07:00
David Schwartz
4559bd9030 Improve the way we declare a close time consensus 2014-06-12 10:20:48 -07:00
David Schwartz
3ac98fb101 SyncUnorderedMap cleanup 2014-06-12 10:14:47 -07:00
David Schwartz
aff52db289 Re-use the serializer 2014-06-12 10:14:47 -07:00
David Schwartz
ea27dfe08d Find 'sbfd' paths. 2014-06-12 09:41:52 -07:00
Tom Ritchford
27620af1bf Further cleanups of RippleCalc.
* Rename many variables.
* Make most of PathState private.
* Extract out common Node::isAccount() code.
* Rename bConsumed to allLiquidityConsumed_.
* Extract out code into PathState::clear().
2014-06-09 12:57:26 -07:00
Tom Ritchford
bf116308d4 Add newer validators to validators-example.txt 2014-06-09 12:41:27 -07:00
Tom Ritchford
3fb27d98ab Clean up LookupLedger and resolve issue 278.
* Use beast::zero to resolve issue 278.
* Rename variables and simplify logic.
* Restrict to 80 columns.
2014-06-09 12:40:38 -07:00
Tom Ritchford
7e45c17730 Rename ledger_get to ledger_request. 2014-06-09 12:37:24 -07:00
Tom Ritchford
626533d4a7 Clean up RPC messages from Main 2014-06-09 12:37:23 -07:00
Tom Ritchford
39719f4c17 Rearrange branch in accordance with new practices. 2014-06-09 12:37:23 -07:00
JoelKatz
526bd88dc4 Add ledger_get RPC command to fetch a ledger from the network
Conflicts:
	Builds/VisualStudio2013/RippleD.vcxproj
	Builds/VisualStudio2013/RippleD.vcxproj.filters
	Builds/VisualStudio2013/RippleD2.vcxproj
	Builds/VisualStudio2013/RippleD2.vcxproj.filters
	src/ripple_rpc/impl/Handlers.cpp
2014-06-09 12:37:22 -07:00
Vinnie Falco
37201ecaa6 Include BeastConfig.h from the root include path 2014-06-09 12:35:16 -07:00
Vinnie Falco
02ed879837 Update VS project file 2014-06-06 07:39:55 -07:00
Vinnie Falco
8b881d3a77 Add CBase58Data::hash_append 2014-06-05 20:00:24 -07:00
Miguel Portilla
97a1af43ed Fix VSProject.py extra dot 2014-06-05 17:47:46 -07:00
Miguel Portilla
f25456ce25 Fix VSProject.py extra dot 2014-06-05 17:47:46 -07:00
mDuo13
dfb1db4ab3 Return correct error for missing pathfinding request. Fixes RIPD-293 2014-06-05 17:47:28 -07:00
Vinnie Falco
4362cb660b Replace boost::shared_ptr with std::shared_ptr 2014-06-05 13:04:23 -07:00
Vinnie Falco
1aa0749ba8 Update rocksdb unity build 2014-06-04 17:20:43 -07:00
Vinnie Falco
c7f1f6a91f RocksDB changes to support unity build:
* Remove extra definition of TotalFileSize
* Remove extra definition of ClipToRange
* Move EncodedFileMetaData out from anonymous namespace
* Move version_set Saver to its own namespace
* Move some symbols into a named namespace
* Move symbols out of anonymous namespace (prevents warning)
* Make BloomHash inline
2014-06-04 17:15:28 -07:00
Vinnie Falco
888a3fec21 Merge commit '8514b88974c71c0fa85bb154507536ee49c33458' as 'src/rocksdb' 2014-06-04 16:10:38 -07:00
Vinnie Falco
8514b88974 Squashed 'src/rocksdb/' content from commit 457bae6
git-subtree-dir: src/rocksdb
git-subtree-split: 457bae6911
2014-06-04 16:10:38 -07:00
Vinnie Falco
724ec46129 Use per-file include directories for external code subtrees:
* leveldb, hyperleveldb, rocksdb, snappy
* SConstruct OSX fix regarding OpenSSL version check
2014-06-04 13:28:43 -07:00
Vinnie Falco
558b914c64 Reorganize source file hierarchy:
* Rename unity files
* Move some modules to new subdirectories
* Remove obsolete Visual Studio project files
* Remove obsolete coding style and TODO list
2014-06-03 21:43:59 -07:00
Vinnie Falco
4f1d1d2a8a Reorganize source file hierarchy:
* Rename unity files
* Move some modules to new subdirectories
* Remove obsolete Visual Studio project files
* Remove obsolete coding style and TODO list
2014-06-03 21:43:59 -07:00
Tom Ritchford
dda5fd7390 Check for openSSL version in SConstruct.
* Uses the platform specific openssl binary to detect the current version.
2014-06-02 10:56:21 -07:00
Tom Ritchford
39a387b54c Check for openSSL version in SConstruct.
* Uses the platform specific openssl binary to detect the current version.
2014-06-02 10:56:21 -07:00
Roberto Catini
2b0034667d Add Dockerfile:
* The ports are not automatically exposed.
* No test is performed after the build.
2014-06-02 10:27:09 -07:00
Tom Ritchford
98202c56ae base_uint now compares and assigns with beast::Zero.
Conflicts:
	src/ripple/types/api/base_uint.h
	src/ripple_basics/ripple_basics.h
2014-06-02 10:15:45 -07:00
Vinnie Falco
1e06ddf13c Refactor MultiSocket:
* Variadic constructor argument list
* Tidy up sources and filenames
2014-06-02 10:07:05 -07:00
Vinnie Falco
ce8f56727e Make all include paths relative to a root directory:
* Better include path support in the VSProject scons tool.
* Various manual fixes to include paths.
2014-06-02 09:16:28 -07:00
Vinnie Falco
560071bb68 Make all include paths relative to a root directory:
* Better include path support in the VSProject scons tool.
* Various manual fixes to include paths.
2014-06-02 09:16:28 -07:00
Nik Bougalis
2e49ec47a3 Revert "Ste version to 0.25.2-rc1"
This reverts commit 3f10924594.
2014-06-01 16:32:41 -07:00
Mark Travis
e70d618aff Set version to 0.25.2-rc1 2014-06-01 22:51:13 +00:00
Mark Travis
3e4cf426bd Detect paths with illegal bridging offers 2014-06-01 22:45:55 +00:00
Mark Travis
3f10924594 Ste version to 0.25.2-rc1 2014-06-01 22:35:12 +00:00
Mark Travis
f8182c335a Detect paths with illegal bridging offers 2014-06-01 01:26:11 +00:00
Vinnie Falco
1d8d6a6d68 Revert "Improve checking of library versions."
This reverts commit 69fccdf5c6.
2014-05-28 19:04:37 -07:00
Tom Ritchford
69fccdf5c6 Improve checking of library versions.
* Correctly handle openSSL version checking on Ubuntu, Debian, OS/X.
* Also check versions of openSSL, Boost, GCC and MSVC at C++ compile time.
* Get rid of over-engineered runtime CheckLibraryVersions.
2014-05-28 17:07:35 -07:00
Nik Bougalis
27e8d44a56 Autobridging:
Complete implementation of bridged offers crossings. While processing an offer
A:B we consider both the A:B order book and the combined A:XRP and XRP:B books
and pick the better offers. The net result is better liquidity and potentially
better rates.

* Rearchitect core::Taker to perform direct and bridged crossings.
* Compute bridged qualities.
* Implement a new Bridged OfferCreate transactor.
* Factor out common code from the Bridged and Direct OfferCreate transactors.
* Perform flow calculations without losing accuracy.
* Rename all transactors.
* Cleanups.
2014-05-28 16:35:03 -07:00
Vinnie Falco
d9755d33d0 Fix VSProject generator item sort 2014-05-28 16:35:02 -07:00
Vinnie Falco
72bc4ebf37 Fix VSProject generator item sort 2014-05-28 16:35:02 -07:00
Tom Ritchford
48d4fccc22 Fix a few warnings 2014-05-28 09:28:50 -07:00
Tom Ritchford
353f32e6af Fix a few warnings 2014-05-28 09:28:50 -07:00
Howard Hinnant
9bbaa9a2ae Report whether a ledger is validated:
This addresses https://ripplelabs.atlassian.net/browse/RIPD-275
Use Json::StaticString to improve performance.
Use inject_error instead of manually adding errors.
2014-05-28 09:27:22 -07:00
Nicholas Dudfield
096fcefae9 Fix clang/travis, prefer static libs when BOOST_ROOT is set. 2014-05-28 08:32:11 -07:00
Vinnie Falco
bfa8dec6f6 New http::client_session for making requests:
- Add 10,000 popular URL data set for unit tests
2014-05-28 08:31:45 -07:00
Vinnie Falco
0f1e292e34 New http::client_session for making requests:
- Add 10,000 popular URL data set for unit tests
2014-05-28 08:31:45 -07:00
Vinnie Falco
6e8230e1fb Add ci_char_traits 2014-05-28 07:30:02 -07:00
Vinnie Falco
195957a7cc Add ci_char_traits 2014-05-28 07:30:02 -07:00
Vinnie Falco
587a379b43 Tidy up includes 2014-05-28 07:29:59 -07:00
Vinnie Falco
eb122f45f9 Tidy up includes 2014-05-28 07:29:59 -07:00
Vinnie Falco
93021a054b Improved SConstruct:
* Automatic source list built via directory iteration
* Build multiple toolchains and flavors simulaneously:
    - Toolchains: gcc, clang, msvc
    - Flavors: debug, release
* Documentation on aliases (top of the SConstruct file)
2014-05-27 15:23:50 -07:00
Vinnie Falco
c51ac9d6da Fix rocksdb relative include 2014-05-27 15:23:50 -07:00
Vinnie Falco
97c9d02c43 Improved SConstruct:
* Automatic source list built via directory iteration
* Build multiple toolchains and flavors simulaneously:
    - Toolchains: gcc, clang, msvc
    - Flavors: debug, release
* Documentation on aliases (top of the SConstruct file)
2014-05-27 15:23:50 -07:00
Vinnie Falco
bf4dd0cbde Beast SCons tools:
* Add VSProject SCons Builder
* Add Protoc SCons Builder
* Add Beast build utilities python module
2014-05-27 15:23:49 -07:00
Vinnie Falco
0c06939f38 Beast SCons tools:
* Add VSProject SCons Builder
* Add Protoc SCons Builder
* Add Beast build utilities python module
2014-05-27 15:23:49 -07:00
Vinnie Falco
4ccc380a7b Tidy up some source filenames:
* Add .unity suffix to mark unity sources
* Fix some relative include paths
2014-05-27 15:23:48 -07:00
Vinnie Falco
5db677d74d Tidy up some source filenames:
* Add .unity suffix to mark unity sources
* Fix some relative include paths
2014-05-27 15:23:48 -07:00
Nik Bougalis
251ce4efbc base_uint cleanups:
* Remove unused and broken reverse iterators
* Use charUnHex to reduce code duplication
2014-05-27 09:26:18 -07:00
Nik Bougalis
9efac86bb7 Convert a unit test to manual 2014-05-26 15:29:48 -07:00
Nik Bougalis
386eabb61f Convert a unit test to manual 2014-05-26 15:29:48 -07:00
Nik Bougalis
b35eabe161 Optimize SQL query composition 2014-05-26 15:29:48 -07:00
Tom Swirly
9ad9845d69 Initialize unassigned variable bConsumed.
* Assigned in the code, but only to false.
* Someday will get assigned to true.
2014-05-23 12:16:24 -07:00
Tom Swirly
74eb25f9b5 RippleCalc: Stop using reference that might have been invalidated. 2014-05-23 12:16:22 -07:00
Nik Bougalis
044f390fe0 Properly standardize RFC1751 inputs 2014-05-23 11:06:43 -07:00
Miguel Portilla
06d6e4901e Complete NodeStore documentation
* Complete README.md
* Add missing doxygen
* Fix getHitRate bug
2014-05-19 10:53:40 -07:00
Tom Swirly
3ca9646329 Refactor the structure of RippleCalc
* Split code into multiple files
* Rename and move things
2014-05-19 10:53:40 -07:00
Tom Ritchford
4b3e629dfd Allow ledgers to be loaded from the command line.
Conflicts:

	src/ripple_data/protocol/BuildInfo.cpp
2014-05-19 10:53:39 -07:00
Tom Swirly
568fae9878 Add documentation comments 2014-05-19 10:53:39 -07:00
Tom Swirly
a844026f6b Clean up pre C++1 idioms:
* Use auto for in some loops
* Fix shadowing iterator declaration
* Rename NUMBER to ARRAYSIZE.
* Use placeholders instead of macros
* Replace macro BIND_TYPE with std::bind
* Replace BOOST_FOREACH with range-for
2014-05-19 10:53:38 -07:00
Vinnie Falco
b677cacb8c Set version to 0.25.1 2014-05-15 11:13:54 -07:00
Nik Bougalis
1d66169ef1 Fix rippled-example.cfg to list 'peers_max' 2014-05-15 11:11:16 -07:00
Vinnie Falco
8be17cd60d Use std::string in lexicalCast 2014-05-15 11:11:15 -07:00
Vinnie Falco
74653e57e6 Use std::string in lexicalCast 2014-05-15 11:11:15 -07:00
Vinnie Falco
29d1d5f062 Set version to 0.25.0 2014-05-14 09:01:44 -07:00
Vinnie Falco
d8e8693d9a Update rippled-example.cfg 2014-05-13 20:43:39 -07:00
Miguel Portilla
be737e0047 Enable Snappy compression for NodeStore backends.
* Configured via config.cfg
2014-05-13 12:21:01 -07:00
Vinnie Falco
83ef06748d Add snappy compression integration 2014-05-13 12:16:39 -07:00
Vinnie Falco
8b0602a582 Squashed 'src/snappy/snappy/' content from commit 1ff9be9
git-subtree-dir: src/snappy/snappy
git-subtree-split: 1ff9be9b8fafc8528ca9e055646f5932aa5db9c4
2014-05-13 12:16:31 -07:00
Vinnie Falco
5a93f9991a Merge commit '8b0602a5824199d495f6720ef2447f695179257a' as 'src/snappy/snappy' 2014-05-13 12:16:31 -07:00
Vinnie Falco
eb24ca6def Update .gitattributes 2014-05-13 12:15:59 -07:00
Nik Bougalis
22af79606a Fix lexicographical compare during tfRequireAuth processing 2014-05-13 12:10:39 -07:00
Nik Bougalis
bee12fb89d Autobridging future support:
* Refactor and cleanup transactors
* Introduce new direct and bridged transactors
* Rename existing transactor to indicate legacy status
* New direct transactor defaults to being turned off (preserve legacy behavior)
2014-05-13 12:09:47 -07:00
Nik Bougalis
1a9fbab165 CBase58Data Refactoring:
* Remove unnecessary functions.
* Load from a base_uint const& - don't use void pointers.
* Free comparison functions.
* Explicitly specify encoding alphabet.
* Miscellaneous cleanups.
2014-05-13 08:48:53 -07:00
David Schwartz
9a4b9aa69f Remove redundant checkAccept call 2014-05-13 08:48:52 -07:00
David Schwartz
227043e51f Make I/O latency available through server_info 2014-05-13 08:48:51 -07:00
JoelKatz
db3a387224 Fetch pack cleanups:
* Limit backed up fetch pack requests
* Cleanups
* Dispatch fetch packs sooner
2014-05-13 08:48:50 -07:00
David Schwartz
0075f36bbc At level 64, only leaves are allowed 2014-05-13 08:48:49 -07:00
David Schwartz
52f45669d1 Dispatch incoming TX set data 2014-05-13 08:48:48 -07:00
JoelKatz
294a13d653 Put newly-created nodes in the treeNodeCache 2014-05-13 08:48:48 -07:00
JoelKatz
eed66894db SHAMap::canonicalize must return a node with the correct ID 2014-05-13 08:48:47 -07:00
Vinnie Falco
caf5f7579e Fix vs2013 availability of make_reverse_iterator 2014-05-13 08:38:02 -07:00
Vinnie Falco
1434695c47 Fix vs2013 availability of make_reverse_iterator 2014-05-13 08:38:02 -07:00
Tom Swirly
390ea65e15 Refactor RippleCalc.cpp:
* Add comments
* Restrict code to 80 colums
* Remove boost::format
* Remove BOOST_FOREACH
* Make members private
* Add ripple_unordered_set to UnorderedContainers.h
* Replace boost::unordered_set with ripple::unordered_set
2014-05-09 12:03:57 -07:00
David Schwartz
6f2bcc6fb0 Keep SHAMapNodes that fault in handling client requests. 2014-05-09 11:46:24 -07:00
David Schwartz
66a762d504 Rework handling of modified ledger nodes:
* Track dirty nodes in a set
* Make flushDirty a member function
* Don't write deleted nodes
* Make sure new nodes are shareable
* Put new nodes in the treeNodeCache
2014-05-09 11:46:15 -07:00
David Schwartz
aaabec0b55 Use last closed ledger for old pathfinding 2014-05-09 11:46:05 -07:00
Nik Bougalis
6339800946 Refactor base_uint<> and STAmount::getText:
base_uint<>:
* Remove unnecessary typedefs and derived classes
* Factor out common code and eliminate redundancies
* Add tag support to improve type safety
* base_uint::ToString() -> to_string(base_uint const&)
* base_uint::GetHex() -> to_string(base_uint const&)

STAmount::getText:
* Don't overallocate
* Eliminate unnecessary copying
2014-05-09 11:45:44 -07:00
Nik Bougalis
191f4496a7 Implement C++14 std::make_reverse_iterator 2014-05-09 11:45:10 -07:00
Nik Bougalis
a3e4a34021 Implement C++14 std::make_reverse_iterator 2014-05-09 11:45:10 -07:00
David Schwartz
6fcf3fedb6 Use Json::StaticString to improve performance:
* Move JSON-RPC fields to jsonrpc_fields.h
2014-05-07 13:04:35 -07:00
David Schwartz
34cbb26e47 Improved performance monitoring of NodeStore backends:
* Add multi-sample interface to LoadMonitor
* Instrument fetch operations and completions for reporting in server_info
2014-05-05 14:17:23 -07:00
David Schwartz
07d0379edd Reduce number of async fetches 2014-05-05 14:17:23 -07:00
Tom Swirly
96e8cddfc2 New strConcat concatenates strings in O(n) time.
* Accepts std::string and char const*.
* Also accepts numbers, bools and chars.
* New ripple::toString function augments std::to_string to handle
  bools and chars.
2014-05-05 14:17:23 -07:00
Tom Swirly
3c5e4e440b Clean up of TransactionSign and friends. 2014-05-05 14:17:22 -07:00
Tom Swirly
5ffcbb9b65 Add documentation to SHAMap 2014-05-05 14:17:21 -07:00
Nik Bougalis
ec0fe312af Simplify and improve performance of STAmount::createHumanCurrency 2014-05-05 14:17:21 -07:00
Miguel Portilla
3025d8611b Rename Feature to Amendment:
* Added a README.md describing an Amendment
2014-05-05 13:50:00 -07:00
Miguel Portilla
98612a7cd6 Cleanup nodestore backend classes:
* Add README.md
* Add missing std::move calls
* Refactor visitAll in backend
2014-05-05 13:50:00 -07:00
MarkusTeufelberger
6e428054ef Update RPM spec file to version 0.24.0 2014-05-05 13:49:59 -07:00
Vinnie Falco
3eb1c7bd6f Set version to 0.24.0 2014-05-05 10:20:46 -07:00
Vinnie Falco
2ed2158309 Set version to 0.24.0-rc2 2014-05-02 13:01:17 -07:00
JoelKatz
112d383698 Pathfinding dispatch improvements
* Simplify decision whether to update a path
* Prevent pathfinding threads from blocking each other
2014-05-02 13:01:17 -07:00
Vinnie Falco
11d0c89a59 Set version to 0.24.0-rc1 2014-05-01 16:14:20 -07:00
JoelKatz
7cffd0e0f5 Add comments to LedgerHistory 2014-05-01 16:14:14 -07:00
JoelKatz
d1f5006e44 Validation timing fixes:
* Log whether consensus built a ledger we already had or were acquiring
* Don't trigger an acquire for a validation for a ledger we might be building
* When we finish building a ledger, try to accept that ledger
* If we cannot accept a built ledger, check held validations
* Correctly set isCurrent for untrusted validations
* Add appropriate logging

This fixes a race condition that could cause spurious and expensive
ledger fetches across the network and delayed recognition of
fully-validated ledger.
2014-05-01 16:14:09 -07:00
Vinnie Falco
a10c48182f Move .proto and generated sources 2014-05-01 09:53:42 -07:00
Howard Hinnant
b5348980e2 Improve Json::Value special members (fixes RIPD-215):
* Add move special members
* Fix Json::Value::swap
2014-04-30 13:01:00 -07:00
Nik Bougalis
73c5a867c6 Fix out-of-order initialization 2014-04-30 11:32:18 -07:00
miguelportilla
b8162884d9 Finish implementation of Ledger process/Features logic:
* Defining RIPPLE_PROPOSE_FEATURES enables ledger features
* Reduce dependence on getApp via dependency injection
* Converted uint32 members to use Clock::time_point
* Inject Journal, tidy up classes:
    - Features
    - FeaturesImpl
    - FeeVote
    - FeeVoteImpl
2014-04-28 14:54:17 -07:00
David Schwartz
ebae927a3e Allow range-based for to work on STVector256 2014-04-28 14:54:17 -07:00
David Schwartz
3dde8b4345 If RocksDB high threads are configured, use them for flushes 2014-04-28 14:54:16 -07:00
Nik Bougalis
6f6720b346 Optimize composition of HTTP/RPC reply strings 2014-04-28 14:54:16 -07:00
JoelKatz
1ba0d40bb4 Small Ledger cleanups and improvements:
* Remove call to updateHash in LedgerConsensus::accept
 * Correct serialization size in updateHash
 * Add some comments to setImmutable and setAccepted
2014-04-28 14:54:15 -07:00
Nik Bougalis
3b87b140c9 Update README.md 2014-04-28 14:54:15 -07:00
Nik Bougalis
912d74e805 Tidy up some STAmount and base_uint operations:
* Constrain use of arithmetic operators in STAmount
* Prevent constructor conversion of uint256 to uint128 - make intent clear
* Prevent implicit conversion of uint64_t to uint256
* Prevent implicit conversion of uint64_t to uint160
2014-04-28 14:54:15 -07:00
JoelKatz
6ae329f4a6 Universal flags need to be added to tfAccountSetMask 2014-04-24 20:39:16 -07:00
Tom Swirly
360db3c7ca Fix RIPD-166:
* Allow RPC commands sign and submit to sign using the regular key.
* Allow command line RPC command submit to take an "offline" flag.
* Mark SerializedObject.getFlags() as const.
2014-04-24 20:27:45 -07:00
Tom Swirly
c39fd4e64d RPC: Improve wallet_propose, deprecate wallet_seed:
* Add master_key, public_key and public_key_hex to wallet_propose's JSON response.
* Report an error if we can't understand wallet_propose's passphrase.
* Deprecate wallet_seed by adding a "deprecated" parameter directing the user to wallet_propose.
2014-04-24 10:21:55 -07:00
Nik Bougalis
f4aec40fc1 Fix display formatting of STAmount 2014-04-22 12:39:43 -07:00
Tom Swirly
7fed69fc13 Split RPCHandler into a large number of small parts:
* Handler methods of RPCHandler are extracted into individual files.
* Helper methods of RPCHandler are converted into free functions, and
  extracted into individual files.
* Much code leaves ripple_app/rpc/RPCHandler.cpp and enters ripple_rpc/.
2014-04-18 11:22:29 -07:00
Nik Bougalis
f26d95d0bb Quality tests aren't manual 2014-04-18 09:31:22 -07:00
Vinnie Falco
df3f5e442d Fix VS2013 warnings about integer conversions 2014-04-17 13:06:06 -07:00
Vinnie Falco
29ee4899bc Fix VS2013 warnings about integer conversions 2014-04-17 13:06:06 -07:00
Howard Hinnant
fdfcebd1cb Refactoring of container usage:
* New ripple container aliases use hardened_hash
* Use std::tuple instead of boost::tuple
* Use std unordered containers instead of boost
* Fix Destroyer for new containers
* Fix warning for fnv1a on 32-bit arch
* Validator fixes for new containers
2014-04-16 19:00:13 -07:00
Howard Hinnant
6596c94eb9 Refactoring of container usage:
* New ripple container aliases use hardened_hash
* Use std::tuple instead of boost::tuple
* Use std unordered containers instead of boost
* Fix Destroyer for new containers
* Fix warning for fnv1a on 32-bit arch
* Validator fixes for new containers
2014-04-16 19:00:13 -07:00
Vinnie Falco
6f8145b696 Add [max_peers] doc to example cfg 2014-04-16 12:23:26 -07:00
Miguel Portilla
65f496fefb Fix 64-bit Visual Studio build 2014-04-16 12:19:32 -07:00
Vinnie Falco
3ca8bf5f98 Remove obsolete TODO files 2014-04-16 07:48:56 -07:00
Vinnie Falco
62354350a3 Refactor ripple_overlay:
* Use rvalue move to receive accepted sockets
  * Split asio dependent APIs to their own class and file
  * Update documentation
  * Organize code into different files
  * Make some members private
  * Rename things for clarity
2014-04-16 07:48:56 -07:00
Tom Swirly
8f5b4a6c96 Add CleanCCPFiles.py, a utility for tidying up whitespace 2014-04-15 11:52:02 -07:00
Tom Swirly
898b7eb6f0 Add CleanCCPFiles.py, a utility for tidying up whitespace 2014-04-15 11:52:02 -07:00
Nik Bougalis
a45b532664 Add beast::tagged_integer:
* Wraps standard integer types to provide type-safety
 * Named types provide self-documenting semantics
 * Catches programmer errors involving mismatched types at compile time
 * Operators restrict mutation to only safe and meaningful operations
2014-04-15 11:48:35 -07:00
Nik Bougalis
398edd39f8 Add beast::tagged_integer:
* Wraps standard integer types to provide type-safety
 * Named types provide self-documenting semantics
 * Catches programmer errors involving mismatched types at compile time
 * Operators restrict mutation to only safe and meaningful operations
2014-04-15 11:48:35 -07:00
Nik Bougalis
5fddf374f4 Refactor usage of boost::format 2014-04-15 11:48:34 -07:00
Nik Bougalis
2ed8edc19d Make is_set_bit a universal template function 2014-04-15 11:40:58 -07:00
Tom Swirly
feb88c4f7f Enforce minimum version requirements on OpenSSL and Boost 2014-04-15 10:22:51 -07:00
Vinnie Falco
c0dfbdc910 Fix Visual Studio 2013 build 2014-04-15 08:13:53 -07:00
Vinnie Falco
ebcedcbe93 Fix Visual Studio 2013 build 2014-04-15 08:13:53 -07:00
The Doctor
e3995ac776 Updated example cfg for new validator public keys.
Signed-off-by: The Doctor <drwho@virtadpt.net>
2014-04-14 18:21:06 -07:00
Tom Swirly
a4ef993282 New Zero struct implements "compare with zero."
* Zero lets classes efficiently compare with 0, so
  you can use constructors like x < zero or y != zero.
* New BEAST_CONSTEXPR to handle Windows/C++11 differences
  regarding the constexpr specifier.
2014-04-14 11:14:11 -07:00
Tom Swirly
64ee0d07d0 New Zero struct implements "compare with zero."
* Zero lets classes efficiently compare with 0, so
  you can use constructors like x < zero or y != zero.
* New BEAST_CONSTEXPR to handle Windows/C++11 differences
  regarding the constexpr specifier.
2014-04-14 11:14:11 -07:00
Tom Ritchford
6b0cec1189 Improvements to scons build for beast.
* Common code extracted to Python directories.
* Read ~/.scons file for scons environment defaults.
* Override scons settings with shell environment variables.
* New "tags" for debug, nodebug, optimize, nooptimize builds.
* Universal platform detection.
* Default value of environment variables set through prefix dictionaries.
* Check for correct Boost value and fail otherwise.
* Extract git describe --tags into a preprocesor variable, -DTIP_BRANCH
* More colors - blue for unchanged defaults, green for changed defaults, red for error.
* Contain unit tests for non-obvious stuff.
* Check to see that boost libraries have been built.
* Right now, we accept both .dylib and .a versions but it'd be easy to enforce .a only.
2014-04-11 10:40:26 -07:00
Tom Ritchford
524f41177c Improvements to scons build for beast.
* Common code extracted to Python directories.
* Read ~/.scons file for scons environment defaults.
* Override scons settings with shell environment variables.
* New "tags" for debug, nodebug, optimize, nooptimize builds.
* Universal platform detection.
* Default value of environment variables set through prefix dictionaries.
* Check for correct Boost value and fail otherwise.
* Extract git describe --tags into a preprocesor variable, -DTIP_BRANCH
* More colors - blue for unchanged defaults, green for changed defaults, red for error.
* Contain unit tests for non-obvious stuff.
* Check to see that boost libraries have been built.
* Right now, we accept both .dylib and .a versions but it'd be easy to enforce .a only.
2014-04-11 10:40:26 -07:00
Vinnie Falco
04ea9ff74c New classes for processing offers in order books:
* BookTip provides consume-and-step offer traversal
* OfferStream applies offer business rules and presents offers to callers
* Taker class manages state for the active party during order processing
* Offer class wraps book offers for presentation
2014-04-10 17:49:19 -07:00
Vinnie Falco
53bf5e7f36 New classes and types for handling asset amounts:
* Quality opaque type for order book quality
  * Amount replacement for STAmount
  * Amounts, in/out amount pair for offers
  * 'core' namespace with type aliases for Ripple primitives.
2014-04-10 17:49:19 -07:00
Nik Bougalis
bd60a93cd6 Fix conversion of binary data to hexadecimal strings in some cases. 2014-04-07 14:56:37 -07:00
The Doctor
8a608b5829 Configuration file improvements:
* Set default node_db to RocksDB from HyperlevelDB, to match gateway
  appliances and Ripple Labs server configurations.
* Set some rpc_startup options to reduce logging and save disk space.
* More sensible documentation regarding WebSocket SSL directives

Signed-off-by: The Doctor <drwho@virtadpt.net>
2014-04-07 13:19:21 -07:00
David Schwartz
151388692a Add bg_threads and high_threads RocksDB tunables 2014-04-04 19:01:01 -07:00
Nik Bougalis
bec876d062 Remove unused legacy code 2014-04-04 19:00:58 -07:00
Howard Hinnant
4a3176e3a0 Force BOOST_ASIO_HAS_STD_ARRAY to 1
for the clang / gcc libstdc++ 4.8 combination
2014-04-03 14:58:28 -04:00
Howard Hinnant
81238e21a5 Force BOOST_ASIO_HAS_STD_ARRAY to 1
for the clang / gcc libstdc++ 4.8 combination
2014-04-03 14:58:28 -04:00
Howard Hinnant
fd9206584f Sub in std::array for boost::array and beast::FixedArray 2014-04-03 14:02:34 -04:00
Howard Hinnant
cc354ee9f2 Sub in std::array for boost::array and beast::FixedArray 2014-04-03 14:02:34 -04:00
JoelKatz
90842073bf Must set flags before signing validation. 2014-04-02 18:39:59 -07:00
Nik Bougalis
a5488c3727 Autobridging hooks and cleanups:
- Detect when we should autobridge and get bridge books.
- Move applyOffer from STAmount into the OfferCreate transactor.
2014-04-02 18:39:59 -07:00
Nik Bougalis
166b8963bb Don't create peer doors in standalone mode 2014-04-02 14:16:24 -07:00
Nik Bougalis
c51644f1b9 More robustly validate signature inputs, closes #313 2014-04-02 14:16:07 -07:00
Vinnie Falco
f124a34730 Fix assert invariant in Peers::close_all 2014-04-01 10:24:55 -07:00
Howard Hinnant
2ab7cfbf30 New hash_append robust container hash function framework:
* is_contiguous_hashable trait identifies optimizable types
* hash_append() function overloads for basic types:
  - scalars, floats
  - array, C array
  - pair, tuple
  - boost array and tuple (if configured)
* Provided Spooky hash wrapper for use with hash_append
* Use hash_append in hardened_hash and other places
* New Utility meta functions for working with variadics:
  - static_and
  - static_sum
* Added type_name utility function for diagnostics
* hash_metrics suite of functions to evalulate hash functions
* Test suites to measure hash function performance
* Various fixes
2014-03-31 15:49:23 -07:00
Howard Hinnant
30e882196f New hash_append robust container hash function framework:
* is_contiguous_hashable trait identifies optimizable types
* hash_append() function overloads for basic types:
  - scalars, floats
  - array, C array
  - pair, tuple
  - boost array and tuple (if configured)
* Provided Spooky hash wrapper for use with hash_append
* Use hash_append in hardened_hash and other places
* New Utility meta functions for working with variadics:
  - static_and
  - static_sum
* Added type_name utility function for diagnostics
* hash_metrics suite of functions to evalulate hash functions
* Test suites to measure hash function performance
* Various fixes
2014-03-31 15:49:23 -07:00
David Schwartz
14830c7cb4 Avoid redundant unlock 2014-03-31 09:11:52 -07:00
JoelKatz
5a21269da4 mRecentPositions must be protected by the master lock. 2014-03-28 13:45:53 -07:00
JoelKatz
cc5466d450 Reject expired transactions immediately 2014-03-28 10:33:53 -07:00
JoelKatz
a068bff9c1 Set fully-canonical flag in transactions and validations. 2014-03-28 09:34:22 -07:00
David Schwartz
1e54472a1d Clean local transaction checks. Check account field size 2014-03-25 16:20:22 -07:00
David Schwartz
be9e18ddb8 Track and re-appply LocalTransactions as needed 2014-03-25 16:20:22 -07:00
JoelKatz
5d1aec6280 Charge for pathfinding updates. 2014-03-25 16:20:22 -07:00
JoelKatz
0442b3a683 Change resource costs. 2014-03-25 16:20:22 -07:00
Vinnie Falco
6b467e7e59 Move hardened_hash to container/ 2014-03-25 15:22:34 -07:00
Vinnie Falco
bbc8a8fdc4 Move hardened_hash to container/ 2014-03-25 15:22:34 -07:00
Vinnie Falco
d64f5a387c Add beast SConstruct and .travis.yml 2014-03-25 15:22:34 -07:00
Vinnie Falco
428872731a Add beast SConstruct and .travis.yml 2014-03-25 15:22:34 -07:00
Nik Bougalis
015d91b50d OfferCreateTransactor cleanups:
- Use std containers instead of their boost counterparts
- Reduce transactor console verbosity
- Remove unneeded parameter shadowing member variable
- Remove BOOST_FOREACH
- Add comments
- Small cleanups
2014-03-25 15:22:33 -07:00
Nik Bougalis
cc6cd0bb8f Transactor journal support and small cleanups 2014-03-25 15:22:13 -07:00
Nik Bougalis
436061be22 Transactor journal support and small cleanups 2014-03-25 15:22:13 -07:00
Nik Bougalis
d447a1db39 Refactor ECDSA canonical checks:
* Add signature canonicalization unit tests
* Tidy up into new classes and functions
2014-03-25 15:22:13 -07:00
Luke Cyca
a4a7dd4314 Fedora RPM support:
- Add RPM spec file
- Whitelist Fedora during SConstruct
2014-03-24 14:07:36 -07:00
Roberto Catini
4886772ca3 Add Arch Linux PKGBUILD:
The install process will first fetch the tip of the master branch
to build the latest official rippled release. It will also create
all the necessary data directories in /var.

An optional systemd service definition file is included.
2014-03-24 14:07:27 -07:00
The Doctor
0f19efac2d Example configuration file update:
- Fix config database default location.
  - Add SSL/TLS for WebSockets config. Currently commented out.
2014-03-24 14:07:19 -07:00
Vinnie Falco
3fbff6e620 beast cleanup and tidying:
* Replace custom types with C++11 <cstdint> types
* Fix sqlite integer intos and uses
* Fix String implicit integer constructors
* Escape the enclosing namespace in sqdb
* Replace contract checks with assert
* Make many header files compile independently
* Remove the dependence on beast_core.h in many places
* Remove unused or obsolete classes and functions
* Remove unused or obsolete macros
* Remove unused network functions and files
* Remove unused or obsolete classes:
  - ChildProcess
  - HighResolutionTimer
  - InterProcessLock
  - Throw
  - TrackedMutex
  - UntrackedMutex
  - XmlDocument
  - XmlElement
2014-03-23 15:23:55 -07:00
Vinnie Falco
b2d97703c6 beast cleanup and tidying:
* Replace custom types with C++11 <cstdint> types
* Fix sqlite integer intos and uses
* Fix String implicit integer constructors
* Escape the enclosing namespace in sqdb
* Replace contract checks with assert
* Make many header files compile independently
* Remove the dependence on beast_core.h in many places
* Remove unused or obsolete classes and functions
* Remove unused or obsolete macros
* Remove unused network functions and files
* Remove unused or obsolete classes:
  - ChildProcess
  - HighResolutionTimer
  - InterProcessLock
  - Throw
  - TrackedMutex
  - UntrackedMutex
  - XmlDocument
  - XmlElement
2014-03-23 15:23:55 -07:00
Vinnie Falco
5eb0aa2765 Add hardened_hash, prevents adversarial inputs 2014-03-22 18:42:18 -07:00
Vinnie Falco
936f45c7ec Add hardened_hash, prevents adversarial inputs 2014-03-22 18:42:18 -07:00
Vinnie Falco
f63cf33118 New unit_test framework:
* Header-only!
* No external dependencies or other beast modules
* Compilation options allow for:
  - Stand-alone application to run a single test suite
  - Stand-alone application to run a set of test suites
  - Global suite of tests inline with the host application
  - Disable test suite generation completely
* Existing tests reworked to use the new classes
2014-03-21 18:00:37 -07:00
Vinnie Falco
a865149c65 New unit_test framework:
* Header-only!
* No external dependencies or other beast modules
* Compilation options allow for:
  - Stand-alone application to run a single test suite
  - Stand-alone application to run a set of test suites
  - Global suite of tests inline with the host application
  - Disable test suite generation completely
* Existing tests reworked to use the new classes
2014-03-21 18:00:37 -07:00
Vinnie Falco
0bb6171a85 beast.streams improvements:
* New basic_std_ostream wraps any std::stream.
* New debug_ostream redirects output to debugger if attached.
2014-03-21 07:33:16 -07:00
Vinnie Falco
547019bd1b beast.streams improvements:
* New basic_std_ostream wraps any std::stream.
* New debug_ostream redirects output to debugger if attached.
2014-03-21 07:33:16 -07:00
Vinnie Falco
e92dd73169 Add const_container 2014-03-21 07:33:16 -07:00
Vinnie Falco
953805d97e Add const_container 2014-03-21 07:33:16 -07:00
Vinnie Falco
2d490f6e6a beast cleaning and tidying:
* Consolidate small modules into one
* Remove Android-specific platform support
* Remove Chrono.h from beast_core.h
* Removed files:
  - TypeTraits.h
  - Utility.h
  - Net.h
  - Asio.h
* Remove zlib support:
  - Remove inline zlib library sources
  - Remove GZIPCompressorOutputStream
  - Remove GZIPDecompressorInputStream
* Remove obsolete or unused classes:
  - AbstractObject
  - BigInteger
  - BufferedInputStream
  - CacheLine
  - CPUMeter
  - DatagramSocket
  - DynamicObject
  - FileLogger
  - FPUFlags
  - Identifier
  - JSON
  - LocalisedStrings
  - MACAddress
  - MemoryAlignment
  - MemoryInputStream
  - MemoryMappedFile
  - NamedValueSet
  - OptionalScopedPointer
  - PerformanceCounter
  - PropertySet
  - ScopedTimeInterval
  - SparseSet
  - SpinDelay
  - StreamingSocket
  - StringPool
  - SubregionStream
  - Uuid
  - Variant
2014-03-21 07:30:50 -07:00
Vinnie Falco
e344cb3d62 beast cleaning and tidying:
* Consolidate small modules into one
* Remove Android-specific platform support
* Remove Chrono.h from beast_core.h
* Removed files:
  - TypeTraits.h
  - Utility.h
  - Net.h
  - Asio.h
* Remove zlib support:
  - Remove inline zlib library sources
  - Remove GZIPCompressorOutputStream
  - Remove GZIPDecompressorInputStream
* Remove obsolete or unused classes:
  - AbstractObject
  - BigInteger
  - BufferedInputStream
  - CacheLine
  - CPUMeter
  - DatagramSocket
  - DynamicObject
  - FileLogger
  - FPUFlags
  - Identifier
  - JSON
  - LocalisedStrings
  - MACAddress
  - MemoryAlignment
  - MemoryInputStream
  - MemoryMappedFile
  - NamedValueSet
  - OptionalScopedPointer
  - PerformanceCounter
  - PropertySet
  - ScopedTimeInterval
  - SparseSet
  - SpinDelay
  - StreamingSocket
  - StringPool
  - SubregionStream
  - Uuid
  - Variant
2014-03-21 07:30:50 -07:00
Vinnie Falco
761affacc3 Update to SQLite 3.8.4.1 2014-03-20 19:17:25 -07:00
Vinnie Falco
693a5927a9 Update to SQLite 3.8.4.1 2014-03-20 19:17:25 -07:00
Howard Hinnant
979c834ee0 Fix and add tests for empty_base_optimization. 2014-03-20 13:47:48 -07:00
Howard Hinnant
07e2f87079 Fix and add tests for empty_base_optimization. 2014-03-20 13:47:48 -07:00
Vinnie Falco
aff0ec18b0 Fix error code assignment in raw_parser 2014-03-20 10:43:01 -07:00
Vinnie Falco
9b152d8098 Fix error code assignment in raw_parser 2014-03-20 10:43:01 -07:00
Vinnie Falco
d32b91e0de Add abstract streams module:
* New basic_abstract_ostream template for generic output
* New abstract_ostream, common type alias
* basic_scoped_ostream, RAII output to abstract streams
2014-03-19 15:42:20 -07:00
Vinnie Falco
8daecb5430 Add abstract streams module:
* New basic_abstract_ostream template for generic output
* New abstract_ostream, common type alias
* basic_scoped_ostream, RAII output to abstract streams
2014-03-19 15:42:20 -07:00
Vinnie Falco
8b659a6d32 Add workaround/noexcept.h for visual studio 2014-03-19 13:42:05 -07:00
Vinnie Falco
f1462de729 Add workaround/noexcept.h for visual studio 2014-03-19 13:42:05 -07:00
Vinnie Falco
18486169b3 Change to the treatment of BeastConfig.h
* No longer requires its own compiler include path
* Includes use relative paths to locate the file
* Client applications include the file themselves
* Inclusion of BeastConfig.h can be controlled via preprocessor directive
2014-03-19 13:42:04 -07:00
Vinnie Falco
3cb3e5273f Change to the treatment of BeastConfig.h
* No longer requires its own compiler include path
* Includes use relative paths to locate the file
* Client applications include the file themselves
* Inclusion of BeastConfig.h can be controlled via preprocessor directive
2014-03-19 13:42:04 -07:00
Howard Hinnant
d580e7c694 General tidy and refactoring:
* Use nullptr (C++11) instead of NULL.
* Put each file into its own namespace declaration.
* Remove "using namespace" directives and add scope qualifiers.
* Control when beast's implementation of std::equal (C++14) is used.
* Tidy up some const declarations.

Conflicts:
	src/ripple_app/shamap/SHAMapSync.cpp
	src/ripple_app/tx/TransactionEngine.cpp
2014-03-19 13:42:01 -07:00
Howard Hinnant
cad50c68a8 General tidy and refactoring:
* Use nullptr (C++11) instead of NULL.
* Put each file into its own namespace declaration.
* Remove "using namespace" directives and add scope qualifiers.
* Control when beast's implementation of std::equal (C++14) is used.
* Tidy up some const declarations.

Conflicts:
	src/ripple_app/shamap/SHAMapSync.cpp
	src/ripple_app/tx/TransactionEngine.cpp
2014-03-19 13:42:01 -07:00
Vinnie Falco
78ec5ccdbc Restructure joyent message parser (from Node.js):
* New http::raw_parser wrapper
* Convert parser errors to error_code
* Enumeration and strings for parsed HTTP method
* Move parser engine into joyent namespace
* Rename includes to be distinct
2014-03-19 10:41:24 -07:00
Vinnie Falco
c581ffb8a4 Restructure joyent message parser (from Node.js):
* New http::raw_parser wrapper
* Convert parser errors to error_code
* Enumeration and strings for parsed HTTP method
* Move parser engine into joyent namespace
* Rename includes to be distinct
2014-03-19 10:41:24 -07:00
Vinnie Falco
d4a5c0353d beast, beast::asio improvements and fixes:
* New maybe_const_t alias for maybe_const
* New asio::enable_wait_for_async for safe cleanup
* New asio::memory_buffer, a managed boost::asio compatible buffer
* shared_handler improvements:
   - Can be 'empty' (no stored handler).
   - Default constructible as 'empty'.
   - Safe evaluation in bool contexts, false==empty
* Fix is_call_possible metafunction:
   - Works on empty argument lists
   - Works with reference types
* Replace SafeBool idiom with C++11 explicit operator bool
* Move IPAddress function definitions to the header
* Move cyclic_iterator to container/
* Remove unused BufferType
* Remove obsolete classes:
   - NamedPipe
   - ReadWriteLock
   - ScopedReadLock
   - ScopedWriteLock
   - LockGuard
2014-03-17 17:40:55 -07:00
Vinnie Falco
556778dbdb beast, beast::asio improvements and fixes:
* New maybe_const_t alias for maybe_const
* New asio::enable_wait_for_async for safe cleanup
* New asio::memory_buffer, a managed boost::asio compatible buffer
* shared_handler improvements:
   - Can be 'empty' (no stored handler).
   - Default constructible as 'empty'.
   - Safe evaluation in bool contexts, false==empty
* Fix is_call_possible metafunction:
   - Works on empty argument lists
   - Works with reference types
* Replace SafeBool idiom with C++11 explicit operator bool
* Move IPAddress function definitions to the header
* Move cyclic_iterator to container/
* Remove unused BufferType
* Remove obsolete classes:
   - NamedPipe
   - ReadWriteLock
   - ScopedReadLock
   - ScopedWriteLock
   - LockGuard
2014-03-17 17:40:55 -07:00
Vinnie Falco
816fab000d Fix SConstruct compiler arguments 2014-03-17 14:49:31 -07:00
Nik Bougalis
66d1dd6f81 Build system improvements:
* Reduce console verbosity.
* Display configured build environment.
* Log build environment and commands in rippled-build.log.
* When compiling under Travis:
  - define TRAVIS_CI_BUILD for C and C++ code.
  - define RIPPLE_MASTER_BUILD for builds made against
    the official Ripple repository.
2014-03-17 09:22:11 -07:00
Vinnie Falco
3eae68fc34 Remove obsolete support scripts 2014-03-15 06:07:43 -07:00
Vinnie Falco
8545aee4c7 Better diagnostics for SSL certificate failures 2014-03-14 16:20:34 -07:00
Vinnie Falco
29a4f61551 Set version to 0.23.0 2014-03-14 13:01:23 -07:00
Vinnie Falco
6546c30e17 Refactor beast::asio:
* New tools for completion handlers:
  - wrap_handler provides composed io_service execution guarantees.
  - bind_handler rebinds arguments to handlers.
  - shared_handler type-erases any completion handler.
  - buffer_sequence type-erases templated BufferSequences
  - abstract_socket replaces Socket
  - socket_wrapper replaces SocketWrapper
  - beast::asio placeholders to work with std::bind

* Removed obsolete classes and functions
  - AbstractHandler
  - ComposedAsyncOperation
  - SharedFunction
  - SharedHandler
  - SharedHandlerAllocator
  - SharedHandlerPtr
  - SharedHandlerType
  - SocketBase
  - SocketWrapperStrand
  - wrapHandler

* Refactored classes to use new tools
  - abstract_socket
  - socket_wrapper
  - HandshakeDetector
  - HttpClientType

* Miscellanous tidying
  - socket classes moved to beast::asio namespace
  - beast asio files provide their own namespace declaration.
  - Fix IsCallPossible conflicting template parameter name
  - Use <boost/get_pointer.hpp> for C++11 compatibility.
  - Remove extraneous include path from build environment.
2014-03-14 08:03:48 -07:00
Vinnie Falco
c2fd1215f5 Refactor beast::asio:
* New tools for completion handlers:
  - wrap_handler provides composed io_service execution guarantees.
  - bind_handler rebinds arguments to handlers.
  - shared_handler type-erases any completion handler.
  - buffer_sequence type-erases templated BufferSequences
  - abstract_socket replaces Socket
  - socket_wrapper replaces SocketWrapper
  - beast::asio placeholders to work with std::bind

* Removed obsolete classes and functions
  - AbstractHandler
  - ComposedAsyncOperation
  - SharedFunction
  - SharedHandler
  - SharedHandlerAllocator
  - SharedHandlerPtr
  - SharedHandlerType
  - SocketBase
  - SocketWrapperStrand
  - wrapHandler

* Refactored classes to use new tools
  - abstract_socket
  - socket_wrapper
  - HandshakeDetector
  - HttpClientType

* Miscellanous tidying
  - socket classes moved to beast::asio namespace
  - beast asio files provide their own namespace declaration.
  - Fix IsCallPossible conflicting template parameter name
  - Use <boost/get_pointer.hpp> for C++11 compatibility.
  - Remove extraneous include path from build environment.
2014-03-14 08:03:48 -07:00
Vinnie Falco
5478c540cb Add std::integer_sequence C++14 compatibility 2014-03-14 07:57:20 -07:00
Vinnie Falco
e3c1375f36 Add std::integer_sequence C++14 compatibility 2014-03-14 07:57:20 -07:00
Vinnie Falco
4e357601ec Move MultiSocket, RippleSSLContext to common module 2014-03-14 07:57:20 -07:00
Vinnie Falco
3674b01634 Add ripple::byte_view, ripple::const_byte_view 2014-03-14 07:57:20 -07:00
Vinnie Falco
b5d81f4f92 Add beast::buffer_view 2014-03-14 07:57:19 -07:00
Vinnie Falco
f66aee4e7f Add beast::buffer_view 2014-03-14 07:57:19 -07:00
Vinnie Falco
2a99a8350f Add C++11 noexcept compatibility for VS2013 2014-03-14 07:57:19 -07:00
Vinnie Falco
b2f06dbe3c Add C++11 noexcept compatibility for VS2013 2014-03-14 07:57:19 -07:00
sublimator
b78076670e Fix typos: tecMASTER_DISABLED, tecNO_REGULAR_KEY 2014-03-14 07:57:18 -07:00
sublimator
a08a0703b6 Remove Jenkins CI build status badge
This isn't used any more is it?
2014-03-13 21:15:13 -07:00
sublimator
f80561e6aa Travis: disable gdb thread event logging
Attempt 2
2014-03-13 21:15:13 -07:00
JoelKatz
028935a254 Handle unexpected relative paths from __FILE__
Fixes comref#RIPD-133
2014-03-13 16:49:20 -07:00
JoelKatz
f5765b71f2 Handle unexpected relative paths from __FILE__
Fixes comref#RIPD-133
2014-03-13 16:49:20 -07:00
Vinnie Falco
6a6be847c0 Set version to 0.23.0-rc1 2014-03-12 19:05:08 -07:00
Nik Bougalis
4e26108a06 Protect callers of MultiSocket::remote_endpoint from exceptions 2014-03-12 13:51:00 -07:00
JoelKatz
c517d261bb Return a sensible error for unknown inner JSON fields 2014-03-12 00:54:00 -07:00
JoelKatz
5522a23670 Don't relay old proposals. 2014-03-11 22:21:34 -07:00
JoelKatz
64345f90a8 Allow setting LedgerConsensus to TRACE 2014-03-11 22:12:48 -07:00
JoelKatz
879c0d6b78 Be less promiscuous relaying proposals 2014-03-11 21:49:46 -07:00
Nik Bougalis
2e8df429df Expose PeerImp::start instead of requiring the use of accept/connect 2014-03-11 19:02:18 -07:00
JoelKatz
7aa1222310 Fix the "peer action" transition from syncing to full 2014-03-11 19:02:18 -07:00
JoelKatz
2b5142ee4d Make transaction forwarding less promiscuous 2014-03-11 19:02:17 -07:00
Nik Bougalis
e8d7d339ef Transactor refactoring:
- Reorganize transactor source files and VS project
- Don't expose Transactor interfaces to anyone but the TransactionEngine
- Improve compile times
- Begin using Journal
2014-03-11 19:02:17 -07:00
Nik Bougalis
5324a6d59d Don't create a Transactor if we don't have a valid TxID 2014-03-11 19:02:17 -07:00
Nik Bougalis
569b3a46a1 Cleanups:
- Cleanup VotableInteger class and remove unused duplicate
 - Remove obsolete function and move to std functions
 - Fix typos
 - Make isMemoOkay a free function
 - Sanitize error returns
2014-03-11 19:02:17 -07:00
JoelKatz
fc129e43fd Cleanup handling of expired offers 2014-03-11 19:02:16 -07:00
JoelKatz
b22a0f4a97 Ensure offer cleanup is deterministic 2014-03-11 19:02:16 -07:00
JoelKatz
cf63b5c859 Fix logging transactions that throw 2014-03-11 19:02:16 -07:00
David Schwartz
b4593a274d Limit how many reads we defer to avoid overflowing the cache 2014-03-11 19:02:16 -07:00
David Schwartz
163daf012a Add 'MemoData' field 2014-03-11 19:02:16 -07:00
JoelKatz
63df034bcf Clean up job renaming 2014-03-11 19:02:16 -07:00
David Schwartz
60787be80c Check the node store for transaction nodes with metadata 2014-03-11 19:02:15 -07:00
David Schwartz
f42ae3af21 Add ledger_data command to get full ledgers in pieces 2014-03-11 19:02:15 -07:00
David Schwartz
b1fea3c51e Disable retrieving full state trees for non-admins. 2014-03-11 19:02:15 -07:00
David Schwartz
16d2bbd6e5 Avoid disk I/O when data 'moves' in a SHAMap 2014-03-11 19:02:15 -07:00
David Schwartz
2505a908c5 Logging reduction in PeerImp 2014-03-11 19:02:15 -07:00
Nik Bougalis
4b71673ee9 Improve validation of JSON inputs 2014-03-11 19:02:14 -07:00
Nik Bougalis
242494a9ad Allow a server to keep no ledger history, closes #299 2014-03-11 19:02:14 -07:00
Nik Bougalis
3a684ce280 Robust HashPrefix initialization, closes #300 2014-03-11 19:02:14 -07:00
Nik Bougalis
756da7b844 Fix strUnHex parsing of odd-length strings and add unit tests 2014-03-11 19:02:14 -07:00
Nik Bougalis
9c465487ae Cache the result of remote_endpoint at connect/accept time and use it 2014-03-11 19:02:14 -07:00
Donovan Hide
e8002a7a62 Fix ledger log warning, closes #298 2014-03-11 19:02:13 -07:00
Nik Bougalis
5a53b48026 Require a C++11 conforming compiler 2014-03-11 19:02:13 -07:00
Vinnie Falco
6df466c692 Update http code for http parser API changes 2014-03-06 21:44:29 -08:00
Vinnie Falco
b3f725d9fd Update http code for http parser API changes 2014-03-06 21:44:29 -08:00
Vinnie Falco
6c0edd2190 Squashed 'src/beast/beast/http/impl/http-parser/' changes from 547553b..cba704c
cba704c Bump version to 2.2.1
a252d4e fix content-length and chunk-size overflow test
42d6541 add vc project files to .gitignore
fd609ab Bump version to 2.2
efcf75d test: better fix for __APPLE__ test build
9ca484d test: fix build on osx
d7b938b Parse and emit status message of response
11419c8 Use unsigned int as bitfield type.
c4079e7 Add syntax highlighting to README C code
f5c779b Update misleading comment.
3cbd13d test: add amazon.com response test

git-subtree-dir: src/beast/beast/http/impl/http-parser
git-subtree-split: cba704cb2d9f1df80994dd4a791a0fa6cce65720
2014-03-06 21:22:22 -08:00
Vinnie Falco
956f2b98b8 Merge commit '6c0edd2190bfd18ffc523f486367da3724cf98a3' into develop 2014-03-06 21:22:22 -08:00
Vinnie Falco
50f5d5bdf3 Merge commit '6c0edd2190bfd18ffc523f486367da3724cf98a3' into develop 2014-03-06 21:22:22 -08:00
Vinnie Falco
d9a0181189 Set version to 0.22.0 2014-03-04 15:43:34 -08:00
Howard Hinnant
4e3dcd1ce6 Fix beast::asio failures on OS X.
There are 38 unittest failures on OS X.  These changes address all of
them by adjusting which side of the socket (send or receive) gets
shut down.  In each case, the failure was 'Socket is not connected'.
I've interpreted that to mean that the other thread had already shut
down its side of the connection.
2014-03-04 15:43:33 -08:00
Howard Hinnant
09570996a9 Fix beast::asio failures on OS X.
There are 38 unittest failures on OS X.  These changes address all of
them by adjusting which side of the socket (send or receive) gets
shut down.  In each case, the failure was 'Socket is not connected'.
I've interpreted that to mean that the other thread had already shut
down its side of the connection.
2014-03-04 15:43:33 -08:00
JoelKatz
adc4c855ca Fix the ledger range we advertise to peers 2014-03-04 15:43:33 -08:00
Nik Bougalis
8b1df06a94 PeerFinder fixes:
* Fix local advertisement (was missing)
* Fix Livecache histogram display
* If no [ips] are specified, use r.ripple.com
* Use different backing stores for PeerFinder and Validator databases
2014-03-04 15:43:32 -08:00
Vinnie Falco
a690690b53 Remove unused TextDiff 2014-03-04 07:23:53 -08:00
Vinnie Falco
7c81eec30c Remove unused TextDiff 2014-03-04 07:23:53 -08:00
Vinnie Falco
b9d0bf8822 Consolidate C++14 compatibility into new headers 2014-03-03 18:51:56 -08:00
Vinnie Falco
faa999d6d0 Consolidate C++14 compatibility into new headers 2014-03-03 18:51:56 -08:00
David Schwartz
370bfb7a22 Permit memos up to 1Kb.
* Overlong memos are basically treated like invalid signatures.
* Ability to clear message key.
2014-03-03 18:51:55 -08:00
David Schwartz
ae649ec917 Signature canonicalization and transaction mutation fixes 2014-03-03 18:51:55 -08:00
JoelKatz
93b44fcdc1 Return an empty pointer from getLedgerBySeq if sequence in future 2014-03-03 14:07:18 -08:00
David Schwartz
1fe57720c4 Legacy Pathfinding API improvements:
* Use the cache for source/dest currencies
* Allow a search depth and initial paths to be specified in old pathfinding
2014-03-03 10:59:31 -08:00
JoelKatz
fca8fa1b1b Clean up ledger fetch reasons.
Don't trigger immediately when fetching historical ledgers.
2014-03-03 10:57:36 -08:00
David Schwartz
81082ad10f Don't check the node store for proposed txn nodes 2014-03-03 10:57:31 -08:00
David Schwartz
2c515636cb Release the InboundLedger lock during getMissingNodes 2014-03-03 10:57:26 -08:00
David Schwartz
2f7ac98e34 Improve I/O when fetching ledgers
* negative cache for node store
* async fetch, thread pool for node store
* read barrier logic for node store
* SHAMap getMissingNodesNB (non-blocking)
* non-blocking getMissingNodes traverse
* tune caches
2014-03-03 10:56:48 -08:00
Nik Bougalis
37b39ed1a1 Update LICENSE 2014-03-01 11:54:11 -08:00
Nik Bougalis
73485d5a23 Resolve hostnames found in the [ips] config section 2014-03-01 11:53:57 -08:00
Nik Bougalis
28c7827f14 Calculate program file directories:
* Determine location of database files in Config
* Inject database directory or file path in PeerFinder and Validators
* PeerFinder and Validators will share the same sqlite file
2014-03-01 11:53:57 -08:00
JoelKatz
e055dc1513 WebSocket dispatch changes.
Don't let one connection hold a thread for too long without
having to wait for another turn
2014-02-28 12:18:15 -08:00
JoelKatz
c173f14fc0 Give pathfinding updates priority over client and RPC requests 2014-02-28 12:15:41 -08:00
Howard Hinnant
bb02112752 Fix clang warnings 2014-02-28 12:15:12 -08:00
Howard Hinnant
cd30e552a7 Fix clang warnings 2014-02-28 12:15:12 -08:00
Vinnie Falco
8eddcfd3d5 Remove unused classes 2014-02-28 12:03:33 -08:00
Vinnie Falco
9bf1a76e91 Remove unused classes 2014-02-28 12:03:33 -08:00
Vinnie Falco
2957b688fd PeerFinder and Peers fixes:
- Fix bootcache incorrect failure on socket cancel
- Fix peer connect race on stop
- Simplify some loops
- Require boost 1.55 via static_assert
2014-02-28 12:03:33 -08:00
JoelKatz
add40d524f Merge pull request #296 from nbougalis/quickfix-jobcount
Fix variable mismatch for job counts
2014-02-26 14:38:51 -08:00
Nik Bougalis
04a55e35b6 Fix variable mismatch for job counts 2014-02-26 14:29:00 -08:00
JoelKatz
955ce45448 Fix the assert on a self-connect 2014-02-24 22:30:04 -08:00
Vinnie Falco
78e1995365 New utility classes, containers, C++14 compatibility, and fixes:
* Add std::equal_to <void> (since C++14)
* Add heterogeneous std::equal (since C++14)
* Add maybe_const
* Add empty_base_optimization
* Add is_constructible specialization for pair, tuple
* Add aged associative containers:
  - aged_set, aged_map, aged_multiset, aged_multimap
  - aged_unordered_set, aged_unordered_map,
  - aged_unordered_multiset, aged_unordered_multimap
* Fix auto keyword pass by reference
* Fix basic_seconds_clock warning and project file
2014-02-24 19:25:01 -08:00
Vinnie Falco
995e64a205 PeerFinder fixes:
* Fix split horizon using recent address cache
* Change message tuning parameters to reduce dead messages
* Improved peer handout algorithm for addresses
* Improved handout algorithm for redirects
* Improved selection algorithm for autoconnect
* Faster autoconnection strategy
* Consolidate deadline timers
* Send empty endpoints message as a socket ping
* Fix hop count adjustments for live cache filtering
* Remove broken Peer::isConnected function
* Optimized Livecache for handouts
* Optimized Bootcache for handouts
* Remove uptime metric from Bootcache entries
* Add histogram to Livecache print output
2014-02-24 19:25:01 -08:00
Vinnie Falco
bf085f0ef3 New utility classes, containers, C++14 compatibility, and fixes:
* Add std::equal_to <void> (since C++14)
* Add heterogeneous std::equal (since C++14)
* Add maybe_const
* Add empty_base_optimization
* Add is_constructible specialization for pair, tuple
* Add aged associative containers:
  - aged_set, aged_map, aged_multiset, aged_multimap
  - aged_unordered_set, aged_unordered_map,
  - aged_unordered_multiset, aged_unordered_multimap
* Fix auto keyword pass by reference
* Fix basic_seconds_clock warning and project file
2014-02-24 19:25:01 -08:00
David Schwartz
1374b37882 Remove dead serializer signature code 2014-02-24 18:28:44 -08:00
JoelKatz
e275f4eb9d Handle a removed peer when counting ledger use 2014-02-24 18:28:43 -08:00
JoelKatz
652d809129 Validate params before dispatching 2014-02-24 18:28:43 -08:00
JoelKatz
c186519bcf Ledger fetch fixes. 2014-02-24 18:28:42 -08:00
Nik Bougalis
870fb4f291 Fix missing break on mtCLUSTER handler 2014-02-24 18:28:42 -08:00
Nik Bougalis
7cd63489f4 Refactor Job tracking and statistics gathering 2014-02-23 01:47:35 -08:00
Vinnie Falco
616a53888e Use forward_tuple to prevent needless copies 2014-02-22 21:33:01 -08:00
Vinnie Falco
c48b9244f2 Remove deprecated IPAddress 2014-02-22 21:33:00 -08:00
Vinnie Falco
a336cc26f9 Remove deprecated IPAddress 2014-02-22 21:33:00 -08:00
Howard Hinnant
382088c456 Add find_create stat to InboundLedgers 2014-02-22 21:33:00 -08:00
Howard Hinnant
ff80531db4 Update LICENSE 2014-02-22 21:32:59 -08:00
Vinnie Falco
105cf3cd1e Revert "Tidy up build scripts:"
This reverts commit 66b5f75142.
2014-02-22 21:32:59 -08:00
JoelKatz
38ba7e695a Don't hold the master lock 2014-02-21 14:46:57 -08:00
JoelKatz
996326a00e Configurable fetch depth. 2014-02-17 17:26:58 -08:00
JoelKatz
f2beb82b97 Pathfinding dispatch improvements
* Keep requests forwards, flip only on insert
* Insert requests in more sensible order (after new, before old)
* Remove a redundant cache/request check
2014-02-17 17:26:50 -08:00
JoelKatz
41c0702408 Fix custom currency parsers 2014-02-17 17:26:43 -08:00
Nik Bougalis
66b5f75142 Tidy up build scripts:
* Relax the boost -mt link requirement for Debian
* Tidy up scons output, reduce verbosity, add color
2014-02-17 15:50:51 -08:00
JoelKatz
c2a16ddbab Cannot call gotTXData without master lock ... yet! 2014-02-14 14:26:03 -08:00
Vinnie Falco
5bb194cf89 PeerFinder fixes:
* Add Livecache property stream support
* Tidy up log output
* Move peer code to ripple_overlay module
* Remove or hide some Peer interfaces
* Fix asserts by removing isConnected which was not thread safe
2014-02-14 14:00:51 -08:00
Vinnie Falco
e219008320 Make abstract_clock members const 2014-02-14 11:14:09 -08:00
Vinnie Falco
645b9a01c7 Make abstract_clock members const 2014-02-14 11:14:09 -08:00
Vinnie Falco
3a1a5d12de Refactor PeerFinder:
* Revise documentation in README.md
* Inject abstract_clock in Manager
* Introduce the Slot object as a replacement for Peer
* New bullet-proof method for slot accounting
* Replace Peer with Slot for tracking connections
* Prevent duplicate outbound connection attempts
* Improved connection and bootstrap business logic
* Refactor PeerImp, PeersImp private interfaces
* Give PeersImp access to the PeerImp interface
* Handle errors retrieving endpoints from asio sockets
* Use weak_ptr to manage PeerImp lifetime
* Better handling of socket closure in PeerImp
* Improve the orderly shutdown logic of PeersImp
2014-02-13 14:19:27 -08:00
Vinnie Falco
f603ae175b Add chrono APIs to DeadlineTimer 2014-02-12 12:58:20 -08:00
Vinnie Falco
12748e7539 Add chrono APIs to DeadlineTimer 2014-02-12 12:58:20 -08:00
Nicholas Dudfield
2f69d4c8ee Update Travis matrix:
* New clang compiler target
* Sconstruct changes for clang
* Patches to support clang
2014-02-11 19:13:51 -08:00
Nicholas Dudfield
f62d034692 Fix clang compile error 2014-02-11 19:13:45 -08:00
Nicholas Dudfield
8dbf8b9038 Fix clang compile error 2014-02-11 19:13:45 -08:00
Vinnie Falco
fdfe047f3e Fix new RPC dispatcher params 2014-02-11 19:05:08 -08:00
Vinnie Falco
deb180cc83 Update beast project file 2014-02-10 19:48:37 -08:00
Vinnie Falco
38c3f84c9f Update beast project file 2014-02-10 19:48:37 -08:00
Vinnie Falco
9c5b071556 Fix crash on exit in ~InboundLedger 2014-02-08 11:07:10 -08:00
Vinnie Falco
17b970a387 Fix insight object lifetimes in Group 2014-02-08 10:48:54 -08:00
Vinnie Falco
46dc52e449 Fix insight object lifetimes in Group 2014-02-08 10:48:54 -08:00
Vinnie Falco
f469e3853d Insight support for jobs:
* Add insight Groups to Application singleton
* Put JobQueue metrics into "jobq" Group
* Add queued time to Job
* Add per-type Job queue time metrics
* Add per-type Job execution time metrics
* Break JobQueue sources out of the namespace
* Use free function to create the JobQueue
2014-02-08 10:09:22 -08:00
Vinnie Falco
d060eb498f Improved logging for insight stat packets 2014-02-08 09:33:04 -08:00
Vinnie Falco
a681a4fcd4 Improved logging for insight stat packets 2014-02-08 09:33:04 -08:00
Vinnie Falco
575b0bb7b0 Fix gcc compile 2014-02-07 09:09:01 -08:00
sublimator
588cf4bfca Update travis to use boost 1.55 2014-02-07 08:09:24 -08:00
NATTSiM
c2bc7e2c30 Fix clang compile 2014-02-07 08:09:15 -08:00
NATTSiM
9cc8c341e7 Fix clang compile 2014-02-07 08:09:15 -08:00
Vinnie Falco
9b657ba224 Refactor RPC module:
* Move JsonPropertyStream to ripple_json
* Remove unused RPC service manager
* Recreate RPC module in app code area
* Add RPC::Manager
* Add DoPrint handler
2014-02-06 18:21:08 -08:00
Vinnie Falco
eb5691e8fa Change bassert to always call assert 2014-02-06 14:30:03 -08:00
Vinnie Falco
9bc6e83f8a Change bassert to always call assert 2014-02-06 14:30:03 -08:00
Nik Bougalis
572aae320d Performance fixes: decongest master lock 2014-02-05 15:57:10 -08:00
Nik Bougalis
2906899811 Ignore ports when checking RPC IP filter list 2014-02-05 15:57:09 -08:00
Nik Bougalis
1a6bf88900 Resolver Work:
* Don't stall during shutdown
* Properly handle unit test execution
* Handle whitespace when parsing names to resolve
2014-02-05 15:57:09 -08:00
Nik Bougalis
e60b28980a PeerFinder work and refactoring:
* Implement PeerFinder business logic.
* Support fixed peers (including DNS support).
* Add journal support to Peer and Peers.
* Refactor PeerDoor support.
* Tidy up Peers and eliminate connection functionality and timers.
* Refactor Peer interface and add journal support.
* Allow construction of incoming Peer using an existing socket.
* Remove TESTNET support.
* Allow connections from/to cluster peers without consuming slots
* Misc. cleanups.
2014-02-05 15:56:04 -08:00
Vinnie Falco
864b20565b Refactor IP::Endpoint 2014-02-05 15:53:16 -08:00
Vinnie Falco
a253b2ef4b Refactor IP::Endpoint 2014-02-05 15:53:16 -08:00
Vinnie Falco
3e6818b407 Remove obsolete Visual Studio projects 2014-02-05 15:42:28 -08:00
Vinnie Falco
0c2e35edc9 Remove obsolete Visual Studio projects 2014-02-05 15:42:28 -08:00
Vinnie Falco
d0970397a6 Revert system test changes:
* Revert "Shutdown rippled before http server in json rpc test to avoid http server potentially receiving messages due to automatic ledger close interval."
* Revert "Update ripple-lib integration tests"

This reverts commit 83442825e5.
2014-02-04 15:18:36 -08:00
Vinnie Falco
0afbda0351 Redirect Visual Studio 2013 project output 2014-02-04 09:25:27 -08:00
Vinnie Falco
2009f8b1ca Add insight support to TaggedCache, KeyCache:
* Move TaggedCache, KeyCache to common
* Add radmap module, FullBelowCache class
* Add get_seconds_clock
* Inject FullBelowCache in SHAMap
2014-02-03 23:00:45 -08:00
Vinnie Falco
aaced060bf Add basic_seconds_clock, insight::Groups 2014-02-03 22:55:47 -08:00
Vinnie Falco
35715a0146 Add basic_seconds_clock, insight::Groups 2014-02-03 22:55:47 -08:00
Vinnie Falco
af77ff3eed Update Visual Studio 2013 project file 2014-02-03 22:36:29 -08:00
Vinnie Falco
20e27ceb04 Update Visual Studio 2013 project file 2014-02-03 22:36:29 -08:00
Vinnie Falco
7fb614f7af Fix application pointer singleton lifetime 2014-02-03 22:36:28 -08:00
Nicholas Dudfield
83442825e5 Shutdown rippled before http server in json rpc test to avoid http server potentially receiving messages due to automatic ledger close interval. 2014-02-03 22:36:28 -08:00
Nik Bougalis
123c482a69 Robustly validate input to the 'ledger' RPC command 2014-02-03 18:43:21 -08:00
Vinnie Falco
98162cec33 Update project build requirements
* Add Visual Studio 2013 project file
* Update SConstruct for boost 1.55.0
2014-02-03 16:58:32 -08:00
Vinnie Falco
3f091fce59 Update project build requirements
* Add Visual Studio 2013 project file
* Update SConstruct for boost 1.55.0
2014-02-03 16:58:32 -08:00
wltsmrz
6c5f88aa25 Update ripple-lib integration tests 2014-02-03 10:42:34 -08:00
Vinnie Falco
23eccebf5b Fix crash on exit via Application singleton 2014-02-01 21:28:12 -08:00
Vinnie Falco
15112c1a27 Fix mutable tx json field for autofill_fee 2014-02-01 07:10:53 -08:00
David Schwartz
d0ca81ff36 visitLeaves must visit all branches 2014-01-31 19:26:53 -08:00
David Schwartz
3e218c494d Enlarge the humanAccountID cache 2014-01-31 19:26:53 -08:00
David Schwartz
88bd5b12a4 Raise RPC time and size limits 2014-01-31 19:26:53 -08:00
David Schwartz
5df5983f88 Fix missing call to setHeartbeatTimer 2014-01-31 19:26:53 -08:00
David Schwartz
aa5ca7cea5 Don't copy the parameters when calling lookupLedger 2014-01-31 19:26:53 -08:00
David Schwartz
02483b2e0b Avoid race conditions updating ledger fee entries 2014-01-31 19:26:53 -08:00
David Schwartz
f7817866ba call pubValidatedTransactions, we may have book listeners 2014-01-31 19:26:53 -08:00
JoelKatz
d62287d54b Calculate correct fee in RPC sign/submit, error if over limit 2014-01-31 19:26:53 -08:00
Nicholas Dudfield
aad074cd8e Tweak to path-finding tests. Specify test patterns outside of mocha.opts 2014-01-31 19:05:10 -08:00
Vinnie Falco
048a2d7bc3 Fix PropertyStream overloads 2014-01-29 07:53:27 -08:00
Vinnie Falco
580d179dd0 Tidy up Validators logging 2014-01-29 07:53:27 -08:00
Vinnie Falco
616a514c4d Fix PropertyStream overloads 2014-01-29 07:53:27 -08:00
NATTSiM
bac8d41954 Pass IPAddress in getAdminRole 2014-01-28 22:52:11 -08:00
JoelKatz
f295bb20a1 Set version to 0.21.0.rc2 2014-01-24 11:17:16 -08:00
JoelKatz
b5ffa2351a DirectoryEntryIterator fix 2014-01-24 10:54:56 -08:00
JoelKatz
1b37b52071 Whitespace changes 2014-01-24 10:54:47 -08:00
JoelKatz
b1ffd10079 Fix "limit" mishandling in doBookOffers 2014-01-24 10:53:55 -08:00
Vinnie Falco
39235f5b91 Set version to 0.21.0.rc1 2014-01-23 23:31:26 -05:00
JoelKatz
8825d94636 Temporarily change getBookPage not to use OB iterators 2014-01-23 16:26:45 -08:00
JoelKatz
c8a7b2af56 Prevent infinite loop in getBookPage 2014-01-23 16:05:38 -08:00
JoelKatz
d22b25c030 Set version to 0.21.0 2014-01-23 13:38:38 -08:00
JoelKatz
d475994e02 Pairwise no ripple:
* Cannot set noRipple flag with negative balance.
* Paths with consecutive no ripple links are invalid
* Adjust pathfinding value of no ripple out paths
* Check for no ripple when adding links in pathfinding
* Remove old noRipple logic
* Update trust line delete logic
2014-01-23 13:38:33 -08:00
JoelKatz
f0bb3dfdfb Never allow a retry as a final result 2014-01-23 13:38:28 -08:00
JoelKatz
e7f0b8eca6 Add DeliveredAmount to transaction metadata 2014-01-23 13:38:25 -08:00
JoelKatz
0bab6a9fec Add directory and order book iterators
This should fix the crossed order book bug.
* Change OfferCreate::takeOffers to use new iterators
* Change NetworkOps::getBookPage to use new iterators
* If we find an offer in the book but not the ledger, deindex it
2014-01-23 13:38:11 -08:00
David Schwartz
9486fc416c Support AccountTxnID and LastLedgerSequence. 2014-01-23 13:37:46 -08:00
JoelKatz
fb63aa737a Revert d2953f602e 2014-01-23 13:36:31 -08:00
JoelKatz
58a6ca1d3d Remove extraneous logging 2014-01-23 13:24:51 -08:00
JoelKatz
505f029edb Clean up 'destination_currencies' in new pathfinding reply 2014-01-23 13:24:43 -08:00
JoelKatz
815659b898 Replace a lock with an atomic in new pathfinding 2014-01-23 13:24:33 -08:00
JoelKatz
07d16f280c Clean up the checkAccept path to use the ledger sequence 2014-01-23 13:24:28 -08:00
JoelKatz
f88ddc947c Handle non-object in 'json' RPC method 2014-01-23 13:24:22 -08:00
Vinnie Falco
65ffdff40c Insight support for ResourceManager 2014-01-21 10:28:36 -05:00
Vinnie Falco
c95dccfec6 Move PathRequests to separate files 2014-01-21 10:28:36 -05:00
Vinnie Falco
307ad244b0 Use duration in insight::Event, add chrono_util 2014-01-21 10:28:35 -05:00
Vinnie Falco
fe83f471f5 Use duration in insight::Event, add chrono_util 2014-01-21 10:28:35 -05:00
sublimator
d2953f602e Error reporting tests 2014-01-21 10:28:35 -05:00
Vinnie Falco
0c0fa877cf Add ScopedPointer::reset 2014-01-21 10:28:34 -05:00
Vinnie Falco
9d07ddeae1 Improved human readable JSON-RPC error messages 2014-01-21 10:28:34 -05:00
Vinnie Falco
ef7810bc95 Add ScopedPointer::reset 2014-01-21 10:28:34 -05:00
David Schwartz
486539b3d3 Make offerDelete and fill Items more robust. 2014-01-21 10:28:34 -05:00
David Schwartz
990fb20a2a OrderBookDB::addOrderBook cleanup 2014-01-21 10:28:33 -05:00
Vinnie Falco
9b61a83721 Refactor, tidy up:
* Fix for msvc std::function return types
* Convert macros to constants
* Add Journal to PeerSet and use in InboundLedger
* Break lines and add annotations
* Remove some warnings
2014-01-21 10:28:33 -05:00
JoelKatz
f753519976 Ledger fetch improvements. Fetch policy improvements. 2014-01-17 16:06:15 -08:00
David Schwartz
663e38dcdd Locking and dispatching performance improvements:
* Avoid taking the master lock in most peer operations
* Dispatch recvGetLedger to JobQueue
* Dispatch consensus ledger fetches.
* Release master lock earlier in RPCHandler
2014-01-17 16:05:48 -08:00
Vinnie Falco
7570b6489d Fix and tidy up NodeStore
* Use std::unique_ptr
* Move globals to Manager singleton (fixes RocksDB exit crash)
2014-01-17 15:21:51 -05:00
Vinnie Falco
49bd8ac880 Tidy up for C++11, and fixes:
* Remove shared_ptr legacy support
* Add make_unique support for pre-C++14 environments
* Fix comparison bug in sqdb
* Use std::shared_ptr in a few places
2014-01-17 12:19:04 -05:00
Vinnie Falco
c341d1a71e Tidy up for C++11, and fixes:
* Remove shared_ptr legacy support
* Add make_unique support for pre-C++14 environments
* Fix comparison bug in sqdb
* Use std::shared_ptr in a few places
2014-01-17 12:19:04 -05:00
Vinnie Falco
fa10e90c9d Use abstract_clock 2014-01-17 12:19:04 -05:00
Vinnie Falco
68501763dd Refactor KeyCache 2014-01-17 12:19:04 -05:00
Vinnie Falco
969ea98fd9 Add std::make_unique 2014-01-17 12:19:03 -05:00
Vinnie Falco
cac1d555be Add std::make_unique 2014-01-17 12:19:03 -05:00
NATTSiM
bd0f4b95ae Fix Clang compile and link errors 2014-01-16 17:18:05 -05:00
NATTSiM
25ff77c2fd Fix Clang compile and link errors 2014-01-16 17:18:05 -05:00
Vinnie Falco
2870c7f457 Workaround for MSVC std::function bug 2014-01-15 19:10:08 -08:00
JoelKatz
ab8d7a86ae Dispatch peerHas to JobQueue 2014-01-14 11:24:41 -08:00
JoelKatz
809359e81e Correctly handle empty account tree in ledger fetch 2014-01-14 11:24:32 -08:00
JoelKatz
6e4cd5bc9c Don't send nodes twice in getNodeFat 2014-01-14 11:24:01 -08:00
NATTSiM
dda419ddd6 Improved PropertyStream find and print routines 2014-01-13 21:51:31 -08:00
NATTSiM
de018bd582 Improved PropertyStream find and print routines 2014-01-13 21:51:31 -08:00
Vinnie Falco
544642a6ea Fix io_latency_probe hang on exit 2014-01-13 18:24:22 -08:00
JoelKatz
06737bb36f SHAMapSync bugfix. Cannot avoid push in getMissingNodes 2014-01-13 09:50:54 -08:00
JoelKatz
7efbfa2d20 Limit legacy pathfinding requests 2014-01-10 23:09:26 -08:00
Vinnie Falco
1f9e2c920c Add io_latency_probe 2014-01-10 22:54:00 -08:00
Vinnie Falco
4d5df92cbc Add io_latency_probe 2014-01-10 22:54:00 -08:00
David Schwartz
1fcb2872b9 Reduce log priorities. 2014-01-10 22:54:00 -08:00
David Schwartz
00c87ca2dd Add LES::dirIsEmpty function to check if a directory is empty 2014-01-10 22:53:59 -08:00
JoelKatz
d474d68566 Order book subscribe cleanups. 2014-01-10 22:53:59 -08:00
David Schwartz
93e03804d0 SHAMapSync cleanups and performance improvements 2014-01-10 22:53:58 -08:00
JoelKatz
4591658160 PathRequests object to own all path requests. 2014-01-10 22:53:57 -08:00
JoelKatz
a2109b4bda Remove files inadvertently added 2014-01-10 22:53:57 -08:00
Vinnie Falco
deafea9c88 [REMOVE] Allow gcc 4.7 and later 2014-01-10 22:53:57 -08:00
Nicholas Dudfield
93f1a05f5c Update build for gcc 4.8.x:
* Use gcc 4.8.x, boost 1.54
* Honor CC,CXX,PATH environment variables
* Prevent compilation with unsupported toolchains
* Print g++ version during Travis build
* Run built-in unit tests after Travis build
2014-01-10 16:24:17 -08:00
Vinnie Falco
95a573b755 Set version to 0.20.1 2014-01-08 17:08:27 -08:00
Nik Bougalis
43f38a240e Don't log StatsD messages to the console by default 2014-01-08 16:57:47 -08:00
Nik Bougalis
2a4623814c Don't log StatsD messages to the console by default 2014-01-08 16:57:47 -08:00
Vinnie Falco
1017adf743 Set version to 0.20.0 2014-01-08 16:15:12 -08:00
Vinnie Falco
34fb12344c Fix JobQueue 2014-01-08 14:55:10 -08:00
Vinnie Falco
ce3358bdf8 Improve diagnostics for ResourceManager 2014-01-08 11:18:46 -08:00
Vinnie Falco
1159dadfdb Fix missing jtACCEPT job limit 2014-01-08 11:18:45 -08:00
Vinnie Falco
62516ef07f Refactor TaggedCache 2014-01-07 21:14:14 -08:00
Vinnie Falco
705e629001 Add std::hash <std::pair> specialization 2014-01-07 21:14:13 -08:00
Vinnie Falco
eecd305efd Add std::hash <std::pair> specialization 2014-01-07 21:14:13 -08:00
Vinnie Falco
edc60e2e01 Fix warning in chrono_io 2014-01-07 21:14:07 -08:00
Vinnie Falco
a83fa6b2b2 Fix warning in chrono_io 2014-01-07 21:14:07 -08:00
Vinnie Falco
b2feafa94c Use abstract_clock and improved tests, in ResourceManager
Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj.filters
2014-01-07 17:23:26 -08:00
Vinnie Falco
9f65b26288 Add abstract_clock, manual_clock, chrono_io
Conflicts:
	src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
2014-01-07 17:17:26 -08:00
Vinnie Falco
2d234e500d Add abstract_clock, manual_clock, chrono_io
Conflicts:
	src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
2014-01-07 17:17:26 -08:00
Vinnie Falco
fee0e7b20e Fix bind in call to addJob 2014-01-07 17:08:01 -08:00
JoelKatz
a0f6429652 Add LedgerHolder class, use in LedgerMaster 2014-01-07 15:57:51 -08:00
JoelKatz
8f8b2ae4a3 Handle offers in quality directory but not in ledger 2014-01-07 15:57:50 -08:00
JoelKatz
9abdd16721 Release the master lock earlier in a few cases 2014-01-07 15:57:50 -08:00
JoelKatz
1e5963aeeb Move some operations from the I/O queue to the Job queue 2014-01-07 15:57:50 -08:00
JoelKatz
e25a83bb39 Some tiny bugfixes:
* Don't let ledger idle interval get too short
* Fix CBigNum::setuint256
* Fix SqliteStatement::isError
* Remove dead code, fix incorrect comments
* Check for NULL earlier in CKey constructors
* Prevent expire times from underflowing in TaggedCache
2014-01-07 15:57:49 -08:00
David Schwartz
e3a67b13ff Reset liquidity before retrying rippleCalc 2014-01-07 15:57:48 -08:00
JoelKatz
750cbb8399 Improvements because items in SHAMaps are immutable:
* SHAMapItem::getData is not needed
* SHAMapTreeNode::getItem is not needed
* SHAMapTreeNode::getData is not needed
* No need to copy them when constructing transactions
* No need to copy them when computing map deltas
* No need to copy them in deepCompare
* No need to copy them in SHAMapTreeNode's copy constructor
2014-01-07 15:57:48 -08:00
JoelKatz
045beb5f36 Concurrent SHAMap code
Use shared lock for SHAMap itself and concurrent map for nodes
2014-01-07 15:57:47 -08:00
JoelKatz
cd8234acba Pathfinding bugfix. Missing lock. 2014-01-07 15:57:46 -08:00
JoelKatz
de85a7c2bd Pathfinding improvements:
* Make each path request track whether it needs updating.
* Improve new request handling, reverse order for processing requests.
* Break to handle new requests immediately.
* Make mPathFindThread an integer rather than a bool. Allow two threads.
* For old pathfinding, if the ledger is unspecified, use the PathRequest's RippleLineCache.
* Log new pathfinding request latencies.
* Suspend processing requests if server is backed up.
2014-01-07 15:57:46 -08:00
Vinnie Falco
496b337b27 General refactoring, using C++11
* Remove broken RecycledObjectPool

* Fix beast::ServiceQueue using List instead of LockFreeStack

* Add class semaphore, fixes broken Semaphore

* Move crytpo module files to new beast directory

* Use c++11 replacements for boost and beast types:
  - std::atomic instead of beast::Atomic
  - std::function instead of boost::function, beast::function
  - std::unique_ptr instead of beast::ScopedPointer
  - std::shared_ptr instead of boost::shared_ptr

* Remove modules:
  - beast_db
  - beast_crypto
  - beast_extras

* Remove unnecessary classes:
  - AbstractFifo
  - AddConst
  - AtomicCounter
  - AtomicFlag
  - AtomicPointer
  - AtomicState
  - CopyConst
  - Expression
  - ForwardList
  - IfCond
  - Interval
  - IntrusiveArray
  - KeyvaDB
  - PointerToOther
  - PointerTraits
  - RemoveConst
  - RemoveConstVolatile
  - RemoveReference
  - RemoveVolatile
  - SharedObjectArray
  - SingleThreadedSharedObject
  - SophiaDB factory
  - SortedSet
  - WeakReference
  - beast::unique_ptr
2014-01-07 15:57:45 -08:00
Vinnie Falco
087301933a General refactoring, using C++11
* Remove broken RecycledObjectPool

* Fix beast::ServiceQueue using List instead of LockFreeStack

* Add class semaphore, fixes broken Semaphore

* Move crytpo module files to new beast directory

* Use c++11 replacements for boost and beast types:
  - std::atomic instead of beast::Atomic
  - std::function instead of boost::function, beast::function
  - std::unique_ptr instead of beast::ScopedPointer
  - std::shared_ptr instead of boost::shared_ptr

* Remove modules:
  - beast_db
  - beast_crypto
  - beast_extras

* Remove unnecessary classes:
  - AbstractFifo
  - AddConst
  - AtomicCounter
  - AtomicFlag
  - AtomicPointer
  - AtomicState
  - CopyConst
  - Expression
  - ForwardList
  - IfCond
  - Interval
  - IntrusiveArray
  - KeyvaDB
  - PointerToOther
  - PointerTraits
  - RemoveConst
  - RemoveConstVolatile
  - RemoveReference
  - RemoveVolatile
  - SharedObjectArray
  - SingleThreadedSharedObject
  - SophiaDB factory
  - SortedSet
  - WeakReference
  - beast::unique_ptr
2014-01-07 15:57:45 -08:00
JoelKatz
52333b8bd4 Fix a compiler warning in Ledger::visitStateItems 2014-01-07 15:48:50 -08:00
JoelKatz
3768b3c3ca Fix a pathfinding bug 2014-01-07 15:48:50 -08:00
JoelKatz
09b39e107d Fix subscribing to "real time" transactions. 2014-01-07 15:48:49 -08:00
Vinnie Falco
4b1155bf32 Improved diagnostic for RocksDB error codes
Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj.filters
2014-01-07 15:46:38 -08:00
Vinnie Falco
3c7fc31c95 Add ripple_common module
Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj.filters
2014-01-07 15:15:44 -08:00
Nicholas Dudfield
da3881a486 Make websocket-test the first test, and give custom timeouts of 1000ms 2014-01-05 13:40:47 +07:00
Nicholas Dudfield
ff12d9adaa Run server-test and websocket-test first. Show stderr upon abnormal rippled exit 2014-01-05 13:09:42 +07:00
Vinnie Falco
3a895ccfaa Reduce StatsDCollector log verbosity 2014-01-02 19:32:27 -08:00
Vinnie Falco
528cf56f80 Reduce StatsDCollector log verbosity 2014-01-02 19:32:27 -08:00
Vinnie Falco
0ebe3f1f35 Disable NameResolver temporarily 2014-01-02 16:12:55 -08:00
Vinnie Falco
328680b6cd Fix Resolver contract check 2014-01-02 16:10:49 -08:00
Vinnie Falco
f9dca105a6 Improved async stop for Resolver
Conflicts:
	src/ripple_app/peers/NameResolver.cpp
2014-01-02 15:38:03 -08:00
Vinnie Falco
3664db61e7 Fix static storage duration issue with some Journal logs 2014-01-02 15:21:33 -08:00
Vinnie Falco
49677aa799 Fix RippleBookType and unit tests 2013-12-29 11:33:50 -08:00
NATTSiM
eb19343f91 Fix clang compile 2013-12-27 17:46:51 -08:00
NATTSiM
27b771e2ba Fix clang compile 2013-12-27 17:46:51 -08:00
Vinnie Falco
6527cdfa97 Add RippleAsset types
Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj.filters
2013-12-27 17:21:11 -08:00
JoelKatz
b2dbe8ef83 Ledger acquire fixes/cleanups/logging
* Inbound ledger and SHAMapAddNode cleanup
    * Log acquire stats
    * Fix progress logic
    * Remove ledgers we no longer need to acquire
    * Stash stale state data in our fetch pack, it can still be useful
    * Stash in fetch pack if acquire terminated while job was pending
    * Account for duplicate/invalid nodes in a few cases previously missed
    * Dispatch each InboundLedger once (not per data)
    * Trigger only the "best" peer
    * Don't call tryAdvance on failed acquires
2013-12-27 16:48:03 -08:00
NATTSiM
9bdb0774ad Make InboundLedgers, LedgerConsensus abstract 2013-12-27 16:48:03 -08:00
Vinnie Falco
893b2d4587 Add AbstractObject, cyclic_iterator, Journal improvements 2013-12-27 16:47:43 -08:00
Vinnie Falco
8c2ec2cfbe Add AbstractObject, cyclic_iterator, Journal improvements 2013-12-27 16:47:43 -08:00
Wolfgang Spraul
00f959ab7e removed boost_random 2013-12-26 14:31:22 -08:00
Vinnie Falco
f9c4070ad3 Add FetchPack unit test 2013-12-22 12:57:44 -08:00
Vinnie Falco
074325a7ea Inject SHAMap missing node handler dependency 2013-12-22 12:38:07 -08:00
JoelKatz
2f521a6a91 Build fetch packs correctly. 2013-12-22 12:38:07 -08:00
sublimator
07959b3cc9 Allow to full network limit in Amount::isLegalNet 2013-12-20 15:44:03 -08:00
The Doctor
21faf8eaeb Improvements to initscript and default configuration.
* Added absolute paths to the [node_db] and [debug_logfile] stanzas in the config file.

* Changed some tabs into spaces for consistency.

* Added directory tree sanity checking to initscript.

Signed-off-by: The Doctor <drwho@virtadpt.net>
2013-12-20 15:38:30 -08:00
Nik Bougalis
3e2b5dcc3d Hostname resolution support for Peers 2013-12-19 14:50:03 -08:00
Nik Bougalis
370d98a858 Add reference counting to AsyncObject 2013-12-19 14:39:26 -08:00
Nik Bougalis
88a8433d31 Add reference counting to AsyncObject 2013-12-19 14:39:26 -08:00
Vinnie Falco
81d418007a Add CollectorManager for Beast.Insight support 2013-12-16 18:08:11 -08:00
Vinnie Falco
d11983ae32 Add Beast.Insight stats collection module 2013-12-16 12:22:25 -08:00
Vinnie Falco
f88fcf55a3 Add Beast.Insight stats collection module 2013-12-16 12:22:25 -08:00
Vinnie Falco
42692abd1c Add stl module for c++11 compatibility classes 2013-12-16 11:35:21 -08:00
Vinnie Falco
561c8dea08 Add stl module for c++11 compatibility classes 2013-12-16 11:35:21 -08:00
David Schwartz
de92ac9e0b Websocket improvements:
* Log on_close/on_fail/on_open calls.
* Ping out connections.
* Improve ping logic.
* On websocket ping out, close abnormally.
* Avoid deadlock when shutting down websocket endpoint
2013-12-16 09:40:15 -08:00
JoelKatz
deead04a6a getFetchPack fixes, spread fetch pack requests. 2013-12-15 07:20:24 -08:00
JoelKatz
d4771a9b36 Fix missing call to setPubLedger on gap in published ledger stream. 2013-12-13 11:14:34 -08:00
JoelKatz
27b8415d0c During old pathfinding, unlock earlier. 2013-12-12 21:17:25 -08:00
David Schwartz
e1e81e5d97 Call pendSaveValidated without holding the ledger master lock 2013-12-12 21:17:20 -08:00
Vinnie Falco
3705680d68 Disable RocksDB for older compilers 2013-12-10 11:23:06 -08:00
Vinnie Falco
a01f546ae3 Use ScopedPointer instead of deprecated auto_ptr 2013-12-10 14:14:15 -05:00
Bryce Lynch
eabc905bac Add Debian-style initscript
* Add validators and validation_quorum from the v0.16 release notes.
* We keep having to tell people to do this during integration, let's just make it the default.
* Add comment about the log file location that states that it has to be absolute rather than relative after an integration troubleshoot earlier today.

Signed-off-by: Bryce Lynch <bryce@ripple.com>
2013-12-09 16:21:22 -08:00
JoelKatz
37588b6808 Avoid an extraneous test. 2013-12-09 00:52:40 -08:00
JoelKatz
071db75f04 Add a 1 MB payload limit to incoming websocket requests 2013-12-09 00:52:40 -08:00
David Schwartz
1e00940a90 Move some ledger cleaner helper functions into the ledger master. 2013-12-08 23:53:57 -08:00
JoelKatz
b984566480 Suppress a warning. 2013-12-08 23:53:47 -08:00
JoelKatz
51aef120a1 Pathfinding performance improvements:
* Use a single RippleLineCache, even for 'fast' requests
* Use a ledger copy to avoid stalling other code
2013-12-08 23:52:54 -08:00
JoelKatz
636d722e8d Memory-conserving changes to SHAMapTreeNode and visitLeavesInternal. 2013-12-08 23:52:54 -08:00
Vinnie Falco
d1335a6efd Make AbstractObject unit test manual 2013-12-06 09:57:03 -08:00
Vinnie Falco
e6da61120a Make AbstractObject unit test manual 2013-12-06 09:57:03 -08:00
JoelKatz
b901e0dcf3 Fix load stats in get_info 2013-12-05 22:04:42 -08:00
Vinnie Falco
177b3c93c4 Move DecayingSample to algorithm 2013-12-05 18:35:37 -08:00
JoelKatz
9996e4a57e The new recommended fee schedule is:
* Transaction fee: 10 drops
* Base reserve: 20 XRP
* Incremental reserve: 5 XRP
2013-12-04 19:07:58 -08:00
JoelKatz
4751b6a65c Fix for issue 211, fixes to NetworkOPs getTxsAccountB 2013-12-04 17:09:22 -08:00
David Schwartz
b3c79f5c2f Change visitLeaves to visit a snapshot so the ledger stays unlocked 2013-12-04 11:10:27 -08:00
David Schwartz
0e53105ab5 Remove dead code and fix a race condition in the node back end.
Race was between a store and a fetch, as follows:
1) Fetch: Search for the node, it is not found.
2) Store: Add the node to the database, remove the node from the negative cache.
3) Fetch: Add the node to the negative cache.
This would leave a node in the DB, cache, and negative cache.
2013-12-04 11:10:22 -08:00
Vinnie Falco
61cfa6e37e Add double conversion for PropertyStream map items 2013-11-30 17:56:25 -08:00
Vinnie Falco
0f2a657196 Add double conversion for PropertyStream map items 2013-11-30 17:56:25 -08:00
Vinnie Falco
f7aa4f9593 Refactor some Journal::Sink members 2013-11-30 17:32:50 -08:00
Vinnie Falco
89aa2c7a6a Refactor some Journal::Sink members 2013-11-30 17:32:50 -08:00
Vinnie Falco
1dfd9e3c10 IPAddress fixes and algorithm comparison functors 2013-11-30 09:21:46 -08:00
Vinnie Falco
4c843b6c66 IPAddress fixes and algorithm comparison functors 2013-11-30 09:21:46 -08:00
Vinnie Falco
2f656e09c6 Refactor and fix some object arithmetic comparisons 2013-11-30 06:28:29 -08:00
Vinnie Falco
130c7c5c58 Refactor and fix some object arithmetic comparisons 2013-11-30 06:28:29 -08:00
Vinnie Falco
76c364ec2d Add const now() 2013-11-30 01:42:38 -08:00
Vinnie Falco
6c9d88bd6d Fix missing assert in UnitTest runner 2013-11-30 01:42:37 -08:00
Vinnie Falco
a549c94a15 Fix missing assert in UnitTest runner 2013-11-30 01:42:37 -08:00
Vinnie Falco
045e38314a Add AbstractObject 2013-11-30 01:42:37 -08:00
Vinnie Falco
6de8a6907f Add AbstractObject 2013-11-30 01:42:37 -08:00
Vinnie Falco
d346e6645a Tidy doc comments 2013-11-29 23:44:36 -08:00
Vinnie Falco
fc31562052 Tidy doc comments 2013-11-29 23:44:36 -08:00
Vinnie Falco
cdaa65c07a Remove LightningDB database and backend 2013-11-27 15:14:21 -08:00
Vinnie Falco
8a278cf9d6 Remove sophia database and backend 2013-11-27 15:09:26 -08:00
Vinnie Falco
97cecc18ce Set version to 0.19.2 2013-11-27 13:10:19 -08:00
JoelKatz
536db23e14 Fix foundResume check in account_tx 2013-11-27 12:25:45 -08:00
Vinnie Falco
39d801fb9f Merge branch 'release' into develop 2013-11-27 10:00:34 -08:00
Vinnie Falco
6d707b21b2 Set version to 0.19.1 2013-11-27 09:54:41 -08:00
JoelKatz
2316fe5bbe A better way to return an empty set if the token isn't an object. 2013-11-27 09:11:42 -08:00
JoelKatz
16ec9d2bdb Return an empty set if token is not an object 2013-11-27 08:54:49 -08:00
JoelKatz
2ce4ce4309 Begin deprecating the old account_tx interface. 2013-11-26 22:01:10 -08:00
JoelKatz
858c3a5362 Force NDEBUG in sqlite, RocksDB, and HyperLevelDB by default 2013-11-26 21:59:35 -08:00
JoelKatz
760f51910f Add BEAST_SQLITE_FORCE_NDEBUG option 2013-11-26 21:56:17 -08:00
JoelKatz
c124ad0dcd Add BEAST_SQLITE_FORCE_NDEBUG option 2013-11-26 21:56:17 -08:00
JoelKatz
ed64c8bb29 Add LedgerCleaner:
* Manually invoked to clean ledgers
* Get status with: 'print app.ledgercleaner.*'
* Invoke or control with 'ledger_cleaner' command
2013-11-26 21:50:35 -08:00
Vinnie Falco
2678360715 Set version to 0.19.0 2013-11-22 23:39:12 -08:00
JoelKatz
54e504dd5a Make --import work 2013-11-22 23:39:07 -08:00
JoelKatz
b632a6b2cf If the RocksDB base file size is changed, change the write cache and L0 size to match 2013-11-22 23:39:02 -08:00
Vinnie Falco
b9e2ac38fa Set version to 0.19.0 2013-11-22 23:36:50 -08:00
JoelKatz
4d1c2a5798 Make --import work 2013-11-22 18:01:13 -08:00
JoelKatz
c69d8a13b3 If the RocksDB base file size is changed, change the write cache and L0 size to match 2013-11-22 16:13:12 -08:00
Vinnie Falco
7c358cda17 Set version to 0.18.0 2013-11-22 15:57:59 -08:00
Vinnie Falco
1954a0eb2e Set version to 0.18.0 2013-11-22 15:57:41 -08:00
Vinnie Falco
9e5619ce99 Fix Workers thread name 2013-11-22 15:51:20 -08:00
Vinnie Falco
5500701661 Fix Workers thread name 2013-11-22 15:51:20 -08:00
Vinnie Falco
21918922f4 Set background thread name 2013-11-22 15:51:20 -08:00
Vinnie Falco
fad52c5917 Comment out write to stdout 2013-11-22 15:51:20 -08:00
Vinnie Falco
306811d2a7 Add RocksDB NodeStore backend 2013-11-22 15:51:19 -08:00
Vinnie Falco
8b72f2ad79 Add rocksdb module 2013-11-21 18:31:15 -08:00
Vinnie Falco
1a1cb696f7 Make include paths relative 2013-11-21 16:59:54 -08:00
Vinnie Falco
582c17b06b Merge commit 'b156a49cff152fd52992a4823aaeafbaf70e564e' as 'src/ripple/rocksdb/rocksdb' 2013-11-21 16:24:10 -08:00
Vinnie Falco
b156a49cff Squashed 'src/ripple/rocksdb/rocksdb/' content from commit 56589ab
git-subtree-dir: src/ripple/rocksdb/rocksdb
git-subtree-split: 56589ab81f
2013-11-21 16:24:10 -08:00
Vinnie Falco
3943cfea06 Fix LevelDB Windows port 2013-11-21 15:00:57 -08:00
David Grogan
97346c6618 Upgrade LevelDB from 1.12 to 1.14:
* Fix issues 77, 87, 182, 190, 200, and 201

* Fix bug described in https://groups.google.com/d/msg/leveldb/yL6h1mAOc20/vLU64RylIdMJ

* Fix a bug where options.max_open_files was not getting clamped properly.

* Fix link to bigtable paper in docs.

* New sstables will have the file extension .ldb. .sst files will continue to be recognized.
2013-11-21 12:59:46 -08:00
JoelKatz
474b824902 Don't throw away an initial error when detecting the handshake. 2013-11-20 17:01:21 -08:00
David Schwartz
02b5572ccc Changes to support the ledger cleaner
* Rework ledger save return values to indicate errors to callers
* Add an extra function to support the ledger cleaner.
2013-11-20 12:22:45 -08:00
Vinnie Falco
4577ad60c7 Fix ResourceManager log output 2013-11-20 11:31:19 -08:00
JoelKatz
e683c380e5 Fix a defect in RangeSet. 2013-11-20 11:31:14 -08:00
Vinnie Falco
b660d82516 Make TxFormats a Meyers singleton 2013-11-20 10:16:46 -08:00
Nicholas Dudfield
c0dda06499 Parse STArray correctly in STObject::parseJson 2013-11-20 08:54:59 -08:00
Vinnie Falco
65abd6307d Update hyperleveldb module 2013-11-19 11:33:09 -08:00
Vinnie Falco
6e713dc3b8 Merge commit '596a35accad6e838e05180e79c1ea626eaf93a34' into develop 2013-11-19 11:32:55 -08:00
Vinnie Falco
596a35acca Squashed 'src/hyperleveldb/' changes from ac2ae30..25511b7
25511b7 Merge branch 'master' of github.com:rescrv/HyperLevelDB into hyperdb
ed01020 Make "source" universal
3784d92 Ignore the static file
507319b Don't package with snappy
3e2cc8b Tolerate -fno-rtti
4dcdd6e Drop revision down to 1.0.dev
2542163 Drop all but the latest kept for garbage reasons
9c270b7 Update .gitignore
5331878 Add upack script
adc2a7a Explicitly add -lpthread for Ubuntu
7b57bbd Strip NULL chars passed to LiveBackup
e3b87e7 Add write-buffer-size option to benchmark
2f11087 Followup to snappy support with -DSNAPPY
af503da Improve efficiency of ReplayIterator; fix a bug
33c1f0c Add snappy support
ce1cacf Fix a race in ReplayIterator
5c4679b Fix a bug in the replay_iterator
ca332bd Fix sort algorithm used for compaction boundaries.
d9ec544 make checK
b83a9cd Fix a deadlock in the ReplayIterator dtor
273547b Fix a double-delete in ReplayIterator
3377c7a Add "all" to set of special timestamps
387f43a Timestamp comparison and validation.
f9a6eb1 make distcheck
9a4d0b7 Add a ReplayIterator.
1d53869 Conditionally enable read-driven compaction.
f6fa561 16% end-to-end performance improvement from the skiplist
28ffd32 Merge remote-tracking branch 'upstream/master'
a58de73 Revert "Remove read-driven compactions."
e19fc0c Fix upstream issue 200
748539c LevelDB 1.13
78b7812 Add install instructions to README
e47a48e Make benchmark dir variable
820a096 Update distributed files.
486ca7f Live backup of LevelDB instances
6579884 Put a reference counter on log_/logfile_
3075253 Update internal benchmark.
2a6b0bd Make the Version a parameter of PickCompaction
5bd76dc Release leveldb 1.12

git-subtree-dir: src/hyperleveldb
git-subtree-split: 25511b7a9101b0bafb57349d2194ba80ccbf7bc3
2013-11-19 11:32:55 -08:00
Vinnie Falco
4ad84a339f Make LedgerMaster abstract 2013-11-18 15:04:17 -08:00
JoelKatz
833435f8c2 The 'ledger' RPC command should be considered high burden if 'full' is set. 2013-11-17 20:11:40 -08:00
JoelKatz
4e4942e357 Fix break logic in STObject::parseJson for arrays. 2013-11-16 18:57:08 -08:00
JoelKatz
1fc8f0a33b Missing break in STObject::parseJson for arrays. 2013-11-16 18:56:01 -08:00
Vinnie Falco
1f433dea97 Add ripple_app TODO 2013-11-15 18:39:07 -08:00
Vinnie Falco
d8707cad2c Refactor logging 2013-11-15 13:25:56 -08:00
Vinnie Falco
b38dd98e71 Journal API improvements 2013-11-15 12:30:01 -08:00
Vinnie Falco
a399b571ac Journal API improvements 2013-11-15 12:30:01 -08:00
Vinnie Falco
71db1dfa06 Fix severity check on ~ScopedStream 2013-11-15 11:29:45 -08:00
Vinnie Falco
d0e71225c4 Fix severity check on ~ScopedStream 2013-11-15 11:29:45 -08:00
Vinnie Falco
19d4bf0ea5 Add README and tidy up comments 2013-11-15 11:29:45 -08:00
Vinnie Falco
9e519af887 Add missing README and TODO for all new modules 2013-11-15 11:27:26 -08:00
JoelKatz
29aa462bfd Add more comments to the consensus code. 2013-11-14 22:41:34 -08:00
JoelKatz
7a91872ee5 Fix broken indentation around BOOST_FOREACH 2013-11-14 22:35:09 -08:00
JoelKatz
68307d1012 Functions like remote_endpoint().address() can throw 2013-11-14 11:20:35 -08:00
JoelKatz
48cb707bb6 Handle a missing ledger node discovered during pathfinding. 2013-11-14 11:20:16 -08:00
JoelKatz
9322233b37 Allow the SHAMap visitLeaves functions to sanely handle a missing map node. 2013-11-13 11:04:17 -08:00
JoelKatz
1daf1b9932 Use MultiSocket for websocket 2013-11-12 21:09:01 -08:00
JoelKatz
a3024352ba Pathfinding improvements. 2013-11-12 21:08:52 -08:00
David Schwartz
58f07a573f New ResourceManager for managing server load.
* Track abusive endpoints
* Gossip across cluster.
* Use resource manager's gossip support to share load reporting across a cluster
* Swtich from legacy fees to new Resource::Charge fees.
* Connect RPC to the new resource manager.
* Set load levels where needed in RPC/websocket commands.
* Disconnect abusive peer endpoints.
* Don't start conversations with abusive peer endpoints.
* Move Resource::Consumer to InfoSub and remove LoadSource
* Remove port from inbound Consumer keys
* Add details in getJson
* Fix doAccountCurrencies for the new resource manager.
2013-11-12 21:08:52 -08:00
Vinnie Falco
a05f33f6a7 Add annotation and clean up whitespace 2013-11-12 19:30:07 -08:00
Vinnie Falco
968624971f Add TestOverlay README 2013-11-12 09:18:11 -08:00
JoelKatz
57e77a5bd2 Use Ledger::visitStateItems to implement OrderBookDB::update 2013-11-11 21:31:18 -08:00
JoelKatz
74c65cfdc5 Cleanup path request logging. 2013-11-11 19:29:56 -08:00
JoelKatz
399760fda9 Assign each path finding request an ID and track its lifecycle. 2013-11-11 18:32:45 -08:00
Vinnie Falco
67b8f95b1e Add PeerFinder README doc 2013-11-10 15:51:29 -08:00
Vinnie Falco
d4d6acdf68 Add MSVC Output window Journal config setting
Conflicts:
	src/ripple/peerfinder/impl/Manager.cpp
	src/ripple/validators/impl/Manager.cpp
2013-11-10 15:06:05 -08:00
Vinnie Falco
472baa8bac Update README 2013-11-10 10:42:07 -08:00
Vinnie Falco
dd74c19858 Tidy up LoadMonitor stats API 2013-11-09 12:08:23 -08:00
Vinnie Falco
b5f8d447a0 Tidy up Resource::Manager APIs 2013-11-09 12:00:37 -08:00
JoelKatz
5f4a1917a6 Change how cluster load is computed from average-ish to median-ish. 2013-11-08 11:05:43 -08:00
JoelKatz
cf71680aee Don't return too many paths. 2013-11-08 11:05:05 -08:00
JoelKatz
f04b9131cc terNO_LINE should never be the final result of a payment transaction that can claim a fee. 2013-11-08 10:32:15 -08:00
JoelKatz
46861fac48 Don't allow a payment to take anything from an expired offer. 2013-11-08 10:17:12 -08:00
JoelKatz
4620b667e7 Fix a race condition if PathRequest::doCreate races with the path being processed. 2013-11-07 22:30:11 -08:00
Vinnie Falco
49f43ccc0a Set version to 0.17.0-rc5 2013-11-07 10:30:50 -08:00
Vinnie Falco
63aa7284c4 Disable peerfinder hooks 2013-11-07 09:59:28 -08:00
Patrick Dehne
08aa415c66 Beast improvements and vflib compatibility module work
* Add CallQueue vflib compatibility class
* Use run instead of run_one
* Merge BindableServiceQueue into CallQueue
* Take BEAST_VARIADIC_MAX into account
* Fix license headers as suggested by Vinnie
* Remove obsolete comment
* Add ManualServiceQueue
* Add ManualServiceQueue to beast_vflib include
* Move static unit test variables of header only classes to module cpp
* Remove no longer used mutex member
* _VARIADIC_MAX maxes out at 10
* Correctly apply BEAST_VARIADIC_MAX
* Merge BindableServiceQueue into CallQueue
* New GuiServiceQueue and its JUCE dependency
* Fix leftover merge errors
* Fix CallQueue unit test
* Don't use bassert for better CI support
2013-11-07 09:42:37 -08:00
Patrick Dehne
286ade2d17 Beast improvements and vflib compatibility module work
* Add CallQueue vflib compatibility class
* Use run instead of run_one
* Merge BindableServiceQueue into CallQueue
* Take BEAST_VARIADIC_MAX into account
* Fix license headers as suggested by Vinnie
* Remove obsolete comment
* Add ManualServiceQueue
* Add ManualServiceQueue to beast_vflib include
* Move static unit test variables of header only classes to module cpp
* Remove no longer used mutex member
* _VARIADIC_MAX maxes out at 10
* Correctly apply BEAST_VARIADIC_MAX
* Merge BindableServiceQueue into CallQueue
* New GuiServiceQueue and its JUCE dependency
* Fix leftover merge errors
* Fix CallQueue unit test
* Don't use bassert for better CI support
2013-11-07 09:42:37 -08:00
Vinnie Falco
066d92ecfa Improve MultiSocket::ssl_handle 2013-11-07 09:35:04 -08:00
Vinnie Falco
c5ccabec38 Fix to use IPS from config 2013-11-06 06:19:06 -08:00
Vinnie Falco
548fedb859 Fix missing cstdlib 2013-11-06 06:19:02 -08:00
Nicholas Dudfield
8d5378a2ca Ensure no offers cancel each other out 2013-11-05 23:20:45 -08:00
David Schwartz
bf1843be9e Add "account_currencies" command. 2013-11-05 16:07:17 -08:00
David Schwartz
d50439cc4d doAccountLines cleanup. 2013-11-05 15:41:15 -08:00
Vinnie Falco
6a8f313394 Set version to 0.17.0-rc4 2013-11-05 14:41:49 -08:00
David Schwartz
c211094d3e Allow two trust lines to be created without reserve check. 2013-11-05 13:29:07 -08:00
Vinnie Falco
072b4f3b73 Set version to 0.17.0-rc3 2013-11-05 11:22:20 -08:00
Vinnie Falco
bf87614fa6 Fix warning 2013-11-05 03:23:15 -08:00
Vinnie Falco
08cbcba4ee Fix warning 2013-11-05 03:23:15 -08:00
Vinnie Falco
55045b5fe9 Improve hasher for IPAddress 2013-11-05 03:15:09 -08:00
Vinnie Falco
2a9171c623 Improve hasher for IPAddress 2013-11-05 03:15:09 -08:00
Vinnie Falco
56c5c2ebaa Fix compile error 2013-11-05 03:09:39 -08:00
Vinnie Falco
8573679fbb Fix compile error 2013-11-05 03:09:39 -08:00
Vinnie Falco
a2c574fa15 Set boolalpha for Journal::ScopedStream 2013-11-05 03:09:39 -08:00
Vinnie Falco
811f244fc2 Set boolalpha for Journal::ScopedStream 2013-11-05 03:09:39 -08:00
Vinnie Falco
b560f5a474 Add ostream support for PropertyStream items 2013-11-05 03:09:39 -08:00
Vinnie Falco
a31b2556a3 Add ostream support for PropertyStream items 2013-11-05 03:09:39 -08:00
Vinnie Falco
206169476f Add to_string for asio endpoints 2013-11-05 03:09:39 -08:00
Vinnie Falco
a0ad5cdbfe Add to_string for asio endpoints 2013-11-05 03:09:39 -08:00
Nicholas Dudfield
30648a1819 Fix IPAddress::V4::Proxy 2013-11-05 03:02:20 -08:00
Nicholas Dudfield
59cf668348 Fix IPAddress::V4::Proxy 2013-11-05 03:02:20 -08:00
Stefan Thomas
09acc26c50 Fix marker being set for last result. 2013-11-03 22:39:55 -08:00
JoelKatz
0ae7bcff52 Fix the path filtering loop exit condition. 2013-11-03 17:20:10 -08:00
JoelKatz
2210dbac94 Don't abort the path filtering loop too early. 2013-11-03 16:37:35 -08:00
JoelKatz
6b2f654a30 Improve path filtering:
1) Ignore paths with very low liquidity
2) Allow an extra filling path to be added if needed
2013-11-03 02:20:18 -08:00
Vinnie Falco
3296ac5628 Turn off test URL in SiteFiles 2013-11-01 16:10:25 -07:00
Vinnie Falco
6d06cb29df Block until thread exits in manager dtors 2013-11-01 15:48:37 -07:00
Vinnie Falco
00575cf847 Stoppable, make stop() require call to start() 2013-11-01 13:31:38 -07:00
Vinnie Falco
b08c7d15cd Stoppable, make stop() require call to start() 2013-11-01 13:31:38 -07:00
Vinnie Falco
940d620a96 Fix SiteFiles thread name 2013-11-01 10:34:35 -07:00
Vinnie Falco
ef94f42b62 Improve URL string conversions and ostream support 2013-10-31 08:10:06 -07:00
Vinnie Falco
a39fa8ae5f New SiteFiles for fetching and managing ripple.txt files 2013-10-31 08:10:06 -07:00
Vinnie Falco
4ed36da458 Fix error parameter in HTTPClient logic 2013-10-31 08:10:06 -07:00
Vinnie Falco
f859bf160a Improve URL string conversions and ostream support 2013-10-31 08:10:06 -07:00
Vinnie Falco
e0512930ae Fix error parameter in HTTPClient logic 2013-10-31 08:10:06 -07:00
Vinnie Falco
68b5966fef Move ServiceQueueBase out of detail namespace 2013-10-31 08:10:05 -07:00
Vinnie Falco
7bbf6c553f Move ServiceQueueBase out of detail namespace 2013-10-31 08:10:05 -07:00
Vinnie Falco
7bae496257 Add hash function to URL 2013-10-31 08:10:05 -07:00
Vinnie Falco
aeb335ebdc Add hash function to URL 2013-10-31 08:10:05 -07:00
Vinnie Falco
dc591f8943 Move MurmurHash to beast 2013-10-31 08:10:04 -07:00
Vinnie Falco
73ab408b3c Move MurmurHash to beast 2013-10-31 08:10:04 -07:00
Vinnie Falco
31089931d3 Make ServiceQueue::enqueue virtual 2013-10-31 08:10:04 -07:00
Vinnie Falco
f333a33f3d Make ServiceQueue::enqueue virtual 2013-10-31 08:10:04 -07:00
Nik Bougalis
42b841735e PeerFinder work 2013-10-29 20:52:57 -07:00
Vinnie Falco
e710bd2183 Use IPAddressConversion 2013-10-29 20:52:57 -07:00
Vinnie Falco
84556ba76a Add Bootstrap Strategy exposition 2013-10-29 20:52:56 -07:00
David Schwartz
4eebea91d3 DecayingSample::decay must always return with the time current. 2013-10-29 14:46:22 -07:00
JoelKatz
4ddadb8792 Correctly compute amount left on sell offer when a crossing offer pays us more than we asked for. 2013-10-28 16:48:47 -07:00
JoelKatz
8e65d6288d Fix limit calculation. 2013-10-28 07:24:01 -07:00
Justin Lynn
8e18deb74f disable e-mail notifications for travisCI 2013-10-25 17:48:20 -07:00
Justin Lynn
7ae1ad524b Merge branch 'develop' of github.com:ripple/rippled into develop 2013-10-24 19:11:17 -07:00
Justin Lynn
1ba1b3983a travis installs exuberant-ctags 2013-10-24 19:11:08 -07:00
Nicholas Dudfield
aabd6980ac Fix a bug in websocket-test.js referencing done() not declared in test() function signature, was causing failure of subsequent test suite, due to mocha's enveloped exception handling style 2013-10-24 19:03:03 -07:00
Nicholas Dudfield
3b19310252 Declarative path tests 2013-10-24 19:03:03 -07:00
Justin Lynn
8201805b28 explicitly use libboost 1.48 2013-10-24 18:53:38 -07:00
Justin Lynn
7277c8478b install dependencies when running travis ci 2013-10-24 18:47:18 -07:00
Justin Lynn
963a0dd934 initial travis yml file 2013-10-24 18:40:07 -07:00
JoelKatz
3108d58791 Fix typo. 2013-10-24 16:57:27 -07:00
Patrick Dehne
55dd5b5547 Add beast_vflib compatibility module and stand alone unit test app 2013-10-23 17:37:00 -07:00
Patrick Dehne
31b1a6a7e6 Add beast_vflib compatibility module and stand alone unit test app 2013-10-23 17:37:00 -07:00
JoelKatz
9ff65d0da4 Fix setting the no ripple flag when a trust line is created. 2013-10-23 17:24:34 -07:00
JoelKatz
c11abb42d1 Fix a case where 'sign' won't work in standalone mode. 2013-10-23 17:24:16 -07:00
Vinnie Falco
1f97a239dc Measure CPU usage in Workers 2013-10-22 17:23:54 -07:00
Vinnie Falco
7b6d81d812 Measure CPU usage in Workers 2013-10-22 17:23:54 -07:00
Vinnie Falco
ca0daad11f Update notes 2013-10-22 12:59:56 -07:00
Vinnie Falco
a0c4e685c5 Add local_endpoint and remote_endpoint to MultiSocket 2013-10-22 12:33:11 -07:00
Nik Bougalis
b30f7a622c Set PEERS_MAX default value 2013-10-22 11:48:43 -07:00
Vinnie Falco
8604e216eb Add IPAddressConversion and asio module 2013-10-22 11:45:30 -07:00
Vinnie Falco
23f44f12bd Add IPAddressConversion and asio module 2013-10-22 11:45:30 -07:00
Nik Bougalis
6c17002e8a Peerfinder work 2013-10-22 10:43:17 -07:00
Vinnie Falco
f4120635e9 Rename to IPAddress and remove unused files 2013-10-22 10:43:16 -07:00
Vinnie Falco
5dda088335 Peerfinder work 2013-10-22 10:43:16 -07:00
Vinnie Falco
2427cce2c8 Rename to IPAddress and remove unused files 2013-10-22 10:43:16 -07:00
Vinnie Falco
e8f1dd8421 Squelch spurious linker warning 2013-10-22 10:43:15 -07:00
Nik Bougalis
1c41dae51c PeerFinder work 2013-10-22 10:43:15 -07:00
Vinnie Falco
1a6d72b14c Squelch spurious linker warning 2013-10-22 10:43:15 -07:00
Vinnie Falco
3dc646e03e Use serialized Context wrapper in Validators 2013-10-22 10:43:14 -07:00
Vinnie Falco
96328a8632 Add FixedPeers connection policy to peerfinder 2013-10-22 10:43:14 -07:00
Vinnie Falco
2ec6050959 Fix crash in PropertyStream::find 2013-10-22 10:13:46 -07:00
Vinnie Falco
2cc4488d8e Fix crash in PropertyStream::find 2013-10-22 10:13:46 -07:00
wltsmrz
a6c2fe4761 Remove coffeescript compiler from mocha.opts until it is needed and added to dependencies 2013-10-21 17:54:36 -07:00
JoelKatz
ed905d3c3d Remove redundant code. 2013-10-21 15:06:05 -07:00
Vinnie Falco
29c38ef0d4 RelativeTime tidying 2013-10-20 15:31:50 -07:00
Vinnie Falco
81eadbd05c RelativeTime tidying 2013-10-20 15:31:50 -07:00
Patrick Dehne
74d616ac78 monotonicCurrentTimeInSeconds should return seconds, not milliseconds 2013-10-21 00:11:44 +02:00
Patrick Dehne
ef1e2f8595 monotonicCurrentTimeInSeconds should return seconds, not milliseconds 2013-10-21 00:11:44 +02:00
Patrick Dehne
504a892887 Wrap hiResCounterHandler in a function to prevent an order of initialization problems 2013-10-20 23:38:52 +02:00
Patrick Dehne
fae7082049 Wrap hiResCounterHandler in a function to prevent an order of initialization problems 2013-10-20 23:38:52 +02:00
Patrick Dehne
30cf0f8d3a Rename millisecondsSinceStartup to monotonicCurrentTimeInSeconds 2013-10-20 23:37:24 +02:00
Patrick Dehne
a63de23156 Rename millisecondsSinceStartup to monotonicCurrentTimeInSeconds 2013-10-20 23:37:24 +02:00
Patrick Dehne
d794d7d30b #ifdef unneeded sys/prctl.h include in the mac build 2013-10-20 01:43:24 +02:00
Patrick Dehne
8e0dda8480 #ifdef unneeded sys/prctl.h include in the mac build 2013-10-20 01:43:24 +02:00
Patrick Dehne
b112b333bd Make fromStartup compile on mac 2013-10-20 01:38:59 +02:00
Patrick Dehne
ad7b9ff8b5 Make fromStartup compile on mac 2013-10-20 01:38:59 +02:00
Vinnie Falco
04f2d0787a Merge commit '2ad98a025eb263d97b1942fc468937b4719becd8' into develop
Conflicts:
	src/beast/beast/utility/PropertyStream.h
	src/beast/beast/utility/impl/PropertyStream.cpp
	src/beast/modules/beast_sqlite/beast_sqlite.h
2013-10-19 15:57:15 -07:00
Vinnie Falco
2ad98a025e Squashed 'src/beast/' changes from 43e6d34..0e7bac9
0e7bac9 Fix include path
e5bb90f Fix constness of Proxy
ac0142a Use template cast
ef6e381 Add missing Url.h include
206e65c Fix constness of operator[]
695cc38 Use template instantiation for friend declaration
7b1e03a Add BaseFromMember
49bc04f Make List<>::Node not uncopyable
d5954ff Add Journal to UnitTest
58da106 Temporarily disable ServiceQueue dtor precondition asserts
fe58c1a Add missing #include
2c02580 Add PropertyStream for server state introspection
24c2315 Add ScopedWrapperContext
a3845f5 Add RelativeTime::value_type typedef
7442932 Fix missing PropertyStream members
ed5a98f More PropertyStream output for PeerFinder
fcfa10d Add PropertyStream
3cf0729 Tidy up AbstractHandler usage in HTTPClient
55171f4 Remove obsolete source files
1311ca3 Increase arity of SharedFunction
67d807d Add IPEndpoint::key_equal
ebf395e Add ErrorCode and boost library
2c3ead3 Add ServiceQueue::wrap
6c7f5d0 Move many Thread related classes
93e9d86 Measure CPU utilization in ServiceQueue
ca47d72 Move ServiceQueue, ThreadLocalValue, SpinLock
c864e4d Move WaitableEvent
ff305e6 Add CPUMeter and ScopedTimeInterval
01fd05c Add RecursiveMutex, UnlockGuard, TryLockGuard
5831a53 Remove Journal from most Stoppable overrides
b60a7f3 Add Request and Response HTTP parsers
44445ff Refactor net buffers classes
ac37c38 Beast class refactor
8b7056b Fix eof on HTTP client get
228b664 Remove obsolete beast container classes
1dfd655 Use RelativeTime from startup in DeadlineTimer
ae22d5d Add more methods to RelativeTime
c67929e Remove unhandled exception catcher
2472a90 Add 64 bit output for MurmurHash
f3d97c7 Add RelativeTime::fromStartup
b0b8660 IPEndpoint better parsing
ae551cd Add alternate form string parsing to IPEndpoint
d0a0dbf Don't break on Throw
0e46762 Add hasher functors for IPEndpoint
a1ec423 Add Thread::stopThreadAsync
4f7dca3 Add compiler, stdlib, and platform skeleton to beast/config
4394594 Tidy up some use of Error for throw
e5e0f52 Journal console output improvements
f07515e Add Stoppable prepare and start interfaces
d37dd46 Move RelativeTime to chrono, add ostream support
3f6e7aa Add console feature to Journal
ad0064a Journal option to write to Output window (MSVC)
0b7574b Add compilation test script
cc05ce1 Add ServiceQueue
e132aab Use boost for functional when the config is set
026b926 Fix is_continuation for boost version
c807a4e Fix invoked_type type reference
2ff781b Remove LockFreeStack::size
3acb474 Add SharedData::ConstAccess
7e4c834 Add LockFreeStack::empty
9c61a6d Added AbstractHandler, WrapHandler. HTTPClient Fixes.
94e40dc Fix unittest, by removing recursive call.
38bf408 Fix nonstandard C++ extension in getNullSink
1ef044d Build fixes
d5d3746 Fix missing <cmath> include for Gentoo
5f231d3 Update copyright notice and licenses
7b89bf6 Add FixedArray, IntrusiveArray, Crypto
5c5de57 Reorganize beast modules and files
9e18bb3 Merge commit '43deaaa5cf0d0178a4a6c3cb69c02a2a9a43ec7d' as 'src/beast/beast/http/impl/http-parser'
57703ac Fix BeforeBoost.h include
fbc247b Add Stoppable to beast
56496d8 IPEndpoint comparisons
9d9c822 Migrate some headers and general tidying
1a3cddc Add SharedArg and AsyncObject
373ca9c Add HTTPRequest and improvements to HTTPMessage parsing
9534516 Add some thread classes and fix SharedData with a simple mutex adapter
755ab36 Make CallQueue unit test runManual
c0ca037 Remove Beast version printing on startup
7efb6a3 Reorganize some MPL and Utility classes and files
69c26a1 Fix missing BeastConfig.h include in Net.cpp
40aa552 Disable Beast version printing in Ripple BeastConfig.h
7b1352d Add InterruptibleThread unit test
68cf759 ThreadWithCallQueue unit test adjustment
6501dea IPEndpoint parsing and tidying
72fc42b Move and add some template metaprogramming classes
2a164f0 Change filname capitalization (end)
6a14f25 Change filename capitalization
92fd417 Move integer types to beast/CStdInt.h
ebbd9ff Move TargetPlatform.h to beast/Config.h
874b524 Add IPEndpoint
14b34fc Tidy up some zlib macro undefines
34fffca Rename beast sources for consistency
4e59ab2 Add CallQueue unit test
327d7a6 Fixes for consolidated beast unity includes
d5ece4e Remove unused and broken classes
39f13be Remove unused ConcurrentObject
37624a7 Add ThreadWithCallQueue unit test
e82ec68 Remove obsolete beast_Function
90551a6 Temporarily leave sqlite3 in whatever threading mode it was already in.
43ebbb1 Fix SharedSingleton to use memoryBarrier
f343941 Tidy up SharedSingleton doc comments
001997e Fix leak on exit from Singleton dependency cycle
83b9d22 Rename to DeadlineTimer::cancel()
77874ee Use new instead of ::new for placement
2a04dcc Journal improvements
50965ca SharedFunction improvements
277e32b Add LockFreeStack iterators
d94e4c2 Fix undefined behavior in UnsignedIntegerCalc (again)
2dc25ce Fix DeadlineTimer, callback while holding lock
207ffde Fix undefined behavior in UnsignedIntegerCalc
1ad8ff9 Fix UnsignedInteger::isZero
1dd2836 Add support for multiprecision integer arithmetic and binary data encoding
a45fc47 Update .gitignore
962a95d Tidy up UnsignedInteger
ca695fa Add Time::isNull()
e96ce99 Better random number facilities in UnitTest
550b8e5 Fine tune UnsignedInteger declaration
8e7e3b7 Allow negative relative expirations in DeadlineTimer
f3dc7ce Add generic Journal class for logging
bfdda32 Make ChildProcess UnitTest manual since it malfunctions
02acf7d General refactoring of beast framework classes
84ef06e Fix ExitHook to derive from AtExitHook
f0acc9c Reduce the max threads in the Workers unit test
55447b0 New SharedSingleton, resolves destruction of objects with static storage duration.
41eb8a1 Remove deprecated SharedPtr::getObject
9eda4bc Make SharedObject members const, the counter mutable
6eda777 Remove deprecated createOnDemandOnce SingletonLifetime option
8c522aa Fix off by one in pending i/o count on HTTPClient
057344e Add HTTPMessage::toString and family
ee728e3 Add UniformResourceLocator::empty
ae324fb Move ./modules to ./src

git-subtree-dir: src/beast
git-subtree-split: 0e7bac945f
2013-10-19 15:54:21 -07:00
Vinnie Falco
0e7bac945f Fix include path 2013-10-19 15:54:02 -07:00
Patrick Dehne
e5bb90fdfa Fix constness of Proxy 2013-10-19 15:54:02 -07:00
Patrick Dehne
ac0142a49e Use template cast 2013-10-19 15:54:02 -07:00
Patrick Dehne
ef6e381de3 Add missing Url.h include 2013-10-19 15:54:01 -07:00
Patrick Dehne
206e65cf05 Fix constness of operator[] 2013-10-19 15:54:01 -07:00
Patrick Dehne
695cc38b36 Use template instantiation for friend declaration 2013-10-19 15:54:01 -07:00
JoelKatz
67516766a6 Operations on the raw socket can throw exceptions if it's no longer connected. 2013-10-19 14:14:47 -07:00
Vinnie Falco
3b2ead3476 Turn off console output for msvc logic and managers 2013-10-18 16:29:13 -07:00
Vinnie Falco
7b1e03a585 Add BaseFromMember 2013-10-18 16:04:37 -07:00
Vinnie Falco
fc5be2b911 Use DiscreteClock in ResourceManager 2013-10-18 16:04:37 -07:00
Vinnie Falco
466e623dd6 Add BaseFromMember 2013-10-18 16:04:37 -07:00
Vinnie Falco
a1b487c512 New Resource::Manager for controlling access to server resources 2013-10-18 16:04:31 -07:00
Vinnie Falco
0902af8eb5 Add DiscreteClock and sources 2013-10-17 17:46:23 -07:00
Vinnie Falco
49bc04fa48 Make List<>::Node not uncopyable 2013-10-17 17:46:18 -07:00
Vinnie Falco
a8a4caf0e4 Make List<>::Node not uncopyable 2013-10-17 17:46:18 -07:00
Vinnie Falco
d5954fffa8 Add Journal to UnitTest 2013-10-17 17:46:13 -07:00
Vinnie Falco
33478517a6 Add Journal to UnitTest 2013-10-17 17:46:13 -07:00
Vinnie Falco
0d5a8ca300 Revert "Ported declarative path tests to mocha"
This reverts commit abe4f1ba03.
2013-10-17 11:11:06 -07:00
Vinnie Falco
da22f06d85 Revert "Make mocha use test/mocha.opts to DRY up options used by npm test and test/runall.sh and support coffee. Add coffee-script as devDependency to package.json"
This reverts commit 9dfbffa4b8.

Conflicts:

	test/mocha.opts
2013-10-17 11:10:48 -07:00
Vinnie Falco
58da1065d6 Temporarily disable ServiceQueue dtor precondition asserts 2013-10-16 15:59:04 -07:00
Vinnie Falco
a918924923 Temporarily disable ServiceQueue dtor precondition asserts 2013-10-16 15:59:04 -07:00
JoelKatz
5a9416fbcf Remove an assert that is not needed. 2013-10-16 13:47:54 -07:00
Vinnie Falco
582b5bb3ac Add --version command line option 2013-10-16 13:29:43 -07:00
Nicholas Dudfield
abe4f1ba03 Ported declarative path tests to mocha 2013-10-13 18:24:41 +07:00
Nicholas Dudfield
9dfbffa4b8 Make mocha use test/mocha.opts to DRY up options used by npm test and test/runall.sh and support coffee. Add coffee-script as devDependency to package.json 2013-10-13 15:38:04 +07:00
Vinnie Falco
a25ba91876 Set version to 0.17.0-rc2 2013-10-11 18:41:45 -07:00
Nik Bougalis
334f109415 Remove extraneous index from peerfinder map. 2013-10-11 18:36:34 -07:00
JoelKatz
eb9eb3aa53 Fix a crash in checkAccept 2013-10-11 16:13:16 -07:00
JoelKatz
978c196c78 Don't assert, just throw. 2013-10-08 15:48:15 -07:00
JoelKatz
20e7cac743 Reduce some logging. 2013-10-08 15:05:41 -07:00
Vinnie Falco
fe58c1a383 Add missing #include 2013-10-07 14:26:26 -07:00
Vinnie Falco
b5d51214ff Add missing #include 2013-10-07 14:26:26 -07:00
Vinnie Falco
485d4b4897 Fix order of includes 2013-10-07 14:24:13 -07:00
Vinnie Falco
2c02580c37 Add PropertyStream for server state introspection 2013-10-07 14:00:03 -07:00
Vinnie Falco
fb6ecebbd1 Add PropertyStream for server state introspection 2013-10-07 14:00:03 -07:00
Vinnie Falco
0b69378a03 Update Json::Reader::decodeDouble 2013-10-07 02:49:03 -07:00
Vinnie Falco
24c2315476 Add ScopedWrapperContext 2013-10-06 19:46:42 -07:00
Vinnie Falco
256c12f150 Add ScopedWrapperContext 2013-10-06 19:46:42 -07:00
Nik Bougalis
a3845f54e1 Add RelativeTime::value_type typedef 2013-10-06 18:33:53 -07:00
Nik Bougalis
8d0349eee0 Add RelativeTime::value_type typedef 2013-10-06 18:33:53 -07:00
Vinnie Falco
ab0548c9af Fix std::size_t integer ambiguity 2013-10-06 18:33:15 -07:00
Vinnie Falco
4868bc4df7 Validators PropertyStream support 2013-10-06 18:25:59 -07:00
Vinnie Falco
7442932b5e Fix missing PropertyStream members 2013-10-06 18:25:53 -07:00
Vinnie Falco
0900dfe46f Fix missing PropertyStream members 2013-10-06 18:25:53 -07:00
Vinnie Falco
ed5a98f697 More PropertyStream output for PeerFinder 2013-10-06 17:30:45 -07:00
Vinnie Falco
8dfe53ff7a More PropertyStream output for PeerFinder 2013-10-06 17:30:45 -07:00
Vinnie Falco
fcfa10d508 Add PropertyStream 2013-10-06 17:30:44 -07:00
Vinnie Falco
1ae3328642 Add PropertyStream 2013-10-06 17:30:44 -07:00
JoelKatz
b9e0208aee Payment engine doesn't allow returning to XRP. 2013-10-06 15:52:16 -07:00
Vinnie Falco
497cc74adc Set version to 0.17.0-rc1 2013-10-06 11:35:47 -07:00
Vinnie Falco
3cf0729878 Tidy up AbstractHandler usage in HTTPClient 2013-10-05 15:38:27 -07:00
Vinnie Falco
eac3814fb5 Tidy up AbstractHandler usage in HTTPClient 2013-10-05 15:38:27 -07:00
Vinnie Falco
55171f42f6 Remove obsolete source files 2013-10-05 13:08:39 -07:00
Vinnie Falco
bb331abeba Remove obsolete source files 2013-10-05 13:08:39 -07:00
Vinnie Falco
1311ca37e5 Increase arity of SharedFunction 2013-10-05 13:08:39 -07:00
Vinnie Falco
6e20bd2dcd Increase arity of SharedFunction 2013-10-05 13:08:39 -07:00
Vinnie Falco
09961845b4 Remove obsolete AsyncService class 2013-10-05 13:08:38 -07:00
Vinnie Falco
7eacd3bf57 Add annotation for Validators 2013-10-05 12:03:51 -07:00
Vinnie Falco
72681fa7fb PeerFinder work 2013-10-05 11:59:17 -07:00
Vinnie Falco
500bddebff Allow CycledSet to grow without bounds 2013-10-05 02:46:23 -07:00
Vinnie Falco
67d807d8fc Add IPEndpoint::key_equal 2013-10-05 02:41:29 -07:00
Vinnie Falco
4d3d46f41d Add IPEndpoint::key_equal 2013-10-05 02:41:29 -07:00
Vinnie Falco
82d8d9a092 PeerFinder work, Source fetch, show port in log 2013-10-04 23:22:56 -07:00
Vinnie Falco
ebf395ecc4 Add ErrorCode and boost library 2013-10-04 23:18:28 -07:00
Vinnie Falco
30ff139a29 Add ErrorCode and boost library 2013-10-04 23:18:28 -07:00
Vinnie Falco
dc8420d32d LegacyEndpointCache work 2013-10-04 23:18:27 -07:00
Vinnie Falco
bb29c8ba85 Add PeerFinder::Checker for testing endpoints 2013-10-04 23:18:27 -07:00
Vinnie Falco
2c3ead339e Add ServiceQueue::wrap 2013-10-04 23:18:26 -07:00
Vinnie Falco
625780621b Add ServiceQueue::wrap 2013-10-04 23:18:26 -07:00
Vinnie Falco
ea2589dd9c PeerFinder work 2013-10-04 19:25:48 -07:00
Vinnie Falco
6c7f5d093c Move many Thread related classes 2013-10-04 14:34:01 -07:00
Vinnie Falco
942336c454 Move many Thread related classes 2013-10-04 14:34:01 -07:00
Vinnie Falco
93e9d8622e Measure CPU utilization in ServiceQueue 2013-10-04 14:34:00 -07:00
Vinnie Falco
90282707ab Measure CPU utilization in ServiceQueue 2013-10-04 14:34:00 -07:00
Vinnie Falco
ca47d72aee Move ServiceQueue, ThreadLocalValue, SpinLock 2013-10-04 14:34:00 -07:00
Vinnie Falco
70f6c41ff7 Move ServiceQueue, ThreadLocalValue, SpinLock 2013-10-04 14:34:00 -07:00
Vinnie Falco
c864e4d3db Move WaitableEvent 2013-10-04 14:33:59 -07:00
Vinnie Falco
184cf74daa Move WaitableEvent 2013-10-04 14:33:59 -07:00
Vinnie Falco
ff305e63b6 Add CPUMeter and ScopedTimeInterval 2013-10-04 14:33:59 -07:00
Vinnie Falco
a23fb06409 Add CPUMeter and ScopedTimeInterval 2013-10-04 14:33:59 -07:00
Vinnie Falco
01fd05cb4b Add RecursiveMutex, UnlockGuard, TryLockGuard 2013-10-04 14:33:59 -07:00
Vinnie Falco
3638485977 Add RecursiveMutex, UnlockGuard, TryLockGuard 2013-10-04 14:33:59 -07:00
Vinnie Falco
75f3c52d53 Validators work 2013-10-04 14:33:58 -07:00
Vinnie Falco
364973a523 Rename to key_equal for conformance with std containers 2013-10-04 14:33:58 -07:00
Vinnie Falco
5831a53697 Remove Journal from most Stoppable overrides 2013-10-04 14:33:57 -07:00
Vinnie Falco
678c241962 Validators work 2013-10-04 14:33:57 -07:00
Vinnie Falco
a2aa938e10 Remove Journal from most Stoppable overrides 2013-10-04 14:33:57 -07:00
Vinnie Falco
48eb92e366 Validators work 2013-10-04 14:33:56 -07:00
Vinnie Falco
2894059b63 Fix Peers to stop after children are stopped 2013-10-04 14:33:56 -07:00
Vinnie Falco
66a272debd Alphabet class for base58 conversions, Validators work 2013-10-04 14:33:56 -07:00
Vinnie Falco
b60a7f3363 Add Request and Response HTTP parsers 2013-10-04 14:33:55 -07:00
Vinnie Falco
7d089561c3 Add Request and Response HTTP parsers 2013-10-04 14:33:55 -07:00
Vinnie Falco
44445ff1b8 Refactor net buffers classes 2013-10-04 14:33:55 -07:00
Vinnie Falco
53f8e73b65 Refactor net buffers classes 2013-10-04 14:33:55 -07:00
JoelKatz
37bcf7899e Improve performance of some RPC ledger commands using visitors.
Adds SHAMap::visitLeaves and Ledger::visitStateItems
2013-10-04 11:50:22 -07:00
JoelKatz
86f662aa4a It is not longer necessary to invalidate the OrderBookDB 2013-10-04 02:33:33 -07:00
Vinnie Falco
a1b958eaac Validators update, add LeakChecked to Source subclasses 2013-10-03 19:03:38 -07:00
Vinnie Falco
ac37c38133 Beast class refactor 2013-10-03 19:03:10 -07:00
Vinnie Falco
06189b2584 Disable MSVC OutputWindow for PeerFinder 2013-10-03 19:03:10 -07:00
Vinnie Falco
0bf006cdae Beast class refactor 2013-10-03 19:03:10 -07:00
Vinnie Falco
8b7056b06c Fix eof on HTTP client get 2013-10-03 18:36:55 -07:00
Vinnie Falco
3f51eb7b63 Fix eof on HTTP client get 2013-10-03 18:36:55 -07:00
Vinnie Falco
b76443dbde Use a simple Thread in SqliteDatabase 2013-10-03 18:36:54 -07:00
Vinnie Falco
5fc823ae08 Show Ripple version in BuildInfo unittest 2013-10-03 18:36:54 -07:00
Vinnie Falco
228b664ecf Remove obsolete beast container classes 2013-10-03 18:36:53 -07:00
Vinnie Falco
68aec74b47 Remove obsolete beast container classes 2013-10-03 18:36:53 -07:00
Vinnie Falco
1dfd655959 Use RelativeTime from startup in DeadlineTimer 2013-10-03 18:36:53 -07:00
Vinnie Falco
acd23682d1 Use RelativeTime from startup in DeadlineTimer 2013-10-03 18:36:53 -07:00
Vinnie Falco
ae22d5dc8a Add more methods to RelativeTime 2013-10-03 18:36:53 -07:00
Vinnie Falco
b042397b9f Add more methods to RelativeTime 2013-10-03 18:36:53 -07:00
David Schwartz
951a8208b8 Don't let OrderBookDB oscillate between two ledgers. 2013-10-03 17:49:38 -07:00
David Schwartz
9b3c74a095 Return the account checked if account_info finds no account. 2013-10-03 16:53:56 -07:00
David Schwartz
647c0e302a Do the tryLocal/addPeers operations on an InboundLedger without the collection lock. 2013-10-03 16:36:33 -07:00
David Schwartz
b3b22d7595 Nothing we do in doTx requires the master lock. 2013-10-03 10:55:42 -07:00
JoelKatz
1ba0139683 Claim saInRemaining. 2013-10-02 16:13:14 -07:00
Vinnie Falco
c67929ea39 Remove unhandled exception catcher 2013-10-01 12:25:01 -07:00
Vinnie Falco
2472a902dd Add 64 bit output for MurmurHash 2013-10-01 12:25:01 -07:00
Vinnie Falco
f3d97c76df Add RelativeTime::fromStartup 2013-10-01 12:25:00 -07:00
Vinnie Falco
b0b8660132 IPEndpoint better parsing 2013-10-01 12:25:00 -07:00
Vinnie Falco
ae551cde63 Add alternate form string parsing to IPEndpoint 2013-09-30 09:29:37 -07:00
Vinnie Falco
d0a0dbf430 Don't break on Throw 2013-09-30 09:29:36 -07:00
Vinnie Falco
0e46762962 Add hasher functors for IPEndpoint 2013-09-30 09:29:36 -07:00
Vinnie Falco
a1ec423235 Add Thread::stopThreadAsync 2013-09-30 09:29:33 -07:00
Vinnie Falco
4f7dca3e5a Add compiler, stdlib, and platform skeleton to beast/config 2013-09-28 19:34:16 -07:00
Vinnie Falco
4394594518 Tidy up some use of Error for throw 2013-09-28 19:34:16 -07:00
Vinnie Falco
e5e0f527fe Journal console output improvements 2013-09-28 16:42:16 -07:00
Vinnie Falco
f07515eb88 Add Stoppable prepare and start interfaces 2013-09-28 15:30:01 -07:00
Vinnie Falco
d37dd46f65 Move RelativeTime to chrono, add ostream support 2013-09-28 15:09:12 -07:00
Vinnie Falco
3f6e7aa05a Add console feature to Journal 2013-09-28 15:09:12 -07:00
Vinnie Falco
ad0064a310 Journal option to write to Output window (MSVC) 2013-09-28 15:09:11 -07:00
Vinnie Falco
0b7574ba00 Add compilation test script 2013-09-28 15:09:11 -07:00
Vinnie Falco
cc05ce19f9 Add ServiceQueue 2013-09-28 15:09:10 -07:00
Vinnie Falco
e132aabdae Use boost for functional when the config is set 2013-09-28 15:09:10 -07:00
Vinnie Falco
026b9268ae Fix is_continuation for boost version 2013-09-28 15:09:09 -07:00
Vinnie Falco
c807a4e383 Fix invoked_type type reference 2013-09-28 15:09:09 -07:00
Vinnie Falco
2ff781b25f Remove LockFreeStack::size 2013-09-28 15:09:08 -07:00
Vinnie Falco
3acb474795 Add SharedData::ConstAccess 2013-09-28 15:09:08 -07:00
Vinnie Falco
7e4c834c0e Add LockFreeStack::empty 2013-09-28 15:09:07 -07:00
Vinnie Falco
9c61a6df62 Added AbstractHandler, WrapHandler. HTTPClient Fixes. 2013-09-28 15:09:07 -07:00
Alex Dupre
94e40dc554 Fix unittest, by removing recursive call. 2013-09-28 20:25:41 +02:00
Vinnie Falco
38bf40884c Fix nonstandard C++ extension in getNullSink 2013-09-27 05:18:34 -07:00
Vinnie Falco
1ef044d628 Build fixes 2013-09-27 05:15:55 -07:00
Vinnie Falco
d5d37466e0 Fix missing <cmath> include for Gentoo 2013-09-27 05:15:46 -07:00
Vinnie Falco
5f231d305f Update copyright notice and licenses 2013-09-25 17:27:06 -07:00
Vinnie Falco
7b89bf6cc7 Add FixedArray, IntrusiveArray, Crypto 2013-09-23 10:13:25 -07:00
Vinnie Falco
5c5de57290 Reorganize beast modules and files 2013-09-23 10:13:24 -07:00
Vinnie Falco
9e18bb3c31 Merge commit '43deaaa5cf0d0178a4a6c3cb69c02a2a9a43ec7d' as 'src/beast/beast/http/impl/http-parser' 2013-09-23 09:54:31 -07:00
Vinnie Falco
57703acf75 Fix BeforeBoost.h include 2013-09-22 11:52:26 -07:00
Vinnie Falco
fbc247bf53 Add Stoppable to beast 2013-09-22 11:51:46 -07:00
Vinnie Falco
56496d8287 IPEndpoint comparisons 2013-09-22 11:51:44 -07:00
Vinnie Falco
9d9c822efb Migrate some headers and general tidying 2013-09-22 11:51:44 -07:00
Vinnie Falco
1a3cddc002 Add SharedArg and AsyncObject 2013-09-22 11:51:43 -07:00
Vinnie Falco
373ca9cef0 Add HTTPRequest and improvements to HTTPMessage parsing 2013-09-22 11:51:43 -07:00
Vinnie Falco
9534516b42 Add some thread classes and fix SharedData with a simple mutex adapter 2013-09-21 16:58:55 -07:00
Vinnie Falco
755ab36f0d Make CallQueue unit test runManual 2013-09-20 01:12:21 -07:00
Vinnie Falco
c0ca0373b6 Remove Beast version printing on startup 2013-09-20 00:57:55 -07:00
Vinnie Falco
7efb6a3ab8 Reorganize some MPL and Utility classes and files 2013-09-19 21:37:47 -07:00
Vinnie Falco
69c26a180e Fix missing BeastConfig.h include in Net.cpp 2013-09-19 18:25:01 -07:00
Vinnie Falco
40aa552489 Disable Beast version printing in Ripple BeastConfig.h 2013-09-19 18:22:18 -07:00
Vinnie Falco
7b1352d9c5 Add InterruptibleThread unit test 2013-09-19 14:42:55 -07:00
Vinnie Falco
68cf7599d8 ThreadWithCallQueue unit test adjustment 2013-09-19 14:42:55 -07:00
Vinnie Falco
6501dea7a3 IPEndpoint parsing and tidying 2013-09-19 14:42:55 -07:00
Vinnie Falco
72fc42b60c Move and add some template metaprogramming classes 2013-09-19 14:42:54 -07:00
Vinnie Falco
2a164f0165 Change filname capitalization (end) 2013-09-19 14:42:54 -07:00
Vinnie Falco
6a14f251ba Change filename capitalization 2013-09-19 14:42:53 -07:00
Vinnie Falco
92fd417962 Move integer types to beast/CStdInt.h 2013-09-19 14:42:53 -07:00
Vinnie Falco
ebbd9ff414 Move TargetPlatform.h to beast/Config.h 2013-09-19 14:42:52 -07:00
Vinnie Falco
874b5240d2 Add IPEndpoint
Conflicts:
	src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
2013-09-19 14:42:52 -07:00
Vinnie Falco
14b34fc6ef Tidy up some zlib macro undefines 2013-09-19 14:42:52 -07:00
Vinnie Falco
34fffca202 Rename beast sources for consistency 2013-09-19 14:42:51 -07:00
Vinnie Falco
4e59ab2261 Add CallQueue unit test 2013-09-19 14:42:50 -07:00
Vinnie Falco
327d7a6524 Fixes for consolidated beast unity includes 2013-09-19 14:42:49 -07:00
Vinnie Falco
d5ece4e909 Remove unused and broken classes 2013-09-19 14:42:49 -07:00
Vinnie Falco
39f13beaf7 Remove unused ConcurrentObject 2013-09-19 14:42:48 -07:00
Vinnie Falco
37624a7303 Add ThreadWithCallQueue unit test 2013-09-19 14:42:47 -07:00
Vinnie Falco
e82ec68820 Remove obsolete beast_Function 2013-09-19 14:42:46 -07:00
JoelKatz
90551a6eaf Temporarily leave sqlite3 in whatever threading mode it was already in. 2013-09-19 10:33:22 -07:00
Vinnie Falco
43ebbb1c70 Fix SharedSingleton to use memoryBarrier 2013-09-17 17:58:21 -07:00
Vinnie Falco
f343941a96 Tidy up SharedSingleton doc comments 2013-09-17 17:47:06 -07:00
Vinnie Falco
001997e088 Fix leak on exit from Singleton dependency cycle 2013-09-17 17:47:06 -07:00
Vinnie Falco
83b9d22ff0 Rename to DeadlineTimer::cancel() 2013-09-17 17:47:05 -07:00
Vinnie Falco
77874ee518 Use new instead of ::new for placement 2013-09-17 17:47:05 -07:00
Vinnie Falco
2a04dcc334 Journal improvements 2013-09-17 17:47:04 -07:00
Vinnie Falco
50965ca9c0 SharedFunction improvements 2013-09-17 17:47:04 -07:00
Vinnie Falco
277e32bb1e Add LockFreeStack iterators 2013-09-17 17:47:04 -07:00
Vinnie Falco
d94e4c2491 Fix undefined behavior in UnsignedIntegerCalc (again) 2013-09-17 17:47:03 -07:00
Vinnie Falco
2dc25cec72 Fix DeadlineTimer, callback while holding lock 2013-09-17 14:13:27 -07:00
Vinnie Falco
207ffdec8e Fix undefined behavior in UnsignedIntegerCalc 2013-09-16 18:47:35 -07:00
Vinnie Falco
1ad8ff9b64 Fix UnsignedInteger::isZero 2013-09-13 13:06:45 -07:00
Vinnie Falco
1dd2836f1b Add support for multiprecision integer arithmetic and binary data encoding 2013-09-13 12:43:43 -07:00
Vinnie Falco
a45fc47682 Update .gitignore 2013-09-12 23:58:56 -07:00
Vinnie Falco
962a95d770 Tidy up UnsignedInteger 2013-09-12 23:58:56 -07:00
Vinnie Falco
ca695fa6e1 Add Time::isNull() 2013-09-12 23:58:55 -07:00
Vinnie Falco
e96ce99d3d Better random number facilities in UnitTest 2013-09-12 21:39:17 -07:00
Vinnie Falco
550b8e55ee Fine tune UnsignedInteger declaration 2013-09-12 19:18:31 -07:00
Vinnie Falco
8e7e3b7256 Allow negative relative expirations in DeadlineTimer 2013-09-12 18:07:57 -07:00
Vinnie Falco
f3dc7ce52c Add generic Journal class for logging 2013-09-12 15:06:28 -07:00
Vinnie Falco
bfdda3212a Make ChildProcess UnitTest manual since it malfunctions 2013-09-12 10:55:24 -07:00
Vinnie Falco
02acf7d6d0 General refactoring of beast framework classes 2013-09-12 10:55:24 -07:00
Vinnie Falco
84ef06e35c Fix ExitHook to derive from AtExitHook 2013-09-12 10:55:17 -07:00
Vinnie Falco
f0acc9c901 Reduce the max threads in the Workers unit test 2013-09-12 05:46:45 -07:00
Vinnie Falco
55447b05ac New SharedSingleton, resolves destruction of objects with static storage duration. 2013-09-12 05:38:39 -07:00
Vinnie Falco
41eb8a1e29 Remove deprecated SharedPtr::getObject 2013-09-12 04:47:03 -07:00
Vinnie Falco
9eda4bc6fa Make SharedObject members const, the counter mutable 2013-09-12 04:47:03 -07:00
Vinnie Falco
6eda7772eb Remove deprecated createOnDemandOnce SingletonLifetime option 2013-09-12 00:43:05 -07:00
Vinnie Falco
8c522aa758 Fix off by one in pending i/o count on HTTPClient 2013-09-11 21:40:17 -07:00
Vinnie Falco
057344e1af Add HTTPMessage::toString and family 2013-09-11 20:04:23 -07:00
Vinnie Falco
ee728e3dbc Add UniformResourceLocator::empty 2013-09-11 19:58:11 -07:00
Vinnie Falco
ae324fba94 Move ./modules to ./src 2013-09-11 11:20:53 -07:00
Vinnie Falco
43e6d345e4 General beast update, fixes, optimizations, features:
* Clean ups, optimizations, and new File::commonDocumentsDirectory enum
* Replace sortArray with std::sort for performance
* More error tolerance in XML parser, speedups
* Refactor some byte-order mark detection code
* Add String::appendCharPointer overloads
* More XML parser optimisations and better error detection
* Misc performance tweaks
* Fixes for support of non utf8 strings
* Increased precision when storing strings in XmlElement
* Minor clean-ups
* Minor fix to XmlDocument
* Cleanups to CriticalSection and related synchronization primitives
* Fix DynamicArray unit test
2013-09-10 10:36:46 -07:00
Vinnie Falco
27307fca0c Use SharedFunction in ProtectedCall 2013-09-10 08:04:54 -07:00
Vinnie Falco
8b1b6050e7 Put back BEAST_CATCH_UNHANDLED_EXCEPTIONS macro, but disabled by default 2013-09-10 08:04:46 -07:00
Vinnie Falco
da925ee5cc Update to SQLite 3.8.0.2 2013-09-10 07:45:34 -07:00
Vinnie Falco
4676db126a Remove BEAST_CATCH_UNHANDLED_EXCEPTIONS 2013-09-09 13:34:18 -07:00
Vinnie Falco
d8ea4f9b06 Make UnsignedInteger HashFunction a unary function object 2013-09-09 10:50:35 -07:00
Vinnie Falco
d2d946204c Improvements to BuffersType 2013-09-09 10:50:35 -07:00
Vinnie Falco
2b132ae892 Tune HashMap parameters 2013-09-09 10:28:10 -07:00
Vinnie Falco
34b7599df6 Rename to IsCond<> 2013-09-09 10:28:09 -07:00
Vinnie Falco
270ceb7ceb Defer DeadlineTimer callback until the lock is released 2013-09-07 21:20:13 -07:00
Vinnie Falco
200c935228 Disable gcc warning for KeyvaDB 2013-09-07 11:57:53 -07:00
Vinnie Falco
f0c57cf95c Add HTTPClientType and HTTPMessage related helpers 2013-09-07 11:53:38 -07:00
Vinnie Falco
19d05b8024 Tidy up contract checks in InterruptibleThread 2013-09-07 11:53:38 -07:00
Vinnie Falco
2a362a99da Disable exception catching in unit tests 2013-09-07 11:53:37 -07:00
Vinnie Falco
497c8aeabf Add ContentBodyBuffer 2013-09-07 11:53:37 -07:00
Vinnie Falco
c35843fda5 Add SharedFunction to replace boost::function 2013-09-07 11:53:36 -07:00
Vinnie Falco
88af355028 Update programming by contract macros 2013-09-07 11:53:36 -07:00
Vinnie Falco
10958459a3 Add BEAST_MOVE_* macros 2013-09-07 11:53:35 -07:00
Vinnie Falco
5f6e2ee026 Add Debug unit test to check bassert behavior 2013-09-07 11:53:35 -07:00
Vinnie Falco
7a7514fa0c Add StringPairArray::swapWith 2013-09-07 11:53:34 -07:00
Vinnie Falco
637eafedee Add UniformResourceLocator and ParsedURL 2013-09-07 11:53:34 -07:00
Vinnie Falco
3f74cb76e9 Rename boost_asio files 2013-09-07 11:53:34 -07:00
Vinnie Falco
f79b34b2c9 Add http-parser to boost_asio 2013-09-07 11:53:33 -07:00
Vinnie Falco
85ced3dbf7 Use destroy() override instead of ContainerDeletePolicy for SharedObject 2013-09-07 11:53:32 -07:00
Vinnie Falco
718569d6a1 Fix DeadlineTimer for InterruptibleThread::wait timeout 2013-09-06 21:45:41 -07:00
Vinnie Falco
a56c01d044 Fix DeadlineTimer for InterruptibleThread::wait timeout 2013-09-06 21:44:53 -07:00
Vinnie Falco
04a4219a75 Make bassert fatal 2013-09-06 21:29:16 -07:00
Vinnie Falco
16113e783f Fix SharedPtr commit bug again 2013-09-06 21:25:55 -07:00
Vinnie Falco
63b0a1c9e0 Fix reference count bug in SharedPtr container 2013-09-06 20:18:25 -07:00
Vinnie Falco
a386b458fb Merge commit '60d5ca452314e0131993e1adcc004394fb64eed2' as 'Subtrees/beast/modules/beast_asio/parsehttp' 2013-09-06 12:46:39 -07:00
Vinnie Falco
8017b18039 Remove incorrect parsehttp subtree path 2013-09-06 12:46:23 -07:00
Vinnie Falco
981f6a8972 Merge commit 'ef544b108f8979e4622bd27657c9e93271b461fc' as 'Subtrees/beast/beast_asio/parsehttp' 2013-09-06 12:44:36 -07:00
Vinnie Falco
429deb959c Fix compile error on configs with c++11 move support 2013-09-05 05:08:41 -07:00
Vinnie Falco
86793468de Replace obsolete OncePerSecond with DeadlineTimer 2013-09-05 04:38:18 -07:00
Vinnie Falco
04d039eddd New ContainerTest generic templates 2013-09-05 04:22:27 -07:00
Vinnie Falco
201221253d Refactor SharedPtr and fix ContainerDeletePolicy bug 2013-09-05 04:22:26 -07:00
Vinnie Falco
aa2773e483 Add HashMap unit test 2013-09-05 04:22:25 -07:00
Vinnie Falco
25f29a2287 Add new-styled Intrusive and MPL modules 2013-09-05 04:22:25 -07:00
Vinnie Falco
b0503691c5 Fix bug and tidy up DeadlineTimer 2013-09-04 15:17:22 -07:00
Vinnie Falco
457c3262d7 Fix String from number conversions 2013-09-04 13:24:41 -07:00
Vinnie Falco
de2c4cc7b8 Added DynamicArray, DynamicList, and HashMap 2013-09-03 08:31:16 -07:00
Vinnie Falco
81e5b59060 Update TODO Files 2013-09-02 18:03:44 -07:00
Vinnie Falco
96587dc68c Add BeforeBoost.h and tidy up beast system headers 2013-09-01 12:22:08 -07:00
Vinnie Falco
d9d291abcb Tidy up includes and header material 2013-08-30 17:33:33 -07:00
Vinnie Falco
38516ef793 Tidy up beast project files 2013-08-30 17:24:32 -07:00
JoelKatz
5acd433080 Fix another regression. 2013-08-27 01:49:46 -07:00
Vinnie Falco
5c2da08c13 Fix warnings 2013-08-26 18:59:57 -07:00
Vinnie Falco
3c79ebda17 Add toString for IPv4Address 2013-08-25 01:57:50 -07:00
Vinnie Falco
46e5dc2f5c Add SSLContext 2013-08-25 01:57:50 -07:00
Vinnie Falco
0aa7e871d1 Improvements to Socket and SocketWrapper 2013-08-24 20:06:17 -07:00
Vinnie Falco
34527fbbe4 Add SocketWrapperStrand 2013-08-24 20:06:16 -07:00
Vinnie Falco
9fcab37445 Fix PrefilledReadStream::close to use lowest_layer 2013-08-24 20:06:16 -07:00
Vinnie Falco
5c0ee3d9a8 Make asio Socket unit tests run automatically 2013-08-24 20:06:16 -07:00
Vinnie Falco
f3327e6dca Update to SQLite 3.8.0 Pre-release (as of 2013-08-22 02:56 UTC) 2013-08-24 20:06:15 -07:00
Vinnie Falco
0e6e22ac3d Update sqlite to 3.7.17 (2013-05-20) 2013-08-24 18:48:08 -07:00
Vinnie Falco
5002ab2169 Merge beast_basics to beast_core 2013-08-24 10:18:24 -07:00
Vinnie Falco
db05b9ff04 Add TracketMutex unit test 2013-08-23 17:49:29 -07:00
Vinnie Falco
04f9270772 Add TrackedMutex and measureFunctionCallTime 2013-08-23 15:00:04 -07:00
Vinnie Falco
29feaba22f Fix KeyvaDB warnings 2013-08-23 07:01:37 -07:00
Vinnie Falco
dd3fc7a084 Fix #ifdef for pragma 2013-08-22 18:43:55 -07:00
Vinnie Falco
c5130e3eb3 Add String::fromNumber<> template for disambiguation 2013-08-22 18:10:01 -07:00
Vinnie Falco
b4855b6ac9 New beast Socket, SharedHandler, ComposedAsyncOperation APIs 2013-08-21 19:41:22 -07:00
Vinnie Falco
b09e975b4c Fix DirectoryIterator when multiple wildcards are used. 2013-08-20 15:24:02 -07:00
Vinnie Falco
ac9c02f73b Fix ProtectedCall default handler 2013-08-20 15:22:21 -07:00
Vinnie Falco
52ff45549d Make HandlerCall operator() const 2013-08-18 17:21:59 -07:00
Vinnie Falco
325a265a33 Add explicit checking for OpenSSL multithreading support 2013-08-18 13:09:09 -07:00
Vinnie Falco
918950ba49 Move destroy to the .cpp 2013-08-18 13:09:09 -07:00
Vinnie Falco
34dfcee2e8 Fix pure virtual stubs for future returns 2013-08-18 13:08:34 -07:00
Vinnie Falco
95cb192209 Clean up combinations of buffered handshaking and future returns 2013-08-18 03:20:57 -07:00
Vinnie Falco
c1bef9b35c Tidy up argument types for all wrappers and call sites 2013-08-18 03:07:12 -07:00
Vinnie Falco
005672e8af Remove obsolete handler wrappers 2013-08-18 02:35:53 -07:00
Vinnie Falco
e52e7d15dc New Context object for composed operations and continuation hooks 2013-08-18 01:53:43 -07:00
Vinnie Falco
dda53a96cc Fix clang compile error 2013-08-17 22:54:43 -07:00
Vinnie Falco
35f53516c7 Refactor Handler wrapper to meet the safety assurances of the original Handler 2013-08-17 21:10:03 -07:00
Vinnie Falco
14f8ed8dd2 Fatal error if a Thread is destroyed while running 2013-08-17 21:10:02 -07:00
Vinnie Falco
21b78adfee Add ContainerDeletePolicy for ownership containers 2013-08-17 21:10:01 -07:00
Vinnie Falco
503b8047b1 Fix thread destruction in TestPeer and better exception reporting 2013-08-17 21:10:00 -07:00
Vinnie Falco
d959af430e Fixes to handshake and socket wrapper 2013-08-17 21:09:59 -07:00
Vinnie Falco
4e908d3e96 Fix incorrect future returns for pure virtuals 2013-08-17 21:09:59 -07:00
Vinnie Falco
3db2b7d6a6 Fix gcc compile 2013-08-17 21:09:59 -07:00
Vinnie Falco
4615297b00 Refactor handshake parsing and logic classes 2013-08-17 21:09:58 -07:00
Vinnie Falco
6108aca055 Add TestPeerLogicProxyClient 2013-08-17 21:09:57 -07:00
Vinnie Falco
068cb83803 Generic HandshakeDetectStream and HandshakeDetectLogic 2013-08-17 21:09:57 -07:00
Vinnie Falco
22b4e17fad Allow selective enabling of async future returns 2013-08-17 21:09:56 -07:00
Vinnie Falco
7333d13dd4 Rename to max_needed for clarity 2013-08-17 21:09:55 -07:00
Vinnie Falco
77268845a6 Add class PrefilledReadStream 2013-08-17 21:09:55 -07:00
Vinnie Falco
93d490bc8f Fix async_result returns and handler copying 2013-08-17 21:09:55 -07:00
Vinnie Falco
e1d0bc83f4 Add default construction and isNull for Call handlers 2013-08-17 21:09:54 -07:00
Vinnie Falco
0ac3f826e1 Add 1-arity and 2-arity binding to CompletionCall 2013-08-17 21:09:54 -07:00
Vinnie Falco
2ef937a9dc Add this_layer and this_layer_type to SocketWrapper 2013-08-17 21:09:53 -07:00
Vinnie Falco
52b0f65bb3 Check for macro before setting it 2013-08-17 21:09:53 -07:00
Vinnie Falco
0c92204927 Tidy up move obsolete and deprecated files 2013-08-17 21:09:53 -07:00
Vinnie Falco
8632d43748 Fix missing return value 2013-08-16 10:43:31 -07:00
Vinnie Falco
9bf8c3765b Fix server to block until listening 2013-08-15 19:00:19 -07:00
Vinnie Falco
5b691224f0 Fix rvalue move arguments 2013-08-15 19:00:19 -07:00
Vinnie Falco
9cdf27cbf5 Make KeyvaDB unit tests run manually 2013-08-15 16:57:49 -07:00
Vinnie Falco
d1621692dc Report notes for issue #1 2013-08-15 16:57:46 -07:00
Vinnie Falco
cc133ccc4c Refactor SocketWrapper 2013-08-15 16:57:46 -07:00
Vinnie Falco
69f0eb109f Add BEAST_DEFINE_IS_CALL_POSSIBLE metaprogramming macro 2013-08-15 16:57:45 -07:00
Vinnie Falco
a3ab23a36a Improvements to TestPeer and PeerTest classes 2013-08-15 16:57:45 -07:00
Vinnie Falco
5e5b49d4e2 Consolidate Process::terminate code 2013-08-15 15:45:18 -07:00
Vinnie Falco
377c983ecb Remove spaces from unit test package and class names 2013-08-15 15:45:17 -07:00
Vinnie Falco
69b20b52cc Handshake detection wrappers 2013-08-15 15:45:17 -07:00
Vinnie Falco
e4a68d9962 Infinite PeerTest timeout when debugger attached 2013-08-15 15:45:17 -07:00
Vinnie Falco
21f0d63507 Add uint24 and network byte order conversions 2013-08-15 15:45:16 -07:00
Vinnie Falco
e7b008c6d5 Add some missing ByteOrder functions and templates 2013-08-15 15:45:16 -07:00
Vinnie Falco
7735187d36 Move PeerRole to its own file 2013-08-15 15:45:15 -07:00
Vinnie Falco
85f4d7d025 Move some classes into their own files 2013-08-15 15:45:15 -07:00
Vinnie Falco
e0eaa08597 Add PROXY TestPeer client 2013-08-15 15:45:15 -07:00
Vinnie Falco
43c065c5b6 Robust method for extracting the underlying template type 2013-08-15 15:45:14 -07:00
Vinnie Falco
df154e43b1 Import ProxyHandshake into beast 2013-08-15 15:45:14 -07:00
Vinnie Falco
ba21367b40 Fix unused variable warning 2013-08-15 08:31:13 -07:00
Vinnie Falco
c420f60259 Fix Workers warning 2013-08-15 08:28:51 -07:00
Vinnie Falco
b13f35645a Call _exit from Process::terminate() 2013-08-12 13:29:24 -07:00
Vinnie Falco
68560c9ea7 Add thread naming to Workers 2013-08-12 11:00:55 -07:00
Vinnie Falco
1a9019f5f5 Add numberOfCurrentlyRunningTasks to Workers 2013-08-12 11:00:47 -07:00
Vinnie Falco
969eeec717 Add programming by contract support 2013-08-12 11:00:37 -07:00
Vinnie Falco
1f59e38dc7 Use std::ostream for double to String conversions 2013-08-10 03:12:53 -07:00
Vinnie Falco
b202b82f5a Disable failing TestPeer unit test 2013-08-10 00:46:33 -07:00
Vinnie Falco
d0bdafff71 Fix c++0x errors 2013-08-10 00:45:40 -07:00
Vinnie Falco
685af493a4 Use deadline_timer to handle async logic properly 2013-08-09 23:14:58 -07:00
Vinnie Falco
e8ad5a0e6b Tidy up beast_asio 2013-08-09 20:53:49 -07:00
Vinnie Falco
000b5a2b7c Fix gcc warnings and errors 2013-08-09 19:59:59 -07:00
Vinnie Falco
88ffd3cdfb TestPeer boost::asio Socket and UnitTest framework 2013-08-09 19:47:12 -07:00
Vinnie Falco
98352429c2 Update .gitignore for beast_boost module 2013-08-09 19:23:40 -07:00
Vinnie Falco
5171a00569 Clean up rvalues in arguments and call sites 2013-08-09 19:23:40 -07:00
Vinnie Falco
01af51308e Add SslContext abstraction 2013-08-09 19:23:40 -07:00
Vinnie Falco
65d4440d0d Fix using BOOST_ASIO_MOVE_CAST for passing rvalue references 2013-08-07 19:14:21 -07:00
Vinnie Falco
37276f357c Fix use sites of BOOST_ASIO_MOVE_ARG 2013-08-07 18:42:19 -07:00
Vinnie Falco
e0b6620df2 More match options for unit test selection string 2013-08-07 17:31:48 -07:00
Vinnie Falco
ebabeb6fbd Add 'print' unit test which prints the list of tests 2013-08-07 15:34:13 -07:00
Vinnie Falco
ab6c138a7c Set __WIN32_WINNT in properties 2013-08-07 15:16:43 -07:00
Vinnie Falco
33e7c124a3 Fix gcc compile errors 2013-08-07 15:16:43 -07:00
Vinnie Falco
11ff62e120 Revise all Socket function signatures and return values 2013-08-07 15:16:42 -07:00
Vinnie Falco
155a6a09b6 Tidy up beast_asio 2013-08-07 15:16:41 -07:00
Vinnie Falco
74156b6b89 Add beast_asio module 2013-08-07 15:16:40 -07:00
Vinnie Falco
9387e7dd2d Tweak fatal_error macro to remove warning 2013-08-07 15:16:40 -07:00
Vinnie Falco
9aaaa6aef0 Make Uncopyable derivations public 2013-08-07 15:16:38 -07:00
Vinnie Falco
cc9358ee95 Adjust access-specifier 2013-08-07 15:16:38 -07:00
Vinnie Falco
06ed133ae3 Add fatal_error() macro 2013-08-07 15:16:37 -07:00
Vinnie Falco
75b778924f Change to fatal_assert() 2013-08-07 15:16:37 -07:00
Vinnie Falco
fe902db322 Update beast vcxproj 2013-08-07 15:16:36 -07:00
Vinnie Falco
0c00335627 Fatal error in ~Thread if thread still running (undefined behavior) 2013-08-07 15:16:36 -07:00
Vinnie Falco
5e3548fc00 Add fatal_require and improved FatalError reporting interfaces 2013-08-07 15:16:35 -07:00
Vinnie Falco
c8837d07e7 Add bool return to stopThread 2013-08-07 15:16:35 -07:00
Vinnie Falco
fd14957072 Return results of expect in UnitTest 2013-08-07 15:16:35 -07:00
Vinnie Falco
1df03b67e7 Add RelativeTime::seconds() ctor 2013-08-07 15:16:34 -07:00
Vinnie Falco
6d9131084f Add default to UnitTest::fail() and tidy up 2013-08-07 15:16:34 -07:00
Vinnie Falco
66b96b90d5 Generate a fatal error if a running Thread object is destroyed 2013-08-07 15:16:33 -07:00
Vinnie Falco
03baeccda5 Add getConstData for MemoryBlock 2013-08-07 15:16:33 -07:00
Vinnie Falco
91b0c1cd0e Add Random::fillBitsRandomly 2013-08-07 15:16:32 -07:00
Vinnie Falco
6d974daaf2 Add default value to Semaphore ctor 2013-08-07 15:16:32 -07:00
Vinnie Falco
849d0c1c34 Return popped element in List 2013-08-07 15:16:31 -07:00
Vinnie Falco
63dc75fb81 Add std container compatibility to MemoryBlock 2013-08-07 15:16:31 -07:00
Vinnie Falco
f07732a9ca Fix clang warnings 2013-08-07 15:16:31 -07:00
Alex Dupre
9702446d91 Comment out a quite useless test case if platform is not Windows, since getcwd()
return the canonical path (resolving symlinks), while HOME may contains symlinks.
2013-08-05 09:39:41 -07:00
Alex Dupre
d3a07234cd Fix retrieval of CPU info (number of CPUs, speed, flags, vendor) on FreeBSD,
using 'dmesg' and 'sysctl' instead of /proc/cpuinfo that is Linux-specific.
2013-08-05 09:39:34 -07:00
Vinnie Falco
cf2c43e7ab Fix clang compile 2013-08-01 15:54:24 -07:00
Vinnie Falco
83c3beb2ed Run startup unit tests from Main 2013-08-01 15:27:18 -07:00
Vinnie Falco
52133569f5 Add runStartup category to UnitTest 2013-08-01 15:27:18 -07:00
Vinnie Falco
1c39721ff7 Add SemanticVersion 2013-08-01 15:27:18 -07:00
Vinnie Falco
57b2c3c2e4 Add overloaded translate() that takes CharPointer_UTF8 2013-08-01 11:36:13 -07:00
Vinnie Falco
ed82643faf Fix mutex scope and storage duration 2013-07-31 18:41:59 -07:00
Vinnie Falco
5131752402 Add return value to some InputStream methods 2013-07-31 16:40:28 -07:00
Vinnie Falco
1b44479311 Default parameter to false 2013-07-31 16:40:28 -07:00
Vinnie Falco
4c987d04d6 Add tests for SSE3 capability 2013-07-31 16:35:52 -07:00
Vinnie Falco
728ace79c5 Fix Android warnings 2013-07-31 16:29:34 -07:00
Vinnie Falco
a937b97a61 Add FatalError 2013-07-30 21:05:11 -07:00
Vinnie Falco
35d2ea862b Fix clang compile 2013-07-29 16:33:09 -07:00
Vinnie Falco
1c502948f5 Add ProtectedCallTests 2013-07-29 15:35:27 -07:00
Vinnie Falco
45f321a3a2 Fix summary stats for unit test results 2013-07-29 14:54:54 -07:00
Vinnie Falco
85f5672280 Fix UnitTest doc 2013-07-29 14:38:58 -07:00
Vinnie Falco
62c1b02eb1 Clarify behavior of pauseAllThreadsAndWait 2013-07-29 14:00:45 -07:00
Vinnie Falco
67af5ccda8 Fix KeyvaDB unit test package name 2013-07-29 13:43:39 -07:00
Vinnie Falco
bd49b0edf8 Add class Workers 2013-07-29 13:31:50 -07:00
Vinnie Falco
3126654d33 Add timeout to Semaphore::wait 2013-07-29 13:31:11 -07:00
Vinnie Falco
1b55d39997 Fix integer to String conversions 2013-07-29 13:31:10 -07:00
Vinnie Falco
51372c01f2 Make expectEquals more generic 2013-07-29 13:31:10 -07:00
Vinnie Falco
7008db7dda Add initiallySignaled parameter to WaitableEvent 2013-07-29 13:31:10 -07:00
Vinnie Falco
47456a1723 Add class Workers 2013-07-29 13:30:06 -07:00
Vinnie Falco
933ba3c7d6 Make timeouts default to infinity in Thread 2013-07-29 13:30:06 -07:00
Vinnie Falco
08ff5f02b1 Tidy up String conversions 2013-07-29 13:30:05 -07:00
Vinnie Falco
2bf39203e8 Add infinite wait default to waitForThreadToExit 2013-07-29 13:30:04 -07:00
Vinnie Falco
d323a84dd9 Remove unused function 2013-07-29 13:30:04 -07:00
Vinnie Falco
2e402ba654 Add lexicalCast 2013-07-28 21:27:04 -07:00
Vinnie Falco
f0afa04037 Fix numberToString for limit cases 2013-07-28 21:04:20 -07:00
Vinnie Falco
b9290acb85 Update TODO 2013-07-28 14:58:20 -07:00
Vinnie Falco
cb47146b3b Add classes ProtectedCall and Main 2013-07-28 14:58:19 -07:00
Vinnie Falco
04fadc84a6 Rename to swapWith and use a template parameter 2013-07-28 14:58:19 -07:00
Vinnie Falco
18333eac29 Remove unnecessary .mm files 2013-07-28 14:58:18 -07:00
Vinnie Falco
abd3668b65 Upgrade UnitTest and provide JUnit XML output formatting 2013-07-28 02:44:26 -07:00
Vinnie Falco
9064af3b1c Call pass() in AbstractFifo unit test 2013-07-28 02:41:09 -07:00
Vinnie Falco
2f7b42b13b Return index in Array::add() 2013-07-28 02:41:09 -07:00
Vinnie Falco
56755c278b Add UnitTest::anyTestsFailed() 2013-07-27 14:57:38 -07:00
Vinnie Falco
7266111b68 Generalize swapWithArray
Conflicts:
	Subtrees/beast/TODO.txt
2013-07-27 11:00:21 -07:00
Vinnie Falco
810954014b Add hardened HashFunction to UnsignedInteger 2013-07-27 10:47:32 -07:00
Vinnie Falco
3248a1b57f HashMap ctor stores an instance of the hash function 2013-07-27 10:47:32 -07:00
Vinnie Falco
4edf1fd8fa Add OwnedArray::clearQuick() 2013-07-27 10:47:32 -07:00
Vinnie Falco
67f22e602e Update TODO 2013-07-24 11:51:39 -07:00
Vinnie Falco
114012fab2 Add pass and fail to UnitTest 2013-07-24 11:47:43 -07:00
Vinnie Falco
c50fc88827 Update TODO 2013-07-24 11:47:42 -07:00
Vinnie Falco
f5e4b3aeb3 Use beast_sqlite and beast_sqdb 2013-07-24 11:47:42 -07:00
Vinnie Falco
76e0d4c770 Add beast_sqdb module 2013-07-24 11:47:42 -07:00
Vinnie Falco
ed8d9b1ed3 Add beast_sqlite module 2013-07-24 11:47:41 -07:00
Vinnie Falco
c825fce0cf Put unit test in 'beast' group 2013-07-23 14:06:06 -07:00
Vinnie Falco
0f5b35f408 Import KeyvaDB to Beast 2013-07-23 13:23:07 -07:00
Vinnie Falco
ae0cd50840 Optimised Result::ok() 2013-07-23 13:04:52 -07:00
Vinnie Falco
9a7c5b02d4 Allow external buffers in MemoryOutputStream 2013-07-22 13:20:52 -07:00
Vinnie Falco
66c5b4ed01 Add identity import tests to NodeStoreTests 2013-07-21 14:02:23 -07:00
Vinnie Falco
f125c3a3c8 Add template I/O for streams 2013-07-21 12:56:27 -07:00
Vinnie Falco
e36f027a9a Clean up RandomAccessFile 2013-07-21 12:56:26 -07:00
Vinnie Falco
dc7035ed19 Update RandomAccessFile unit test 2013-07-21 12:55:47 -07:00
Vinnie Falco
d25fe19d87 Add group and run type to UnitTest 2013-07-21 12:55:47 -07:00
Vinnie Falco
dc52a31814 Add RecycledObjectPool 2013-07-21 12:54:14 -07:00
Vinnie Falco
2f45613017 Hack to fix Random 2013-07-21 12:54:13 -07:00
Vinnie Falco
8d881d3b6f Add Random::nextBlob 2013-07-21 12:54:13 -07:00
Vinnie Falco
ce6f051551 Fix compare() 2013-07-21 12:54:11 -07:00
Vinnie Falco
b3b188061a Fix POSIX RandomAccessFile 2013-07-21 12:54:11 -07:00
Vinnie Falco
49f70c083d Add POSIX RandomAccessFile native routines 2013-07-21 12:54:11 -07:00
Vinnie Falco
ed392300b4 Fix RandomAccessFile read 2013-07-21 12:54:10 -07:00
Vinnie Falco
a3af6404b0 RandomAccessFile unit tests 2013-07-21 12:54:09 -07:00
Vinnie Falco
312b7352b2 Run an individual unit test 2013-07-21 12:54:08 -07:00
Vinnie Falco
23e4bc4f9a Run a named unit test 2013-07-21 12:54:08 -07:00
Vinnie Falco
8208bb25ba Add RandomAccessFile 2013-07-21 12:54:07 -07:00
Vinnie Falco
a90ea340d2 Add return values to OutputStream methods 2013-07-21 12:54:07 -07:00
Vinnie Falco
e2fd51c282 Assert on type size invariant 2013-07-21 12:54:05 -07:00
Vinnie Falco
0008193a20 Fix gcc compile 2013-07-15 09:38:12 -07:00
Vinnie Falco
5c691c0883 Rename to SharedObjectArray
Conflicts:
	Builds/VisualStudio2012/RippleD.vcxproj.filters
2013-07-15 09:38:11 -07:00
Vinnie Falco
e363cbe542 Add UnsignedInteger class and tests 2013-07-15 09:38:11 -07:00
Vinnie Falco
d8bec0a43c Add module beast_crypto 2013-07-15 09:38:11 -07:00
Vinnie Falco
e1c176ceb7 Added StringArray::ensureStorageAllocated 2013-07-15 09:38:09 -07:00
Vinnie Falco
a1289eb502 Use template for UnitTest 2013-07-15 09:38:09 -07:00
Vinnie Falco
4a00e8feed Adjust UnitTest output 2013-07-15 09:38:08 -07:00
Vinnie Falco
60e0e5c38f Move UnitTest to diagnostic 2013-07-15 09:38:07 -07:00
Vinnie Falco
93ef4f2301 Rename to SharedObject 2013-07-15 09:38:07 -07:00
Vinnie Falco
ccda3068ef Remove deprecated SharedObject 2013-07-15 09:38:06 -07:00
Vinnie Falco
ebad05a9df Add DeadlineTimer member docs 2013-07-15 09:38:06 -07:00
Vinnie Falco
4f19ea4a8e Fix warning 2013-07-12 14:43:06 -07:00
Vinnie Falco
8e2722da95 Improve DeadlineTimer 2013-07-10 09:51:32 -07:00
Vinnie Falco
b5fbcfaa8e Replace deprecated GetVersionEx Win32 call 2013-07-10 09:51:32 -07:00
Vinnie Falco
d0ea813515 Add timer parameter to DeadlineTimer callback 2013-07-10 09:51:31 -07:00
Vinnie Falco
932bc382dc Update TODO 2013-07-10 09:51:29 -07:00
Vinnie Falco
bdfb19fe38 Add DeadlineTimer class 2013-07-10 09:51:28 -07:00
Vinnie Falco
d798330f44 Update documentation for member 2013-07-10 09:51:27 -07:00
Vinnie Falco
caa3a5d0bb Replace calls to deprecated siginterrupt() 2013-07-10 09:51:26 -07:00
Vinnie Falco
d54a5c49c1 Fix warnings and errors 2013-07-10 09:51:25 -07:00
Vinnie Falco
9e75075dc4 Adjust a comment 2013-07-10 09:51:24 -07:00
Vinnie Falco
6a833e19aa Add Objective C++ beast_basics compile unit 2013-07-10 09:51:23 -07:00
Vinnie Falco
941ac2ae5e Fix compile error for two phase lookup 2013-07-10 09:51:23 -07:00
JoelKatz
34f4b3cad4 beast, not BEAST 2013-07-03 18:39:49 -07:00
Vinnie Falco
03948cd685 Various beast cleanups 2013-07-03 10:07:46 -07:00
Vinnie Falco
3c993884cd Fix beast macro calls 2013-07-03 10:05:43 -07:00
Vinnie Falco
9e99aed182 Add neverDestroyed lifetime for SharedSingleton 2013-07-03 09:41:46 -07:00
Vinnie Falco
66edf2822c Fix for atomic aliasing in Clang or GCC builds 2013-07-03 09:41:46 -07:00
Vinnie Falco
9c9ba18619 constness fix in OwnedArray 2013-07-03 09:41:46 -07:00
Vinnie Falco
485d048415 Update some beast container code 2013-07-03 09:41:44 -07:00
Alex Dupre
10a0db9160 Linux implementation of isRunningUnderDebugger using ptrace() doesn't work on FreeBSD.
(I doubt it'll work on Linux, too, but I'm not sure)
2013-07-03 09:41:43 -07:00
Alex Dupre
8260b75586 FreeBSD tuning. 2013-07-03 09:41:43 -07:00
Vinnie Falco
8365ed7408 Remove ConcurrentObject and rename to SharedData 2013-07-01 09:32:08 -07:00
Vinnie Falco
d4298d1bd2 Tidy up List documentation 2013-07-01 09:32:07 -07:00
Vinnie Falco
75736f547a Tidy up LeakChecked and configuration macro 2013-07-01 09:32:07 -07:00
Vinnie Falco
e84b524fc4 Default MSVC CRT Debug heap leak checks to ON 2013-07-01 09:32:07 -07:00
Vinnie Falco
7eb80615c7 Tidy up project file 2013-07-01 09:32:06 -07:00
Vinnie Falco
030c763549 Remove beast::Singleton 2013-07-01 09:32:05 -07:00
Vinnie Falco
57d0e556d8 Fix File::nonexistent false leak using SharedSingleton 2013-07-01 09:32:05 -07:00
Vinnie Falco
3fea8a4202 Rename SharedSingleton and move files around 2013-07-01 09:32:05 -07:00
Vinnie Falco
ca1eda2df1 Use LeakChecked throughout Beast 2013-07-01 09:32:04 -07:00
Vinnie Falco
386fea5e71 Tidy up and activate the MSVC Debug Heap 2013-07-01 09:32:03 -07:00
Vinnie Falco
e7bda30506 Large tidying up of Beast
- Move key classes into beast_core
- Tidy up various macros and files
- Disable leaking FifoFreeStoreWithTLS
2013-07-01 09:32:03 -07:00
Vinnie Falco
6dcf61669c Return object in OwnedArray add routines 2013-07-01 09:32:02 -07:00
Alex Dupre
1832463010 Implement MACAddress::findAllAddresses as in MacOSX. 2013-06-29 10:04:27 +02:00
Alex Dupre
a0baaeafd1 Use nanosleep on FreeBSD, instead of failing because clock_nanosleep is missing. 2013-06-29 10:02:51 +02:00
Vinnie Falco
c5a113ca80 Put boost placeholders in a namespace (hack) 2013-06-28 17:01:04 -07:00
Vinnie Falco
e6b3ded33f Lift cref into beast namespace 2013-06-28 17:01:03 -07:00
Vinnie Falco
aa66af151a Roll back 7 commits 2013-06-28 11:48:43 -07:00
Vinnie Falco
ab57495e29 Hack to put boost placeholders in a namespace 2013-06-28 10:19:40 -07:00
Vinnie Falco
afb5d161e3 Annotate bind 2013-06-28 08:11:04 -07:00
Vinnie Falco
1fdaafb30b Lift cref into beast namespace 2013-06-28 07:02:48 -07:00
Vinnie Falco
9328e6fdec Improve bind, placeholder, and function support 2013-06-28 07:02:47 -07:00
Vinnie Falco
98ac0697a9 Add default EntryPoints 2013-06-28 07:02:47 -07:00
Vinnie Falco
b658f82510 Fix for UTF32 strings 2013-06-27 11:52:09 -07:00
Vinnie Falco
b50894fa70 Fix UTF32 string creation 2013-06-27 07:23:45 -07:00
Vinnie Falco
e002000764 Fix assertion 2013-06-26 17:42:48 -07:00
Vinnie Falco
9182c1558c Update Beast ReadMe 2013-06-26 17:42:47 -07:00
Vinnie Falco
ded7eca60f Fix false assertion 2013-06-26 17:42:47 -07:00
Vinnie Falco
74e8c881f7 Add missing native BSD support for Beast 2013-06-26 09:24:44 -07:00
Alex Dupre
f1eac72d20 Fix compilation on FreeBSD. 2013-06-26 12:02:22 +02:00
Vinnie Falco
6d13ddd43a Fix Clang static analysis warnings 2013-06-26 00:19:41 -07:00
Vinnie Falco
94e9632234 Add override specifier to some Beast functions 2013-06-24 15:51:32 -07:00
Vinnie Falco
3699b74ebb Alternate thread naming for older GLIBC 2013-06-24 15:07:09 -07:00
Vinnie Falco
4eeab3bc3e Remove unused Beast configuration macros 2013-06-24 09:40:17 -07:00
Vinnie Falco
0d1ded5278 Avoid using pthread_setname_np on older linux distros 2013-06-23 11:09:53 -07:00
Vinnie Falco
86142ecdf1 Add BEAST_ARM macro to detect ARM platforms 2013-06-23 09:18:58 -07:00
Vinnie Falco
8cdc00230d Add BEAST_FILEANDLINE_ macro for warning pragmas 2013-06-23 09:18:58 -07:00
Vinnie Falco
d3d674ba4b Beast fixes for FreeBSD 2013-06-20 13:38:44 -07:00
Vinnie Falco
6d961d87f8 Add beast_basics and remove unused modules from build 2013-06-17 09:38:16 -07:00
Vinnie Falco
5a28c54505 Update Beast copyright and various tidying 2013-06-17 09:28:43 -07:00
Vinnie Falco
9968101d96 Add Doxyfile 2013-06-17 07:09:34 -07:00
Vinnie Falco
d0a309e6da Add beast_basics module 2013-06-17 07:09:33 -07:00
Vinnie Falco
f2d84f0a90 Add Beast fork from JUCE commit 265fb0e8ebc26e1469d6edcc68d2ca9acefeb508 2013-06-16 16:57:52 -07:00
Vinnie Falco
d81345d8f6 Update CodingStyle document 2013-06-06 21:43:22 -07:00
Vinnie Falco
97b6260c9a Use beast::ScopedPointer to hold IFeeVote in Application 2013-06-02 08:55:07 -07:00
Vinnie Falco
48cf78af68 Beast initial commit 2013-06-02 08:55:07 -07:00
3830 changed files with 553828 additions and 694308 deletions

103
.clang-format Normal file
View File

@@ -0,0 +1,103 @@
---
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 80
CommentPragmas: "^ IWYU pragma:"
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
IncludeBlocks: Regroup
IncludeCategories:
- Regex: "^<(test)/"
Priority: 0
- Regex: "^<(xrpld)/"
Priority: 1
- Regex: "^<(xrpl)/"
Priority: 2
- Regex: "^<(boost)/"
Priority: 3
- Regex: "^.*/"
Priority: 4
- Regex: '^.*\.h'
Priority: 5
- Regex: ".*"
Priority: 6
IncludeIsMainRegex: "$"
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
RequiresClausePosition: OwnLine
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
QualifierAlignment: Right
---
Language: Proto
BasedOnStyle: Google
ColumnLimit: 0
IndentWidth: 2

37
.codecov.yml Normal file
View File

@@ -0,0 +1,37 @@
codecov:
require_ci_to_pass: true
comment:
behavior: default
layout: reach,diff,flags,tree,reach
show_carryforward_flags: false
coverage:
range: "70..85"
precision: 1
round: nearest
status:
project:
default:
target: 75%
threshold: 2%
patch:
default:
target: auto
threshold: 2%
changes: false
github_checks:
annotations: true
parsers:
cobertura:
partials_as_hits: true
handle_missing_conditions: true
slack_app: false
ignore:
- "src/test/"
- "include/xrpl/beast/test/"
- "include/xrpl/beast/unit_test/"

16
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,16 @@
# This feature requires Git >= 2.24
# To use it by default in git blame:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
50760c693510894ca368e90369b0cc2dabfd07f3
e2384885f5f630c8f0ffe4bf21a169b433a16858
241b9ddde9e11beb7480600fd5ed90e1ef109b21
760f16f56835663d9286bd29294d074de26a7ba6
0eebe6a5f4246fced516d52b83ec4e7f47373edd
2189cc950c0cebb89e4e2fa3b2d8817205bf7cef
b9d007813378ad0ff45660dc07285b823c7e9855
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
552377c76f55b403a1c876df873a23d780fcc81c
97f0747e103f13e26e45b731731059b32f7679ac
b13370ac0d207217354f1fc1c29aef87769fb8a1
896b8c3b54a22b0497cb0d1ce95e1095f9a227ce

2
.gitattributes vendored
View File

@@ -1,5 +1,5 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
#* text=auto
# These annoying files
rippled.1 binary

8
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,8 @@
# Allow anyone to review any change by default.
*
# Require the rpc-reviewers team to review changes to the rpc code.
include/xrpl/protocol/ @xrplf/rpc-reviewers
src/libxrpl/protocol/ @xrplf/rpc-reviewers
src/xrpld/rpc/ @xrplf/rpc-reviewers
src/xrpld/app/misc/ @xrplf/rpc-reviewers

36
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,36 @@
---
name: Bug Report
about: Create a report to help us improve rippled
title: "[Title with short description] (Version: [rippled version])"
labels: ""
assignees: ""
---
<!-- Please search existing issues to avoid creating duplicates.-->
## Issue Description
<!--Provide a summary for your issue/bug.-->
## Steps to Reproduce
<!--List in detail the exact steps to reproduce the unexpected behavior of the software.-->
## Expected Result
<!--Explain in detail what behavior you expected to happen.-->
## Actual Result
<!--Explain in detail what behavior actually happened.-->
## Environment
<!--Please describe your environment setup (such as Ubuntu 18.04 with Boost 1.70).-->
<!-- If you are using a formal release, please use the version returned by './rippled --version' as the version number-->
<!-- If you are working off of develop, please add the git hash via 'git rev-parse HEAD'-->
## Supporting Files
<!--If you have supporting files such as a log, feel free to post a link here using Github Gist.-->
<!--Consider adding configuration files with private information removed via Github Gist. -->

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XRP Ledger Documentation
url: https://xrpl.org/
about: All things about XRPL
- name: Security bug bounty program
url: https://ripple.com/bug-bounty/
about: Please report security-relevant bugs in our software here.

View File

@@ -0,0 +1,25 @@
---
name: Feature Request
about: Suggest a new feature for the rippled project
title: "[Title with short description] (Version: [rippled version])"
labels: Feature Request
assignees: ""
---
<!-- Please search existing issues to avoid creating duplicates.-->
## Summary
<!-- Provide a summary to the feature request-->
## Motivation
<!-- Why do we need this feature?-->
## Solution
<!-- What is the solution?-->
## Paths Not Taken
<!-- What other alternatives have been considered?-->

62
.github/actions/build-deps/action.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
# This action installs and optionally uploads Conan dependencies to a remote
# repository. The dependencies will only be uploaded if the credentials are
# provided.
name: Build Conan dependencies
# Note that actions do not support 'type' and all inputs are strings, see
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
inputs:
build_dir:
description: "The directory where to build."
required: true
build_type:
description: 'The build type to use ("Debug", "Release").'
required: true
conan_remote_name:
description: "The name of the Conan remote to use."
required: true
conan_remote_url:
description: "The URL of the Conan endpoint to use."
required: true
conan_remote_username:
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
default: ""
conan_remote_password:
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
default: ""
force_build:
description: 'Force building of all dependencies ("true", "false").'
required: false
default: "false"
force_upload:
description: 'Force uploading of all dependencies ("true", "false").'
required: false
default: "false"
runs:
using: composite
steps:
- name: Install Conan dependencies
shell: bash
run: |
echo 'Installing dependencies.'
mkdir -p ${{ inputs.build_dir }}
cd ${{ inputs.build_dir }}
conan install \
--output-folder . \
--build ${{ inputs.force_build == 'true' && '"*"' || 'missing' }} \
--options:host '&:tests=True' \
--options:host '&:xrpld=True' \
--settings:all build_type=${{ inputs.build_type }} \
--format=json ..
- name: Upload Conan dependencies
if: ${{ inputs.conan_remote_username != '' && inputs.conan_remote_password != '' }}
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo "Logging into Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
conan remote login ${{ inputs.conan_remote_name }} "${{ inputs.conan_remote_username }}" --password "${{ inputs.conan_remote_password }}"
echo 'Uploading dependencies.'
conan upload '*' --confirm --check ${{ inputs.force_upload == 'true' && '--force' || '' }} --remote=${{ inputs.conan_remote_name }}

95
.github/actions/build-test/action.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
# This action build and tests the binary. The Conan dependencies must have
# already been installed (see the build-deps action).
name: Build and Test
# Note that actions do not support 'type' and all inputs are strings, see
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
inputs:
build_dir:
description: "The directory where to build."
required: true
build_only:
description: 'Whether to only build or to build and test the code ("true", "false").'
required: false
default: "false"
build_type:
description: 'The build type to use ("Debug", "Release").'
required: true
cmake_args:
description: "Additional arguments to pass to CMake."
required: false
default: ""
cmake_target:
description: "The CMake target to build."
required: true
codecov_token:
description: "The Codecov token to use for uploading coverage reports."
required: false
default: ""
os:
description: 'The operating system to use for the build ("linux", "macos", "windows").'
required: true
runs:
using: composite
steps:
- name: Configure CMake
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo 'Configuring CMake.'
cmake \
-G '${{ inputs.os == 'windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
${{ inputs.cmake_args }} \
..
- name: Build the binary
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo 'Building binary.'
cmake \
--build . \
--config ${{ inputs.build_type }} \
--parallel $(nproc) \
--target ${{ inputs.cmake_target }}
- name: Check linking
if: ${{ inputs.os == 'linux' }}
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo 'Checking linking.'
ldd ./rippled
if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
echo 'The binary is statically linked.'
else
echo 'The binary is dynamically linked.'
exit 1
fi
- name: Verify voidstar
if: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }}
shell: bash
working-directory: ${{ inputs.build_dir }}
run: |
echo 'Verifying presence of instrumentation.'
./rippled --version | grep libvoidstar
- name: Test the binary
if: ${{ inputs.build_only == 'false' }}
shell: bash
working-directory: ${{ inputs.build_dir }}/${{ inputs.os == 'windows' && inputs.build_type || '' }}
run: |
echo 'Testing binary.'
./rippled --unittest --unittest-jobs $(nproc)
ctest -j $(nproc) --output-on-failure
- name: Upload coverage report
if: ${{ inputs.cmake_target == 'coverage' }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
disable_search: true
disable_telem: true
fail_ci_if_error: true
files: ${{ inputs.build_dir }}/coverage.xml
plugins: noop
token: ${{ inputs.codecov_token }}
verbose: true

85
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,85 @@
<!--
This PR template helps you to write a good pull request description.
Please feel free to include additional useful information even beyond what is requested below.
If your branch is on a personal fork and has a name that allows it to
run CI build/test jobs (e.g. "ci/foo"), remember to rename it BEFORE
opening the PR. This avoids unnecessary redundant test runs. Renaming
the branch after opening the PR will close the PR.
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch
-->
## High Level Overview of Change
<!--
Please include a summary of the changes.
This may be a direct input to the release notes.
If too broad, please consider splitting into multiple PRs.
If a relevant task or issue, please link it here.
-->
### Context of Change
<!--
Please include the context of a change.
If a bug fix, when was the bug introduced? What was the behavior?
If a new feature, why was this architecture chosen? What were the alternatives?
If a refactor, how is this better than the previous implementation?
If there is a spec or design document for this feature, please link it here.
-->
### Type of Change
<!--
Please check [x] relevant options, delete irrelevant ones.
-->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactor (non-breaking change that only restructures code)
- [ ] Performance (increase or change in throughput and/or latency)
- [ ] Tests (you added tests for code that already exists, or your new feature included in this PR)
- [ ] Documentation update
- [ ] Chore (no impact to binary, e.g. `.gitignore`, formatting, dropping support for older tooling)
- [ ] Release
### API Impact
<!--
Please check [x] relevant options, delete irrelevant ones.
* If there is any impact to the public API methods (HTTP / WebSocket), please update https://github.com/xrplf/rippled/blob/develop/API-CHANGELOG.md
* Update API-CHANGELOG.md and add the change directly in this PR by pushing to your PR branch.
* libxrpl: See https://github.com/XRPLF/rippled/blob/develop/docs/build/depend.md
* Peer Protocol: See https://xrpl.org/peer-protocol.html
-->
- [ ] Public API: New feature (new methods and/or new fields)
- [ ] Public API: Breaking change (in general, breaking changes should only impact the next api_version)
- [ ] `libxrpl` change (any change that may affect `libxrpl` or dependents of `libxrpl`)
- [ ] Peer protocol change (must be backward compatible or bump the peer protocol version)
<!--
## Before / After
If relevant, use this section for an English description of the change at a technical level.
If this change affects an API, examples should be included here.
For performance-impacting changes, please provide these details:
1. Is this a new feature, bug fix, or improvement to existing functionality?
2. What behavior/functionality does the change impact?
3. In what processing can the impact be measured? Be as specific as possible - e.g. RPC client call, payment transaction that involves LOB, AMM, caching, DB operations, etc.
4. Does this change affect concurrent processing - e.g. does it involve acquiring locks, multi-threaded processing, or async processing?
-->
<!--
## Test Plan
If helpful, please describe the tests that you ran to verify your changes and provide instructions so that others can reproduce.
This section may not be needed if your change includes thoroughly commented unit tests.
-->
<!--
## Future Tasks
For future tasks related to PR.
-->

114
.github/scripts/levelization/README.md vendored Normal file
View File

@@ -0,0 +1,114 @@
# Levelization
Levelization is the term used to describe efforts to prevent rippled from
having or creating cyclic dependencies.
rippled code is organized into directories under `src/rippled` (and
`src/test`) representing modules. The modules are intended to be
organized into "tiers" or "levels" such that a module from one level can
only include code from lower levels. Additionally, a module
in one level should never include code in an `impl` folder of any level
other than it's own.
Unfortunately, over time, enforcement of levelization has been
inconsistent, so the current state of the code doesn't necessarily
reflect these rules. Whenever possible, developers should refactor any
levelization violations they find (by moving files or individual
classes). At the very least, don't make things worse.
The table below summarizes the _desired_ division of modules, based on the
state of the rippled code when it was created. The levels are numbered from
the bottom up with the lower level, lower numbered, more independent
modules listed first, and the higher level, higher numbered modules with
more dependencies listed later.
**tl;dr:** The modules listed first are more independent than the modules
listed later.
| Level / Tier | Module(s) |
| ------------ | -------------------------------------------------------------------------------------------------------- |
| 01 | ripple/beast ripple/unity |
| 02 | ripple/basics |
| 03 | ripple/json ripple/crypto |
| 04 | ripple/protocol |
| 05 | ripple/core ripple/conditions ripple/consensus ripple/resource ripple/server |
| 06 | ripple/peerfinder ripple/ledger ripple/nodestore ripple/net |
| 07 | ripple/shamap ripple/overlay |
| 08 | ripple/app |
| 09 | ripple/rpc |
| 10 | ripple/perflog |
| 11 | test/jtx test/beast test/csf |
| 12 | test/unit_test |
| 13 | test/crypto test/conditions test/json test/resource test/shamap test/peerfinder test/basics test/overlay |
| 14 | test |
| 15 | test/net test/protocol test/ledger test/consensus test/core test/server test/nodestore |
| 16 | test/rpc test/app |
(Note that `test` levelization is _much_ less important and _much_ less
strictly enforced than `ripple` levelization, other than the requirement
that `test` code should _never_ be included in `ripple` code.)
## Validation
The [levelization](generate.sh) script takes no parameters,
reads no environment variables, and can be run from any directory,
as long as it is in the expected location in the rippled repo.
It can be run at any time from within a checked out repo, and will
do an analysis of all the `#include`s in
the rippled source. The only caveat is that it runs much slower
under Windows than in Linux. It hasn't yet been tested under MacOS.
It generates many files of [results](results):
- `rawincludes.txt`: The raw dump of the `#includes`
- `paths.txt`: A second dump grouping the source module
to the destination module, deduped, and with frequency counts.
- `includes/`: A directory where each file represents a module and
contains a list of modules and counts that the module _includes_.
- `includedby/`: Similar to `includes/`, but the other way around. Each
file represents a module and contains a list of modules and counts
that _include_ the module.
- [`loops.txt`](results/loops.txt): A list of direct loops detected
between modules as they actually exist, as opposed to how they are
desired as described above. In a perfect repo, this file will be
empty.
This file is committed to the repo, and is used by the [levelization
Github workflow](../../workflows/check-levelization.yml) to validate
that nothing changed.
- [`ordering.txt`](results/ordering.txt): A list showing relationships
between modules where there are no loops as they actually exist, as
opposed to how they are desired as described above.
This file is committed to the repo, and is used by the [levelization
Github workflow](../../workflows/check-levelization.yml) to validate
that nothing changed.
- [`levelization.yml`](../../workflows/check-levelization.yml)
Github Actions workflow to test that levelization loops haven't
changed. Unfortunately, if changes are detected, it can't tell if
they are improvements or not, so if you have resolved any issues or
done anything else to improve levelization, run `levelization.sh`,
and commit the updated results.
The `loops.txt` and `ordering.txt` files relate the modules
using comparison signs, which indicate the number of times each
module is included in the other.
- `A > B` means that A should probably be at a higher level than B,
because B is included in A significantly more than A is included in B.
These results can be included in both `loops.txt` and `ordering.txt`.
Because `ordering.txt`only includes relationships where B is not
included in A at all, it will only include these types of results.
- `A ~= B` means that A and B are included in each other a different
number of times, but the values are so close that the script can't
definitively say that one should be above the other. These results
will only be included in `loops.txt`.
- `A == B` means that A and B include each other the same number of
times, so the script has no clue which should be higher. These results
will only be included in `loops.txt`.
The committed files hide the detailed values intentionally, to
prevent false alarms and merging issues, and because it's easy to
get those details locally.
1. Run `levelization.sh`
2. Grep the modules in `paths.txt`.
- For example, if a cycle is found `A ~= B`, simply `grep -w
A .github/scripts/levelization/results/paths.txt | grep -w B`

130
.github/scripts/levelization/generate.sh vendored Executable file
View File

@@ -0,0 +1,130 @@
#!/bin/bash
# Usage: generate.sh
# This script takes no parameters, reads no environment variables,
# and can be run from any directory, as long as it is in the expected
# location in the repo.
pushd $( dirname $0 )
if [ -v PS1 ]
then
# if the shell is interactive, clean up any flotsam before analyzing
git clean -ix
fi
# Ensure all sorting is ASCII-order consistently across platforms.
export LANG=C
rm -rfv results
mkdir results
includes="$( pwd )/results/rawincludes.txt"
pushd ../../..
echo Raw includes:
grep -r '^[ ]*#include.*/.*\.h' include src | \
grep -v boost | tee ${includes}
popd
pushd results
oldifs=${IFS}
IFS=:
mkdir includes
mkdir includedby
echo Build levelization paths
exec 3< ${includes} # open rawincludes.txt for input
while read -r -u 3 file include
do
level=$( echo ${file} | cut -d/ -f 2,3 )
# If the "level" indicates a file, cut off the filename
if [[ "${level##*.}" != "${level}" ]]
then
# Use the "toplevel" label as a workaround for `sort`
# inconsistencies between different utility versions
level="$( dirname ${level} )/toplevel"
fi
level=$( echo ${level} | tr '/' '.' )
includelevel=$( echo ${include} | sed 's/.*["<]//; s/[">].*//' | \
cut -d/ -f 1,2 )
if [[ "${includelevel##*.}" != "${includelevel}" ]]
then
# Use the "toplevel" label as a workaround for `sort`
# inconsistencies between different utility versions
includelevel="$( dirname ${includelevel} )/toplevel"
fi
includelevel=$( echo ${includelevel} | tr '/' '.' )
if [[ "$level" != "$includelevel" ]]
then
echo $level $includelevel | tee -a paths.txt
fi
done
echo Sort and dedup paths
sort -ds paths.txt | uniq -c | tee sortedpaths.txt
mv sortedpaths.txt paths.txt
exec 3>&- #close fd 3
IFS=${oldifs}
unset oldifs
echo Split into flat-file database
exec 4<paths.txt # open paths.txt for input
while read -r -u 4 count level include
do
echo ${include} ${count} | tee -a includes/${level}
echo ${level} ${count} | tee -a includedby/${include}
done
exec 4>&- #close fd 4
loops="$( pwd )/loops.txt"
ordering="$( pwd )/ordering.txt"
pushd includes
echo Search for loops
# Redirect stdout to a file
exec 4>&1
exec 1>"${loops}"
for source in *
do
if [[ -f "$source" ]]
then
exec 5<"${source}" # open for input
while read -r -u 5 include includefreq
do
if [[ -f $include ]]
then
if grep -q -w $source $include
then
if grep -q -w "Loop: $include $source" "${loops}"
then
continue
fi
sourcefreq=$( grep -w $source $include | cut -d\ -f2 )
echo "Loop: $source $include"
# If the counts are close, indicate that the two modules are
# on the same level, though they shouldn't be
if [[ $(( $includefreq - $sourcefreq )) -gt 3 ]]
then
echo -e " $source > $include\n"
elif [[ $(( $sourcefreq - $includefreq )) -gt 3 ]]
then
echo -e " $include > $source\n"
elif [[ $sourcefreq -eq $includefreq ]]
then
echo -e " $include == $source\n"
else
echo -e " $include ~= $source\n"
fi
else
echo "$source > $include" >> "${ordering}"
fi
fi
done
exec 5>&- #close fd 5
fi
done
exec 1>&4 #close fd 1
exec 4>&- #close fd 4
cat "${ordering}"
cat "${loops}"
popd
popd
popd

View File

@@ -0,0 +1,33 @@
Loop: test.jtx test.toplevel
test.toplevel > test.jtx
Loop: test.jtx test.unit_test
test.unit_test == test.jtx
Loop: xrpld.app xrpld.core
xrpld.app > xrpld.core
Loop: xrpld.app xrpld.ledger
xrpld.app > xrpld.ledger
Loop: xrpld.app xrpld.overlay
xrpld.overlay > xrpld.app
Loop: xrpld.app xrpld.peerfinder
xrpld.peerfinder ~= xrpld.app
Loop: xrpld.app xrpld.rpc
xrpld.rpc > xrpld.app
Loop: xrpld.app xrpld.shamap
xrpld.app > xrpld.shamap
Loop: xrpld.core xrpld.perflog
xrpld.perflog == xrpld.core
Loop: xrpld.overlay xrpld.rpc
xrpld.rpc ~= xrpld.overlay
Loop: xrpld.perflog xrpld.rpc
xrpld.rpc ~= xrpld.perflog

View File

@@ -0,0 +1,198 @@
libxrpl.basics > xrpl.basics
libxrpl.crypto > xrpl.basics
libxrpl.json > xrpl.basics
libxrpl.json > xrpl.json
libxrpl.net > xrpl.basics
libxrpl.net > xrpl.net
libxrpl.protocol > xrpl.basics
libxrpl.protocol > xrpl.json
libxrpl.protocol > xrpl.protocol
libxrpl.resource > xrpl.basics
libxrpl.resource > xrpl.json
libxrpl.resource > xrpl.resource
libxrpl.server > xrpl.basics
libxrpl.server > xrpl.json
libxrpl.server > xrpl.protocol
libxrpl.server > xrpl.server
test.app > test.jtx
test.app > test.rpc
test.app > test.toplevel
test.app > test.unit_test
test.app > xrpl.basics
test.app > xrpld.app
test.app > xrpld.core
test.app > xrpld.ledger
test.app > xrpld.nodestore
test.app > xrpld.overlay
test.app > xrpld.rpc
test.app > xrpl.json
test.app > xrpl.protocol
test.app > xrpl.resource
test.basics > test.jtx
test.basics > test.unit_test
test.basics > xrpl.basics
test.basics > xrpld.perflog
test.basics > xrpld.rpc
test.basics > xrpl.json
test.basics > xrpl.protocol
test.beast > xrpl.basics
test.conditions > xrpl.basics
test.conditions > xrpld.conditions
test.consensus > test.csf
test.consensus > test.toplevel
test.consensus > test.unit_test
test.consensus > xrpl.basics
test.consensus > xrpld.app
test.consensus > xrpld.consensus
test.consensus > xrpld.ledger
test.consensus > xrpl.json
test.core > test.jtx
test.core > test.toplevel
test.core > test.unit_test
test.core > xrpl.basics
test.core > xrpld.core
test.core > xrpld.perflog
test.core > xrpl.json
test.core > xrpl.server
test.csf > xrpl.basics
test.csf > xrpld.consensus
test.csf > xrpl.json
test.csf > xrpl.protocol
test.json > test.jtx
test.json > xrpl.json
test.jtx > xrpl.basics
test.jtx > xrpld.app
test.jtx > xrpld.core
test.jtx > xrpld.ledger
test.jtx > xrpld.rpc
test.jtx > xrpl.json
test.jtx > xrpl.net
test.jtx > xrpl.protocol
test.jtx > xrpl.resource
test.jtx > xrpl.server
test.ledger > test.jtx
test.ledger > test.toplevel
test.ledger > xrpl.basics
test.ledger > xrpld.app
test.ledger > xrpld.core
test.ledger > xrpld.ledger
test.ledger > xrpl.protocol
test.nodestore > test.jtx
test.nodestore > test.toplevel
test.nodestore > test.unit_test
test.nodestore > xrpl.basics
test.nodestore > xrpld.core
test.nodestore > xrpld.nodestore
test.nodestore > xrpld.unity
test.overlay > test.jtx
test.overlay > test.toplevel
test.overlay > test.unit_test
test.overlay > xrpl.basics
test.overlay > xrpld.app
test.overlay > xrpld.overlay
test.overlay > xrpld.peerfinder
test.overlay > xrpld.shamap
test.overlay > xrpl.protocol
test.peerfinder > test.beast
test.peerfinder > test.unit_test
test.peerfinder > xrpl.basics
test.peerfinder > xrpld.core
test.peerfinder > xrpld.peerfinder
test.peerfinder > xrpl.protocol
test.protocol > test.toplevel
test.protocol > xrpl.basics
test.protocol > xrpl.json
test.protocol > xrpl.protocol
test.resource > test.unit_test
test.resource > xrpl.basics
test.resource > xrpl.resource
test.rpc > test.jtx
test.rpc > test.toplevel
test.rpc > xrpl.basics
test.rpc > xrpld.app
test.rpc > xrpld.core
test.rpc > xrpld.overlay
test.rpc > xrpld.rpc
test.rpc > xrpl.json
test.rpc > xrpl.protocol
test.rpc > xrpl.resource
test.server > test.jtx
test.server > test.toplevel
test.server > test.unit_test
test.server > xrpl.basics
test.server > xrpld.app
test.server > xrpld.core
test.server > xrpld.rpc
test.server > xrpl.json
test.server > xrpl.server
test.shamap > test.unit_test
test.shamap > xrpl.basics
test.shamap > xrpld.nodestore
test.shamap > xrpld.shamap
test.shamap > xrpl.protocol
test.toplevel > test.csf
test.toplevel > xrpl.json
test.unit_test > xrpl.basics
tests.libxrpl > xrpl.basics
xrpl.json > xrpl.basics
xrpl.net > xrpl.basics
xrpl.protocol > xrpl.basics
xrpl.protocol > xrpl.json
xrpl.resource > xrpl.basics
xrpl.resource > xrpl.json
xrpl.resource > xrpl.protocol
xrpl.server > xrpl.basics
xrpl.server > xrpl.json
xrpl.server > xrpl.protocol
xrpld.app > test.unit_test
xrpld.app > xrpl.basics
xrpld.app > xrpld.conditions
xrpld.app > xrpld.consensus
xrpld.app > xrpld.nodestore
xrpld.app > xrpld.perflog
xrpld.app > xrpl.json
xrpld.app > xrpl.net
xrpld.app > xrpl.protocol
xrpld.app > xrpl.resource
xrpld.conditions > xrpl.basics
xrpld.conditions > xrpl.protocol
xrpld.consensus > xrpl.basics
xrpld.consensus > xrpl.json
xrpld.consensus > xrpl.protocol
xrpld.core > xrpl.basics
xrpld.core > xrpl.json
xrpld.core > xrpl.net
xrpld.core > xrpl.protocol
xrpld.ledger > xrpl.basics
xrpld.ledger > xrpl.json
xrpld.ledger > xrpl.protocol
xrpld.nodestore > xrpl.basics
xrpld.nodestore > xrpld.core
xrpld.nodestore > xrpld.unity
xrpld.nodestore > xrpl.json
xrpld.nodestore > xrpl.protocol
xrpld.overlay > xrpl.basics
xrpld.overlay > xrpld.core
xrpld.overlay > xrpld.peerfinder
xrpld.overlay > xrpld.perflog
xrpld.overlay > xrpl.json
xrpld.overlay > xrpl.protocol
xrpld.overlay > xrpl.resource
xrpld.overlay > xrpl.server
xrpld.peerfinder > xrpl.basics
xrpld.peerfinder > xrpld.core
xrpld.peerfinder > xrpl.protocol
xrpld.perflog > xrpl.basics
xrpld.perflog > xrpl.json
xrpld.rpc > xrpl.basics
xrpld.rpc > xrpld.core
xrpld.rpc > xrpld.ledger
xrpld.rpc > xrpld.nodestore
xrpld.rpc > xrpl.json
xrpld.rpc > xrpl.net
xrpld.rpc > xrpl.protocol
xrpld.rpc > xrpl.resource
xrpld.rpc > xrpl.server
xrpld.shamap > xrpl.basics
xrpld.shamap > xrpld.nodestore
xrpld.shamap > xrpl.protocol

View File

@@ -0,0 +1,178 @@
#!/usr/bin/env python3
import argparse
import itertools
import json
import re
'''
Generate a strategy matrix for GitHub Actions CI.
On each PR commit we will build a selection of Debian, RHEL, Ubuntu, MacOS, and
Windows configurations, while upon merge into the develop, release, or master
branches, we will build all configurations, and test most of them.
We will further set additional CMake arguments as follows:
- All builds will have the `tests`, `werr`, and `xrpld` options.
- All builds will have the `wextra` option except for GCC 12 and Clang 16.
- All release builds will have the `assert` option.
- Certain Debian Bookworm configurations will change the reference fee, enable
codecov, and enable voidstar in PRs.
'''
def generate_strategy_matrix(all: bool, architecture: list[dict], os: list[dict], build_type: list[str], cmake_args: list[str]) -> dict:
configurations = []
for architecture, os, build_type, cmake_args in itertools.product(architecture, os, build_type, cmake_args):
# The default CMake target is 'all' for Linux and MacOS and 'install'
# for Windows, but it can get overridden for certain configurations.
cmake_target = 'install' if os["distro_name"] == 'windows' else 'all'
# We build and test all configurations by default, except for Windows in
# Debug, because it is too slow, as well as when code coverage is
# enabled as that mode already runs the tests.
build_only = False
if os['distro_name'] == 'windows' and build_type == 'Debug':
build_only = True
# Only generate a subset of configurations in PRs.
if not all:
# Debian:
# - Bookworm using GCC 13: Release and Unity on linux/arm64, set
# the reference fee to 500.
# - Bookworm using GCC 15: Debug and no Unity on linux/amd64, enable
# code coverage (which will be done below).
# - Bookworm using Clang 16: Debug and no Unity on linux/arm64,
# enable voidstar.
# - Bookworm using Clang 17: Release and no Unity on linux/amd64,
# set the reference fee to 1000.
# - Bookworm using Clang 20: Debug and Unity on linux/amd64.
if os['distro_name'] == 'debian':
skip = True
if os['distro_version'] == 'bookworm':
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-13' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=500 {cmake_args}'
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-16' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
cmake_args = f'-Dvoidstar=ON {cmake_args}'
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-17' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=1000 {cmake_args}'
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
if skip:
continue
# RHEL:
# - 9.4 using GCC 12: Debug and Unity on linux/amd64.
# - 9.6 using Clang: Release and no Unity on linux/amd64.
if os['distro_name'] == 'rhel':
skip = True
if os['distro_version'] == '9.4':
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
elif os['distro_version'] == '9.6':
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-any' and build_type == 'Release' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
if skip:
continue
# Ubuntu:
# - Jammy using GCC 12: Debug and no Unity on linux/arm64.
# - Noble using GCC 14: Release and Unity on linux/amd64.
# - Noble using Clang 18: Debug and no Unity on linux/amd64.
# - Noble using Clang 19: Release and Unity on linux/arm64.
if os['distro_name'] == 'ubuntu':
skip = True
if os['distro_version'] == 'jammy':
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-12' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
skip = False
elif os['distro_version'] == 'noble':
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-14' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-18' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
skip = False
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-19' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
skip = False
if skip:
continue
# MacOS:
# - Debug and no Unity on macos/arm64.
if os['distro_name'] == 'macos' and not (build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'macos/arm64'):
continue
# Windows:
# - Release and Unity on windows/amd64.
if os['distro_name'] == 'windows' and not (build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'windows/amd64'):
continue
# Additional CMake arguments.
cmake_args = f'{cmake_args} -Dtests=ON -Dwerr=ON -Dxrpld=ON'
if not f'{os['compiler_name']}-{os['compiler_version']}' in ['gcc-12', 'clang-16']:
cmake_args = f'{cmake_args} -Dwextra=ON'
if build_type == 'Release':
cmake_args = f'{cmake_args} -Dassert=ON'
# We skip all RHEL on arm64 due to a build failure that needs further
# investigation.
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
continue
# We skip all clang-20 on arm64 due to boost 1.86 build error
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
continue
# Enable code coverage for Debian Bookworm using GCC 15 in Debug and no
# Unity on linux/amd64
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0 {cmake_args}'
cmake_target = 'coverage'
build_only = True
# Generate a unique name for the configuration, e.g. macos-arm64-debug
# or debian-bookworm-gcc-12-amd64-release-unity.
config_name = os['distro_name']
if (n := os['distro_version']) != '':
config_name += f'-{n}'
if (n := os['compiler_name']) != '':
config_name += f'-{n}'
if (n := os['compiler_version']) != '':
config_name += f'-{n}'
config_name += f'-{architecture['platform'][architecture['platform'].find('/')+1:]}'
config_name += f'-{build_type.lower()}'
if '-Dunity=ON' in cmake_args:
config_name += '-unity'
# Add the configuration to the list, with the most unique fields first,
# so that they are easier to identify in the GitHub Actions UI, as long
# names get truncated.
configurations.append({
'config_name': config_name,
'cmake_args': cmake_args,
'cmake_target': cmake_target,
'build_only': 'true' if build_only else 'false',
'build_type': build_type,
'os': os,
'architecture': architecture,
})
return {'include': configurations}
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-a', '--all', help='Set to generate all configurations (generally used when merging a PR) or leave unset to generate a subset of configurations (generally used when committing to a PR).', action="store_true")
parser.add_argument('-c', '--config', help='Path to the JSON file containing the strategy matrix configurations.', required=True, type=str)
args = parser.parse_args()
# Load the JSON configuration file.
config = None
with open(args.config, 'r') as f:
config = json.load(f)
if config['architecture'] is None or config['os'] is None or config['build_type'] is None or config['cmake_args'] is None:
raise Exception('Invalid configuration file.')
# Generate the strategy matrix.
print(f'matrix={json.dumps(generate_strategy_matrix(args.all, config['architecture'], config['os'], config['build_type'], config['cmake_args']))}')

View File

@@ -0,0 +1,154 @@
{
"architecture": [
{
"platform": "linux/amd64",
"runner": ["self-hosted", "Linux", "X64", "heavy"]
},
{
"platform": "linux/arm64",
"runner": ["self-hosted", "Linux", "ARM64", "heavy-arm64"]
}
],
"os": [
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "12"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "13"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "14"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "15"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "16"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "17"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "18"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "19"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "20"
},
{
"distro_name": "rhel",
"distro_version": "9.4",
"compiler_name": "gcc",
"compiler_version": "12"
},
{
"distro_name": "rhel",
"distro_version": "9.4",
"compiler_name": "gcc",
"compiler_version": "13"
},
{
"distro_name": "rhel",
"distro_version": "9.4",
"compiler_name": "gcc",
"compiler_version": "14"
},
{
"distro_name": "rhel",
"distro_version": "9.6",
"compiler_name": "gcc",
"compiler_version": "13"
},
{
"distro_name": "rhel",
"distro_version": "9.6",
"compiler_name": "gcc",
"compiler_version": "14"
},
{
"distro_name": "rhel",
"distro_version": "9.4",
"compiler_name": "clang",
"compiler_version": "any"
},
{
"distro_name": "rhel",
"distro_version": "9.6",
"compiler_name": "clang",
"compiler_version": "any"
},
{
"distro_name": "ubuntu",
"distro_version": "jammy",
"compiler_name": "gcc",
"compiler_version": "12"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "gcc",
"compiler_version": "13"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "gcc",
"compiler_version": "14"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "clang",
"compiler_version": "16"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "clang",
"compiler_version": "17"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "clang",
"compiler_version": "18"
},
{
"distro_name": "ubuntu",
"distro_version": "noble",
"compiler_name": "clang",
"compiler_version": "19"
}
],
"build_type": ["Debug", "Release"],
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
}

View File

@@ -0,0 +1,21 @@
{
"architecture": [
{
"platform": "macos/arm64",
"runner": ["self-hosted", "macOS", "ARM64", "mac-runner-m1"]
}
],
"os": [
{
"distro_name": "macos",
"distro_version": "",
"compiler_name": "",
"compiler_version": ""
}
],
"build_type": ["Debug", "Release"],
"cmake_args": [
"-Dunity=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5",
"-Dunity=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5"
]
}

View File

@@ -0,0 +1,18 @@
{
"architecture": [
{
"platform": "windows/amd64",
"runner": ["windows-latest"]
}
],
"os": [
{
"distro_name": "windows",
"distro_version": "",
"compiler_name": "",
"compiler_version": ""
}
],
"build_type": ["Debug", "Release"],
"cmake_args": ["-Dunity=OFF", "-Dunity=ON"]
}

View File

@@ -0,0 +1,163 @@
# This workflow builds the binary from the selected commit (not earlier than 2.5.0 release)
name: Build selected commit
# This workflow can only be triggered manually, by a project maintainer
on:
workflow_dispatch:
inputs:
commit:
description: "Commit to build from."
required: false
type: string
build_container:
description: "Build container image to use"
required: true
type: string
default: ghcr.io/xrplf/ci/debian-bullseye:gcc-12
strip_symbols:
description: "Strip debug symbols"
required: true
type: boolean
default: true
archive_archive:
description: "Archive rippled binary"
required: true
type: boolean
default: false
build_only:
description: "Only build, do not run unit tests"
required: true
type: boolean
default: false
build_type:
description: "Build type (Debug or Release)"
required: true
type: choice
default: Release
options:
- Debug
- Release
cmake_args:
description: "CMake args for build"
required: true
type: string
default: "-Dxrpld=ON -Dtests=ON -Dassert=OFF -Dunity=OFF"
dependencies_force_build:
description: "Force building of all dependencies."
required: false
type: boolean
default: false
env:
CONAN_REMOTE_NAME: xrplf
CONAN_REMOTE_URL: https://conan.ripplex.io
BUILD_DIR: .build
jobs:
build:
runs-on: ["self-hosted", "Linux", "X64", "heavy"]
container: ${{ inputs.build_container }}
steps:
- name: Checkout this workflow
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
sparse-checkout: |
.github
conan
- name: Move workflow files on a side
run: |
mkdir -p ${{ runner.temp }}
mv .github conan ${{ runner.temp }}
rm -rf .git
- name: Checkout the commit to build
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
ref: ${{ inputs.commit }}
- name: Restore workflow files
run: |
rm -rf .github conan
mv ${{ runner.temp }}/.github .
mv ${{ runner.temp }}/conan .
- name: Prepare runner
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
with:
disable_ccache: true
- name: Check configuration
run: |
echo 'Checking path.'
echo ${PATH} | tr ':' '\n'
echo 'Checking environment variables.'
env | sort
echo 'Checking CMake version.'
cmake --version
echo 'Checking compiler version.'
${CC} --version
echo 'Checking Conan version.'
conan --version
echo 'Checking Ninja version.'
ninja --version
echo 'Checking nproc version.'
nproc --version
- name: Set up Conan configuration
run: |
echo 'Installing configuration.'
cat conan/global.conf >> $(conan config home)/global.conf
echo 'Conan configuration:'
conan config show '*'
- name: Set up Conan profile
run: |
echo 'Installing profile.'
conan config install conan/profiles/default -tf $(conan config home)/profiles/
echo 'Conan profile:'
conan profile show
- name: Set up Conan remote
shell: bash
run: |
echo "Adding Conan remote '${{ env.CONAN_REMOTE_NAME }}' at ${{ env.CONAN_REMOTE_URL }}."
conan remote add --index 0 --force ${{ env.CONAN_REMOTE_NAME }} ${{ env.CONAN_REMOTE_URL }}
echo 'Listing Conan remotes.'
conan remote list
- name: Build dependencies
uses: ./.github/actions/build-deps
with:
build_dir: ${{ env.BUILD_DIR }}
build_type: ${{ inputs.build_type }}
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
force_build: ${{ inputs.dependencies_force_build }}
force_upload: false
- name: Build and test binary
uses: ./.github/actions/build-test
with:
build_dir: ${{ env.BUILD_DIR }}
build_only: ${{ inputs.build_only }}
build_type: ${{ inputs.build_type }}
cmake_args: ${{ inputs.cmake_args }}
cmake_target: "all"
os: "linux"
- name: Strip symbols
if: ${{ inputs.strip_symbols == 'true' }}
run: |
strip -D --strip-unneeded ${{ env.BUILD_DIR }}/rippled
${{ env.BUILD_DIR }}/rippled --version
- name: Move the binary
run: |
mv ${{ env.BUILD_DIR }}/rippled .
- name: Archive rippled binary
if: ${{ inputs.archive_archive == 'true' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: rippled
path: ./rippled
retention-days: 90
compression-level: 8
overwrite: true

199
.github/workflows/build-test.yml vendored Normal file
View File

@@ -0,0 +1,199 @@
# This workflow builds and tests the binary for various configurations.
name: Build and test
# This workflow can only be triggered by other workflows. Note that the
# workflow_call event does not support the 'choice' input type, see
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onworkflow_callinputsinput_idtype,
# so we use 'string' instead.
on:
workflow_call:
inputs:
build_dir:
description: "The directory where to build."
required: false
type: string
default: ".build"
conan_remote_name:
description: "The name of the Conan remote to use."
required: true
type: string
conan_remote_url:
description: "The URL of the Conan endpoint to use."
required: true
type: string
dependencies_force_build:
description: "Force building of all dependencies."
required: false
type: boolean
default: false
dependencies_force_upload:
description: "Force uploading of all dependencies."
required: false
type: boolean
default: false
os:
description: 'The operating system to use for the build ("linux", "macos", "windows").'
required: true
type: string
strategy_matrix:
# TODO: Support additional strategies, e.g. "ubuntu" for generating all Ubuntu configurations.
description: 'The strategy matrix to use for generating the configurations ("minimal", "all").'
required: false
type: string
default: "minimal"
secrets:
codecov_token:
description: "The Codecov token to use for uploading coverage reports."
required: false
conan_remote_username:
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
conan_remote_password:
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.os }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# Generate the strategy matrix to be used by the following job.
generate-matrix:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.13
- name: Generate strategy matrix
working-directory: .github/scripts/strategy-matrix
id: generate
run: python generate.py ${{ inputs.strategy_matrix == 'all' && '--all' || '' }} --config=${{ inputs.os }}.json >> "${GITHUB_OUTPUT}"
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
# Build and test the binary.
build-test:
needs:
- generate-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
runs-on: ${{ matrix.architecture.runner }}
container: ${{ inputs.os == 'linux' && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version) || null }}
steps:
- name: Check strategy matrix
run: |
echo 'Operating system distro name: ${{ matrix.os.distro_name }}'
echo 'Operating system distro version: ${{ matrix.os.distro_version }}'
echo 'Operating system compiler name: ${{ matrix.os.compiler_name }}'
echo 'Operating system compiler version: ${{ matrix.os.compiler_version }}'
echo 'Architecture platform: ${{ matrix.architecture.platform }}'
echo 'Architecture runner: ${{ toJson(matrix.architecture.runner) }}'
echo 'Build type: ${{ matrix.build_type }}'
echo 'Build only: ${{ matrix.build_only }}'
echo 'CMake arguments: ${{ matrix.cmake_args }}'
echo 'CMake target: ${{ matrix.cmake_target }}'
echo 'Config name: ${{ matrix.config_name }}'
- name: Clean workspace (MacOS)
if: ${{ inputs.os == 'macos' }}
run: |
WORKSPACE=${{ github.workspace }}
echo "Cleaning workspace '${WORKSPACE}'."
if [ -z "${WORKSPACE}" ] || [ "${WORKSPACE}" = "/" ]; then
echo "Invalid working directory '${WORKSPACE}'."
exit 1
fi
find "${WORKSPACE}" -depth 1 | xargs rm -rfv
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Prepare runner
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
- name: Check configuration (Windows)
if: ${{ inputs.os == 'windows' }}
run: |
echo 'Checking environment variables.'
set
echo 'Checking CMake version.'
cmake --version
echo 'Checking Conan version.'
conan --version
- name: Check configuration (Linux and MacOS)
if: ${{ inputs.os == 'linux' || inputs.os == 'macos' }}
run: |
echo 'Checking path.'
echo ${PATH} | tr ':' '\n'
echo 'Checking environment variables.'
env | sort
echo 'Checking CMake version.'
cmake --version
echo 'Checking compiler version.'
${{ inputs.os == 'linux' && '${CC}' || 'clang' }} --version
echo 'Checking Conan version.'
conan --version
echo 'Checking Ninja version.'
ninja --version
echo 'Checking nproc version.'
nproc --version
- name: Set up Conan configuration
run: |
echo 'Installing configuration.'
cat conan/global.conf ${{ inputs.os == 'linux' && '>>' || '>' }} $(conan config home)/global.conf
echo 'Conan configuration:'
conan config show '*'
- name: Set up Conan profile
run: |
echo 'Installing profile.'
conan config install conan/profiles/default -tf $(conan config home)/profiles/
echo 'Conan profile:'
conan profile show
- name: Set up Conan remote
shell: bash
run: |
echo "Adding Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
conan remote add --index 0 --force ${{ inputs.conan_remote_name }} ${{ inputs.conan_remote_url }}
echo 'Listing Conan remotes.'
conan remote list
- name: Build dependencies
uses: ./.github/actions/build-deps
with:
build_dir: ${{ inputs.build_dir }}
build_type: ${{ matrix.build_type }}
conan_remote_name: ${{ inputs.conan_remote_name }}
conan_remote_url: ${{ inputs.conan_remote_url }}
conan_remote_username: ${{ secrets.conan_remote_username }}
conan_remote_password: ${{ secrets.conan_remote_password }}
force_build: ${{ inputs.dependencies_force_build }}
force_upload: ${{ inputs.dependencies_force_upload }}
- name: Build and test binary
uses: ./.github/actions/build-test
with:
build_dir: ${{ inputs.build_dir }}
build_only: ${{ matrix.build_only }}
build_type: ${{ matrix.build_type }}
cmake_args: ${{ matrix.cmake_args }}
cmake_target: ${{ matrix.cmake_target }}
codecov_token: ${{ secrets.codecov_token }}
os: ${{ inputs.os }}

75
.github/workflows/check-format.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
# This workflow checks if the code is properly formatted.
name: Check format
# This workflow can only be triggered by other workflows.
on: workflow_call
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-format
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
pre-commit:
runs-on: ubuntu-latest
container: ghcr.io/xrplf/ci/tools-rippled-pre-commit
steps:
# The $GITHUB_WORKSPACE and ${{ github.workspace }} might not point to the
# same directory for jobs running in containers. The actions/checkout step
# is *supposed* to checkout into $GITHUB_WORKSPACE and then add it to
# safe.directory (see instructions at https://github.com/actions/checkout)
# but that is apparently not happening for some container images. We
# therefore preemptively add both directories to safe.directory. See also
# https://github.com/actions/runner/issues/2058 for more details.
- name: Configure git safe.directory
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory ${{ github.workspace }}
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Check configuration
run: |
echo 'Checking path.'
echo ${PATH} | tr ':' '\n'
echo 'Checking environment variables.'
env | sort
echo 'Checking pre-commit version.'
pre-commit --version
echo 'Checking clang-format version.'
clang-format --version
echo 'Checking NPM version.'
npm --version
echo 'Checking Node.js version.'
node --version
echo 'Checking prettier version.'
prettier --version
- name: Format code
run: pre-commit run --show-diff-on-failure --color=always --all-files
- name: Check for differences
env:
MESSAGE: |
One or more files did not conform to the formatting. Maybe you did
not run 'pre-commit' before committing, or your version of
'clang-format' or 'prettier' has an incompatibility with the ones
used here (see the "Check configuration" step above).
Run 'pre-commit run --all-files' in your repo, and then commit and
push the changes.
run: |
DIFF=$(git status --porcelain)
if [ -n "${DIFF}" ]; then
# Print the files that changed to give the contributor a hint about
# what to expect when running pre-commit on their own machine.
git status
echo "${MESSAGE}"
exit 1
fi

View File

@@ -0,0 +1,46 @@
# This workflow checks if the dependencies between the modules are correctly
# indexed.
name: Check levelization
# This workflow can only be triggered by other workflows.
on: workflow_call
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-levelization
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
levelization:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Check levelization
run: .github/scripts/levelization/generate.sh
- name: Check for differences
env:
MESSAGE: |
The dependency relationships between the modules in rippled have
changed, which may be an improvement or a regression.
A rule of thumb is that if your changes caused something to be
removed from loops.txt, it's probably an improvement, while if
something was added, it's probably a regression.
Run '.github/scripts/levelization/generate.sh' in your repo, commit
and push the changes. See .github/scripts/levelization/README.md for
more info.
run: |
DIFF=$(git status --porcelain)
if [ -n "${DIFF}" ]; then
# Print the differences to give the contributor a hint about what to
# expect when running levelization on their own machine.
git diff
echo "${MESSAGE}"
exit 1
fi

View File

@@ -0,0 +1,62 @@
# This workflow checks that all commits in the "master" branch are also in the
# "release" and "develop" branches, and that all commits in the "release" branch
# are also in the "develop" branch.
name: Check for missing commits
# This workflow can only be triggered by other workflows.
on: workflow_call
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-missing-commits
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Check for missing commits
env:
MESSAGE: |
If you are reading this, then the commits indicated above are missing
from the "develop" and/or "release" branch. Do a reverse-merge as soon
as possible. See CONTRIBUTING.md for instructions.
run: |
set -o pipefail
# Branches are ordered by how "canonical" they are. Every commit in one
# branch should be in all the branches behind it.
order=(master release develop)
branches=()
for branch in "${order[@]}"; do
# Check that the branches exist so that this job will work on forked
# repos, which don't necessarily have master and release branches.
echo "Checking if ${branch} exists."
if git ls-remote --exit-code --heads origin \
refs/heads/${branch} > /dev/null; then
branches+=(origin/${branch})
fi
done
prior=()
for branch in "${branches[@]}"; do
if [[ ${#prior[@]} -ne 0 ]]; then
echo "Checking ${prior[@]} for commits missing from ${branch}."
git log --oneline --no-merges "${prior[@]}" \
^$branch | tee -a "missing-commits.txt"
echo
fi
prior+=("${branch}")
done
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
echo "${MESSAGE}"
exit 1
fi

80
.github/workflows/notify-clio.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
# This workflow exports the built libxrpl package to the Conan remote on a
# a channel named after the pull request, and notifies the Clio repository about
# the new version so it can check for compatibility.
name: Notify Clio
# This workflow can only be triggered by other workflows.
on:
workflow_call:
inputs:
conan_remote_name:
description: "The name of the Conan remote to use."
required: true
type: string
conan_remote_url:
description: "The URL of the Conan endpoint to use."
required: true
type: string
secrets:
clio_notify_token:
description: "The GitHub token to notify Clio about new versions."
required: true
conan_remote_username:
description: "The username for logging into the Conan remote."
required: true
conan_remote_password:
description: "The password for logging into the Conan remote."
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-clio
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
upload:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
container: ghcr.io/xrplf/ci/ubuntu-noble:gcc-13
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Generate outputs
id: generate
run: |
echo 'Generating user and channel.'
echo "user=clio" >> "${GITHUB_OUTPUT}"
echo "channel=pr_${{ github.event.pull_request.number }}" >> "${GITHUB_OUTPUT}"
echo 'Extracting version.'
echo "version=$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" | awk -F '"' '{print $2}')" >> "${GITHUB_OUTPUT}"
- name: Add Conan remote
run: |
echo "Adding Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
conan remote add --index 0 --force ${{ inputs.conan_remote_name }} ${{ inputs.conan_remote_url }}
echo 'Listing Conan remotes.'
conan remote list
- name: Log into Conan remote
run: conan remote login ${{ inputs.conan_remote_name }} "${{ secrets.conan_remote_username }}" --password "${{ secrets.conan_remote_password }}"
- name: Upload package
run: |
conan export --user=${{ steps.generate.outputs.user }} --channel=${{ steps.generate.outputs.channel }} .
conan upload --confirm --check --remote=${{ inputs.conan_remote_name }} xrpl/${{ steps.generate.outputs.version }}@${{ steps.generate.outputs.user }}/${{ steps.generate.outputs.channel }}
outputs:
channel: ${{ steps.generate.outputs.channel }}
version: ${{ steps.generate.outputs.version }}
notify:
needs: upload
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.clio_notify_token }}
steps:
- name: Notify Clio
run: |
gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
/repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \
-F "client_payload[version]=${{ needs.upload.outputs.version }}@${{ needs.upload.outputs.user }}/${{ needs.upload.outputs.channel }}" \
-F "client_payload[pr]=${{ github.event.pull_request.number }}"

154
.github/workflows/on-pr.yml vendored Normal file
View File

@@ -0,0 +1,154 @@
# This workflow runs all workflows to check, build and test the project on
# various Linux flavors, as well as on MacOS and Windows, on every push to a
# user branch. However, it will not run if the pull request is a draft unless it
# has the 'DraftRunCI' label.
name: PR
on:
merge_group:
types:
- checks_requested
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CONAN_REMOTE_NAME: xrplf
CONAN_REMOTE_URL: https://conan.ripplex.io
jobs:
# This job determines whether the rest of the workflow should run. It runs
# when the PR is not a draft (which should also cover merge-group) or
# has the 'DraftRunCI' label.
should-run:
if: ${{ !github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Determine changed files
# This step checks whether any files have changed that should
# cause the next jobs to run. We do it this way rather than
# using `paths` in the `on:` section, because all required
# checks must pass, even for changes that do not modify anything
# that affects those checks. We would therefore like to make the
# checks required only if the job runs, but GitHub does not
# support that directly. By always executing the workflow on new
# commits and by using the changed-files action below, we ensure
# that Github considers any skipped jobs to have passed, and in
# turn the required checks as well.
id: changes
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
with:
files: |
# These paths are unique to `on-pr.yml`.
.github/scripts/levelization/**
.github/workflows/check-format.yml
.github/workflows/check-levelization.yml
.github/workflows/notify-clio.yml
.github/workflows/on-pr.yml
.clang-format
.pre-commit-config.yaml
# Keep the paths below in sync with those in `on-trigger.yml`.
.github/actions/build-deps/**
.github/actions/build-test/**
.github/scripts/strategy-matrix/**
.github/workflows/build-test.yml
.codecov.yml
cmake/**
conan/**
external/**
include/**
src/**
tests/**
CMakeLists.txt
conanfile.py
- name: Check whether to run
# This step determines whether the rest of the workflow should
# run. The rest of the workflow will run if this job runs AND at
# least one of:
# * Any of the files checked in the `changes` step were modified
# * The PR is NOT a draft and is labeled "Ready to merge"
# * The workflow is running from the merge queue
id: go
env:
FILES: ${{ steps.changes.outputs.any_changed }}
DRAFT: ${{ github.event.pull_request.draft }}
READY: ${{ contains(github.event.pull_request.labels.*.name, 'Ready to merge') }}
MERGE: ${{ github.event_name == 'merge_group' }}
run: |
echo "go=${{ (env.DRAFT != 'true' && env.READY == 'true') || env.FILES == 'true' || env.MERGE == 'true' }}" >> "${GITHUB_OUTPUT}"
cat "${GITHUB_OUTPUT}"
outputs:
go: ${{ steps.go.outputs.go == 'true' }}
check-format:
needs: should-run
if: needs.should-run.outputs.go == 'true'
uses: ./.github/workflows/check-format.yml
check-levelization:
needs: should-run
if: needs.should-run.outputs.go == 'true'
uses: ./.github/workflows/check-levelization.yml
# This job works around the limitation that GitHub Actions does not support
# using environment variables as inputs for reusable workflows.
generate-outputs:
needs: should-run
if: needs.should-run.outputs.go == 'true'
runs-on: ubuntu-latest
steps:
- name: No-op
run: true
outputs:
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
build-test:
needs: generate-outputs
uses: ./.github/workflows/build-test.yml
strategy:
matrix:
os: [linux, macos, windows]
with:
conan_remote_name: ${{ needs.generate-outputs.outputs.conan_remote_name }}
conan_remote_url: ${{ needs.generate-outputs.outputs.conan_remote_url }}
os: ${{ matrix.os }}
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
notify-clio:
needs:
- generate-outputs
- build-test
uses: ./.github/workflows/notify-clio.yml
with:
conan_remote_name: ${{ needs.generate-outputs.outputs.conan_remote_name }}
conan_remote_url: ${{ needs.generate-outputs.outputs.conan_remote_url }}
secrets:
clio_notify_token: ${{ secrets.CLIO_NOTIFY_TOKEN }}
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
passed:
needs:
- build-test
- check-format
- check-levelization
runs-on: ubuntu-latest
steps:
- name: No-op
run: true

118
.github/workflows/on-trigger.yml vendored Normal file
View File

@@ -0,0 +1,118 @@
# This workflow runs all workflows to build the dependencies required for the
# project on various Linux flavors, as well as on MacOS and Windows, on a
# scheduled basis, on merge into the 'develop', 'release', or 'master' branches,
# or manually. The missing commits check is only run when the code is merged
# into the 'develop' or 'release' branches, and the documentation is built when
# the code is merged into the 'develop' branch.
name: Trigger
on:
push:
branches:
- develop
- release
- master
paths:
# These paths are unique to `on-trigger.yml`.
- ".github/workflows/check-missing-commits.yml"
- ".github/workflows/on-trigger.yml"
- ".github/workflows/publish-docs.yml"
# Keep the paths below in sync with those in `on-pr.yml`.
- ".github/actions/build-deps/**"
- ".github/actions/build-test/**"
- ".github/scripts/strategy-matrix/**"
- ".github/workflows/build-test.yml"
- ".codecov.yml"
- "cmake/**"
- "conan/**"
- "external/**"
- "include/**"
- "src/**"
- "tests/**"
- "CMakeLists.txt"
- "conanfile.py"
# Run at 06:32 UTC on every day of the week from Monday through Friday. This
# will force all dependencies to be rebuilt, which is useful to verify that
# all dependencies can be built successfully. Only the dependencies that
# are actually missing from the remote will be uploaded.
schedule:
- cron: "32 6 * * 1-5"
# Run when manually triggered via the GitHub UI or API. If `force_upload` is
# true, then the dependencies that were missing (`force_rebuild` is false) or
# rebuilt (`force_rebuild` is true) will be uploaded, overwriting existing
# dependencies if needed.
workflow_dispatch:
inputs:
dependencies_force_build:
description: "Force building of all dependencies."
required: false
type: boolean
default: false
dependencies_force_upload:
description: "Force uploading of all dependencies."
required: false
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CONAN_REMOTE_NAME: xrplf
CONAN_REMOTE_URL: https://conan.ripplex.io
jobs:
check-missing-commits:
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && contains(fromJSON('["develop", "release"]'), github.ref_name) }}
uses: ./.github/workflows/check-missing-commits.yml
# This job works around the limitation that GitHub Actions does not support
# using environment variables as inputs for reusable workflows. It also sets
# outputs that depend on the event that triggered the workflow.
generate-outputs:
runs-on: ubuntu-latest
steps:
- name: Check inputs and set outputs
id: generate
run: |
if [[ '${{ github.event_name }}' == 'push' ]]; then
echo 'dependencies_force_build=false' >> "${GITHUB_OUTPUT}"
echo 'dependencies_force_upload=false' >> "${GITHUB_OUTPUT}"
elif [[ '${{ github.event_name }}' == 'schedule' ]]; then
echo 'dependencies_force_build=true' >> "${GITHUB_OUTPUT}"
echo 'dependencies_force_upload=false' >> "${GITHUB_OUTPUT}"
else
echo 'dependencies_force_build=${{ inputs.dependencies_force_build }}' >> "${GITHUB_OUTPUT}"
echo 'dependencies_force_upload=${{ inputs.dependencies_force_upload }}' >> "${GITHUB_OUTPUT}"
fi
outputs:
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
dependencies_force_build: ${{ steps.generate.outputs.dependencies_force_build }}
dependencies_force_upload: ${{ steps.generate.outputs.dependencies_force_upload }}
build-test:
needs: generate-outputs
uses: ./.github/workflows/build-test.yml
strategy:
matrix:
os: [linux, macos, windows]
with:
conan_remote_name: ${{ needs.generate-outputs.outputs.conan_remote_name }}
conan_remote_url: ${{ needs.generate-outputs.outputs.conan_remote_url }}
dependencies_force_build: ${{ needs.generate-outputs.outputs.dependencies_force_build == 'true' }}
dependencies_force_upload: ${{ needs.generate-outputs.outputs.dependencies_force_upload == 'true' }}
os: ${{ matrix.os }}
strategy_matrix: "all"
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}

60
.github/workflows/publish-docs.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
# This workflow builds the documentation for the repository, and publishes it to
# GitHub Pages when changes are merged into the default branch.
name: Build and publish documentation
on:
push:
paths:
- ".github/workflows/publish-docs.yml"
- "*.md"
- "**/*.md"
- "docs/**"
- "include/**"
- "src/libxrpl/**"
- "src/xrpld/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
BUILD_DIR: .build
jobs:
publish:
runs-on: ubuntu-latest
container: ghcr.io/xrplf/ci/tools-rippled-documentation
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Check configuration
run: |
echo 'Checking path.'
echo ${PATH} | tr ':' '\n'
echo 'Checking environment variables.'
env | sort
echo 'Checking CMake version.'
cmake --version
echo 'Checking Doxygen version.'
doxygen --version
- name: Build documentation
run: |
mkdir -p ${{ env.BUILD_DIR }}
cd ${{ env.BUILD_DIR }}
cmake -Donly_docs=ON ..
cmake --build . --target docs --parallel $(nproc)
- name: Publish documentation
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.BUILD_DIR }}/docs/html

57
.gitignore vendored
View File

@@ -1,5 +1,9 @@
# .gitignore
bin/boostbook_catalog.xml
bin/config.log
bin/project-cache.jam
# Ignore vim swap files.
*.swp
@@ -17,19 +21,31 @@
# Ignore object files.
*.o
build
.nih_c
tags
TAGS
GTAGS
GRTAGS
GPATH
bin/rippled
Debug/*.*
Release/*.*
# Ignore locally installed node_modules
/node_modules
# Ignore coverage files.
*.gcno
*.gcda
*.gcov
# Levelization checking
.github/scripts/levelization/results/*
!.github/scripts/levelization/results/loops.txt
!.github/scripts/levelization/results/ordering.txt
# Ignore tmp directory.
tmp
# Ignore database directory.
db/
db/*.db
db/*.db-*
@@ -39,15 +55,15 @@ debug_log.txt
# Ignore customized configs
rippled.cfg
validators.txt
test/config.js
# Doxygen generated documentation output
HtmlDocumentation
docs/html_doc
# Xcode user-specific project settings
# Xcode
.DS_Store
*/build/*
/build/
*.pbxuser
!default.pbxuser
*.mode1v3
@@ -66,9 +82,32 @@ DerivedData
# Intel Parallel Studio 2013 XE
My Amplifier XE Results - RippleD
# KeyvaDB files
*.key
*.val
# Compiler intermediate output
/out.txt
# Build Log
rippled-build.log
# Profiling data
gmon.out
Builds/VisualStudio2015/*.db
Builds/VisualStudio2015/*.user
Builds/VisualStudio2015/*.opendb
Builds/VisualStudio2015/*.sdf
# MSVC
*.pdb
.vs/
CMakeSettings.json
compile_commands.json
.clangd
packages
pkg_out
pkg
CMakeUserPresets.json
bld.rippled/
.vscode
# Suggested in-tree build directory
/.build*/

64
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,64 @@
# To run pre-commit hooks, first install pre-commit:
# - `pip install pre-commit==${PRE_COMMIT_VERSION}`
# - `pip install pre-commit-hooks==${PRE_COMMIT_HOOKS_VERSION}`
#
# Depending on your system, you can use `brew install` or `apt install` as well
# for installing the pre-commit package, but `pip` is needed to install the
# hooks; you can also use `pipx` if you prefer.
# Next, install the required formatters:
# - `pip install clang-format==${CLANG_VERSION}`
# - `npm install prettier@${PRETTIER_VERSION}`
#
# See https://github.com/XRPLF/ci/blob/main/.github/workflows/tools-rippled.yml
# for the versions used in the CI pipeline. You will need to have the exact same
# versions of the tools installed on your system to produce the same results as
# the pipeline.
#
# Then, run the following command to install the git hook scripts:
# - `pre-commit install`
# You can run all configured hooks against all files with:
# - `pre-commit run --all-files`
# To manually run a specific hook, use:
# - `pre-commit run <hook_id> --all-files`
# To run the hooks against only the files changed in the current commit, use:
# - `pre-commit run`
repos:
- repo: local
hooks:
- id: clang-format
name: clang-format
language: system
entry: clang-format -i
files: '\.(cpp|hpp|h|ipp|proto)$'
- id: trailing-whitespace
name: trailing-whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
- id: end-of-file
name: end-of-file
entry: end-of-file-fixer
language: system
types: [text]
- id: mixed-line-ending
name: mixed-line-ending
entry: mixed-line-ending
language: system
types: [text]
- id: check-merge-conflict
name: check-merge-conflict
entry: check-merge-conflict --assume-in-merge
language: system
types: [text]
- repo: local
hooks:
- id: prettier
name: prettier
language: system
entry: prettier --ignore-unknown --write
exclude: |
(?x)^(
external/.*|
.github/scripts/levelization/results/.*\.txt
)$

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
external

225
API-CHANGELOG.md Normal file
View File

@@ -0,0 +1,225 @@
# API Changelog
This changelog is intended to list all updates to the [public API methods](https://xrpl.org/public-api-methods.html).
For info about how [API versioning](https://xrpl.org/request-formatting.html#api-versioning) works, including examples, please view the [XLS-22d spec](https://github.com/XRPLF/XRPL-Standards/discussions/54). For details about the implementation of API versioning, view the [implementation PR](https://github.com/XRPLF/rippled/pull/3155). API versioning ensures existing integrations and users continue to receive existing behavior, while those that request a higher API version will experience new behavior.
The API version controls the API behavior you see. This includes what properties you see in responses, what parameters you're permitted to send in requests, and so on. You specify the API version in each of your requests. When a breaking change is introduced to the `rippled` API, a new version is released. To avoid breaking your code, you should set (or increase) your version when you're ready to upgrade.
For a log of breaking changes, see the **API Version [number]** headings. In general, breaking changes are associated with a particular API Version number. For non-breaking changes, scroll to the **XRP Ledger version [x.y.z]** headings. Non-breaking changes are associated with a particular XRP Ledger (`rippled`) release.
## API Version 2
API version 2 is available in `rippled` version 2.0.0 and later. To use this API, clients specify `"api_version" : 2` in each request.
#### Removed methods
In API version 2, the following deprecated methods are no longer available: (https://github.com/XRPLF/rippled/pull/4759)
- `tx_history` - Instead, use other methods such as `account_tx` or `ledger` with the `transactions` field set to `true`.
- `ledger_header` - Instead, use the `ledger` method.
#### Modifications to JSON transaction element in V2
In API version 2, JSON elements for transaction output have been changed and made consistent for all methods which output transactions. (https://github.com/XRPLF/rippled/pull/4775)
This helps to unify the JSON serialization format of transactions. (https://github.com/XRPLF/clio/issues/722, https://github.com/XRPLF/rippled/issues/4727)
- JSON transaction element is named `tx_json`
- Binary transaction element is named `tx_blob`
- JSON transaction metadata element is named `meta`
- Binary transaction metadata element is named `meta_blob`
Additionally, these elements are now consistently available next to `tx_json` (i.e. sibling elements), where possible:
- `hash` - Transaction ID. This data was stored inside transaction output in API version 1, but in API version 2 is a sibling element.
- `ledger_index` - Ledger index (only set on validated ledgers)
- `ledger_hash` - Ledger hash (only set on closed or validated ledgers)
- `close_time_iso` - Ledger close time expressed in ISO 8601 time format (only set on validated ledgers)
- `validated` - Bool element set to `true` if the transaction is in a validated ledger, otherwise `false`
This change affects the following methods:
- `tx` - Transaction data moved into element `tx_json` (was inline inside `result`) or, if binary output was requested, moved from `tx` to `tx_blob`. Renamed binary transaction metadata element (if it was requested) from `meta` to `meta_blob`. Changed location of `hash` and added new elements
- `account_tx` - Renamed transaction element from `tx` to `tx_json`. Renamed binary transaction metadata element (if it was requested) from `meta` to `meta_blob`. Changed location of `hash` and added new elements
- `transaction_entry` - Renamed transaction metadata element from `metadata` to `meta`. Changed location of `hash` and added new elements
- `subscribe` - Renamed transaction element from `transaction` to `tx_json`. Changed location of `hash` and added new elements
- `sign`, `sign_for`, `submit` and `submit_multisigned` - Changed location of `hash` element.
#### Modification to `Payment` transaction JSON schema
When reading Payments, the `Amount` field should generally **not** be used. Instead, use [delivered_amount](https://xrpl.org/partial-payments.html#the-delivered_amount-field) to see the amount that the Payment delivered. To clarify its meaning, the `Amount` field is being renamed to `DeliverMax`. (https://github.com/XRPLF/rippled/pull/4733)
- In `Payment` transaction type, JSON RPC field `Amount` is renamed to `DeliverMax`. To enable smooth client transition, `Amount` is still handled, as described below: (https://github.com/XRPLF/rippled/pull/4733)
- On JSON RPC input (e.g. `submit_multisigned` etc. methods), `Amount` is recognized as an alias to `DeliverMax` for both API version 1 and version 2 clients.
- On JSON RPC input, submitting both `Amount` and `DeliverMax` fields is allowed _only_ if they are identical; otherwise such input is rejected with `rpcINVALID_PARAMS` error.
- On JSON RPC output (e.g. `subscribe`, `account_tx` etc. methods), `DeliverMax` is present in both API version 1 and version 2.
- On JSON RPC output, `Amount` is only present in API version 1 and _not_ in version 2.
#### Modifications to account_info response
- `signer_lists` is returned in the root of the response. (In API version 1, it was nested under `account_data`.) (https://github.com/XRPLF/rippled/pull/3770)
- When using an invalid `signer_lists` value, the API now returns an "invalidParams" error. (https://github.com/XRPLF/rippled/pull/4585)
- (`signer_lists` must be a boolean. In API version 1, strings were accepted and may return a normal response - i.e. as if `signer_lists` were `true`.)
#### Modifications to [account_tx](https://xrpl.org/account_tx.html#account_tx) response
- Using `ledger_index_min`, `ledger_index_max`, and `ledger_index` returns `invalidParams` because if you use `ledger_index_min` or `ledger_index_max`, then it does not make sense to also specify `ledger_index`. In API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4571)
- The same applies for `ledger_index_min`, `ledger_index_max`, and `ledger_hash`. (https://github.com/XRPLF/rippled/issues/4545#issuecomment-1565065579)
- Using a `ledger_index_min` or `ledger_index_max` beyond the range of ledgers that the server has:
- returns `lgrIdxMalformed` in API version 2. Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/issues/4288)
- Attempting to use a non-boolean value (such as a string) for the `binary` or `forward` parameters returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
#### Modifications to [noripple_check](https://xrpl.org/noripple_check.html#noripple_check) response
- Attempting to use a non-boolean value (such as a string) for the `transactions` parameter returns `invalidParams` (`rpcINVALID_PARAMS`). Previously, in API version 1, no error was returned. (https://github.com/XRPLF/rippled/pull/4620)
## API Version 1
This version is supported by all `rippled` versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no `api_version` is specified.
The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conventions/request-formatting/#commandline-format) always uses the latest API version. The command line is intended for ad-hoc usage by humans, not programs or automated scripts. The command line is not meant for use in production code.
### Inconsistency: server_info - network_id
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode). However, use of reporting mode is now discouraged, in favor of using [Clio](https://github.com/XRPLF/clio) instead.
## XRP Ledger server version 2.5.0
As of 2025-04-04, version 2.5.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
### Additions and bugfixes in 2.5.0
- `channel_authorize`: If `signing_support` is not enabled in the config, the RPC is disabled.
## XRP Ledger server version 2.4.0
[Version 2.4.0](https://github.com/XRPLF/rippled/releases/tag/2.4.0) was released on March 4, 2025.
### Additions and bugfixes in 2.4.0
- `ledger_entry`: `state` is added an alias for `ripple_state`.
- `ledger_entry`: Enables case-insensitive filtering by canonical name in addition to case-sensitive filtering by RPC name.
- `validators`: Added new field `validator_list_threshold` in response.
- `simulate`: A new RPC that executes a [dry run of a transaction submission](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0069d-simulate#2-rpc-simulate)
- Signing methods autofill fees better and properly handle transactions that don't have a base fee, and will also autofill the `NetworkID` field.
## XRP Ledger server version 2.3.0
[Version 2.3.0](https://github.com/XRPLF/rippled/releases/tag/2.3.0) was released on Nov 25, 2024.
### Breaking changes in 2.3.0
- `book_changes`: If the requested ledger version is not available on this node, a `ledgerNotFound` error is returned and the node does not attempt to acquire the ledger from the p2p network (as with other non-admin RPCs).
Admins can still attempt to retrieve old ledgers with the `ledger_request` RPC.
### Additions and bugfixes in 2.3.0
- `book_changes`: Returns a `validated` field in its response, which was missing in prior versions.
## XRP Ledger server version 2.2.0
[Version 2.2.0](https://github.com/XRPLF/rippled/releases/tag/2.2.0) was released on Jun 5, 2024. The following additions are non-breaking (because they are purely additive):
- The `feature` method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. ([#4781](https://github.com/XRPLF/rippled/pull/4781))
## XRP Ledger server version 2.0.0
[Version 2.0.0](https://github.com/XRPLF/rippled/releases/tag/2.0.0) was released on Jan 9, 2024. The following additions are non-breaking (because they are purely additive):
- `server_definitions`: A new RPC that generates a `definitions.json`-like output that can be used in XRPL libraries.
- In `Payment` transactions, `DeliverMax` has been added. This is a replacement for the `Amount` field, which should not be used. Typically, the `delivered_amount` (in transaction metadata) should be used. To ease the transition, `DeliverMax` is present regardless of API version, since adding a field is non-breaking.
- API version 2 has been moved from beta to supported, meaning that it is generally available (regardless of the `beta_rpc_api` setting).
## XRP Ledger server version 2.2.0
The following is a non-breaking addition to the API.
- The `feature` method now has a non-admin mode for users. (It was previously only available to admin connections.) The method returns an updated list of amendments, including their names and other information. ([#4781](https://github.com/XRPLF/rippled/pull/4781))
## XRP Ledger server version 1.12.0
[Version 1.12.0](https://github.com/XRPLF/rippled/releases/tag/1.12.0) was released on Sep 6, 2023. The following additions are non-breaking (because they are purely additive).
- `server_info`: Added `ports`, an array which advertises the RPC and WebSocket ports. This information is also included in the `/crawl` endpoint (which calls `server_info` internally). `grpc` and `peer` ports are also included. (https://github.com/XRPLF/rippled/pull/4427)
- `ports` contains objects, each containing a `port` for the listening port (a number string), and a `protocol` array listing the supported protocols on that port.
- This allows crawlers to build a more detailed topology without needing to port-scan nodes.
- (For peers and other non-admin clients, the info about admin ports is excluded.)
- Clawback: The following additions are gated by the Clawback amendment (`featureClawback`). (https://github.com/XRPLF/rippled/pull/4553)
- Adds an [AccountRoot flag](https://xrpl.org/accountroot.html#accountroot-flags) called `lsfAllowTrustLineClawback` (https://github.com/XRPLF/rippled/pull/4617)
- Adds the corresponding `asfAllowTrustLineClawback` [AccountSet Flag](https://xrpl.org/accountset.html#accountset-flags) as well.
- Clawback is disabled by default, so if an issuer desires the ability to claw back funds, they must use an `AccountSet` transaction to set the AllowTrustLineClawback flag. They must do this before creating any trust lines, offers, escrows, payment channels, or checks.
- Adds the [Clawback transaction type](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-39d-clawback/README.md#331-clawback-transaction), containing these fields:
- `Account`: The issuer of the asset being clawed back. Must also be the sender of the transaction.
- `Amount`: The amount being clawed back, with the `Amount.issuer` being the token holder's address.
- Adds [AMM](https://github.com/XRPLF/XRPL-Standards/discussions/78) ([#4294](https://github.com/XRPLF/rippled/pull/4294), [#4626](https://github.com/XRPLF/rippled/pull/4626)) feature:
- Adds `amm_info` API to retrieve AMM information for a given tokens pair.
- Adds `AMMCreate` transaction type to create `AMM` instance.
- Adds `AMMDeposit` transaction type to deposit funds into `AMM` instance.
- Adds `AMMWithdraw` transaction type to withdraw funds from `AMM` instance.
- Adds `AMMVote` transaction type to vote for the trading fee of `AMM` instance.
- Adds `AMMBid` transaction type to bid for the Auction Slot of `AMM` instance.
- Adds `AMMDelete` transaction type to delete `AMM` instance.
- Adds `sfAMMID` to `AccountRoot` to indicate that the account is `AMM`'s account. `AMMID` is used to fetch `ltAMM`.
- Adds `lsfAMMNode` `TrustLine` flag to indicate that one side of the `TrustLine` is `AMM` account.
- Adds `tfLPToken`, `tfSingleAsset`, `tfTwoAsset`, `tfOneAssetLPToken`, `tfLimitLPToken`, `tfTwoAssetIfEmpty`,
`tfWithdrawAll`, `tfOneAssetWithdrawAll` which allow a trader to specify different fields combination
for `AMMDeposit` and `AMMWithdraw` transactions.
- Adds new transaction result codes:
- tecUNFUNDED_AMM: insufficient balance to fund AMM. The account does not have funds for liquidity provision.
- tecAMM_BALANCE: AMM has invalid balance. Calculated balances greater than the current pool balances.
- tecAMM_FAILED: AMM transaction failed. Fails due to a processing failure.
- tecAMM_INVALID_TOKENS: AMM invalid LP tokens. Invalid input values, format, or calculated values.
- tecAMM_EMPTY: AMM is in empty state. Transaction requires AMM in non-empty state (LP tokens > 0).
- tecAMM_NOT_EMPTY: AMM is not in empty state. Transaction requires AMM in empty state (LP tokens == 0).
- tecAMM_ACCOUNT: AMM account. Clawback of AMM account.
- tecINCOMPLETE: Some work was completed, but more submissions required to finish. AMMDelete partially deletes the trustlines.
## XRP Ledger server version 1.11.0
[Version 1.11.0](https://github.com/XRPLF/rippled/releases/tag/1.11.0) was released on Jun 20, 2023.
### Breaking changes in 1.11
- Added the ability to mark amendments as obsolete. For the `feature` admin API, there is a new possible value for the `vetoed` field. (https://github.com/XRPLF/rippled/pull/4291)
- The value of `vetoed` can now be `true`, `false`, or `"Obsolete"`.
- Removed the acceptance of seeds or public keys in place of account addresses. (https://github.com/XRPLF/rippled/pull/4404)
- This simplifies the API and encourages better security practices (i.e. seeds should never be sent over the network).
- For the `ledger_data` method, when all entries are filtered out, the `state` field of the response is now an empty list (in other words, an empty array, `[]`). (Previously, it would return `null`.) While this is technically a breaking change, the new behavior is consistent with the documentation, so this is considered only a bug fix. (https://github.com/XRPLF/rippled/pull/4398)
- If and when the `fixNFTokenRemint` amendment activates, there will be a new AccountRoot field, `FirstNFTSequence`. This field is set to the current account sequence when the account issues their first NFT. If an account has not issued any NFTs, then the field is not set. ([#4406](https://github.com/XRPLF/rippled/pull/4406))
- There is a new account deletion restriction: an account can only be deleted if `FirstNFTSequence` + `MintedNFTokens` + `256` is less than the current ledger sequence.
- This is potentially a breaking change if clients have logic for determining whether an account can be deleted.
- NetworkID
- For sidechains and networks with a network ID greater than 1024, there is a new [transaction common field](https://xrpl.org/transaction-common-fields.html), `NetworkID`. (https://github.com/XRPLF/rippled/pull/4370)
- This field helps to prevent replay attacks and is now required for chains whose network ID is 1025 or higher.
- The field must be omitted for Mainnet, so there is no change for Mainnet users.
- There are three new local error codes:
- `telNETWORK_ID_MAKES_TX_NON_CANONICAL`: a `NetworkID` is present but the chain's network ID is less than 1025. Remove the field from the transaction, and try again.
- `telREQUIRES_NETWORK_ID`: a `NetworkID` is required, but is not present. Add the field to the transaction, and try again.
- `telWRONG_NETWORK`: a `NetworkID` is specified, but it is for a different network. Submit the transaction to a different server which is connected to the correct network.
### Additions and bug fixes in 1.11
- Added `nftoken_id`, `nftoken_ids` and `offer_id` meta fields into NFT `tx` and `account_tx` responses. (https://github.com/XRPLF/rippled/pull/4447)
- Added an `account_flags` object to the `account_info` method response. (https://github.com/XRPLF/rippled/pull/4459)
- Added `NFTokenPages` to the `account_objects` RPC. (https://github.com/XRPLF/rippled/pull/4352)
- Fixed: `marker` returned from the `account_lines` command would not work on subsequent commands. (https://github.com/XRPLF/rippled/pull/4361)
## XRP Ledger server version 1.10.0
[Version 1.10.0](https://github.com/XRPLF/rippled/releases/tag/1.10.0)
was released on Mar 14, 2023.
### Breaking changes in 1.10
- If the `XRPFees` feature is enabled, the `fee_ref` field will be
removed from the [ledger subscription stream](https://xrpl.org/subscribe.html#ledger-stream), because it will no longer
have any meaning.
# Unit tests for API changes
The following information is useful to developers contributing to this project:
The purpose of unit tests is to catch bugs and prevent regressions. In general, it often makes sense to create a test function when there is a breaking change to the API. For APIs that have changed in a new API version, the tests should be modified so that both the prior version and the new version are properly tested.
To take one example: for `account_info` version 1, WebSocket and JSON-RPC behavior should be tested. The latest API version, i.e. API version 2, should be tested over WebSocket, JSON-RPC, and command line.

611
BUILD.md Normal file
View File

@@ -0,0 +1,611 @@
| :warning: **WARNING** :warning:
|---|
| These instructions assume you have a C++ development environment ready with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up on Linux, macOS, or Windows, [see this guide](./docs/build/environment.md). |
> These instructions also assume a basic familiarity with Conan and CMake.
> If you are unfamiliar with Conan, you can read our
> [crash course](./docs/build/conan.md) or the official [Getting Started][3]
> walkthrough.
## Branches
For a stable release, choose the `master` branch or one of the [tagged
releases](https://github.com/ripple/rippled/releases).
```bash
git checkout master
```
For the latest release candidate, choose the `release` branch.
```bash
git checkout release
```
For the latest set of untested features, or to contribute, choose the `develop`
branch.
```bash
git checkout develop
```
## Minimum Requirements
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.11](https://www.python.org/downloads/), or higher
- [Conan 2.17](https://conan.io/downloads.html)[^1], or higher
- [CMake 3.22](https://cmake.org/download/)[^2], or higher
[^1]:
It is possible to build with Conan 1.60+, but the instructions are
significantly different, which is why we are not recommending it.
[^2]:
CMake 4 is not yet supported by all dependencies required by this project.
If you are affected by this issue, follow [conan workaround for cmake
4](#workaround-for-cmake-4)
`rippled` is written in the C++20 dialect and includes the `<concepts>` header.
The [minimum compiler versions][2] required are:
| Compiler | Version |
| ----------- | --------- |
| GCC | 12 |
| Clang | 16 |
| Apple Clang | 16 |
| MSVC | 19.44[^3] |
### Linux
The Ubuntu Linux distribution has received the highest level of quality
assurance, testing, and support. We also support Red Hat and use Debian
internally.
Here are [sample instructions for setting up a C++ development environment on
Linux](./docs/build/environment.md#linux).
### Mac
Many rippled engineers use macOS for development.
Here are [sample instructions for setting up a C++ development environment on
macOS](./docs/build/environment.md#macos).
### Windows
Windows is used by some engineers for development only.
[^3]: Windows is not recommended for production use.
## Steps
### Set Up Conan
After you have a [C++ development environment](./docs/build/environment.md) ready with Git, Python,
Conan, CMake, and a C++ compiler, you may need to set up your Conan profile.
These instructions assume a basic familiarity with Conan and CMake. If you are
unfamiliar with Conan, then please read [this crash course](./docs/build/conan.md) or the official
[Getting Started][3] walkthrough.
#### Default profile
We recommend that you import the provided `conan/profiles/default` profile:
```bash
conan config install conan/profiles/ -tf $(conan config home)/profiles/
```
You can check your Conan profile by running:
```bash
conan profile show
```
#### Custom profile
If the default profile does not work for you and you do not yet have a Conan
profile, you can create one by running:
```bash
conan profile detect
```
You may need to make changes to the profile to suit your environment. You can
refer to the provided `conan/profiles/default` profile for inspiration, and you
may also need to apply the required [tweaks](#conan-profile-tweaks) to this
default profile.
### Patched recipes
The recipes in Conan Center occasionally need to be patched for compatibility
with the latest version of `rippled`. We maintain a fork of the Conan Center
[here](https://github.com/XRPLF/conan-center-index/) containing the patches.
To ensure our patched recipes are used, you must add our Conan remote at a
higher index than the default Conan Center remote, so it is consulted first. You
can do this by running:
```bash
conan remote add --index 0 xrplf "https://conan.ripplex.io"
```
Alternatively, you can pull the patched recipes into the repository and use them
locally:
```bash
cd external
git init
git remote add origin git@github.com:XRPLF/conan-center-index.git
git sparse-checkout init
git sparse-checkout set recipes/snappy
git sparse-checkout add recipes/soci
git fetch origin master
git checkout master
conan export --version 1.1.10 recipes/snappy/all
conan export --version 4.0.3 recipes/soci/all
rm -rf .git
```
In the case we switch to a newer version of a dependency that still requires a
patch, it will be necessary for you to pull in the changes and re-export the
updated dependencies with the newer version. However, if we switch to a newer
version that no longer requires a patch, no action is required on your part, as
the new recipe will be automatically pulled from the official Conan Center.
### Conan profile tweaks
#### Missing compiler version
If you see an error similar to the following after running `conan profile show`:
```bash
ERROR: Invalid setting '17' is not a valid 'settings.compiler.version' value.
Possible values are ['5.0', '5.1', '6.0', '6.1', '7.0', '7.3', '8.0', '8.1',
'9.0', '9.1', '10.0', '11.0', '12.0', '13', '13.0', '13.1', '14', '14.0', '15',
'15.0', '16', '16.0']
Read "http://docs.conan.io/2/knowledge/faq.html#error-invalid-setting"
```
you need to amend the list of compiler versions in
`$(conan config home)/settings.yml`, by appending the required version number(s)
to the `version` array specific for your compiler. For example:
```yaml
apple-clang:
version:
[
"5.0",
"5.1",
"6.0",
"6.1",
"7.0",
"7.3",
"8.0",
"8.1",
"9.0",
"9.1",
"10.0",
"11.0",
"12.0",
"13",
"13.0",
"13.1",
"14",
"14.0",
"15",
"15.0",
"16",
"16.0",
"17",
"17.0",
]
```
#### Multiple compilers
If you have multiple compilers installed, make sure to select the one to use in
your default Conan configuration **before** running `conan profile detect`, by
setting the `CC` and `CXX` environment variables.
For example, if you are running MacOS and have [homebrew
LLVM@18](https://formulae.brew.sh/formula/llvm@18), and want to use it as a
compiler in the new Conan profile:
```bash
export CC=$(brew --prefix llvm@18)/bin/clang
export CXX=$(brew --prefix llvm@18)/bin/clang++
conan profile detect
```
You should also explicitly set the path to the compiler in the profile file,
which helps to avoid errors when `CC` and/or `CXX` are set and disagree with the
selected Conan profile. For example:
```text
[conf]
tools.build:compiler_executables={'c':'/usr/bin/gcc','cpp':'/usr/bin/g++'}
```
#### Multiple profiles
You can manage multiple Conan profiles in the directory
`$(conan config home)/profiles`, for example renaming `default` to a different
name and then creating a new `default` profile for a different compiler.
#### Select language
The default profile created by Conan will typically select different C++ dialect
than C++20 used by this project. You should set `20` in the profile line
starting with `compiler.cppstd=`. For example:
```bash
sed -i.bak -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
```
#### Select standard library in Linux
**Linux** developers will commonly have a default Conan [profile][] that
compiles with GCC and links with libstdc++. If you are linking with libstdc++
(see profile setting `compiler.libcxx`), then you will need to choose the
`libstdc++11` ABI:
```bash
sed -i.bak -e 's|^compiler\.libcxx=.*$|compiler.libcxx=libstdc++11|' $(conan config home)/profiles/default
```
#### Select architecture and runtime in Windows
**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.
Windows developers must also build `rippled` and its dependencies for the x64
architecture:
```bash
sed -i.bak -e 's|^arch=.*$|arch=x86_64|' $(conan config home)/profiles/default
```
**Windows** developers also must select static runtime:
```bash
sed -i.bak -e 's|^compiler\.runtime=.*$|compiler.runtime=static|' $(conan config home)/profiles/default
```
#### Workaround for CMake 4
If your system CMake is version 4 rather than 3, you may have to configure Conan
profile to use CMake version 3 for dependencies, by adding the following two
lines to your profile:
```text
[tool_requires]
!cmake/*: cmake/[>=3 <4]
```
This will force Conan to download and use a locally cached CMake 3 version, and
is needed because some of the dependencies used by this project do not support
CMake 4.
#### Clang workaround for grpc
If your compiler is clang, version 19 or later, or apple-clang, version 17 or
later, you may encounter a compilation error while building the `grpc`
dependency:
```text
In file included from .../lib/promise/try_seq.h:26:
.../lib/promise/detail/basic_seq.h:499:38: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
499 | Traits::template CallSeqFactory(f_, *cur_, std::move(arg)));
| ^
```
The workaround for this error is to add two lines to profile:
```text
[conf]
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
```
#### Workaround for gcc 12
If your compiler is gcc, version 12, and you have enabled `werr` option, you may
encounter a compilation error such as:
```text
/usr/include/c++/12/bits/char_traits.h:435:56: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```
The workaround for this error is to add two lines to your profile:
```text
[conf]
tools.build:cxxflags=['-Wno-restrict']
```
#### Workaround for clang 16
If your compiler is clang, version 16, you may encounter compilation error such
as:
```text
In file included from .../boost/beast/websocket/stream.hpp:2857:
.../boost/beast/websocket/impl/read.hpp:695:17: error: call to 'async_teardown' is ambiguous
async_teardown(impl.role, impl.stream(),
^~~~~~~~~~~~~~
```
The workaround for this error is to add two lines to your profile:
```text
[conf]
tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
```
### Build and Test
1. Create a build directory and move into it.
```
mkdir .build
cd .build
```
You can use any directory name. Conan treats your working directory as an
install folder and generates files with implementation details.
You don't need to worry about these files, but make sure to change
your working directory to your build directory before calling Conan.
**Note:** You can specify a directory for the installation files by adding
the `install-folder` or `-if` option to every `conan install` command
in the next step.
2. Use conan to generate CMake files for every configuration you want to build:
```
conan install .. --output-folder . --build missing --settings build_type=Release
conan install .. --output-folder . --build missing --settings build_type=Debug
```
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
For a single-configuration generator, e.g. `Unix Makefiles` or `Ninja`,
you only need to run this command once.
For a multi-configuration generator, e.g. `Visual Studio`, you may want to
run it more than once.
Each of these commands should also have a different `build_type` setting.
A second command with the same `build_type` setting will overwrite the files
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`.
```
conan install .. --output-folder . --build missing --settings build_type=Release --settings compiler.runtime=MT
conan install .. --output-folder . --build missing --settings build_type=Debug --settings compiler.runtime=MTd
```
3. Configure CMake and pass the toolchain file generated by Conan, located at
`$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake`.
Single-config generators:
Pass the CMake variable [`CMAKE_BUILD_TYPE`][build_type]
and make sure it matches the one of the `build_type` settings
you chose in the previous step.
For example, to build Debug, in the next command, replace "Release" with "Debug"
```
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -Dxrpld=ON -Dtests=ON ..
```
Multi-config generators:
```
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dxrpld=ON -Dtests=ON ..
```
**Note:** You can pass build options for `rippled` in this step.
4. Build `rippled`.
For a single-configuration generator, it will build whatever configuration
you passed for `CMAKE_BUILD_TYPE`. For a multi-configuration generator, you
must pass the option `--config` to select the build configuration.
Single-config generators:
```
cmake --build .
```
Multi-config generators:
```
cmake --build . --config Release
cmake --build . --config Debug
```
5. Test rippled.
Single-config generators:
```
./rippled --unittest --unittest-jobs N
```
Multi-config generators:
```
./Release/rippled --unittest --unittest-jobs N
./Debug/rippled --unittest --unittest-jobs N
```
Replace the `--unittest-jobs` parameter N with the desired unit tests
concurrency. Recommended setting is half of the number of available CPU
cores.
The location of `rippled` binary in your build directory depends on your
CMake generator. Pass `--help` to see the rest of the command line options.
## Coverage report
The coverage report is intended for developers using compilers GCC
or Clang (including Apple Clang). It is generated by the build target `coverage`,
which is only enabled when the `coverage` option is set, e.g. with
`--options coverage=True` in `conan` or `-Dcoverage=ON` variable in `cmake`
Prerequisites for the coverage report:
- [gcovr tool][gcovr] (can be installed e.g. with [pip][python-pip])
- `gcov` for GCC (installed with the compiler by default) or
- `llvm-cov` for Clang (installed with the compiler by default)
- `Debug` build type
A coverage report is created when the following steps are completed, in order:
1. `rippled` binary built with instrumentation data, enabled by the `coverage`
option mentioned above
2. completed run of unit tests, which populates coverage capture data
3. completed run of the `gcovr` tool (which internally invokes either `gcov` or `llvm-cov`)
to assemble both instrumentation data and the coverage capture data into a coverage report
The above steps are automated into a single target `coverage`. The instrumented
`rippled` binary can also be used for regular development or testing work, at
the cost of extra disk space utilization and a small performance hit
(to store coverage capture). In case of a spurious failure of unit tests, it is
possible to re-run the `coverage` target without rebuilding the `rippled` binary
(since it is simply a dependency of the coverage report target). It is also possible
to select only specific tests for the purpose of the coverage report, by setting
the `coverage_test` variable in `cmake`
The default coverage report format is `html-details`, but the user
can override it to any of the formats listed in `Builds/CMake/CodeCoverage.cmake`
by setting the `coverage_format` variable in `cmake`. It is also possible
to generate more than one format at a time by setting the `coverage_extra_args`
variable in `cmake`. The specific command line used to run the `gcovr` tool will be
displayed if the `CODE_COVERAGE_VERBOSE` variable is set.
By default, the code coverage tool runs parallel unit tests with `--unittest-jobs`
set to the number of available CPU cores. This may cause spurious test
errors on Apple. Developers can override the number of unit test jobs with
the `coverage_test_parallelism` variable in `cmake`.
Example use with some cmake variables set:
```
cd .build
conan install .. --output-folder . --build missing --settings build_type=Debug
cmake -DCMAKE_BUILD_TYPE=Debug -Dcoverage=ON -Dxrpld=ON -Dtests=ON -Dcoverage_test_parallelism=2 -Dcoverage_format=html-details -Dcoverage_extra_args="--json coverage.json" -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake ..
cmake --build . --target coverage
```
After the `coverage` target is completed, the generated coverage report will be
stored inside the build directory, as either of:
- file named `coverage.`_extension_, with a suitable extension for the report format, or
- directory named `coverage`, with the `index.html` and other files inside, for the `html-details` or `html-nested` report formats.
## Options
| Option | Default Value | Description |
| ---------- | ------------- | -------------------------------------------------------------------------- |
| `assert` | OFF | Enable assertions. |
| `coverage` | OFF | Prepare the coverage report. |
| `san` | N/A | Enable a sanitizer with Clang. Choices are `thread` and `address`. |
| `tests` | OFF | Build tests. |
| `unity` | OFF | Configure a unity build. |
| `xrpld` | OFF | Build the xrpld (`rippled`) application, and not just the libxrpl library. |
| `werr` | OFF | Treat compilation warnings as errors |
| `wextra` | OFF | Enable additional compilation warnings |
[Unity builds][5] may be faster for the first build
(at the cost of much more memory) since they concatenate sources into fewer
translation units. Non-unity builds may be faster for incremental builds,
and can be helpful for detecting `#include` omissions.
## Troubleshooting
### Conan
After any updates or changes to dependencies, you may need to do the following:
1. Remove your build directory.
2. Remove individual libraries from the Conan cache, e.g.
```bash
conan remove 'grpc/*'
```
**or**
Remove all libraries from Conan cache:
```bash
conan remove '*'
```
3. Re-run [conan export](#patched-recipes) if needed.
4. Re-run [conan install](#build-and-test).
### `protobuf/port_def.inc` file not found
If `cmake --build .` results in an error due to a missing a protobuf file, then
you might have generated CMake files for a different `build_type` than the
`CMAKE_BUILD_TYPE` you passed to Conan.
```
/rippled/.build/pb-xrpl.libpb/xrpl/proto/ripple.pb.h:10:10: fatal error: 'google/protobuf/port_def.inc' file not found
10 | #include <google/protobuf/port_def.inc>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
For example, if you want to build Debug:
1. For conan install, pass `--settings build_type=Debug`
2. For cmake, pass `-DCMAKE_BUILD_TYPE=Debug`
## Add a Dependency
If you want to experiment with a new package, follow these steps:
1. Search for the package on [Conan Center](https://conan.io/center/).
2. Modify [`conanfile.py`](./conanfile.py):
- Add a version of the package to the `requires` property.
- Change any default options for the package by adding them to the
`default_options` property (with syntax `'$package:$option': $value`).
3. Modify [`CMakeLists.txt`](./CMakeLists.txt):
- Add a call to `find_package($package REQUIRED)`.
- Link a library from the package to the target `ripple_libs`
(search for the existing call to `target_link_libraries(ripple_libs INTERFACE ...)`).
4. Start coding! Don't forget to include whatever headers you need from the package.
[1]: https://github.com/conan-io/conan-center-index/issues/13168
[2]: https://en.cppreference.com/w/cpp/compiler_support/20
[3]: https://docs.conan.io/en/latest/getting_started.html
[5]: https://en.wikipedia.org/wiki/Unity_build
[6]: https://github.com/boostorg/beast/issues/2648
[7]: https://github.com/boostorg/beast/issues/2661
[gcovr]: https://gcovr.com/en/stable/getting-started.html
[python-pip]: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
[build_type]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html
[profile]: https://docs.conan.io/en/latest/reference/profiles.html

View File

@@ -1,5 +0,0 @@
# QTCreator
Makefile
*.user

View File

@@ -1,110 +0,0 @@
# Ripple protocol buffers
PROTOS = ../../src/ripple_data/protocol/ripple.proto
PROTOS_DIR = ../../build/proto
# Google Protocol Buffers support
protobuf_h.name = protobuf header
protobuf_h.input = PROTOS
protobuf_h.output = $${PROTOS_DIR}/${QMAKE_FILE_BASE}.pb.h
protobuf_h.depends = ${QMAKE_FILE_NAME}
protobuf_h.commands = protoc --cpp_out=$${PROTOS_DIR} --proto_path=${QMAKE_FILE_PATH} ${QMAKE_FILE_NAME}
protobuf_h.variable_out = HEADERS
QMAKE_EXTRA_COMPILERS += protobuf_h
protobuf_cc.name = protobuf implementation
protobuf_cc.input = PROTOS
protobuf_cc.output = $${PROTOS_DIR}/${QMAKE_FILE_BASE}.pb.cc
protobuf_cc.depends = $${PROTOS_DIR}/${QMAKE_FILE_BASE}.pb.h
protobuf_cc.commands = $$escape_expand(\\n)
#protobuf_cc.variable_out = SOURCES
QMAKE_EXTRA_COMPILERS += protobuf_cc
# Ripple compilation
DESTDIR = ../../build/QtCreator
OBJECTS_DIR = ../../build/QtCreator/obj
TEMPLATE = app
CONFIG += console thread warn_off
CONFIG -= qt gui
DEFINES += _DEBUG
linux-g++:QMAKE_CXXFLAGS += \
-Wall \
-Wno-sign-compare \
-Wno-char-subscripts \
-Wno-invalid-offsetof \
-Wno-unused-parameter \
-Wformat \
-O0 \
-std=c++11 \
-pthread
INCLUDEPATH += \
"../../src" \
"../../src/leveldb/" \
"../../src/leveldb/port" \
"../../src/leveldb/include" \
$${PROTOS_DIR}
OTHER_FILES += \
# $$files(../../src/*, true) \
# $$files(../../src/beast/*) \
# $$files(../../src/beast/modules/beast_basics/diagnostic/*)
# $$files(../../src/beast/modules/beast_core/, true)
UI_HEADERS_DIR += ../../src/ripple_basics
# ---------
# New style
#
SOURCES += \
../../src/ripple/beast/ripple_beast.cpp \
../../src/ripple/beast/ripple_beastc.c \
../../src/ripple/http/ripple_http.cpp \
../../src/ripple/json/ripple_json.cpp \
../../src/ripple/peerfinder/ripple_peerfinder.cpp \
../../src/ripple/rpc/ripple_rpc.cpp \
../../src/ripple/sophia/ripple_sophia.c \
../../src/ripple/sslutil/ripple_sslutil.cpp \
../../src/ripple/testoverlay/ripple_testoverlay.cpp \
../../src/ripple/types/ripple_types.cpp \
../../src/ripple/validators/ripple_validators.cpp
# ---------
# Old style
#
SOURCES += \
../../src/ripple_app/ripple_app.cpp \
../../src/ripple_app/ripple_app_pt1.cpp \
../../src/ripple_app/ripple_app_pt2.cpp \
../../src/ripple_app/ripple_app_pt3.cpp \
../../src/ripple_app/ripple_app_pt4.cpp \
../../src/ripple_app/ripple_app_pt5.cpp \
../../src/ripple_app/ripple_app_pt6.cpp \
../../src/ripple_app/ripple_app_pt7.cpp \
../../src/ripple_app/ripple_app_pt8.cpp \
../../src/ripple_basics/ripple_basics.cpp \
../../src/ripple_core/ripple_core.cpp \
../../src/ripple_data/ripple_data.cpp \
../../src/ripple_hyperleveldb/ripple_hyperleveldb.cpp \
../../src/ripple_leveldb/ripple_leveldb.cpp \
../../src/ripple_mdb/ripple_mdb.c \
../../src/ripple_net/ripple_net.cpp \
../../src/ripple_websocket/ripple_websocket.cpp
LIBS += \
-lboost_date_time-mt\
-lboost_filesystem-mt \
-lboost_program_options-mt \
-lboost_regex-mt \
-lboost_system-mt \
-lboost_thread-mt \
-lboost_random-mt \
-lprotobuf \
-lssl \
-lrt

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<RepoDir>..\..</RepoDir>
<SrcDir>$(RepoDir)\src\cpp\ripple</SrcDir>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(RepoDir)\build\VisualStudio2010\$(Configuration).$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup>
<IntDir>$(RepoDir)\build\obj\VisualStudio2010\$(Configuration).$(Platform)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(RepoDir);$(RepoDir)\src\cpp\leveldb;$(RepoDir)\src\cpp\leveldb\include;$(RepoDir)\src\cpp\protobuf\src;$(RepoDir)\src\cpp\protobuf\vsprojects;$(RepoDir)\build\proto;$(RepoDir)\Subtrees\beast;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>USE_LEVELDB;BOOST_TEST_ALTERNATIVE_INIT_API;BOOST_TEST_NO_MAIN;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level3</WarningLevel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RepoDir">
<Value>$(RepoDir)</Value>
</BuildMacro>
<BuildMacro Include="SrcDir">
<Value>$(SrcDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{EE95954F-3D34-4FB1-ADBD-FE8395233026}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.ActiveCfg = Debug|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Debug|Win32.Build.0 = Debug|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.ActiveCfg = Release|Win32
{EE95954F-3D34-4FB1-ADBD-FE8395233026}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EE95954F-3D34-4FB1-ADBD-FE8395233026}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>RippleD</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="RippleD.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt2.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt3.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt4.cpp" />
<ClCompile Include="..\..\modules\ripple_basics\ripple_basics.cpp" />
<ClCompile Include="..\..\modules\ripple_data\ripple_data.cpp" />
<ClCompile Include="..\..\src\cpp\database\sqlite3.c" />
<ClCompile Include="..\..\src\cpp\leveldb_core.cpp" />
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp" />
<ClCompile Include="..\..\src\cpp\websocket_core.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_basics\beast_basics.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_core\beast_core.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt1.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt2.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt3.cpp" />
<ClCompile Include="..\..\modules\ripple_app\ripple_app_pt4.cpp" />
<ClCompile Include="..\..\modules\ripple_basics\ripple_basics.cpp" />
<ClCompile Include="..\..\modules\ripple_data\ripple_data.cpp" />
<ClCompile Include="..\..\Subtrees\beast\modules\beast_basics\beast_basics.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\Subtrees\beast\modules\beast_core\beast_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\leveldb_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\protobuf_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\websocket_core.cpp">
<Filter>Subtrees</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cpp\database\sqlite3.c">
<Filter>Subtrees</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Ripple">
<UniqueIdentifier>{63db902e-0e7a-42d1-b5f5-663e4b48786c}</UniqueIdentifier>
</Filter>
<Filter Include="Subtrees">
<UniqueIdentifier>{469e8a0a-64bf-4fa1-8b6f-81207db68577}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@@ -1,36 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RippleD", "RippleD.vcxproj", "{B7F39ECD-473C-484D-BC34-31F8362506A5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "beast", "..\..\src\beast\Builds\VisualStudio2012\beast.vcxproj", "{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.ActiveCfg = Debug|Win32
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|Win32.Build.0 = Debug|Win32
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.ActiveCfg = Debug|x64
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Debug|x64.Build.0 = Debug|x64
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.ActiveCfg = Release|Win32
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|Win32.Build.0 = Release|Win32
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.ActiveCfg = Release|x64
{B7F39ECD-473C-484D-BC34-31F8362506A5}.Release|x64.Build.0 = Release|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.ActiveCfg = Debug|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|Win32.Build.0 = Debug|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|x64.ActiveCfg = Debug|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Debug|x64.Build.0 = Debug|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|Win32.ActiveCfg = Release|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|Win32.Build.0 = Release|Win32
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.ActiveCfg = Release|x64
{73C5A0F0-7629-4DE7-9194-BE7AC6C19535}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<RepoDir>..\..</RepoDir>
</PropertyGroup>
<PropertyGroup>
<OutDir>$(RepoDir)\build\VisualStudio2012\$(Configuration).$(Platform)\</OutDir>
<IntDir>$(RepoDir)\build\obj\VisualStudio2012\$(Configuration).$(Platform)\</IntDir>
<TargetName>rippled</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_VARIADIC_MAX=10;_WIN32_WINNT=0x0600;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(RepoDir)\src\protobuf\src;$(RepoDir)\src\protobuf\vsprojects;$(RepoDir)\src;$(RepoDir)\src\leveldb;$(RepoDir)\src\leveldb\include;$(RepoDir)\build\proto;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<ExceptionHandling>Async</ExceptionHandling>
<DisableSpecificWarnings>4018;4244</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="RepoDir">
<Value>$(RepoDir)</Value>
</BuildMacro>
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
Place XCode project file here!

156
CMakeLists.txt Normal file
View File

@@ -0,0 +1,156 @@
cmake_minimum_required(VERSION 3.16)
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
# Fix "unrecognized escape" issues when passing CMAKE_MODULE_PATH on Windows.
file(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
project(xrpl)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# GCC-specific fixes
add_compile_options(-Wno-unknown-pragmas -Wno-subobject-linkage)
# -Wno-subobject-linkage can be removed when we upgrade GCC version to at least 13.3
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# Clang-specific fixes
add_compile_options(-Wno-unknown-warning-option) # Ignore unknown warning options
elseif(MSVC)
# MSVC-specific fixes
add_compile_options(/wd4068) # Ignore unknown pragmas
endif()
# make GIT_COMMIT_HASH define available to all sources
find_package(Git)
if(Git_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git rev-parse HEAD
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE gch)
if(gch)
set(GIT_COMMIT_HASH "${gch}")
message(STATUS gch: ${GIT_COMMIT_HASH})
add_definitions(-DGIT_COMMIT_HASH="${GIT_COMMIT_HASH}")
endif()
execute_process(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git rev-parse --abbrev-ref HEAD
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE gb)
if(gb)
set(GIT_BRANCH "${gb}")
message(STATUS gb: ${GIT_BRANCH})
add_definitions(-DGIT_BRANCH="${GIT_BRANCH}")
endif()
endif() #git
if(thread_safety_analysis)
add_compile_options(-Wthread-safety -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DRIPPLE_ENABLE_THREAD_SAFETY_ANNOTATIONS)
add_compile_options("-stdlib=libc++")
add_link_options("-stdlib=libc++")
endif()
include (CheckCXXCompilerFlag)
include (FetchContent)
include (ExternalProject)
include (CMakeFuncs) # must come *after* ExternalProject b/c it overrides one function in EP
if (target)
message (FATAL_ERROR "The target option has been removed - use native cmake options to control build")
endif ()
include(RippledSanity)
include(RippledVersion)
include(RippledSettings)
# this check has to remain in the top-level cmake
# because of the early return statement
if (packages_only)
if (NOT TARGET rpm)
message (FATAL_ERROR "packages_only requested, but targets were not created - is docker installed?")
endif()
return ()
endif ()
include(RippledCompiler)
include(RippledInterface)
option(only_docs "Include only the docs target?" FALSE)
include(RippledDocs)
if(only_docs)
return()
endif()
###
include(deps/Boost)
find_package(OpenSSL 1.1.1 REQUIRED)
set_target_properties(OpenSSL::SSL PROPERTIES
INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2
)
set(SECP256K1_INSTALL TRUE)
set(SECP256K1_BUILD_BENCHMARK FALSE)
set(SECP256K1_BUILD_TESTS FALSE)
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS FALSE)
set(SECP256K1_BUILD_CTIME_TESTS FALSE)
set(SECP256K1_BUILD_EXAMPLES FALSE)
add_subdirectory(external/secp256k1)
add_library(secp256k1::secp256k1 ALIAS secp256k1)
add_subdirectory(external/ed25519-donna)
add_subdirectory(external/antithesis-sdk)
find_package(gRPC REQUIRED)
find_package(lz4 REQUIRED)
# Target names with :: are not allowed in a generator expression.
# We need to pull the include directories and imported location properties
# from separate targets.
find_package(LibArchive REQUIRED)
find_package(SOCI REQUIRED)
find_package(SQLite3 REQUIRED)
option(rocksdb "Enable RocksDB" ON)
if(rocksdb)
find_package(RocksDB REQUIRED)
set_target_properties(RocksDB::rocksdb PROPERTIES
INTERFACE_COMPILE_DEFINITIONS RIPPLE_ROCKSDB_AVAILABLE=1
)
target_link_libraries(ripple_libs INTERFACE RocksDB::rocksdb)
endif()
find_package(nudb REQUIRED)
find_package(date REQUIRED)
find_package(xxHash REQUIRED)
target_link_libraries(ripple_libs INTERFACE
ed25519::ed25519
lz4::lz4
OpenSSL::Crypto
OpenSSL::SSL
secp256k1::secp256k1
soci::soci
SQLite::SQLite3
)
# Work around changes to Conan recipe for now.
if(TARGET nudb::core)
set(nudb nudb::core)
elseif(TARGET NuDB::nudb)
set(nudb NuDB::nudb)
else()
message(FATAL_ERROR "unknown nudb target")
endif()
target_link_libraries(ripple_libs INTERFACE ${nudb})
if(coverage)
include(RippledCov)
endif()
set(PROJECT_EXPORT_SET RippleExports)
include(RippledCore)
include(RippledInstall)
include(RippledValidatorKeys)
if(tests)
include(CTest)
add_subdirectory(src/tests/libxrpl)
endif()

1077
CONTRIBUTING.md Normal file

File diff suppressed because it is too large Load Diff

BIN
LICENSE

Binary file not shown.

16
LICENSE.md Normal file
View File

@@ -0,0 +1,16 @@
ISC License
Copyright (c) 2011, Arthur Britto, David Schwartz, Jed McCaleb, Vinnie Falco, Bob Way, Eric Lombrozo, Nikolaos D. Bougalis, Howard Hinnant.
Copyright (c) 2012-2020, the XRP Ledger developers.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

100
README.md
View File

@@ -1,53 +1,71 @@
#Ripple - P2P Payment Network
[![codecov](https://codecov.io/gh/XRPLF/rippled/graph/badge.svg?token=WyFr5ajq3O)](https://codecov.io/gh/XRPLF/rippled)
##[![Build Status](https://ci.ripple.com/jenkins/buildStatus/icon?job=rippled)](https://ci.ripple.com/jenkins/job/rippled/)
# The XRP Ledger
This is the repository for Ripple's `rippled`, reference P2P network server.
The [XRP Ledger](https://xrpl.org/) is a decentralized cryptographic ledger powered by a network of peer-to-peer nodes. The XRP Ledger uses a novel Byzantine Fault Tolerant consensus algorithm to settle and record transactions in a secure distributed database without a central operator.
###Build instructions:
* https://ripple.com/wiki/Rippled_build_instructions
## XRP
###Setup instructions:
* https://ripple.com/wiki/Rippled_setup_instructions
[XRP](https://xrpl.org/xrp.html) is a public, counterparty-free asset native to the XRP Ledger, and is designed to bridge the many different currencies in use worldwide. XRP is traded on the open-market and is available for anyone to access. The XRP Ledger was created in 2012 with a finite supply of 100 billion units of XRP.
## rippled
The server software that powers the XRP Ledger is called `rippled` and is available in this repository under the permissive [ISC open-source license](LICENSE.md). The `rippled` server software is written primarily in C++ and runs on a variety of platforms. The `rippled` server software can run in several modes depending on its [configuration](https://xrpl.org/rippled-server-modes.html).
If you are interested in running an **API Server** (including a **Full History Server**), take a look at [Clio](https://github.com/XRPLF/clio). (rippled Reporting Mode has been replaced by Clio.)
### Build from Source
- [Read the build instructions in `BUILD.md`](BUILD.md)
- If you encounter any issues, please [open an issue](https://github.com/XRPLF/rippled/issues)
## Key Features of the XRP Ledger
- **[Censorship-Resistant Transaction Processing][]:** No single party decides which transactions succeed or fail, and no one can "roll back" a transaction after it completes. As long as those who choose to participate in the network keep it healthy, they can settle transactions in seconds.
- **[Fast, Efficient Consensus Algorithm][]:** The XRP Ledger's consensus algorithm settles transactions in 4 to 5 seconds, processing at a throughput of up to 1500 transactions per second. These properties put XRP at least an order of magnitude ahead of other top digital assets.
- **[Finite XRP Supply][]:** When the XRP Ledger began, 100 billion XRP were created, and no more XRP will ever be created. The available supply of XRP decreases slowly over time as small amounts are destroyed to pay transaction costs.
- **[Responsible Software Governance][]:** A team of full-time, world-class developers at Ripple maintain and continually improve the XRP Ledger's underlying software with contributions from the open-source community. Ripple acts as a steward for the technology and an advocate for its interests, and builds constructive relationships with governments and financial institutions worldwide.
- **[Secure, Adaptable Cryptography][]:** The XRP Ledger relies on industry standard digital signature systems like ECDSA (the same scheme used by Bitcoin) but also supports modern, efficient algorithms like Ed25519. The extensible nature of the XRP Ledger's software makes it possible to add and disable algorithms as the state of the art in cryptography advances.
- **[Modern Features for Smart Contracts][]:** Features like Escrow, Checks, and Payment Channels support cutting-edge financial applications including the [Interledger Protocol](https://interledger.org/). This toolbox of advanced features comes with safety features like a process for amending the network and separate checks against invariant constraints.
- **[On-Ledger Decentralized Exchange][]:** In addition to all the features that make XRP useful on its own, the XRP Ledger also has a fully-functional accounting system for tracking and trading obligations denominated in any way users want, and an exchange built into the protocol. The XRP Ledger can settle long, cross-currency payment paths and exchanges of multiple currencies in atomic transactions, bridging gaps of trust with XRP.
[Censorship-Resistant Transaction Processing]: https://xrpl.org/xrp-ledger-overview.html#censorship-resistant-transaction-processing
[Fast, Efficient Consensus Algorithm]: https://xrpl.org/xrp-ledger-overview.html#fast-efficient-consensus-algorithm
[Finite XRP Supply]: https://xrpl.org/xrp-ledger-overview.html#finite-xrp-supply
[Responsible Software Governance]: https://xrpl.org/xrp-ledger-overview.html#responsible-software-governance
[Secure, Adaptable Cryptography]: https://xrpl.org/xrp-ledger-overview.html#secure-adaptable-cryptography
[Modern Features for Smart Contracts]: https://xrpl.org/xrp-ledger-overview.html#modern-features-for-smart-contracts
[On-Ledger Decentralized Exchange]: https://xrpl.org/xrp-ledger-overview.html#on-ledger-decentralized-exchange
## Source Code
Here are some good places to start learning the source code:
- Read the markdown files in the source tree: `src/ripple/**/*.md`.
- Read [the levelization document](.github/scripts/levelization) to get an idea of the internal dependency graph.
- In the big picture, the `main` function constructs an `ApplicationImp` object, which implements the `Application` virtual interface. Almost every component in the application takes an `Application&` parameter in its constructor, typically named `app` and stored as a member variable `app_`. This allows most components to depend on any other component.
### Repository Contents
#### ./bin
Scripts and data files for Ripple integrators.
| Folder | Contents |
| :--------- | :----------------------------------------------- |
| `./bin` | Scripts and data files for Ripple integrators. |
| `./Builds` | Platform-specific guides for building `rippled`. |
| `./docs` | Source documentation files and doxygen config. |
| `./cfg` | Example configuration files. |
| `./src` | Source code. |
#### ./build
Intermediate and final build outputs.
Some of the directories under `src` are external repositories included using
git-subtree. See those directories' README files for more details.
#### ./Builds
Platform or IDE-specific project files.
## Additional Documentation
#### ./doc
Documentation and example configuration files.
- [XRP Ledger Dev Portal](https://xrpl.org/)
- [Setup and Installation](https://xrpl.org/install-rippled.html)
- [Source Documentation (Doxygen)](https://xrplf.github.io/rippled/)
#### ./src
Source code directory. Some of the directories contained here are
external repositories inlined via git-subtree, see the corresponding
README for more details.
## See Also
#### ./test
Javascript / Mocha tests.
## License
Provided under the terms of the ISC License:
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
###For more information:
* https://ripple.com
* https://ripple.com/wiki
- [Clio API Server for the XRP Ledger](https://github.com/XRPLF/clio)
- [Mailing List for Release Announcements](https://groups.google.com/g/ripple-server)
- [Learn more about the XRP Ledger (YouTube)](https://www.youtube.com/playlist?list=PLJQ55Tj1hIVZtJ_JdTvSum2qMTsedWkNi)

View File

@@ -1,287 +0,0 @@
#
# Ripple - SConstruct
#
import commands
import copy
import glob
import os
import platform
import re
OSX = bool(platform.mac_ver()[0])
FreeBSD = bool('FreeBSD' == platform.system())
Linux = bool('Linux' == platform.system())
Ubuntu = bool(Linux and 'Ubuntu' == platform.linux_distribution()[0])
Debian = bool(Linux and 'debian' == platform.linux_distribution()[0])
Archlinux = bool(Linux and ('','','') == platform.linux_distribution()) #Arch still has issues with the platform module
#
# We expect this to be set
#
BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
if OSX or Ubuntu or Debian or Archlinux:
CTAGS = 'ctags'
elif FreeBSD:
CTAGS = 'exctags'
else:
CTAGS = 'exuberant-ctags'
#
# scons tools
#
env = Environment(
tools = ['default', 'protoc']
)
# Use a newer gcc on FreeBSD
if FreeBSD:
env.Replace(CC = 'gcc46')
env.Replace(CXX = 'g++46')
env.Append(CCFLAGS = ['-Wl,-rpath=/usr/local/lib/gcc46'])
env.Append(LINKFLAGS = ['-Wl,-rpath=/usr/local/lib/gcc46'])
if OSX:
env.Replace(CC= 'clang')
env.Replace(CXX= 'clang++')
env.Append(CXXFLAGS = ['-std=c++11', '-stdlib=libc++'])
env.Append(LINKFLAGS='-stdlib=libc++')
env['FRAMEWORKS'] = ['AppKit']
GCC_VERSION = re.split('\.', commands.getoutput(env['CXX'] + ' -dumpversion'))
# Add support for ccache. Usage: scons ccache=1
ccache = ARGUMENTS.get('ccache', 0)
if int(ccache):
env.Prepend(CC = ['ccache'])
env.Prepend(CXX = ['ccache'])
ccache_dir = os.getenv('CCACHE_DIR')
if ccache_dir:
env.Replace(CCACHE_DIR = ccache_dir)
#
# Builder for CTags
#
ctags = Builder(action = '$CTAGS $CTAGSOPTIONS -f $TARGET $SOURCES')
env.Append(BUILDERS = { 'CTags' : ctags })
if OSX:
env.Replace(CTAGS = CTAGS)
else:
env.Replace(CTAGS = CTAGS, CTAGSOPTIONS = '--tag-relative')
# Use openssl
env.ParseConfig('pkg-config --static --cflags --libs openssl')
# Use protobuf
env.ParseConfig('pkg-config --static --cflags --libs protobuf')
# Beast uses kvm on FreeBSD
if FreeBSD:
env.Append (
LIBS = [
'kvm'
]
)
# The required version of boost is documented in the README file.
BOOST_LIBS = [
'boost_date_time',
'boost_filesystem',
'boost_program_options',
'boost_regex',
'boost_system',
'boost_thread',
'boost_random',
]
# We whitelist platforms where the non -mt version is linked with pthreads. This
# can be verified with: ldd libboost_filesystem.* If a threading library is
# included the platform can be whitelisted.
if FreeBSD or Ubuntu or Archlinux or OSX:
# non-mt libs do link with pthreads.
env.Append(
LIBS = BOOST_LIBS
)
else:
env.Append(
LIBS = [l + '-mt' for l in BOOST_LIBS]
)
#-------------------------------------------------------------------------------
#
# VFALCO NOTE Clean area.
#
#-------------------------------------------------------------------------------
#
# Nothing having to do with directories, source files,
# or include paths should reside outside the boundaries.
#
# List of includes passed to the C++ compiler.
# These are all relative to the repo dir.
#
INCLUDE_PATHS = [
'.',
'src',
'src/leveldb',
'src/leveldb/port',
'src/leveldb/include',
'src/beast',
'build/proto'
]
# if BOOST_HOME:
# INCLUDE_PATHS.append(BOOST_HOME)
#-------------------------------------------------------------------------------
#
# Compiled sources
#
COMPILED_FILES = []
# -------------------
# Beast unity sources
#
if OSX:
# OSX: Use the Objective C++ version of beast_core
COMPILED_FILES.extend (['src/ripple/beast/ripple_beastobjc.mm'])
else:
COMPILED_FILES.extend (['src/ripple/beast/ripple_beast.cpp'])
COMPILED_FILES.extend (['src/ripple/beast/ripple_beastc.c'])
# ------------------------------
# New-style Ripple unity sources
#
COMPILED_FILES.extend([
'src/ripple/http/ripple_http.cpp',
'src/ripple/json/ripple_json.cpp',
'src/ripple/peerfinder/ripple_peerfinder.cpp',
'src/ripple/rpc/ripple_rpc.cpp',
'src/ripple/sophia/ripple_sophia.c',
'src/ripple/sslutil/ripple_sslutil.cpp',
'src/ripple/testoverlay/ripple_testoverlay.cpp',
'src/ripple/types/ripple_types.cpp',
'src/ripple/validators/ripple_validators.cpp'
])
# ------------------------------
# Old-style Ripple unity sources
#
COMPILED_FILES.extend([
'src/ripple_app/ripple_app.cpp',
'src/ripple_app/ripple_app_pt1.cpp',
'src/ripple_app/ripple_app_pt2.cpp',
'src/ripple_app/ripple_app_pt3.cpp',
'src/ripple_app/ripple_app_pt4.cpp',
'src/ripple_app/ripple_app_pt5.cpp',
'src/ripple_app/ripple_app_pt6.cpp',
'src/ripple_app/ripple_app_pt7.cpp',
'src/ripple_app/ripple_app_pt8.cpp',
'src/ripple_basics/ripple_basics.cpp',
'src/ripple_core/ripple_core.cpp',
'src/ripple_data/ripple_data.cpp',
'src/ripple_hyperleveldb/ripple_hyperleveldb.cpp',
'src/ripple_leveldb/ripple_leveldb.cpp',
'src/ripple_mdb/ripple_mdb.c',
'src/ripple_net/ripple_net.cpp',
'src/ripple_websocket/ripple_websocket.cpp'
])
#
#
#-------------------------------------------------------------------------------
# Map top level source directories to their location in the outputs
#
VariantDir('build/obj/src', 'src', duplicate=0)
#-------------------------------------------------------------------------------
# Add the list of includes to compiler include paths.
#
for path in INCLUDE_PATHS:
env.Append (CPPPATH = [ path ])
if BOOST_HOME:
env.Prepend (CPPPATH = [ BOOST_HOME ])
#-------------------------------------------------------------------------------
# Apparently, only linux uses -ldl
if Linux: # not FreeBSD:
env.Append(
LIBS = [
'dl', # dynamic linking for linux
]
)
env.Append(
LIBS = \
# rt is for clock_nanosleep in beast
['rt'] if not OSX else [] +\
[
'z'
]
)
# We prepend, in case there's another BOOST somewhere on the path
# such, as installed into `/usr/lib/`
if BOOST_HOME is not None:
env.Prepend(
LIBPATH = ["%s/stage/lib" % BOOST_HOME])
if not OSX:
env.Append(LINKFLAGS = [
'-rdynamic', '-pthread',
])
DEBUGFLAGS = ['-g', '-DDEBUG', '-D_DEBUG']
env.Append(CCFLAGS = ['-pthread', '-Wall', '-Wno-sign-compare', '-Wno-char-subscripts']+DEBUGFLAGS)
env.Append(CXXFLAGS = ['-O1', '-pthread', '-Wno-invalid-offsetof', '-Wformat']+DEBUGFLAGS)
# RTTI is required for Beast and CountedObject.
#
env.Append(CXXFLAGS = ['-frtti'])
if (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) == 6):
env.Append(CXXFLAGS = ['-std=c++0x'])
elif (int(GCC_VERSION[0]) > 4 or (int(GCC_VERSION[0]) == 4 and int(GCC_VERSION[1]) >= 7)):
env.Append(CXXFLAGS = ['-std=c++11'])
# FreeBSD doesn't support O_DSYNC
if FreeBSD:
env.Append(CPPFLAGS = ['-DMDB_DSYNC=O_SYNC'])
if OSX:
env.Append(LINKFLAGS = ['-L/usr/local/opt/openssl/lib'])
env.Append(CXXFLAGS = ['-I/usr/local/opt/openssl/include'])
PROTO_SRCS = env.Protoc([], 'src/ripple_data/protocol/ripple.proto', PROTOCOUTDIR='build/proto', PROTOCPYTHONOUTDIR=None)
env.Clean(PROTO_SRCS, 'site_scons/site_tools/protoc.pyc')
# Only tag actual Ripple files.
TAG_SRCS = copy.copy(COMPILED_FILES)
# Derive the object files from the source files.
OBJECT_FILES = []
OBJECT_FILES.append(PROTO_SRCS[0])
for file in COMPILED_FILES:
OBJECT_FILES.append('build/obj/' + file)
#
# Targets
#
rippled = env.Program('build/rippled', OBJECT_FILES)
tags = env.CTags('tags', TAG_SRCS)
Default(rippled, tags)

149
SECURITY.md Normal file
View File

@@ -0,0 +1,149 @@
### Operating an XRP Ledger server securely
For more details on operating an XRP Ledger server securely, please visit https://xrpl.org/manage-the-rippled-server.html.
# Security Policy
## Supported Versions
Software constantly evolves. In order to focus resources, we only generally only accept vulnerability reports that affect recent and current versions of the software. We always accept reports for issues present in the **master**, **release** or **develop** branches, and with proposed, [open pull requests](https://github.com/ripple/rippled/pulls).
## Identifying and Reporting Vulnerabilities
We take security seriously and we do our best to ensure that all our releases are bug free. But we aren't perfect and sometimes things will slip through.
### Responsible Investigation
We urge you to examine our code carefully and responsibly, and to disclose any issues that you identify in a responsible fashion.
Responsible investigation includes, but isn't limited to, the following:
- Not performing tests on the main network. If testing is necessary, use the [Testnet or Devnet](https://xrpl.org/xrp-testnet-faucet.html).
- Not targeting physical security measures, or attempting to use social engineering, spam, distributed denial of service (DDOS) attacks, etc.
- Investigating bugs in a way that makes a reasonable, good faith effort not to be disruptive or harmful to the XRP Ledger and the broader ecosystem.
### Responsible Disclosure
If you discover a vulnerability or potential threat, or if you _think_
you have, please reach out by dropping an email using the contact
information below.
Your report should include the following:
- Your contact information (typically, an email address);
- The description of the vulnerability;
- The attack scenario (if any);
- The steps to reproduce the vulnerability;
- Any other relevant details or artifacts, including code, scripts or patches.
In your email, please describe the issue or potential threat. If possible, include a "repro" (code that can reproduce the issue) or describe the best way to reproduce and replicate the issue. Please make your report as detailed and comprehensive as possible.
For more information on responsible disclosure, please read this [Wikipedia article](https://en.wikipedia.org/wiki/Responsible_disclosure).
## Report Handling Process
Please report the bug directly to us and limit further disclosure. If you want to prove that you knew the bug as of a given time, consider using a cryptographic precommitment: hash the content of your report and publish the hash on a medium of your choice (e.g. on Twitter or as a memo in a transaction) as "proof" that you had written the text at a given point in time.
Once we receive a report, we:
1. Assign two people to independently evaluate the report;
2. Consider their recommendations;
3. If action is necessary, formulate a plan to address the issue;
4. Communicate privately with the reporter to explain our plan.
5. Prepare, test and release a version which fixes the issue; and
6. Announce the vulnerability publicly.
We will triage and respond to your disclosure within 24 hours. Beyond that, we will work to analyze the issue in more detail, formulate, develop and test a fix.
While we commit to responding with 24 hours of your initial report with our triage assessment, we cannot guarantee a response time for the remaining steps. We will communicate with you throughout this process, letting you know where we are and keeping you updated on the timeframe.
## Bug Bounty Program
[Ripple](https://ripple.com) is generously sponsoring a bug bounty program for vulnerabilities in [`rippled`](https://github.com/XRPLF/rippled) (and other related projects, like [`xrpl.js`](https://github.com/XRPLF/xrpl.js), [`xrpl-py`](https://github.com/XRPLF/xrpl-py), [`xrpl4j`](https://github.com/XRPLF/xrpl4j)).
This program allows us to recognize and reward individuals or groups that identify and report bugs. In summary, in order to qualify for a bounty, the bug must be:
1. **In scope**. Only bugs in software under the scope of the program qualify. Currently, that means `rippled`, `xrpl.js`, `xrpl-py`, `xrpl4j`.
2. **Relevant**. A security issue, posing a danger to user funds, privacy, or the operation of the XRP Ledger.
3. **Original and previously unknown**. Bugs that are already known and discussed in public do not qualify. Previously reported bugs, even if publicly unknown, are not eligible.
4. **Specific**. We welcome general security advice or recommendations, but we cannot pay bounties for that.
5. **Fixable**. There has to be something we can do to permanently fix the problem. Note that bugs in other peoples software may still qualify in some cases. For example, if you find a bug in a library that we use which can compromise the security of software that is in scope and we can get it fixed, you may qualify for a bounty.
6. **Unused**. If you use the exploit to attack the XRP Ledger, you do not qualify for a bounty. If you report a vulnerability used in an ongoing or past attack and there is specific, concrete evidence that suggests you are the attacker we reserve the right not to pay a bounty.
The amount paid varies dramatically. Vulnerabilities that are harmless on their own, but could form part of a critical exploit will usually receive a bounty. Full-blown exploits can receive much higher bounties. Please dont hold back partial vulnerabilities while trying to construct a full-blown exploit. We will pay a bounty to anyone who reports a complete chain of vulnerabilities even if they have reported each component of the exploit separately and those vulnerabilities have been fixed in the meantime. However, to qualify for a the full bounty, you must to have been the first to report each of the partial exploits.
### Contacting Us
To report a qualifying bug, please send a detailed report to:
| Email Address | bugs@ripple.com |
| :-----------: | :-------------------------------------------------- |
| Short Key ID | `0xC57929BE` |
| Long Key ID | `0xCD49A0AFC57929BE` |
| Fingerprint | `24E6 3B02 37E0 FA9C 5E96 8974 CD49 A0AF C579 29BE` |
The full PGP key for this address, which is also available on several key servers (e.g. on [keyserver.ubuntu.com](https://keyserver.ubuntu.com)), is:
```
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFUwGHYBEAC0wpGpBPkd8W1UdQjg9+cEFzeIEJRaoZoeuJD8mofwI5Ejnjdt
kCpUYEDal0ygkKobu8SzOoATcDl18iCrScX39VpTm96vISFZMhmOryYCIp4QLJNN
4HKc2ZdBj6W4igNi6vj5Qo6JMyGpLY2mz4CZskbt0TNuUxWrGood+UrCzpY8x7/N
a93fcvNw+prgCr0rCH3hAPmAFfsOBbtGzNnmq7xf3jg5r4Z4sDiNIF1X1y53DAfV
rWDx49IKsuCEJfPMp1MnBSvDvLaQ2hKXs+cOpx1BCZgHn3skouEUxxgqbtTzBLt1
xXpmuijsaltWngPnGO7mOAzbpZSdBm82/Emrk9bPMuD0QaLQjWr7HkTSUs6ZsKt4
7CLPdWqxyY/QVw9UaxeHEtWGQGMIQGgVJGh1fjtUr5O1sC9z9jXcQ0HuIHnRCTls
GP7hklJmfH5V4SyAJQ06/hLuEhUJ7dn+BlqCsT0tLmYTgZYNzNcLHcqBFMEZHvHw
9GENMx/tDXgajKql4bJnzuTK0iGU/YepanANLd1JHECJ4jzTtmKOus9SOGlB2/l1
0t0ADDYAS3eqOdOcUvo9ElSLCI5vSVHhShSte/n2FMWU+kMUboTUisEG8CgQnrng
g2CvvQvqDkeOtZeqMcC7HdiZS0q3LJUWtwA/ViwxrVlBDCxiTUXCotyBWwARAQAB
tDBSaXBwbGUgTGFicyBCdWcgQm91bnR5IFByb2dyYW0gPGJ1Z3NAcmlwcGxlLmNv
bT6JAjcEEwEKACEFAlUwGHYCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQ
zUmgr8V5Kb6R0g//SwY/mVJY59k87iL26/KayauSoOcz7xjcST26l4ZHVVX85gOY
HYZl8k0+m8X3zxeYm9a3QAoAml8sfoaFRFQP8ynnefRrLUPaZ2MjbJ0SACMwZNef
T6o7Mi8LBAaiNZdYVyIfX1oM6YXtqYkuJdav6ZCyvVYqc9OvMJPY2ZzJYuI/ZtvQ
/lTndxCeg9ALNX/iezOLGdfMpf4HuIFVwcPPlwGi+HDlB9/bggDEHC8z434SXVFc
aQatXAPcDkjMUweU7y0CZtYEj00HITd4pSX6MqGiHrxlDZTqinCOPs1Ieqp7qufs
MzlM6irLGucxj1+wa16ieyYvEtGaPIsksUKkywx0O7cf8N2qKg+eIkUk6O0Uc6eO
CszizmiXIXy4O6OiLlVHGKkXHMSW9Nwe9GE95O8G9WR8OZCEuDv+mHPAutO+IjdP
PDAAUvy+3XnkceO+HGWRpVvJZfFP2YH4A33InFL5yqlJmSoR/yVingGLxk55bZDM
+HYGR3VeMb8Xj1rf/02qERsZyccMCFdAvKDbTwmvglyHdVLu5sPmktxbBYiemfyJ
qxMxmYXCc9S0hWrWZW7edktBa9NpE58z1mx+hRIrDNbS2sDHrib9PULYCySyVYcF
P+PWEe1CAS5jqkR2ker5td2/pHNnJIycynBEs7l6zbc9fu+nktFJz0q2B+GJAhwE
EAEKAAYFAlUwGaQACgkQ+tiY1qQ2QkjMFw//f2hNY3BPNe+1qbhzumMDCnbTnGif
kLuAGl9OKt81VHG1f6RnaGiLpR696+6Ja45KzH15cQ5JJl5Bgs1YkR/noTGX8IAD
c70eNwiFu8JXTaaeeJrsmFkF9Tueufb364risYkvPP8tNUD3InBFEZT3WN7JKwix
coD4/BwekUwOZVDd/uCFEyhlhZsROxdKNisNo3VtAq2s+3tIBAmTrriFUl0K+ZC5
zgavcpnPN57zMtW9aK+VO3wXqAKYLYmtgxkVzSLUZt2M7JuwOaAdyuYWAneKZPCu
1AXkmyo+d84sd5mZaKOr5xArAFiNMWPUcZL4rkS1Fq4dKtGAqzzR7a7hWtA5o27T
6vynuxZ1n0PPh0er2O/zF4znIjm5RhTlfjp/VmhZdQfpulFEQ/dMxxGkQ9z5IYbX
mTlSDbCSb+FMsanRBJ7Drp5EmBIudVGY6SHI5Re1RQiEh7GoDfUMUwZO+TVDII5R
Ra7WyuimYleJgDo/+7HyfuIyGDaUCVj6pwVtYtYIdOI3tTw1R1Mr0V8yaNVnJghL
CHcEJQL+YHSmiMM3ySil3O6tm1By6lFz8bVe/rgG/5uklQrnjMR37jYboi1orCC4
yeIoQeV0ItlxeTyBwYIV/o1DBNxDevTZvJabC93WiGLw2XFjpZ0q/9+zI2rJUZJh
qxmKP+D4e27lCI65Ag0EVTAYdgEQAMvttYNqeRNBRpSX8fk45WVIV8Fb21fWdwk6
2SkZnJURbiC0LxQnOi7wrtii7DeFZtwM2kFHihS1VHekBnIKKZQSgGoKuFAQMGyu
a426H4ZsSmA9Ufd7kRbvdtEcp7/RTAanhrSL4lkBhaKJrXlxBJ27o3nd7/rh7r3a
OszbPY6DJ5bWClX3KooPTDl/RF2lHn+fweFk58UvuunHIyo4BWJUdilSXIjLun+P
Qaik4ZAsZVwNhdNz05d+vtai4AwbYoO7adboMLRkYaXSQwGytkm+fM6r7OpXHYuS
cR4zB/OK5hxCVEpWfiwN71N2NMvnEMaWd/9uhqxJzyvYgkVUXV9274TUe16pzXnW
ZLfmitjwc91e7mJBBfKNenDdhaLEIlDRwKTLj7k58f9srpMnyZFacntu5pUMNblB
cjXwWxz5ZaQikLnKYhIvrIEwtWPyjqOzNXNvYfZamve/LJ8HmWGCKao3QHoAIDvB
9XBxrDyTJDpxbog6Qu4SY8AdgVlan6c/PsLDc7EUegeYiNTzsOK+eq3G5/E92eIu
TsUXlciypFcRm1q8vLRr+HYYe2mJDo4GetB1zLkAFBcYJm/x9iJQbu0hn5NxJvZO
R0Y5nOJQdyi+muJzKYwhkuzaOlswzqVXkq/7+QCjg7QsycdcwDjiQh3OrsgXHrwl
M7gyafL9ABEBAAGJAh8EGAEKAAkFAlUwGHYCGwwACgkQzUmgr8V5Kb50BxAAhj9T
TwmNrgRldTHszj+Qc+v8RWqV6j+R+zc0cn5XlUa6XFaXI1OFFg71H4dhCPEiYeN0
IrnocyMNvCol+eKIlPKbPTmoixjQ4udPTR1DC1Bx1MyW5FqOrsgBl5t0e1VwEViM
NspSStxu5Hsr6oWz2GD48lXZWJOgoL1RLs+uxjcyjySD/em2fOKASwchYmI+ezRv
plfhAFIMKTSCN2pgVTEOaaz13M0U+MoprThqF1LWzkGkkC7n/1V1f5tn83BWiagG
2N2Q4tHLfyouzMUKnX28kQ9sXfxwmYb2sA9FNIgxy+TdKU2ofLxivoWT8zS189z/
Yj9fErmiMjns2FzEDX+bipAw55X4D/RsaFgC+2x2PDbxeQh6JalRA2Wjq32Ouubx
u+I4QhEDJIcVwt9x6LPDuos1F+M5QW0AiUhKrZJ17UrxOtaquh/nPUL9T3l2qPUn
1ChrZEEEhHO6vA8+jn0+cV9n5xEz30Str9iHnDQ5QyR5LyV4UBPgTdWyQzNVKA69
KsSr9lbHEtQFRzGuBKwt6UlSFv9vPWWJkJit5XDKAlcKuGXj0J8OlltToocGElkF
+gEBZfoOWi/IBjRLrFW2cT3p36DTR5O1Ud/1DLnWRqgWNBLrbs2/KMKE6EnHttyD
7Tz8SQkuxltX/yBXMV3Ddy0t6nWV2SZEfuxJAQI=
=spg4
-----END PGP PUBLIC KEY BLOCK-----
```

View File

@@ -1,470 +0,0 @@
#!/usr/bin/node
//
// ledger?l=L
// transaction?h=H
// ledger_entry?l=L&h=H
// account?l=L&a=A
// directory?l=L&dir_root=H&i=I
// directory?l=L&o=A&i=I // owner directory
// offer?l=L&offer=H
// offer?l=L&account=A&i=I
// ripple_state=l=L&a=A&b=A&c=C
// account_lines?l=L&a=A
//
// A=address
// C=currency 3 letter code
// H=hash
// I=index
// L=current | closed | validated | index | hash
//
var async = require("async");
var extend = require("extend");
var http = require("http");
var url = require("url");
var Remote = require("ripple-lib").Remote;
var program = process.argv[1];
var httpd_response = function (res, opts) {
var self=this;
res.statusCode = opts.statusCode;
res.end(
"<HTML>"
+ "<HEAD><TITLE>Title</TITLE></HEAD>"
+ "<BODY BACKGROUND=\"#FFFFFF\">"
+ "State:" + self.state
+ "<UL>"
+ "<LI><A HREF=\"/\">home</A>"
+ "<LI>" + html_link('r4EM4gBQfr1QgQLXSPF4r7h84qE9mb6iCC')
// + "<LI><A HREF=\""+test+"\">rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh</A>"
+ "<LI><A HREF=\"/ledger\">ledger</A>"
+ "</UL>"
+ (opts.body || '')
+ '<HR><PRE>'
+ (opts.url || '')
+ '</PRE>'
+ "</BODY>"
+ "</HTML>"
);
};
var html_link = function (generic) {
return '<A HREF="' + build_uri({ type: 'account', account: generic}) + '">' + generic + '</A>';
};
// Build a link to a type.
var build_uri = function (params, opts) {
var c;
if (params.type === 'account') {
c = {
pathname: 'account',
query: {
l: params.ledger,
a: params.account,
},
};
} else if (params.type === 'ledger') {
c = {
pathname: 'ledger',
query: {
l: params.ledger,
},
};
} else if (params.type === 'transaction') {
c = {
pathname: 'transaction',
query: {
h: params.hash,
},
};
} else {
c = {};
}
opts = opts || {};
c.protocol = "http";
c.hostname = opts.hostname || self.base.hostname;
c.port = opts.port || self.base.port;
return url.format(c);
};
var build_link = function (item, link) {
console.log(link);
return "<A HREF=" + link + ">" + item + "</A>";
};
var rewrite_field = function (type, obj, field, opts) {
if (field in obj) {
obj[field] = rewrite_type(type, obj[field], opts);
}
};
var rewrite_type = function (type, obj, opts) {
if ('amount' === type) {
if ('string' === typeof obj) {
// XRP.
return '<B>' + obj + '</B>';
} else {
rewrite_field('address', obj, 'issuer', opts);
return obj;
}
return build_link(
obj,
build_uri({
type: 'account',
account: obj
}, opts)
);
}
if ('address' === type) {
return build_link(
obj,
build_uri({
type: 'account',
account: obj
}, opts)
);
}
else if ('ledger' === type) {
return build_link(
obj,
build_uri({
type: 'ledger',
ledger: obj,
}, opts)
);
}
else if ('node' === type) {
// A node
if ('PreviousTxnID' in obj)
obj.PreviousTxnID = rewrite_type('transaction', obj.PreviousTxnID, opts);
if ('Offer' === obj.LedgerEntryType) {
if ('NewFields' in obj) {
if ('TakerGets' in obj.NewFields)
obj.NewFields.TakerGets = rewrite_type('amount', obj.NewFields.TakerGets, opts);
if ('TakerPays' in obj.NewFields)
obj.NewFields.TakerPays = rewrite_type('amount', obj.NewFields.TakerPays, opts);
}
}
obj.LedgerEntryType = '<B>' + obj.LedgerEntryType + '</B>';
return obj;
}
else if ('transaction' === type) {
// Reference to a transaction.
return build_link(
obj,
build_uri({
type: 'transaction',
hash: obj
}, opts)
);
}
return 'ERROR: ' + type;
};
var rewrite_object = function (obj, opts) {
var out = extend({}, obj);
rewrite_field('address', out, 'Account', opts);
rewrite_field('ledger', out, 'parent_hash', opts);
rewrite_field('ledger', out, 'ledger_index', opts);
rewrite_field('ledger', out, 'ledger_current_index', opts);
rewrite_field('ledger', out, 'ledger_hash', opts);
if ('ledger' in obj) {
// It's a ledger header.
out.ledger = rewrite_object(out.ledger, opts);
if ('ledger_hash' in out.ledger)
out.ledger.ledger_hash = '<B>' + out.ledger.ledger_hash + '</B>';
delete out.ledger.hash;
delete out.ledger.totalCoins;
}
if ('TransactionType' in obj) {
// It's a transaction.
out.TransactionType = '<B>' + obj.TransactionType + '</B>';
rewrite_field('amount', out, 'TakerGets', opts);
rewrite_field('amount', out, 'TakerPays', opts);
rewrite_field('ledger', out, 'inLedger', opts);
out.meta.AffectedNodes = out.meta.AffectedNodes.map(function (node) {
var kind = 'CreatedNode' in node
? 'CreatedNode'
: 'ModifiedNode' in node
? 'ModifiedNode'
: 'DeletedNode' in node
? 'DeletedNode'
: undefined;
if (kind) {
node[kind] = rewrite_type('node', node[kind], opts);
}
return node;
});
}
else if ('node' in obj && 'LedgerEntryType' in obj.node) {
// Its a ledger entry.
if (obj.node.LedgerEntryType === 'AccountRoot') {
rewrite_field('address', out.node, 'Account', opts);
rewrite_field('transaction', out.node, 'PreviousTxnID', opts);
rewrite_field('ledger', out.node, 'PreviousTxnLgrSeq', opts);
}
out.node.LedgerEntryType = '<B>' + out.node.LedgerEntryType + '</B>';
}
return out;
};
var augment_object = function (obj, opts, done) {
if (obj.node.LedgerEntryType == 'AccountRoot') {
var tx_hash = obj.node.PreviousTxnID;
var tx_ledger = obj.node.PreviousTxnLgrSeq;
obj.history = [];
async.whilst(
function () { return tx_hash; },
function (callback) {
// console.log("augment_object: request: %s %s", tx_hash, tx_ledger);
opts.remote.request_tx(tx_hash)
.on('success', function (m) {
tx_hash = undefined;
tx_ledger = undefined;
//console.log("augment_object: ", JSON.stringify(m));
m.meta.AffectedNodes.filter(function(n) {
// console.log("augment_object: ", JSON.stringify(n));
// if (n.ModifiedNode)
// console.log("augment_object: %s %s %s %s %s %s/%s", 'ModifiedNode' in n, n.ModifiedNode && (n.ModifiedNode.LedgerEntryType === 'AccountRoot'), n.ModifiedNode && n.ModifiedNode.FinalFields && (n.ModifiedNode.FinalFields.Account === obj.node.Account), Object.keys(n)[0], n.ModifiedNode && (n.ModifiedNode.LedgerEntryType), obj.node.Account, n.ModifiedNode && n.ModifiedNode.FinalFields && n.ModifiedNode.FinalFields.Account);
// if ('ModifiedNode' in n && n.ModifiedNode.LedgerEntryType === 'AccountRoot')
// {
// console.log("***: ", JSON.stringify(m));
// console.log("***: ", JSON.stringify(n));
// }
return 'ModifiedNode' in n
&& n.ModifiedNode.LedgerEntryType === 'AccountRoot'
&& n.ModifiedNode.FinalFields
&& n.ModifiedNode.FinalFields.Account === obj.node.Account;
})
.forEach(function (n) {
tx_hash = n.ModifiedNode.PreviousTxnID;
tx_ledger = n.ModifiedNode.PreviousTxnLgrSeq;
obj.history.push({
tx_hash: tx_hash,
tx_ledger: tx_ledger
});
console.log("augment_object: next: %s %s", tx_hash, tx_ledger);
});
callback();
})
.on('error', function (m) {
callback(m);
})
.request();
},
function (err) {
if (err) {
done();
}
else {
async.forEach(obj.history, function (o, callback) {
opts.remote.request_account_info(obj.node.Account)
.ledger_index(o.tx_ledger)
.on('success', function (m) {
//console.log("augment_object: ", JSON.stringify(m));
o.Balance = m.account_data.Balance;
// o.account_data = m.account_data;
callback();
})
.on('error', function (m) {
o.error = m;
callback();
})
.request();
},
function (err) {
done(err);
});
}
});
}
else {
done();
}
};
if (process.argv.length < 4 || process.argv.length > 7) {
console.log("Usage: %s ws_ip ws_port [<ip> [<port> [<start>]]]", program);
}
else {
var ws_ip = process.argv[2];
var ws_port = process.argv[3];
var ip = process.argv.length > 4 ? process.argv[4] : "127.0.0.1";
var port = process.argv.length > 5 ? process.argv[5] : "8080";
// console.log("START");
var self = this;
var remote = (new Remote({
websocket_ip: ws_ip,
websocket_port: ws_port,
trace: false
}))
.on('state', function (m) {
console.log("STATE: %s", m);
self.state = m;
})
// .once('ledger_closed', callback)
.connect()
;
self.base = {
hostname: ip,
port: port,
remote: remote,
};
// console.log("SERVE");
var server = http.createServer(function (req, res) {
var input = "";
req.setEncoding();
req.on('data', function (buffer) {
// console.log("DATA: %s", buffer);
input = input + buffer;
});
req.on('end', function () {
// console.log("URL: %s", req.url);
// console.log("HEADERS: %s", JSON.stringify(req.headers, undefined, 2));
var _parsed = url.parse(req.url, true);
var _url = JSON.stringify(_parsed, undefined, 2);
// console.log("HEADERS: %s", JSON.stringify(_parsed, undefined, 2));
if (_parsed.pathname === "/account") {
var request = remote
.request_ledger_entry('account_root')
.ledger_index(-1)
.account_root(_parsed.query.a)
.on('success', function (m) {
// console.log("account_root: %s", JSON.stringify(m, undefined, 2));
augment_object(m, self.base, function() {
httpd_response(res,
{
statusCode: 200,
url: _url,
body: "<PRE>"
+ JSON.stringify(rewrite_object(m, self.base), undefined, 2)
+ "</PRE>"
});
});
})
.request();
} else if (_parsed.pathname === "/ledger") {
var request = remote
.request_ledger(undefined, { expand: true, transactions: true })
.on('success', function (m) {
// console.log("Ledger: %s", JSON.stringify(m, undefined, 2));
httpd_response(res,
{
statusCode: 200,
url: _url,
body: "<PRE>"
+ JSON.stringify(rewrite_object(m, self.base), undefined, 2)
+"</PRE>"
});
})
if (_parsed.query.l && _parsed.query.l.length === 64) {
request.ledger_hash(_parsed.query.l);
}
else if (_parsed.query.l) {
request.ledger_index(Number(_parsed.query.l));
}
else {
request.ledger_index(-1);
}
request.request();
} else if (_parsed.pathname === "/transaction") {
var request = remote
.request_tx(_parsed.query.h)
// .request_transaction_entry(_parsed.query.h)
// .ledger_select(_parsed.query.l)
.on('success', function (m) {
// console.log("transaction: %s", JSON.stringify(m, undefined, 2));
httpd_response(res,
{
statusCode: 200,
url: _url,
body: "<PRE>"
+ JSON.stringify(rewrite_object(m, self.base), undefined, 2)
+"</PRE>"
});
})
.on('error', function (m) {
httpd_response(res,
{
statusCode: 200,
url: _url,
body: "<PRE>"
+ 'ERROR: ' + JSON.stringify(m, undefined, 2)
+"</PRE>"
});
})
.request();
} else {
var test = build_uri({
type: 'account',
ledger: 'closed',
account: 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh',
}, self.base);
httpd_response(res,
{
statusCode: req.url === "/" ? 200 : 404,
url: _url,
});
}
});
});
server.listen(port, ip, undefined,
function () {
console.log("Listening at: http://%s:%s", ip, port);
});
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,64 +0,0 @@
var ripple = require('ripple-lib');
var v = {
seed: "snoPBrXtMeMyMHUVTgbuqAfg1SUTb",
addr: "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
};
var remote = ripple.Remote.from_config({
"trusted" : true,
"websocket_ip" : "127.0.0.1",
"websocket_port" : 5006,
"websocket_ssl" : false,
"local_signing" : true
});
var tx_json = {
"Account" : v.addr,
"Amount" : "10000000",
"Destination" : "rEu2ULPiEQm1BAL8pYzmXnNX1aFX9sCks",
"Fee" : "10",
"Flags" : 0,
"Sequence" : 3,
"TransactionType" : "Payment"
//"SigningPubKey": '0396941B22791A448E5877A44CE98434DB217D6FB97D63F0DAD23BE49ED45173C9'
};
remote.on('connected', function () {
var req = remote.request_sign(v.seed, tx_json);
req.message.debug_signing = true;
req.on('success', function (result) {
console.log("SERVER RESULT");
console.log(result);
var sim = {};
var tx = remote.transaction();
tx.tx_json = tx_json;
tx._secret = v.seed;
tx.complete();
var unsigned = tx.serialize().to_hex();
tx.sign();
sim.tx_blob = tx.serialize().to_hex();
sim.tx_json = tx.tx_json;
sim.tx_signing_hash = tx.signing_hash().to_hex();
sim.tx_unsigned = unsigned;
console.log("\nLOCAL RESULT");
console.log(sim);
remote.connect(false);
});
req.on('error', function (err) {
if (err.error === "remoteError" && err.remote.error === "srcActNotFound") {
console.log("Please fund account "+v.addr+" to run this test.");
} else {
console.log('error', err);
}
remote.connect(false);
});
req.request();
});
remote.connect();

View File

@@ -1,18 +0,0 @@
#!/usr/bin/node
//
// Returns a Gravatar style hash as per: http://en.gravatar.com/site/implement/hash/
//
if (3 != process.argv.length) {
process.stderr.write("Usage: " + process.argv[1] + " email_address\n\nReturns gravatar style hash.\n");
process.exit(1);
} else {
var md5 = require('crypto').createHash('md5');
md5.update(process.argv[2].trim().toLowerCase());
process.stdout.write(md5.digest('hex') + "\n");
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,31 +0,0 @@
#!/usr/bin/node
//
// This program allows IE 9 ripple-clients to make websocket connections to
// rippled using flash. As IE 9 does not have websocket support, this required
// if you wish to support IE 9 ripple-clients.
//
// http://www.lightsphere.com/dev/articles/flash_socket_policy.html
//
// For better security, be sure to set the Port below to the port of your
// [websocket_public_port].
//
var net = require("net"),
port = "*",
domains = ["*:"+port]; // Domain:Port
net.createServer(
function(socket) {
socket.write("<?xml version='1.0' ?>\n");
socket.write("<!DOCTYPE cross-domain-policy SYSTEM 'http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd'>\n");
socket.write("<cross-domain-policy>\n");
domains.forEach(
function(domain) {
var parts = domain.split(':');
socket.write("\t<allow-access-from domain='" + parts[0] + "' to-ports='" + parts[1] + "' />\n");
}
);
socket.write("</cross-domain-policy>\n");
socket.end();
}
).listen(843);

85
bin/git/setup-upstreams.sh Executable file
View File

@@ -0,0 +1,85 @@
#!/bin/bash
if [[ $# -ne 1 || "$1" == "--help" || "$1" == "-h" ]]
then
name=$( basename $0 )
cat <<- USAGE
Usage: $name <username>
Where <username> is the Github username of the upstream repo. e.g. XRPLF
USAGE
exit 0
fi
# Create upstream remotes based on origin
shift
user="$1"
# Get the origin URL. Expect it be an SSH-style URL
origin=$( git remote get-url origin )
if [[ "${origin}" == "" ]]
then
echo Invalid origin remote >&2
exit 1
fi
# echo "Origin: ${origin}"
# Parse the origin
ifs_orig="${IFS}"
IFS=':' read remote originpath <<< "${origin}"
# echo "Remote: ${remote}, Originpath: ${originpath}"
IFS='@' read sshuser server <<< "${remote}"
# echo "SSHUser: ${sshuser}, Server: ${server}"
IFS='/' read originuser repo <<< "${originpath}"
# echo "Originuser: ${originuser}, Repo: ${repo}"
if [[ "${sshuser}" == "" || "${server}" == "" || "${originuser}" == ""
|| "${repo}" == "" ]]
then
echo "Can't parse origin URL: ${origin}" >&2
exit 1
fi
upstream="https://${server}/${user}/${repo}"
upstreampush="${remote}:${user}/${repo}"
upstreamgroup="upstream upstream-push"
current=$( git remote get-url upstream 2>/dev/null )
currentpush=$( git remote get-url upstream-push 2>/dev/null )
currentgroup=$( git config remotes.upstreams )
if [[ "${current}" == "${upstream}" ]]
then
echo "Upstream already set up correctly. Skip"
elif [[ -n "${current}" && "${current}" != "${upstream}" &&
"${current}" != "${upstreampush}" ]]
then
echo "Upstream already set up as: ${current}. Skip"
else
if [[ "${current}" == "${upstreampush}" ]]
then
echo "Upstream set to dangerous push URL. Update."
_run git remote rename upstream upstream-push || \
_run git remote remove upstream
currentpush=$( git remote get-url upstream-push 2>/dev/null )
fi
_run git remote add upstream "${upstream}"
fi
if [[ "${currentpush}" == "${upstreampush}" ]]
then
echo "upstream-push already set up correctly. Skip"
elif [[ -n "${currentpush}" && "${currentpush}" != "${upstreampush}" ]]
then
echo "upstream-push already set up as: ${currentpush}. Skip"
else
_run git remote add upstream-push "${upstreampush}"
fi
if [[ "${currentgroup}" == "${upstreamgroup}" ]]
then
echo "Upstreams group already set up correctly. Skip"
elif [[ -n "${currentgroup}" && "${currentgroup}" != "${upstreamgroup}" ]]
then
echo "Upstreams group already set up as: ${currentgroup}. Skip"
else
_run git config --add remotes.upstreams "${upstreamgroup}"
fi
_run git fetch --jobs=$(nproc) upstreams
exit 0

68
bin/git/squash-branches.sh Executable file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
if [[ $# -lt 3 || "$1" == "--help" || "$1" = "-h" ]]
then
name=$( basename $0 )
cat <<- USAGE
Usage: $name workbranch base/branch user/branch [user/branch [...]]
* workbranch will be created locally from base/branch
* base/branch and user/branch may be specified as user:branch to allow
easy copying from Github PRs
* Remotes for each user must already be set up
USAGE
exit 0
fi
work="$1"
shift
branches=( $( echo "${@}" | sed "s/:/\//" ) )
base="${branches[0]}"
unset branches[0]
set -e
users=()
for b in "${branches[@]}"
do
users+=( $( echo $b | cut -d/ -f1 ) )
done
users=( $( printf '%s\n' "${users[@]}" | sort -u ) )
git fetch --multiple upstreams "${users[@]}"
git checkout -B "$work" --no-track "$base"
for b in "${branches[@]}"
do
git merge --squash "${b}"
git commit -S # Use the commit message provided on the PR
done
# Make sure the commits look right
git log --show-signature "$base..HEAD"
parts=( $( echo $base | sed "s/\// /" ) )
repo="${parts[0]}"
b="${parts[1]}"
push=$repo
if [[ "$push" == "upstream" ]]
then
push="upstream-push"
fi
if [[ "$repo" == "upstream" ]]
then
repo="upstreams"
fi
cat << PUSH
-------------------------------------------------------------------
This script will not push. Verify everything is correct, then push
to your repo, and create a PR if necessary. Once the PR is approved,
run:
git push $push HEAD:$b
git fetch $repo
-------------------------------------------------------------------
PUSH

58
bin/git/update-version.sh Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/bash
if [[ $# -ne 3 || "$1" == "--help" || "$1" = "-h" ]]
then
name=$( basename $0 )
cat <<- USAGE
Usage: $name workbranch base/branch version
* workbranch will be created locally from base/branch. If it exists,
it will be reused, so make sure you don't overwrite any work.
* base/branch may be specified as user:branch to allow easy copying
from Github PRs.
USAGE
exit 0
fi
work="$1"
shift
base=$( echo "$1" | sed "s/:/\//" )
shift
version=$1
shift
set -e
git fetch upstreams
git checkout -B "${work}" --no-track "${base}"
push=$( git rev-parse --abbrev-ref --symbolic-full-name '@{push}' \
2>/dev/null ) || true
if [[ "${push}" != "" ]]
then
echo "Warning: ${push} may already exist."
fi
build=$( find -name BuildInfo.cpp )
sed 's/\(^.*versionString =\).*$/\1 "'${version}'"/' ${build} > version.cpp && \
diff "${build}" version.cpp && exit 1 || \
mv -vi version.cpp ${build}
git diff
git add ${build}
git commit -S -m "Set version to ${version}"
git log --oneline --first-parent ${base}^..
cat << PUSH
-------------------------------------------------------------------
This script will not push. Verify everything is correct, then push
to your repo, and create a PR as described in CONTRIBUTING.md.
-------------------------------------------------------------------
PUSH

View File

@@ -1,23 +0,0 @@
#!/usr/bin/node
//
// Returns hex of lowercasing a string.
//
var stringToHex = function (s) {
return Array.prototype.map.call(s, function (c) {
var b = c.charCodeAt(0);
return b < 16 ? "0" + b.toString(16) : b.toString(16);
}).join("");
};
if (3 != process.argv.length) {
process.stderr.write("Usage: " + process.argv[1] + " string\n\nReturns hex of lowercasing string.\n");
process.exit(1);
} else {
process.stdout.write(stringToHex(process.argv[2].toLowerCase()) + "\n");
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,42 +0,0 @@
#!/usr/bin/node
//
// This is a tool to issue JSON-RPC requests from the command line.
//
// This can be used to test a JSON-RPC server.
//
// Requires: npm simple-jsonrpc
//
var jsonrpc = require('simple-jsonrpc');
var program = process.argv[1];
if (5 !== process.argv.length) {
console.log("Usage: %s <URL> <method> <json>", program);
}
else {
var url = process.argv[2];
var method = process.argv[3];
var json_raw = process.argv[4];
var json;
try {
json = JSON.parse(json_raw);
}
catch (e) {
console.log("JSON parse error: %s", e.message);
throw e;
}
var client = jsonrpc.client(url);
client.call(method, json,
function (result) {
console.log(JSON.stringify(result, undefined, 2));
},
function (error) {
console.log(JSON.stringify(error, undefined, 2));
});
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,68 +0,0 @@
#!/usr/bin/node
//
// This is a tool to listen for JSON-RPC requests at an IP and port.
//
// This will report the request to console and echo back the request as the response.
//
var http = require("http");
var program = process.argv[1];
if (4 !== process.argv.length) {
console.log("Usage: %s <ip> <port>", program);
}
else {
var ip = process.argv[2];
var port = process.argv[3];
var server = http.createServer(function (req, res) {
console.log("CONNECT");
var input = "";
req.setEncoding();
req.on('data', function (buffer) {
// console.log("DATA: %s", buffer);
input = input + buffer;
});
req.on('end', function () {
// console.log("END");
var json_req;
console.log("URL: %s", req.url);
console.log("HEADERS: %s", JSON.stringify(req.headers, undefined, 2));
try {
json_req = JSON.parse(input);
console.log("REQ: %s", JSON.stringify(json_req, undefined, 2));
}
catch (e) {
console.log("BAD JSON: %s", e.message);
json_req = { error : e.message }
}
res.statusCode = 200;
res.end(JSON.stringify({
jsonrpc: "2.0",
result: { request : json_req },
id: req.id
}));
});
req.on('close', function () {
console.log("CLOSE");
});
});
server.listen(port, ip, undefined,
function () {
console.log("Listening at: %s:%s", ip, port);
});
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,6 +0,0 @@
#!/bin/sh -x
cd ~/NewCoin
git pull
scons -j 2
cp -p newcoind bin/

View File

@@ -1,10 +0,0 @@
#!/bin/sh
# XXX Should not need to make db directory. newcoind should do this.
for SITE in $HOSTS
do
echo "Clearing db for:" $SITE
DB_DIR="/var/www/$SITE/db/"
mkdir -p "/var/www/$SITE/db/"
rm -rf "/var/www/$SITE/db/*"
done

View File

@@ -1,5 +0,0 @@
#!/bin/sh -x
network-stop
sleep 1
network-start

View File

@@ -1,6 +0,0 @@
#!/bin/sh
for SITE in $HOSTS
do
(nx $SITE &)
done

View File

@@ -1,6 +0,0 @@
#!/bin/sh
for SITE in $HOSTS
do
(nx $SITE stop &)
done

View File

@@ -1,5 +0,0 @@
#!/bin/sh -x
echo "Building and restarting."
network-build
network-restart

7
bin/nx
View File

@@ -1,7 +0,0 @@
#!/bin/sh
SITE=$1
shift
COMMAND=$@
cd "/var/www/$SITE"
newcoind $COMMAND

View File

@@ -1,252 +0,0 @@
#!/usr/bin/node
var async = require('async');
var Remote = require('ripple-lib').Remote;
var Transaction = require('ripple-lib').Transaction;
var UInt160 = require('ripple-lib').UInt160;
var Amount = require('ripple-lib').Amount;
var book_key = function (book) {
return book.taker_pays.currency
+ ":" + book.taker_pays.issuer
+ ":" + book.taker_gets.currency
+ ":" + book.taker_gets.issuer;
};
var book_key_cross = function (book) {
return book.taker_gets.currency
+ ":" + book.taker_gets.issuer
+ ":" + book.taker_pays.currency
+ ":" + book.taker_pays.issuer;
};
var ledger_verify = function (ledger) {
var dir_nodes = ledger.accountState.filter(function (entry) {
return entry.LedgerEntryType === 'DirectoryNode' // Only directories
&& entry.index === entry.RootIndex // Only root nodes
&& 'TakerGetsCurrency' in entry; // Only offer directories
});
var books = {};
dir_nodes.forEach(function (node) {
var book = {
taker_gets: {
currency: UInt160.from_generic(node.TakerGetsCurrency).to_json(),
issuer: UInt160.from_generic(node.TakerGetsIssuer).to_json()
},
taker_pays: {
currency: UInt160.from_generic(node.TakerPaysCurrency).to_json(),
issuer: UInt160.from_generic(node.TakerPaysIssuer).to_json()
},
quality: Amount.from_quality(node.RootIndex),
index: node.RootIndex
};
books[book_key(book)] = book;
// console.log(JSON.stringify(node, undefined, 2));
});
// console.log(JSON.stringify(dir_entry, undefined, 2));
console.log("#%s books: %s", ledger.ledger_index, Object.keys(books).length);
Object.keys(books).forEach(function (key) {
var book = books[key];
var key_cross = book_key_cross(book);
var book_cross = books[key_cross];
if (book && book_cross && !book_cross.done)
{
var book_cross_quality_inverted = Amount.from_json("1.0/1/1").divide(book_cross.quality);
if (book_cross_quality_inverted.compareTo(book.quality) >= 0)
{
// Crossing books
console.log("crossing: #%s :: %s :: %s :: %s :: %s :: %s :: %s", ledger.ledger_index, key, book.quality.to_text(), book_cross.quality.to_text(), book_cross_quality_inverted.to_text(),
book.index, book_cross.index);
}
book_cross.done = true;
}
});
var ripple_selfs = {};
var accounts = {};
var counts = {};
ledger.accountState.forEach(function (entry) {
if (entry.LedgerEntryType === 'Offer')
{
counts[entry.Account] = (counts[entry.Account] || 0) + 1;
}
else if (entry.LedgerEntryType === 'RippleState')
{
if (entry.Flags & (0x10000 | 0x40000))
{
counts[entry.LowLimit.issuer] = (counts[entry.LowLimit.issuer] || 0) + 1;
}
if (entry.Flags & (0x20000 | 0x80000))
{
counts[entry.HighLimit.issuer] = (counts[entry.HighLimit.issuer] || 0) + 1;
}
if (entry.HighLimit.issuer === entry.LowLimit.issuer)
ripple_selfs[entry.Account] = entry;
}
else if (entry.LedgerEntryType == 'AccountRoot')
{
accounts[entry.Account] = entry;
}
});
var low = 0; // Accounts with too low a count.
var high = 0;
var missing_accounts = 0; // Objects with no referencing account.
var missing_objects = 0; // Accounts specifying an object but having none.
Object.keys(counts).forEach(function (account) {
if (account in accounts)
{
if (counts[account] !== accounts[account].OwnerCount)
{
if (counts[account] < accounts[account].OwnerCount)
{
high += 1;
console.log("%s: high count %s/%s", account, counts[account], accounts[account].OwnerCount);
}
else
{
low += 1;
console.log("%s: low count %s/%s", account, counts[account], accounts[account].OwnerCount);
}
}
}
else
{
missing_accounts += 1;
console.log("%s: missing : count %s", account, counts[account]);
}
});
Object.keys(accounts).forEach(function (account) {
if (!('OwnerCount' in accounts[account]))
{
console.log("%s: bad entry : %s", account, JSON.stringify(accounts[account], undefined, 2));
}
else if (!(account in counts) && accounts[account].OwnerCount)
{
missing_objects += 1;
console.log("%s: no objects : %s/%s", account, 0, accounts[account].OwnerCount);
}
});
if (low)
console.log("counts too low = %s", low);
if (high)
console.log("counts too high = %s", high);
if (missing_objects)
console.log("missing_objects = %s", missing_objects);
if (missing_accounts)
console.log("missing_accounts = %s", missing_accounts);
if (Object.keys(ripple_selfs).length)
console.log("RippleState selfs = %s", Object.keys(ripple_selfs).length);
};
var ledger_request = function (remote, ledger_index, done) {
remote.request_ledger(undefined, {
accounts: true,
expand: true,
})
.ledger_index(ledger_index)
.on('success', function (m) {
// console.log("ledger: ", ledger_index);
// console.log("ledger: ", JSON.stringify(m, undefined, 2));
done(m.ledger);
})
.on('error', function (m) {
console.log("error");
done();
})
.request();
};
var usage = function () {
console.log("rlint.js _websocket_ip_ _websocket_port_ ");
};
var finish = function (remote) {
remote.disconnect();
// XXX Because remote.disconnect() doesn't work:
process.exit();
};
console.log("args: ", process.argv.length);
console.log("args: ", process.argv);
if (process.argv.length < 4) {
usage();
}
else {
var remote = Remote.from_config({
websocket_ip: process.argv[2],
websocket_port: process.argv[3],
})
.once('ledger_closed', function (m) {
console.log("ledger_closed: ", JSON.stringify(m, undefined, 2));
if (process.argv.length === 5) {
var ledger_index = process.argv[4];
ledger_request(remote, ledger_index, function (l) {
if (l) {
ledger_verify(l);
}
finish(remote);
});
} else if (process.argv.length === 6) {
var ledger_start = Number(process.argv[4]);
var ledger_end = Number(process.argv[5]);
var ledger_cursor = ledger_end;
async.whilst(
function () {
return ledger_start <= ledger_cursor && ledger_cursor <=ledger_end;
},
function (callback) {
// console.log(ledger_cursor);
ledger_request(remote, ledger_cursor, function (l) {
if (l) {
ledger_verify(l);
}
--ledger_cursor;
callback();
});
},
function (error) {
finish(remote);
});
} else {
finish(remote);
}
})
.connect();
}
// vim:sw=2:sts=2:ts=8:et

View File

@@ -1,119 +0,0 @@
/**
* bin/update_bintypes.js
*
* This unholy abomination of a script generates the JavaScript file
* src/js/bintypes.js from various parts of the C++ source code.
*
* This should *NOT* be part of any automatic build process unless the C++
* source data are brought into a more easily parseable format. Until then,
* simply run this script manually and fix as needed.
*/
// XXX: Process LedgerFormats.(h|cpp) as well.
var filenameProto = __dirname + '/../src/cpp/ripple/SerializeProto.h',
filenameTxFormatsH = __dirname + '/../src/cpp/ripple/TransactionFormats.h',
filenameTxFormats = __dirname + '/../src/cpp/ripple/TransactionFormats.cpp';
var fs = require('fs');
var output = [];
// Stage 1: Get the field types and codes from SerializeProto.h
var types = {},
fields = {};
String(fs.readFileSync(filenameProto)).split('\n').forEach(function (line) {
line = line.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '');
if (!line.length || line.slice(0, 2) === '//' || line.slice(-1) !== ')') return;
var tmp = line.slice(0, -1).split('('),
type = tmp[0],
opts = tmp[1].split(',');
if (type === 'TYPE') types[opts[1]] = [opts[0], +opts[2]];
else if (type === 'FIELD') fields[opts[0]] = [types[opts[1]][0], +opts[2]];
});
output.push('var ST = require("./serializedtypes");');
output.push('');
output.push('var REQUIRED = exports.REQUIRED = 0,');
output.push(' OPTIONAL = exports.OPTIONAL = 1,');
output.push(' DEFAULT = exports.DEFAULT = 2;');
output.push('');
function pad(s, n) { while (s.length < n) s += ' '; return s; }
function padl(s, n) { while (s.length < n) s = ' '+s; return s; }
Object.keys(types).forEach(function (type) {
output.push(pad('ST.'+types[type][0]+'.id', 25) + ' = '+types[type][1]+';');
});
output.push('');
// Stage 2: Get the transaction type IDs from TransactionFormats.h
var ttConsts = {};
String(fs.readFileSync(filenameTxFormatsH)).split('\n').forEach(function (line) {
var regex = /tt([A-Z_]+)\s+=\s+([0-9-]+)/;
var match = line.match(regex);
if (match) ttConsts[match[1]] = +match[2];
});
// Stage 3: Get the transaction formats from TransactionFormats.cpp
var base = [],
sections = [],
current = base;
String(fs.readFileSync(filenameTxFormats)).split('\n').forEach(function (line) {
line = line.replace(/^\s+|\s+$/g, '').replace(/\s+/g, '');
var d_regex = /DECLARE_TF\(([A-Za-z]+),tt([A-Z_]+)/;
var d_match = line.match(d_regex);
var s_regex = /SOElement\(sf([a-z]+),SOE_(REQUIRED|OPTIONAL|DEFAULT)/i;
var s_match = line.match(s_regex);
if (d_match) sections.push(current = [d_match[1], ttConsts[d_match[2]]]);
else if (s_match) current.push([s_match[1], s_match[2]]);
});
function removeFinalComma(arr) {
arr[arr.length-1] = arr[arr.length-1].slice(0, -1);
}
output.push('var base = [');
base.forEach(function (field) {
var spec = fields[field[0]];
output.push(' [ '+
pad("'"+field[0]+"'", 21)+', '+
pad(field[1], 8)+', '+
padl(""+spec[1], 2)+', '+
'ST.'+pad(spec[0], 3)+
' ],');
});
removeFinalComma(output);
output.push('];');
output.push('');
output.push('exports.tx = {');
sections.forEach(function (section) {
var name = section.shift(),
ttid = section.shift();
output.push(' '+name+': ['+ttid+'].concat(base, [');
section.forEach(function (field) {
var spec = fields[field[0]];
output.push(' [ '+
pad("'"+field[0]+"'", 21)+', '+
pad(field[1], 8)+', '+
padl(""+spec[1], 2)+', '+
'ST.'+pad(spec[0], 3)+
' ],');
});
removeFinalComma(output);
output.push(' ]),');
});
removeFinalComma(output);
output.push('};');
output.push('');
console.log(output.join('\n'));

1507
cfg/rippled-example.cfg Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,90 @@
#
# Default validators.txt
#
# This file is located in the same folder as your rippled.cfg file
# and defines which validators your server trusts not to collude.
#
# This file is UTF-8 with DOS, UNIX, or Mac style line endings.
# Blank lines and lines starting with a '#' are ignored.
#
#
#
# [validators]
#
# List of the validation public keys of nodes to always accept as validators.
#
# Manually listing validator keys is not recommended for production networks.
# See validator_list_sites and validator_list_keys below.
#
# Examples:
# n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5
# n9MqiExBcoG19UXwoLjBJnhsxEhAZMuWwJDRdkyDz1EkEkwzQTNt
#
# [validator_list_sites]
#
# List of URIs serving lists of recommended validators.
#
# Examples:
# https://vl.ripple.com
# https://unl.xrplf.org
# http://127.0.0.1:8000
# file:///etc/opt/ripple/vl.txt
#
# [validator_list_keys]
#
# List of keys belonging to trusted validator list publishers.
# Validator lists fetched from configured sites will only be considered
# if the list is accompanied by a valid signature from a trusted
# publisher key.
# Validator list keys should be hex-encoded.
#
# Examples:
# ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734
# ED307A760EE34F2D0CAA103377B1969117C38B8AA0AA1E2A24DAC1F32FC97087ED
#
# The default validator list publishers that the rippled instance
# trusts.
#
# WARNING: Changing these values can cause your rippled instance to see a
# validated ledger that contradicts other rippled instances'
# validated ledgers (aka a ledger fork) if your validator list(s)
# do not sufficiently overlap with the list(s) used by others.
# See: https://arxiv.org/pdf/1802.07242.pdf
[validator_list_sites]
https://vl.ripple.com
https://unl.xrplf.org
[validator_list_keys]
#vl.ripple.com
ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734
#unl.xrplf.org
ED42AEC58B701EEBB77356FFFEC26F83C1F0407263530F068C7C73D392C7E06FD1
# To use the test network (see https://xrpl.org/connect-your-rippled-to-the-xrp-test-net.html),
# use the following configuration instead:
#
# [validator_list_sites]
# https://vl.altnet.rippletest.net
#
# [validator_list_keys]
# ED264807102805220DA0F312E71FC2C69E1552C9C5790F6C25E3729DEB573D5860
# [validator_list_threshold]
#
# Minimum number of validator lists on which a validator must be listed in
# order to be used.
#
# This can be set explicitly to any positive integer number not greater than
# the size of [validator_list_keys]. If it is not set, or set to 0, the
# value will be calculated at startup from the size of [validator_list_keys],
# where the calculation is:
#
# threshold = size(validator_list_keys) < 3
# ? 1
# : floor(size(validator_list_keys) / 2) + 1
[validator_list_threshold]
0

48
cmake/CMakeFuncs.cmake Normal file
View File

@@ -0,0 +1,48 @@
macro(group_sources_in source_dir curdir)
file(GLOB children RELATIVE ${source_dir}/${curdir}
${source_dir}/${curdir}/*)
foreach (child ${children})
if (IS_DIRECTORY ${source_dir}/${curdir}/${child})
group_sources_in(${source_dir} ${curdir}/${child})
else()
string(REPLACE "/" "\\" groupname ${curdir})
source_group(${groupname} FILES
${source_dir}/${curdir}/${child})
endif()
endforeach()
endmacro()
macro(group_sources curdir)
group_sources_in(${PROJECT_SOURCE_DIR} ${curdir})
endmacro()
macro (exclude_from_default target_)
set_target_properties (${target_} PROPERTIES EXCLUDE_FROM_ALL ON)
set_target_properties (${target_} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON)
endmacro ()
macro (exclude_if_included target_)
get_directory_property(has_parent PARENT_DIRECTORY)
if (has_parent)
exclude_from_default (${target_})
endif ()
endmacro ()
find_package(Git)
function (git_branch branch_val)
if (NOT GIT_FOUND)
return ()
endif ()
set (_branch "")
execute_process (COMMAND ${GIT_EXECUTABLE} "rev-parse" "--abbrev-ref" "HEAD"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE _git_exit_code
OUTPUT_VARIABLE _temp_branch
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if (_git_exit_code EQUAL 0)
set (_branch ${_temp_branch})
endif ()
set (${branch_val} "${_branch}" PARENT_SCOPE)
endfunction ()

471
cmake/CodeCoverage.cmake Normal file
View File

@@ -0,0 +1,471 @@
# Copyright (c) 2012 - 2017, Lars Bilke
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# CHANGES:
#
# 2012-01-31, Lars Bilke
# - Enable Code Coverage
#
# 2013-09-17, Joakim Söderberg
# - Added support for Clang.
# - Some additional usage instructions.
#
# 2016-02-03, Lars Bilke
# - Refactored functions to use named parameters
#
# 2017-06-02, Lars Bilke
# - Merged with modified version from github.com/ufz/ogs
#
# 2019-05-06, Anatolii Kurotych
# - Remove unnecessary --coverage flag
#
# 2019-12-13, FeRD (Frank Dana)
# - Deprecate COVERAGE_LCOVR_EXCLUDES and COVERAGE_GCOVR_EXCLUDES lists in favor
# of tool-agnostic COVERAGE_EXCLUDES variable, or EXCLUDE setup arguments.
# - CMake 3.4+: All excludes can be specified relative to BASE_DIRECTORY
# - All setup functions: accept BASE_DIRECTORY, EXCLUDE list
# - Set lcov basedir with -b argument
# - Add automatic --demangle-cpp in lcovr, if 'c++filt' is available (can be
# overridden with NO_DEMANGLE option in setup_target_for_coverage_lcovr().)
# - Delete output dir, .info file on 'make clean'
# - Remove Python detection, since version mismatches will break gcovr
# - Minor cleanup (lowercase function names, update examples...)
#
# 2019-12-19, FeRD (Frank Dana)
# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets
#
# 2020-01-19, Bob Apthorpe
# - Added gfortran support
#
# 2020-02-17, FeRD (Frank Dana)
# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters
# in EXCLUDEs, and remove manual escaping from gcovr targets
#
# 2021-01-19, Robin Mueller
# - Add CODE_COVERAGE_VERBOSE option which will allow to print out commands which are run
# - Added the option for users to set the GCOVR_ADDITIONAL_ARGS variable to supply additional
# flags to the gcovr command
#
# 2020-05-04, Mihchael Davis
# - Add -fprofile-abs-path to make gcno files contain absolute paths
# - Fix BASE_DIRECTORY not working when defined
# - Change BYPRODUCT from folder to index.html to stop ninja from complaining about double defines
#
# 2021-05-10, Martin Stump
# - Check if the generator is multi-config before warning about non-Debug builds
#
# 2022-02-22, Marko Wehle
# - Change gcovr output from -o <filename> for --xml <filename> and --html <filename> output respectively.
# This will allow for Multiple Output Formats at the same time by making use of GCOVR_ADDITIONAL_ARGS, e.g. GCOVR_ADDITIONAL_ARGS "--txt".
#
# 2022-09-28, Sebastian Mueller
# - fix append_coverage_compiler_flags_to_target to correctly add flags
# - replace "-fprofile-arcs -ftest-coverage" with "--coverage" (equivalent)
#
# 2024-01-04, Bronek Kozicki
# - remove setup_target_for_coverage_lcov (slow) and setup_target_for_coverage_fastcov (no support for Clang)
# - fix Clang support by adding find_program( ... llvm-cov )
# - add Apple Clang support by adding execute_process( COMMAND xcrun -f llvm-cov ... )
# - add CODE_COVERAGE_GCOV_TOOL to explicitly select gcov tool and disable find_program
# - replace both functions setup_target_for_coverage_gcovr_* with a single setup_target_for_coverage_gcovr
# - add support for all gcovr output formats
#
# 2024-04-03, Bronek Kozicki
# - add support for output formats: jacoco, clover, lcov
#
# 2025-05-12, Jingchen Wu
# - add -fprofile-update=atomic to ensure atomic profile generation
#
# 2025-08-28, Bronek Kozicki
# - fix "At least one COMMAND must be given" CMake warning from policy CMP0175
#
# USAGE:
#
# 1. Copy this file into your cmake modules path.
#
# 2. Add the following line to your CMakeLists.txt (best inside an if-condition
# using a CMake option() to enable it just optionally):
# include(CodeCoverage)
#
# 3. Append necessary compiler flags for all supported source files:
# append_coverage_compiler_flags()
# Or for specific target:
# append_coverage_compiler_flags_to_target(YOUR_TARGET_NAME)
#
# 3.a (OPTIONAL) Set appropriate optimization flags, e.g. -O0, -O1 or -Og
#
# 4. If you need to exclude additional directories from the report, specify them
# using full paths in the COVERAGE_EXCLUDES variable before calling
# setup_target_for_coverage_*().
# Example:
# set(COVERAGE_EXCLUDES
# '${PROJECT_SOURCE_DIR}/src/dir1/*'
# '/path/to/my/src/dir2/*')
# Or, use the EXCLUDE argument to setup_target_for_coverage_*().
# Example:
# setup_target_for_coverage_gcovr(
# NAME coverage
# EXECUTABLE testrunner
# EXCLUDE "${PROJECT_SOURCE_DIR}/src/dir1/*" "/path/to/my/src/dir2/*")
#
# 4.a NOTE: With CMake 3.4+, COVERAGE_EXCLUDES or EXCLUDE can also be set
# relative to the BASE_DIRECTORY (default: PROJECT_SOURCE_DIR)
# Example:
# set(COVERAGE_EXCLUDES "dir1/*")
# setup_target_for_coverage_gcovr(
# NAME coverage
# EXECUTABLE testrunner
# FORMAT html-details
# BASE_DIRECTORY "${PROJECT_SOURCE_DIR}/src"
# EXCLUDE "dir2/*")
#
# 4.b If you need to pass specific options to gcovr, specify them in
# GCOVR_ADDITIONAL_ARGS variable.
# Example:
# set (GCOVR_ADDITIONAL_ARGS --exclude-throw-branches --exclude-noncode-lines -s)
# setup_target_for_coverage_gcovr(
# NAME coverage
# EXECUTABLE testrunner
# EXCLUDE "src/dir1" "src/dir2")
#
# 5. Use the functions described below to create a custom make target which
# runs your test executable and produces a code coverage report.
#
# 6. Build a Debug build:
# cmake -DCMAKE_BUILD_TYPE=Debug ..
# make
# make my_coverage_target
include(CMakeParseArguments)
option(CODE_COVERAGE_VERBOSE "Verbose information" FALSE)
# Check prereqs
find_program( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/scripts/test)
if(DEFINED CODE_COVERAGE_GCOV_TOOL)
set(GCOV_TOOL "${CODE_COVERAGE_GCOV_TOOL}")
elseif(DEFINED ENV{CODE_COVERAGE_GCOV_TOOL})
set(GCOV_TOOL "$ENV{CODE_COVERAGE_GCOV_TOOL}")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if(APPLE)
execute_process( COMMAND xcrun -f llvm-cov
OUTPUT_VARIABLE LLVMCOV_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
find_program( LLVMCOV_PATH llvm-cov )
endif()
if(LLVMCOV_PATH)
set(GCOV_TOOL "${LLVMCOV_PATH} gcov")
endif()
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
find_program( GCOV_PATH gcov )
set(GCOV_TOOL "${GCOV_PATH}")
endif()
# Check supported compiler (Clang, GNU and Flang)
get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(LANG ${LANGUAGES})
if("${CMAKE_${LANG}_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
if("${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS 3)
message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
endif()
elseif(NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES "GNU"
AND NOT "${CMAKE_${LANG}_COMPILER_ID}" MATCHES "(LLVM)?[Ff]lang")
message(FATAL_ERROR "Compiler is not GNU or Flang! Aborting...")
endif()
endforeach()
set(COVERAGE_COMPILER_FLAGS "-g --coverage"
CACHE INTERNAL "")
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
include(CheckCXXCompilerFlag)
include(CheckCCompilerFlag)
check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)
if(HAVE_cxx_fprofile_abs_path)
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif()
check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)
if(HAVE_c_fprofile_abs_path)
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
endif()
check_cxx_compiler_flag(-fprofile-update HAVE_cxx_fprofile_update)
if(HAVE_cxx_fprofile_update)
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
endif()
check_c_compiler_flag(-fprofile-update HAVE_c_fprofile_update)
if(HAVE_c_fprofile_update)
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
endif()
endif()
set(CMAKE_Fortran_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the Fortran compiler during coverage builds."
FORCE )
set(CMAKE_CXX_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
set(CMAKE_C_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
mark_as_advanced(
CMAKE_Fortran_FLAGS_COVERAGE
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG))
message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
endif() # NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR GENERATOR_IS_MULTI_CONFIG)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
link_libraries(gcov)
endif()
# Defines a target for running and collection code coverage information
# Builds dependencies, runs the given executable and outputs reports.
# NOTE! The executable should always have a ZERO as exit code otherwise
# the coverage generation will not complete.
#
# setup_target_for_coverage_gcovr(
# NAME ctest_coverage # New target name
# EXECUTABLE ctest -j ${PROCESSOR_COUNT} # Executable in PROJECT_BINARY_DIR
# DEPENDENCIES executable_target # Dependencies to build first
# BASE_DIRECTORY "../" # Base directory for report
# # (defaults to PROJECT_SOURCE_DIR)
# FORMAT "cobertura" # Output format, one of:
# # xml cobertura sonarqube jacoco clover
# # json-summary json-details coveralls csv
# # txt html-single html-nested html-details
# # lcov (xml is an alias to cobertura;
# # if no format is set, defaults to xml)
# EXCLUDE "src/dir1/*" "src/dir2/*" # Patterns to exclude (can be relative
# # to BASE_DIRECTORY, with CMake 3.4+)
# )
# The user can set the variable GCOVR_ADDITIONAL_ARGS to supply additional flags to the
# GCVOR command.
function(setup_target_for_coverage_gcovr)
set(options NONE)
set(oneValueArgs BASE_DIRECTORY NAME FORMAT)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT GCOV_TOOL)
message(FATAL_ERROR "Could not find gcov or llvm-cov tool! Aborting...")
endif()
if(NOT GCOVR_PATH)
message(FATAL_ERROR "Could not find gcovr tool! Aborting...")
endif()
# Set base directory (as absolute path), or default to PROJECT_SOURCE_DIR
if(DEFINED Coverage_BASE_DIRECTORY)
get_filename_component(BASEDIR ${Coverage_BASE_DIRECTORY} ABSOLUTE)
else()
set(BASEDIR ${PROJECT_SOURCE_DIR})
endif()
if(NOT DEFINED Coverage_FORMAT)
set(Coverage_FORMAT xml)
endif()
if("--output" IN_LIST GCOVR_ADDITIONAL_ARGS)
message(FATAL_ERROR "Unsupported --output option detected in GCOVR_ADDITIONAL_ARGS! Aborting...")
else()
if((Coverage_FORMAT STREQUAL "html-details")
OR (Coverage_FORMAT STREQUAL "html-nested"))
set(GCOVR_OUTPUT_FILE ${PROJECT_BINARY_DIR}/${Coverage_NAME}/index.html)
set(GCOVR_CREATE_FOLDER ${PROJECT_BINARY_DIR}/${Coverage_NAME})
elseif(Coverage_FORMAT STREQUAL "html-single")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.html)
elseif((Coverage_FORMAT STREQUAL "json-summary")
OR (Coverage_FORMAT STREQUAL "json-details")
OR (Coverage_FORMAT STREQUAL "coveralls"))
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.json)
elseif(Coverage_FORMAT STREQUAL "txt")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.txt)
elseif(Coverage_FORMAT STREQUAL "csv")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.csv)
elseif(Coverage_FORMAT STREQUAL "lcov")
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.lcov)
else()
set(GCOVR_OUTPUT_FILE ${Coverage_NAME}.xml)
endif()
endif()
if((Coverage_FORMAT STREQUAL "cobertura")
OR (Coverage_FORMAT STREQUAL "xml"))
list(APPEND GCOVR_ADDITIONAL_ARGS --cobertura "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --cobertura-pretty )
set(Coverage_FORMAT cobertura) # overwrite xml
elseif(Coverage_FORMAT STREQUAL "sonarqube")
list(APPEND GCOVR_ADDITIONAL_ARGS --sonarqube "${GCOVR_OUTPUT_FILE}" )
elseif(Coverage_FORMAT STREQUAL "jacoco")
list(APPEND GCOVR_ADDITIONAL_ARGS --jacoco "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --jacoco-pretty )
elseif(Coverage_FORMAT STREQUAL "clover")
list(APPEND GCOVR_ADDITIONAL_ARGS --clover "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --clover-pretty )
elseif(Coverage_FORMAT STREQUAL "lcov")
list(APPEND GCOVR_ADDITIONAL_ARGS --lcov "${GCOVR_OUTPUT_FILE}" )
elseif(Coverage_FORMAT STREQUAL "json-summary")
list(APPEND GCOVR_ADDITIONAL_ARGS --json-summary "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --json-summary-pretty)
elseif(Coverage_FORMAT STREQUAL "json-details")
list(APPEND GCOVR_ADDITIONAL_ARGS --json "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --json-pretty)
elseif(Coverage_FORMAT STREQUAL "coveralls")
list(APPEND GCOVR_ADDITIONAL_ARGS --coveralls "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --coveralls-pretty)
elseif(Coverage_FORMAT STREQUAL "csv")
list(APPEND GCOVR_ADDITIONAL_ARGS --csv "${GCOVR_OUTPUT_FILE}" )
elseif(Coverage_FORMAT STREQUAL "txt")
list(APPEND GCOVR_ADDITIONAL_ARGS --txt "${GCOVR_OUTPUT_FILE}" )
elseif(Coverage_FORMAT STREQUAL "html-single")
list(APPEND GCOVR_ADDITIONAL_ARGS --html "${GCOVR_OUTPUT_FILE}" )
list(APPEND GCOVR_ADDITIONAL_ARGS --html-self-contained)
elseif(Coverage_FORMAT STREQUAL "html-nested")
list(APPEND GCOVR_ADDITIONAL_ARGS --html-nested "${GCOVR_OUTPUT_FILE}" )
elseif(Coverage_FORMAT STREQUAL "html-details")
list(APPEND GCOVR_ADDITIONAL_ARGS --html-details "${GCOVR_OUTPUT_FILE}" )
else()
message(FATAL_ERROR "Unsupported output style ${Coverage_FORMAT}! Aborting...")
endif()
# Collect excludes (CMake 3.4+: Also compute absolute paths)
set(GCOVR_EXCLUDES "")
foreach(EXCLUDE ${Coverage_EXCLUDE} ${COVERAGE_EXCLUDES} ${COVERAGE_GCOVR_EXCLUDES})
if(CMAKE_VERSION VERSION_GREATER 3.4)
get_filename_component(EXCLUDE ${EXCLUDE} ABSOLUTE BASE_DIR ${BASEDIR})
endif()
list(APPEND GCOVR_EXCLUDES "${EXCLUDE}")
endforeach()
list(REMOVE_DUPLICATES GCOVR_EXCLUDES)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
# Set up commands which will be run to generate coverage data
# Run tests
set(GCOVR_EXEC_TESTS_CMD
${Coverage_EXECUTABLE} ${Coverage_EXECUTABLE_ARGS}
)
# Create folder
if(DEFINED GCOVR_CREATE_FOLDER)
set(GCOVR_FOLDER_CMD
${CMAKE_COMMAND} -E make_directory ${GCOVR_CREATE_FOLDER})
else()
set(GCOVR_FOLDER_CMD echo) # dummy
endif()
# Running gcovr
set(GCOVR_CMD
${GCOVR_PATH}
--gcov-executable ${GCOV_TOOL}
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file
-r ${BASEDIR}
${GCOVR_ADDITIONAL_ARGS}
${GCOVR_EXCLUDE_ARGS}
--object-directory=${PROJECT_BINARY_DIR}
)
if(CODE_COVERAGE_VERBOSE)
message(STATUS "Executed command report")
message(STATUS "Command to run tests: ")
string(REPLACE ";" " " GCOVR_EXEC_TESTS_CMD_SPACED "${GCOVR_EXEC_TESTS_CMD}")
message(STATUS "${GCOVR_EXEC_TESTS_CMD_SPACED}")
if(NOT GCOVR_FOLDER_CMD STREQUAL "echo")
message(STATUS "Command to create a folder: ")
string(REPLACE ";" " " GCOVR_FOLDER_CMD_SPACED "${GCOVR_FOLDER_CMD}")
message(STATUS "${GCOVR_FOLDER_CMD_SPACED}")
endif()
message(STATUS "Command to generate gcovr coverage data: ")
string(REPLACE ";" " " GCOVR_CMD_SPACED "${GCOVR_CMD}")
message(STATUS "${GCOVR_CMD_SPACED}")
endif()
add_custom_target(${Coverage_NAME}
COMMAND ${GCOVR_EXEC_TESTS_CMD}
COMMAND ${GCOVR_FOLDER_CMD}
COMMAND ${GCOVR_CMD}
BYPRODUCTS ${GCOVR_OUTPUT_FILE}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce code coverage report."
)
# Show info where to find the report
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
COMMAND echo
COMMENT "Code coverage report saved in ${GCOVR_OUTPUT_FILE} formatted as ${Coverage_FORMAT}"
)
endfunction() # setup_target_for_coverage_gcovr
function(append_coverage_compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")
endfunction() # append_coverage_compiler_flags
# Setup coverage for specific library
function(append_coverage_compiler_flags_to_target name)
separate_arguments(_flag_list NATIVE_COMMAND "${COVERAGE_COMPILER_FLAGS}")
target_compile_options(${name} PRIVATE ${_flag_list})
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
target_link_libraries(${name} PRIVATE gcov)
endif()
endfunction()

56
cmake/RippleConfig.cmake Normal file
View File

@@ -0,0 +1,56 @@
include (CMakeFindDependencyMacro)
# need to represent system dependencies of the lib here
#[=========================================================[
Boost
#]=========================================================]
if (static OR APPLE OR MSVC)
set (Boost_USE_STATIC_LIBS ON)
endif ()
set (Boost_USE_MULTITHREADED ON)
if (static OR MSVC)
set (Boost_USE_STATIC_RUNTIME ON)
else ()
set (Boost_USE_STATIC_RUNTIME OFF)
endif ()
find_dependency (Boost 1.70
COMPONENTS
chrono
container
context
coroutine
date_time
filesystem
program_options
regex
system
thread)
#[=========================================================[
OpenSSL
#]=========================================================]
if (NOT DEFINED OPENSSL_ROOT_DIR)
if (DEFINED ENV{OPENSSL_ROOT})
set (OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT})
elseif (APPLE)
find_program (homebrew brew)
if (homebrew)
execute_process (COMMAND ${homebrew} --prefix openssl
OUTPUT_VARIABLE OPENSSL_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif ()
endif ()
file (TO_CMAKE_PATH "${OPENSSL_ROOT_DIR}" OPENSSL_ROOT_DIR)
endif ()
if (static OR APPLE OR MSVC)
set (OPENSSL_USE_STATIC_LIBS ON)
endif ()
set (OPENSSL_MSVC_STATIC_RT ON)
find_dependency (OpenSSL 1.1.1 REQUIRED)
find_dependency (ZLIB)
find_dependency (date)
if (TARGET ZLIB::ZLIB)
set_target_properties(OpenSSL::Crypto PROPERTIES
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
endif ()
include ("${CMAKE_CURRENT_LIST_DIR}/RippleTargets.cmake")

193
cmake/RippledCompiler.cmake Normal file
View File

@@ -0,0 +1,193 @@
#[===================================================================[
setup project-wide compiler settings
#]===================================================================]
#[=========================================================[
TODO some/most of these common settings belong in a
toolchain file, especially the ABI-impacting ones
#]=========================================================]
add_library (common INTERFACE)
add_library (Ripple::common ALIAS common)
# add a single global dependency on this interface lib
link_libraries (Ripple::common)
set_target_properties (common
PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_EXTENSIONS OFF)
target_compile_definitions (common
INTERFACE
$<$<CONFIG:Debug>:DEBUG _DEBUG>
#[===[
NOTE: CMAKE release builds already have NDEBUG defined, so no need to add it
explicitly except for the special case of (profile ON) and (assert OFF).
Presumably this is because we don't want profile builds asserting unless
asserts were specifically requested.
]===]
$<$<AND:$<BOOL:${profile}>,$<NOT:$<BOOL:${assert}>>>:NDEBUG>
# TODO: Remove once we have migrated functions from OpenSSL 1.x to 3.x.
OPENSSL_SUPPRESS_DEPRECATED
)
if (MSVC)
# remove existing exception flag since we set it to -EHa
string (REGEX REPLACE "[-/]EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
foreach (var_
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE)
# also remove dynamic runtime
string (REGEX REPLACE "[-/]MD[d]*" " " ${var_} "${${var_}}")
# /ZI (Edit & Continue debugging information) is incompatible with Gy-
string (REPLACE "/ZI" "/Zi" ${var_} "${${var_}}")
# omit debug info completely under CI (not needed)
if (is_ci)
string (REPLACE "/Zi" " " ${var_} "${${var_}}")
endif ()
endforeach ()
target_compile_options (common
INTERFACE
-bigobj # Increase object file max size
-fp:precise # Floating point behavior
-Gd # __cdecl calling convention
-Gm- # Minimal rebuild: disabled
-Gy- # Function level linking: disabled
-MP # Multiprocessor compilation
-openmp- # pragma omp: disabled
-errorReport:none # No error reporting to Internet
-nologo # Suppress login banner
-wd4018 # Disable signed/unsigned comparison warnings
-wd4244 # Disable float to int possible loss of data warnings
-wd4267 # Disable size_t to T possible loss of data warnings
-wd4800 # Disable C4800(int to bool performance)
-wd4503 # Decorated name length exceeded, name was truncated
$<$<COMPILE_LANGUAGE:CXX>:
-EHa
-GR
>
$<$<CONFIG:Release>:-Ox>
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:Debug>>:
-GS
-Zc:forScope
>
# static runtime
$<$<CONFIG:Debug>:-MTd>
$<$<NOT:$<CONFIG:Debug>>:-MT>
$<$<BOOL:${werr}>:-WX>
)
target_compile_definitions (common
INTERFACE
_WIN32_WINNT=0x6000
_SCL_SECURE_NO_WARNINGS
_CRT_SECURE_NO_WARNINGS
WIN32_CONSOLE
WIN32_LEAN_AND_MEAN
NOMINMAX
# TODO: Resolve these warnings, don't just silence them
_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CONFIG:Debug>>:_CRTDBG_MAP_ALLOC>)
target_link_libraries (common
INTERFACE
-errorreport:none
-machine:X64)
else ()
target_compile_options (common
INTERFACE
-Wall
-Wdeprecated
$<$<BOOL:${is_clang}>:-Wno-deprecated-declarations>
$<$<BOOL:${wextra}>:-Wextra -Wno-unused-parameter>
$<$<BOOL:${werr}>:-Werror>
-fstack-protector
-Wno-sign-compare
-Wno-unused-but-set-variable
$<$<NOT:$<CONFIG:Debug>>:-fno-strict-aliasing>
# tweak gcc optimization for debug
$<$<AND:$<BOOL:${is_gcc}>,$<CONFIG:Debug>>:-O0>
# Add debug symbols to release config
$<$<CONFIG:Release>:-g>)
target_link_libraries (common
INTERFACE
-rdynamic
$<$<BOOL:${is_linux}>:-Wl,-z,relro,-z,now,--build-id>
# link to static libc/c++ iff:
# * static option set and
# * NOT APPLE (AppleClang does not support static libc/c++) and
# * NOT san (sanitizers typically don't work with static libc/c++)
$<$<AND:$<BOOL:${static}>,$<NOT:$<BOOL:${APPLE}>>,$<NOT:$<BOOL:${san}>>>:
-static-libstdc++
-static-libgcc
>)
endif ()
# Antithesis instrumentation will only be built and deployed using machines running Linux.
if (voidstar)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
message(FATAL_ERROR "Antithesis instrumentation requires Debug build type, aborting...")
elseif (NOT is_linux)
message(FATAL_ERROR "Antithesis instrumentation requires Linux, aborting...")
elseif (NOT (is_clang AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0))
message(FATAL_ERROR "Antithesis instrumentation requires Clang version 16 or later, aborting...")
endif ()
endif ()
if (use_mold)
# use mold linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=mold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "mold")
target_link_libraries (common INTERFACE -fuse-ld=mold)
endif ()
unset (LD_VERSION)
elseif (use_gold AND is_gcc)
# use gold linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
#[=========================================================[
NOTE: THE gold linker inserts -rpath as DT_RUNPATH by
default intead of DT_RPATH, so you might have slightly
unexpected runtime ld behavior if you were expecting
DT_RPATH. Specify --disable-new-dtags to gold if you do
not want the default DT_RUNPATH behavior. This rpath
treatment as well as static/dynamic selection means that
gold does not currently have ideal default behavior when
we are using jemalloc. Thus for simplicity we don't use
it when jemalloc is requested. An alternative to
disabling would be to figure out all the settings
required to make gold play nicely with jemalloc.
#]=========================================================]
if (("${LD_VERSION}" MATCHES "GNU gold") AND (NOT jemalloc))
target_link_libraries (common
INTERFACE
-fuse-ld=gold
-Wl,--no-as-needed
#[=========================================================[
see https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1253638/comments/5
DT_RUNPATH does not work great for transitive
dependencies (of which boost has a few) - so just
switch to DT_RPATH if doing dynamic linking with gold
#]=========================================================]
$<$<NOT:$<BOOL:${static}>>:-Wl,--disable-new-dtags>)
endif ()
unset (LD_VERSION)
elseif (use_lld)
# use lld linker if available
execute_process (
COMMAND ${CMAKE_CXX_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "LLD")
target_link_libraries (common INTERFACE -fuse-ld=lld)
endif ()
unset (LD_VERSION)
endif()
if (assert)
foreach (var_ CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
STRING (REGEX REPLACE "[-/]DNDEBUG" "" ${var_} "${${var_}}")
endforeach ()
endif ()

204
cmake/RippledCore.cmake Normal file
View File

@@ -0,0 +1,204 @@
#[===================================================================[
Exported targets.
#]===================================================================]
include(target_protobuf_sources)
# Protocol buffers cannot participate in a unity build,
# because all the generated sources
# define a bunch of `static const` variables with the same names,
# so we just build them as a separate library.
add_library(xrpl.libpb)
set_target_properties(xrpl.libpb PROPERTIES UNITY_BUILD OFF)
target_protobuf_sources(xrpl.libpb xrpl/proto
LANGUAGE cpp
IMPORT_DIRS include/xrpl/proto
PROTOS include/xrpl/proto/ripple.proto
)
file(GLOB_RECURSE protos "include/xrpl/proto/org/*.proto")
target_protobuf_sources(xrpl.libpb xrpl/proto
LANGUAGE cpp
IMPORT_DIRS include/xrpl/proto
PROTOS "${protos}"
)
target_protobuf_sources(xrpl.libpb xrpl/proto
LANGUAGE grpc
IMPORT_DIRS include/xrpl/proto
PROTOS "${protos}"
PLUGIN protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
)
target_compile_options(xrpl.libpb
PUBLIC
$<$<BOOL:${MSVC}>:-wd4996>
$<$<BOOL:${XCODE}>:
--system-header-prefix="google/protobuf"
-Wno-deprecated-dynamic-exception-spec
>
PRIVATE
$<$<BOOL:${MSVC}>:-wd4065>
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
)
target_link_libraries(xrpl.libpb
PUBLIC
protobuf::libprotobuf
gRPC::grpc++
)
# TODO: Clean up the number of library targets later.
add_library(xrpl.imports.main INTERFACE)
target_link_libraries(xrpl.imports.main
INTERFACE
LibArchive::LibArchive
OpenSSL::Crypto
Ripple::boost
Ripple::opts
Ripple::syslibs
absl::random_random
date::date
ed25519::ed25519
secp256k1::secp256k1
xrpl.libpb
xxHash::xxhash
$<$<BOOL:${voidstar}>:antithesis-sdk-cpp>
)
include(add_module)
include(target_link_modules)
# Level 01
add_module(xrpl beast)
target_link_libraries(xrpl.libxrpl.beast PUBLIC
xrpl.imports.main
xrpl.libpb
)
# Level 02
add_module(xrpl basics)
target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast)
# Level 03
add_module(xrpl json)
target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics)
add_module(xrpl crypto)
target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics)
# Level 04
add_module(xrpl protocol)
target_link_libraries(xrpl.libxrpl.protocol PUBLIC
xrpl.libxrpl.crypto
xrpl.libxrpl.json
)
# Level 05
add_module(xrpl resource)
target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol)
# Level 06
add_module(xrpl net)
target_link_libraries(xrpl.libxrpl.net PUBLIC
xrpl.libxrpl.basics
xrpl.libxrpl.json
xrpl.libxrpl.protocol
xrpl.libxrpl.resource
)
add_module(xrpl server)
target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol)
add_library(xrpl.libxrpl)
set_target_properties(xrpl.libxrpl PROPERTIES OUTPUT_NAME xrpl)
add_library(xrpl::libxrpl ALIAS xrpl.libxrpl)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/libxrpl/*.cpp"
)
target_sources(xrpl.libxrpl PRIVATE ${sources})
target_link_modules(xrpl PUBLIC
basics
beast
crypto
json
protocol
resource
server
net
)
# All headers in libxrpl are in modules.
# Uncomment this stanza if you have not yet moved new headers into a module.
# target_include_directories(xrpl.libxrpl
# PRIVATE
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
# PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<INSTALL_INTERFACE:include>)
if(xrpld)
add_executable(rippled)
if(tests)
target_compile_definitions(rippled PUBLIC ENABLE_TESTS)
target_compile_definitions(rippled PRIVATE
UNIT_TEST_REFERENCE_FEE=${UNIT_TEST_REFERENCE_FEE}
)
endif()
target_include_directories(rippled
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/xrpld/*.cpp"
)
target_sources(rippled PRIVATE ${sources})
if(tests)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/test/*.cpp"
)
target_sources(rippled PRIVATE ${sources})
endif()
target_link_libraries(rippled
Ripple::boost
Ripple::opts
Ripple::libs
xrpl.libxrpl
)
exclude_if_included(rippled)
# define a macro for tests that might need to
# be exluded or run differently in CI environment
if(is_ci)
target_compile_definitions(rippled PRIVATE RIPPLED_RUNNING_IN_CI)
endif ()
if(voidstar)
target_compile_options(rippled
PRIVATE
-fsanitize-coverage=trace-pc-guard
)
# rippled requires access to antithesis-sdk-cpp implementation file
# antithesis_instrumentation.h, which is not exported as INTERFACE
target_include_directories(rippled
PRIVATE
${CMAKE_SOURCE_DIR}/external/antithesis-sdk
)
endif()
# any files that don't play well with unity should be added here
if(tests)
set_source_files_properties(
# these two seem to produce conflicts in beast teardown template methods
src/test/rpc/ValidatorRPC_test.cpp
src/test/ledger/Invariants_test.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
endif()
endif()

38
cmake/RippledCov.cmake Normal file
View File

@@ -0,0 +1,38 @@
#[===================================================================[
coverage report target
#]===================================================================]
if(NOT coverage)
message(FATAL_ERROR "Code coverage not enabled! Aborting ...")
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
message(WARNING "Code coverage on Windows is not supported, ignoring 'coverage' flag")
return()
endif()
include(CodeCoverage)
# The instructions for these commands come from the `CodeCoverage` module,
# which was copied from https://github.com/bilke/cmake-modules, commit fb7d2a3,
# then locally changed (see CHANGES: section in `CodeCoverage.cmake`)
set(GCOVR_ADDITIONAL_ARGS ${coverage_extra_args})
if(NOT GCOVR_ADDITIONAL_ARGS STREQUAL "")
separate_arguments(GCOVR_ADDITIONAL_ARGS)
endif()
list(APPEND GCOVR_ADDITIONAL_ARGS
--exclude-throw-branches
--exclude-noncode-lines
--exclude-unreachable-branches -s
-j ${coverage_test_parallelism})
setup_target_for_coverage_gcovr(
NAME coverage
FORMAT ${coverage_format}
EXECUTABLE rippled
EXECUTABLE_ARGS --unittest$<$<BOOL:${coverage_test}>:=${coverage_test}> --unittest-jobs ${coverage_test_parallelism} --quiet --unittest-log
EXCLUDE "src/test" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb"
DEPENDENCIES rippled
)

85
cmake/RippledDocs.cmake Normal file
View File

@@ -0,0 +1,85 @@
#[===================================================================[
docs target (optional)
#]===================================================================]
option(with_docs "Include the docs target?" FALSE)
if(NOT (with_docs OR only_docs))
return()
endif()
find_package(Doxygen)
if(NOT TARGET Doxygen::doxygen)
message(STATUS "doxygen executable not found -- skipping docs target")
return()
endif()
set(doxygen_output_directory "${CMAKE_BINARY_DIR}/docs")
set(doxygen_include_path "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(doxygen_index_file "${doxygen_output_directory}/html/index.html")
set(doxyfile "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile")
file(GLOB_RECURSE doxygen_input
docs/*.md
include/*.h
include/*.cpp
include/*.md
src/*.h
src/*.cpp
src/*.md
Builds/*.md
*.md)
list(APPEND doxygen_input
external/README.md
)
set(dependencies "${doxygen_input}" "${doxyfile}")
function(verbose_find_path variable name)
# find_path sets a CACHE variable, so don't try using a "local" variable.
find_path(${variable} "${name}" ${ARGN})
if(NOT ${variable})
message(NOTICE "could not find ${name}")
else()
message(STATUS "found ${name}: ${${variable}}/${name}")
endif()
endfunction()
verbose_find_path(doxygen_plantuml_jar_path plantuml.jar PATH_SUFFIXES share/plantuml)
verbose_find_path(doxygen_dot_path dot)
# https://en.cppreference.com/w/Cppreference:Archives
# https://stackoverflow.com/questions/60822559/how-to-move-a-file-download-from-configure-step-to-build-step
set(download_script "${CMAKE_BINARY_DIR}/docs/download-cppreference.cmake")
file(WRITE
"${download_script}"
"file(DOWNLOAD \
https://github.com/PeterFeicht/cppreference-doc/releases/download/v20250209/html-book-20250209.zip \
${CMAKE_BINARY_DIR}/docs/cppreference.zip \
EXPECTED_HASH MD5=bda585f72fbca4b817b29a3d5746567b \
)\n \
execute_process( \
COMMAND \"${CMAKE_COMMAND}\" -E tar -xf cppreference.zip \
)\n"
)
set(tagfile "${CMAKE_BINARY_DIR}/docs/cppreference-doxygen-web.tag.xml")
add_custom_command(
OUTPUT "${tagfile}"
COMMAND "${CMAKE_COMMAND}" -P "${download_script}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs"
)
set(doxygen_tagfiles "${tagfile}=http://en.cppreference.com/w/")
add_custom_command(
OUTPUT "${doxygen_index_file}"
COMMAND "${CMAKE_COMMAND}" -E env
"DOXYGEN_OUTPUT_DIRECTORY=${doxygen_output_directory}"
"DOXYGEN_INCLUDE_PATH=${doxygen_include_path}"
"DOXYGEN_TAGFILES=${doxygen_tagfiles}"
"DOXYGEN_PLANTUML_JAR_PATH=${doxygen_plantuml_jar_path}"
"DOXYGEN_DOT_PATH=${doxygen_dot_path}"
"${DOXYGEN_EXECUTABLE}" "${doxyfile}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS "${dependencies}" "${tagfile}")
add_custom_target(docs
DEPENDS "${doxygen_index_file}"
SOURCES "${dependencies}")

View File

@@ -0,0 +1,82 @@
#[===================================================================[
install stuff
#]===================================================================]
include(create_symbolic_link)
install (
TARGETS
common
opts
ripple_syslibs
ripple_boost
xrpl.imports.main
xrpl.libpb
xrpl.libxrpl.basics
xrpl.libxrpl.beast
xrpl.libxrpl.crypto
xrpl.libxrpl.json
xrpl.libxrpl.protocol
xrpl.libxrpl.resource
xrpl.libxrpl.server
xrpl.libxrpl.net
xrpl.libxrpl
antithesis-sdk-cpp
EXPORT RippleExports
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)
install(
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/xrpl"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(CODE "
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
include(create_symbolic_link)
create_symbolic_link(xrpl \
\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/ripple)
")
install (EXPORT RippleExports
FILE RippleTargets.cmake
NAMESPACE Ripple::
DESTINATION lib/cmake/ripple)
include (CMakePackageConfigHelpers)
write_basic_package_version_file (
RippleConfigVersion.cmake
VERSION ${rippled_version}
COMPATIBILITY SameMajorVersion)
if (is_root_project AND TARGET rippled)
install (TARGETS rippled RUNTIME DESTINATION bin)
set_target_properties(rippled PROPERTIES INSTALL_RPATH_USE_LINK_PATH ON)
# sample configs should not overwrite existing files
# install if-not-exists workaround as suggested by
# https://cmake.org/Bug/view.php?id=12646
install(CODE "
macro (copy_if_not_exists SRC DEST NEWNAME)
if (NOT EXISTS \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
file (INSTALL FILE_PERMISSIONS OWNER_READ OWNER_WRITE DESTINATION \"\${CMAKE_INSTALL_PREFIX}/\${DEST}\" FILES \"\${SRC}\" RENAME \"\${NEWNAME}\")
else ()
message (\"-- Skipping : \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/\${DEST}/\${NEWNAME}\")
endif ()
endmacro()
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/rippled-example.cfg\" etc rippled.cfg)
copy_if_not_exists(\"${CMAKE_CURRENT_SOURCE_DIR}/cfg/validators-example.txt\" etc validators.txt)
")
install(CODE "
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
include(create_symbolic_link)
create_symbolic_link(rippled${suffix} \
\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix})
")
endif ()
install (
FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/RippleConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/RippleConfigVersion.cmake
DESTINATION lib/cmake/ripple)

View File

@@ -0,0 +1,101 @@
#[===================================================================[
rippled compile options/settings via an interface library
#]===================================================================]
add_library (opts INTERFACE)
add_library (Ripple::opts ALIAS opts)
target_compile_definitions (opts
INTERFACE
BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS
BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT
BOOST_CONTAINER_FWD_BAD_DEQUE
HAS_UNCAUGHT_EXCEPTIONS=1
$<$<BOOL:${boost_show_deprecated}>:
BOOST_ASIO_NO_DEPRECATED
BOOST_FILESYSTEM_NO_DEPRECATED
>
$<$<NOT:$<BOOL:${boost_show_deprecated}>>:
BOOST_COROUTINES_NO_DEPRECATION_WARNING
BOOST_BEAST_ALLOW_DEPRECATED
BOOST_FILESYSTEM_DEPRECATED
>
$<$<BOOL:${beast_no_unit_test_inline}>:BEAST_NO_UNIT_TEST_INLINE=1>
$<$<BOOL:${beast_disable_autolink}>:BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES=1>
$<$<BOOL:${single_io_service_thread}>:RIPPLE_SINGLE_IO_SERVICE_THREAD=1>
$<$<BOOL:${voidstar}>:ENABLE_VOIDSTAR>)
target_compile_options (opts
INTERFACE
$<$<AND:$<BOOL:${is_gcc}>,$<COMPILE_LANGUAGE:CXX>>:-Wsuggest-override>
$<$<BOOL:${is_gcc}>:-Wno-maybe-uninitialized>
$<$<BOOL:${perf}>:-fno-omit-frame-pointer>
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-g --coverage -fprofile-abs-path>
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-g --coverage>
$<$<BOOL:${profile}>:-pg>
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
target_link_libraries (opts
INTERFACE
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${coverage}>>:-g --coverage -fprofile-abs-path>
$<$<AND:$<BOOL:${is_clang}>,$<BOOL:${coverage}>>:-g --coverage>
$<$<BOOL:${profile}>:-pg>
$<$<AND:$<BOOL:${is_gcc}>,$<BOOL:${profile}>>:-p>)
if(jemalloc)
find_package(jemalloc REQUIRED)
target_compile_definitions(opts INTERFACE PROFILE_JEMALLOC)
target_link_libraries(opts INTERFACE jemalloc::jemalloc)
endif ()
if (san)
target_compile_options (opts
INTERFACE
# sanitizers recommend minimum of -O1 for reasonable performance
$<$<CONFIG:Debug>:-O1>
${SAN_FLAG}
-fno-omit-frame-pointer)
target_compile_definitions (opts
INTERFACE
$<$<STREQUAL:${san},address>:SANITIZER=ASAN>
$<$<STREQUAL:${san},thread>:SANITIZER=TSAN>
$<$<STREQUAL:${san},memory>:SANITIZER=MSAN>
$<$<STREQUAL:${san},undefined>:SANITIZER=UBSAN>)
target_link_libraries (opts INTERFACE ${SAN_FLAG} ${SAN_LIB})
endif ()
#[===================================================================[
rippled transitive library deps via an interface library
#]===================================================================]
add_library (ripple_syslibs INTERFACE)
add_library (Ripple::syslibs ALIAS ripple_syslibs)
target_link_libraries (ripple_syslibs
INTERFACE
$<$<BOOL:${MSVC}>:
legacy_stdio_definitions.lib
Shlwapi
kernel32
user32
gdi32
winspool
comdlg32
advapi32
shell32
ole32
oleaut32
uuid
odbc32
odbccp32
crypt32
>
$<$<NOT:$<BOOL:${MSVC}>>:dl>
$<$<NOT:$<OR:$<BOOL:${MSVC}>,$<BOOL:${APPLE}>>>:rt>)
if (NOT MSVC)
set (THREADS_PREFER_PTHREAD_FLAG ON)
find_package (Threads)
target_link_libraries (ripple_syslibs INTERFACE Threads::Threads)
endif ()
add_library (ripple_libs INTERFACE)
add_library (Ripple::libs ALIAS ripple_libs)
target_link_libraries (ripple_libs INTERFACE Ripple::syslibs)

70
cmake/RippledSanity.cmake Normal file
View File

@@ -0,0 +1,70 @@
#[===================================================================[
convenience variables and sanity checks
#]===================================================================]
get_property(is_multiconfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
if (NOT is_multiconfig)
if (NOT CMAKE_BUILD_TYPE)
message (STATUS "Build type not specified - defaulting to Release")
set (CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
elseif (NOT (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL Release))
# for simplicity, these are the only two config types we care about. Limiting
# the build types simplifies dealing with external project builds especially
message (FATAL_ERROR " *** Only Debug or Release build types are currently supported ***")
endif ()
endif ()
get_directory_property(has_parent PARENT_DIRECTORY)
if (has_parent)
set (is_root_project OFF)
else ()
set (is_root_project ON)
endif ()
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang") # both Clang and AppleClang
set (is_clang TRUE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
message (FATAL_ERROR "This project requires clang 8 or later")
endif ()
# TODO min AppleClang version check ?
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (is_gcc TRUE)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
message (FATAL_ERROR "This project requires GCC 8 or later")
endif ()
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set (is_linux TRUE)
else ()
set (is_linux FALSE)
endif ()
if ("$ENV{CI}" STREQUAL "true" OR "$ENV{CONTINUOUS_INTEGRATION}" STREQUAL "true")
set (is_ci TRUE)
else ()
set (is_ci FALSE)
endif ()
# check for in-source build and fail
if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message (FATAL_ERROR "Builds (in-source) are not allowed in "
"${CMAKE_CURRENT_SOURCE_DIR}. Please remove CMakeCache.txt and the CMakeFiles "
"directory from ${CMAKE_CURRENT_SOURCE_DIR} and try building in a separate directory.")
endif ()
if (MSVC AND CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
message (FATAL_ERROR "Visual Studio 32-bit build is not supported.")
endif ()
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message (FATAL_ERROR "Rippled requires a 64 bit target architecture.\n"
"The most likely cause of this warning is trying to build rippled with a 32-bit OS.")
endif ()
if (APPLE AND NOT HOMEBREW)
find_program (HOMEBREW brew)
endif ()

140
cmake/RippledSettings.cmake Normal file
View File

@@ -0,0 +1,140 @@
#[===================================================================[
declare user options/settings
#]===================================================================]
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
option(assert "Enables asserts, even in release builds" OFF)
option(xrpld "Build xrpld" ON)
option(tests "Build tests" ON)
if(tests)
# This setting allows making a separate workflow to test fees other than default 10
if(NOT UNIT_TEST_REFERENCE_FEE)
set(UNIT_TEST_REFERENCE_FEE "10" CACHE STRING "")
endif()
endif()
option(unity "Creates a build using UNITY support in cmake." OFF)
if(unity)
if(NOT is_ci)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
endif()
set(CMAKE_UNITY_BUILD ON CACHE BOOL "Do a unity build")
endif()
if(is_clang AND is_linux)
option(voidstar "Enable Antithesis instrumentation." OFF)
endif()
if(is_gcc OR is_clang)
option(coverage "Generates coverage info." OFF)
option(profile "Add profiling flags" OFF)
set(coverage_test_parallelism "${PROCESSOR_COUNT}" CACHE STRING
"Unit tests parallelism for the purpose of coverage report.")
set(coverage_format "html-details" CACHE STRING
"Output format of the coverage report.")
set(coverage_extra_args "" CACHE STRING
"Additional arguments to pass to gcovr.")
set(coverage_test "" CACHE STRING
"On gcc & clang, the specific unit test(s) to run for coverage. Default is all tests.")
if(coverage_test AND NOT coverage)
set(coverage ON CACHE BOOL "gcc/clang only" FORCE)
endif()
option(wextra "compile with extra gcc/clang warnings enabled" ON)
else()
set(profile OFF CACHE BOOL "gcc/clang only" FORCE)
set(coverage OFF CACHE BOOL "gcc/clang only" FORCE)
set(wextra OFF CACHE BOOL "gcc/clang only" FORCE)
endif()
if(is_linux)
option(BUILD_SHARED_LIBS "build shared ripple libraries" OFF)
option(static "link protobuf, openssl, libc++, and boost statically" ON)
option(perf "Enables flags that assist with perf recording" OFF)
option(use_gold "enables detection of gold (binutils) linker" ON)
option(use_mold "enables detection of mold (binutils) linker" ON)
else()
# we are not ready to allow shared-libs on windows because it would require
# export declarations. On macos it's more feasible, but static openssl
# produces odd linker errors, thus we disable shared lib builds for now.
set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared ripple libraries - OFF for win/macos" FORCE)
set(static ON CACHE BOOL "static link, linux only. ON for WIN/macos" FORCE)
set(perf OFF CACHE BOOL "perf flags, linux only" FORCE)
set(use_gold OFF CACHE BOOL "gold linker, linux only" FORCE)
set(use_mold OFF CACHE BOOL "mold linker, linux only" FORCE)
endif()
if(is_clang)
option(use_lld "enables detection of lld linker" ON)
else()
set(use_lld OFF CACHE BOOL "try lld linker, clang only" FORCE)
endif()
option(jemalloc "Enables jemalloc for heap profiling" OFF)
option(werr "treat warnings as errors" OFF)
option(local_protobuf
"Force a local build of protobuf instead of looking for an installed version." OFF)
option(local_grpc
"Force a local build of gRPC instead of looking for an installed version." OFF)
# this one is a string and therefore can't be an option
set(san "" CACHE STRING "On gcc & clang, add sanitizer instrumentation")
set_property(CACHE san PROPERTY STRINGS ";undefined;memory;address;thread")
if(san)
string(TOLOWER ${san} san)
set(SAN_FLAG "-fsanitize=${san}")
set(SAN_LIB "")
if(is_gcc)
if(san STREQUAL "address")
set(SAN_LIB "asan")
elseif(san STREQUAL "thread")
set(SAN_LIB "tsan")
elseif(san STREQUAL "memory")
set(SAN_LIB "msan")
elseif(san STREQUAL "undefined")
set(SAN_LIB "ubsan")
endif()
endif()
set(_saved_CRL ${CMAKE_REQUIRED_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES "${SAN_FLAG};${SAN_LIB}")
check_cxx_compiler_flag(${SAN_FLAG} COMPILER_SUPPORTS_SAN)
set(CMAKE_REQUIRED_LIBRARIES ${_saved_CRL})
if(NOT COMPILER_SUPPORTS_SAN)
message(FATAL_ERROR "${san} sanitizer does not seem to be supported by your compiler")
endif()
endif()
set(container_label "" CACHE STRING "tag to use for package building containers")
option(packages_only
"ONLY generate package building targets. This is special use-case and almost \
certainly not what you want. Use with caution as you won't be able to build \
any compiled targets locally." OFF)
option(have_package_container
"Sometimes you already have the tagged container you want to use for package \
building and you don't want docker to rebuild it. This flag will detach the \
dependency of the package build from the container build. It's an advanced \
use case and most likely you should not be touching this flag." OFF)
# the remaining options are obscure and rarely used
option(beast_no_unit_test_inline
"Prevents unit test definitions from being inserted into global table"
OFF)
option(single_io_service_thread
"Restricts the number of threads calling io_context::run to one. \
This can be useful when debugging."
OFF)
option(boost_show_deprecated
"Allow boost to fail on deprecated usage. Only useful if you're trying\
to find deprecated calls."
OFF)
option(beast_hashers
"Use local implementations for sha/ripemd hashes (experimental, not recommended)"
OFF)
if(WIN32)
option(beast_disable_autolink "Disables autolinking of system libraries on WIN32" OFF)
else()
set(beast_disable_autolink OFF CACHE BOOL "WIN32 only" FORCE)
endif()
if(coverage)
message(STATUS "coverage build requested - forcing Debug build")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "build type" FORCE)
endif()

View File

@@ -0,0 +1,22 @@
option (validator_keys "Enables building of validator-keys-tool as a separate target (imported via FetchContent)" OFF)
if (validator_keys)
git_branch (current_branch)
# default to tracking VK master branch unless we are on release
if (NOT (current_branch STREQUAL "release"))
set (current_branch "master")
endif ()
message (STATUS "tracking ValidatorKeys branch: ${current_branch}")
FetchContent_Declare (
validator_keys_src
GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git
GIT_TAG "${current_branch}"
)
FetchContent_GetProperties (validator_keys_src)
if (NOT validator_keys_src_POPULATED)
message (STATUS "Pausing to download ValidatorKeys...")
FetchContent_Populate (validator_keys_src)
endif ()
add_subdirectory (${validator_keys_src_SOURCE_DIR} ${CMAKE_BINARY_DIR}/validator-keys)
endif ()

View File

@@ -0,0 +1,15 @@
#[===================================================================[
read version from source
#]===================================================================]
file(STRINGS src/libxrpl/protocol/BuildInfo.cpp BUILD_INFO)
foreach(line_ ${BUILD_INFO})
if(line_ MATCHES "versionString[ ]*=[ ]*\"(.+)\"")
set(rippled_version ${CMAKE_MATCH_1})
endif()
endforeach()
if(rippled_version)
message(STATUS "rippled version: ${rippled_version}")
else()
message(FATAL_ERROR "unable to determine rippled version")
endif()

37
cmake/add_module.cmake Normal file
View File

@@ -0,0 +1,37 @@
include(isolate_headers)
# Create an OBJECT library target named
#
# ${PROJECT_NAME}.lib${parent}.${name}
#
# with sources in src/lib${parent}/${name}
# and headers in include/${parent}/${name}
# that cannot include headers from other directories in include/
# unless they come through linked libraries.
#
# add_module(parent a)
# add_module(parent b)
# target_link_libraries(project.libparent.b PUBLIC project.libparent.a)
function(add_module parent name)
set(target ${PROJECT_NAME}.lib${parent}.${name})
add_library(${target} OBJECT)
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/lib${parent}/${name}/*.cpp"
)
target_sources(${target} PRIVATE ${sources})
target_include_directories(${target} PUBLIC
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
isolate_headers(
${target}
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/include/${parent}/${name}"
PUBLIC
)
isolate_headers(
${target}
"${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_SOURCE_DIR}/src/lib${parent}/${name}"
PRIVATE
)
endfunction()

View File

@@ -0,0 +1,20 @@
# file(CREATE_SYMLINK) only works on Windows with administrator privileges.
# https://stackoverflow.com/a/61244115/618906
function(create_symbolic_link target link)
if(WIN32)
if(NOT IS_SYMLINK "${link}")
if(NOT IS_ABSOLUTE "${target}")
# Relative links work do not work on Windows.
set(target "${link}/../${target}")
endif()
file(TO_NATIVE_PATH "${target}" target)
file(TO_NATIVE_PATH "${link}" link)
execute_process(COMMAND cmd.exe /c mklink /J "${link}" "${target}")
endif()
else()
file(CREATE_LINK "${target}" "${link}" SYMBOLIC)
endif()
if(NOT IS_SYMLINK "${link}")
message(ERROR "failed to create symlink: <${link}>")
endif()
endfunction()

47
cmake/deps/Boost.cmake Normal file
View File

@@ -0,0 +1,47 @@
find_package(Boost 1.82 REQUIRED
COMPONENTS
chrono
container
coroutine
date_time
filesystem
json
program_options
regex
system
thread
)
add_library(ripple_boost INTERFACE)
add_library(Ripple::boost ALIAS ripple_boost)
target_link_libraries(ripple_boost
INTERFACE
Boost::headers
Boost::chrono
Boost::container
Boost::coroutine
Boost::date_time
Boost::filesystem
Boost::json
Boost::process
Boost::program_options
Boost::regex
Boost::system
Boost::thread)
if(Boost_COMPILER)
target_link_libraries(ripple_boost INTERFACE Boost::disable_autolinking)
endif()
if(san AND is_clang)
# TODO: gcc does not support -fsanitize-blacklist...can we do something else
# for gcc ?
if(NOT Boost_INCLUDE_DIRS AND TARGET Boost::headers)
get_target_property(Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
endif()
message(STATUS "Adding [${Boost_INCLUDE_DIRS}] to sanitizer blacklist")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt "src:${Boost_INCLUDE_DIRS}/*")
target_compile_options(opts
INTERFACE
# ignore boost headers for sanitizing
-fsanitize-blacklist=${CMAKE_CURRENT_BINARY_DIR}/san_bl.txt)
endif()

View File

@@ -0,0 +1,48 @@
include(create_symbolic_link)
# Consider include directory B nested under prefix A:
#
# /path/to/A/then/to/B/...
#
# Call C the relative path from A to B.
# C is what we want to write in `#include` directives:
#
# #include <then/to/B/...>
#
# Examples, all from the `jobqueue` module:
#
# - Library public headers:
# B = /include/xrpl/jobqueue
# A = /include/
# C = xrpl/jobqueue
#
# - Library private headers:
# B = /src/libxrpl/jobqueue
# A = /src/
# C = libxrpl/jobqueue
#
# - Test private headers:
# B = /tests/jobqueue
# A = /
# C = tests/jobqueue
#
# To isolate headers from each other,
# we want to create a symlink Y that points to B,
# within a subdirectory X of the `CMAKE_BINARY_DIR`,
# that has the same relative path C between X and Y,
# and then add X as an include directory of the target,
# sometimes `PUBLIC` and sometimes `PRIVATE`.
# The Cs are all guaranteed to be unique.
# We can guarantee a unique X per target by using
# `${CMAKE_CURRENT_BINARY_DIR}/include/${target}`.
#
# isolate_headers(target A B scope)
function(isolate_headers target A B scope)
file(RELATIVE_PATH C "${A}" "${B}")
set(X "${CMAKE_CURRENT_BINARY_DIR}/modules/${target}")
set(Y "${X}/${C}")
cmake_path(GET Y PARENT_PATH parent)
file(MAKE_DIRECTORY "${parent}")
create_symbolic_link("${B}" "${Y}")
target_include_directories(${target} ${scope} "$<BUILD_INTERFACE:${X}>")
endfunction()

View File

@@ -0,0 +1,24 @@
# Link a library to its modules (see: `add_module`)
# and remove the module sources from the library's sources.
#
# add_module(parent a)
# add_module(parent b)
# target_link_libraries(project.libparent.b PUBLIC project.libparent.a)
# add_library(project.libparent)
# target_link_modules(parent PUBLIC a b)
function(target_link_modules parent scope)
set(library ${PROJECT_NAME}.lib${parent})
foreach(name ${ARGN})
set(module ${library}.${name})
get_target_property(sources ${library} SOURCES)
list(LENGTH sources before)
get_target_property(dupes ${module} SOURCES)
list(LENGTH dupes expected)
list(REMOVE_ITEM sources ${dupes})
list(LENGTH sources after)
math(EXPR actual "${before} - ${after}")
message(STATUS "${module} with ${expected} sources took ${actual} sources from ${library}")
set_target_properties(${library} PROPERTIES SOURCES "${sources}")
target_link_libraries(${library} ${scope} ${module})
endforeach()
endfunction()

View File

@@ -0,0 +1,62 @@
find_package(Protobuf REQUIRED)
# .proto files import each other like this:
#
# import "path/to/file.proto";
#
# For the protobuf compiler to find these imports,
# the parent directory of "path" must be in the import path.
#
# When generating C++,
# it turns into an include statement like this:
#
# #include "path/to/file.pb.h"
#
# and the header is generated at a path relative to the output directory
# that matches the given .proto path relative to the source directory
# minus the first matching prefix on the import path.
#
# In other words, a file `include/package/path/to/file.proto`
# with import path [`include/package`, `include`]
# will generate files `output/path/to/file.pb.{h,cc}`
# with includes like `#include "path/to/file.pb.h".
#
# During build, the generated files can find each other if the output
# directory is an include directory, but we want to install that directory
# under our package's include directory (`include/package`), not as a sibling.
# After install, they can find each other if that subdirectory is an include
# directory.
# Add protocol buffer sources to an existing library target.
# target:
# The name of the library target.
# prefix:
# The install prefix for headers relative to `CMAKE_INSTALL_INCLUDEDIR`.
# This prefix should appear at the start of all your consumer includes.
# ARGN:
# A list of .proto files.
function(target_protobuf_sources target prefix)
set(dir "${CMAKE_CURRENT_BINARY_DIR}/pb-${target}")
file(MAKE_DIRECTORY "${dir}/${prefix}")
protobuf_generate(
TARGET ${target}
PROTOC_OUT_DIR "${dir}/${prefix}"
"${ARGN}"
)
target_include_directories(${target} SYSTEM PUBLIC
# Allows #include <package/path/to/file.proto> used by consumer files.
$<BUILD_INTERFACE:${dir}>
# Allows #include "path/to/file.proto" used by generated files.
$<BUILD_INTERFACE:${dir}/${prefix}>
# Allows #include <package/path/to/file.proto> used by consumer files.
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
# Allows #include "path/to/file.proto" used by generated files.
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${prefix}>
)
install(
DIRECTORY ${dir}/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)
endfunction()

41
cmake/xrpl_add_test.cmake Normal file
View File

@@ -0,0 +1,41 @@
include(isolate_headers)
function(xrpl_add_test name)
set(target ${PROJECT_NAME}.test.${name})
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/${name}/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp"
)
add_executable(${target} EXCLUDE_FROM_ALL ${ARGN} ${sources})
isolate_headers(
${target}
"${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/tests/${name}"
PRIVATE
)
# Make sure the test isn't optimized away in unity builds
set_target_properties(${target} PROPERTIES
UNITY_BUILD_MODE GROUP
UNITY_BUILD_BATCH_SIZE 0) # Adjust as needed
add_test(NAME ${target} COMMAND ${target})
set_tests_properties(
${target} PROPERTIES
FIXTURES_REQUIRED ${target}_fixture
)
add_test(
NAME ${target}.build
COMMAND
${CMAKE_COMMAND}
--build ${CMAKE_BINARY_DIR}
--config $<CONFIG>
--target ${target}
)
set_tests_properties(${target}.build PROPERTIES
FIXTURES_SETUP ${target}_fixture
)
endfunction()

9
conan/global.conf Normal file
View File

@@ -0,0 +1,9 @@
# Global configuration for Conan. This is used to set the number of parallel
# downloads, uploads, and build jobs. The verbosity is set to verbose to
# provide more information during the build process.
core:non_interactive=True
core.download:parallel={{ os.cpu_count() }}
core.upload:parallel={{ os.cpu_count() }}
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
tools.build:verbosity=verbose
tools.compilation:verbosity=verbose

34
conan/profiles/default Normal file
View File

@@ -0,0 +1,34 @@
{% set os = detect_api.detect_os() %}
{% set arch = detect_api.detect_arch() %}
{% set compiler, version, compiler_exe = detect_api.detect_default_compiler() %}
{% set compiler_version = version %}
{% if os == "Linux" %}
{% set compiler_version = detect_api.default_compiler_version(compiler, version) %}
{% endif %}
[settings]
os={{ os }}
arch={{ arch }}
build_type=Debug
compiler={{compiler}}
compiler.version={{ compiler_version }}
compiler.cppstd=20
{% if os == "Windows" %}
compiler.runtime=static
{% else %}
compiler.libcxx={{detect_api.detect_libcxx(compiler, version, compiler_exe)}}
{% endif %}
[conf]
{% if compiler == "clang" and compiler_version >= 19 %}
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
{% endif %}
{% if compiler == "apple-clang" and compiler_version >= 17 %}
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
{% endif %}
{% if compiler == "gcc" and compiler_version < 13 %}
tools.build:cxxflags=['-Wno-restrict']
{% endif %}
[tool_requires]
!cmake/*: cmake/[>=3 <4]

197
conanfile.py Normal file
View File

@@ -0,0 +1,197 @@
from conan import ConanFile, __version__ as conan_version
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
import re
class Xrpl(ConanFile):
name = 'xrpl'
license = 'ISC'
author = 'John Freeman <jfreeman@ripple.com>'
url = 'https://github.com/xrplf/rippled'
description = 'The XRP Ledger'
settings = 'os', 'compiler', 'build_type', 'arch'
options = {
'assertions': [True, False],
'coverage': [True, False],
'fPIC': [True, False],
'jemalloc': [True, False],
'rocksdb': [True, False],
'shared': [True, False],
'static': [True, False],
'tests': [True, False],
'unity': [True, False],
'xrpld': [True, False],
}
requires = [
'grpc/1.50.1',
'libarchive/3.8.1',
'nudb/2.0.9',
'openssl/3.5.2',
'soci/4.0.3',
'zlib/1.3.1',
]
test_requires = [
'doctest/2.4.11',
]
tool_requires = [
'protobuf/3.21.12',
]
default_options = {
'assertions': False,
'coverage': False,
'fPIC': True,
'jemalloc': False,
'rocksdb': True,
'shared': False,
'static': True,
'tests': False,
'unity': False,
'xrpld': False,
'date/*:header_only': True,
'grpc/*:shared': False,
'grpc/*:secure': True,
'libarchive/*:shared': False,
'libarchive/*:with_acl': False,
'libarchive/*:with_bzip2': False,
'libarchive/*:with_cng': False,
'libarchive/*:with_expat': False,
'libarchive/*:with_iconv': False,
'libarchive/*:with_libxml2': False,
'libarchive/*:with_lz4': True,
'libarchive/*:with_lzma': False,
'libarchive/*:with_lzo': False,
'libarchive/*:with_nettle': False,
'libarchive/*:with_openssl': False,
'libarchive/*:with_pcreposix': False,
'libarchive/*:with_xattr': False,
'libarchive/*:with_zlib': False,
'lz4/*:shared': False,
'openssl/*:shared': False,
'protobuf/*:shared': False,
'protobuf/*:with_zlib': True,
'rocksdb/*:enable_sse': False,
'rocksdb/*:lite': False,
'rocksdb/*:shared': False,
'rocksdb/*:use_rtti': True,
'rocksdb/*:with_jemalloc': False,
'rocksdb/*:with_lz4': True,
'rocksdb/*:with_snappy': True,
'snappy/*:shared': False,
'soci/*:shared': False,
'soci/*:with_sqlite3': True,
'soci/*:with_boost': True,
'xxhash/*:shared': False,
}
def set_version(self):
if self.version is None:
path = f'{self.recipe_folder}/src/libxrpl/protocol/BuildInfo.cpp'
regex = r'versionString\s?=\s?\"(.*)\"'
with open(path, encoding='utf-8') as file:
matches = (re.search(regex, line) for line in file)
match = next(m for m in matches if m)
self.version = match.group(1)
def configure(self):
if self.settings.compiler == 'apple-clang':
self.options['boost'].visibility = 'global'
if self.settings.compiler in ['clang', 'gcc']:
self.options['boost'].without_cobalt = True
def requirements(self):
# Conan 2 requires transitive headers to be specified
transitive_headers_opt = {'transitive_headers': True} if conan_version.split('.')[0] == '2' else {}
self.requires('boost/1.88.0', force=True, **transitive_headers_opt)
self.requires('date/3.0.4', **transitive_headers_opt)
self.requires('lz4/1.10.0', force=True)
self.requires('protobuf/3.21.12', force=True)
self.requires('sqlite3/3.49.1', force=True)
if self.options.jemalloc:
self.requires('jemalloc/5.3.0')
if self.options.rocksdb:
self.requires('rocksdb/10.0.1')
self.requires('xxhash/0.8.3', **transitive_headers_opt)
exports_sources = (
'CMakeLists.txt',
'cfg/*',
'cmake/*',
'external/*',
'include/*',
'src/*',
)
def layout(self):
cmake_layout(self)
# Fix this setting to follow the default introduced in Conan 1.48
# to align with our build instructions.
self.folders.generators = 'build/generators'
generators = 'CMakeDeps'
def generate(self):
tc = CMakeToolchain(self)
tc.variables['tests'] = self.options.tests
tc.variables['assert'] = self.options.assertions
tc.variables['coverage'] = self.options.coverage
tc.variables['jemalloc'] = self.options.jemalloc
tc.variables['rocksdb'] = self.options.rocksdb
tc.variables['BUILD_SHARED_LIBS'] = self.options.shared
tc.variables['static'] = self.options.static
tc.variables['unity'] = self.options.unity
tc.variables['xrpld'] = self.options.xrpld
tc.generate()
def build(self):
cmake = CMake(self)
cmake.verbose = True
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.verbose = True
cmake.install()
def package_info(self):
libxrpl = self.cpp_info.components['libxrpl']
libxrpl.libs = [
'xrpl',
'xrpl.libpb',
'ed25519',
'secp256k1',
]
# TODO: Fix the protobufs to include each other relative to
# `include/`, not `include/ripple/proto/`.
libxrpl.includedirs = ['include', 'include/ripple/proto']
libxrpl.requires = [
'boost::headers',
'boost::chrono',
'boost::container',
'boost::coroutine',
'boost::date_time',
'boost::filesystem',
'boost::json',
'boost::program_options',
'boost::process',
'boost::regex',
'boost::system',
'boost::thread',
'date::date',
'grpc::grpc++',
'libarchive::libarchive',
'lz4::lz4',
'nudb::nudb',
'openssl::crypto',
'protobuf::libprotobuf',
'soci::soci',
'sqlite3::sqlite',
'xxhash::xxhash',
'zlib::zlib',
]
if self.options.rocksdb:
libxrpl.requires.append('rocksdb::librocksdb')

View File

@@ -1,19 +0,0 @@
VFALCO NOTE - This file appears to be unmaintained.
Critical protocol changes
-------------------------
Mon Apr 8 16:13:12 PDT 2013
* The JSON field "inLedger" changing to "ledger_index"
Previous
* The JSON field "metaData" changing to "meta".
* RPC ledger will no longer take "ledger", use "ledger_hash" or "ledger_index".
* "ledgerClose" events:
** "hash" DEPRECATED: use "ledger_hash"
** "seqNum" DEPRECATED: use "ledger_index"
** "closeTime" DEPRECATED: use "close" or "close_human"
* stream "rt_accounts" --> "accounts_proposed"
* stream "rt_transactions" --> "transactions_proposed"
* subscribe "username" --> "url_username"
* subscribe "password" --> "url_password"

View File

@@ -1,217 +0,0 @@
--------------------------------------------------------------------------------
# Coding Standards
Coding standards used here are extreme strict and consistent. The style
evolved gradually over the years, incorporating generally acknowledged
best-practice C++ advice, experience, and personal preference.
## Don't Repeat Yourself!
The [Don't Repeat Yourself][1] principle summarises the essence of what it
means to write good code, in all languages, at all levels.
## Formatting
The goal of source code formatting should always be to make things as easy to
read as possible. White space is used to guide the eye so that details are not
overlooked. Blank lines are used to separate code into "paragraphs."
* No tab characters please.
* Tab stops are set to 4 spaces.
* Braces are indented in the [Allman style][2].
* Always place a space before and after all binary operators,
especially assignments (`operator=`).
* The `!` operator should always be followed by a space.
* The `~` operator should be preceded by a space, but not followed by one.
* The `++` and `--` operators should have no spaces between the operator and
the operand.
* A space never appears before a comma, and always appears after a comma.
* Always place a space before an opening parenthesis. One exception is if
the parentheses are empty.
* Don't put spaces after a parenthesis. A typical member function call might
look like this: `foobar (1, 2, 3);`
* In general, leave a blank line before an `if` statement.
* In general, leave a blank line after a closing brace `}`.
* Do not place code or comments on the same line as any opening or
closing brace.
* Do not write `if` statements all-on-one-line. The exception to this is when
you've got a sequence of similar `if` statements, and are aligning them all
vertically to highlight their similarities.
* In an `if-else` statement, if you surround one half of the statement with
braces, you also need to put braces around the other half, to match.
* When writing a pointer type, use this spacing: `SomeObject* myObject`.
Technically, a more correct spacing would be `SomeObject *myObject`, but
it makes more sense for the asterisk to be grouped with the type name,
since being a pointer is part of the type, not the variable name. The only
time that this can lead to any problems is when you're declaring multiple
pointers of the same type in the same statement - which leads on to the next
rule:
* When declaring multiple pointers, never do so in a single statement, e.g.
`SomeObject* p1, *p2;` - instead, always split them out onto separate lines
and write the type name again, to make it quite clear what's going on, and
avoid the danger of missing out any vital asterisks.
* The previous point also applies to references, so always put the `&` next to
the type rather than the variable, e.g. `void foo (Thing const& thing)`. And
don't put a space on both sides of the `*` or `&` - always put a space after
it, but never before it.
* The word `const` should be placed to the right of the thing that it modifies,
for consistency. For example `int const` refers to an int which is const.
`int const*` is a pointer to an int which is const. `int *const` is a const
pointer to an int.
* Always place a space in between the template angle brackets and the type
name. Template code is already hard enough to read!
## Naming conventions
* Member variables and method names are written with camel-case, and never
begin with a capital letter.
* Class names are also written in camel-case, but always begin with a capital
letter.
* For global variables... well, you shouldn't have any, so it doesn't matter.
* Class data members begin with `m_`, static data members begin with `s_`.
Global variables begin with `g_`. This is so the scope of the corresponding
declaration can be easily determined.
* Avoid underscores in your names, especially leading or trailing underscores.
In particular, leading underscores should be avoided, as these are often used
in standard library code, so to use them in your own code looks quite jarring.
* If you really have to write a macro for some reason, then make it all caps,
with underscores to separate the words. And obviously make sure that its name
is unlikely to clash with symbols used in other libraries or 3rd party code.
## Types, const-correctness
* If a method can (and should!) be const, make it const!
* If a method definitely doesn't throw an exception (be careful!), mark it as
`noexcept`
* When returning a temporary object, e.g. a String, the returned object should
be non-const, so that if the class has a C++11 move operator, it can be used.
* If a local variable can be const, then make it const!
* Remember that pointers can be const as well as primitives; For example, if
you have a `char*` whose contents are going to be altered, you may still be
able to make the pointer itself const, e.g. `char* const foobar = getFoobar();`.
* Do not declare all your local variables at the top of a function or method
(i.e. in the old-fashioned C-style). Declare them at the last possible moment,
and give them as small a scope as possible.
* Object parameters should be passed as `const&` wherever possible. Only
pass a parameter as a copy-by-value object if you really need to mutate
a local copy inside the method, and if making a local copy inside the method
would be difficult.
* Use portable `for()` loop variable scoping (i.e. do not have multiple for
loops in the same scope that each re-declare the same variable name, as
this fails on older compilers)
* When you're testing a pointer to see if it's null, never write
`if (myPointer)`. Always avoid that implicit cast-to-bool by writing it more
fully: `if (myPointer != nullptr)`. And likewise, never ever write
`if (! myPointer)`, instead always write `if (myPointer == nullptr)`.
It is more readable that way.
* Avoid C-style casts except when converting between primitive numeric types.
Some people would say "avoid C-style casts altogether", but `static_cast` is
a bit unreadable when you just want to cast an `int` to a `float`. But
whenever a pointer is involved, or a non-primitive object, always use
`static_cast`. And when you're reinterpreting data, always use
`reinterpret_cast`.
* Until C++ gets a universal 64-bit primitive type (part of the C++11
standard), it's best to stick to the `int64` and `uint64` typedefs.
## Object lifetime and ownership
* Absolutely do NOT use `delete`, `deleteAndZero`, etc. There are very very few
situations where you can't use a `ScopedPointer` or some other automatic
lifetime management class.
* Do not use `new` unless there's no alternative. Whenever you type `new`, always
treat it as a failure to find a better solution. If a local variable can be
allocated on the stack rather than the heap, then always do so.
* Do not ever use `new` or `malloc` to allocate a C++ array. Always use a
`HeapBlock` instead.
* And just to make it doubly clear: Never use `malloc` or `calloc`.
* If a parent object needs to create and own some kind of child object, always
use composition as your first choice. If that's not possible (e.g. if the
child needs a pointer to the parent for its constructor), then use a
`ScopedPointer`.
* If possible, pass an object as a reference rather than a pointer. If possible,
make it a `const` reference.
* Obviously avoid static and global values. Sometimes there's no alternative,
but if there is an alternative, then use it, no matter how much effort it
involves.
* If allocating a local POD structure (e.g. an operating-system structure in
native code), and you need to initialise it with zeros, use the `= { 0 };`
syntax as your first choice for doing this. If for some reason that's not
appropriate, use the `zerostruct()` function, or in case that isn't suitable,
use `zeromem()`. Don't use `memset()`.
## Classes
* Declare a class's public section first, and put its constructors and
destructor first. Any protected items come next, and then private ones.
* Use the most restrictive access-specifier possible for each member. Prefer
`private` over `protected`, and `protected` over `public`. Don't expose
things unnecessarily.
* Preferred positioning for any inherited classes is to put them to the right
of the class name, vertically aligned, e.g.:
class Thing : public Foo,
private Bar
{
}
* Put a class's member variables (which should almost always be private, of course),
after all the public and protected method declarations.
* Any private methods can go towards the end of the class, after the member
variables.
* If your class does not have copy-by-value semantics, derive the class from
`Uncopyable`.
* If your class is likely to be leaked, then derive your class from
`LeakChecked<>`.
* Constructors that take a single parameter should be default be marked
`explicit`. Obviously there are cases where you do want implicit conversion,
but always think about it carefully before writing a non-explicit constructor.
* Do not use `NULL`, `null`, or 0 for a null-pointer. And especially never use
'0L', which is particulary burdensome. Use `nullptr` instead - this is the
C++2011 standard, so get used to it. There's a fallback definition for `nullptr`
in Beast, so it's always possible to use it even if your compiler isn't yet
C++2011 compliant.
* All the C++ 'guru' books and articles are full of excellent and detailed advice
on when it's best to use inheritance vs composition. If you're not already
familiar with the received wisdom in these matters, then do some reading!
## Miscellaneous
* `goto` statements should not be used at all, even if the alternative is
more verbose code. The only exception is when implementing an algorithm in
a function as a state machine.
* Don't use macros! OK, obviously there are many situations where they're the
right tool for the job, but treat them as a last resort. Certainly don't ever
use a macro just to hold a constant value or to perform any kind of function
that could have been done as a real inline function. And it goes without saying
that you should give them names which aren't going to clash with other code.
And `#undef` them after you've used them, if possible.
* When using the `++` or `--` operators, never use post-increment if
pre-increment could be used instead. Although it doesn't matter for
primitive types, it's good practice to pre-increment since this can be
much more efficient for more complex objects. In particular, if you're
writing a for loop, always use pre-increment,
e.g. `for (int = 0; i < 10; ++i)`
* Never put an "else" statement after a "return"! This is well-explained in the
LLVM coding standards...and a couple of other very good pieces of advice from
the LLVM standards are in there as well.
* When getting a possibly-null pointer and using it only if it's non-null, limit
the scope of the pointer as much as possible - e.g. Do NOT do this:
Foo* f = getFoo ();
if (f != nullptr)
f->doSomething ();
// other code
f->doSomething (); // oops! f may be null!
..instead, prefer to write it like this, which reduces the scope of the
pointer, making it impossible to write code that accidentally uses a null
pointer:
if (Foo* f = getFoo ())
f->doSomethingElse ();
// f is out-of-scope here, so impossible to use it if it's null
(This also results in smaller, cleaner code)
[1]: http://en.wikipedia.org/wiki/Don%27t_repeat_yourself
[2]: http://en.wikipedia.org/wiki/Indent_style#Allman_style

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,126 +0,0 @@
#
# Sample ripple.txt
#
# More information: https://ripple.com/wiki/Ripple.txt
#
# Publishing this file allows a site to declare in a trustworthy manor ripple
# associated information.
#
# This file is stored on the web server for a domain. This file is searched
# for in the following order:
# - https://ripple.DOMAIN/ripple.txt
# - https://www.DOMAIN/ripple.txt
# - https://DOMAIN/ripple.txt
#
# The server MUST set the following HTTP header when serving this file:
# Access-Control-Allow-Origin: *
#
# This file is UTF-8 with Dos, UNIX, or Mac style end of lines.
# Blank lines and lines beginning with '#' are ignored.
# Undefined sections are reserved.
# No escapes are currently defined.
#
# IMPORTANT: Please remove these comments before publishing this file. Doing so
# makes the file much more readable to humans trying to find info on your site.
#
# [expires]
# Number of days after which this file should be considered expire. Clients
# are expected to check this file when they have cause to believe it has
# changed or expired. For example, if a client discovers an account declares
# that it is associated with the domain, it should check to see if this file
# has been updated. If an expiration date is not declared, the default
# expiration for this file is 30 days.
#
# Example: 30
#
# [accounts]
# Only valid in "ripple.txt". A list of accounts that are declared to be
# controlled by this domain. A client wishing to indicate that an account is
# verified as belonging to a domain will be show the account with a green
# background. A client can verify that an account belongs to a domain by
# checking if the account's root entry mentions the domain containing this
# file and this file found at the domain mentions the account in this
# section.
#
# Example: rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn
#
# [hotwallets]
# Only valid in "ripple.txt". A list of accounts that are declared to be
# controlled by this domain and used as hotwallets.
#
# Example: rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn
#
# [validation_public_key]:
# Only valid in "ripple.txt". A validation public key that is declared
# to be used by this domain for validating ledgers and that it is the
# authorized signature for the domain. This does not imply that a node
# serving the Ripple protocol is avilable at the web host providing the
# file.
#
# Example: n9MZTnHe5D5Q2cgE8oV2usFwRqhUvEA8MwP5Mu1XVD6TxmssPRev
#
# [domain]:
# Mandatory in "ripple.txt".
# Only valid in "ripple.txt".
# Must match location of file.
#
# Example: google.com
#
# [ips]:
# Only valid in "rippled.cfg", "ripple.txt", and the referered [ips_url].
# List of ips where the Newcoin protocol is avialable.
# One ipv4 or ipv6 address per line.
# A port may optionally be specified after adding a space to the address.
# By convention, if known, IPs are listed in from most to least trusted.
#
# Examples:
# 192.168.0.1
# 192.168.0.1 3939
# 2001:0db8:0100:f101:0210:a4ff:fee3:9566
#
# [validators]:
# Only valid in "rippled.cfg", "ripple.txt", and the referered [validators_url].
# List of Ripple validators this node recommends.
#
# For domains, rippled will probe for https web servers at the specied
# domain in the following order: ripple.DOMAIN, www.DOMAIN, DOMAIN
#
# These are encoded 257-bit secp256k1 public keys.
#
# Examples:
# redstem.com
# n9KorY8QtTdRx7TVDpwnG9NvyxsDwHUKUEeDLY3AkiGncVaSXZi5
# n9MqiExBcoG19UXwoLjBJnhsxEhAZMuWwJDRdkyDz1EkEkwzQTNt John Doe
#
# [ips_url]:
# Only valid in "ripple.txt".
# https URL to a similarily formatted file containing [ips].
#
# Example: https://google.com/ripple_ips.txt
#
# [validators_url]:
# Only valid in "ripple.txt".
# https URL to a similarily formatted file containing [validators].
#
# Example: https://google.com/ripple_validators.txt
#
# [currencies]:
# This section allows a site to declare currencies it currently issues.
#
# Examples: (multiple allowed one per line)
# USD
# BTC
# LTC
#
[validation_public_key]
n9MZTnHe5D5Q2cgE8oV2usFwRqhUvEA8MwP5Mu1XVD6TxmssPRev
[domain]
loss
[ips]
192.168.0.5
[validators]
redstem.com

Some files were not shown because too many files have changed in this diff Show More