refactor: block proposal cleanup#8155
Conversation
|
Before I refactor this branch, want to get some consensus on changes to keep:
|
02ee071 to
778004c
Compare
Performance Report🚀🚀 Significant benchmark improvement detected
Full benchmark results
|
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## unstable #8155 +/- ##
============================================
- Coverage 54.23% 54.19% -0.04%
============================================
Files 844 844
Lines 63482 63509 +27
Branches 4796 4795 -1
============================================
- Hits 34428 34420 -8
- Misses 28979 29013 +34
- Partials 75 76 +1 🚀 New features to boost your workflow:
|
|
|
||
| let blockForImport: BlockInput, blobSidecars: deneb.BlobSidecars, dataColumnSidecars: fulu.DataColumnSidecars; | ||
|
|
||
| if (isDenebBlockContents(signedBlockContents)) { |
There was a problem hiding this comment.
considering deneb and fulu block contents are not quite the same, not sure I like this but I guess it's not the worst either
| const signedBlindedBlockOrBlockContents = blockContentsWrapper.executionPayloadBlinded | ||
| ? {signedBlock} | ||
| : {signedBlock, ...blockContentsWrapper.blockContents}; | ||
| delete (signedBlindedBlockOrBlockContents as {block?: BeaconBlock}).block; // remove block if present |
There was a problem hiding this comment.
well this is not great but BlockProposingService is a bit of a mess already, need to think about refactoring that at some point
There was a problem hiding this comment.
Yeah this file is bad...
nflaig
left a comment
There was a problem hiding this comment.
LGTM - overall removed more nasty stuff than it added 😅
|
🎉 This PR is included in v1.34.0 🎉 |
Motivation
Description
Our block production and publishing data flow was messy. The data types and utility functions are jumbled, duplicate functions, differences from spec functions, etc. To that end, this refactors things that touch this proposal data flow.
BlockContentstype to also include pre-denebBeaconBlockBlockOrContentsvariables and typesContents(It isn't actually needed)produced*caches intoblockProductionCacheBlobsBundletypecomputeDataColumnSidecarsin favor ofgetDataColumnSidecars*functionscomputeBlobSidecarsintogetBlobSidecarsfrom the spec