-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: Anvil Cancun support #7242
Conversation
} | ||
|
||
pub fn blob_gas(&self) -> Option<u64> { | ||
match self { |
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.
tx.tx().tx() lol
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.
not great but maybe we need to life with it cc @mattsse - this was already 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.
last style nits
then pending @DaniPopes and @klkvr
Certain error handling is pending. Do not merge |
@@ -129,7 +129,7 @@ pub fn transaction_request_to_typed( | |||
})) | |||
} | |||
// EIP4844 | |||
(Some(3), None, _, _, _, Some(_), Some(_), Some(sidecar), Some(to)) => { | |||
(Some(3), None, _, _, _, Some(_), Some(_), Some(sidecar), to) => { |
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 should refactor this to use alloy's TransactionRequest
-> TypedTransaction
conversion at some point
@@ -138,7 +138,7 @@ pub fn transaction_request_to_typed( | |||
gas_limit: gas.unwrap_or_default(), | |||
value: value.unwrap_or(U256::ZERO), | |||
input: input.into_input().unwrap_or_default(), | |||
to: match to { | |||
to: match to.unwrap_or(TxKind::Create) { |
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 this should only accept TxKind::To
instead of setting address to zero, ref alloy-rs/alloy#355
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
comments above are not critical, we should do a follow-up at some point which gets rid of transaction_request_to_typed
in favor of alloy's conversion fn
@yash-atreya merge whenever :) |
* feat(anvil-core): EIP4844 variant support * chore: proper support when converting txs * feat: add more type support * chore: lock * feat: missing type conversions, decoding test * use correct eip check * force no blob hashes for eip1559 * feat: support sidecar with 4844 types * fmt * feat: turn on c-kzg revm feature * chore: add new invalid tx errors * feat: execution validation steps * feat: enable c-kzg * feat: use main branch for consensus, update * chore: rename * lockfile * fmt * fmt * fmt * clippy * feat: update blob fees * set current blob excess gas and price when creating block * blob gas checks * clippy * chore: remove unneeded fns * chore: handle fee history * chore: add excess blob gas and price to feehistory cache * chore: remove unused * chore: properly sum cumulative blob gas * chore: rewrite validation checks * chore: handle eip4844 variant when decoding * max blob validation check * chore: correct and rename blob fee capp err * feat: fee history response changes * docs * several fee fixes * chore: set blob gas used on rpc response * fix: use primitives types * fix: satisfy clippy * feat(anvil/tests): can_send_eip4844_transaction - fails * use sidecar builder in tests * fix: tx_req_to_typed * nits * fix: return `blob_gas_price` and `blob_gas_used` in tx receipt * nits * fix: gas_price calc in backend::tx_build and nits * feat(anvil-tests): `can_send_multiple_blobs_in_one_tx`, `cannot_exceed_six_blobs` * nits * fix: eip4844 test * nits Co-authored-by: DaniPopes <[email protected]> * feat(anvil-test): 4844 - test should fail. * fix(anvil): check MAX_BLOB_GAS_PER_BLOCK in tx executor * nits * fix: blob error handling * nits * type nits * nit --------- Co-authored-by: Yash Atreya <[email protected]> Co-authored-by: DaniPopes <[email protected]>
Looks like this can be marked as ready in this tracker? #5574 |
Enables anvil dencun support by:
For handling EIP4844:
blob_gas_used
/excess_blob_gas
and tracking the blob gas price and excess blob gas in anvil's fee manager.revm
, meaning the point evaluation precompile should also be available, both in anvil, and in forge.For handling EIP-4788, locally the parent beacon block root is just set to
B256::ZERO
.Merges into #7202