Commit Graph

912 Commits

Author SHA1 Message Date
Patrick Mylund Nielsen 3d91976f08
Geth 1.7.2 rebase and addition of Istanbul BFT (#207) 2017-10-31 18:24:11 -04:00
bas-vk 7af924507b Failing tests (#179)
* rpc: remove raft from default IPC API list

* core: fix timeout in TestReorgLongBlocks
2017-09-13 16:53:54 -04:00
Guilherme Salgado 2ea6e55def Fix TestPrivateTransaction to actually create private transactions (#144)
It now creates private transactions, but that means it now needs to run
constellation in a subprocess, so do that as well
2017-08-01 05:54:29 -07:00
Samer Falah 42852c31fa Merge pull request #129 from s-matthew-english/readability_improvements
docs, raft, core: general readability improvements
2017-07-29 00:45:22 +08:00
Patrick Mylund Nielsen 647025ed8a Porosity integration (#155)
* Addition of quorum.runPorosity and quorum.getPrivatePayload
2017-07-27 15:30:13 -04:00
s.matthew.english b0aaf68e31 Add extension to README files render markdown, readability improvemewnts to core/quorum/
Remove unused TestBlockVotingBlockMaker function

Readability improvments to comments for core/quorum/ and raft/

Readability improvments to raft/speculative_chain.go

Readability improvments to docs/
2017-06-09 10:59:09 +02:00
Brian Schroeder 22b5aed11c Serialize posting of chain insertion events
This is necessary to avoid race conditions for low-latency consensus mechanisms
(like Raft) -- `ChainHeadEvent`s should always be posted in order, and the
existing code could violate this due to asynchronously sending-off events.

Now we sychronously send events in-order, but do so through a buffered
intermediary channel (`chainEvents`) so that publishing them is still
asynchronous.
2017-04-10 11:55:43 -04:00
Brian Schroeder b89d59f9c7 Always use InsertChain to extend the chain
This fixes posting of logs on the minter.
2017-03-31 10:02:42 -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
Jeffrey Wilcke 9d5d5dd3e5 core, eth: support private state log and bloom filtering 2017-02-16 11:17:29 +01:00
Bas van Kervel b7ebb712f1 params: raise gas limit parameter values 2017-02-07 11:18:51 +01:00
Brian Schroeder 65a8d807f6 state: take write lock in GetNonce
We must take a write lock here because `GetNonce` calls
`StateDB.GetStateObject`, which mutates the DB's live set.
2017-02-01 11:17:54 -05:00
Bas van Kervel de210f976d
core: init pending state in tx pool on creation 2017-01-13 21:22:00 +01:00
Patrick Mylund Nielsen 6d0bd81048 Revert "core/quorum: check if transaction was already applied" (#33) 2016-12-19 22:46:18 -05:00
Bas van Kervel 269a7ee8d4 core/quorum: check if transaction was already applied
Due to the asynchronous eventing system its possible that transactions
are applied on the pending state multiple times. Once with the TxPreEvent
event and once as a result of the ChainHeadEvent that will fetch all
processable transaction from the transaction pool. This leads to an
invalid nonce message.

This PR will keep track of transactions applied to the pending state
and will verify that an transaction was not applied before.
2016-11-21 12:31:24 +01:00
Bas van Kervel 9653112893 quorum: retrieve nonce from txpool instead of pending state 2016-11-18 13:58:52 +01:00
Jeffrey Wilcke 591b463b32 core: added small private test framework
For an example on how to create such a test run: `godep -hhtp=:6060 and
navigate to http://localhost:6060/pkg/github.com/ethereum/go-ethereum/core/#example_MakeCallHelper
2016-11-17 14:14:05 +01:00
Jeffrey Wilcke 1097bdb1b6 core, eth: Fixed creation if private addresses on public state
Whenever a private transaction was initiated and executed the address
would be created on the public state when initialising the initial Call.
To prevent this we use the msg's address rather than using the to method
on the state transition object.

Improved private transaction tests by checking existance of private and
public addresses on the incorrect state.
2016-11-17 13:22:58 +01:00
Jeffrey Wilcke fb5564a7de core: added private tx test, added PrivateMessage
PrivateMessage embeds Message and requires IsPrivate() bool to be
defined on the implementation.
2016-11-17 12:15:04 +01:00
Jeffrey Wilcke 410edf0b1a core: set correct public state for all state transition functions
Fixed an issue where public state and private state were mixed during
the initial phase of the state transition. This causes severe issues
when creating new contracts (and addresses) and messes up the public
nonce, which, indirectly, has an effect on the contracts that are
created on the public state for both public and private txs.
2016-11-17 00:05:44 +01:00
Patrick Mylund Nielsen 23201564ff Merge pull request #7 from jpmorganchase/incrementignored
Increment sender nonce even if we are ignoring a private transaction
2016-11-16 13:08:39 -05:00
Patrick Mylund Nielsen 46d00bf639 Return zero gas usage on private transactions whether or not you're party to the transaction 2016-11-16 13:03:42 -05:00
Patrick Mylund Nielsen 497ab68ce0 Increment sender nonce even if we are ignoring a private transaction 2016-11-16 12:57:41 -05:00
Bas van Kervel c371524cbb eth: look in private an public state on reading state data 2016-11-16 18:51:06 +01:00
Jeffrey Wilcke 6d75c3b1c0 core/quorum, core: add private transaction state processing 2016-11-16 15:53:42 +01:00
Bas van Kervel 9bb4635f70 cmd,eth enforce gas price of 0 2016-11-15 18:40:08 +01:00
Patrick Mylund Nielsen 3c536c7db7 Remove whitespace in state_transition.go 2016-11-14 00:34:50 -05:00
Patrick Mylund Nielsen 13eb8db520 Add temporary PrivateTransactionManager integration 2016-11-14 00:33:56 -05:00
bas-vk 70a49efaf6 Merge pull request #14 from bas-vk/votetxpriority
core/types,core/quorum: give vote transactions priority
2016-11-09 16:04:58 +01:00
Bas van Kervel 2a133748cb core/types,core/quorum: give vote transactions priority 2016-11-09 16:04:29 +01:00
Jeffrey Wilcke 9a13f094e5 Merge pull request #10 from bas-vk/callvmenv
core,eth: support calling public accounts
2016-11-09 15:33:17 +01:00
Bas van Kervel 936e7473bb quorum: Add README and example files 2016-11-03 15:59:33 +01:00
Bas van Kervel d3a871c2f4 core,eth: support calling public accounts 2016-11-03 09:51:01 +01:00
Jeffrey Wilcke 9392153a75 Merge pull request #5 from obscuren/private-tx
core, core/types: implemented private transaction check
2016-11-02 16:35:18 +01:00
Jeffrey Wilcke 1ad23deb8e core, core/types: implemented private transaction check
Transactions are considered private when the V param is either 37 or 38.
2016-11-01 22:25:59 +01:00
Bas van Kervel fb486961d6 core, eth: add support for storage root retrieval for accounts 2016-11-01 17:33:56 +01:00
Jeffrey Wilcke e7815c59f0 core: identify private transactions 2016-11-01 12:57:26 +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
Péter Szilágyi f0dbec0c93
cmd, params: only set default fork configs for test and mainnet 2016-10-29 17:07:07 +03:00
Péter Szilágyi 8639b0fae9
cmd/utils, core, params: explicitly pick reprice fork for fast sync 2016-10-29 12:10:00 +03: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
Hao Bryan Cheng 89014b4524 core/vm: Ignore EnableJit ChainConfig setting (#3166) 2016-10-21 17:35:03 +02:00
Péter Szilágyi 1291778032
cmd/geth, code, eth/downloader: tune import logs and mem stats 2016-10-21 12:23:39 +03:00
Péter Szilágyi 88a593d559
cmd/geth, trie: report on trie cache unloads, also add debug log 2016-10-19 17:31:19 +03:00
Péter Szilágyi 4f46bd19d0
cmd, core/state: allow configurable trie cache generations 2016-10-19 14:55:13 +03:00
Jeffrey Wilcke ca49510e6d Merge pull request #3168 from benjaminbrent/develop
core/vm: fix GASPRICE string (resolves #2553)
2016-10-19 13:36:13 +02:00
Jeffrey Wilcke 25ac04a444 Merge pull request #3153 from fjl/trie-unload-fix
trie: improve cache unloading mechanism
2016-10-19 13:35:49 +02:00
Benjamin Brent 55522373fd core/vm: fix GASPRICE string (resolves #2553) 2016-10-19 15:55:34 +11:00
Jeffrey Wilcke 5b262ff5ab Merge pull request #3156 from holiman/metrics-blocks
core: Add block processing time metric collection
2016-10-18 13:26:31 +02:00