Commit Graph

255 Commits

Author SHA1 Message Date
JoelKatz
bede5379a5 Add peers to a ledger at the right time. 2012-10-28 19:14:11 -07:00
JoelKatz
76d4a91814 Cleanups. 2012-10-25 19:59:05 -07:00
JoelKatz
7f44d1569e Computing our node public and private keys every time we needed them was silly and expensive. 2012-10-25 18:59:07 -07:00
Arthur Britto
249725b66b Rename NewcoinAddress to RippleAddress. 2012-10-25 18:31:20 -07:00
JoelKatz
98130b524d We didn't correctly store root nodes we acquired from the network. 2012-10-25 02:22:23 -07:00
JoelKatz
ef40099649 Major updates to the ledger tracking system. 2012-10-25 01:50:07 -07:00
JoelKatz
806a025523 Small bugfixes. 2012-10-24 12:56:49 -07:00
JoelKatz
766bc8377f Lots of small cleanups. 2012-10-22 11:49:17 -07:00
JoelKatz
90d061529b Tiny fix. 2012-10-19 16:50:14 -07:00
JoelKatz
81170d7811 Logging improvements. 2012-10-19 16:37:39 -07:00
JoelKatz
7ee9a20f40 Some logging cleanups. 2012-10-19 14:30:09 -07:00
JoelKatz
d3e91345c9 Begin cleaning up the handling of ledger changes during the consensus window. 2012-10-19 14:24:32 -07:00
JoelKatz
19efa3bf9b Make sure we properly handle receiving our own proposals and validations. 2012-10-19 11:51:44 -07:00
JoelKatz
09f3b5db54 Rework how dirty SHAMap nodes are flushed to disk. The existing code had a bug that could cause
nodes to be modified before they were written to disk.
2012-10-16 11:16:07 -07:00
JoelKatz
83cfc7a3df Make sure we clear the 'need network ledger' flag if we jump ledgers during consensus. 2012-10-16 06:10:13 -07:00
JoelKatz
94d607def0 Move deferred proposals to network ops. Include the last closed ledger in proposals. Call handleLCL
even if we happen to jump our notion of the network's last closed ledger to the ledger we had as our
locally last-closed ledger.
2012-10-16 05:27:48 -07:00
JoelKatz
194f61d4e2 Hopefully a fix for the "stuck in neverending consensus" bug Jed reported. 2012-10-15 08:56:25 -07:00
JoelKatz
863b082e32 Move the logging a bit earlier. 2012-10-15 04:12:34 -07:00
JoelKatz
d273ac6e76 Fix a bug that could prevent a close time consensus from being recognized. 2012-10-15 03:04:56 -07:00
JoelKatz
19b518a0af Quick fix for the bug that was causing ledgers to diverge.
LES used an unordered map, causing the traverse of modified ledger nodes to
be in random order. This meant different nodes would thread transactions
differently, causing ledger divergence. This change switches the LES code to
use a standard map. This adds more overhead to LES search functions (because
ordered map operations like search and insert are more expensive than
unordered map opreations, so it may be worth a separate ordering step just
for calcRawMeta instead.
2012-10-12 17:01:37 -07:00
Arthur Britto
b2481f3c49 Rename the protocol from newcoin to ripple. 2012-10-12 15:53:59 -07:00
JoelKatz
67477beecb Track the type of map in the SHAMap. This will make it easier to parse missing nodes
at ledger level.
2012-10-11 03:13:28 -07:00
JoelKatz
6f2e4b8172 Add RPC "accept_ledger" function which processes all pending transactions (in standalone mode only)
and closes the ledger, opening a new one. The sequence number of the new open ledger is returned.
2012-10-08 20:02:52 -07:00
JoelKatz
31a6177da0 More logging improvements. 2012-10-08 07:14:36 -07:00
JoelKatz
470e2c5747 Fixups. 2012-10-08 00:49:55 -07:00
JoelKatz
12c6a37cac More log partition support. 2012-10-08 00:48:04 -07:00
JoelKatz
0630a4b7f4 We have to track the high node ID of trusted validators as a tie-breaker.
1) Change return from getCurrentValidations
2) Log tiebreaker logic to aid debugging
3) Change checkLastClosedLedger to use the new tie-breaker logic
4) Log when we refuse to switch to our own previous ledger
5) Track node ID in the serialized validation object
6) Simplify getCurrentValidations ledger suppression logic
2012-10-05 03:46:24 -07:00
JoelKatz
4bab95440c Log how many peers we sent a validation to. 2012-10-04 23:44:36 -07:00
JoelKatz
015ba9f24d Typo. 2012-10-04 12:53:38 -07:00
JoelKatz
414a44b6b5 Prevent a race condition that can cause us to miss an "I have a transaction
set" message if it arrives as we're in the process of generating a new
last-closed ledger.
2012-10-04 02:19:47 -07:00
JoelKatz
39cb1899d0 A few small bugfixes and some exra logging to track down a sync bug that Jed reported. 2012-10-03 22:23:32 -07:00
JoelKatz
b973f3509c Typo fixes. 2012-09-30 23:40:21 -07:00
JoelKatz
de3b89d5c1 Fix the bug Jed reported. Need isTeRetry. 2012-09-30 23:38:29 -07:00
JoelKatz
92fbff0efc If a new transaction is discovered in the consensus process and we have not
relayed it recently, do so. This is not the perfect solution, it would be
better to relay it when we accept the new ledger, relaying only if it fits
in the consensus ledger.
2012-09-17 00:54:48 -07:00
JoelKatz
89518e23cc Fix two more race conditions involving us taking our position late.
Remove an incorrect comment.
2012-09-17 00:38:47 -07:00
JoelKatz
7744f7c111 Cleanups and improved comments.
Fix a race condition if a peer ledger comes in before we take our initial position.
2012-09-16 20:58:38 -07:00
JoelKatz
d147b61530 The ledger accept process calls functions like ConnectionPool::relayMessage
and so must be called in the main I/O thread, at least for now.
2012-09-14 10:06:23 -07:00
JoelKatz
22f9a1a258 Don't let bow outs count as agreeing/disagreeing for consensus determination 2012-09-14 09:58:51 -07:00
JoelKatz
faece188f4 Belt and suspenders. Fix on both sides. 2012-09-14 08:41:59 -07:00
JoelKatz
c9a44e4a1a We have to make sure someone holds a strong pointer to the acquiring
set when we move it from acquring to acquired.
2012-09-14 08:40:55 -07:00
JoelKatz
a4f41edf7a Cleanup shared polymorphic downcast. 2012-09-14 07:08:01 -07:00
JoelKatz
f7e68cfc51 Fix SHAMap state when tx sync completes. 2012-09-13 20:49:48 -07:00
JoelKatz
0efe8b4892 Cleanups. 2012-09-13 20:41:25 -07:00
JoelKatz
b35f87564a Fix a bug triggered by a acquiring a transaction set after having bowed out
of the consensus process.
2012-09-13 19:32:44 -07:00
JoelKatz
1faa8ccda6 Some less confusing names. 2012-09-13 19:26:40 -07:00
JoelKatz
6c016039c2 Get rid of all "const SHAMap::pointer&" -> SHAMap::ref 2012-09-13 15:36:56 -07:00
JoelKatz
7ba143b4df Revert "Cleanup transaction set sync map creation."
This reverts commit de8288d4d5.
2012-09-13 15:29:47 -07:00
JoelKatz
ec2dded961 Revert "Cleanup transaction set sync map creation."
This reverts commit de8288d4d5.
2012-09-13 15:23:55 -07:00
JoelKatz
de8288d4d5 Cleanup transaction set sync map creation.
Remove a passthrough to NetworkOPs that doesn't make much sense.
2012-09-13 15:22:36 -07:00
JoelKatz
ca6e9cf764 Fix a case where we can get stuck in the wrong consensus window and have to
wait for it to timeout.
2012-09-11 21:36:23 -07:00