Commit Graph

7946 Commits

Author SHA1 Message Date
Péter Szilágyi
7d8ce53eca whisper: polish the messages, fix some bugs, tests
Bugs fixed:
  - Use randomly generated flags as the spec required.
  - During envelope opening check the first bit only for signature.
2015-04-10 15:53:21 +03:00
Felix Lange
99a1db2d40 p2p: don't mess with the socket deadline in Peer.readLoop
netWrapper already sets a read deadline in ReadMsg.
2015-04-10 13:26:28 +02:00
Felix Lange
145330fdf2 p2p: properly decrement peer wait group counter for setup errors 2015-04-10 13:26:27 +02:00
Felix Lange
f1d710af00 p2p: fix Peer shutdown deadlocks
There were multiple synchronization issues in the disconnect handling,
all caused by the odd special-casing of Peer.readLoop errors. Remove the
special handling of read errors and make readLoop part of the Peer
WaitGroup.

Thanks to @Gustav-Simonsson for pointing at arrows in a diagram
and playing rubber-duck.
2015-04-10 13:26:27 +02:00
Felix Lange
22d1f0faf1 p2p: improve peer selection logic
This commit introduces a new (temporary) peer selection
strategy based on random lookups.

While we're here, also implement the TODOs in dialLoop.
2015-04-10 13:26:27 +02:00
Felix Lange
7be05b4b9d p2p/discover: don't log packet content 2015-04-10 13:26:27 +02:00
Felix Lange
9cd8c96157 p2p/discover: make packet processing less concurrent 2015-04-10 13:26:27 +02:00
Péter Szilágyi
7e54a9c07f whisper: rename test file according to Go style 2015-04-10 13:46:08 +03:00
Péter Szilágyi
a4c8e947b0 whisper: make the test app runnable & do something inside 2015-04-10 13:42:49 +03:00
Gustav Simonsson
6d20d634ca Enable more tx tests by expecting most common encoding of values 2015-04-10 12:34:55 +02:00
Gustav Simonsson
6dc2146ed7 Remove unneeded map assignments for working tx RLP tests 2015-04-10 12:03:46 +02:00
Gustav Simonsson
9ac5671c18 Add TransactionTests wrapped as Go tests
* Add initial go wrapping for TransactionTests with some tests
  disabled in lieu of consistent HEX encodings and a few other
  pending bugfixes
* TODO: Consider better way of perhaps modelling each test in
  the JSON files as a single Go test, instead of one Go test per
  JSON file
2015-04-10 11:55:31 +02:00
Gustav Simonsson
1e18f4544b Update JSON test files 2015-04-10 11:52:31 +02:00
obscuren
fc1d1f9afd Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-10 11:03:46 +02:00
obscuren
3755cfccb3 Skipped td test 2015-04-10 11:03:36 +02:00
Jeffrey Wilcke
20fd60902b Merge pull request #687 from karalabe/develop
xeth: fix #640, panic converting nil recipient to hex.
2015-04-10 11:02:25 +02:00
Péter Szilágyi
d1729acd2b cmd/mist: fix another nil recipient address panic. 2015-04-10 11:43:08 +03:00
Péter Szilágyi
b2b1241dd7 cmd/mist: fix #640, panic converting nil recipient to hex.
Fetching the recipient address from a transaction was changed to return nil
instead of a zero-address, but this code path was not updated, so whenever
a contract was created, a nil panic occured.
2015-04-10 11:20:04 +03:00
Jeffrey Wilcke
4de1e1609a Merge pull request #682 from bas-vk/issue_567
bugfix as a result of PR 671
2015-04-09 23:42:17 +02:00
Bas van Kervel
dc2b9fd458 bugfix as a result of PR 671 2015-04-09 20:06:27 +02:00
obscuren
ec9fbf09aa Added some quotes .... 2015-04-09 18:24:22 +02:00
obscuren
9f5d24be31 glog 2015-04-09 18:16:22 +02:00
obscuren
b0f40beea6 Added proper contract for registrar 2015-04-09 17:59:05 +02:00
obscuren
ab015959e1 bump 2015-04-09 17:54:20 +02:00
obscuren
2747df3df1 added contracts 2015-04-09 17:42:43 +02:00
obscuren
01ee012197 Merge branch 'ethersphere-frontier/blockpool' into develop 2015-04-09 17:40:28 +02:00
obscuren
764a802eaa Disabled TD check
@zelig: Temporarily commented out TD check untill the rest of the network has
been fixed.
2015-04-09 17:39:02 +02:00
obscuren
663fd8f849 Moved log to debug 2015-04-09 17:19:05 +02:00
obscuren
46898f1e55 Merge branch 'frontier/blockpool' of https://github.com/ethersphere/go-ethereum into ethersphere-frontier/blockpool 2015-04-09 16:54:32 +02:00
obscuren
0636e17dbe Added default registrar 2015-04-09 16:37:04 +02:00
zelig
be25396340 separate lock for blacklist 2015-04-09 13:58:35 +01:00
zelig
a009132c24 oops peer unlocked before return - fixes deadlock 2015-04-09 13:58:35 +01:00
zelig
0e2bc23148 uncomment future block TD check, add test for skipping TD check on future block 2015-04-09 13:58:35 +01:00
zelig
e55747a074 fix deadlock issue in AddBlock
- add peer switch channel arg to activateChain - no peer locking within
- proper locking in AddBlock - fixes deadlock issue
- comment out TD check and skip incorrect TD test again for hotfix
2015-04-09 13:58:35 +01:00
zelig
262714fc6c future queued block support
- queued       bool // flag for blockpool to skip TD check
- set to true when future block queued
- in checkTD: skip check if queued
- TODO: add test (insertchain sets future block)
2015-04-09 13:58:35 +01:00
zelig
cbd0b42060 put back checkTD and unskip incorrectTD test 2015-04-09 13:58:35 +01:00
zelig
f546b486bf introduce peers registry on nodes
- TestPeerPromotionByTdOnBlock renamed and skipped for now test should pass iff
  if TD is updated based on an agreement
- senders register in AddBlock, flag records if they are coming from newblock
  message (and therefore advertise their TD with the block) or block message
  (TODO: latter are stored on the cache and updated by checkTD call;
  protocol should also call AddBlock on newblock messages by non-best peers)
- remove TD update from optional TD field in addBlock: this is no longer part of
  the eth protocol spec -> TODO: reflect in wiki
- only initialise peer map if at least two
2015-04-09 13:58:35 +01:00
zelig
42fb9652f5 fix blockpool deadlock
- do not break from headsection on error
[remove peer after protocol quit will close switchC, until then head block can arrive and block on channel while keeping peers lock causing a deadlock.]
- more careful locking in AddBlock
2015-04-09 13:58:35 +01:00
zelig
30830652ae fix TestPoolStatus test crashing, skip tests failing (due to @obscuren hotfixes) 2015-04-09 13:58:35 +01:00
obscuren
c6b25a4046 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-09 13:24:08 +02:00
obscuren
8d059e54f1 Updated xeth logger 2015-04-09 11:49:14 +02:00
Jeffrey Wilcke
558683d10c Merge pull request #678 from bas-vk/feature_635
Support for import/export hex encoded keys
2015-04-09 11:31:44 +02:00
Jeffrey Wilcke
79cc3cc98e Merge pull request #671 from bas-vk/issue_567
Add path expansion support for command line arguments, closes 567
2015-04-09 11:31:04 +02:00
Bas van Kervel
ef393da933 removed utility function and implemented hex conversation in crypto functions 2015-04-09 10:59:37 +02:00
Bas van Kervel
6da5b2fc5f reformat code with goimports 2015-04-09 10:26:26 +02:00
obscuren
a9959805e5 Removed from as a requirement and changed
Removed the from as a requiremet from the RPC eth_call. Xeth#Call now
also default values to:

1. Supplied account
2. First account if any
3. No managed account => 000000..00
2015-04-09 00:44:20 +02:00
obscuren
204ac81188 Moved handling of nonces to the managed state 2015-04-08 23:30:07 +02:00
Bas van Kervel
b3a3fdf9a4 Support for import/export hex encoded keys, closes #635 2015-04-08 23:03:47 +02:00
obscuren
6e2f78ebdd Default log to stderr 2015-04-08 22:18:16 +02:00
obscuren
2e2860e4df Make sure mist runs ... :-) 2015-04-08 22:17:49 +02:00