Skip to content

Conversation

@dvush
Copy link
Contributor

@dvush dvush commented Jan 28, 2026

Here are the changes to make my custom recipes to work.

  1. Add {{Bootnode}} template for YAML recipes
    Enable YAML recipes to reference the bootnode enode URL using {{Bootnode}}
    template. This allows custom services to connect via p2p to the bootnode
    without hardcoding addresses.
  2. Add base_args support for YAML recipes
    Allow YAML recipes to pass arguments to the base recipe's flags.
    This enables setting options like --enable-latest-fork for opstack.

The second one allow doing this in custom recipes:

base: opstack
base_args:
  - --enable-latest-fork
  - "0"

I am not sure if its the best approach for this but it works, there should be a way to configure it in some way

dvush added 2 commits January 28, 2026 18:38
Enable YAML recipes to reference the bootnode enode URL using {{Bootnode}}
template. This allows custom services to connect via p2p to the bootnode
without hardcoding addresses.
Allow YAML recipes to pass arguments to the base recipe's flags.
This enables setting options like --enable-latest-fork for opstack.
@claude
Copy link

claude bot commented Jan 28, 2026

Claude finished @dvush's task in 2m 9s —— View job


PR Review Complete

Reviewed the changes adding {{Bootnode}} template and base_args support for YAML recipes.

Summary

The core functionality works correctly for opstack-based YAML recipes. The resolveAddr refactoring is clean and base_args implementation is straightforward.

Issues Found

  1. Empty string when Bootnode not configured - Using {{Bootnode}} with base: l1 silently returns empty string since L1 recipe doesn't set ctx.Bootnode. This could cause confusing command-line behavior.

  2. Hard-coded "rpc" port name - playground/local_runner.go:421 assumes bootnode service always has a port named "rpc". Custom services with different port names would panic.

  3. Missing Bootnode template in manifest.go - While YAML recipes work (they bypass WithArgs()), if a Go component uses {{Bootnode}} in WithArgs(), it will panic during template parsing. Consider adding a pass-through function for consistency.

See inline comments for details.

"Bootnode": func() string {
if d.manifest.Bootnode == nil {
return ""
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This silently returns an empty string when Bootnode is nil (e.g., when using base: l1). This could lead to confusing behavior where commands have empty values where the enode URL was expected. Consider logging a warning or returning an error indicator so users know something is wrong.

return ""
}
svc := d.manifest.MustGetService(d.manifest.Bootnode.Service)
port := svc.MustGetPort("rpc")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded port name "rpc" assumes the bootnode service always has this port. If a custom YAML recipe uses a different port name, this will panic via MustGetPort. Consider making the port name part of BootnodeRef or documenting this requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant