-
Notifications
You must be signed in to change notification settings - Fork 692
Run London fork tests #2021
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
Run London fork tests #2021
Changes from all commits
7733bf5
a839a1a
4420efd
fddce69
ff9494a
a2477ae
6b14d65
04e13b8
0e74b17
92095eb
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 |
---|---|---|
|
@@ -669,6 +669,13 @@ def validate_uncle(cls, | |
f"the limit ({uncle.gas_limit})" | ||
) | ||
|
||
uncle_parent_gas_limit = uncle_parent.gas_limit | ||
if not hasattr(uncle_parent, 'base_fee_per_gas') and hasattr(uncle, 'base_fee_per_gas'): | ||
# if Berlin -> London transition, double the parent limit for validation | ||
uncle_parent_gas_limit *= 2 | ||
|
||
validate_gas_limit(uncle.gas_limit, uncle_parent_gas_limit) | ||
Comment on lines
+672
to
+677
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. Oof, this is a bummer, but I don't have a better suggestion right now. 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. Hah, yes, same... I think it can use a refactor at some point for sure. |
||
|
||
# | ||
# State | ||
# | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,10 +163,15 @@ def __call__(self, computation: ComputationAPI) -> None: | |
computation.stack_push_int(0) | ||
computation.return_data = b'' | ||
if insufficient_funds: | ||
err_msg = f"Insufficient Funds: {storage_address_balance} < {stack_data.endowment}" | ||
self.logger.debug2( | ||
"%s failure: %s", | ||
self.mnemonic, | ||
f"Insufficient Funds: {storage_address_balance} < {stack_data.endowment}" | ||
) | ||
elif stack_too_deep: | ||
err_msg = "Stack limit reached" | ||
self.logger.debug2("%s failure: %s", self.mnemonic, err_msg,) | ||
self.logger.debug2("%s failure: %s", self.mnemonic, "Stack limit reached") | ||
Comment on lines
+166
to
+172
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. There was an implicit invariant check in the previous code that's not here anymore (because if neither of the |
||
else: | ||
raise RuntimeError("Invariant: error must be insufficient funds or stack too deep") | ||
return | ||
|
||
call_data = computation.memory_read_bytes( | ||
|
@@ -183,11 +188,12 @@ def __call__(self, computation: ComputationAPI) -> None: | |
is_collision = computation.state.has_code_or_nonce(contract_address) | ||
|
||
if is_collision: | ||
computation.stack_push_int(0) | ||
computation.return_data = b'' | ||
self.logger.debug2( | ||
"Address collision while creating contract: %s", | ||
encode_hex(contract_address), | ||
) | ||
computation.stack_push_int(0) | ||
return | ||
|
||
child_msg = computation.prepare_child_message( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pass all London tests from the ethereum/tests repo |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- Make header gas limit more restrictive. Was too permissive by one gas. Tightened the bounds. | ||
- Validate uncle gas limits are within bounds. This was previously not validated at all. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Squash sphinx warnings with a small documentation reorg. |
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.
Why did this change? Something about the gas limit being off by one?
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.
@carver yep