-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
change transaction value fields from u128 to a wrapper-type of U256 #4439
change transaction value fields from u128 to a wrapper-type of U256 #4439
Conversation
Codecov Report
... and 11 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@mattsse ptal |
this is just a draft, no need to review just yet. we need to figure out how to best implement the to/from_compact methods to preserve the current ethereum DB format. |
5539805
to
94d9210
Compare
988f15a
to
0bc6340
Compare
252effb
to
492e77d
Compare
b1d7d03
to
6dd93eb
Compare
476b6ba
to
6b11dd1
Compare
6b11dd1
to
7481910
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.
I understand why we need this and this fix makes sense to me.
One problem is, that we're running CI with --all-features, which should be fine for testing but I think we should take extra precautions so that it does not slip into the reth binary.
maybe with a mutually exclusive feature (ethereum) or another compile check in the reth binary
8634aae
to
e42f6f4
Compare
@roberto-bayardo we just merge the big alloy transition, hence the conflicts. feature-wise this PR lgtm and I'm supportive, I will make some feature changes so we guarantee that the reth binary never ships with this. we can phase this out once we're breaking the database format. And I'm actually not sure if this would even effect existing dbs on ethereum since we're always <u128, wdyt @joshieDo ? |
…ike OP where this value might take on the full range
e42f6f4
to
cb3c8d2
Compare
I have resolved the conflicts. |
cb3c8d2
to
2a2a9ef
Compare
2a2a9ef
to
404ceb1
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.
lgtm.
I've added some macros that act as compile check to ensure the feature is enabled/disabled.
This is only needed for existing databases and can all be phased out when we decide to break the format
Chains like OP stack can use the entire range of "value" (256 bits) in a transaction, so we are changing the type to a 256-bit capable representation. The field is still treated as u128 within to/from_compact for backwards DB compatibility with Ethereum & other chains where 128 bits is sufficient. A "value-256" feature is introduced that enables 256-bit DB encoding for value.