erigon-pulse/core
gary rong ad9e4241b1 all: seperate consensus error and evm internal error (#20830)
* all: seperate consensus error and evm internal error

There are actually two types of error will be returned when
a tranaction/message call is executed: (a) consensus error
(b) evm internal error. The former should be converted to
a consensus issue, e.g. The sender doesn't enough asset to
purchase the gas it specifies. The latter is allowed since
evm itself is a blackbox and internal error is allowed to happen.

This PR emphasizes the difference by introducing a executionResult
structure. The evm error is embedded inside. So if any error
returned, it indicates consensus issue happens.

And also this PR improve the `EstimateGas` API to return the concrete
revert reason if the transaction always fails

* all: polish

* accounts/abi/bind/backends: add tests

* accounts/abi/bind/backends, internal: cleanup error message

* all: address comments

* core: fix lint

* accounts, core, eth, internal: address comments

* accounts, internal: resolve revert reason if possible

* accounts, internal: address comments
# Conflicts:
#	accounts/abi/abi.go
#	accounts/abi/bind/backends/simulated.go
#	cmd/geth/retesteth.go
#	core/state/snapshot/difflayer_test.go
#	core/state/snapshot/disklayer_test.go
#	core/state/snapshot/iterator_test.go
#	core/state_processor.go
#	core/state_transition.go
#	core/vm/evm.go
#	core/vm/instructions.go
#	core/vm/jump_table.go
#	eth/api_tracer.go
#	internal/ethapi/api.go
#	les/odr_test.go
#	light/odr_test.go
#	tests/state_test_util.go
2020-05-20 15:26:22 +03:00
..
asm core/asm: allow numbers in labels (#20362) 2019-12-03 13:55:30 +01:00
bloombits Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
forkid geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
rawdb Staged Sync: Execution phase should use "plain state" (#548) 2020-05-15 08:52:45 +01:00
state MGR Schedule v0 (#550) 2020-05-15 15:58:36 +07:00
types MGR Schedule v0 (#550) 2020-05-15 15:58:36 +07:00
vm all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
bench_test.go Refactor mining. Remove a few mining goroutines (#338) 2020-02-03 15:02:26 +03:00
block_validator_test.go Refactor mining. Remove a few mining goroutines (#338) 2020-02-03 15:02:26 +03:00
block_validator.go Small fixes for download and execute sync stages (#503) 2020-04-30 17:19:24 +01:00
blockchain_insert.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
blockchain_test.go remove pruning option. Inverse enabling pruning logic. (#532) 2020-05-07 14:31:14 +01:00
blockchain.go Staged Sync: Execution phase should use "plain state" (#548) 2020-05-15 08:52:45 +01:00
blocks.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
chain_indexer.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
chain_makers_test.go Refactor mining. Remove a few mining goroutines (#338) 2020-02-03 15:02:26 +03:00
chain_makers.go don't rebuild - because it evicting IH (#427) 2020-04-05 07:33:06 +01:00
dao_test.go Refactor mining. Remove a few mining goroutines (#338) 2020-02-03 15:02:26 +03:00
error.go all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2020-01-30 13:36:30 +02:00
evm.go core/evm: less iteration in blockhash (#20589) 2020-02-27 17:20:36 +03:00
gaspool.go miner: avoid unnecessary work (#15883) 2018-01-15 12:57:06 +02:00
gen_genesis_account.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
gen_genesis.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
generate_index.go sort buckets then sort keys inside buckets, then send data to MultiPut (#553) 2020-05-17 05:46:30 +01:00
genesis_alloc.go geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
genesis_test.go geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00
genesis.go cmd, core: remove override muir glacier and override istanbul (#20942) 2020-05-20 15:26:22 +03:00
headerchain.go Proper unwinding in the staged sync (#521) 2020-05-06 18:42:10 +01:00
mkalloc.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
pruner_test.go [WIP] 459 merge storage account (#466) 2020-04-19 20:51:32 +01:00
pruner.go [WIP] New storage changeset encoding (#493) 2020-04-28 08:41:55 +01:00
root.txt resolver: merge HashBuilder-s and ResolveSet-s, decouple from ResolveRequest-s (#540) 2020-05-11 05:46:07 +01:00
state_prefetcher.go all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
state_processor.go all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
state_transition.go all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
tx_cacher.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_journal.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_list_test.go Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
tx_list.go core: count tx size in slots, bump max size ot 4x32KB (#20352) 2020-01-30 13:36:30 +02:00
tx_noncer.go Remove Copy from IntraBlockState and use references instead of copies in other places. 2019-11-07 13:32:20 +01:00
tx_pool_test.go Remove error param from NewTrieDbState (#408) 2020-03-26 16:21:15 +03:00
tx_pool.go all: seperate consensus error and evm internal error (#20830) 2020-05-20 15:26:22 +03:00
types.go Issue 111: Do not mutate state trie when verifying blocks (#439) 2020-04-13 12:00:44 +02:00