Commit Graph

15306 Commits

Author SHA1 Message Date
Andrew Ashikhmin
4607179849
Handle a corner case in forkchoiceUpdated (#3640)
* Fix typo

* fix typos

* Handle corner case when unwinding to geneis

* No-op ForkChoice
2022-03-03 16:09:03 +01:00
battlmonstr
0242b5a4e2
Discovery: refactor public key to node ID conversions. (#3634)
Encode and hash logic was duplicated in multiple places.
* Move encoding to p2p/discover/v4wire
* Move hashing to p2p/enode/idscheme

* Change newRandomLookup to create a proper random key on a curve.
2022-03-03 21:58:31 +07:00
battlmonstr
c8a25d0226
Refactor getting chain info by chain name. (#3635)
* get chain config, genesis hash and network ID by chain name in params/config
* get genesis block chain name in core/genesis
2022-03-03 21:57:10 +07:00
Andrew Ashikhmin
5bbc98009b
Bump storage space recommendation to 3TB (#3638)
* Bump storage space recommendation to 4TB.

* OK, 3TB instead of 4TB

* SSD performance deteriorates when close to capacity
2022-03-03 21:54:17 +07:00
Alex Sharov
54e02b05f4
Update README.md 2022-03-03 17:43:55 +07:00
Andrew Ashikhmin
f58e80bd56
Expose eth API on the same ports as engine API (#3633)
* Expose port 8551 (authenticated Engine API)

* Expose eth API on the same ports as engine API
2022-03-02 14:58:46 +01:00
battlmonstr
47df98a499
Use "err" key for logging errors. (#3632)
log.Warn/Error uses "err" key to log errors in most places.
This renames "error" to "err" in some places to adhere to this convention.
2022-03-01 15:40:51 +00:00
Enrique Jose Avila Asapche
a65f12b248
State override support (#3628)
* added stateOverride type

* solved import cycle

* refactoring

* imported wrong package

* fixed Call arguments

* typo

* override for traceCall
2022-03-01 15:40:24 +00:00
Giulio rebuffo
cb8aacae87
Added Engine Authentication [JWT] (#3531)
* jwt

* fuuuuture

* added auth

* merge

* merge

* Update jwt to the latest version

* ops

* comments

* cleanup

* bad

* gut

* maybe

* mod sum

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-02-28 12:07:09 +01:00
Alex Sharov
0cac29d1d2
Update README.md 2022-02-26 19:55:17 +07:00
mohoff
c5e03fd852
Alloc file for dev chain (#3626)
* chore: alloc file for dev chain

* chore: fix lint issue

Co-authored-by: Moritz Hoffmann <moritz@btcx.com>
2022-02-26 07:27:22 +00:00
Enrique Jose Avila Asapche
58851feb9b
Fix eth call (#3618)
* added isFake

* using isFake instead of checkNonce

* Revert "using isFake instead of checkNonce"

This reverts commit 6a202bbcdda666677fc93744549046432fae18b6.

* Revert "added isFake"

This reverts commit 2c4802488afde25ac583c6af6e6778cfa90c4dcd.

* only checking EOA if we are checking for Nonce
2022-02-25 12:51:29 +00:00
Alex Sharov
c5e619927d
Add timings of forward stages to logs (#3620)
* save

* save
2022-02-25 07:44:13 +00:00
Alex Sharov
8ca388a7d3
less qcheck iterations (#3622) 2022-02-25 13:47:48 +07:00
Alex Sharov
f8c1fb9563
snapshots: speedup slow test (#3623) 2022-02-25 11:42:54 +07:00
Alex Sharov
96e0691d4a
snapshots: delete .idx after merge (#3619) 2022-02-25 11:41:49 +07:00
Giulio rebuffo
99f688c3ec
PrevRandao Renaming (#3616)
* PrevRandao Renaming

* lint
2022-02-24 18:16:05 +01:00
battlmonstr
8b820a1cbe
Makefile: refactor cmd targets. (#3614)
Refactor cmd targets to use a common implicit rule recipe.
Change "make all" to include them all.
2022-02-24 15:10:46 +00:00
battlmonstr
f5a0c9d834
p2p: Disable port mapping task with --nat extip (#3612)
If --nat extip:1.2.3.4 option is specified, the port mapping logic
(AddMapping/DeleteMapping) does nothing.
This optimization avoids running a goroutine for doing nothing.
2022-02-24 15:09:56 +00:00
battlmonstr
65ce332e8b
Fix lint: remove unused findAndMergeBlockSegments log level parameter. (#3613)
Fixes lint errors:
turbo/snapshotsync/block_snapshots_test.go:77:69: not enough arguments in call to findAndMergeBlockSegments (typecheck)
	_, err := findAndMergeBlockSegments(context.Background(), s, dir, 1)
turbo/snapshotsync/block_snapshots_test.go:88:68: not enough arguments in call to findAndMergeBlockSegments (typecheck)
	_, err = findAndMergeBlockSegments(context.Background(), s, dir, 1)
2022-02-24 20:15:33 +07:00
Alex Sharov
ac15d2b922
snapshots: better logging (#3611) 2022-02-24 16:28:46 +07:00
ledgerwatch
67b9e5988c
Add preverified hashes for mainnet and ropsten (#3609)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-24 08:37:20 +00:00
Alex Sharov
f685d6bfe5
logger version up (#3608)
* snapshots: fix indexing of recently merged range

* logger version up
2022-02-24 15:14:41 +07:00
Alex Sharov
454045185a
snapshots: fix indexing of recently merged range (#3607) 2022-02-24 14:19:01 +07:00
Alex Sharov
809cfdcf19
snapshots: indexing of recently merged range (#3606)
* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range

* snapshots: fix indexing of recently merged range
2022-02-24 14:15:03 +07:00
Alex Sharov
b94bc84a3b
snapshots: command to debug retire blocks (#3603)
* snapshots: command_to_debug_retire

* snapshots: command_to_debug_retire
2022-02-24 11:30:34 +07:00
ledgerwatch
114d2d8f3a
Skip analysis update (#3594)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-02-24 10:23:44 +07:00
Alex Sharov
3067cf9999
snapshots: ensure tmpdir exists (#3602) 2022-02-24 08:37:16 +07:00
ledgerwatch
17b2a9ba93
Bor fixes (#3553)
* Integration to work with bor

* Turn off validator set check

* disable verifySeal, add skeleton of postExec stage

* Pass around syscall

* Print

* Print more

* Default heimdall values for integration

* restore contract

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Fix nonce of system contract

* Remove prints

* Revert some more printing

* More fixes

* Print log

* Fix transfer log

* More printing

* More printing

* Print

* Print

* Print

* Print

* Print

* Print

* Print

* Fix validaor reward

* Remove printing

* Remove more prints

* Less printing

* Fetch validators from heimdall

* Remove syscall from Seal and CalcDifficulty

* Remove syscall from Prepare

* Print

* Remove DNS discovery

* Print apply snapshot

* Print

* Chunk up snapshot generation

* Chunk up snapshot generation

* Better logs when snapshotting

* Handle parents

* Prevent shadowing of snap

* Fix heimdall fetch

* Logging fixes

* Save generated snapshots

* Add header

* Less logging

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-24 00:03:10 +00:00
ledgerwatch
ee488020dd
Auto detect latest block for optimal use of plain state and state cache (#3598)
* Auto detect latest block for optimal use of plain state and state cache

* Fix lint

* Fix test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 23:42:14 +00:00
ledgerwatch
542b8827b0
storage override revert support (#3597)
* storage override revert support

* Fix

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 21:53:53 +00:00
Andrew Ashikhmin
37ccbc53d6
Refactor payload building (#3592)
* Bump MaxPendingPayloads

* UnknownPayload error

* Improve ExchangeTransitionConfigurationV1 comment

* Extract MakeEmptyHeader

* Move MakeEmptyHeader to chain_makers

* Start with empty block as pending payload

* Only build payloads with the right parent hash

* Double check parent hash in SpawnMiningCreateBlockStage

* Simpler error formatting

* ReadHeadBlockHash instead of ReadHeadHeaderHash

* Avoid rebuilding already built blocks

* getPayload should stop the build process

* Tweaking stageLoopIsBusy

* Don't update pending payload after engine_getPayload
2022-02-23 21:27:38 +01:00
battlmonstr
47edcd1b6b
Refactor discovery bootnodes parsing. (#3596)
Simplify node URL list logic.
Handle errors.
2022-02-23 20:24:13 +00:00
leonardchinonso
269ce45e70
Feature/test event logs (#3595)
* Adding contract code for event logs subscription

* Saving changes

* gofmt'd files

* Setting up devnet test tool for log subscription testing

* Fixed lint errors
2022-02-23 17:47:01 +00:00
battlmonstr
6fceb72a74
Refactor node private key setup. (#3593)
Extract private key setup from the global config setup to make it reusable.
Return errors instead of panicing.

* NodeKey() method is removed - it is unused.
2022-02-23 15:05:27 +00:00
Enrique Jose Avila Asapche
5536b70a35
new bootnodes (#3591) 2022-02-23 14:18:02 +00:00
Enrique Jose Avila Asapche
198f021f33
Better inputs (#3590)
* updated tests

* using rpc.Timestamp

* added Timestamp type
2022-02-23 13:52:19 +00:00
alex.sharov
a2feb80c9b snapshots: fix test 2022-02-23 19:54:58 +07:00
ledgerwatch
7397af57d4
Optimise eth_getStorageAt for current state (#3580)
* Optimise eth_getStorageAt for current state

* Fix

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 09:44:55 +00:00
alex.sharov
258e8d5506 snapshots: fix test 2022-02-23 13:18:00 +07:00
Alex Sharov
0a09187492
Snapshots: more filename fixes (#3583) 2022-02-23 13:05:44 +07:00
Alex Sharov
81d51e1589
snapshots: better files sort and filter (#3582) 2022-02-23 10:54:35 +07:00
battlmonstr
082194d538
Discovery: add Context to Listen. (#3577)
Add explicit Context to ListenV4 and ListenV5.
This makes it possible to stop listening by an external signal.
2022-02-22 18:18:43 +00:00
battlmonstr
ffdf02bf29
Makefile: silence a few build messages. (#3578)
Silence non-important comments in the "make erigon" output.
2022-02-22 18:17:50 +00:00
battlmonstr
4337871f7f
Rename log/logger to follow conventions. (#3579)
* use "log" for struct fields
* use "logger" for function parameters and local vars

This is a compromise between:
1) using logger := log.New() to avoid aliasing (log := log.New())
2) and keeping it short when logging e.g.: srv.log.Info(...)
2022-02-22 18:17:15 +00:00
battlmonstr
e6c056e666
Rename Datadir/dataDir to follow conventions. (#3576)
* rename from Datadir to DataDir (functions and public vars)
* rename dataDir to datadir (local variables)
2022-02-22 17:39:48 +00:00
Giulio rebuffo
b49381821f
Fixed get-payload and Hanging ForkChoice (#3575)
* done

* removed sleep

* f

* errors.Is(err, io.EOF) instead of err == io.EOF

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-02-22 14:47:23 +01:00
ledgerwatch
266625f56a
Fixes to access list and state overrides (#3570)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-22 10:29:02 +00:00
Alex Sharov
20452c3dd6
close channel by producer (#3569) 2022-02-22 16:25:02 +07:00
Alex Sharov
ab01d64916
fix close files error on win (#3572) 2022-02-22 16:24:33 +07:00