-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
cannon: Support F_GETFD cmd to fcntl #12050
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #12050 +/- ##
===========================================
- Coverage 75.19% 74.87% -0.33%
===========================================
Files 49 49
Lines 3656 3665 +9
===========================================
- Hits 2749 2744 -5
- Misses 734 748 +14
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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. The manpage says the only FD flag is FD_CLOEXEC
, which is paired up with the execve
syscall. Cannon should never support that syscall, anyways, so should be good.
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 Cannon STF change looks good. But we need to create a new StateVersion
since we're changing VM behavior.
I've created a PR that allows cannon to support multiple versions - #12072. I suggest rebasing on that and updating the cannon embeds
so that we can continue to execute "old" cannon prior to this change.
845907c
to
250973a
Compare
Semgrep found 2 Inputs to functions must be prepended with an underscore ( |
@Inphi I can dig into this but the test failures on this are interesting. We're dropping support for the original |
Also I'm inclined to say that we haven't released multithreaded cannon yet so we can just add getfd support for it without a new state version. We'll just copy in the old version for state version 0. |
250973a
to
901834c
Compare
@ajsutton We probably don't need to maintain tests for older state versions. The old VM has already been tested against the v0 state. I'd port tests using state files to use the latest states rather than keep the old ones around. |
@Inphi I think we need to keep the tests for op-challenger using JSON states and for detecting type 0 in Multicannon since that's important value. But agreed we can keep it focussed on that detection which should make it much easier and all the other tests focus on the new version. |
Right that was the last thing I forgot to deal with. The op-challenger's using cannon packages. I need to take a look to see if we can get rid of that. |
So the cannon state codec needs to be backwards compatible to support this op-challenger use - https://github.com/ethereum-optimism/optimism/blob/develop/op-challenger/game/fault/trace/cannon/state_converter.go#L37. |
ugh, that's a good point actually - op-challenger is actually parsing the state. For some of what it does it could use the witness command (and I have a patch around to do that) but it also needs to extract things like the last step. I think |
hmm, actually I don't seem to have the final step done, but it should be implementing a |
And witness can't even generate a proof so we'll need to implement that because one of the reasons that challenger parses the state is to get the proof at the final step and it needs to actually get the step out, not just the claim in that case. |
Converted to draft again until the compatibility issues are sorted. Its getting there, just a few more hairy yaks left.... |
I think what's left is:
|
901834c
to
e7b3e60
Compare
Switches singlethreaded prestate to use .bin.gz instead of json since it now needs to detect the new state version.
…d parsing for the currently supported versions.
0cb405b
to
2cb57d4
Compare
We could just go to using the state version number directly, but particularly the difference between singlethreaded and multithreaded feels useful to keep.
@Inphi @clabby I've gone with calling the new version If we do just use the StateVersion number we still need some way to name the constants in the code which is a big part of what drove me to make it |
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!
Flagging again that this breaks the recurring cannon-stf-job
. This is what we want, but the job will notify @proofs-squad
when it fails. There's a chicken-and-egg problem of needing a new cannon docker image to verify develop
against the version 2 STF. So I'm fine with leaving cannon-stf-verify
broken until we can fix.
We can ignore the notification or disable that job for a bit. Either works.
Ah thanks I'd forgotten about that job. I might disable it as part of this PR since we'll need to get a PR up and approved to fix it and we don't need to be notifying everyone in the mean time. |
hmm, looking at the config I actually don't think it will notify us - it's a dependency of something that would, but that just means the next job won't run at all and so nothing notifies. That's worth testing to make sure we actually get notifications. But I'll merge this tomorrow when I have more time to get a fix up (or feel free to take over in whatever way you think is best if you prefer). |
Merging now. I'll fix the notifications alongside adding |
* cannon: Support F_GETFD cmd to fcntl. * cannon: Update fuzz test expectations. * cannon: Update MIPS.t.sol * cannon: Introduce a new state version for supporting get_fd. Switches singlethreaded prestate to use .bin.gz instead of json since it now needs to detect the new state version. * cannon: Don't override the cannon version. * Update semver-lock. * cannon: Update tests to detect old versions but only check writing and parsing for the currently supported versions. * cannon: Load old version from cannon docker image * cannon: Improve logging. * cannon: Restore cannon version arg. * Fix contrac semvers. * cannon: Rename singlethreaded-getfd to just singlethreaded-2. We could just go to using the state version number directly, but particularly the difference between singlethreaded and multithreaded feels useful to keep. * cannon: Fix comment. * Update semver again.
Description
Fixes support for go 1.22+ in cannon single threaded.
MT cannon works with go1.22 but still fails with go 1.23 still because syscall 4325.
Tests
Updated fuzz test expectations.
Metadata