feat: add well-known port constants and NodePorts()#4
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
int32port constants (PortRPC,PortP2P,PortGRPC,PortEVMHTTP,PortEVMWS,PortMetrics,PortSidecar) so consumers likesei-k8s-controllercan reference canonical values instead of maintaining duplicate magic numbers.NodePorttype andNodePorts()function returning the name→port pairs needed for Kubernetes container/service port generation.baseDefaults()EVM config to usePortEVMHTTP/PortEVMWSinstead of bare8545/8546literals.Test plan
sei-configtests pass (no behavioral change, just new exports + literal dedup)sei-k8s-controllerbuilds against this branch usinggo.workand itsresources.go/resources_test.gonow referenceseiconfig.PortSidecarandseiconfig.NodePorts()