-
Notifications
You must be signed in to change notification settings - Fork 40
Enable changing l1 recipe default block time #222
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: main
Are you sure you want to change the base?
Conversation
This PR introducts a `--block-time=1s` on `builder-playground cook l1` so it's possible to product blocks faster on the launched node. I took the libery to rename the op block time flag to be unexported and to have the `InSeconds` suffix. I also used `time.Duration` flag type for the `--block-time` implementation on L1 recipe, let me know if you would like this to be applied to op block-time too, or if in the opposite, would you prefer keeping the old way for both flag.
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.
Pull request overview
This PR adds the ability to configure L1 block time via a new --block-time flag for the builder-playground cook l1 command, enabling faster block production on the launched node.
Key changes:
- Added
--block-timeflag to L1 recipe accepting duration format (default: 12s) - Refactored field naming in
ArtifactsBuilderfor consistency, renamingOpblockTimetoopBlockTimeInSecondsand addingl1BlockTimeInSeconds - Updated config template to use dynamic
SecondsPerSlotvalue instead of hardcoded12
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| playground/recipe_l1.go | Adds blockTime field and --block-time flag, calls new L1BlockTime() method |
| playground/artifacts.go | Adds l1BlockTimeInSeconds field, renames OpblockTime to opBlockTimeInSeconds, implements L1BlockTime() method, and updates template substitution |
| playground/config.yaml.tmpl | Replaces hardcoded SECONDS_PER_SLOT: 12 with template variable {{.SecondsPerSlot}} |
| README.md | Documents the new --block-time flag with usage example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey, have you tried this setup? I believe (though I am not sure right away) there were some problems changing seconds per slot since some clients had those values hardcoded from the preset of the config file. |
Yes we tested the 1s value using I need to fix the wrong logic of the |
This PR introducts a
--block-time=1sonbuilder-playground cook l1so it's possible to product blocks faster on the launched node.I took the libery to rename the op block time flag to be unexported and to have the
InSecondssuffix. I also usedtime.Durationflag type for the--block-timeimplementation on L1 recipe, let me know if you would like this to be applied to op block-time too, or if in the opposite, would you prefer keeping the old way for both flag.