-
Notifications
You must be signed in to change notification settings - Fork 80
WEB3-499: chore: upgrade alloy-evm
#643
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
Conversation
alloy-evm
alloy-evm
let blob_excess_gas_and_price = | ||
header | ||
.excess_blob_gas | ||
.map(|excess_blob_gas| match spec.into_eth_spec() { | ||
SpecId::CANCUN => BlobExcessGasAndPrice::new( | ||
excess_blob_gas, | ||
eip4844::BLOB_GASPRICE_UPDATE_FRACTION as u64, | ||
), | ||
SpecId::PRAGUE => BlobExcessGasAndPrice::new( | ||
excess_blob_gas, | ||
eip7691::BLOB_GASPRICE_UPDATE_FRACTION_PECTRA as u64, | ||
), | ||
SpecId::OSAKA => BlobExcessGasAndPrice::new( | ||
excess_blob_gas, | ||
eip7691::BLOB_GASPRICE_UPDATE_FRACTION_PECTRA as u64, | ||
), | ||
_ => unimplemented!( | ||
"unsupported spec with `excess_blob_gas`: {}", | ||
<&'static str>::from(spec) | ||
), | ||
}); |
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 ran into this with a bit of my work. Can we have a public utility function for this, or do you think that would be a bad idea?
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.
There actually is https://docs.rs/alloy-eips/1.0.23/alloy_eips/eip7840/struct.BlobParams.html#method.calc_blob_fee which exactly does that.
Probably, eventually when this gets more complicated we should add https://docs.rs/alloy-eips/1.0.23/alloy_eips/eip7892/struct.BlobScheduleBlobParams.html to our config. But I tried to avoid this at this level because it would be a breaking change effecting config IDs and such.
Uh oh!
There was an error while loading. Please reload this page.