Commit Graph

513 Commits

Author SHA1 Message Date
Alex Sharov
2bcc40fd3f
Snapshots: create .dat in tmpdir (#3222) 2022-01-09 14:43:58 +07:00
Alex Sharov
b4ab063be8
Snapshot: indexing to print logs with clear progress (#3221) 2022-01-09 12:06:00 +07:00
Andrew Ashikhmin
c2d0f0082a
Report Valid ExecutionStatus only after all stages (#3212)
* Stricter transition check

* EthBackendServer.numberSent was unused

* Take account of PoS blocks in TopSeenHeight

* Report Valid ExecutionStatus only after all stages, not straight in headers

* Print TTD on startup

* No need to check parent.Hash() again

* core: change baseFee into baseFeePerGas in genesis json

* fix typo

Co-authored-by: Martin Holst Swende <martin@swende.se>
2022-01-07 16:54:26 +01:00
Alex Sharov
4ef541f5dc
Snapshots: tx lookup in RPC from snapshots (#3214) 2022-01-07 20:52:38 +07:00
Alex Sharov
13d9e71ac7
Snapshots: txnHash2BlockNum idx (#3213) 2022-01-06 18:22:59 +07:00
Alex Sharov
eed7475af0
Snapshot: move parallel compression to erigon-lib (#3211) 2022-01-06 14:13:09 +07:00
Alex Sharov
1b856b5237
Snapshot: mainnet hashes and fixes (#3210) 2022-01-06 11:33:01 +07:00
alex.sharov
1ae4c72af8 mainnet hashes 2022-01-06 09:33:26 +07:00
Alex Sharov
65188ce440
Snapshot: add hash first byte to headers.seg, serve p2p blocks from snapshots (#3198) 2022-01-05 17:14:37 +07:00
Andrew Ashikhmin
d14c223881
Simplify miner gas limit post EIP-1559. Default to 30M (#3205) 2022-01-05 16:36:24 +07:00
Giulio rebuffo
195eb9abaa
Added mining for POS (#3187)
* added comunication with channels

* added final mining

* removed trash

* bug fixing

* async calls

* one thread

* tests

* better comments

* no lock

* better placing of skipCycleHack

* removed long timer

* moved transitioned block processing

* better naming

* disabled updates on blocks

* sync.Cond

* 2 sync.Cond

* better locking

* Use single sync.Cond. Proposer shutdown

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-01-04 18:37:36 +01:00
Alex Sharov
156287a982
Sanity check p2p block (#3197) 2022-01-04 15:46:22 +07:00
Alex Sharov
1bfc2ffde4
Snapshots: add --to parameter to "erigon snapshots create" (#3194)
* save

* save
2022-01-03 11:39:20 +07:00
Alex Sharov
6904e4c3c4
Snapshot: describe idx schema (#3191) 2021-12-31 20:42:56 +07:00
alex.sharov
e29be219a7 improve downloader readme 2021-12-31 11:53:15 +07:00
Giulio rebuffo
864b744ed2
Support for syncing on mergemock (#3174)
* block proposing

* standard finalized

* mergemock execution

* private chain can now be ran yay

* perfectioned

* polished

* more polishing

* resize PR

* resize PR

* resize PR

* simplifications

* fixed tests

* better syncronous communication

* better syncronous once again

* clean

* Re-enabled headers verification

* mining finish

* mining finish

* cleaned hash computation

* fixed evm bug

* go.mod

* Update .gitignore

* Update .gitignore

* Update .gitignore

* removed new line from .gitignore

* added go.mod and go.sum

* feeRecipient into preset

* useExternal

* todo

* fixed comment for forkchoiceUpdateV1

* smaller

* smaller

* Revert changes to miner frequency

* Restore useExternalTx

* Fix headerLoadFunc

* do not reset payloadId

* rename

* extra is empty

Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2021-12-29 17:25:13 +01:00
bgelb
2d9fe6cd9a
fix debug_storageRangeAt (#3148) 2021-12-29 10:36:41 +07:00
alex.sharov
1fb53eaf39 remove some unused flags 2021-12-28 10:37:37 +07:00
Alex Sharov
5cac9fbff5
Move snapshot creation from hack.go to "erigon snapshot create" cli sub-commmand (#3177) 2021-12-27 14:59:29 +07:00
Andrew Ashikhmin
445ac05220
Verify PoS headers before inserting them into DB (#3151)
* Remove TotalDifficulty stage

* Introduce FeedHeaderFuncType

* Some TODOs

* Don't gossip PoS headers

* FeedHeaderPoS

* Call header.Hash once

* Use FeedHeaderPoS for to write PoS header

* Support errors in EngineExecutePayloadV1

* useExternalTx boilerplate

* Call VerifyHeader on PoS header

* latestValidHash must be nil when status is SYNCING

* fixCanonicalChain instead of canonicalHeadersCollector

* engine.VerifyHeader + FeedHeaderPoS as headerLoadFunc

* fix daemon

Co-authored-by: Giulio Rebuffo <giulio.rebuffo@gmail.com>
2021-12-23 15:06:10 +01:00
TBC Dev
1dbcaa69cc
Move transition logic out of FeedHeaderFunc (#3158)
* Add type alias for FeedHeaderFunc

* Move transition logic out of FeedHeaderFunc
2021-12-23 12:46:55 +01:00
Andrew Ashikhmin
cfb35633ad
Make waitingPosHeaders atomic since it's accessed concurrently (#3157) 2021-12-22 17:12:35 +01:00
Alex Sharov
7390db7b84
Snapshots hashes for mainnet (#3150) 2021-12-21 21:12:32 +07:00
alex.sharov
635e73ecde Revert "save"
This reverts commit ef5bab77e4.
2021-12-17 16:11:56 +07:00
alex.sharov
ef5bab77e4 save 2021-12-17 16:11:13 +07:00
alex.sharov
59c2e88fec Revert "count in .seg"
This reverts commit 1a130bc9a9.
2021-12-17 09:36:07 +07:00
alex.sharov
1a130bc9a9 count in .seg 2021-12-17 09:35:49 +07:00
Giulio rebuffo
c596bb4306
Added WatchTheBurnStage + erigon_watchTheBurn json rpc call (#3137)
* added blockIssuance type

* added stage

* bug fixing

* simplifications

* minimalised

* fixed burned computation

* stage complete

* stage issuance

* reposition

* finished

* lint
2021-12-16 22:08:27 +00:00
brendan-kelly
3d048b7f1a
Add chain config and CLI changes for Binance Smart Chain support (#3131)
* Add chain config and CLI changes for Binance Smart Chain support

* Remove BSC hashes for now

* Add an if statement for BSC forks

* Fix up if statement

* Compiles

* Remove extra dependencies from go.mod/go.sum

* Add a TODO

* Potentially fix the tests
2021-12-16 07:26:44 +00:00
Frojdi Dymylja
499c27d2e1
change: port js tracer changes (#3128)
* change: expose callCtx as ScopeContext

* change: update tracer API

* change: logger API
update: jst tracer

* add: port jst tracer 2

* add: port jst tracer 3

* add: access list tracer

* chore: lint
2021-12-15 13:19:58 +00:00
ledgerwatch
d836e9e2d7
[beta] Skip analysis and preverified hashes (#3130)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-14 21:55:47 +00:00
ledgerwatch
bcdff3cb9b
Txpool tracing by sender addresses (#3113)
* Txpool tracing by sender addresses

* Update to latest erigon-lib

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-14 16:15:54 +00:00
Alex Sharov
ecb10e8548
Snapshots download and seed (#3117)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* Squashed 'interfaces/' content from commit e5b1945d0

git-subtree-dir: interfaces
git-subtree-split: e5b1945d02da7a7f00e2289034ee90a6edd60184

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2021-12-14 10:13:17 +00:00
Giulio rebuffo
23b3c1d9bc
Added reversed for proof-of-stake syncing (#3092)
* reverse sync slow but working

* progress

* p

* close request

* backwards refactoring

* cleanup 1

* added RequestAssembler

* remove trash code and spaghetti

* efficient

* fix

* refactor

* tf

* refact

* final refactoring

* headers forward restored

* test fixed

* make CI happy

* resolved comments

* not using insertList anymore

* oops

* better collectors

* removed debug config

* avoid pointers

* added sleep

* use of channels

* sleeping

* added logs for ETL

* added more cleanup

* correct glacier

* some refactoring

* maxRequests

* tweaks

* config.go

* config conflicts

* renamed functions
2021-12-13 17:46:15 +01:00
Alexandr Borodulin
22a9a9b27d
Add error tests for starknet_sendRawTransaction method (#3102)
* Add error tests for starknet_sendRawTransaction method

* Noop tx pool

* Rename cairo tx to starknet tx, refactor starknet send raw transaction test

* Remove noop tx pool

* Transaction struct

Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-12-12 22:24:21 +00:00
ledgerwatch
5413a4db91
Header download simplifications (#3106)
* Header download simplifications

* Fixes

* Reuse headerRaw for inserting into DB

* Fix tests

* Fix test

* Revert to the loop in RequestMoreHeaders

* Change Warn to Debug

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-10 07:04:04 +00:00
ledgerwatch
d16460e676
Rename maxHeight to lowestAnchorHeight for better readability (#3105)
* Rename maxHeight to lowestAnchorHeight for better readability

* Update header_algos.go

* Rename timestamp field in anchor, add comments

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-12-08 21:56:02 +00:00
Enrique Jose Avila Asapche
c3ed07ca4a
Implementing basic unwind process for Proof-of-stake (#3083)
* initial commmit

* gofmt

* flipped if statement

* flipped if statement (forgot to save)

* passing unwinding to status ch

* added unwinding constant

* took out unwinding

* added statusCh

* added a return statement and a second part to the if statement

* checking for parent hash

* checking for parent hash

* changed check to check for parentHash

* staged wrong file

* changed header check to parentHash check

* channged blockhash name to a better name

* changed it to check for header.Hash()

* changed name of blocknumber to blockHash

* changed bad block to common.Hash{}
2021-12-07 17:36:12 +01:00
Alexandr Borodulin
bbb3cc978f
Starknet getcode (#3038)
* deploy_cairo_smartcontract

* deploy_cairo_smartcontract / 2

Add new transaction type for cairo and vm factory

* starknet_getcode

* deploy_cairo_smartcontract / 3

* deploy_cairo_smartcontract / 4

* deploy_cairo_smartcontract / 5

Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-12-06 14:58:53 +00:00
ledgerwatch
494853ae39
Update skip analysis and preverified hashes (#3097)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-12-06 12:40:06 +00:00
primal_concrete_sledge
d89e5d2603
Issue/2710 add grpc health check (#3091)
* ISSUE-2710: Add standard grpc health check to services with grpc server

* Go import changed files

* Add flags for healthcheck

* Add grpc healthcheck option to rpcdaemon

* Remove grpc port info if grpc is not enabled

* Resolve merge issues
2021-12-06 12:03:46 +00:00
Alex Sharov
3f34dee475
first revisit downloader service (#3093) 2021-12-06 10:06:37 +07:00
Alex Sharov
b7aa5be149
Remove snapshot migrator class (#3088) 2021-12-05 16:13:40 +07:00
Alex Sharov
178fd1931d
Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07:00
Giulio rebuffo
3c95db0078
Fixed Proof-of-stake transition (#3075)
* added download channel to stage headers

* added direct execution

* now channel of headers rather than bodies

* simplifications

* fixed ttd headerForward

* garbage removed

* added some more stepping stones

* better transition

* covered edge case

* added names to returned values

* clean
2021-12-03 11:55:00 +01:00
Giulio Rebuffo
e76bc807bb better api 2021-11-29 15:47:08 +01:00
Giulio rebuffo
cfed35921c
Merge branch 'devel' into enginev1 2021-11-29 09:57:56 +01:00
TBC Dev
57d641b6f9
Avoid redundant Block.Header() deep-copy (#3050)
* Add separate Block.Nonce() and Block.NonceU64()

* Add Block.Seal()

* Avoid redundant Block.Header() deep-copy

* Add warning comment for Block.Header()
2021-11-29 08:52:36 +00:00
Alex Sharov
8104a90993
Snapshot: exec and trie to support snapshot files (#3033) 2021-11-29 10:43:19 +07:00
ledgerwatch
c3e361eadb
Update skip analysis and preverified (#3045)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-28 12:59:11 +00:00