Commit Graph

7174 Commits

Author SHA1 Message Date
Jeffrey Wilcke 528dcc3814 Merge pull request #2151 from fjl/debug-api
internal/debug: APIs for profiling and tracing
2016-01-28 16:11:24 +01:00
Jeffrey Wilcke ae1a137ce7 Merge pull request #2143 from karalabe/fix-transaction-sort-2
core, core/types, miner: fix transaction nonce-price combo sort
2016-01-28 16:11:14 +01:00
Felix Lange 3750d835a1 internal/debug: APIs for profiling and tracing
The debug package provides an RPC wrapper for glog settings and the
debugging facilities of the Go runtime. They can be triggered through
both command line flags and the IPC listener.
2016-01-28 13:36:11 +01:00
Felix Lange e287b56b69 logger/glog: clean up flag getters 2016-01-27 00:51:14 +01:00
Felix Lange a411fe7e6e logger/glog: fix TraceLocation.Set("") 2016-01-27 00:51:14 +01:00
Felix Lange 5728dd381d rpc: fix success response encoding for null return value
The "result" field of JSON-RPC 2.0 responses was omitted
if the result was nil, causing exceptions in web3.js.
2016-01-27 00:06:37 +01:00
Jeffrey Wilcke 63e76482ac Merge pull request #2140 from obscuren/rpc2-console
Rpc2 console
2016-01-26 14:01:00 +01:00
Bas van Kervel 19b2640e89 rpc: migrated the RPC insterface to a new reflection based RPC layer 2016-01-26 13:51:50 +01:00
Felix Lange f2ab351e8d Merge pull request #2136 from fjl/glog-prefix
logger/glog: improve vmodule
2016-01-25 23:35:25 +01:00
Felix Lange 2871781f64 p2p/discover: fix Windows-specific issue for larger-than-buffer packets
On Windows, UDPConn.ReadFrom returns an error for packets larger
than the receive buffer. The error is not marked temporary, causing
our loop to exit when the first oversized packet arrived. The fix
is to treat this particular error as temporary.

Fixes: #1579, #2087
Updates: #2082
2016-01-22 23:44:25 +01:00
Felix Lange 6e6931ef73 Merge pull request #2145 from caktux/develop
separate and optimize Dockerfile for master and develop
2016-01-22 21:55:13 +01:00
Péter Szilágyi a2dc074b1d core, core/types, miner: fix transaction nonce-price combo sort 2016-01-22 12:33:34 +02:00
caktux 896c134d30 separate and optimize Dockerfile for master and develop 2016-01-22 04:03:41 -05:00
Felix Lange e4d794851b node, rpc/api: add debug_vmodule, move admin_verbosity to debug_verbosity 2016-01-21 13:37:38 +01:00
Felix Lange 0edcbc797f logger/glog: add SetVmodule 2016-01-21 13:37:38 +01:00
Felix Lange a15b02320e logger/glog: add directory context to output and vmodule matching
This change allows setting the verbosity for directory prefixes
using the syntax:

    --vmodule=eth/=6
2016-01-21 13:37:38 +01:00
Jeffrey Wilcke 78f1964095 Merge pull request #2115 from karalabe/vm-debug-storage
core/vm: resolve circular dependency to debug vm storage
2016-01-20 22:18:19 +01:00
Jeffrey Wilcke 7b11e94441 Merge pull request #2132 from bas-vk/console-sleep
console: add admin.sleep and admin.sleepBlocks
2016-01-20 22:17:46 +01:00
Péter Szilágyi f3d4ce0d16 core/state, ethdb, trie: test intermediate secure key leak, fix memdb bug 2016-01-20 16:06:28 +02:00
Péter Szilágyi 886478b18b core/state, trie: don't leak database writes before commit 2016-01-20 12:09:24 +02:00
Felix Lange e7f6798b59 Merge pull request #2130 from bas-vk/nodeinfo-format
Nodeinfo format Genesis and Header
2016-01-19 13:21:40 +01:00
Bas van Kervel cdd34fcb16 console: add admin.sleep and admin.sleepBlocks 2016-01-19 12:30:33 +01:00
Bas van Kervel 6e7620afe0 eth: changed NodeInfo Genesis and Head types 2016-01-18 13:28:03 +01:00
Jeffrey Wilcke 5945a33350 Merge pull request #2119 from karalabe/statedb-batch-commit
core/state: always commit in batches, just finish if not needed later
2016-01-14 12:17:59 +01:00
Péter Szilágyi 2d5d6d9d0e core/state: always commit in batches, just finish if not needed later 2016-01-13 12:04:03 +02:00
Péter Szilágyi 752c75fb21 core/vm: resolve circular dependency to debug vm storage 2016-01-11 18:21:39 +02:00
Felix Lange 1b8566a7b1 Merge pull request #2114 from karalabe/chain-maker-state-remake
core: fix invalid state reuse in chain maker based tests
2016-01-11 16:40:28 +01:00
Péter Szilágyi e5b480b638 core: fix invalid state reuse in chain maker based tests 2016-01-11 16:53:06 +02:00
Felix Lange 0ab8a175d8 Merge pull request #2110 from LefterisJP/determining_home_for_ubuntu_core
common: Fix HomeDir detection
2016-01-08 14:24:49 +01:00
Lefteris Karapetsas e2fdd33541 common: Fix HomeDir detection
I am working on porting geth to [Ubuntu Core](https://developer.ubuntu.com/en/snappy/https://developer.ubuntu.com/en/snappy/). I am testing geth on a Raspberry PI and for Ubuntu Core the $HOME directory is unique for each application. See [here](https://developer.ubuntu.com/en/snappy/guides/filesystem-layout) for more information of their filesystem layout.

For some reason in Go `usr.HomeDir` returns a different value than `$HOME` in Ubuntu Core.

Adding this at the end of `HomeDir()`
```go
fmt.Printf("at HomeDir, user.HomeDir = %s and $HOME is %s\n", usr.HomeDir, os.Getenv("HOME"))
```

gives the following output

```
at HomeDir, user.HomeDir = /home/ubuntu and $HOME is /home/ubuntu/apps/geth.sideload/IJcODREBYbHO
```

With this commit, I propose giving precedence to the `$HOME` environment variable as is also suggested by the [homedir](https://github.com/mitchellh/go-homedir/blob/master/homedir.go) project.
2016-01-08 13:36:37 +01:00
Jeffrey Wilcke 32226f1b0c Merge pull request #2097 from karalabe/block-state-checks
core, eth/downloader: ensure state presence in ancestor lookup
2016-01-05 12:26:38 +01:00
Jeffrey Wilcke a7fc4fa9b7 Merge pull request #2101 from karalabe/delete-outoffund-transactions
core: transaction invalidation and reorganization fixes
2016-01-05 12:26:28 +01:00
Péter Szilágyi 649787a9bf core: fix transaction reorg issues within the tx pool 2016-01-05 11:22:59 +02:00
Péter Szilágyi 9e011ff1cd core, eth/downloader: ensure state presence in ancestor lookup 2016-01-04 16:27:23 +02:00
Felix Lange 36137623ed Merge pull request #2099 from karalabe/fix-throttling-test
eth/downloader: throttling tests are time-sensitive, don't run parallel
2015-12-30 13:55:03 +01:00
Péter Szilágyi 1f39746886 eth/downloader: throttling tests are time-sensitive, don't run parallel 2015-12-30 14:42:21 +02:00
Jeffrey Wilcke dbbcf558e2 Merge pull request #2064 from fjl/remove-common-rlp
common: remove old RLP implementation, Value and ExtPackage
2015-12-18 20:26:19 +01:00
Jeffrey Wilcke 4811409e99 Merge pull request #2084 from bas-vk/rpcnilptr
console crash on nil ptr
2015-12-18 20:25:55 +01:00
Bas van Kervel 3c9a2c752f console: bugfix that causes the console to crash when connection to an endpoint without the personal api enabled 2015-12-18 15:30:08 +01:00
Jeffrey Wilcke fd69d2b7a8 Merge pull request #2019 from zsfelfoldi/light-state
Light state
2015-12-18 12:40:01 +01:00
Felix Lange e6fb69296e common: remove old RLP implementation, Value and ExtPackage
In order to make this happen, kill all remaining trivial uses of
common/{rlp,value}.go. The non-trivial ones have been updated earlier.
2015-12-18 12:09:10 +01:00
Felix Lange 1b89bd5d26 core/state, core/types use package rlp for state, receipt serialisation 2015-12-18 12:09:10 +01:00
Felix Lange 9be5d5cd90 eth/downloader: fix negative balance issue in tests
The test chain generated by makeChainFork included invalid uncle
headers, crashing the generator during the state commit.

The headers were invalid because they used the iteration counter as the
block number, even though makeChainFork uses a block with number > 0 as
the parent. Fix this by introducing BlockGen.Number, which allows
accessing the actual number of the block being generated.
2015-12-18 12:09:10 +01:00
Jeffrey Wilcke 2baf1de00d Merge pull request #1925 from fjl/p2p-dial-resolve
p2p: resolve incomplete dial targets
2015-12-18 11:31:55 +01:00
Felix Lange b3f1f4c673 p2p/discover: attempt to deflake TestUDP_responseTimeouts
The test expected the timeout to fire after a matcher for the response
was added, but the timeout is random and fired sooner sometimes.
2015-12-17 23:44:56 +01:00
Felix Lange 6c41e675ec p2p: resolve incomplete dial targets
This change makes it possible to add peers without providing their IP
address. The endpoint of the target node is resolved using the discovery
protocol.
2015-12-17 23:39:49 +01:00
Felix Lange 04c6369a09 p2p, p2p/discover: track bootstrap state in p2p/discover
This change simplifies the dial scheduling logic because it
no longer needs to track whether the discovery table has been
bootstrapped.
2015-12-17 23:38:54 +01:00
Felix Lange d1f507b7f1 p2p/discover: support incomplete node URLs, add Resolve 2015-12-17 23:38:54 +01:00
zsfelfoldi ef422ee1e1 light: implemented odr-capable trie and state structures 2015-12-17 16:07:54 +01:00
Jeffrey Wilcke 82a024d425 Merge pull request #1997 from zsfelfoldi/gasprice2
core: tx pool skip price validation for "owned" transactions
2015-12-17 12:45:45 +01:00