Commit Graph

13281 Commits

Author SHA1 Message Date
Austin Roberts
65f00aad1c Fix flag parsing for plugins 2021-09-21 09:01:03 -05:00
Marius van der Wijden
b61ef24cce
consensus/clique: prevent 0 len extradata from panicing (#23538)
Closes #23522

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-21 10:46:08 +02:00
Thad Guidry
d8211c7ec7
console: add note about typing exit to exit (#23602)
* add explicit note about typing exit in console

* Add note about typing exit as alternative
2021-09-21 11:19:46 +03:00
Austin Roberts
9249a67e45 Included total difficulty with new head callback 2021-09-20 11:23:37 -05:00
Péter Szilágyi
b1a5e4afdd
Merge pull request #23610 from karalabe/gomod-tify
go.mod: fix module file to prevent go from updating it during build
2021-09-20 19:13:37 +03:00
Péter Szilágyi
5b246af54e
go.mod: fix module file to prevent go from updating it during build 2021-09-20 19:12:20 +03:00
Péter Szilágyi
86f3625455
Merge pull request #23609 from karalabe/regex-fix
internal/debug: make gosimple linter happy
2021-09-20 19:01:32 +03:00
Péter Szilágyi
9bf495bfc9
internal/debug: make gosimple linter happy 2021-09-20 18:55:35 +03:00
Austin Roberts
4f6c8eacb3 Include code in state updates hook 2021-09-20 10:49:56 -05:00
Péter Szilágyi
e28f713ada
internal: support optional filter expression for debug.stacks (#23605)
* internal: support optional filter expression for debug.stacks

* internal/debug: fix string regexp

* internal/debug: support searching for line numbers too
2021-09-20 16:29:07 +03:00
Pete
62e3b83af6
docs: fix spelling on 2021-08-22 postmortem (#23595)
Spelling update
2021-09-20 13:33:15 +02:00
Martin Holst Swende
1b34283810
ethclient, accounts/keystore: fix flaky tests (#23599)
* ethclient/gethclient: fix flaky test (due to map key ordering)

* accounts/keystore: fix test failing due to rand collision due to low time resolution on windows
2021-09-20 10:23:44 +02:00
AusIV
9446654386
Merge pull request #2 from openrelayxyz/utils-refactor
Utils refactor
2021-09-17 16:12:27 -05:00
philip-morlier
3e05a986b1 Merge branch 'utils-refactor' of github.com:openrelayxyz/plugeth into utils-refactor 2021-09-17 12:12:02 -07: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
a03c9e1324 Merge remote-tracking branch 'plugeth/develop' into utils-refactor 2021-09-17 11:27:47 -05:00
Sina Mahmoodi
401354976b
core,eth: call frame tracing (#23087)
This change introduces 2 new optional methods; `enter()` and `exit()` for js tracers, and makes `step()` optiona. The two new methods are invoked when entering and exiting a call frame (but not invoked for the outermost scope, which has it's own methods). Currently these are the data fields passed to each of them:

    enter: type (opcode), from, to, input, gas, value
    exit: output, gasUsed, error

The PR also comes with a re-write of the callTracer. As a backup we keep the previous tracing script under the name `callTracerLegacy`. Behaviour of both tracers are equivalent for the most part, although there are some small differences (improvements), where the new tracer is more correct / has more information.
2021-09-17 09:31:22 +02:00
philip-morlier
88f38674d1
Updated mod and sum files 2021-09-16 15:03:29 -07:00
Austin Roberts
e6f05fcca9 Use restricted params, not geth params 2021-09-16 16:06:46 -05: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
philip-morlier
25af69b8e2
Missing rpc call hook and test 2021-09-16 14:03:50 -07:00
philip-morlier
7d7fad0988
Further updates to wrappers.go and rpc/handler.go, chaising bugs 2021-09-16 11:55:39 -07:00
Martin Holst Swende
7ada89d4e6
eth/tracers: abort evm execution when trace is aborted (#23580) 2021-09-16 13:45:16 +02:00
philip-morlier
86fd4f27e2
updated eth/tracers/plugin_hooks.go to reflect attempts to address Wednesday 9/15/21 problems with tracer plugin 2021-09-15 16:13:38 -07:00
philip-morlier
ea0f27c92d Merge remote-tracking branch 'refs/remotes/origin/utils-refactor' into utils-refactor 2021-09-15 13:13:32 -07:00
philip-morlier
1b4eded9c5
Updeated wrappers.go and go.mod 2021-09-15 13:09:43 -07:00
Austin Roberts
b8928b1e57 Add code comments, remove debug logging 2021-09-15 08:54:04 -05:00
Marius van der Wijden
84ff152de5
cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated (#23568)
* cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated

* cmd/devp2p/internal/ethtest: switch on concrete type not pointer

* cmd/devp2p/internal/ethtest: switch on concrete type not pointer
2021-09-15 10:52:48 +02:00
Austin Roberts
1ed3de57d4 Support subscriptions in plugins
This does some dark magic with reflect to enable plugins to offer
subscriptions without requiring them to use the rpc.Subscriptions
import.

Basically, plugin services can have a channel as a return value,
and the shim will pull items off of that chanel and send them to
the notifier. It makes sure that context.Done() will fire when
the user disconnects, and will shut everything down if the channel
closes.
2021-09-14 17:44:49 -05:00
Austin Roberts
7b33b6e821 Add chainconfig to backend 2021-09-14 17:44:25 -05:00
Marius van der Wijden
b8d7c662cd
core, rpc: disable memory output by default in traces (#23558)
* core: cmd: invert disableMemory

* core: fix missed inversion

* cmd/evm: preserve Flags but change default value

* Apply suggestions from code review

Co-authored-by: Martin Holst Swende <martin@swende.se>

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-13 18:59:52 +02:00
Martin Holst Swende
babe9b993e
cmd/evm: transaction validation tool (#23494)
* cmd/evm: transaction validation tool

* cmd/evm: add hash to t9n tool

* cmd/evm: lint nits

* cmd/evm: nitpicks
2021-09-13 13:57:40 +02:00
Jonathan Verhees
578bc8164d
README: add londonBlock to example genesis config (#23565)
Updated example genesis.json configuration section, added londonBlock within config.
2021-09-13 13:34:00 +03:00
Péter Szilágyi
9ada4a2e2c
Merge pull request #23561 from karalabe/temp-split-leseh
les: duplicate downloader and fetcher to allow progressive refactoring
2021-09-10 16:05:06 +03:00
Péter Szilágyi
9e17648d8c
les: duplicate downloader and fetcher to allow progressive refactoring 2021-09-10 11:11:59 +03:00
philip-morlier
411a43e378
updated cmd/geth/plugin_hooks.go and plugins/plugin_loader.go to reflect changes re core.logger, updated go.mod and go.sum to address dependency issues 2021-09-09 12:51:13 -07:00
philip-morlier
b36e63f184
eth/tracers/plugin_hooks, tracers/plugin_hooks, and wrappers utils refactor modifications 2021-09-08 14:38:17 -07:00
Felix Lange
90987db733
appveyor.yml: add linux/amd64 build job (#23548) 2021-09-08 14:21:59 +02:00
Felix Lange
5c1fc3bf54
core: 64bit alignment of testBlockChain.gasLimit (#23543)
This fixes crashes in txpool tests on 32bit platforms.
2021-09-07 18:54:15 +03:00
Felix Lange
51ed39c093
core: make txPricedList.stales the first field for 64bit alignment (#23542)
This fixes crashes on 32bit builds.
2021-09-07 17:15:11 +03:00
Péter Szilágyi
6ef3a16869
p2p/enode: use unix timestamp as base ENR sequence number (#19903)
This PR ensures that wiping all data associated with a node (apart from its nodekey)
will not generate already used sequence number for the ENRs, since all remote nodes
would reject them until they out-number the previously published largest one.

The big complication with this scheme is that every local update to the ENR can
potentially bump the sequence number by one. In order to ensure that local updates
do not outrun the clock, the sequence number is a millisecond-precision timestamp,
and updates are throttled to occur at most once per millisecond.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-09-07 12:36:48 +02:00
Martin Holst Swende
794c6133ef
core/rawdb: freezer batch write (#23462)
This change is a rewrite of the freezer code.

When writing ancient chain data to the freezer, the previous version first encoded each
individual item to a temporary buffer, then wrote the buffer. For small item sizes (for
example, in the block hash freezer table), this strategy causes a lot of system calls for
writing tiny chunks of data. It also allocated a lot of temporary []byte buffers.

In the new version, we instead encode multiple items into a re-useable batch buffer, which
is then written to the file all at once. This avoids performing a system call for every
inserted item.

To make the internal batching work, the ancient database API had to be changed. While
integrating this new API in BlockChain.InsertReceiptChain, additional optimizations were
also added there.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-09-07 12:31:17 +02:00
Zachinquarantine
9a0df80bbc
cmd/geth, cmd/utils: remove legacy rpc flags (#23358)
* remove rpc flags

* remove legacy rpc flags

* remove legacy rpc flags

* remove legacy rpc commands

* (hopefully) fix most of the build errors

* fix build errors

https://app.travis-ci.com/github/ethereum/go-ethereum/jobs/530318686

* cmd/utils: fix syntax error

* empty commit to unbreak travis ci

* fix syntax error

* syntax fixes

* syntax fixes

* fix

fixes "cmd/geth/usage.go:234:7: expected '(', found init (typecheck)"

* fix

* various fixes in usage.go

* various fixes in flags.go

* adds extra space

reverts the spacing to how it was before I resolved the merge conflict

* more fixes in usage.go

* fix

fix for cmd/geth/usage.go:243:17: expected operand, found ':=' (typecheck) in travis

* Update cmd/utils/flags.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* fix error

 fixes these errors:
cmd/utils/flags_legacy.go:21:2: "strings" imported but not used (typecheck)

	"strings"

	^

cmd/utils/flags_legacy.go:24:2: "github.com/ethereum/go-ethereum/node" imported but not used (typecheck)

	"github.com/ethereum/go-ethereum/node"

	^

* goimports

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-07 10:52:58 +02:00
Zachinquarantine
ca5bc676d1
internal/debug: remove deprecated flags (#23368)
* internal/debug: remove deprecated flags

The removed flags are removed in the main portion of geth, this removes it internally too.

* internal/debug: remove legacy --debug and legacy --backtrace flag

* Update flags.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-07 10:51:33 +02:00
Martin Holst Swende
7957530225
docs: add post-mortem (#23518)
* docs: add post-mortem

* Update docs/postmortems/2021-08-22-split-postmortem.md

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>

* Update docs/postmortems/2021-08-22-split-postmortem.md

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>

* Update docs/postmortems/2021-08-22-split-postmortem.md

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>

* Update docs/postmortems/2021-08-22-split-postmortem.md

* Update 2021-08-22-split-postmortem.md

* Update docs/postmortems/2021-08-22-split-postmortem.md

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>

Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2021-09-07 09:22:40 +02:00
aaronbuchwald
de2c44ab5c
trie: add missing copyright header (#23530)
* Add missing copyright header

* Update stacktrie_test.go

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-09-07 07:25:54 +03: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
Martin Holst Swende
4d88974864
cmd/evm: add tests for evm t8n (#23507) 2021-09-02 09:22:43 +02:00
philip-morlier
f615e3813d
Modified hooks for plugeth-utils functionality 2021-09-01 13:34:03 -07:00