Commit Graph

44 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
Bas van Kervel 936e7473bb quorum: Add README and example files 2016-11-03 15:59:33 +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-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
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
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
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
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
Felix Lange 1a9e66915b common/compiler: simplify solc wrapper
Support for legacy version 0.9.x is gone. The compiler version is no
longer cached. Compilation results (and the version) are read directly
from stdout using the --combined-json flag. As a workaround for
ethereum/solidity#651, source code is written to a temporary file before
compilation.

Integration of solc in package ethapi and cmd/abigen is now much simpler
because the compiler wrapper is no longer passed around as a pointer.

Fixes #2806, accidentally
2016-08-17 17:39:04 +02:00
Bas van Kervel 47ff813012 rpc: refactor subscriptions and filters 2016-08-17 12:59:58 +02:00
Bas van Kervel 4ee00b2309 eth/api: rename signAndSendTransaction to sendTransaction 2016-07-22 13:12:14 +02:00
zsfelfoldi 00787fe781 core: added CheckNonce() to Message interface 2016-07-11 12:35:23 +02:00
zsfelfoldi 3a97280ae8 eth: separate common and full node-specific API and backend service 2016-06-16 17:36:38 +02:00