Commit Graph

31 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
Jeffrey Wilcke 9d5d5dd3e5 core, eth: support private state log and bloom filtering 2017-02-16 11:17:29 +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 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 1291778032
cmd/geth, code, eth/downloader: tune import logs and mem stats 2016-10-21 12:23:39 +03:00
Bas van Kervel bb8059f6aa core: ensure the canonical block is written before the canonical hash is set 2016-08-16 15:21:22 +02: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
zsfelfoldi f9917c8c7b core: improved chainDb using sequential keys 2016-06-07 16:38:56 +02:00
Jeffrey Wilcke 9055c16efa accounts/a/b/backends, core: chain maker homestead block set to 0
The chain maker and the simulated backend now run with a homestead phase
beginning at block 0 (i.e. there's no frontier).

This commit also fixes up #2388
2016-04-01 01:01:10 +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 434e4b31d8 core, eth: replace reorganiz with reorganis 2016-03-15 12:03:17 -07:00
Leif Jurvetson b7bb2d8589 core: various typos 2016-03-15 11:08:18 -07:00
zsfelfoldi 73d21ea6af core: create a header chain structure shared by core.BlockChain and light.LightChain 2016-03-10 14:57:32 +01:00
Jeffrey Wilcke ba3fb9e6f4 core: announce ChainSideEvent during reorg
Previously all blocks that were already in our chain were never re
announced as potential uncle block (e.g. ChainSideEvent). This is
problematic during mining where you want to gather as much possible
uncles as possible increasing the profit. This is now addressed in this
PR where during reorganisations of chains the old chain is regarded as
uncles.

Fixed #2298
2016-03-08 16:12:48 +01:00
Jeffrey Wilcke 987c1a595a eth/filters: pending logs
Pending logs are now filterable through the Go API. Filter API changed
such that each filter type has it's own bucket and adding filter
explicitly requires you specify the bucket to put it in.
2016-02-13 13:14:02 +01:00
Jeffrey Wilcke 9901a40f04 core: added a new RemovedLogEvent
When a chain reorganisation occurs we collect the logs that were deleted
during the chain reorganisation. The removed logs are posted to the
event mux indicating that those were deleted during the reorg.
2015-12-01 12:12:30 +01:00
Péter Szilágyi 1e806c4c77 cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks 2015-11-27 11:06:12 +02:00
Péter Szilágyi e86e0ecdc8 core, eth, miner, xeth: clean up tx/receipt db accessors 2015-11-19 16:03:32 +02: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
Péter Szilágyi 5b0ee8ec30 core, eth, trie: fix data races and merge/review issues 2015-10-21 16:49:55 +03:00
Péter Szilágyi a9d8dfc8e7 core, eth: roll back uncertain headers in failed fast syncs 2015-10-19 10:03:10 +03:00
Péter Szilágyi b97e34a8e4 eth/downloader: concurrent receipt and state processing 2015-10-19 10:03:10 +03:00
Péter Szilágyi 832b37c822 core, eth: receipt chain reconstruction 2015-10-19 10:03:09 +03:00
Péter Szilágyi c33cc382b3 core: support inserting pure header chains 2015-10-19 10:03:09 +03:00
Jeffrey Wilcke 20ab29f885 core: fixed head write on block insertion
Due to a rebase this probably got overlooked / ignored. This fixes the
issue of a block insertion never writing the last block.
2015-10-05 17:00:59 +02:00
Jeffrey Wilcke 7c7692933c cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain
* Checkpointing is no longer required and never really properly worked
when the state was corrupted.
2015-10-04 01:13:56 +02:00