Skip to content

feat: add well-known port constants and NodePorts()#4

Merged
bdchatham merged 1 commit intomainfrom
feat/node-port-constants
Mar 17, 2026
Merged

feat: add well-known port constants and NodePorts()#4
bdchatham merged 1 commit intomainfrom
feat/node-port-constants

Conversation

@bdchatham
Copy link
Collaborator

@bdchatham bdchatham commented Mar 17, 2026

Summary

  • Adds typed int32 port constants (PortRPC, PortP2P, PortGRPC, PortEVMHTTP, PortEVMWS, PortMetrics, PortSidecar) so consumers like sei-k8s-controller can reference canonical values instead of maintaining duplicate magic numbers.
  • Adds NodePort type and NodePorts() function returning the name→port pairs needed for Kubernetes container/service port generation.
  • Updates baseDefaults() EVM config to use PortEVMHTTP/PortEVMWS instead of bare 8545/8546 literals.

Test plan

  • Existing sei-config tests pass (no behavioral change, just new exports + literal dedup)
  • sei-k8s-controller builds against this branch using go.work and its resources.go / resources_test.go now reference seiconfig.PortSidecar and seiconfig.NodePorts()

Exposes canonical Sei node port numbers (RPC, P2P, gRPC, EVM, metrics,
sidecar) as typed int32 constants so consumers like sei-k8s-controller
don't need to maintain their own copies. Also adds NodePorts() which
returns the name→port pairs for container/service port generation.

The EVM defaults in baseDefaults() now reference PortEVMHTTP/PortEVMWS
instead of bare literals.
@bdchatham bdchatham marked this pull request as ready for review March 17, 2026 17:41
@bdchatham bdchatham merged commit add837b into main Mar 17, 2026
2 checks passed
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