-
Notifications
You must be signed in to change notification settings - Fork 510
fix eth_simulates minor issues #8452
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
base: master
Are you sure you want to change the base?
Conversation
src/Nethermind/Nethermind.Facade/Simulate/SimulateBridgeHelper.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
if (spec.IsEip4844Enabled) { | ||
result.ParentBeaconBlockRoot = Keccak.Zero; |
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 Keccak.EmptyTreeHash
?
@@ -239,6 +239,10 @@ public void Encode(RlpStream rlpStream, BlockHeader? header, RlpBehaviors rlpBeh | |||
{ | |||
rlpStream.Encode(header.BaseFeePerGas); | |||
} | |||
else if ((rlpBehaviors & RlpBehaviors.Simulate) == RlpBehaviors.Simulate) |
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.
Can we not include RlpBehaviors
here but use a flag in constructor and use a non-default instance of decoder?
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.
Also we need to have the logic not to emit this when block is before EIP1559
/// <summary> | ||
/// The `simulate` flag enables a special workaround for cases where `baseFeePerGas` is zero. | ||
/// Technically, `baseFeePerGas` should never be zero, as it is required to be at least 7 or higher. | ||
/// However, some execution clients, such as Geth, permit this edge case. | ||
/// In such cases, we write `EmptyRlpByte` (0x80) to the byte array as a fallback. | ||
/// </summary> | ||
Simulate = 256, |
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.
Try avoid adding flags
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.
PR has no description
Fixes Closes Resolves #
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.