Giulio rebuffo
72d9947479
fix transition warning ( #3687 )
2022-03-13 10:24:17 +01:00
Giulio rebuffo
7094dcc614
Fixed forkid for mergeBlock ( #3686 )
...
* fixed forkid for mergeBlock
* ops
* ops again
2022-03-12 22:51:31 +00:00
Giulio rebuffo
99f688c3ec
PrevRandao Renaming ( #3616 )
...
* PrevRandao Renaming
* lint
2022-02-24 18:16:05 +01: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
Andrew Ashikhmin
980276c322
Fix coinbase in stage_mining_exec ( #3564 )
...
* Simplify TerminalBlockHash & TerminalBlockNumber
* Simplify FeedHeaderPoS
* More accurate comment
* Relax TerminalBlockHash check
* Extract the sleep hack into stageLoopIsBusy
* Several short naps instead of a single longish sleep
* Fix coinbase in stage_mining_exec
* More orthodox loop
* typo in comment
2022-02-21 18:05:39 +01:00
Andrew Ashikhmin
0701c83222
Fix stall on unwind in handleForkChoice ( #3536 )
...
* ReadHeader instead of ReadHeaderByHash
* Add Engine API to rpcdaemon README
* Fix nil pointer dereference in HandlePendingBlock
* Fix latestValidHash JSON
* Delete GetPayloadBodiesV1
* Break infinte unwind loop in handleForkChoice
* More logging
2022-02-17 18:30:57 +01:00
Enrique Jose Avila Asapche
089a1dd5e7
adding engine_ExchangeTransitionConfigurationV1 ( #3454 )
2022-02-15 09:30:54 +00:00
Andrew Ashikhmin
8466cb1b7b
New Engine API semantics (Kiln v1) ( #3340 )
...
* Disable PoS sync temporarily
* Resore PoS sync
* Handle Ctrl^C in HeadersPOS
* Consistent naming
* Extract verifyAndSavePoSHeader & downloadMissingPoSHeaders
* Preparation for EngineForkChoiceUpdated re-orgs
* Extract ForkingPoint
* Comments
* New proto for Engine API
* EngineExecutePayload -> EngineNewPayload
* Return INVALID_BLOCK_HASH if block hash is invalid
* Return EngineStatus_ACCEPTED for side chain blocks
* Update erigon-lib (PR 268)
* Fix payload2Hash
* reverseDownloadCh -> beaconPayloadCh
* Update erigon-lib
* Engine API updated
* ExecutionStatus -> PayloadStatus
* Introduce forkChoiceCh
* Mock ForkChoiceMessage/PayloadStatus
* Add ValidationError to PayloadStatus
* Small clean-ups
* Add INVALID_TERMINAL_BLOCK to EngineStatus
* Add a comment
* Extract handleNewPayload & handleForkChoice
* Partially implement handleForkChoice
* Update erigon-lib
* short vs long re-org
* Move header insertion out of downloadMissingPoSHeaders
* Update erigon-lib
* Refactor ProcessSegmentPOS
* Fix imports
* Wire downloadMissingPoSHeaders into handleForkChoice
* evictOldPendingPayloads
* nolint:unused for assertSegment
* Try nolint instead of nolint:unused
* Small comment improvements
* HeadHeaderHash/StageProgress in handleForkChoice
* TODO: bodyDownloader.AddToPrefetch(block)
* Review call suggestions
* Don't use ReadHeaderNumber in ProcessSegmentPOS
* Don't leave ethbackend waiting when server is stopping
* Update erigon-lib
* More explicit signature of downloadMissingPoSHeaders
2022-02-09 08:33:22 +01:00
Alex Sharov
93e28ed3dd
fix some linter warns ( #3310 )
2022-01-20 14:00:31 +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
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
Enrique Jose Avila Asapche
290174a21e
Engine GetPayloadBodiesV1 ( #3118 )
...
* added an intitial idea for getBodiesV1
* changed it so it uses a map of hash => bodies
* fixed error in engine implement
* added make
* changed it so it uses rpc.BlockNumberOrHash
* changed map to use hash => executionPayload
2021-12-21 22:56:58 +01:00
Enrique Avila Asapche
99fd589459
added an intitial idea for getBodiesV1
2021-12-10 00:39:04 +00:00
Andrew Ashikhmin
e258eff9c2
Update Engine API to v1.0.0-alpha.5 ( #3074 )
...
* Update Engine API to v1.0.0-alpha.5
* Remove ForkchoiceState since we're going to handle unwinds via ExecutePayload, not ForkchoiceUpdated
2021-12-01 19:15:57 +01:00
Giulio Rebuffo
52e302b9ab
ops again
2021-11-30 14:14:04 +01:00
Giulio rebuffo
97ed051dca
Error handling
2021-11-30 13:58:00 +01:00
Giulio rebuffo
5c417e49dd
ops
2021-11-30 11:50:34 +01:00
Giulio Rebuffo
00bd53a7a4
gencodec
2021-11-29 18:30:33 +01:00
Giulio Rebuffo
6866eec31f
added transition checks
2021-11-26 23:03:47 +01:00
Giulio Rebuffo
af8b6da238
useless
2021-11-26 21:47:06 +01:00
Giulio Rebuffo
8e7954ee00
payload unwind placeholder
2021-11-26 21:46:43 +01:00
Giulio Rebuffo
e72d2399da
updated lib
2021-11-25 19:44:02 +01:00
Giulio Rebuffo
af4caf4459
fixed compilation
2021-11-22 16:17:01 +01:00
Giulio Rebuffo
bac85f854b
added getPayloadV1
2021-11-22 16:12:34 +01:00
Giulio Rebuffo
c05e3a9fa1
connected to daemon
2021-11-22 11:36:52 +01:00
Giulio Rebuffo
21cbc19f21
using batch over tx
2021-11-21 23:11:50 +01:00
Giulio rebuffo
c1e7650106
added engine_ namespace in rpcdaemon ( #2923 )
2021-11-07 08:38:36 +07:00