-
Notifications
You must be signed in to change notification settings - Fork 14
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
implement full block hint #172
base: main
Are you sure you want to change the base?
Conversation
10c32f9
to
5c5cc77
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #172 +/- ##
=======================================
Coverage ? 63.30%
=======================================
Files ? 43
Lines ? 7157
Branches ? 0
=======================================
Hits ? 4531
Misses ? 2626
Partials ? 0 ☔ View full report in Codecov by Sentry. |
}; | ||
|
||
// Prepare a random byte array for testing | ||
let raw_bytes = [0u8; 1500]; |
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.
side question: where does the size (1500) come from?
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.
The arbitrary
library uses a random data stream from raw_bytes
. The structure of SealedBlock
influences the minimum amount of data needed in raw_bytes
. If the array is too small, arbitrary might run out of data to generate a valid object.
So the 1500 provides this size and allows to have a full block with enough data and multiple transactions. For example, it is very likely that if the data sample was not enough and that few or no transactions are generated and also often the last data in the block are default data because the unstructured data source is not big enough.
In my experience on reth, for a block, between 1000 and 1500 is good to do complete randomness. So I chose 1500 here.
Co-authored-by: Clément Walter <[email protected]>
Co-authored-by: Clément Walter <[email protected]>
Should close https://github.com/kkrt-labs/keth/issues/138