Commit Graph

5742 Commits

Author SHA1 Message Date
Felix Lange e221a449e0 cmd/geth, jsre, rpc: run all JS code on the event loop
Some JSRE methods (PrettyPrint, ToVal) bypassed the event loop. All
calls to the JS VM are now wrapped. In order to make this somewhat more
foolproof, the otto VM is now a local variable inside the event loop.
2015-05-25 02:27:37 +02:00
Felix Lange 9e1fd70b50 p2p: decrease frameReadTimeout to 30s
This detects hanging connections sooner. We send a ping every 15s and
other implementation have similar limits.
2015-05-25 01:17:14 +02:00
Felix Lange 1440f9a37a p2p: new dialer, peer management without locks
The most visible change is event-based dialing, which should be an
improvement over the timer-based system that we have at the moment.
The dialer gets a chance to compute new tasks whenever peers change or
dials complete. This is better than checking peers on a timer because
dials happen faster. The dialer can now make more precise decisions
about whom to dial based on the peer set and we can test those
decisions without actually opening any sockets.

Peer management is easier to test because the tests can inject
connections at checkpoints (after enc handshake, after protocol
handshake).

Most of the handshake stuff is now part of the RLPx code. It could be
exported or move to its own package because it is no longer entangled
with Server logic.
2015-05-25 01:17:14 +02:00
Felix Lange 9f38ef5d97 p2p/discover: add ReadRandomNodes 2015-05-25 01:17:14 +02:00
Felix Lange 64564da20b p2p: decrease maximum message size for devp2p to 1kB
The previous limit was 10MB which is unacceptable for all kinds
of reasons, the most important one being that we don't want to
allow the remote side to make us allocate 10MB at handshake time.
2015-05-25 01:17:14 +02:00
Felix Lange 7b93341836 Godeps: add github.com/davecgh/go-spew 2015-05-25 01:17:14 +02:00
Felix Lange dbdc5fd4b3 p2p: delete Server.Broadcast 2015-05-25 01:17:14 +02:00
Felix Lange 2f249fea44 eth: stop p2p.Server on shutdown 2015-05-25 01:17:14 +02:00
Felix Lange 394826f520 Merge pull request #1066 from karalabe/peer-db-polishes
p2p/discover: evacuate self from node database during iterations
2015-05-25 01:16:23 +02:00
Marek Kotewicz c31f8e2bd7 compile solidity contracts with std library 2015-05-24 19:12:18 +02:00
Jason Carver f1ce5877ba do not export ring buffer struct 2015-05-23 12:09:59 -07:00
Jason Carver 8a7fb5fd34 do not export constant for when to log a deep block you mined 2015-05-23 12:09:52 -07:00
Jason Carver 97433f5ef1 expand acronym in log message from TD
to total difficulty
2015-05-22 19:12:59 -07:00
Jason Carver ba295ec6fe Log locally mined blocks, after they are 5-deep in the chain
This helps determine which blocks are unlikely to end up as uncles

 * Store the 5 most recent locally mined block numbers
 * On every imported block, check if the 5-deep block num is in that store
 * Also confirm that the block is signed with miner's coinbase

Why not just check the coinbase? This log is useful if you're running
multiple miners and want to know if *this* miner is performing well.
2015-05-22 12:53:32 -07:00
Jeffrey Wilcke b2b9b3b567 Merge pull request #1077 from obscuren/disasm
core/vm, rpc: added disasm to `ext_` RPC
2015-05-22 06:51:38 -07:00
obscuren 7381be8edb core/vm, rpc: added disasm to `ext_` RPC 2015-05-22 15:38:46 +02:00
Jeffrey Wilcke f7415c0bbc Merge pull request #1076 from obscuren/rpc_sign
core: added RPC sign back in
2015-05-22 04:08:51 -07:00
obscuren 6539ccae7c core: added RPC sign back in 2015-05-22 13:00:04 +02:00
Jeffrey Wilcke 01ddaf5670 Merge pull request #1072 from Gustav-Simonsson/add_random_tests
Add StateTests/RandomTests and VMTests/RandomTests
2015-05-22 02:34:48 -07:00
Jeffrey Wilcke f5e112ae5a Merge pull request #1074 from bas-vk/issue1068
make registrar available in console
2015-05-22 02:22:49 -07:00
Bas van Kervel 821b578f7e make registrar available in console 2015-05-22 09:13:45 +02:00
Gustav Simonsson 6ad817e17b Add StateTests/RandomTests and VMTests/RandomTests 2015-05-21 23:04:46 +02:00
obscuren 13e662f6de Merge branch 'develop' 2015-05-21 19:53:35 +02:00
obscuren 054abe20b8 miner: moved break INSIDE the switch ... 2015-05-21 19:53:27 +02:00
obscuren 8c25a83708 Merge branch 'release/0.9.23' into develop 2015-05-21 18:59:26 +02:00
obscuren 2c1c78a6d9 Merge branch 'release/0.9.23' 2015-05-21 18:58:57 +02:00
Péter Szilágyi cbd3ae6906 p2p/discover: fix #838, evacuate self entries from the node db 2015-05-21 19:41:46 +03:00
Péter Szilágyi af24c271c7 p2p/discover: fix database presistency test folder 2015-05-21 19:28:10 +03:00
obscuren 3ea9868b65 miner: on downloader.Done/Fail stop immediately. Ignore pending evs 2015-05-21 18:14:32 +02:00
obscuren 4600ecb5c7 cmd/geth: bump version 0.9.23 2015-05-21 18:02:15 +02:00
Jeffrey Wilcke f1cc3619f5 Merge pull request #1055 from ethersphere/autodag
automatic DAG pregeneration for smooth epoch transitions
2015-05-21 09:01:57 -07:00
Jeffrey Wilcke af28736bd0 Merge pull request #1064 from karalabe/downloader-attacks
Fix two additional download vulnerabilities
2015-05-21 09:00:12 -07:00
Péter Szilágyi 06a041589f eth, eth/downloader: remove duplicate consts, bump hash fetch to 2K 2015-05-21 18:16:04 +03:00
zelig bed80133e0 automatic DAG pregeneration for smooth epoch transitions
- backend: AutoDAG bool flag passed from cli/eth.Config to ethereum, autoDAG loop started if true
- backend: autoDAG loop start/stop, remove previous DAG
- cli: AutoDAG bool flag, off by default, but automatically ON if mining
- admin jsre: add startAutoDAG stopAutoDAG and makeDAG in miner section
- switch on/off DAG autogeneration when miner started/stopped on console
2015-05-21 15:53:42 +01:00
Jeffrey Wilcke 1da145675d Merge pull request #1063 from bas-vk/issue1053
prefix dapp key/value entries in extradb
2015-05-21 06:43:17 -07:00
Bas van Kervel a61e6788db prefix dapp key/value entries in extradb 2015-05-21 15:20:38 +02:00
Jeffrey Wilcke 90b672f1af Merge pull request #1062 from Gustav-Simonsson/tests_updates
Tests updates
2015-05-21 04:49:23 -07:00
Jeffrey Wilcke bf7dcfce36 Merge pull request #1059 from obscuren/cleanup
Cleanup
2015-05-21 04:11:36 -07:00
obscuren 907848997b miner: one-shot update loop 2015-05-21 11:57:00 +02:00
obscuren 207bd55751 eth: reduced max open files for LevelDB 2015-05-21 11:45:35 +02:00
obscuren 84cd618585 ethdb: documentation and corruption recovery 2015-05-21 11:43:05 +02:00
obscuren ef8744d9fc core: switched back to `set.Set` for uncle verification 2015-05-21 11:36:39 +02:00
obscuren ff1630834c xeth: removed `Value` 2015-05-21 11:36:05 +02:00
Péter Szilágyi 52db6d8be5 eth/downloader: circumvent a forged block chain with known parent attack 2015-05-21 08:37:27 +03:00
Péter Szilágyi e8b22b9253 eth/downloader: prevent a peer from dripping bad hashes 2015-05-21 08:07:58 +03:00
Jeffrey Wilcke 9bde7fd72e Merge pull request #1043 from obscuren/test_fixes
core/vm: optimisation on RETURN and updated tests
2015-05-20 03:06:04 -07:00
Jeffrey Wilcke 8fe8ec84f6 Merge pull request #1049 from zsfelfoldi/receipts
Storing tx receipts in extraDb
2015-05-20 03:00:36 -07:00
Jeffrey Wilcke 0300eef94d Merge pull request #1048 from ethersphere/cli-fixes
CLI, JSRE admin and  Solc improvements
2015-05-20 02:31:52 -07:00
Jeffrey Wilcke 6b83a0a589 Merge pull request #1050 from karalabe/handle-slow-download-tester
eth/downloader: fix test to it doesn't time out on a slow machine
2015-05-20 02:29:23 -07:00
Jeffrey Wilcke adaa49d2cc Merge pull request #1051 from karalabe/fix-odd-naming
eth: fix odd method names in peer set
2015-05-20 02:29:07 -07:00