-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from oceanprotocol/runningOceanNode
Running ocean node
- Loading branch information
Showing
9 changed files
with
2,492 additions
and
192 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
export interface NodeIpAndDns { | ||
ip: string | ||
port: number | ||
dns: string | ||
relay: boolean | ||
relayNode: string | ||
} | ||
|
||
export interface NodeLocation { | ||
id: string | ||
ip: string | ||
country?: string | ||
city?: string | ||
lat?: number | ||
lon?: number | ||
} | ||
export interface NodeCheckResult { | ||
peerId: string | ||
ipAddrs: NodeIpAndDns | ||
success: boolean | ||
errorCause: string | ||
status: string | ||
deltaTime: number | ||
} | ||
|
||
export interface NodeStatus { | ||
id: string | ||
location: NodeLocation | ||
ipAndDns: NodeIpAndDns | ||
eligible: boolean | ||
eligibilityCauseStr: string | ||
uptime: number | ||
lastCheck: number | ||
address: string | ||
allowedAdmins: string[] | ||
codeHash: string | ||
http: boolean | ||
p2p: boolean | ||
indexer: any[] | ||
platform: any | ||
provider: any[] | ||
publicKey: string | ||
supportedStorage: any | ||
version: string | ||
} | ||
|
||
export interface GeneralStatus { | ||
id: number | ||
week: number | ||
totalUptime: number | ||
lastRun: number | ||
} | ||
|
||
export interface NodeWeeklyUptime { | ||
nodeId: string | ||
week: number | ||
address: string | ||
uptime: number | ||
lastCheck: number | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { Stream } from 'stream' | ||
export interface DenyList { | ||
peers: string[] | ||
ips: string[] | ||
} | ||
|
||
export interface OceanNodeKeys { | ||
peerId: any | ||
publicKey: any | ||
privateKey: any | ||
ethAddress: string | ||
} | ||
export interface P2PStatusResponse { | ||
httpStatus: number | ||
error?: string | ||
headers?: any | ||
} | ||
export interface P2PCommandResponse { | ||
status: P2PStatusResponse | ||
stream: Stream | null | ||
} | ||
|
||
export interface OceanNodeP2PConfig { | ||
bootstrapNodes: string[] | ||
enableIPV4: boolean | ||
enableIPV6: boolean | ||
ipV4BindAddress: string | null | ||
ipV4BindTcpPort: number | null | ||
ipV4BindWsPort: number | null | ||
ipV6BindAddress: string | null | ||
ipV6BindTcpPort: number | null | ||
ipV6BindWsPort: number | null | ||
pubsubPeerDiscoveryInterval: number | ||
dhtMaxInboundStreams: number | ||
dhtMaxOutboundStreams: number | ||
mDNSInterval: number | ||
connectionsMaxParallelDials: number | ||
connectionsDialTimeout: number | ||
announceAddresses: string[] | ||
filterAnnouncedAddresses: string[] | ||
autoNat: boolean | ||
upnp: boolean | ||
enableCircuitRelayServer: boolean | ||
enableCircuitRelayClient: boolean | ||
circuitRelays: number | ||
announcePrivateIp: boolean | ||
minConnections: number | ||
maxConnections: number | ||
autoDialPeerRetryThreshold: number | ||
autoDialConcurrency: number | ||
maxPeerAddrsToDial: number | ||
autoDialInterval: number | ||
} | ||
|
||
export interface OceanNodeProvider { | ||
chainId: string | ||
network: string | ||
} | ||
|
||
export interface OceanNodeIndexer { | ||
chainId: string | ||
network: string | ||
block?: string // mark it as optional until the functionality is done | ||
} | ||
export interface StorageTypes { | ||
ipfs: boolean | ||
arwave: boolean | ||
url: boolean | ||
} | ||
|
||
export interface OceanNodeStatus { | ||
id: string | ||
publicKey: string | ||
address: string | ||
version: string | ||
http: boolean | ||
p2p: boolean | ||
provider: OceanNodeProvider[] | ||
indexer: OceanNodeIndexer[] | ||
supportedStorage: StorageTypes | ||
platform: any | ||
uptime?: number // seconds since start | ||
codeHash?: string | ||
allowedAdmins?: string[] | ||
// detailed information | ||
c2dClusters?: any | ||
supportedSchemas?: any | ||
} | ||
|
||
export interface OceanNodeConfig { | ||
keys: OceanNodeKeys | ||
p2pConfig: OceanNodeP2PConfig | null | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
export const defaultBootstrapAddresses = [ | ||
'/ip4/212.146.66.248/tcp/30080/p2p/16Uiu2HAmTC7cW9fb5ooFUupm6sAkcRJHHLGhiq2Bor8CzAAwFJCo', | ||
'/dns4/node1.oceanprotocol.com/tcp/9000/p2p/16Uiu2HAmLhRDqfufZiQnxvQs2XHhd6hwkLSPfjAQg1gH8wgRixiP', | ||
// '/dns4/node1.oceanprotocol.com/tcp/9001/ws/p2p/16Uiu2HAmLhRDqfufZiQnxvQs2XHhd6hwkLSPfjAQg1gH8wgRixiP', | ||
// '/dns6/node1.oceanprotocol.com/tcp/9002/p2p/16Uiu2HAmLhRDqfufZiQnxvQs2XHhd6hwkLSPfjAQg1gH8wgRixiP', | ||
// '/dns6/node1.oceanprotocol.com/tcp/9003/ws/p2p/16Uiu2HAmLhRDqfufZiQnxvQs2XHhd6hwkLSPfjAQg1gH8wgRixiP', | ||
// node 2 | ||
'/dns4/node2.oceanprotocol.com/tcp/9000/p2p/16Uiu2HAmHwzeVw7RpGopjZe6qNBJbzDDBdqtrSk7Gcx1emYsfgL4', | ||
// '/dns4/node2.oceanprotocol.com/tcp/9001/ws/p2p/16Uiu2HAmHwzeVw7RpGopjZe6qNBJbzDDBdqtrSk7Gcx1emYsfgL4', | ||
// '/dns6/node2.oceanprotocol.com/tcp/9002/p2p/16Uiu2HAmHwzeVw7RpGopjZe6qNBJbzDDBdqtrSk7Gcx1emYsfgL4', | ||
// '/dns6/node2.oceanprotocol.com/tcp/9003/ws/p2p/16Uiu2HAmHwzeVw7RpGopjZe6qNBJbzDDBdqtrSk7Gcx1emYsfgL4', | ||
// node 3 | ||
'/dns4/node3.oceanprotocol.com/tcp/9000/p2p/16Uiu2HAmBKSeEP3v4tYEPsZsZv9VELinyMCsrVTJW9BvQeFXx28U', | ||
// '/dns4/node3.oceanprotocol.com/tcp/9001/ws/p2p/16Uiu2HAmBKSeEP3v4tYEPsZsZv9VELinyMCsrVTJW9BvQeFXx28U', | ||
// '/dns6/node3.oceanprotocol.com/tcp/9002/p2p/16Uiu2HAmBKSeEP3v4tYEPsZsZv9VELinyMCsrVTJW9BvQeFXx28U', | ||
// '/dns6/node3.oceanprotocol.com/tcp/9003/ws/p2p/16Uiu2HAmBKSeEP3v4tYEPsZsZv9VELinyMCsrVTJW9BvQeFXx28U', | ||
// node 4 | ||
'/dns4/node4.oceanprotocol.com/tcp/9000/p2p/16Uiu2HAmSTVTArioKm2wVcyeASHYEsnx2ZNq467Z4GMDU4ErEPom' | ||
// '/dns4/node4.oceanprotocol.com/tcp/9001/ws/p2p/16Uiu2HAmSTVTArioKm2wVcyeASHYEsnx2ZNq467Z4GMDU4ErEPom', | ||
// '/dns6/node4.oceanprotocol.com/tcp/9002/p2p/16Uiu2HAmSTVTArioKm2wVcyeASHYEsnx2ZNq467Z4GMDU4ErEPom', | ||
// '/dns6/node4.oceanprotocol.com/tcp/9003/ws/p2p/16Uiu2HAmSTVTArioKm2wVcyeASHYEsnx2ZNq467Z4GMDU4ErEPom' | ||
] | ||
export const OPFNodes = [ | ||
'https://node1.oceanprotocol.com:8000', | ||
'https://node2.oceanprotocol.com:8000', | ||
'https://node3.oceanprotocol.com:8000', | ||
'https://node4.oceanprotocol.com:8000' | ||
] |
Oops, something went wrong.