-
Notifications
You must be signed in to change notification settings - Fork 102
feat: engine_newPayloadV3
: validate, execute & store block
#222
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
Changes from 25 commits
2f4b506
d08ee6b
14b8bae
f395676
507e969
a618b61
688fb6e
bbb4e52
e81c9cd
938ae60
7c43792
00ab2e4
72c4d29
5ce36ce
2cea78c
934a3fd
b085177
904f86a
38b2ef7
96f0da7
abf5a8f
ee655a0
4b03b11
45afb13
e39caf5
762e9aa
54bcb27
c0fa93d
14d19a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,7 +300,7 @@ pub fn beacon_root_contract_call( | |
let tx_env = TxEnv { | ||
caller: *SYSTEM_ADDRESS, | ||
transact_to: RevmTxKind::Call(*CONTRACT_ADDRESS), | ||
gas_limit: 30_000_000, | ||
gas_limit: header.gas_limit, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be set to 30_000_000 according to the EIP 4788 spec: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We get the error "caller gas limit exceeds the block gas limit" from the evm with that value. (This comes from the check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, but also according to the spec calling this contract should not count towards block gas usage, so that's another issue.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also fix it by setting the block_env's gas_limit to 30_000_000 too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update: This last solution works fine when running with kurtosis, I pushed it |
||
data: revm::primitives::Bytes::copy_from_slice(beacon_root.as_bytes()), | ||
..Default::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.
Im surprised these changes don't break any of the spec test. Does the rlp and the state root remain equal with these values (empty vec vs None, 0 vs None)?
Uh oh!
There was an error while loading. Please reload this page.
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 state root shouldn't be affected (as it is built from the accounts in the alloc). The rlp does change, and we do need it to change as with the current version block validation failed when running with kurtosis as the genesis block's hash didn't match the parent_block_hash of the following block