Andrew Ashikhmin
a8a104c35c
Merge & Downloader logging improvements ( #5398 )
...
* Prefix downloader logs with [Downloader]
* Better check for syncing
* Better handle nil dereference
2022-09-16 15:15:48 +02:00
Giulio rebuffo
c58a3be765
ops ( #5048 )
...
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-13 23:40:53 +02:00
Giulio rebuffo
8ade569cc5
Save PoW blocks for processing received through P2P ( #5015 )
...
* save terminal blocks
* ops
* save less PoW blocks
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-12 21:54:20 +02:00
Giulio rebuffo
6d86b3a403
use of memory batch ( #4961 )
...
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-08 18:20:12 +02:00
Giulio rebuffo
7a64fe44eb
UX improvement for pre-merge sync with Teku ( #4955 )
...
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-08 11:26:34 +02:00
Giulio rebuffo
a481b77489
removed incarnation updates and removed side forks past fcu ( #4944 )
...
* removed incarnation updates and removed side forks past fcu
* has
* fixed hive
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-05 18:07:27 +02:00
Giulio rebuffo
3a972cc074
Removed the use of memory mutation for side-fork unwinds. ( #4857 )
...
* done
* updated sum and mod
* error handling
* error handling
* comments
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-31 15:56:08 +02:00
Giulio rebuffo
101e181c52
if PoS download block is within reach, determine VALID or INVALID ( #4812 )
...
* if PoS download is fast enough, determine VALID or INVALID
* more acceptable absolute value
* solved comments
* remove useless
* moved check in stage_headers
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-26 15:24:02 +02:00
Andrew Ashikhmin
c1f848746d
Update consensus tests to v11 ( #4724 )
...
* Consensus tests update 11
* Add GrayGlacier fork
* Wire currentRandom from tests into PREVRANDAO
* Serenity engine
* Support insertion of PoS blocks in MockSentry
* Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()
* Revert "Introduce marshallTypedTransactionsAsRlpStrings arg into (*Block) RawBody()"
This reverts commit 903fca572be03c7de33318ce177a03a4be34927b.
* Post-merge fix
* Don't wait for Beacon Chain in tests
* Skip powToPosBlockRejection transition test
* ForkChoice in insertPoSBlocks
* Add withPosDownloader arg to MockWithEverything in order to fix TestPoSDownloader
2022-07-26 09:35:38 +02:00
Giulio rebuffo
1cb6be02a5
Avoid constantly triggering stageloop when using Engine API ( #4797 )
...
* avoid constantly triggering stageloop when using Engine API
* fix lint + test
* fixed comments
* ops
* little fixes here and there
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-23 18:57:23 +02:00
Giulio rebuffo
46a8c531ce
Optimized PoS header downloader ( #4775 )
...
* optimized PoS header downloader
* removed println
* comments
* ops
* Restore schedulePoSDownload params + simplify
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2022-07-22 11:07:58 +02:00
Andrew Ashikhmin
6060b87840
Fix binary vs raw confusion for PoS transaction ( #4781 )
...
* Replace PayloadMessage with Block
* RawTransactions -> BinaryTransactions for clarity
* add a log warning
2022-07-21 19:40:00 +02:00
Giulio rebuffo
1becfc509b
extra reset before starting change in rewind side fork ( #4774 )
...
* extra reset before starting change
* extra reset before starting change
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-21 04:06:26 +02:00
Giulio rebuffo
7573a41069
fixed accumulator nil case ( #4773 )
...
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-21 03:47:37 +02:00
Giulio rebuffo
73b028a5fd
better payload cleanup ( #4772 )
...
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-20 18:16:42 +02:00
Giulio rebuffo
d4f865d725
Added proper cleanup when we get notified of new height ( #4753 )
...
* added proper cleanup when we get notified of new height
* added extra cleanup
* removed bad if condition
* fixed hive tests
Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-07-19 22:31:15 +02:00
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
Giulio rebuffo
6b6b74e034
removed code duplication ( #4697 )
2022-07-12 15:25:32 +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
daa84922d6
Commit transaction before responding on Engine API ( #4506 )
...
* Remove an unused interrupt value
* Remove sendErrResponse from safeAndFinalizedBlocksAreCanonical
* Clean up err handling
* startHandlingForkChoice returns response
* handleNewPayload returns response
* Commit transaction before responding on Engine API
* small fix
* Reply with SYNCING before long unwind
* schedulePoSDownload doesn't require requestStatus anymore
2022-06-20 23:03:17 +02:00
Andrew Ashikhmin
74a7d7c75a
Refactor PoS downloader ( #3717 )
...
* Remove blockHeight arg from FeedHeaderPoW
* Revert "Remove blockHeight arg from FeedHeaderPoW"
This reverts commit 9bf92921db11cd4e13386fcee29f30241d070fc6.
* Move PayloadMessage & ForkChoiceMessage to package engineapi
* RequestList instead of newPayloadCh & forkChoiceCh
* Introduce request status
* Send reply only when request status is New
* Move BeaconRequestList to HeaderDownload
* Don't SetFetching when PoS (Fetching means handling newBlockHashes)
* Merge Syncing & Synced into DataWasMissing
* Introduce SyncStatus
* onlyNew arg in WaitForRequest
* Move waitingForBeaconChain into RequestList
* Interrupt instead of skipCycleHack
* Introduce timeout for PoS headers
* Split downloadMissingPoSHeaders
* Move StartPoSDownloader into HeaderDownload
* Move Stopping interrupt to StartPoSDownloader
* Move stopping PayloadStatus back to HeadersPOS
* cleanUpPoSDownload
* Post-merge fix
* TestBogusForkchoice
* TestPoSDownloader
* requestStatus in attemptPoSDownload
* Broadcast in SetStatus
* Cosmetics
* attemptPoSDownload -> schedulePoSDownload
* Demote some logs to Trace
2022-03-22 17:49:12 +01:00