Skip to content

Conversation

ilyaluk
Copy link
Contributor

@ilyaluk ilyaluk commented Oct 3, 2025

This adds a basic implementation of bob image with op-node running instead of lighthouse

Copy link
Contributor Author

@ilyaluk ilyaluk Oct 3, 2025

Choose a reason for hiding this comment

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

sry, my editor auto-lints on save, could be reverted

Disabling whitespace diff looks fine 🙂

Copy link
Member

Choose a reason for hiding this comment

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

Yeah probably better to stick it in a separate formatting PR

Copy link

@Copilot Copilot AI left a 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 implements the bob-l2 image variant, which replaces lighthouse with op-node for L2 blockchain operations. The implementation includes system configuration, service setup, firewall rules, and build processes for running op-node instead of lighthouse.

  • Adds bob-l2 configuration with op-node v1.13.7 integration
  • Updates shared components to support both lighthouse and op-node commands
  • Includes comprehensive firewall configuration for L2 operations

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
bob-l2/mkosi.postinst Creates op-node user/group and enables systemd service
bob-l2/mkosi.extra/etc/systemd/system/op-node.service Defines op-node systemd service configuration
bob-l2/mkosi.extra/etc/firewall-config Sets up firewall rules for op-node and op-geth P2P communications
bob-l2/mkosi.build Builds op-node binary from optimism repository
bob-l2/bob-l2.conf Configures build dependencies and scripts for bob-l2 image
bob-l2.conf Top-level configuration including bob-l2 components
bob-base/searchersh.c Adds restart-op-node command and improves code formatting
bob-base/mkosi.extra/etc/sudoers.d/99-searcher Grants sudo permissions for op-node restart command
Makefile Updates mkosi command line arguments for consistency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +23 to +24
--l1 http://FIXME:8545 \
--l1.beacon http://FIXME:3500 \
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The L1 endpoint URLs contain placeholder 'FIXME' values that need to be replaced with actual endpoints before deployment. Consider using environment variables or a configuration template mechanism.

Copilot uses AI. Check for mistakes.

Comment on lines +69 to +70
accept_dst_ip_port $CHAIN_ALWAYS_OUT tcp 1.2.3.4 8545 "op-node access to L1 archive EL RPC"
accept_dst_ip_port $CHAIN_ALWAYS_OUT tcp 1.2.3.4 3500 "op-node access to L1 archive CL RPC"
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

The IP address '1.2.3.4' is a placeholder that needs to be replaced with the actual L1 archive node IP. Consider using a configuration variable or environment substitution.

Copilot uses AI. Check for mistakes.

Comment on lines +31 to +32
StandardOutput=/persistent/cl_logs/op-node.log
StandardError=/persistent/cl_logs/op-node.err
Copy link
Preview

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

Using file redirection for StandardOutput and StandardError is deprecated in systemd. Consider using 'journal' or configuring a proper logging service instead.

Suggested change
StandardOutput=/persistent/cl_logs/op-node.log
StandardError=/persistent/cl_logs/op-node.err
StandardOutput=journal
StandardError=journal

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah probably better to stick it in a separate formatting PR

Copy link
Member

Choose a reason for hiding this comment

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

How much of this is shared with the l1 image? I'm worried about us keeping two separate firewall files, so we should probably try to keep the specific firewall-config files as minimal as possible. We're probably going to rework a lot of this to not be ip-based soon anyway, or at least add in some sort of reverse-proxy outside the container to reduce the attack surface, so we can overfit here without worrying about adding debt

Copy link
Member

Choose a reason for hiding this comment

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

lmao classic, idk why my vscode does this despite explicitly configuring it not to. we should include this as part of a separate formatting PR and I'll try harder to get my vscode to automatically remove lines with only whitespace and add trailing newlines.

# to speed up development.
build-dev: check-perms setup ## Build module with development tools
@$(WRAPPER) mkosi --force --profile=devtools -I $(IMAGE).conf
@$(WRAPPER) mkosi --force --incremental=yes --profile=devtools --include=$(IMAGE).conf
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@$(WRAPPER) mkosi --force --incremental=yes --profile=devtools --include=$(IMAGE).conf
@$(WRAPPER) mkosi --force --profile=devtools --include=$(IMAGE).conf

Incremental is broken right now unfortunately. I'll figure out the exact failure case and open an issue on the mkosi repo

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.

2 participants