-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
test: move 4844 tests to sim tests #6622
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## unstable #6622 +/- ##
=========================================
Coverage 61.69% 61.69%
=========================================
Files 556 556
Lines 58820 58820
Branches 1887 1887
=========================================
Hits 36287 36287
Misses 22492 22492
Partials 41 41 |
Performance Report✔️ no performance regression detected Full benchmark results
|
Decided to split this PR to multiple, so temporally converting to draft. |
309d8a0
to
4a7fd0f
Compare
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.
Silly comment but can we add JS to the Web3 portion of the file and function names, or perhaps go back to Eth1Provider naming so its a bit more clear what is happening in here. Makes sense after opening it but looking through the file structure in vscode it would be a bit less clear unless someone understood what it was. While i love file names to match the class they export we dont do that anywhere else in the codebase so we should probably match that and call the file web3JsPluginProvider
or web3JsProvider
or something similar. Up to you how you want to handle that though.
const blob = new Uint8Array(FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT); | ||
const dv = new DataView(blob.buffer, blob.byteOffset, blob.byteLength); | ||
for (let i = 0; i < FIELD_ELEMENTS_PER_BLOB; i++) { | ||
dv.setUint32(i * BYTES_PER_FIELD_ELEMENT, i); | ||
} | ||
return blob; |
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.
Why not just use return Uint8Array.from(crypto.randomBytes(FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT))
here?
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.
I believe because that will be bigendian and we want the blob to be little-endian.
@@ -18,9 +18,9 @@ export function createExecutionHeadAssertion({ | |||
return AssertionMatch.None; | |||
}, | |||
async capture({node}) { | |||
const blockNumber = await node.execution.provider?.getBlockNumber(); | |||
const blockNumber = await node.execution.provider?.eth.getBlockNumber(); |
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.
I didn't notice the eth namespace in Web3Plugins.ts
. Is that the default?
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.
That comes as default with the web3.js
return blobSideCars.response.data.length; | ||
}, | ||
|
||
assert: async ({store}) => { |
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.
I know you said there is no reason to assert the blobs are correct but part of me thinks that seems incorrect. How do you know they are not getting included in the wrong block or that the commitments match?
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.
LGTM. I still tend to believe we need to check that the blobs are the correct ones in the assertion. Other than than that im pretty sure this is all correct but have to rely on the CI run itself and others to double check as well.
Had a partial review from before you broke out the other PR’s from this one. Some of those comments are still relevant though |
I want to cover few more scenarios as well, will do in separate PR. This PR is just converting existing assertions from old tests to sim tests, so that's fine. |
@matthewkeil I am merging this PR and open small PRs to address remaining comments. |
* Remove old 4844 sim test * Add support for 4844 tests in sim tests * Fix file path * Fix merge conflict issue
🎉 This PR is included in v1.18.0 🎉 |
Motivation
Cover more scenarios in the sim tests.
Description
Steps to test or reproduce