plugeth/light
gary rong b9df7ecdc3
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
2020-04-22 11:25:36 +03:00
..
lightchain_test.go all: on-chain oracle checkpoint syncing (#19543) 2019-06-28 10:34:02 +03:00
lightchain.go core, light: write chain data in atomic way (#20287) 2020-01-17 12:49:32 +02:00
nodeset.go all: integrate the freezer with fast sync 2019-05-16 10:39:32 +03:00
odr_test.go all: seperate consensus error and evm internal error (#20830) 2020-04-22 11:25:36 +03:00
odr_util.go les: handler separation (#19639) 2019-08-21 11:29:34 +02:00
odr.go all: on-chain oracle checkpoint syncing (#19543) 2019-06-28 10:34:02 +03:00
postprocess.go les: fix and slim the unit tests of les (#20247) 2019-11-06 22:09:37 +01:00
trie_test.go all: clean up and proerly abstract database access 2019-03-06 13:35:03 +02:00
trie.go core: initial version of state snapshots 2020-02-25 12:51:04 +02:00
txpool_test.go all: on-chain oracle checkpoint syncing (#19543) 2019-06-28 10:34:02 +03:00
txpool.go core, light, params: implement eip2028 (#19931) 2019-08-14 15:53:21 +03:00