Commit Graph

942 Commits

Author SHA1 Message Date
Trung Nguyen 600852a5cb
reverted change on the core/blockchain.go 2018-10-05 16:28:10 -04:00
Trung Nguyen 4e22d13b10
fix impossible reorg 2018-10-05 16:17:46 -04:00
Nguyen Kien Trung 40f7d2b8b4 Value Transfer in Private Transactions (#538)
Fix #528
2018-10-01 14:37:05 -04:00
Jitendra Bhurat b55ba5690e formatting 2018-10-01 14:29:37 -04:00
Jitendra Bhurat 2991562244 Locking WriteBlockAndState for Istanbul Consensus 2018-09-24 15:29:00 -04:00
Samer Falah 2131e96da1
Merge pull request #517 from jpmorganchase/private-revert-fix
Fix consensus on private contract failure. Fixes #434
2018-09-18 17:12:22 -04:00
Nguyen Kien Trung f13b6aad4f Travis an unit test fixes (#519)
* Used Tessera as a fall back when Constellation is not available in the host
* Used OSX 10.12 instead of 10.13 to avoid Kernel Extension Consent which is not available in CI environment. Can revert back once Travis CI has ability to disable the consent
* Merged upstream PR/Code to fix tests which have intermittent failures
* Cleaned up .travis.yml build matrix
2018-09-11 11:25:24 -04:00
Joel Burget 1b301d5ead Fix consensus on private contract failure.
Previously we had populated the public receipt `failed` field with the
result of the transaction. This is correct for public transactions. It's
also correct for successful private transactions. But it's not correct
for failing private transactions, because their public receipt should
not indicate failure. The fix is straightforward.

Testing:

I used this contract:

    contract RevertTest{
       uint public newValue;
       function revertFunction() public{
           uint a = 1;
           require(a == 0);
       }
    }

After deploying the contract I sent in several failing transactions via

    function sendBad() {
      eth.sendTransaction({
      from: eth.accounts[0],
      data: web3.sha3("revertFunction()"),
      gas: 0x47b760,
      privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]
      });
    }

Watching the logs (`1.log` and `2.log`), I saw the `TX-ACCEPTED` events
scroll as I sent `revertFunction` transactions. I see 10 `TX-ACCEPTED`
events in both logs (1 for deploy and 9 tests via `sendBad`).

Via extra logging, in `1.log` I see that the public receipts have status
`1`, whereas private receipts have status `0`. In `2.log` they all have
status `1`.

All nodes stayed up the whole time.

Fixes #434
2018-09-08 10:48:29 -07:00
Sai V 8a25cada96 EIP 155 Activation (#502)
Add ChainId validation, add a default networkId and reject network ID 1 for Quorum.
2018-08-23 14:51:13 -04:00
Peter Fox 159d813f35 Transaction signer mismatch fix (#463)
Always use the EIP155 signer for verifying new transactions being added
to the transaction pool and only skip protected public transactions from replay attacks until
we reach EIP155 activation.
2018-08-08 21:30:53 -04:00
Samer Falah 58f291f8ff Reject transactions with not enough gas from being sent (#443)
Fixes #309
2018-08-01 11:13:29 -04:00
Sai V ad7c031e85 eth - Storage root retrieval for accounts (#436)
re-enabling eth_storagRoot call
2018-07-27 08:37:29 -04:00
Satpal e8f0ee9162 Prevent private transaction with ether value from becoming stuck in pending (#451) 2018-07-23 15:34:36 +01:00
Samer Falah 38247083f3
Merge pull request #390 from tsuzukit/feature/fix_blockchain_test
Fix TestChainTxReorgs
2018-07-12 23:33:22 -04:00
Samer Falah 01195280b4 Fixes value transfer (#430) 2018-07-05 13:59:33 -04:00
Qvintvs 87d7c906e9 Use eip155 signer for public transactions (#375)
Use eip155 for public transaction
2018-06-29 16:17:32 -04:00
jpmsam 7608c1c9b8 validate input before calling evm 2018-06-07 15:45:24 -04:00
Tomoaki Tsuzuki 52f137c850 Feature/fix_some_tests (#387)
* same fix as ethereum/go-ethereum#15783
* Fix insufficient balance for transfer
* change chainId of QuorumTestChainConfig
2018-06-04 16:02:09 -04:00
tsuzukit 1b7a3d9710 Fix TestChainTxReorgs 2018-05-31 21:39:51 +09:00
Samer Falah 4a77480371
Merge pull request #354 from tsuzukit/feature/fix-some-tests
Fix TestUpdatedKeyfileContents, TestEIP155SigningVitalik and TestChainId
2018-05-23 11:29:22 -04:00
tsuzukit 9b488857e4 fix TestEIP155SigningVitalik and TestChainId 2018-04-24 20:21:31 +09:00
tsuzukit 8bc31e1968 Use EIP155 signer when needed 2018-04-23 11:06:23 +09:00
jpmsam d78cd97995 increased the minimum gas limit for the network 2018-04-09 23:25:53 -04:00
Patrick Mylund Nielsen bbc8e726e5
Merge pull request #270 from getamis/feature/update_istanbul
consensus, core, eth, miner, params: update istanbul engine
2018-02-27 20:57:21 -05:00
Joel Burget 7672c47b70 fix receipts issue 2018-02-15 16:41:57 -05:00
Joel Burget 85f1bc2998 Add missing private bloom setting / checking. 2018-02-15 16:41:57 -05: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
mark.lin 9ac24f9aaa consensus, core, eth, miner, params: update istanbul engine 2018-01-31 10:27:08 +08:00
Joel Burget e98cb26e9e
Make `IsQuorum: true` default but not forced. 2018-01-30 11:43:20 -05:00
Joel Burget 947e55cfb6 s/evm.StateDB/getDualState
There are a lot of places where we wrongly use the current state db
rather than getting dual state. This should have a larger audit, but
it's a good start, and passes all tests.
2017-11-08 18:05:03 -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
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