Commit Graph

13461 Commits

Author SHA1 Message Date
Nic Jansma
127dc5982e
eth: change snapshot extension registration failure to warning instead of error (#24475)
* core: Change Snapshot extension registration failed to Debug

* Update eth/handler.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-30 10:28:27 +02:00
Guruprasad Kamath
8cacb42278
core: verify genesis extradata for clique (#24470)
* Add extra-data checks for clique genesis

* Update genesis.go

* Update genesis.go

* core: simplify clique genesis check

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-30 10:27:25 +02:00
Abdul Rabbani
b960661807 Refactor: Decouple knownGaps and Indexer
This commit decouples knownGaps and Indexer. All knownGaps logic is in its own file. This makes testing and maintainability easier.

We have also removed all efforts to check the `lastProcessedblock` - This is because we won't ever run into this issue (hyptothetically), because geth won't let it happen.
2022-03-29 16:45:26 -04:00
zhiqiangxu
9f75994b5e
common/compiler: add extra include paths to solidity compiler (#24541)
This PR adds a ExtraAllowedPath field to Solidity and exposes two APIs: CompileSource and CompileFiles, which were hidden inside CompileSolidityString and CompileSolidity before.
2022-03-29 22:38:59 +02:00
Martin Holst Swende
67c070c379
eth/tracers/logger: use omitempty to reduce log bloat (#24547)
Makes the evm json output less verbose: omitting output of `memory` and `returndata` in case they are empty.
2022-03-29 22:36:55 +02:00
Zhang Zhuo
b5a129ea24
internal/ethapi: add refund to StructLogRes (#24567)
* internal/ethapi: add refund to StructLogRes

* Update internal/ethapi/api.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2022-03-29 22:34:10 +02:00
ucwong
763b3f8d1f
go.mod : upnp 1.0.3 stable version (#24573) 2022-03-29 22:33:19 +02:00
rjl493456442
25bd17d725
core/state/snapshot: clean up the generation code (#24479) 2022-03-29 20:37:35 +02:00
flowerofdream
33022c2e7d
rlp: fix typo in comment (#24595)
Co-authored-by: Yong Yang <yangyong775654@163.com>
2022-03-29 20:30:09 +02:00
Martin Holst Swende
8ec8b81b29
params: begin v1.10.18 release cycle 2022-03-29 19:19:40 +02:00
Martin Holst Swende
25c9b49fdb
params: go-ethereum v1.10.17 stable 2022-03-29 19:18:26 +02:00
Marius van der Wijden
de6a113f84
eth/catalyst: only apply block if we actually have the state (#24598)
* eth/catalyst: only apply block if we actually have the state

* add header to payload queue

* Update cmd/geth/dbcmd.go

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

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-29 18:26:18 +02:00
jwasinger
b502b6ac97
cmd/geth: change to non-fatal error message when legacy receipt storage is not implemented (#24603)
* cmd/geth: only check for presence of legacy receipts if developer mode is not enabled

* cmd/geth: degrade log level

* cmd/geth: fix format

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2022-03-29 10:40:42 +02:00
Péter Szilágyi
1027cb52c4
Merge pull request #24605 from karalabe/revert-setting-ttd
core: set ttd override on all chain variations
2022-03-29 11:39:45 +03:00
Zhang Zhuo
b06e8c4a8a
core/vm: fix sstore gas comment type (#24583) 2022-03-29 11:21:11 +03:00
Péter Szilágyi
b45d82e94a
core: set ttd override on all chain variations 2022-03-29 11:03:01 +03:00
Abdul Rabbani
fc341a90fc ** Write to file if you can't write to DB
This commit contains many new features:

1. Write the insert statement to file if there is an error when trying to write to DB.
2. Test the write to DB and write to file features in unit tests. They work as expected.
3. Insert logic for calling the knownGaps function (untested).

This PR makes a major change to the way statediff is started. Unless it is started in `file` mode, it will create a `file` indexer. This indexer will be used for writing errors to disk.
2022-03-28 15:00:29 -04:00
Martin Holst Swende
0fffd3acbd
build: close sftp connection when done (#24593) 2022-03-27 13:21:36 +02:00
Abdul Rabbani
f566aa780c % Checkpoint - Added the feature to write to File if writing to DB errors out. NOT TESTED 2022-03-25 16:50:43 -04:00
Martin Holst Swende
eb3ebceaa1
internal/build: exit sftp upload (#24590) 2022-03-25 16:46:31 +01:00
Martin Holst Swende
d1c243f841
internal/build: prevent travis timeout during ppa upload (#24589) 2022-03-25 15:43:07 +01:00
Martin Holst Swende
19b9cf714f
internal/build: show ppa upload process stdout on stdout (#24588) 2022-03-25 15:06:29 +01:00
Abdul Rabbani
f6ff20eb0e Handle All Gaps within Geth
Including an updated doc which keeps track of events in this PR.
2022-03-25 09:54:36 -04:00
Martin Holst Swende
6a44bf6826
build: upgrade to golangci-lint v1.45.2 (#24586) 2022-03-25 13:46:33 +01:00
Ian Norden
4e73e17108
Merge pull request #211 from vulcanize/v1.10.16-statediff-4.0.0
update sql indexer to use new v4 schema
2022-03-24 10:10:35 -05:00
i-norden
1e64f486d8 update unit tests 2022-03-24 10:09:48 -05:00
Marius van der Wijden
a8040bc2c5
node: allow JWT pass by file only (#24579) 2022-03-24 15:04:47 +01:00
i-norden
7bc4c7520c update file writing mode 2022-03-24 08:01:26 -05:00
Marius van der Wijden
535f25d65f
eth/catalyst: fix log message (#24574) 2022-03-23 21:00:26 +01:00
Martin Holst Swende
f252154599
eth/downloader: fix flakey test (#24576) 2022-03-23 20:57:53 +01:00
Sina Mahmoodi
fd4f60f49b
core/rawdb: simple legacy receipt converter (#24028)
* cmd,core: add simple legacy receipt converter

core/rawdb: use forEach in migrate

core/rawdb: batch reads in forEach

core/rawdb: make forEach anonymous fn

cmd/geth: check for legacy receipts on node startup

fix err msg

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix log

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>

fix some review comments

add warning to cmd

drop isLegacy fn from migrateTable params

add test for windows rename

test replacing in windows case

* minor fix

* sanity check for tail-deletion

* add log before moving files around

* speed-up hack for mainnet

* fix mainnet check, use networkid instead

* check mainnet genesis

* review fixes

* resume previous migration attempt

* core/rawdb: lint fix

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-03-23 20:57:32 +01:00
Abdul Rabbani
1a3a63d00e Find Gaps and at them to known_gaps
This contains all the logic needed to add a gap to the `known_gaps` table.

We can now add this code to various parts of the application to calculate if a gap has occured.
2022-03-23 14:03:35 -04:00
Abdul Rabbani
ce66532fcf Improve Testing for Insert, add a query function 2022-03-22 15:49:30 -04:00
rjl493456442
e0e8bf31c5
eth/downloader: ignore zero size header batch for importing (#24569)
* eth/downloader: ignore zero size header batch for importing

* core, light: reject empty header batch for importing
2022-03-22 18:58:05 +01:00
Abdul Rabbani
73f46a59ef Remove the need to pass a transaction when upserting to known_gaps
Thanks Ian :D
2022-03-22 11:52:35 -04:00
rjl493456442
7ae6c4a790
core: store genesis allocation and recommit them if necessary (#24460)
* core: store genesis allocation and recommit them if necessary

* core: recover predefined genesis allocation if possible
2022-03-22 10:53:22 +01:00
ucwong
34501ed235
crypto/bls12381: go format 2022-03-22 10:32:13 +01:00
rjl493456442
6afb717be5
core/rawdb: fix db commands (#24540) 2022-03-22 10:19:04 +01:00
Abdul Rabbani
bca12f9cdf Delete geth-linux-amd64 2022-03-21 17:43:15 -04:00
Abdul Rabbani
921538ba64 Function To Add entry to known_gaps
This commit contains all the code needed to update the `known_gaps` table. It uses a generic function `PushKnownGaps` to insert gaps to the database.

The current test is very "basic." All it does it insert a dummy gap into the database. As long as their is no error it will return succesfully.

I have also removed the foundry subfolder. I am using the `related-repository` setup for testing.
2022-03-21 16:28:13 -04:00
Péter Szilágyi
51de2bc9dc
eth/downloader: terminate beacon sync early when linked to local chain (#24550)
* eth/downloader: terminate beacon sync early when linked to local chain

* eth/downloader: fix backfiller resume on early beacon termination
2022-03-21 10:43:54 +02:00
Abdul Rabbani
3045068a45
Merge pull request #205 from vulcanize/feature/155-waitForSync
Add a flag to start processing statediff if we are caught up to the head of the chain
2022-03-18 09:44:12 -04:00
Abdul Rabbani
333dd3ff4f Updates as Per Ian's comments
1. Fix some naming inconsistencies.
2. `GetSyncStatus` returns a bool
3. `Start` handles any `errors` from the `WaitingForSync` function.
4. Add a sleep for the `while` loop.
5. Fix test based on a conditional that would never be met.
2022-03-18 08:29:36 -04:00
alvaroahp11
afe9558bba
docs/postmortems: fix spelling (#24558) 2022-03-18 12:39:11 +02:00
Marius van der Wijden
667e1c038e
core, params: add kiln flag (#24548) 2022-03-17 17:34:22 +02:00
Marius van der Wijden
4f4622bc8b
core: eth: implement Kiln-v2 spec (#24506)
* core/beacon: eth/catalyst: updated engine api to new version

* core: implement exchangeTransitionConfig

* core/beacon: prevRandao instead of Random

* eth/catalyst: Fix ExchangeTransitionConfig, add test

* eth/catalyst: stop external miners on TTD reached

* node: implement --authrpc.vhosts flag

* core: allow for config override on non-mainnet networks

* eth/catalyst: fix peters comments

* eth/catalyst: make stop remote sealer more explicit

* eth/catalyst: add log output

* cmd/utils: rename authrpc.host to authrpc.addr

* eth/catalyst: disable the disabling of the miner

* eth: core: remove notion of terminal pow block

* eth: les: more of peters nitpicks
2022-03-17 17:20:03 +02:00
i-norden
9775355d2b update sql indexer to use new v4 schema that denormalizes by block_number for the purposes of partitioning & sharding 2022-03-17 07:17:04 -05:00
Abdul Rabbani
c5a36978f8 Fix lint errors 2022-03-16 15:04:31 -04:00
Abdul Rabbani
f468636a09 Update param --> parameter to fix conflicting names 2022-03-16 15:04:31 -04:00
Abdul Rabbani
e409059477 Add a flag to start processing statediff if we are caught up to the head of the chain 2022-03-16 15:04:31 -04:00