-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support EIP-4844 - WIP #4774
Support EIP-4844 - WIP #4774
Conversation
await this.db.block.add(block); | ||
|
||
if (this.config.getForkSeq(block.message.slot) >= ForkSeq.eip4844) { | ||
if (!blobs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this extraction and error throw be before forkChoice.onBlock...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, our import block flow is unsafe because it can end up in an inconsistent state
@@ -22,6 +27,9 @@ export function computeNewStateRoot( | |||
const postState = stateTransition( | |||
state, | |||
blockEmptySig, | |||
// ExecutionPayloadStatus.valid: Assume payload valid, it has been produced by a trusted EL | |||
// DataAvailableStatus.available: Assume the blobs to be available, have just been produced by trusted EL | |||
{executionPayloadStatus: ExecutionPayloadStatus.valid, dataAvailableStatus: DataAvailableStatus.available}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we generally use ExecutionStatus
from forkchoice outside the engine module
Performance Report✔️ no performance regression detected Full benchmark results
|
@nazarhussain sim tests failed with
after apparently completing successfully, can you look into it? |
@dapplion This one failed because the nodes could not sync and tests run out of expected timeout.
|
Note: https://github.com/Inphi/eip4844-interop repo uses a modified minimal preset (SLOTS_PER_EPOCH = 3) which breaks a bunch a tests here |
3e9b041
to
22d1f85
Compare
// Finalized tram of blobs | ||
// TODO EIP-4844: Should the finalized block be included here or below? | ||
|
||
if (endSlot <= finalizedSlot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startSlot
68b5d67
to
ef08bb4
Compare
ef08bb4
to
310db0b
Compare
8c739dd
to
af4c0c5
Compare
af4c0c5
to
9c668fc
Compare
6ffc86a
to
ae177eb
Compare
6a955aa
to
06f024e
Compare
e4bb2d5
to
345ddea
Compare
@@ -35,6 +36,9 @@ export async function createNodejsLibp2p(options: ILibp2pOptions): Promise<Libp2 | |||
peerDiscovery.push(new MulticastDNS()); | |||
} | |||
} | |||
|
|||
const yamuxInstance = yamux()(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: do not merge this change, yamux must be tested and merged on its own
eea89f7
to
52c1761
Compare
52c1761
to
75abc66
Compare
e252d89
to
0053a51
Compare
commit f1e4aaa Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 15:31:01 2022 +0700 Fix get state for attestation verification logic commit ad2c300 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 15:14:14 2022 +0700 Add eip4844 sim test commit 6bf2e62 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 14:54:45 2022 +0700 Fix typo in gossipsub coreTopicsAtFork commit 2e565a8 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 14:54:08 2022 +0700 Fix typo in updateSyncState currentEpoch commit 4169498 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 14:53:54 2022 +0700 Create valid blobs in mock commit 0f22a80 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Dec 1 00:50:08 2022 +0700 Debug failing sim tests with more better progress logs commit 32b1779 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 22:19:54 2022 +0700 Don't create invalid mock data commit d77e741 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 15:52:08 2022 +0700 Allow to run mock EL in sim tests commit 6fd5d46 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 15:51:25 2022 +0700 Log chain config on start commit fb58663 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 15:50:36 2022 +0700 Add disabledWithdrawals commit ad9b478 Author: gajinder <develop@g11tech.io> Date: Wed Nov 30 13:25:52 2022 +0530 add eip4844 interop commit 74287e3 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 00:22:36 2022 +0700 Skip blobs validation if from gossip commit b30aa71 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 30 00:09:16 2022 +0700 Use enum for BlockImport commit 4bf587d Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 12:38:07 2022 +0700 Add note on reorg blobs commit ccdb9bb Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 09:33:29 2022 +0700 Prune producedBlobsSidecarCache commit ebf0eae Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 09:28:05 2022 +0700 Subscribe beacon_block_and_blobs_sidecar on fork commit 8614743 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 09:27:51 2022 +0700 Simplify blobsSidecar cache type commit 58c595a Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 02:00:47 2022 +0700 Fix rebase issues commit 804887d Merge: 22d1f85 c1ab090 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sun Nov 27 01:56:37 2022 +0700 Merge remote-tracking branch 'origin/unstable' into dapplion/eip-4844 commit 22d1f85 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 26 23:51:21 2022 +0700 Fix types commit 0216099 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 26 23:40:57 2022 +0700 fix rebase issues commit 6796207 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 26 23:40:28 2022 +0700 Subscribe to reqresp methods on forks commit 99cf400 Merge: d33472b 798ec16 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 26 21:35:52 2022 +0700 Merge remote-tracking branch 'origin/unstable' into dapplion/eip-4844 commit d33472b Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 26 11:05:06 2022 +0700 Mock blobs WIP commit 1dd5e74 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 25 00:02:41 2022 +0300 Enable blobs reqresp commit 9c0a0e6 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 25 00:02:18 2022 +0300 Add yamux commit 0427435 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 19 01:45:11 2022 +0100 Temp change FIELD_ELEMENTS_PER_BLOB commit 370c733 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 19 01:44:30 2022 +0100 Ensure correct sizes on blob bundle commit 90f0d4c Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Nov 19 00:57:47 2022 +0100 Fix verifyKzgCommitmentsAgainstTransactions math commit 5a6652b Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 23:12:46 2022 +0100 Check allVersionedHashes length commit 37f3387 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 22:40:36 2022 +0100 Skip verifyAggregateKzgProof is empty blobs commit e5d6f4f Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 22:15:30 2022 +0100 Set SLOTS_PER_EPOCH: 3 for interop tests commit 8f18bd8 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 21:51:06 2022 +0100 Move trusted setup file out of src commit 8d0f1c0 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 02:01:19 2022 +0100 Revert fork-choice changes commit 3b82bd7 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 01:57:44 2022 +0100 Only line JSON commit b47162b Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 01:49:29 2022 +0100 Revert preset changes commit c34e969 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 01:18:23 2022 +0100 Fix test bellatrix/fork_choice/on_merge_block/pyspec_tests/all_valid commit 9ea8348 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 00:43:16 2022 +0100 Fix test Should subscribe to gossip core topics on demand commit 58fb922 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Fri Nov 18 00:40:26 2022 +0100 Fix test utils / params / assertEqualParams commit 0d49fa4 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 23:33:37 2022 +0100 Fix gossipsub test commit 7ae69de Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 23:29:23 2022 +0100 Fix UnknownBlockSync test commit 4e2a63a Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 23:29:12 2022 +0100 Remove useless test commit 4f544df Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 23:23:25 2022 +0100 Fix enrForkID.nextForkVersion test commit a3f479e Author: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 19:09:15 2022 +0100 Disable parallel for spec tests (#4776) commit e7eba90 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 19:28:26 2022 +0100 Fix assertLinearChainSegment commit 864b7d3 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 18:06:13 2022 +0100 Review PR commit 6963c1c Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 16:23:00 2022 +0100 FIx readme checks commit ece46f0 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 15:43:03 2022 +0100 Fix tests commit 6c878e5 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 14:55:05 2022 +0100 Fix topic test commit 0f44e49 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 14:54:05 2022 +0100 Move kzg test to beacon-node commit 3f7a0ad Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 14:46:30 2022 +0100 Fix types commit 27e503f Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 14:46:15 2022 +0100 Remove old trusted setup commit fdeb4f5 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 14:36:35 2022 +0100 Review PR pt.2 commit 7da555e Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 12:10:04 2022 +0100 Remove DOMAIN_BLOBS_SIDECAR commit ceea759 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 12:06:59 2022 +0100 Ensure forks are not scheduled in presets commit 4148785 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 12:06:09 2022 +0100 Review Dan PR commit e969457 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 11:03:44 2022 +0100 Fix types commit e16a699 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 09:53:17 2022 +0100 Implement blobsSidecar pruning commit c90f0fb Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 09:42:05 2022 +0100 Archive blobs commit 4632bcf Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Nov 17 09:41:54 2022 +0100 Fix types commit 46f58a4 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 16 23:35:37 2022 +0100 Clean up changes commit 3d86a02 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 16 21:00:33 2022 +0100 WIP import block+blobs coupled commit d268815 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 16 18:57:22 2022 +0100 WIP block processing commit 175117d Merge: ffb6336 bfe5da8 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed Nov 16 11:44:02 2022 +0100 Merge remote-tracking branch 'origin/unstable' into dapplion/eip-4844 commit ffb6336 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue Nov 15 21:27:30 2022 +0100 WIP commit 611a609 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue Nov 15 15:36:42 2022 +0100 Fix script name commit 26a0794 Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Tue Nov 15 15:33:38 2022 +0100 De-couple block production commit 513b873 Author: dancoffman <coffman@coinbase.com> Date: Wed Nov 9 10:30:54 2022 -0800 Bump c-kzg to version that handles empty array of blobs -- remove application code special-case commit a63b043 Author: dancoffman <coffman@coinbase.com> Date: Tue Nov 8 13:00:57 2022 -0800 Update version of c-kzg to one which does not crash for blobs arrays of length 0 and 1 commit 6a8d536 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 23:33:02 2022 -0800 Delete unused polynomialCommitments file commit 656b7d3 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 23:26:44 2022 -0800 processBlocks for 4844 blocks. Do not compute aggregate proof for empty array (it crashes) commit aee7d95 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 16:53:02 2022 -0800 Bump c-kzg again commit b992fc6 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 16:52:09 2022 -0800 Add unit test just to verify the c-kzg library works commit 054cfb6 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 15:17:50 2022 -0800 Fix trusted_setup file path commit 7e8f3ab Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 11:55:34 2022 -0800 Load KZG setup commit 513e277 Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 11:51:04 2022 -0800 Bump c-kzg to the version that compiles on Linux commit 78220ef Author: dancoffman <coffman@coinbase.com> Date: Mon Nov 7 11:32:30 2022 -0800 Bump @types/node commit 3db4f57 Author: dancoffman <coffman@coinbase.com> Date: Sat Nov 5 01:17:08 2022 -0700 Use computeAggregateKzgProof from the c-kzg package and delete all the code it encapsulates commit 2fe076b Author: dancoffman <coffman@coinbase.com> Date: Mon Oct 31 17:36:49 2022 -0700 Drill blobs all the way through commit ad1a62f Author: dancoffman <coffman@coinbase.com> Date: Mon Oct 31 16:10:33 2022 -0700 Use SSZ object correctly commit 28e9f8a Author: dancoffman <coffman@coinbase.com> Date: Mon Oct 31 15:11:59 2022 -0700 publishBlockWithBlobs implementation. A lot more moon math scaffolding that will be removed. commit d1e3e4b Author: dancoffman <coffman@coinbase.com> Date: Sat Oct 29 00:23:42 2022 -0700 Scaffold block proposing w/ KZG commitments commit f3cedf9 Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 22:28:22 2022 -0700 Add a couple more of the polynomial commitment types commit 2e9e41a Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 16:32:14 2022 -0700 Add chain config constants and validator types commit b166387 Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 15:28:25 2022 -0700 Fix assigning excessDataGas to ExecutionPayload commit 2a4bedb Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 12:09:21 2022 -0700 Revert Capella ssz type change commit 89c43bf Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 12:08:00 2022 -0700 Revert upgradeStateToCapella commit 87ecaaf Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 11:57:55 2022 -0700 Fix allForks SSZ types commit e6c13e6 Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 28 12:13:17 2022 -0700 Add beacon_block_and_blobs_sidecar gossip type commit f5c8cfa Author: dancoffman <coffman@coinbase.com> Date: Fri Oct 21 11:54:04 2022 -0700 Fix: Accidentally removed assigning execution payload to block commit 78996a9 Author: dancoffman <coffman@coinbase.com> Date: Thu Oct 20 15:56:08 2022 -0700 Fix state upgrade and patch blocks with missing fields when necessary commit a83df9e Author: dancoffman <coffman@coinbase.com> Date: Thu Oct 20 09:42:02 2022 -0700 When producing a block to propose, assign blobKzgCommitments from Engine API getBlobsBundle response commit 6a7630f Author: dancoffman <coffman@coinbase.com> Date: Wed Oct 19 16:33:41 2022 -0700 Add engine_getBlobsBundleV1 Engine API call commit 9de5e10 Author: dancoffman <coffman@coinbase.com> Date: Wed Oct 19 15:11:08 2022 -0700 Capella and 4844 state upgrades commit 71e7e0b Author: dancoffman <coffman@coinbase.com> Date: Wed Oct 19 12:08:06 2022 -0700 Add DOMAIN_BLOBS_SIDECAR commit d3fe373 Author: dancoffman <coffman@coinbase.com> Date: Wed Oct 19 12:05:04 2022 -0700 Beacon chain types complete commit 451f6e9 Author: dancoffman <coffman@coinbase.com> Date: Wed Oct 19 11:21:07 2022 -0700 Spec-matching configs and presets commit 266ba7a Author: dancoffman <coffman@coinbase.com> Date: Tue Oct 18 18:56:33 2022 -0700 Sketch out EIP-4844 types commit 002d850 Author: dancoffman <coffman@coinbase.com> Date: Mon Oct 17 15:21:10 2022 -0700 Updates to allow test:spec-min|main work, some edits to contributing instructions fix build Remove duplicate mentions of beacon_block_and_blobs_sidecar Remove duplicate beaconBlockAndBlobsSidecarByRoot Remove unwanted diff run with withdrawals include Fix sim tests types Update command update package fix port update the run merge interop image update move to time Remove unwanted diff Fix merge issue with sim tests Fix code issue during merge conflicts Remove a duplicate function decleration remove bls-to-execution-change empty assignment lint fix issues
9d7a6c2
to
eeae7a4
Compare
Closing, base eip4844 features already merged. |
Motivation
Full implementation of the EIP-4844 hard-fork logic. EIP-4844 rationale -> B L O B S P A C E
Description
Implementation list:
c-kzg
library available for Lodestar. Add native bindings forethereum/c-kzg-eip4844
NodeJS bindings dankrad/c-kzg#3engine_getBlobsV1
processBlock
to take block + (maybe) blobs pairis_data_available
, running KZG cryptoBeaconBlockAndBlobsSidecarByRoot
+BlobsSidecarsByRange
beacon_block_and_blobs_sidecar
Test list: