Commit Graph

413 Commits

Author SHA1 Message Date
Giulio rebuffo
fb9f193349
fixed Two Block PoW Re-org to Higher-Height Chain (#4730)
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-18 03:04:02 +02:00
Giulio rebuffo
8a754cd252
Added PoS download validation when applicable (#4728)
* added incomplete version of PoS download validation

* fixed stuff
2022-07-17 02:02:53 +02:00
Andrew Ashikhmin
af661a9459
Fix canExtendCanonical when some headers are downloaded (#4709)
* Fix canExtendCanonical when some headers are downloaded

* Restore original logic for forkValidator.ValidatePayload

* Check FCU status
2022-07-14 11:03:15 +02:00
Andrew Ashikhmin
dd1a5944a9
Better logging for invalid PoS headers (#4703) 2022-07-13 12:07:21 +02:00
Giulio rebuffo
b161c27ac3
optimized one db read (#4694) 2022-07-12 10:39:57 +02:00
Giulio rebuffo
51245d294f
Add PoS validator struct [Refactoring] (#4690)
* added fork_validor struct

* replaced occurences of hd with forkValidator

* added engineapi.validatorFork

* 32 blocks maxForkDepth

* removed useless if
2022-07-11 15:12:21 +02:00
Andrew Ashikhmin
225935b376
Bump log level of some PoS messages from Trace to Debug (#4682) 2022-07-08 15:18:36 +02:00
Alex Sharov
01bca8f1e2
TxPool: generics btree (#4665)
* save

* save

* save

* save
2022-07-07 11:07:48 +06:00
Giulio rebuffo
99208ff4dc
Fixed hive test (#4653) 2022-07-06 13:52:49 +02:00
Giulio rebuffo
5e1cc9ae51
fixed Invalid Number reorg (#4643) 2022-07-05 23:40:10 +02:00
Giulio rebuffo
d4a0aff53f
fixed hive test: Transaction Reorg - Check Blockhash with NP on revert (erigon) (#4640) 2022-07-05 20:03:05 +02:00
Giulio rebuffo
a76e6a1d05
fixed deadlock (#4633) 2022-07-05 09:53:28 +02:00
Giulio rebuffo
d83b7a4ae0
Proper PoS Error reporting (#4631)
* better reporting

* removed debug log

* proper error reporting
2022-07-05 01:31:16 +02:00
Andrew Ashikhmin
00ee68e4a1
FeedHeaderPoS already writes header number (#4626)
* FeedHeaderPoS already calls WriteHeaderNumber

* Moreover, WriteHeader already writes to HeaderNumber
2022-07-04 11:28:10 +02:00
Giulio rebuffo
b980280785
Fixed hive test on invalid transition payload (#4618)
* experiment #1

* experiment #2

* experiment #3

* experiment 4
2022-07-03 17:36:39 +02:00
Giulio rebuffo
3fc51f5ef7
Revert "Proper Pos block checker when INVALID/ACCEPTED status is sent (#4604)" (#4616)
This reverts commit e90e03ae31.
2022-07-03 13:11:16 +02:00
Giulio rebuffo
fd2886b927
Revert "fixed compilation (#4614)" (#4615)
This reverts commit 1c5ec22d09.
2022-07-03 12:54:27 +02:00
Giulio rebuffo
1c5ec22d09
fixed compilation (#4614) 2022-07-03 12:37:31 +02:00
Giulio rebuffo
e90e03ae31
Proper Pos block checker when INVALID/ACCEPTED status is sent (#4604)
* added proper PoS block checker

* proper invalid lvh

* p

* fixed smol thingy

* fix more

* fixed engine API

* fixed engine API

* better nil hash

* added 0x0 checks

* full support
2022-07-03 11:58:57 +02:00
Giulio rebuffo
3de3baf585
default side fork support (#4611) 2022-07-03 00:14:22 +02:00
Giulio rebuffo
33892ffd79
Fixed transaction on hive tests (#4590)
* try 1

* try 1

* fix now?

* Update accessors_chain.go

* Update accessors_chain.go

* added comments
2022-07-01 11:02:24 +02:00
Giulio rebuffo
087105d1f3
lvh on invalid transition block (#4583) 2022-06-30 18:20:21 +02:00
Andrew Ashikhmin
7cd195117f
More robust quitting of PoW mining (#4574)
* isTrans -> cfg.blockBuilderParameters != nil

* More robust quitting of PoW mining
2022-06-29 17:39:12 +02:00
Giulio rebuffo
ed69bac065
Fixed in-memory execution hive tests (#4565)
* badBlockHalt

* fixed buidl

* lintl
2022-06-29 08:28:00 +06:00
Giulio rebuffo
aa7985341e
LVH support to memory overlay (#4555)
* fixed fcu

* fixed leak

* maybe now?

* wrote forkchoice
2022-06-28 17:46:24 +02:00
Andrew Ashikhmin
dc5d3ffaac
Revert "Switch from eth/66 to eth/67 (#4549)" (#4562)
This reverts commit 16e57aa8a2.
2022-06-28 13:42:35 +02:00
Andrew Ashikhmin
16e57aa8a2
Switch from eth/66 to eth/67 (#4549)
* Switch from eth/66 to eth/67

* Fix a compilation error

* Update erigon-lib

* Refresh erigon-lib
2022-06-28 10:12:48 +02:00
Giulio rebuffo
588c2d4e36
Implemented side forks support (up to depth of 128). (#4514)
* side forks

* fixed stuff

* lint

* update go.mod and go.sum

* cmd

* added comment

* better validatePayload

* fixed empty payload sometimes

* support future side forks

* added crit error handle

* fix compile err

* lint
2022-06-27 15:59:54 +02:00
Alex Sharov
b9cb6d953e
Fix nil td (#4546)
* save

* save
2022-06-26 17:27:14 +06:00
Alex Sharov
afd07e5dee
--no-downloader flag support (#4545) 2022-06-26 17:13:32 +06:00
Giulio rebuffo
7896fc60b6
fixed notifications (#4520) 2022-06-23 17:23:35 +02:00
Andrew Ashikhmin
0a527feddb
Send Engine API response after tx.Commit() even when useExternalTx (#4516)
* pendingPayloadStatus -> pendingPayloadHash

* Ensure that Engine API response is sent after tx.Commit() even when useExternalTx

* ProcessEngineApiResponse -> SendEngineApiResponse

* PayloadResponse -> PayloadStatus
2022-06-22 14:54:23 +02:00
Andrew Ashikhmin
18e5bf3bbf
Rework PR 4505 (#4511)
* Revert "Update chainConfig in the database (#4505)"

This reverts commit f38ab485e0.

* Only preserve config of unknown chains
2022-06-21 10:17:54 +02:00
ledgerwatch
f38ab485e0
Update chainConfig in the database (#4505)
* Update genesis.go

* Remove the test

* Remove unnecessary code

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-06-20 16:51:19 +01:00
Giulio rebuffo
7a2b575e56
Added memory execution (#4446)
* add

* added in memory execution draft

* func to state

* added functionality

* backend function for memory execution

* simplified stage state

* haltable stage execution

* added mod sum

* hd

* sl

* LOL

* LOL again

* need trace

* more logs

* added cleanup on fcu

* fcu

* mod

* bunch of prtln

* feed

* ops

* headers notify

* revert

* slightly more commented

* head

* nil block retire

* comments

* prevent clean

* corrected occasional panics

* fixed lint
2022-06-19 20:45:36 +01:00
ledgerwatch
b1572a15d5
No reorgs when fork choice head points to a canonical header (#4466)
* No reorgs when fork choice head points to a canonical header

* Return immediately

* Fix sentry

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-16 16:07:09 +01:00
Giulio rebuffo
2e600316e3
Used memory batches from Erigon (#4469)
* modded summed

* deleted

* ops
2022-06-16 16:39:56 +02:00
Giulio rebuffo
1f36d76e09
Added Flush function to memory mutation (#4439) 2022-06-13 18:20:18 +02:00
Andrew Ashikhmin
eb497372ae
Interruptible PoS block building (#4438)
* Fix a typo

* BlockBuilder dummy

* BlockProposerParametersPOS -> BlockBuilderParameters

* Pass tx to MiningStep

* BlockBuilderFunc

* Interrupt in MiningExec Stage

* Draft implementation of BlockBuilder

* Fail back to empty header

* Add a comment

* cosmetic change

* Cosmetic change again

* It's not safe to pass transactions between goroutines
2022-06-13 15:43:09 +02:00
Giulio rebuffo
f9024fed84
Removed annoying log (#4424) 2022-06-10 01:54:22 +02:00
ledgerwatch
f31abfe83b
Fixes for RPC notification log (#4410)
* Underflow fix

* Fix rpc notification to 0

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-09 08:48:19 +07:00
ledgerwatch
2305d09d0d
Print blocks to TTD (#4405)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-08 10:26:42 +01:00
ledgerwatch
e90bc39e04
Another anchor fix (#4395)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-07 09:42:58 +01:00
Alex Sharov
a53642b4bf
datadir.Dirs configuration object to group dir config (#4387) 2022-06-07 10:24:50 +07:00
ledgerwatch
b2f9b25300
For for overwritten anchor (#4379)
* For for overwritten anchor

* Switch to time types, log retry time in diagnostics

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-06 18:23:41 +01:00
Andrew Ashikhmin
f3575ce46a
Fix MarkAllVerified (#4380) 2022-06-06 18:22:08 +01:00
ledgerwatch
4a5f97527b
Better diagnostic for stuck headers (#4372)
* More stuck headers diagnostics

* Temp print

* Remove temp print

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-05 15:00:13 +01:00
ledgerwatch
1231f8c21c
Add bor mainnet to embed (#4370)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-05 11:39:27 +01:00
Alex Sharov
f838268e44
[wip] Snapshots: more runtime invariants check (#4350) 2022-06-03 18:50:01 +07:00
Giulio rebuffo
f2be5a74a0
fixed it (#4336) 2022-06-02 15:54:11 +02:00