Commit Graph

8358 Commits

Author SHA1 Message Date
Péter Szilágyi
158d603528
consensus, core: drop all the legacy custom core error types 2017-04-06 17:34:19 +03:00
Péter Szilágyi
702bef8493
cmd/geth, eth: drop bad block reporting, its offline anyway 2017-04-06 14:25:05 +03:00
Péter Szilágyi
d83a9a8f44
miner: don't verify our own blocks, trust the engine 2017-04-06 12:22:14 +03:00
Felix Lange
3d8de95f99 core, core/types: regenerate JSON marshaling, add "hash" to headers (#13868)
* Makefile: fix devtools target

* core: regenerate genesis marshaling with fjl/gencodec@cbfa5be5a8

* core/types: regenerate marshaling methods with fjl/gencodec@cbfa5be5a8

* core/types: add "hash" to JSON headers
2017-04-06 11:38:21 +03:00
Péter Szilágyi
24b9860c1b cmd/geth, node: surface geth architecture into version (#13866) 2017-04-05 21:51:01 +02:00
Martin Holst Swende
cc303017c3 debug: convert uint64-blocknumber into rpc.Blocknumber (#13862)
* debug: Converted uint64-blocknumber into rpc.Blocknumber

* api/debug: Fix pending block issues in DumpBlock
2017-04-05 17:49:54 +02:00
gary rong
49437a02c9 core/state: make TestSnapshotRandom work again (#3816)
In `touch` operation, only `touched` filed has been changed. Therefore
in the related undo function, only `touched` field should be reverted.
In addition, whether remove this obj from dirty map should depend on
prevDirty flag.
2017-04-05 00:44:16 +02:00
Lewis Marshall
b319f027a0 cmd/swarm, swarm/api/client: add HTTP API client and 'swarm ls' command (#3742)
This adds a swarm ls command which lists files and directories stored in a
manifest. Rather than listing all files, it uses "directory prefixes" in case there are a
lot of files in a manifest but you just want to traverse it.

This also includes some refactoring to the tests and the introduction of a
swarm/api/client package to make things easier to test.
2017-04-05 00:20:07 +02:00
Péter Szilágyi
09777952ee core, consensus: pluggable consensus engines (#3817)
This commit adds pluggable consensus engines to go-ethereum. In short, it
introduces a generic consensus interface, and refactors the entire codebase to
use this interface.
2017-04-05 00:16:29 +02:00
Péter Szilágyi
e50a5b7771 Merge pull request #13856 from karalabe/ethstats-sanity-checks
ethstats: sanity check ethstats history queries
2017-04-04 13:03:34 +03:00
Péter Szilágyi
fb98a8c6c2
ethstats: cut short unavailable history responses 2017-04-04 11:41:17 +03:00
Péter Szilágyi
96d1a4aee6
ethstats: sanity check ethstats history queries 2017-03-31 15:06:54 +03:00
Felix Lange
105b37f1b4 swarm/api: improve FUSE build constraints, logging and APIs (#3818)
* swarm/api: fix build/tests on unsupported platforms

Skip FUSE tests if FUSE is unavailable and change build constraints so
the 'lesser' platforms aren't mentioned explicitly. The test are
compiled on all platforms to prevent regressions in _fallback.go

Also gofmt -w -s because why not.

* internal/web3ext: fix swarmfs wrappers

Remove inputFormatter specifications so users get an error
when passing the wrong number of arguments.

* swarm/api: improve FUSE-related logging and APIs

The API now returns JSON objects instead of strings.
Log messages for invalid arguments are removed.
2017-03-31 12:11:01 +02:00
Péter Szilágyi
c4a0efafd7 Merge pull request #13851 from karalabe/ethstats-url-scheme-discovery
ethstats: work around weird URL scheme parsing issues
2017-03-30 13:25:17 +03:00
Péter Szilágyi
db93641941
ethstats: work around weird URL scheme parsing issues 2017-03-30 12:53:50 +03:00
Felix Lange
1cf2ee4597 build: work around cgo linker issue on macOS 10.12.4 (#13849)
Fixes #3792 by stripping debug symbols.
2017-03-29 12:20:57 +02:00
bas-vk
baf20010e7 core/types: rename txdata.gasLimit -> txdata.gas in JSON (#13848) 2017-03-29 11:59:13 +02:00
Péter Szilágyi
16afb5c468 Merge pull request #13516 from fjl/core-marshal-non-pointer
core, core/types: use non-pointer receiver for Marshal* methods
2017-03-28 15:55:34 +03:00
Péter Szilágyi
225c28716f Merge pull request #3801 from karalabe/ledger-linux-confirm
accounts/usbwallet: fix Ledger hidapi/libusb protocol violation
2017-03-28 09:16:23 +03:00
Felix Lange
aa9a78e463 core, core/types: use non-pointer receiver for Marshal* methods
Regenerated with fjl/gencodec@1a75a21610
Also add ,omitempty to optional GenesisAccount fields.
2017-03-27 13:29:01 +02:00
Péter Szilágyi
7419d0c382 Merge pull request #3820 from fjl/core-types-eip155-chainid-mul
core/types: ensure all EIP155 signer fields are set by deriveSigner
2017-03-27 00:22:34 +03:00
Felix Lange
4be37e91b9 core/types: ensure all EIP155 signer fields are set by deriveSigner
Fixes #3819
2017-03-24 22:06:10 +01:00
Péter Szilágyi
1018bf6a00 rpc: honour pending requests before tearing conn down (#3814) 2017-03-24 12:07:12 +01:00
Péter Szilágyi
37e252587a Merge pull request #3813 from fjl/build-fixes-2
build: unify vendor skipping, always run go vet
2017-03-24 11:52:42 +02:00
Péter Szilágyi
bb7dca275c ethstats: cleanups, trace logs and "fix" history responses (#3812) 2017-03-24 10:42:40 +01:00
Felix Lange
69ac6cc70e travis.yml: re-add missing build commands for Go 1.7 2017-03-24 10:29:20 +01:00
Felix Lange
df1fbe3c06 build: always run go vet
This ensures 'make test' finds all errors that remote CI would find.
Go 1.7 vet reports a false positive in package log, add a workaround.
2017-03-24 10:28:46 +01:00
Péter Szilágyi
8771c3061f Merge pull request #3794 from fjl/core-genesis-refactor
core: refactor genesis handling
2017-03-23 17:36:38 +02:00
Péter Szilágyi
8ff7e55ab5
accounts/usbwallet: if a confirmation is pending, skip refresh 2017-03-23 17:04:39 +02:00
Felix Lange
37dd9086ec core: refactor genesis handling
This commit solves several issues concerning the genesis block:

* Genesis/ChainConfig loading was handled by cmd/geth code. This left
  library users in the cold. They could specify a JSON-encoded
  string and overwrite the config, but didn't get any of the additional
  checks performed by geth.
* Decoding and writing of genesis JSON was conflated in
  WriteGenesisBlock. This made it a lot harder to embed the genesis
  block into the forthcoming config file loader. This commit changes
  things so there is a single Genesis type that represents genesis
  blocks. All uses of Write*Genesis* are changed to use the new type
  instead.
* If the chain config supplied by the user was incompatible with the
  current chain (i.e. the chain had already advanced beyond a scheduled
  fork), it got overwritten. This is not an issue in practice because
  previous forks have always had the highest total difficulty. It might
  matter in the future though. The new code reverts the local chain to
  the point of the fork when upgrading configuration.

The change to genesis block data removes compression library
dependencies from package core.
2017-03-23 15:58:43 +01:00
Felix Lange
67c47459f2 core/types: handle nil ChainId in NewEIP155Signer
All uses of ChainConfig.ChainId eventually end up in NewEIP155Signer.
This fixes the case where users forget to set the ChainId in their
config.
2017-03-23 15:58:42 +01:00
Felix Lange
0f4b75bea2 core/state: expose CommitTo 2017-03-23 15:58:42 +01:00
Felix Lange
d42a56afc5 common: add UnprefixedHash, UnprefixedAddress 2017-03-23 15:58:42 +01:00
Felix Lange
b4547a560b common/hexutil: add UnmarshalFixedUnprefixedText 2017-03-23 15:58:42 +01:00
Felix Lange
04fa6a3744 common/math: add HexOrDecimal64, HexOrDecimal256 2017-03-23 15:58:42 +01:00
Péter Szilágyi
26da6daaa9
accounts/usbwallet: fix Ledger hidapi/libusb protocol violation 2017-03-23 16:51:04 +02:00
Felix Lange
e7911ad9ea build: unify vendor skipping logic
This fixes a recent bug where 'make geth' built everything instead of
just geth.
2017-03-23 15:50:05 +01:00
Zahoor Mohamed
11e7a712f4 swarm/api: support mounting manifests via FUSE (#3690) 2017-03-23 14:56:06 +01:00
Péter Szilágyi
61d2150a07 Merge pull request #3795 from fjl/pow-fix-test-mode
pow: fix Search with ethash test mode
2017-03-23 10:56:12 +02:00
Péter Szilágyi
3fa0fa713b Merge pull request #3809 from fjl/all-use-normal-context
all: import "context" instead of "golang.org/x/net/context"
2017-03-23 10:22:56 +02:00
Felix Lange
f1534f5797 trie, whisper/whisperv5: use math/rand Read function 2017-03-22 20:49:15 +01:00
Felix Lange
9a2720fb35 mobile: remove support for Go < 1.7 2017-03-22 20:49:15 +01:00
Felix Lange
c213fd1fd8 all: import "context" instead of "golang.org/x/net/context"
There is no need to depend on the old context package now that the
minimum Go version is 1.7. The move to "context" eliminates our weird
vendoring setup. Some vendored code still uses golang.org/x/net/context
and it is now vendored in the normal way.

This change triggered new vet checks around context.WithTimeout which
didn't fire with golang.org/x/net/context.
2017-03-22 20:49:15 +01:00
Felföldi Zsolt
525116dbff les: implement request distributor, fix blocking issues (#3660)
* les: implement request distributor, fix blocking issues
* core: moved header validation before chain mutex lock
2017-03-22 20:44:22 +01:00
Péter Szilágyi
1c1dc0e0fc Merge pull request #3808 from fjl/build-go-1.7
build: require Go >= 1.7
2017-03-22 18:49:50 +02:00
Felix Lange
c6e6f1fec2 build: remove support for the GO_OPENCL environment variable
We don't use the opencl build tag anymore.
2017-03-22 16:00:21 +01:00
Felix Lange
da7af44060 build: require Go >= 1.7
We have decided to bump the requirement to Go 1.7 because it enables
subtests and allows dropping backwards-compatibility code. This is in
line with Go's support policy. Go 1.6 and earlier no longer receive
security updates.
2017-03-22 16:00:16 +01:00
Yohann Leon
6742fc526f core/vm: use uint64 instead of *big.Int in tracer (#3805) 2017-03-22 15:32:51 +01:00
Péter Szilágyi
9b84caf3a5 core, eth, les: support resuming fast sync on heavy rollback (#3743) 2017-03-22 01:37:24 +01:00
Felix Lange
06d6685eb5 Merge pull request #3756 from fjl/core-types-gencodec
core/types: use gencodec for JSON marshaling code
2017-03-22 01:36:22 +01:00