Commit Graph

13299 Commits

Author SHA1 Message Date
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
Abdul Rabbani
53c1322cb4
Merge pull request #209 from vulcanize/feature/update-foundry
Basic updates, add prints and variables
2022-03-16 14:48:33 -04:00
Abdul Rabbani
e4c451467f Basic updates, add prints and variables 2022-03-16 14:47:31 -04:00
Jonathan Chappelow
830231c1c4
crypto: use btcec/v2 for no-cgo (#24533)
This updates the no-cgo implementations in the crypto package to use
the github.com/btcsuite/btcd/btcec/v2 module instead of the older btcec
package that was part of the main github.com/btcsuite/btcd module.

name                   old time/op  new time/op  delta
EcrecoverSignature-32   198µs ± 0%   144µs ± 0%  -27.11%
VerifySignature-32      177µs ± 0%   128µs ± 0%  -27.44%
DecompressPubkey-32    20.9µs ± 0%  10.1µs ± 0%  -51.51%

Use (*ModNScalar).IsOverHalfOrder instead of math/big.Int when checking
for malleable signatures.
2022-03-16 14:23:14 +01:00
Abdul Rabbani
6b74310941
Merge pull request #208 from vulcanize/feature/gh-208-add-foundry
Add Foundry for Manual Integration Testing
2022-03-16 08:04:02 -04:00
rjl493456442
7a80cf6543
les, tests: fix vflux fuzzer by removing unnecessary panic (#24537) 2022-03-16 11:13:10 +01:00
Péter Szilágyi
8d99fedeae
Merge pull request #24544 from karalabe/go-1.18
build, Dockerfile: bump Go to 1.18
2022-03-16 09:01:45 +02:00
Péter Szilágyi
2352c72229
Merge pull request #24545 from karalabe/beacon-sync-fix-test
eth/downloader: fix off-by-one error in test causing 50% fails
2022-03-16 09:01:04 +02:00
Péter Szilágyi
6b8718c374
eth/downloader: fix off-by-one error in test causing 50% fails 2022-03-16 08:57:00 +02:00
Péter Szilágyi
be7eb8ae17
build, Dockerfile: bump Go to 1.18 2022-03-16 08:27:16 +02:00
Abdul Rabbani
0d70b7ce04 Fix Linter 2022-03-15 16:18:50 -04:00
Ryan Schneider
dbfd397262
cmd/geth: rename --whitelist to --eth.requiredblocks (#24505)
* cmd, eth: Rename whitelist argument to peer.requiredblocks

* eth/ethconfig: document PeerRequiredBlocks better

* cmd/utils: rename new flag to --eth.requiredblocks

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-03-15 12:20:03 +01:00
ligi
6cd72660d0
cmd/geth: set EnableBashCompletion = true (#24313)
prepare #24145
2022-03-15 10:38:23 +01:00