quorum/core/vm
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
..
runtime core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
analysis.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
asm.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
common.go core: Added EVM configuration options 2016-03-23 23:02:42 +01:00
contract.go cmd, core, internal, light, tests: avoid hashing the code in the VM 2016-10-01 16:01:58 +03:00
contracts.go core/vm: hide ecrecover error message 2016-08-05 23:12:52 +02:00
disasm.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
doc.go all: update license information 2016-04-15 09:48:05 +02:00
environment.go core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
errors.go parmas, crypto, core, core/vm: homestead consensus protocol changes 2016-02-18 10:08:11 +01:00
gas.go core, core/vm: added gas price variance table 2016-10-14 18:09:17 +02:00
instructions.go core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
jit.go core/state: rename Delete/IsDeleted to Suicide/HasSuicided 2016-10-06 15:32:17 +02:00
jit_optimiser.go all: update license information 2016-04-15 09:48:05 +02:00
jit_test.go core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
jit_util.go all: update license information 2016-04-15 09:48:05 +02:00
jit_util_test.go all: fix go vet warnings 2016-04-15 11:17:27 +02:00
jump_table.go all: update license information 2016-04-15 09:48:05 +02:00
jump_table_test.go all: update license information 2016-04-15 09:48:05 +02:00
log.go core/types, core/vm: improve docs, add JSON marshaling methods 2016-08-04 03:55:33 +02:00
log_test.go core/types, core/vm: improve docs, add JSON marshaling methods 2016-08-04 03:55:33 +02:00
logger.go core/vm: Refactor tracing to make Tracer the main interface 2016-08-22 09:26:15 +01:00
logger_test.go cmd, core, internal, light, tests: avoid hashing the code in the VM 2016-10-01 16:01:58 +03:00
memory.go cmd/geth, cmd/utils, core, rpc: renamed to blockchain 2015-10-04 01:13:56 +02:00
opcodes.go core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
segments.go core/vm: Refactor tracing to make Tracer the main interface 2016-08-22 09:26:15 +01:00
stack.go core/vm: Refactor tracing to make Tracer the main interface 2016-08-22 09:26:15 +01:00
util_test.go core, core/vm: added gas price variance table 2016-10-14 18:09:17 +02:00
virtual_machine.go core: Added EVM configuration options 2016-03-23 23:02:42 +01:00
vm.go core, core/vm: dual state & read only EVM 2016-11-01 12:57:26 +01:00
vm_jit.go core: various typos 2016-03-15 11:08:18 -07:00
vm_jit_fake.go core: added basic chain configuration 2016-04-01 01:01:10 +02:00