From 58a9a2cc077131652bbf1ca65c22520fa0e8e249 Mon Sep 17 00:00:00 2001 From: David Schwartz Date: Wed, 25 Sep 2013 17:08:44 -0700 Subject: [PATCH 1/5] Ripple Labs contributions are now open source. --- LICENSE | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 98798675e5..1e51f822bb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,18 @@ The accompanying files under various copyrights. -This work contains proprietary code. -Permission is required for distribution. +Copyright (c) 2012,2013 Ripple Labs + +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. Some code: Copyright (c) 2012 Arthur Britto From 2b37a4c7b0a1e835073fc6e11c2828ae4bd02311 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 26 Sep 2013 10:26:15 -0700 Subject: [PATCH 2/5] Better tracking of resources associated with pathfinding. --- src/ripple_app/paths/PathRequest.cpp | 2 ++ src/ripple_app/paths/PathRequest.h | 5 ++++- src/ripple_app/paths/PathState.h | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ripple_app/paths/PathRequest.cpp b/src/ripple_app/paths/PathRequest.cpp index 9bf17dea93..74e58931ec 100644 --- a/src/ripple_app/paths/PathRequest.cpp +++ b/src/ripple_app/paths/PathRequest.cpp @@ -362,6 +362,8 @@ void PathRequest::updateAll (Ledger::ref ledger, bool newOnly, CancelCallback sh { std::set requests; + LoadEvent::autoptr event (getApp().getJobQueue().getLoadEventAP(jtPATH_FIND, "PathRequest::updateAll")); + { StaticScopedLockType sl (sLock, __FILE__, __LINE__); requests = sRequests; diff --git a/src/ripple_app/paths/PathRequest.h b/src/ripple_app/paths/PathRequest.h index 91d1e2b51f..29632edd8f 100644 --- a/src/ripple_app/paths/PathRequest.h +++ b/src/ripple_app/paths/PathRequest.h @@ -17,9 +17,12 @@ class RippleLineCache; #define PFR_PJ_NOCHANGE 0 #define PFR_PJ_CHANGE 1 -class PathRequest : public boost::enable_shared_from_this +class PathRequest : public boost::enable_shared_from_this, public CountedObject { public: + + static char const* getCountedObjectName () { return "PathRequest"; } + typedef boost::weak_ptr wptr; typedef boost::shared_ptr pointer; typedef const pointer& ref; diff --git a/src/ripple_app/paths/PathState.h b/src/ripple_app/paths/PathState.h index e03de8481c..6b9405f2f8 100644 --- a/src/ripple_app/paths/PathState.h +++ b/src/ripple_app/paths/PathState.h @@ -15,9 +15,12 @@ typedef boost::unordered_map ::const_iterator curIssu extern std::size_t hash_value (const aciSource& asValue); // Holds a path state under incremental application. -class PathState +class PathState : public CountedObject { public: + + static char const* getCountedObjectName () { return "PathState"; } + class Node { public: From 05a183e30af1575d3ce63f78de36d13a78b941b6 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 26 Sep 2013 11:05:15 -0700 Subject: [PATCH 3/5] Make sizes more sensible --- src/ripple_core/functional/Config.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ripple_core/functional/Config.cpp b/src/ripple_core/functional/Config.cpp index 8012b1f0e0..055bd6d948 100644 --- a/src/ripple_core/functional/Config.cpp +++ b/src/ripple_core/functional/Config.cpp @@ -524,18 +524,18 @@ int Config::getSize (SizedItemName item) { siValidationsSize, { 256, 256, 512, 1024, 1024 } }, { siValidationsAge, { 500, 500, 500, 500, 500 } }, - { siNodeCacheSize, { 8192, 65536, 262144, 2097152, 0 } }, - { siNodeCacheAge, { 30, 60, 90, 300, 900 } }, + { siNodeCacheSize, { 8192, 65536, 262144, 512000, 0 } }, + { siNodeCacheAge, { 30, 60, 90, 120, 900 } }, { siSLECacheSize, { 4096, 8192, 16384, 65536, 0 } }, { siSLECacheAge, { 30, 60, 90, 120, 300 } }, - { siLedgerSize, { 32, 128, 256, 2048, 0 } }, - { siLedgerAge, { 30, 90, 180, 300, 900 } }, + { siLedgerSize, { 32, 128, 256, 384, 0 } }, + { siLedgerAge, { 30, 90, 180, 240, 900 } }, - { siHashNodeDBCache, { 4, 12, 24, 32, 64 } }, - { siTxnDBCache, { 4, 12, 24, 32, 32 } }, - { siLgrDBCache, { 4, 8, 16, 16, 16 } }, + { siHashNodeDBCache, { 4, 12, 24, 64, 128 } }, + { siTxnDBCache, { 4, 12, 24, 64, 128 } }, + { siLgrDBCache, { 4, 8, 16, 32, 128 } }, }; for (int i = 0; i < (sizeof (sizeTable) / sizeof (SizedItem)); ++i) From 7cbe8572a3ad98d9a9c58f5efa4b7ad080320cfb Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 26 Sep 2013 11:49:18 -0700 Subject: [PATCH 4/5] Don't abort on a path that's dry because we entered with no funds. --- src/ripple_app/paths/RippleCalc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ripple_app/paths/RippleCalc.cpp b/src/ripple_app/paths/RippleCalc.cpp index 5ca7144af1..19f67502e9 100644 --- a/src/ripple_app/paths/RippleCalc.cpp +++ b/src/ripple_app/paths/RippleCalc.cpp @@ -1815,6 +1815,11 @@ TER RippleCalc::calcNodeFwd (const unsigned int uNode, PathState& psCur, const b terResult = calcNodeFwd (uNode + 1, psCur, bMultiQuality); } + if (tesSUCCESS == terResult && (!psCur.saInPass || !psCur.saOutPass)) + { + terResult = tecPATH_DRY; + } + WriteLog (lsDEBUG, RippleCalc) << boost::str (boost::format ("calcNodeFwd< uNode=%d terResult=%d") % uNode % terResult); return terResult; From b4168392b753be897d42bb210741d58f384d5abb Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 26 Sep 2013 12:23:43 -0700 Subject: [PATCH 5/5] Set version to 0.13.0-r3 --- src/ripple_data/protocol/BuildInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ripple_data/protocol/BuildInfo.cpp b/src/ripple_data/protocol/BuildInfo.cpp index 8593191472..3e3927ed69 100644 --- a/src/ripple_data/protocol/BuildInfo.cpp +++ b/src/ripple_data/protocol/BuildInfo.cpp @@ -12,7 +12,7 @@ char const* BuildInfo::getRawVersionString () // // The build version number (edit this for each release) // - "0.13.0-rc2" + "0.13.0-rc3" // // Must follow the format described here: //