This commit converts the dependency management from Godeps to the vendor
folder, also switching the tool from godep to trash. Since the upstream tool
lacks a few features proposed via a few PRs, until those PRs are merged in
(if), use github.com/karalabe/trash.
You can update dependencies via trash --update.
All dependencies have been updated to their latest version.
Parts of the build system are reworked to drop old notions of Godeps and
invocation of the go vet command so that it doesn't run against the vendor
folder, as that will just blow up during vetting.
The conversion drops OpenCL (and hence GPU mining support) from ethash and our
codebase. The short reasoning is that there's noone to maintain and having
opencl libs in our deps messes up builds as go install ./... tries to build
them, failing with unsatisfied link errors for the C OpenCL deps.
golang.org/x/net/context is not vendored in. We expect it to be fetched by the
user (i.e. using go get). To keep ci.go builds reproducible the package is
"vendored" in build/_vendor.
This change also deletes generator.go, moving the only interesting line
in it into release.go. The binding has been regenerated with abigen from
develop and solc v0.3.6.
As per GNU GPL requirement I've added the copyright and the license
information as a subcommand as well as a copyright notice when
displaying the help command.
The account manager was previously created by packge cmd/utils as part
of flag processing and then passed down into eth.Ethereum through its
config struct. Since we are starting to create nodes which do not have
eth.Ethereum as a registered service, the code was rearranged to
register the account manager as its own service. Making it a service is
ugly though and it doesn't really fix the root cause: creating nodes
without eth.Ethereum requires duplicating lots of code.
This commit splits utils.MakeSystemNode into three functions, making
creation of other node/service configurations easier. It also moves the
account manager into Node so it can be used by those configurations
without requiring package eth.
We used to have reporting of bad blocks, but it was disabled
before the Frontier release. We need it back because users
are usually unable to provide the full RLP data of a bad
block when it occurs.
A shortcoming of this particular implementation is that the
origin peer is not tracked for blocks received during eth/63
sync. No origin peer info is still better than no report at
all though.
Calls to 'personal' API should be excluded from console history because
they can be called with an account passphrase as argument. The check for
such calls was inverted and didn't work.
geth js stopped the JS runtime after running the first input file
and blocked for pending callbacks. This commit makes it process
all files and enables quitting with Ctrl-C regardless of callbacks.
Error reporting is also improved. If a script fails to load, the error
is printed and includes the backtrace. package jsre now ensures that
otto is aware of the filename, the backtrace will contain them.
Before:
$ geth js bad.js; echo "exit $?"
... log messages ...
exit 0
After:
$ geth js bad.js; echo "exit $?"
... log messages ...
Fatal: JavaScript Error: Invalid number of input parameters
at web3.js:3109:20
at web3.js:4917:15
at web3.js:4960:5
at web3.js:4984:23
at checkWork (bad.js:11:9)
at bad.js:19:1
exit 1
In order to avoid disk thrashing for Accounts and HasAccount,
address->key file mappings are now cached in memory. This makes it no
longer necessary to keep the key address in the file name. The address
of each key is derived from file content instead.
There are minor user-visible changes:
- "geth account list" now reports key file paths alongside the address.
- If multiple keys are present for an address, unlocking by address is
not possible. Users are directed to remove the duplicate files
instead. Unlocking by index is still possible.
- Key files are overwritten written in place when updating the password.
- Manager.Accounts no longer returns an error.
- Manager methods take Account instead of common.Address.
- All uses of Account with unkeyed fields are converted.
The account management API was originally implemented as a thin layer
around crypto.KeyStore, on the grounds that several kinds of key stores
would be implemented later on. It turns out that this won't happen so
KeyStore is a superflous abstraction.
In this commit crypto.KeyStore and everything related to it moves to
package accounts and is unexported.
These changes make prompting behave consistently on all platforms:
* The input buffer is now global.
Buffering was previously set up for each prompt, which can cause weird
behaviour, e.g. when running "geth account update <input.txt" where
input.txt contains three lines. In this case, the first password
prompt would fill up the buffer with all lines and then use only the
first one.
* Print the "unsupported terminal" warning only once.
Now that stdin prompting has global state, we can use it to track
the warning there.
* Work around small liner issues, particularly on Windows.
Prompting didn't work under most of the third-party terminal emulators
on Windows because liner assumes line editing is always available.
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
Added chain configuration options and write out during genesis database
insertion. If no "config" was found, nothing is written to the database.
Configurations are written on a per genesis base. This means
that any chain (which is identified by it's genesis hash) can have their
own chain settings.
When attempting to paste very long lines of text the REPL goes
completely fubar, never completing the paste. Removing the multiline
support "fixes" this.
Long lines of text are usually pasted when deploying contracts and as it
stands right now makes creating new contracts from the REPL impossible.
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.