diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4df4a30b9..6e1a72d28 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -9,6 +9,43 @@ If you are using Red Hat Enterprise Linux 7 or CentOS 7, you can [update using ` # Releases +## Version 0.60.3 + +The `rippled` 0.60.3 release helps to increase the stability of the network under heavy load. + +**New and Updated Features** + +This release has no new features. + +**Bug Fixes** + +Server overlay improvements ([#2110](https://github.com/ripple/rippled/pull/2011)) + +## Version 0.60.2 + +The `rippled` 0.60.2 release further strengthens handling of cases associated with a previously patched exploit, in which NoRipple flags were being bypassed by using offers. + +**New and Updated Features** + +This release has no new features. + +**Bug Fixes** + +Prevent the ability to bypass the `NoRipple` flag using offers ([#7cd4d78](https://github.com/ripple/rippled/commit/4ff40d4954dfaa237c8b708c2126cb39566776da)) + +## Version 0.60.1 + +The `rippled` 0.60.1 release corrects a technical flaw that resulted from using 32-bit space identifiers instead of the protocol-defined 16-bit values for Escrow and Payment Channel ledger entries. rippled version 0.60.1 also fixes a problem where the WebSocket timeout timer would not be cancelled when certain errors occurred during subscription streams. Ripple requires upgrading to rippled version 0.60.1 immediately. + +**New and Updated Feature** + +This release has no new features. + +**Bug Fixes** + +Correct calculation of Escrow and Payment Channel indices. +Fix WebSocket timeout timer issues. + ## Version 0.60.0 The `rippled` 0.60.0 release introduces several enhancements that improve the reliability and scalability of the Ripple Consensus Ledger (RCL), including features that add ledger interoperability by improving Interledger Protocol compatibility. Ripple recommends that all server operators upgrade to version 0.60.0 by Thursday, 2017-03-30, for service continuity. diff --git a/bin/ci/ubuntu/install-dependencies.sh b/bin/ci/ubuntu/install-dependencies.sh index f99321016..5257eaa68 100755 --- a/bin/ci/ubuntu/install-dependencies.sh +++ b/bin/ci/ubuntu/install-dependencies.sh @@ -53,6 +53,7 @@ if [ -x $HOME/bin/g++ ]; then $HOME/bin/g++ -v fi +pip install --user requests==2.13.0 pip install --user https://github.com/codecov/codecov-python/archive/master.zip bash bin/sh/install-boost.sh diff --git a/src/ripple/overlay/impl/PeerImp.cpp b/src/ripple/overlay/impl/PeerImp.cpp index 42270ad1e..2d9633de9 100644 --- a/src/ripple/overlay/impl/PeerImp.cpp +++ b/src/ripple/overlay/impl/PeerImp.cpp @@ -210,6 +210,12 @@ PeerImp::send (Message::pointer const& m) // a small senq periodically large_sendq_ = 0; } + else if ((sendq_size % Tuning::sendQueueLogFreq) == 0) + { + JLOG (journal_.debug()) << + (name_.empty() ? remote_address_.to_string() : name_) << + " sendq: " << sendq_size; + } send_queue_.push(m); @@ -442,7 +448,9 @@ PeerImp::fail(std::string const& reason) shared_from_this(), reason)); if (socket_.is_open()) { - JLOG (journal_.warn()) << reason; + JLOG (journal_.warn()) << + (name_.empty() ? remote_address_.to_string() : name_) << + " failed: " << reason; } close(); } diff --git a/src/ripple/overlay/impl/Tuning.h b/src/ripple/overlay/impl/Tuning.h index 76e1f1b7a..566280fe3 100644 --- a/src/ripple/overlay/impl/Tuning.h +++ b/src/ripple/overlay/impl/Tuning.h @@ -52,13 +52,13 @@ enum /** How many milliseconds to consider high latency on a peer connection */ - peerHighLatency = 250, + peerHighLatency = 300, /** How often we check connections (seconds) */ - checkSeconds = 10, + checkSeconds = 32, /** How often we latency/sendq probe connections */ - timerSeconds = 4, + timerSeconds = 8, /** How many timer intervals a sendq has to stay large before we disconnect */ sendqIntervals = 4, @@ -67,10 +67,13 @@ enum noPing = 10, /** How many messages on a send queue before we refuse queries */ - dropSendQueue = 8, + dropSendQueue = 192, /** How many messages we consider reasonable sustained on a send queue */ - targetSendQueue = 16, + targetSendQueue = 128, + + /** How often to log send queue size */ + sendQueueLogFreq = 64, }; } // Tuning diff --git a/src/ripple/peerfinder/impl/Bootcache.cpp b/src/ripple/peerfinder/impl/Bootcache.cpp index f9c5257c0..1d0622e59 100644 --- a/src/ripple/peerfinder/impl/Bootcache.cpp +++ b/src/ripple/peerfinder/impl/Bootcache.cpp @@ -129,6 +129,30 @@ Bootcache::insert (beast::IP::Endpoint const& endpoint) return result.second; } +bool +Bootcache::insertStatic (beast::IP::Endpoint const& endpoint) +{ + auto result (m_map.insert ( + value_type (endpoint, staticValence))); + + if (! result.second && (result.first->right.valence() < staticValence)) + { + // An existing entry has too low a valence, replace it + m_map.erase (result.first); + result = m_map.insert ( + value_type (endpoint, staticValence)); + } + + if (result.second) + { + JLOG(m_journal.trace()) << beast::leftw (18) << + "Bootcache insert " << endpoint; + prune (); + flagForUpdate(); + } + return result.second; +} + void Bootcache::on_success (beast::IP::Endpoint const& endpoint) { @@ -197,7 +221,13 @@ Bootcache::periodicActivity () void Bootcache::onWrite (beast::PropertyStream::Map& map) { - map ["entries"] = std::uint32_t (m_map.size()); + beast::PropertyStream::Set entries ("entries", map); + for (auto iter = m_map.right.begin(); iter != m_map.right.end(); ++iter) + { + beast::PropertyStream::Map entry (entries); + entry["endpoint"] = iter->get_left().to_string(); + entry["valence"] = std::int32_t (iter->get_right().valence()); + } } // Checks the cache size and prunes if its over the limit. diff --git a/src/ripple/peerfinder/impl/Bootcache.h b/src/ripple/peerfinder/impl/Bootcache.h index d8f56e7f8..319a76a7d 100644 --- a/src/ripple/peerfinder/impl/Bootcache.h +++ b/src/ripple/peerfinder/impl/Bootcache.h @@ -110,6 +110,8 @@ private: bool m_needsUpdate; public: + static constexpr int staticValence = 32; + using iterator = boost::transform_iterator ; @@ -140,9 +142,12 @@ public: /** Load the persisted data from the Store into the container. */ void load (); - /** Add the address to the cache. */ + /** Add a newly-learned address to the cache. */ bool insert (beast::IP::Endpoint const& endpoint); + /** Add a staticallyconfigured address to the cache. */ + bool insertStatic (beast::IP::Endpoint const& endpoint); + /** Called when an outbound connection handshake completes. */ void on_success (beast::IP::Endpoint const& endpoint); diff --git a/src/ripple/peerfinder/impl/Logic.h b/src/ripple/peerfinder/impl/Logic.h index dc5354b15..34734311d 100644 --- a/src/ripple/peerfinder/impl/Logic.h +++ b/src/ripple/peerfinder/impl/Logic.h @@ -990,7 +990,7 @@ public: std::lock_guard _(lock_); for (auto addr : list) { - if (bootcache_.insert (addr)) + if (bootcache_.insertStatic (addr)) ++count; } return count;