Commit Graph

1470 Commits

Author SHA1 Message Date
Zhou Zhiyao 4b45dd2004 Minor fixes (#803) 2019-08-17 08:37:57 -04:00
Libby Kent 7e87e40340 VM read-only mode: check `operation.writes` not `op.isMutating`.
`op.isMutating()` was added for checking mutating VM operation, but `operation.writes`
should be used now as it registers all mutating ops and is consistent with upstream.
Additionally, there is a new  mutating opcode `CREATE2`, but `CREATE2` has not been added to the
`op.isMutating()` set. The VM is in read-only mode when a private contract calls a public contract.
2019-08-12 10:14:23 -04:00
Brajesh Awasthi baa7efcf3d max code size option in genesis config (#786) 2019-08-02 15:53:15 -04:00
Christian Muehlhaeuser acb00b6cf1 Fixed typos (#781)
Typo fixes.
2019-07-25 15:31:38 -04:00
libby kent e0564f7b41 Adding QuorumPrivateTxSigner for signing and recovering private txs. (#767)
Refactor private transaction signing and add a QuorumPrivateTxSigner for signing and recovering private txs.
2019-07-11 13:32:19 -04:00
Trung Nguyen 74337c7167
added unit tests and comments 2019-06-13 13:41:28 -04:00
Trung Nguyen bacd5dc3c9
non-party must refund gas for private transactions 2019-06-12 17:09:49 -04:00
libby kent d1475ee296 Adding signer tests for EIP155, Homestead and private tx. (#682)
Adding signer tests for EIP155, Homestead and private tx.
2019-05-24 15:46:49 -04:00
Jitendra Bhurat c429b00caa Reading default transaction size limit, if it is 0 2019-04-04 10:58:44 -04:00
Jim Zhang a0c5a63e51 Added an Info log when skipping incorrectly signed txs; cleaned up debug logging 2019-03-28 12:17:16 -04:00
Jim Zhang ff94ad50a0 Check for Sender() return errors before using the resolved sender address, to account for sending EIP155 externally signed txs before the EIP155 block 2019-03-28 12:01:29 -04:00
amalraj.manigmail.com b286409b7a merge with quorum upstream
params: config.go and denomination.go merged with conflicts
2019-03-18 11:43:03 +08:00
amalraj.manigmail.com 849eca21da merge with quorum upstream
params: config.go and denomination.go merged with conflicts
2019-03-18 11:34:09 +08:00
amalraj.manigmail.com 32729b9f28 remove TODO related to review 2019-02-25 16:30:54 +08:00
fixanoid 0f68921124 Renaming to TransactionSizeLimit for clarity 2019-02-14 09:01:22 -05:00
amalraj.manigmail.com 6fb33c0e32 Merge remote-tracking branch 'remotes/origin/master' into AJ-geth-upgrade-1.8.18 2019-02-13 17:26:38 +08:00
fixanoid cca2e84c18 Transaction size limit support via genesis 2019-02-12 17:23:59 -05:00
fixanoid 918aaa83a9 Merge branch 'txn-size-limit-cli' into txn-size-limit-genesis 2019-02-12 11:45:54 -05:00
Samer Falah 07c76cc137
Merge pull request #595 from SatpalSandhu61/fix-for-bad-block-on-gas-limit
Fix for BAD BLOCK caused by "gas limit reached" for private contracts
2019-02-12 10:40:35 -05:00
amalraj.manigmail.com 73667e7942 merge 1.8.18 with quorum/master
refactor raft & istanbul based on upstream changes
fix unit test cases
2019-02-08 17:29:01 +08:00
amalraj.manigmail.com 4dbd95947d Merge branch 'goeth-1.8.18' into geth-upgrade-1.8.18
# Conflicts:
#	.github/CONTRIBUTING.md
#	.travis.yml
#	core/blockchain.go
#	core/vm/evm.go
#	core/vm/logger_test.go
#	eth/handler_test.go
#	eth/tracers/tracer_test.go
#	internal/ethapi/api.go
#	internal/web3ext/web3ext.go
#	p2p/discover/node.go
#	p2p/server.go
#	swarm/network/simulations/discovery/discovery_test.go
2019-01-29 19:08:50 +08:00
amalraj.manigmail.com bc529a509d Merge branch 'goeth-1.8.18' into geth-upgrade-1.8.18
# Conflicts:
#	.github/CONTRIBUTING.md
#	.travis.yml
#	core/blockchain.go
#	core/vm/evm.go
#	core/vm/logger_test.go
#	eth/handler_test.go
#	eth/tracers/tracer_test.go
#	internal/ethapi/api.go
#	internal/web3ext/web3ext.go
#	p2p/discover/node.go
#	p2p/server.go
#	swarm/network/simulations/discovery/discovery_test.go
2019-01-29 19:08:14 +08:00
amalraj.manigmail.com 8e30fc202a Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.18
# Conflicts:
#	consensus/ethash/consensus.go
#	eth/bloombits.go
#	params/protocol_params.go
2019-01-25 22:29:22 +08:00
amalraj.manigmail.com 2914b3c99d Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.18
# Conflicts:
#	consensus/ethash/consensus.go
#	eth/bloombits.go
#	params/protocol_params.go
2019-01-25 22:24:03 +08:00
SatpalSandhu61 895947de48 Currently, we can't tell the reason for evm failure, so change log message for EVM failure reason from Debug to Info. This is helpful to users and makes analysis of issues much easier. 2019-01-10 13:54:38 +08:00
Samer Falah d77cb778ca
Merge pull request #563 from Puneetha17/private_rawtx
Do not reset V value if the tx is already set to private
2019-01-07 09:22:20 -05:00
Trung Nguyen 67c9b4332f
staticcall does not modify states so no need to push to stack 2018-12-11 16:54:18 -05:00
SatpalSandhu61 50da8eaf0d Fix for issue 576 where private transactions can cause block gas limit to be exceeded, leading to BAD BLOCK. 2018-12-10 15:30:28 +00:00
SatpalSandhu61 5af110984a Fix for issue 576 where private transactions can cause block gas limit to be exceeded, leading to BAD BLOCK. 2018-12-10 09:58:16 +00:00
Michael Gu 8ca92333f3
Merge branch 'master' into photic-tx-size-limit 2018-12-05 22:53:18 +02:00
Trung Nguyen 089841e036
added dual state implementation to StaticCall 2018-12-05 13:47:01 -05:00
Samer Falah d4db92f69e
Merge pull request #570 from jbhurat/missing-logs-events
Adding private log blooms to DB in addition to public log bloom
2018-12-02 20:08:30 -05:00
amalraj.manigmail.com 13a9f26f9a Merge remote-tracking branch 'quorum/master' into geth-upgrade-1.8.16 2018-11-29 17:56:02 +08:00
amalraj.manigmail.com 519337a9d0 Merge remote-tracking branch 'quorum/master' into geth-upgrade-1.8.16 2018-11-29 16:57:27 +08:00
Trung Nguyen c2a580217f
fixed method signature 2018-11-28 16:17:05 -05:00
vsmk98 36000ec2a1 changes to set readOnlyDepth only once during the entire opCode execution 2018-11-28 15:01:52 +08:00
amalraj.manigmail.com 7e1aa97d65 core/vm: revert to joel's change to getdualstate. This is a mandatory change for quorum
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.
2018-11-27 11:36:59 +08:00
amalraj.manigmail.com 66d46778e6 Merge remote-tracking branch 'quorum/master' into geth-upgrade-1.8.12
# Conflicts:
#	core/tx_pool_test.go
#	miner/worker.go
2018-11-26 15:17:57 +08:00
Trung Nguyen 99dcc0fd3f
fix unit test for PR 510 2018-11-23 11:20:31 -05:00
Samer Falah 40cf04732e
Merge pull request #510 from nathanawmk/master
Update max transaction size limit.
2018-11-23 10:16:54 -05:00
amalraj.manigmail.com 1783419ce5 core/vm : remove get dual state calls in some op codes as its unnecessary. evm push is setting stateDB to public / private correctly. 2018-11-23 14:51:03 +08:00
amalraj.manigmail.com 33724be5a7 revert to getDualState instead of evm.StateDB as per quorum 2018-11-22 17:08:45 +08:00
amalraj.manigmail.com 8438d79754 update gas limit as per quorum upstream 2018-11-22 15:41:04 +08:00
Michael Gu 927284b420 Add --txsizelimit flag to geth CLI that allows expansion of transaction size limit used by tx_pool.go => validateTx() 2018-11-21 12:56:55 -05:00
gary rong 1212c7b844 core: fix default trie cache limit (#17860) 2018-11-12 18:06:34 +02:00
Corey Lin 1ff152f3a4 rawdb: remove unused parameter for WritePreimages func (#18059)
* rawdb: remove unused parameter for WritePreimages func and modify a
spelling mistake

* rawdb: update the doc for function WritePreimages
2018-11-09 12:51:07 +02:00
Felix Lange 870efeef01
core/state: remove lock (#18065)
The lock in StateDB is useless. It's only held in Copy, but Copy is safe
for concurrent use because all it does is read.
2018-11-08 21:37:19 +01:00
Péter Szilágyi d0675e9d9c
Merge pull request #17982 from holiman/polish_contantinople_extcodehash
core/vm: check empty in extcodehash
2018-11-08 14:26:04 +02:00
Corey Lin a5dc087845 core/vm, eth/tracers: use pointer receiver for GetRefund (#18018) 2018-11-08 13:07:15 +01:00
Puneetha 4658a1542e Do not reset V value if the tx is already set to private 2018-11-07 17:22:45 +00:00