Conversation
|
Claude finished @dvush's task in 1m 1s —— View job PR Review: fix: improve discovery via bootnode
The changes are logical and well-structured. A few observations: Repeated bootnode pattern could use a helper The same op-geth discovery is fully disabled (acknowledged TODO) The commented-out code in No issues found with the The Overall this is a clean fix. The logic change from "always disable discovery + optionally set bootnode" to "enable discovery when bootnode is set, disable otherwise" is correct and the |
|
Claude finished @dvush's task in 1m 21s —— View job PR Review: fix: improve discovery via bootnode
Summary: This PR fixes L2 node discovery by removing the contradictory Observations:
No blocking issues found. The changes are focused and well-motivated by the PR description. |
|
|
||
| if ctx.Bootnode != nil { | ||
| service.WithArgs("--bootnodes", ctx.Bootnode.Connect()) | ||
| service.WithArgs("--bootnodes", ctx.Bootnode.Connect(), "--nat", "none", "--rollup.discovery.v4") |
There was a problem hiding this comment.
The bootnode discovery pattern is repeated across 4 components (OpRbuilder, FlashblocksRPC, RethEL, OpReth) with slight variations (some include --rollup.discovery.v4, some don't). Consider extracting a helper like applyBootnodeArgs(svc, ctx, isRollup bool) to centralize this logic — it would make it easier to update in one place if the flags change again.
Co-authored-by: Vitalii Drohan <vitaliy.drogan@gmail.com>
|
Claude finished @dvush's task in 1m 27s —— View job PR Review: fix: improve discovery via bootnode
The core logic change — conditionally enabling/disabling discovery based on bootnode presence instead of always disabling — is correct and well-motivated. The Issues noted (inline comment posted):
No blocking issues — the approach is sound and the TODOs are well-documented. |
| if ctx.Bootnode != nil { | ||
| trustedPeers = fmt.Sprintf("--bootnodes %s ", ctx.Bootnode.Connect()) | ||
| // TODO: Figure out the port dynamically. | ||
| trustedPeers = fmt.Sprintf("--bootnodes enode://%s@$(getent hosts bootnode | awk '{print $1}'):30303 --discovery.v4 ", ctx.Bootnode.ID) |
There was a problem hiding this comment.
The service name bootnode is hardcoded here while other components use ctx.Bootnode.Service (via ctx.Bootnode.Connect()). If the bootnode service name ever changes, this will silently break. Also, port 30303 is hardcoded — consider using the template port syntax to stay consistent with the rest of the codebase.
Additionally, embedding $(getent hosts bootnode | awk '{print $1}') in the shell string works because op-geth uses /bin/sh -c, but it couples this component to a shell entrypoint. A comment noting this dependency would help future readers.
Discovery with bootnodes did not work for l2 nodes, this fixes it but there are some todos left.