Commit Graph

87 Commits

Author SHA1 Message Date
vsmk98 4e3c907531 additionla log messages for permissioning 2018-07-31 01:42:51 +00:00
Qvintvs a67eccbcd8 debug tests 2018-06-01 12:51:35 +08:00
Qvintvs 622e98ad51 debug merge attempt 2018-05-31 14:21:16 +08:00
Qvintvs 4b44bea1d7 Merge attempt 2018-05-31 14:16:44 +08:00
Joel Burget f651c1befa Fix sometimes printing wrong address.
Prior to this fix, a series of submitted transactions in the javascript
console would each show a different "from" field when inspected with
`eth.getTransaction`.

It turns out the transactions were all created with the correct sender,
but were just printed incorrectly. We were using the EIP155Signer when
all Quorum transactions expect the HomesteadSigner.

This fix is not exactly satisfying, since in every other place we've
been able to use an `isQuorum` boolean to tell whether a `v` of `37` or
`38` denotes a quorum private tx, but it's particularly hard to do that
in these two places.
2018-02-02 13:46:41 -05:00
Patrick Mylund Nielsen 3d91976f08
Geth 1.7.2 rebase and addition of Istanbul BFT (#207) 2017-10-31 18:24:11 -04:00
Patrick Mylund Nielsen 9faa0ed123 private: Distinguish between privateFor being absent vs. an empty array to allow self-sending (#165) 2017-09-01 08:54:00 -04:00
Brian Schroeder 5dfdecef4c Dynamic raft membership support (#130) 2017-08-28 17:43:44 -04:00
Patrick Mylund Nielsen 647025ed8a Porosity integration (#155)
* Addition of quorum.runPorosity and quorum.getPrivatePayload
2017-07-27 15:30:13 -04:00
Joel Burget 852ac74467 Raft updates (#104)
* Move raft checkpoint logging to logger package.

This allows us to use it everywhere and turn it on / off from command
flags.

* Return an error when the pending block is requested in Raft mode.
2017-05-04 16:49:48 -04:00
Brian Schroeder 370b9024ec Poll chain state for contract callback invocation
Previously we relied on filters to watch for block events for firing contract-
creation callback functions. With this change, we now poll the chain's state on
the javascript side using `setInterval`.

This is necessary for low-latency consensus mechanisms like Raft, where a block
event reguarly fires before the web3 layer is able to set the filter to watch
for such events.

This fixes #86.
2017-04-10 11:55:55 -04:00
Joel Burget b6286320ef Add Raft-based consensus (#79)
This was implemented by Joel Burget (@joelburget) and Brian Schroeder (@bts).
2017-03-23 13:41:02 -05:00
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