Commit Graph
1840 Commits
Author SHA1 Message Date
Austin Roberts 299b5cb05c Merge tag 'v1.10.6' into develop 2021-10-18 11:08:43 -05:00
Austin Roberts a693104bcb Fix blockchain hook tests. 2021-09-30 13:56:04 -05:00
Austin Roberts 9249a67e45 Included total difficulty with new head callback 2021-09-20 11:23:37 -05:00
Austin Roberts 4f6c8eacb3 Include code in state updates hook 2021-09-20 10:49:56 -05:00
philip-morlier 3af3c8c951 Changes to core/blockchain_hook_test, core/state/plugin_hooks, and eth/plugin_hooks to reslove issues discovered in pull review 9-17-21 2021-09-17 12:11:30 -07:00
Austin Roberts f7307d527d Updates to support blockupdates plugin
This makes several updates to support the blockupdates plugin.

I had to update several hooks that were using the wrong types, and
provide a way to get event.Feed objects into plugins without importing
event.Feed (which I did by having the plugin loader make them
available).
2021-09-16 16:04:36 -05:00
Austin Roberts 7b33b6e821 Add chainconfig to backend 2021-09-14 17:44:25 -05:00
philip-morlier c36c999383 utils refactor work from the week 2021-09-03 15:20:49 -07:00
Austin Roberts 0d5af1c7dc Add Len() to Stack 2021-09-02 16:26:40 -05:00
philip-morlier f615e3813d Modified hooks for plugeth-utils functionality 2021-09-01 13:34:03 -07:00
Austin Roberts 8291edc416 A couple of translation examples plus todos for Philip 2021-08-31 15:51:41 -05:00
Austin Roberts 40377543bf Add plugin hook tester 2021-08-25 14:00:27 -05:00
gary rong 370680a7a9 core/types: revert removal of legacy receipt support (#23247)
* Revert "core/types: go generate (#23177)"

This reverts commit 00b922fc5d.

* Revert "core/types: remove LogForStorage type (#23173)"

This reverts commit 7522642393.

* Revert "core/types: remove support for legacy receipt/log storage encoding (#22852)"

This reverts commit 643fd0efc6.
2021-07-22 15:43:51 +02:00
Marius van der WijdenandMartin Holst Swende 97aacd9b35 core: fix pre-check for account balance under EIP-1559 (#23244)
When processing a transaction with London fork rules, EIP-1559 mandates
checking that the sender must have sufficient balance to cover gas * gasFeeCap.

In the EIP's pseudocode, this check happens after the value transferred by the
transaction has already been deducted. However, in go-ethereum, the balance
has not yet been updated when the check happens, and therefore needs to be
added explicitly.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-07-22 15:39:40 +02:00
Austin Roberts 16cc5314cf Merge tag 'v1.10.5' into plugeth 2021-07-14 08:46:10 -05:00
Austin Roberts 75ad936fbb Hooks for appending ancients, initial work on block update plugin 2021-07-14 08:33:17 -05:00
c49e065fea internal: get pending and queued transaction by address (#22992)
* core, eth, internal, les, light: get pending and queued transaction by address

* core: tiny nitpick fixes

* light: tiny nitpick

Co-authored-by: mark <mark@amis.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-07-13 13:40:58 +03:00
Austin Roberts 7a8bb87257 Add reorg hooks, fix hook name lookup 2021-07-12 15:46:50 -05:00
Austin Roberts 6e4c285ed1 Add state update hooks 2021-07-12 14:45:42 -05:00
Marius van der Wijden 8fe47b0a0d core/state: avoid unnecessary alloc in trie prefetcher (#23198) 2021-07-12 21:34:20 +02:00
Austin Roberts 875e506148 Invoke plugins when blocks are added as new heads or sidechain blocks 2021-07-12 11:40:13 -05:00
Martin Holst Swende ff4ff30a68 core, params: define london block at 12965000 (#23176)
* core, params: define london block at 12965000

* core/forkid: fix test
2021-07-08 12:34:56 +03:00
ucwong 00b922fc5d core/types: go generate (#23177) 2021-07-08 07:53:28 +02:00
Sina MahmoodiandFelix Lange 7522642393 core/types: remove LogForStorage type (#23173)
The encoding of Log and LogForStorage is exactly the same
now. After tracking it down it seems like #17106 changed the
storage schema of logs to be the same as the consensus
encoding.

Support for the legacy format was dropped in #22852 and if
I'm not wrong there's no reason anymore to have these two
equivalent types.

Since the RLP encoding simply contains the first three fields
of Log, we can also avoid creating a temporary struct for
encoding/decoding, and use the rlp:"-" tag in Log instead.

Note: this is an API change in core/types. We decided it's OK
to make this change because LogForStorage is an implementation
detail of go-ethereum and the type has zero uses outside of
package core/types.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-07-07 19:52:55 +02:00
Sina Mahmoodi 5441a8fa47 all: remove noop vm config flags (#23111)
* all: rm external interpreter and ewasm config

* core/vm: rm Interpreter interface

* cmd/geth: deprecate interpreter config fields
2021-07-06 22:03:09 +02:00
Péter Szilágyi e13d14e6a3 core/types: sanity check the basefee length inside a header (#23171) 2021-07-06 22:02:38 +02:00
gary rong bd566977e8 core: fix bad parent hash when jumping to genesis in setHead (#23162) 2021-07-06 10:32:26 +03:00
Martin Holst Swende f5f906dd0d eth/tracers: improve tracing performance (#23016)
Improves the performance of debug.traceTransaction
2021-07-01 09:15:04 +02:00
Marius van der Wijden 686b2884ee all: removed blockhash from statedb (#23126)
This PR removes the blockhash from the statedb
2021-06-30 15:17:01 +02:00
Austin Roberts b821bd9948 Make injectable versions of plugin calls 2021-06-25 23:02:25 -05:00
Austin Roberts 03808de29a Refactor plugin system
When the plugin loader itself had to know the types in the arguments
and return values of the plugin functions, it was very difficult to
avoid import loops, given that the types were often defined in the
same package that needed to invoke the plugins.

Under this model, the plugin loader has much less knowledge of the
plugins themselves, and within each package we define functions to
interact with the plugins.
2021-06-25 22:46:17 -05:00
Austin Roberts 091a2f4884 Checkpoint
Things are currently broken because of import cycles. I'm going to
need to revisit how the plugin loader works, but I wanted to make
a checkpoint before I start breaking things again.
2021-06-25 17:08:39 -05:00
Martin Holst Swende 2d4eff21ca eth/downloader: increase downloader block body allowance (#23074)
This change increases the cache size from 64 to 256 Mb for block bodies.
Benchmarks have shown this to be one bottleneck when trying to achieve
higher download speeds.

The commit also includes a minor optimization for header inserts in package
core: previously, the presence of headers in the database was checked for
every header before writing it. With the change, if one header fails the
presence check, all subsequent headers are also assumed to be missing.
This is an improvement because in practice, the headers are almost always
missing during sync.
2021-06-25 14:53:22 +02:00
Li Dongweiandlidongwei bca8c03e57 core/state: remove unused methods ReturnGas, GetStorageProofByHash (#23092)
Co-authored-by: lidongwei <lidongwei@huobi.com>
2021-06-25 14:34:09 +02:00
Nye Liu 4dde0665c8 core: transaction journal should not be executable (#23090) 2021-06-23 07:29:20 +03:00
Oliver Tale-Yazdi 7b6c8363da core: copy CliqueConfig in DeveloperGenesisBlock (#23068)
Copy the CliqueConfig instead of reusing the pointer.
This makes DeveloperGenesisBlock thread safe and prevents it from
changing params.AllCliqueProtocolChanges.Clique.Epoch.
2021-06-20 15:52:04 +02:00
Jeff Wentworth 15fe3050a1 core/types: add DynamicFeeTx to TxData implementation list in docs (#23063) 2021-06-17 19:54:37 +02:00
Marius van der Wijden a675c89c75 core: readded state processor error tests (#23055) 2021-06-16 16:00:36 +03:00
Martin Holst Swende 080b6ebe91 core/vm: evm fix panic (#23047)
* core/vm: evm fix panic

* core/vm/runtime: default to params.initialbasefee
2021-06-16 09:53:27 +03:00
Péter Szilágyi aa69d36152 core, graphql, internal: expose effectiveGasPrice in receipts 2021-06-16 09:52:06 +03:00
Péter SzilágyiandMartin Holst Swende 7a7abe3de8 accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038)
* accounts/abi/bind: fix bounded contracts and sim backend for 1559

* accounts/abi/bind, ethclient: don't rely on chain config for gas prices

* all: enable London for all internal tests

* les: get receipt type info in les tests

* les: fix weird test

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-06-15 13:56:14 +03:00
Martin Holst Swende 087ed9c92e params, core/forkid: add london testnet blocks (#23041)
* params: add london testnet blocks

* core/forkid: update fork hashes
2021-06-14 20:35:01 +03:00
Martin Holst Swende 8a4460c47e core: change baseFee into baseFeePerGas in genesis json 2021-06-14 14:04:44 +02:00
Péter Szilágyi ccf53daee1 Merge pull request #23013 from holiman/genesis_fix
core: make genesis parse baseFee correctly
2021-06-14 07:52:33 +03:00
Péter Szilágyi f68a68a313 core, internal: support various eth_call invocations post 1559 2021-06-10 08:02:51 +03:00
Péter Szilágyi c503f98f6d all: rename internal 1559 gas fields, add support for graphql (#23010)
* all: rename internal 1559 gas fields, add support for graphql

* cmd/evm/testdata, core: use public 1559 gas names on API surfaces
2021-06-08 12:05:41 +02:00
Martin Holst Swende f763846e6e core: make genesis parse baseFee correctly 2021-06-08 11:07:27 +02:00
Evolution404 248572ee54 core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data' (#22978)
* core/rawdb: db inspect move 'config' and 'shutdown' into 'meta data'

* gofmt
2021-06-08 11:39:24 +03:00
Martin Holst Swende 0e9c7d564d tests: update for London (#22976)
This updates the tests submodule to the London fork tests, and
also updates the test runner to support the new EIP-1559 fields in
test JSON.
2021-06-07 14:37:56 +02:00
Péter Szilágyi 7e915ee379 core, eth, miner: enforce configured mining reward post 1559 too 2021-06-04 10:18:37 +03:00