-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
contracts: Make L2 genesis script configurable #10764
Conversation
Semgrep found 5
Named return arguments to functions must be appended with an underscore ( Semgrep found 1 No Semgrep found 1 Service 'grafana' is running with a writable root filesystem. This may allow malicious applications to download and run additional payloads, or modify container files. If an application inside a container has to save something temporarily consider using a tmpfs. Add 'read_only: true' to this service to prevent this. Ignore this finding from writable-filesystem-service.Semgrep found 3 Service port is exposed on all interfaces Ignore this finding from port-all-interfaces.Semgrep found 1 Do not use Semgrep found 1 Please create a GitHub ticket for this TODO. Ignore this finding from todos_require_linear.Semgrep found 1 By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'. Ignore this finding from missing-user.Semgrep found 1 TODO in error handling code Ignore this finding from err-todo. |
These abstractions definitely look clean to me! I am wondering since because the deploy config has access to the fork offsets, we could simplify things and remove the need to configure the fork via env var and instead parse the forks that have a genesis offset of 0 I imagine this looking like in the deploy config: fjordOffsetTimestamp = _envOr(json, "fjordOffsetTimestamp", type(uint256).max); then you could have something like Just suggesting this to reduce possible footguns. Besides that, this code is clean and well structured |
9f3f68a
to
c828635
Compare
@tynes thanks for the suggestion, implemented (hopefully something like) this in the 2nd commit. If the If the 2nd commit isn't going in the right direction or needs much more work, we can also split it out into a 2nd PR and get the 1st commit in so that the functionality for fork selection is already there. So chain providers asking for this already have something that works. |
543e2cf
to
5a5a5ff
Compare
I should probably add some documentation about the new env vars. |
I think there are some ways to simplify this, left comments, curious what you think @sebastianst |
3ba8fe0
to
5aaaffe
Compare
5aaaffe
to
3c635b5
Compare
Looks like linting has failed |
If you rebase on |
3c635b5
to
c18a4ba
Compare
c18a4ba
to
56c8043
Compare
* contracts: Make L2 genesis script configurable * contracts: Read latest fork from deploy config in L2 genesis script * contracts: add README entry for new L2 genesis script env vars * address review
Description
Makes the L2 genesis script configurable via two new env vars
OUTPUT_MODE
none
- no state dump file written, used in testslatest
- only dump state of latest forkall
- dump states of all forks (default)FORK
- for fork selection (delta
,ecotone
,fjord
orlatest
(default, always selects latest fork))All generated devnet allocs now explicitly have their fork as suffix, also the latest (no suffix previously).
Still WIP:
Additional context
The L2 genesis script before had the latest fork hardcoded.
Metadata