-
Notifications
You must be signed in to change notification settings - Fork 106
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
Sync to Goerli #687
Comments
Finally, after premix debugging tools is fixed, I found a legit bug at block number 4_463_713. This is not far from the beginning of Berlin(4_460_644). The validation code complains about:
This is the receipt of transaction no 16:
And why nimbus produce wrong EVM status code, this need deeper investigation. but at least we know where to start and we have the data to reproduce this bug. |
the bug is fixed in #842, let's see if it can sync to the tip of london |
I confirm fix #842 makes it pass block 4463617 now on my instance. It raises some questions though:
|
copied from discord discussion:
|
so we have two new places where sync stop:
|
bug in block 5080941 turn out to be another area not covered by ethereum/tests. CREATE/CREATE2 opcode in nim-evm and vm2: buggy:
...
if child.isSuccess:
...
else:
c.returnData = child.output
fixed:
...
if child.isSuccess:
...
elif not child.error.burnsGas: # OP REVERT EXECUTED
# set returnData if last child's opcode is REVERT
c.returnData = child.output CREATE/CREATE2 opcode in evmc-evm buggy:
...
c.returnData = @(makeOpenArray(c.res.outputData, c.res.outputSize.int)) # <--- always set `returnData`
...
fixed:
...
if c.res.status_code == EVMC_REVERT:
# set returnData if last child's opcode is REVERT
c.returnData = @(makeOpenArray(c.res.outputData, c.res.outputSize.int))
... |
By sheer coincidence that is exactly the issue I was working through the first two days of this week, when refactoring for Beam sync, asynchronous EVM execution and evmone compatibility. I had some local The I ended up carefully going through EIP-2, EIP-140, EIP-170 and EIP-211 to work out what the behaviour of There are actually about 20 tests in |
I'm unable to test block 5080941 yet, because since passing 4494721..4495040 yesterday, even on a fast machine and network, due to various other crashes, non-deterministic networking issues, etc. it's only up to 4787521. So it will be a while before I can be sure if my changes are correct for block 5080941 (moving |
I agree the logic in If the spec language is not clear, we can always see what the implementation language does. geth create/create2 opcode: ...
if suberr == ErrExecutionReverted {
return res, nil # keep child's output data when revert executed
}
return nil, nil # no output data on success, halt, or, exception besu also do similar thing, only revert keeps the output data, while other conditions will remove output data. private void exceptionalHalt(final MessageFrame frame) {
clearAccumulatedStateBesidesGasAndOutput(frame);
frame.clearGasRemaining();
frame.clearOutputData();
frame.setState(MessageFrame.State.COMPLETED_FAILED);
}
protected void revert(final MessageFrame frame) {
clearAccumulatedStateBesidesGasAndOutput(frame);
frame.setState(MessageFrame.State.COMPLETED_FAILED);
}
private void completedSuccess(final MessageFrame frame) {
frame.getWorldUpdater().commit();
frame.getMessageFrameStack().removeFirst(); # this operation remove output data
frame.notifyCompletion();
}
private void completedFailed(final MessageFrame frame) {
frame.getMessageFrameStack().removeFirst(); # this operation remove output data
frame.notifyCompletion();
} |
We have a number of sync issues, but here's one that sets a simple goal that comes up often: Sync to goerli.
The goal is:
Not a goal for this issue:
I believe Nimbus has synced with goerli before, but time moved on and it won't do so at the moment. There is also excessive space usage at the moment, though because it's Goerli it's managable.
The text was updated successfully, but these errors were encountered: