Commit Graph

13468 Commits

Author SHA1 Message Date
Marius van der Wijden
ca298a2821
cmd/geth: support bigints for --override.terminaltotaldifficulty (#24646)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-04-13 11:28:23 +02:00
Sina Mahmoodi
9c82c646e4
eth/tracers: make txhash blockhash accessible to native tracers (#24679) 2022-04-12 21:09:27 +02:00
ucwong
d4d288e3f1
build: add imports for go generate tools (#24682)
This adds a tools.go file to import all command packages used for
go:generate. Doing so makes it possible to execute go-based code
generators using 'go run', locking in the tool version using go.mod.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-04-12 20:24:02 +02:00
JoeGruffins
eb69f490ed
abi/base: return error for pending call error (#24649)
If a pending contract call errors, return that error right away rather
than ignoring it to allow an error somewhere else. This is helpful for
callers to know if perhaps a call failed because of the context deadline
being expired. This change mirrors the behavior of non-pending contract
calls.
2022-04-12 11:36:29 +03:00
rjl493456442
195c979168
core: fix benchmark panic (#24657)
This PR fixes a few panics in the chain marker benchmarks. The root
cause for panic is in chain marker the genesis header/block is not
accessible, while it's expected to be obtained in tests. So this PR
avoids touching genesis header at all to avoid panic.
2022-04-12 11:34:07 +03:00
Marius van der Wijden
c40943a167
cmd: set DefaultGasLimit to 30M (#24680)
* cmd: set DefaultGasLimit to 30M, rem deprec. Flag

* cmd: revert flag deprecation
2022-04-12 08:48:03 +03:00
Felix Lange
59f0e8ae60
core/types: make "miner" optional in Header JSON (#24666)
"miner" is not set for pending block responses in some cases.

Fixes #24632
2022-04-11 21:19:13 +03:00
Vaibhaw
40b736463a
build/deb: update Debian control file to remove unencrypted git protocol (#24676) 2022-04-11 21:04:08 +03:00
aaronbuchwald
6c3fea0fc9
log: modify lock defer unlock order in sync handler (#24667)
This modifies the order of Lock() defer Unlock() to follow the more
typically used pattern.
2022-04-08 16:02:16 +02:00
rjl493456442
c1b69bd121
les: fix panic in ultralight client sync (#24641) 2022-04-08 15:48:52 +02:00
Eng Zer Jun
8d066f1f42
all: use T.TempDir to create temporary test directories (#24633)
This commit replaces ioutil.TempDir with t.TempDir in tests. The
directory created by t.TempDir is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using ioutil.TempDir
had to be removed manually by calling os.RemoveAll, which is omitted in
some tests. The error handling boilerplate e.g.

	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}

is also tedious, but t.TempDir handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 15:44:55 +02:00
Tangui Clairet
bf5cacfb8f
accounts/abi: handle tuple arrays in ParseSelector (#24587)
Closes #24571
2022-04-08 15:38:23 +02:00
Martin Holst Swende
92e3c56e7b
cmd/geth: inspect snapshot dangling storage (#24643)
* cmd/geth: inspect snapshot dangling storage

* cmd/geth: make verify-state invoke verify-dangling
2022-04-08 15:08:46 +02:00
Péter Szilágyi
9fd8825d5a
Merge pull request #24659 from karalabe/snapshot-remove-noo
core/state/snapshot: remove noop map item assignment
2022-04-07 12:58:44 +03:00
Péter Szilágyi
f6891ba40d
core/state/snapshot: remove noop map item assignment 2022-04-07 09:36:44 +03:00
Tbnoapi
65825cd134
README: remove mentions of fast sync (#24656)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2022-04-07 09:23:55 +03:00
Abdul Rabbani
498101102c
Merge pull request #222 from vulcanize/v1.10.17-statediff-v3.2.0
Handle all breaking changes for the patch
2022-04-06 14:44:49 -04:00
Abdul Rabbani
e6ac85fefc Remove redundant deferences for pointers 2022-04-06 13:51:03 -04:00
Abdul Rabbani
3477d35af4 Handle all breaking changes for the patch
The major change to integrate the patch has been:

* Updating the arguments for `rlp.EncodeToBytes`. This function accepts interfaces, but since the last update, it is better to pass in a pointer to the function.
* From the Ethereum Release Notes: "
Compatibility note about `core/types`: For optimization purposes, `types.Header` and other types in this package now implement the `rlp.Encoder` interface. This change can cause incompatibilities because the new method is implemented with pointer receiver. Attempting to RLP-encode unadressable (i.e. non-pointer) values of type `Header` does not work anymore and will result in an error."
* Instead of just updating all the headers. I have updated all parameters for the `rlp.EncodeToBytes` to be pointers instead of values.

__Please take a close look at the updates__. The functions won't fail if a non-pointer is passed (in most cases), but we could be unexpected behaviors.
2022-04-06 10:57:57 -04:00
Péter Szilágyi
111a1b73cf
Merge pull request #24652 from karalabe/block-fetcher-timeouts
eth/fetcher: if peers never respond, drop them
2022-04-06 10:43:18 +03:00
Sina Mahmoodi
fb3a081c7e
eth/tracers: refactor traceTx to separate out struct logging (#24326)
* eth/tracers: refactor traceTx to separate out struct logging

review fix

Update eth/tracers/api.go

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

Mv ExecutionResult type to logger package

review fix

impl GetResult for StructLogger

make formatLogs private

confused exit and end..

account for intrinsicGas in structlogger, fix TraceCall test

Add Stop method to logger

Simplify traceTx

Fix test

rm logger from blockchain test

account for refund in structLogger

* use tx hooks in struct logger

* minor

* avoid executionResult in struct logger

* revert blockchain test changes
2022-04-06 09:34:18 +02:00
Péter Szilágyi
7e2bbb9cbb
eth/fetcher: if peers never respond, drop them 2022-04-06 10:18:57 +03:00
Abdul Rabbani
e5824ecbe9
Merge pull request #221 from vulcanize/v1.10.17-statediff-v3.2.0
Update a few go dependencies + GHA workflow
2022-04-05 15:50:45 -04:00
Abdul Rabbani
3ef54d3dde Update a few go dependencies + GHA workflow 2022-04-05 15:49:41 -04:00
Abdul Rabbani
a7caed41df Merge tag 'v1.10.17' into v1.10.17-statediff-v3 2022-04-05 15:30:47 -04:00
Ashwin Phatak
a9ab76cb33
Merge pull request #210 from deep-stack/pm-removed-storage-nodes
Add diffs for storage nodes of destroyed contracts
2022-04-05 14:21:19 +05:30
Tatsuya Shimoda
0654014652
rpc: fixed a typo (#24642) 2022-04-05 10:45:20 +03:00
b351f8f335 Increase timeout in a failing test 2022-04-05 12:38:14 +05:30
c21aa96962 Index Removed diffs without leaf keys if an account or storage node is moved 2022-04-05 12:09:23 +05:30
9917e6c293 Fix linting errors 2022-04-05 12:09:23 +05:30
84365431d1 Update indexer unit tests 2022-04-05 12:09:23 +05:30
a14745dac5 Updated unit tests for changes in builder 2022-04-05 12:09:09 +05:30
John Adler
aa123939c2
README: update free space required (#24636) 2022-04-05 08:45:13 +03:00
4855d9304e Index Removed storage diffs on contract destruction 2022-04-05 11:03:54 +05:30
Ashwin Phatak
2aaf6bcda3
Merge pull request #212 from deep-stack/pm-watched-addresses-v3
Statediff API (v3) to change addresses watched in direct indexing mode
2022-04-05 09:33:51 +05:30
rjl493456442
28ec26094b
eth/downloader: retrieve pivot header from local chain if necessary (#24610)
* eth/downloader: retrieve pivot header from local chain if necessary

* eth/downloader: improve readability

* eth/downloader: update fix

* eth/downloader: add beacon sync tests

* eth/downloader: remove duplicated code
2022-04-04 10:10:16 +03:00
52df3460d6 Create file for watched addresses only when required 2022-04-01 14:58:50 +05:30
710312378a Add indexer unit tests for loading watched addresses 2022-04-01 14:58:50 +05:30
e7526469db Add file mode indexer unit tests for watched address methods 2022-04-01 14:58:50 +05:30
a7f9354f0e Implement watch address indexer methods for file mode 2022-04-01 14:58:50 +05:30
12b9f50930 Update context used in watch address indexer functions 2022-04-01 14:56:29 +05:30
750e44e9e6 Add builder test for removal of watched addresses 2022-04-01 14:55:33 +05:30
f3761efe76 Add a fix in builder for removal of a non-watched address 2022-04-01 14:55:33 +05:30
7f38afe542 Add tests for the API to change addresses being watched 2022-04-01 14:55:33 +05:30
af4dbed9d2 Add tests for indexer methods used to change addresses being watched 2022-04-01 14:55:33 +05:30
8fc2c09634 Add placeholder indexer methods for file and dump modes 2022-04-01 14:55:33 +05:30
9b234ef5b4 Statediff API to change addresses being watched in direct indexing 2022-04-01 14:55:33 +05:30
Martin Holst Swende
1e973a96b4
eth: clarify the error string on getlogs failure (#24617)
This PR makes the errors we spit out a bit more clear about what block is problematic.
2022-03-31 21:16:03 +02:00
Abdul Rabbani
c8b68db48c
Merge pull request #217 from vulcanize/feature/known-gaps
Feature/known gaps
2022-03-31 14:38:59 -04:00
Abdul Rabbani
d24a49ef03 Add Workflow dispatch for docker builds 2022-03-31 14:14:34 -04:00