Commit Graph

22 Commits

Author SHA1 Message Date
Bas van Kervel 9bb4635f70 cmd,eth enforce gas price of 0 2016-11-15 18:40:08 +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
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 2c2e389b77 cmd, core, eth, miner, params, tests: finalize the DAO fork 2016-07-15 16:52:55 +03:00
Péter Szilágyi 3291235711 accounts, core, eth: pass chain config for chain maker to test DAO 2016-07-15 16:52:55 +03:00
Péter Szilágyi 461cdb593b core, params, tests: add DAO hard-fork balance moves 2016-07-15 16:52:55 +03:00
Péter Szilágyi 6362a9d610 Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"
This reverts commit 7a5b571c67.
2016-06-29 11:44:51 +03:00
Péter Szilágyi d55fc35df1 Revert "core: add voting and result tracking for the dao soft-fork"
This reverts commit c4de28938f.
2016-06-29 11:44:40 +03:00
Péter Szilágyi 67e9d33486 Revert "core: update DAO soft-fork number, clean up the code"
This reverts commit ba784bdf36.
2016-06-29 11:44:29 +03:00
Péter Szilágyi 219859f8bb Revert "core: update the DAO soft fork proposal to the final block"
This reverts commit 1e3a7d4fab.
2016-06-29 11:44:03 +03:00
Péter Szilágyi 1e3a7d4fab core: update the DAO soft fork proposal to the final block 2016-06-24 15:24:09 +03:00
Péter Szilágyi ba784bdf36 core: update DAO soft-fork number, clean up the code 2016-06-23 17:16:43 +03:00
Péter Szilágyi c4de28938f core: add voting and result tracking for the dao soft-fork 2016-06-23 16:43:35 +03:00
Jeffrey Wilcke 7a5b571c67 test, cmd/evm, core, core/vm: illegal code hash implementation
This implements a generic approach to enabling soft forks by allowing
anyone to put in hashes of contracts that should not be interacted from.
This will help "The DAO" in their endevour to stop any whithdrawals from
any DAO contract by convincing the mining community to accept their code
hash.
2016-06-22 11:38:25 +03:00
Felix Lange d04a2e7557 all: update license information 2016-04-15 09:48:05 +02:00
Jeffrey Wilcke f0cbebb19f core: added basic chain configuration
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.
2016-04-01 01:01:10 +02:00
Jeffrey Wilcke 14013372ae core: Added EVM configuration options
The EVM is now initialised with an additional configured object that
allows you to turn on debugging options.
2016-03-23 23:02:42 +01:00
Leif Jurvetson b7bb2d8589 core: various typos 2016-03-15 11:08:18 -07:00
Gustav Simonsson 371871d685 parmas, crypto, core, core/vm: homestead consensus protocol changes
* change gas cost for contract creating txs
* invalidate signature with s value greater than secp256k1 N / 2
* OOG contract creation if not enough gas to store code
* new difficulty adjustment algorithm
* new DELEGATECALL op code
2016-02-18 10:08:11 +01:00
Jeffrey Wilcke a1d9ef48c5 core, eth, rpc: split out block validator and state processor
This removes the burden on a single object to take care of all
validation and state processing. Now instead the validation is done by
the `core.BlockValidator` (`types.Validator`) that takes care of both
header and uncle validation through the `ValidateBlock` method and state
validation through the `ValidateState` method. The state processing is
done by a new object `core.StateProcessor` (`types.Processor`) and
accepts a new state as input and uses that to process the given block's
transactions (and uncles for rewords) to calculate the state root for
the next block (P_n + 1).
2015-11-18 14:24:42 +01:00