Commit Graph

5087 Commits

Author SHA1 Message Date
obscuren
4f3c169b4e miner: don't break loop when encountering gas limit reach err
Processing transactions should continue when a transaction throws a gas
limit reached error. Other transactions may actually succeed.
2015-04-13 22:58:53 +02:00
obscuren
d423305f07 state: fixed nonce issue in managed state
Rlock => Lock when creating a new nonce
2015-04-13 22:57:03 +02:00
obscuren
d61ec9ca76 rpc: removed hash from LogRes. Closes #701 2015-04-13 21:28:05 +02:00
Felix Lange
0217652d1b p2p/discover: improve timer handling for reply timeouts 2015-04-13 18:08:11 +02:00
Felix Lange
b8aeb04f6f p2p/discover: remove unused field Node.activeStamp 2015-04-13 17:44:14 +02:00
Felix Lange
b9929d289d p2p: fix unsynchronized map access during Server shutdown
removePeer can be called even after listenLoop and dialLoop have returned.
2015-04-13 17:37:32 +02:00
obscuren
333e539ce2 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-13 17:35:46 +02:00
Jeffrey Wilcke
1fa844aaf5 Merge pull request #702 from ethersphere/frontier/blockpool
blockpool stability fixes:
2015-04-13 17:35:25 +02:00
Jeffrey Wilcke
5f9346bc7a Merge pull request #700 from bas-vk/issue_650
Added blockchain DB versioning support, closes #650
2015-04-13 17:34:34 +02:00
Felix Lange
995fab2ebc p2p: fix yet another disconnect hang
Peer.readLoop will only terminate if the connection is closed. Fix the
hang by closing the connection before waiting for readLoop to terminate.

This also removes the british disconnect procedure where we're waiting
for the remote end to close the connection. I have confirmed with
@subtly that cpp-ethereum doesn't adhere to it either.
2015-04-13 17:34:08 +02:00
obscuren
97d2954e22 eth: added downloader for syncing up the chain 2015-04-13 17:22:32 +02:00
Felix Lange
79a6782c1c p2p: fix goroutine leak when handshake read fails
This regression was introduced in b3c058a9e4e9.
2015-04-13 17:06:19 +02:00
Jeffrey Wilcke
ad4891a09a Merge pull request #689 from Gustav-Simonsson/add_transaction_tests
Add transaction tests
2015-04-13 16:55:21 +02:00
obscuren
a8a2b2a488 downloader: added missing blocks catchup functionality
When a parent is missing in the block list an attempt should be made to
fetch the missing parent and grandparents.
2015-04-13 16:38:32 +02:00
Péter Szilágyi
cb707ba50c whisper: push work in progress for bug report 2015-04-13 16:19:34 +03:00
zelig
3d57e377a4 blockpool stability fixes:
- follow up locks and fix them
- chainManager: call SetQueued for parentErr future blocks, uncomment TD checks, unskip test
- make ErrIncorrectTD non-fatal to be forgiving to genuine mistaken nodes (temp) but demote them to guard against stuck best peers.
- add purging to bounded nodeCache (config nodeCacheSize)
- use nodeCache when creating blockpool entries and let non-best peers add blocks (performance boost)
- minor error in addError
- reduce idleBestPeerTimeout to 1 minute
- correct status counts and unskip status passing status test
- glogified logging
2015-04-13 13:13:55 +01:00
Felix Lange
faa2747809 Merge pull request #690 from karalabe/whisper-cleanup
Whisper cleanup, part 1
2015-04-13 13:39:59 +02:00
Péter Szilágyi
89358d25a4 whisper: start adding integration tests 2015-04-13 13:15:01 +03:00
Péter Szilágyi
9a53390f49 whisper: clean up and integrate topics 2015-04-13 12:16:51 +03:00
Péter Szilágyi
7b501906db whisper: separate out magic number from the code 2015-04-13 11:31:51 +03:00
Bas van Kervel
49a513bdeb Added blockchain DB versioning support, closes #650 2015-04-13 10:13:52 +02:00
obscuren
7dcb9825c3 downloader: return an error for peer.fetch and return chunk to queue
If a peer was somehow already fetching and somehow managed to end up in
the `available` pool it should return it's work.
2015-04-12 13:36:01 +02:00
Péter Szilágyi
5467e7b312 whisper: fix comment entity capitalizations 2015-04-12 14:34:53 +03:00
obscuren
6efa8db888 downloader: renamed chunks to queue 2015-04-12 13:24:38 +02:00
obscuren
acf8452c33 downloader: implemented new downloader 2015-04-12 12:38:25 +02:00
Jeffrey Wilcke
61db7a71dd Merge pull request #695 from ethersphere/frontier/blockpool
bugfixes for headsection deadlocks
2015-04-11 10:46:34 +02:00
zelig
406feee570 bugfixes for headsection deadlocks
- switchC initialised as closed
- move select in setChainInfoFromBlock out of peer lock
2015-04-11 04:58:53 +01:00
obscuren
f047699afb Updated glog 2015-04-10 19:59:07 +02:00
obscuren
3aa5437a10 Set input to nil for create 2015-04-10 19:59:01 +02:00
obscuren
36fe11378c Bump 2015-04-10 18:21:27 +02:00
obscuren
eb75a77151 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-10 18:21:09 +02:00
Jeffrey Wilcke
6107b53de0 Merge pull request #692 from ethersphere/frontier/blockpool
td update from node + bugfix
2015-04-10 18:20:23 +02:00
obscuren
5d4f69f483 Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop 2015-04-10 17:59:38 +02:00
Jeffrey Wilcke
92fbb61625 Merge pull request #691 from fjl/discovery-fixes
p2p: a bunch of fixes
2015-04-10 17:59:32 +02:00
obscuren
3d29805322 Added pprof 2015-04-10 17:38:06 +02:00
zelig
da7332a731 td update from node
- reorg and simplify AddBlock
- introduce nodeCache
- TestPeerPromotionByTdOnBlock unskipped and passes
- move switchC/idleC channel creation around: solves deadlock (now respects the contract with section process: either can activate or complete at any one time)
2015-04-10 16:36:40 +01:00
Felix Lange
c5332537f5 p2p: limit number of lingering inbound pre-handshake connections
This is supposed to apply some back pressure so Server is not accepting
more connections than it can actually handle. The current limit is 50.
This doesn't really need to be configurable, but we'll see how it
behaves in our test nodes and adjust accordingly.
2015-04-10 17:24:41 +02:00
Felix Lange
56977c225e p2p: use RLock instead of Lock for pre-dial checks 2015-04-10 17:23:09 +02:00
Felix Lange
b3c058a9e4 p2p: improve disconnect signaling at handshake time
As of this commit, p2p will disconnect nodes directly after the
encryption handshake if too many peer connections are active.
Errors in the protocol handshake packet are now handled more politely
by sending a disconnect packet before closing the connection.
2015-04-10 16:57:56 +02:00
Péter Szilágyi
f8a4cd7ec1 xeth/whisper, ui/qt/qwhisper: fix API update breaks. 2015-04-10 17:03:08 +03:00
Péter Szilágyi
0e4f21fc37 whisper: polish the Envelope a bit, prep for tests. 2015-04-10 16:52:01 +03:00
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