File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,36 @@ const CurrentVersion = 1
1414// creation interval (in blocks) used when snapshot generation is enabled.
1515const DefaultSnapshotInterval = 2000
1616
17+ // Well-known default ports for Sei node services and the sidecar.
18+ const (
19+ PortEVMHTTP int32 = 8545
20+ PortEVMWS int32 = 8546
21+ PortGRPC int32 = 9090
22+ PortP2P int32 = 26656
23+ PortRPC int32 = 26657
24+ PortMetrics int32 = 26660
25+ PortSidecar int32 = 7777
26+ )
27+
28+ // NodePort pairs a human-readable service name with its default port number.
29+ type NodePort struct {
30+ Name string
31+ Port int32
32+ }
33+
34+ // NodePorts returns the canonical set of ports exposed by a Sei node (seid).
35+ // The sidecar port is excluded; use PortSidecar directly.
36+ func NodePorts () []NodePort {
37+ return []NodePort {
38+ {"evm-rpc" , PortEVMHTTP },
39+ {"evm-ws" , PortEVMWS },
40+ {"grpc" , PortGRPC },
41+ {"p2p" , PortP2P },
42+ {"rpc" , PortRPC },
43+ {"metrics" , PortMetrics },
44+ }
45+ }
46+
1747// Pruning strategy constants.
1848const (
1949 PruningDefault = "default"
Original file line number Diff line number Diff line change @@ -139,9 +139,9 @@ func baseDefaults() *SeiConfig {
139139
140140 EVM : EVMConfig {
141141 HTTPEnabled : true ,
142- HTTPPort : 8545 ,
142+ HTTPPort : int ( PortEVMHTTP ) ,
143143 WSEnabled : true ,
144- WSPort : 8546 ,
144+ WSPort : int ( PortEVMWS ) ,
145145 ReadTimeout : Dur (30 * time .Second ),
146146 ReadHeaderTimeout : Dur (30 * time .Second ),
147147 WriteTimeout : Dur (30 * time .Second ),
You can’t perform that action at this time.
0 commit comments