Repository navigation
qol: allow a custom wasmModuleRoot and base directory #214
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9d18f53
qol: allow a custom wasmModuleRoot and base directory
TucksonDev 8a701f6
Address feedback
TucksonDev 055674b
Merge branch 'release' into qol-custom-wmr-and-base-dir
TucksonDev 7807d37
Move WMR option to parameter, cleanup its usage, increase validation …
TucksonDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As you confirmed in the
--validatethread, challenges cannot run on the roots this adds: those directories holdmachine.wavm.br, and the v3.12.2 arbitrator opensmachine.v2.wavm.br. The image never verifies them with its prover either. There is a second cost: every nitro service logsunable to find validator machine directory for the on-chain WASM module rootat startup, because theentrypoint: /usr/local/bin/nitrooverrides drop the image's--validation.wasm.allowed-wasm-module-roots, so each node's own locator only seestarget/machines.The roots that work fully (v50, v51, v51.1, v61) are already in
target/machines, and the validation node serves them with no change here. So I would limitWASM_MODULE_ROOTto/home/user/target/machines/*/module-root.txtand drop this entrypoint. If you want the legacy roots anyway: say in the comment and in the error message that they are JIT-only, and addvalidation.wasm.allowed-wasm-module-roots: ["/home/user/nitro-legacy/machines", "/home/user/target/machines"]to the base node config inscripts/config.ts, so the nodes stop logging that error.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.
I think it makes sense to keep the legacy roots to, for example, test upgrades from older chains (I'm currently testing an upgrade from a v32 chain, which is what triggered this PR). I added a comment in 7807d37 to specify that the legacy machines only validate through JIT and can't run challenges, and the base node config in
scripts/config.tssetsvalidation.wasm.allowed-wasm-module-rootsto both directories. The--helptext of the new--wasm-module-rootoption also says the nitro-legacy machines can't run challenges. I put that there instead of in the error message, because the error only fires for a root that isn't in the image at all.