-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed 1.7.0-b5 #3684
Merged
Merged
Proposed 1.7.0-b5 #3684
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
* Avoid std::shared_mutex bug on ubuntu 18.04 * Fixes #3663
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.
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.
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
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.
- 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.
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.
- Provide separate functions for serializing depending on whether one wants a "wire" version of a node, or one suitable for hashing. - Remove unused functions
- 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.
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.
mtrippled
approved these changes
Dec 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If merged, this PR will:
SField
instances: #3658