Commit Graph

75 Commits

Author SHA1 Message Date
Patrick Mylund Nielsen f5e86643ed internal.ethapi.api: Async improves performance in high-latency environments, not low-latency 2016-12-20 12:52:53 -05:00
Patrick Mylund Nielsen f9c5b9caaf internal.ethapi.api: Avoid doing any callback-related work if callbackUrl isn't set in Async 2016-12-20 12:45:06 -05:00
Patrick Mylund Nielsen 5c9bcbb5a8 internal.ethapi.api: Remove unnecessary pool field from Async 2016-12-20 12:38:01 -05:00
Patrick Mylund Nielsen d400d62448 internal.ethapi.api: Only send callback if set 2016-12-19 22:45:55 -05:00
Patrick Mylund Nielsen 0c05f9fde1 Add temporary SendTransactionAsync to PublicTransactionPoolAPI (#32) 2016-12-19 22:38:26 -05:00
Patrick Mylund Nielsen 9d0d3290bb internal/ethapi/api: Chop '0x' in GetQuorumPayload if present 2016-12-02 14:17:40 -05:00
Patrick Mylund Nielsen 45d697ec31 internal/ethapi/api: In GetQuorumPayload, return error if PrivateTransactionManager is not enabled (rather than panic) 2016-12-02 10:27:39 -05:00
Patrick Mylund Nielsen a89830da85 Add PublicBlockChainApi.GetQuorumPayload 2016-12-01 16:40:33 -05:00
Bas van Kervel 9bb4635f70 cmd,eth enforce gas price of 0 2016-11-15 18:40:08 +01:00
Chetan Sarva ad9d04d6ba Fix SetPrivate and validation
* Builds on the fix in c828292fa2c009e2865b1f0d521a080499a234d8;
* SetPrivate() must be called after the tx has been signed and
* just before inserting into txpool.

* Added 37 & 38 as valid V values in validation routine
2016-11-14 23:48:10 -05:00
Patrick Mylund Nielsen c828292fa2 SetPrivate after tx has been populated 2016-11-14 19:26:11 -05:00
Patrick Mylund Nielsen 45a668d8ab Additional private integration points 2016-11-14 18:53:14 -05:00
Patrick Mylund Nielsen 3df813ec8e go fmt 2016-11-14 00:35:27 -05:00
Patrick Mylund Nielsen 13eb8db520 Add temporary PrivateTransactionManager integration 2016-11-14 00:33:56 -05:00
Jeffrey Wilcke ebe1f0eebe Merge pull request #11 from bas-vk/rpc-storageroot
web3ext: add eth_storageRoot RPC method to console
2016-11-09 15:32:41 +01:00
Bas van Kervel 936e7473bb quorum: Add README and example files 2016-11-03 15:59:33 +01:00
Bas van Kervel 6a2a16702a web3ext: add eth_storageRoot RPC method to console 2016-11-03 11:07:03 +01:00
Jeffrey Wilcke 763f939f47 core, core/vm: dual state & read only EVM
This commit implements a dual state approach. The dual state approach
separates public and private state by making the core vm environment
context aware.

Although not currently implemented it will need to prohibit value
transfers and it must initialise all transactions from accounts on the
public state. This means that sending transactions increments the
account nonce on the public state and contract addresses are derived
from the public state when initialised by a transaction. For obvious
reasons, contract created by private contracts are still derived from
public state.

This is required in order to have consensus over the public state at all
times as non-private participants would still process the transaction on
the public state even though private payload can not be decrypted. This
means that participants of a private group must do the same in order to
have public consensus. However the creation of the contract and
interaction still occurs on the private state.

It implements support for the following calling model:

S: sender, (X): private, X: public, ->: direction, [ ]: read only mode

1. S -> A -> B
2. S -> (A) -> (B)
3. S -> (A) -> [ B -> C ]

It does not support

1. (S) -> A
2. (S) -> (A)
3. S -> (A) -> B

Implemented "read only" mode for the EVM. Read only mode is checked
during any opcode that could potentially modify the state. If such an
opcode is encountered during "read only", it throws an exception.

The EVM is flagged "read only" when a private contract calls in to
public state.
2016-11-01 12:57:26 +01:00
Bas van Kervel f7cb85824c quorum integration 2016-10-30 09:20:48 +01:00
bas-vk b59c8399fb internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940)
This commit includes several API changes:

- The behavior of eth_sign is changed. It now accepts an arbitrary
  message, prepends the well-known string

        \x19Ethereum Signed Message:\n<length of message>

  hashes the result using keccak256 and calculates the signature of
  the hash. This breaks backwards compatability!
  
- personal_sign(hash, address [, password]) is added. It has the same
  semantics as eth_sign but also accepts a password. The private key
  used to sign the hash is temporarily unlocked in the scope of the
  request.
  
- personal_recover(message, signature) is added and returns the
  address for the account that created a signature.
2016-10-28 21:25:49 +02:00
Péter Szilágyi 289b30715d Godeps, vendor: convert dependency management to trash (#3198)
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.
2016-10-28 19:05:01 +02:00
Felix Lange 66ee2dec53 internal/ethapi: add debug.chaindbCompact 2016-10-20 14:37:01 +02:00
Felix Lange 6952fe3a5c Merge pull request #3100 from kobigurk/develop
internal/ethapi, internal/web3ext: adds raw tx retrieval methods
2016-10-17 16:55:28 +02:00
Péter Szilágyi 81b01f1c2b Merge pull request #3111 from obscuren/gas-price-fork
core, core/vm: added gas price variance table (EIP #150)
2016-10-14 19:32:11 +03:00
Jeffrey Wilcke 64af2aafda core, core/vm: added gas price variance table
This implements 1b & 1c of EIP150 by adding a new GasTable which must be
returned from the RuleSet config method. This table is used to determine
the gas prices for the current epoch.

Please note that when the CreateBySuicide gas price is set it is assumed
that we're in the new epoch phase.

In addition this PR will serve as temporary basis while refactorisation
in being done in the EVM64 PR, which will substentially overhaul the gas
price code.
2016-10-14 18:09:17 +02:00
Nick Johnson 9e9bfc4e26 metrics, internal/debug: Add --pprofaddr flag, expose metrics via gexp 2016-10-14 12:29:08 +01:00
Kobi Gurkan 1a6682c21d internal/ethapi, internal/web3ext: adds raw tx retrieval methods 2016-10-10 12:57:15 +03:00
Felix Lange c88e435724 Merge pull request #3088 from bas-vk/rpc-block-output
core/types: renamed receiptRoot to receiptsRoot
2016-10-06 18:32:27 +02:00
Jeffrey Wilcke 7335a70a02 Merge pull request #3092 from fjl/state-journal
core/state: implement reverts by journaling all changes
2016-10-06 16:14:22 +02:00
Felix Lange 1f1ea18b54 core/state: implement reverts by journaling all changes
This commit replaces the deep-copy based state revert mechanism with a
linear complexity journal. This commit also hides several internal
StateDB methods to limit the number of ways in which calling code can
use the journal incorrectly.

As usual consultation and bug fixes to the initial implementation were
provided by @karalabe, @obscuren and @Arachnid. Thank you!
2016-10-06 15:32:16 +02:00
Bas van Kervel 6c959207db internal/ethapi: bugfix gas price and limit swapped in eth_resend 2016-10-05 14:21:03 +02:00
Bas van Kervel 71e8ae01b8 core/types: renamed receiptRoot to receiptsRoot 2016-10-05 12:24:42 +02:00
Felix Lange 82e09c17a9 internal/build: fix git tag env variable for AppVeyor 2016-10-03 17:19:43 +02:00
Felix Lange b4b5921dd0 internal/build: use less edgy command to get the branch name 2016-10-03 10:22:14 +02:00
Péter Szilágyi d4b55fc5b2 Merge pull request #3066 from fjl/build-env
build: improve debian packaging
2016-10-02 14:44:30 +03:00
Felix Lange 4f7627972e build: improve debian packaging
This commit tweaks the debian packaging tool:

* All build environment metadata can now be overriden on the command
  line. This allows testing the CI build behaviour locally.
* -unstable packages now actually contain the binaries (oops)
* packages use Go 1.7 to build
* archiving is skipped for PR builds
2016-10-02 13:08:56 +02:00
Péter Szilágyi cb84e3f029 cmd, core, internal, light, tests: avoid hashing the code in the VM 2016-10-01 16:01:58 +03:00
Péter Szilágyi 710435b51b core, eth, trie: reuse trie journals in all our code 2016-09-28 11:27:31 +03:00
Felix Lange a59a93f476 core/state: track all accounts in canon state
This change introduces a global, per-state cache that keeps account data
in the canon state. Thanks to @karalabe for lots of fixes.
2016-09-26 10:09:52 +02:00
Péter Szilágyi 2924fdfcf7 ethereum, ethclient: add SyncProgress API endpoint 2016-09-06 13:41:43 +03:00
Péter Szilágyi 0ef327bbee core, eth, internal, miner: optimize txpool for quick ops 2016-09-02 14:12:03 +03:00
Péter Szilágyi 795b70423e core, eth, miner: only retain 1 tx/nonce, remove bad ones 2016-09-02 14:12:03 +03:00
ΞTHΞЯSPHΞЯΞ 4d300e4dec swarm: plan bee for content storage and distribution on web3
This change imports the Swarm protocol codebase. Compared to the 'swarm'
branch, a few mostly cosmetic changes had to be made:

* The various redundant log message prefixes are gone.
* All files now have LGPLv3 license headers.
* Minor code changes were needed to please go vet and make the tests
  pass on Windows.
* Further changes were required to adapt to the go-ethereum develop
  branch and its new Go APIs.

Some code has not (yet) been brought over:

* swarm/cmd/bzzhash: will reappear as cmd/bzzhash later
* swarm/cmd/bzzup.sh: will be reimplemented in cmd/bzzup
* swarm/cmd/makegenesis: will reappear somehow
* swarm/examples/album: will move to a separate repository
* swarm/examples/filemanager: ditto
* swarm/examples/files: will not be merged
* swarm/test/*: will not be merged
* swarm/services/swear: will reappear as contracts/swear when needed
2016-08-31 16:19:40 +02:00
gregg dourgarian 8dbf59fec5 common,internal: typo/misspelling fixes (#2953) 2016-08-27 15:05:09 +03:00
Felix Lange b0d9f7372a internal/ethapi: add missing output fields
- returned headers didn't include mixHash
- returned transactions didn't include signature fields
- empty transaction input was returned as "", but should be "0x"
- returned receipts didn't include the bloom filter
- "root" in receipts was missing 0x prefix
2016-08-04 01:40:50 +02:00
Nick Johnson 8923325d5c internal/ethapi: Fix bug in opCodeWrapper usage 2016-08-24 16:10:29 +01:00
Nick Johnson d20238c2a7 internal/ethapi: Improve tracer error reporting and serialization 2016-08-24 13:17:55 +01:00
Nick Johnson 2f99720901 core/vm, eth: Add support for javascript trace functions 2016-08-23 15:06:39 +01:00
Nick Johnson 781915f183 core/vm: Refactor tracing to make Tracer the main interface
This CL makes several refactors:
 - Define a Tracer interface, implementing the `CaptureState` method
 - Add the VM environment as the first argument of
   `Tracer.CaptureState`
 - Rename existing functionality `StructLogger` an make it an
   implementation of `Tracer`
 - Delete `StructLogCollector` and make `StructLogger` collect the logs
   directly
 - Change all callers to use the new `StructLogger` where necessary and
   extract logs from that.
 - Deletes the apparently obsolete and likely nonfunctional 'TraceCall'
   from the eth API.

Callers that only wish accumulated logs can use the `StructLogger`
implementation straightforwardly. Callers that wish to efficiently
capture VM traces and operate on them without excessive copying can now
implement the `Tracer` interface to receive VM state at each step and
do with it as they wish.

This CL also removes the accumulation of logs from the vm.Environment;
this was necessary as part of the refactor, but also simplifies it by
removing a responsibility that doesn't directly belong to the
Environment.
2016-08-22 09:26:15 +01:00
Felix Lange 475521dd74 Merge pull request #2909 from fjl/account-manager-cleanup
all: clean up tech debt left behind by the API split
2016-08-17 20:59:59 +02:00