-
Notifications
You must be signed in to change notification settings - Fork 14
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 #27 from oceanprotocol/alex_play_p2p_direct
Nodes POC
- Loading branch information
Showing
28 changed files
with
42,170 additions
and
1 deletion.
There are no files selected for viewing
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 @@ | ||
v16.20.2 |
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 |
---|---|---|
@@ -1 +1,47 @@ | ||
# ocean-node | ||
# ocean-node | ||
|
||
|
||
WIP, may not compile. | ||
|
||
|
||
## 1. Make sure to use nvm | ||
```bash | ||
nvm use | ||
``` | ||
|
||
## 2. Install deps | ||
```bash | ||
npm i | ||
``` | ||
|
||
## 3. Build | ||
```bash | ||
npm run build | ||
``` | ||
|
||
## 4. Open terminal 1 and run a node | ||
```bash | ||
npm run start | ||
``` | ||
|
||
## 4. Open a 2nd terminal and run another node | ||
```bash | ||
export PORT=8000 | ||
npm run start | ||
``` | ||
|
||
Now, you should see the nodes discovery/connecting/disconnecting | ||
|
||
Load postman collection from docs and play | ||
|
||
|
||
|
||
|
||
## Structure: | ||
- Everything hovers around components: | ||
- database: will have connection to typesense/es and will implement basic operations. This is used by all other components | ||
- indexer: upcoming indexer feature | ||
- provider: will have core provider functionality | ||
- httpRoutes: exposes http endpoints | ||
- P2P: has P2P functionality. will have to extend handleBroadcasts and handleProtocolCommands, rest is pretty much done | ||
|
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,105 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "ff8f2614-8d77-40e4-9031-9ca2ed9f7973", | ||
"name": "Ocean Node", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "8000 - getP2pPeers", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - getP2pPeers", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8000 - getOceanPeers", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - getOceanPeers", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8000 - advertiseDid", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - advertiseDid", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8000 - getProvidersForDid", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - getProvidersForDid", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8000 - broadcastCommand", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - broadcastCommand", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8000 - directCommand", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "8001 - directCommand", | ||
"request": { | ||
"method": "GET", | ||
"header": [] | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |
Oops, something went wrong.