Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,36 @@ const CurrentVersion = 1
// creation interval (in blocks) used when snapshot generation is enabled.
const DefaultSnapshotInterval = 2000

// Well-known default ports for Sei node services and the sidecar.
const (
PortEVMHTTP int32 = 8545
PortEVMWS int32 = 8546
PortGRPC int32 = 9090
PortP2P int32 = 26656
PortRPC int32 = 26657
PortMetrics int32 = 26660
PortSidecar int32 = 7777
)

// NodePort pairs a human-readable service name with its default port number.
type NodePort struct {
Name string
Port int32
}

// NodePorts returns the canonical set of ports exposed by a Sei node (seid).
// The sidecar port is excluded; use PortSidecar directly.
func NodePorts() []NodePort {
return []NodePort{
{"evm-rpc", PortEVMHTTP},
{"evm-ws", PortEVMWS},
{"grpc", PortGRPC},
{"p2p", PortP2P},
{"rpc", PortRPC},
{"metrics", PortMetrics},
}
}

// Pruning strategy constants.
const (
PruningDefault = "default"
Expand Down
4 changes: 2 additions & 2 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ func baseDefaults() *SeiConfig {

EVM: EVMConfig{
HTTPEnabled: true,
HTTPPort: 8545,
HTTPPort: int(PortEVMHTTP),
WSEnabled: true,
WSPort: 8546,
WSPort: int(PortEVMWS),
ReadTimeout: Dur(30 * time.Second),
ReadHeaderTimeout: Dur(30 * time.Second),
WriteTimeout: Dur(30 * time.Second),
Expand Down
Loading