Skip to content

Commit

Permalink
Fix conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Aug 27, 2024
2 parents 0c6732e + fbd7280 commit 53632a8
Show file tree
Hide file tree
Showing 26 changed files with 299 additions and 360 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ jobs:
FEE_TOKENS: '{ "1": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48", "137": "0x282d8efCe846A88B159800bd4130ad77443Fa1A1", "80001": "0xd8992Ed72C445c35Cb4A2be468568Ed1079357c8", "56": "0xDCe07662CA8EbC241316a15B611c89711414Dd1a" }'
FEE_AMOUNT: '{ "amount": 1, "unit": "MB" }'
AUTHORIZED_DECRYPTERS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]'
P2P_ENABLE_UPNP: 'false'
P2P_ENABLE_AUTONAT: 'false'
ALLOWED_ADMINS: '["0xe2DD09d719Da89e5a3D0F2549c7E24566e947260"]'
- name: Check Ocean Node is running
run: |
for i in $(seq 1 30); do
for i in $(seq 1 90); do
if curl --output /dev/null --silent --head --fail "http://localhost:8001"; then
echo "Ocean Node is up"
exit 0
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ We recommend the following minimum requirements, although you may be be able to

## Option 1: Running Ocean Nodes in Docker (recommended)

[This readme](deployment/README.md) is the recommended way to host a node and be eligible for incentives.
The other options are more recommended towards deleveopers that want to tinker.

## Option 2: Running local build of Ocean Nodes in Docker

Build and run the node using Docker:

```bash
Expand All @@ -25,7 +30,7 @@ docker build -t ocean-node:mybuild . # Build the Docker image
docker run -e PRIVATE_KEY=0x_your_private_key_here ocean-node:mybuild # Start container
```

## Option 2: Running Ocean Nodes with PM2
## Option 3: Running Ocean Nodes with PM2

PM2 is a process manager that makes it easy to manage and monitor your Node.js applications.

Expand Down Expand Up @@ -80,7 +85,7 @@ npm run build # Build the Project

#### Option 1: Automatic Setup (Recommended)

Run the helper script to generate and set up the recommended environment variables:
Run the helper script to generate and set up the minimum required environment variables:

```bash
./src/helpers/scripts/setupNodeEnv.sh
Expand All @@ -97,7 +102,7 @@ export PRIVATE_KEY="0x_your_private_key_here"

The `PRIVATE_KEY` is the only mandatory environmental variable, you must include the `0x` at the front of your private key. Additional configurations can be set as needed. For all available configurations, refer to the [Environment Variables](docs/env.md) documentation.

### 5. Start the Node
### 4. Start the Node

```bash
npm run start
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/NodePeers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function NodePeers() {

return (
<div className={styles.nodes}>
<div className={styles.title24}>Connected Nodes</div>
<div className={styles.title24}>Connected Nodes (Total {nodePeers.length})</div>
{isLoadingNodePeers && (
<div className={styles.loaderContainer}>
<Spinner />
Expand Down
94 changes: 44 additions & 50 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Note: For installing each of these prerequisites, a good starting point is the o

Before starting, confirm that the [system requirements](https://github.com/oceanprotocol/ocean-node?tab=readme-ov-file#system-requirements) are met.

a) download the script `ocean-node-quickstart.sh` from the current directory
a) download the script `ocean-node-quickstart.sh` from the current directory

b) run the script

Expand All @@ -20,11 +20,11 @@ Do you want me to create a private key for you [ y/n ]: y
Generating Private Key, please wait...
Generated Private Key: << redacted >>
Please provide the wallet address to be added as Ocean Node admin account: << redacted >>
Provide the HTTP_API_PORT value or accept the default (press Enter) [8000]:
Provide the P2P_ipV4BindTcpPort or accept the default (press Enter) [9000]:
Provide the P2P_ipV4BindWsPort or accept the default (press Enter) [9001]:
Provide the P2P_ipV6BindTcpPort or accept the default (press Enter) [9002]:
Provide the P2P_ipV6BindWsPort or accept the default (press Enter) [9003]:
Provide the HTTP_API_PORT value or accept the default (press Enter) [8000]:
Provide the P2P_ipV4BindTcpPort or accept the default (press Enter) [9000]:
Provide the P2P_ipV4BindWsPort or accept the default (press Enter) [9001]:
Provide the P2P_ipV6BindTcpPort or accept the default (press Enter) [9002]:
Provide the P2P_ipV6BindWsPort or accept the default (press Enter) [9003]:
Provide the public IPv4/IPv6 address or FQDN where this node will be accessible: << redacted >>
Docker Compose file has been generated successfully.
Expand All @@ -45,16 +45,12 @@ P2P IPv6 TCP Port: 9002
P2P IPv6 WebSocket Port: 9003
```
d) start your Ocean Node
```shell
$ docker-compose up -d
```
e) confirm that docker containers are running
```shell
Expand All @@ -64,8 +60,6 @@ CONTAINER ID IMAGE COMMAND CREATE
858a59502302 typesense/typesense:26.0 "/opt/typesense-serv…" 17 seconds ago Up 10 seconds 0.0.0.0:8108->8108/tcp, :::8108->8108/tcp typesense
```
Additional notes:
- the docker compose file generated will have the following format. For all available configurations, refer to the [Environment Variables](https://github.com/oceanprotocol/ocean-node/blob/main/docs/env.md) documentation
Expand All @@ -78,57 +72,57 @@ services:
container_name: ocean-node
restart: on-failure
ports:
- "8000:8000"
- "9000:9000"
- "9001:9001"
- "9002:9002"
- "9003:9003"
- '8000:8000'
- '9000:9000'
- '9001:9001'
- '9002:9002'
- '9003:9003'
environment:
PRIVATE_KEY: '<<redacted>>'
RPCS: '{"1":{"rpc":"https://ethereum-rpc.publicnode.com","fallbackRPCs":["https://rpc.ankr.com/eth","https://1rpc.io/eth","https://eth.api.onfinality.io/public"],"chainId":1,"network":"mainnet","chunkSize":100},"10":{"rpc":"https://mainnet.optimism.io","fallbackRPCs":["https://optimism-mainnet.public.blastapi.io","https://rpc.ankr.com/optimism","https://optimism-rpc.publicnode.com"],"chainId":10,"network":"optimism","chunkSize":100},"137":{"rpc":"https://polygon-rpc.com/","fallbackRPCs":["https://polygon-mainnet.public.blastapi.io","https://1rpc.io/matic","https://rpc.ankr.com/polygon"],"chainId":137,"network":"polygon","chunkSize":100},"23294":{"rpc":"https://sapphire.oasis.io","fallbackRPCs":["https://1rpc.io/oasis/sapphire"],"chainId":23294,"network":"sapphire","chunkSize":100},"23295":{"rpc":"https://testnet.sapphire.oasis.io","chainId":23295,"network":"sapphire-testnet","chunkSize":100},"11155111":{"rpc":"https://eth-sepolia.public.blastapi.io","fallbackRPCs":["https://1rpc.io/sepolia","https://eth-sepolia.g.alchemy.com/v2/demo"],"chainId":11155111,"network":"sepolia","chunkSize":100},"11155420":{"rpc":"https://sepolia.optimism.io","fallbackRPCs":["https://endpoints.omniatech.io/v1/op/sepolia/public","https://optimism-sepolia.blockpi.network/v1/rpc/public"],"chainId":11155420,"network":"optimism-sepolia","chunkSize":100}}'
DB_URL: 'http://typesense:8108/?apiKey=xyz'
IPFS_GATEWAY: 'https://ipfs.io/'
ARWEAVE_GATEWAY: 'https://arweave.net/'
LOAD_INITIAL_DDOS: ''
FEE_TOKENS: ''
FEE_AMOUNT: ''
ADDRESS_FILE: ''
NODE_ENV: ''
AUTHORIZED_DECRYPTERS: ''
OPERATOR_SERVICE_URL: ''
INTERFACES: ''
ALLOWED_VALIDATORS: ''
INDEXER_NETWORKS: '[]'
# LOAD_INITIAL_DDOS: ''
# FEE_TOKENS: ''
# FEE_AMOUNT: ''
# ADDRESS_FILE: ''
# NODE_ENV: ''
# AUTHORIZED_DECRYPTERS: ''
# OPERATOR_SERVICE_URL: ''
INTERFACES: '["HTTP","P2P"]'
# ALLOWED_VALIDATORS: ''
# INDEXER_NETWORKS: '[]'
ALLOWED_ADMINS: '["<<redacted>>"]'
INDEXER_INTERVAL: ''
# INDEXER_INTERVAL: ''
DASHBOARD: 'true'
RATE_DENY_LIST: ''
MAX_REQ_PER_SECOND: ''
MAX_CHECKSUM_LENGTH: ''
LOG_LEVEL: ''
# RATE_DENY_LIST: ''
# MAX_REQ_PER_SECOND: ''
# MAX_CHECKSUM_LENGTH: ''
# LOG_LEVEL: ''
HTTP_API_PORT: '8000'
P2P_ENABLE_IPV4: ''
P2P_ENABLE_IPV6: ''
P2P_ipV4BindAddress: ''
P2P_ENABLE_IPV4: 'true'
P2P_ENABLE_IPV6: 'false'
P2P_ipV4BindAddress: '0.0.0.0'
P2P_ipV4BindTcpPort: '9000'
P2P_ipV4BindWsPort: '9001'
P2P_ipV6BindAddress: ''
P2P_ipV6BindAddress: '::'
P2P_ipV6BindTcpPort: '9002'
P2P_ipV6BindWsPort: '9003'
P2P_ANNOUNCE_ADDRESSES: '["/dns4/<<redacted>>/tcp/9000/p2p/", "/dns4/<<redacted>>/ws/tcp/9001", "/dns6/<<redacted>>/tcp/9002/p2p/", "/dns6/<<redacted>>/ws/tcp/9003"]'
P2P_ANNOUNCE_PRIVATE: ''
P2P_pubsubPeerDiscoveryInterval: ''
P2P_dhtMaxInboundStreams: ''
P2P_dhtMaxOutboundStreams: ''
P2P_mDNSInterval: ''
P2P_connectionsMaxParallelDials: ''
P2P_connectionsDialTimeout: ''
P2P_ENABLE_UPNP: ''
P2P_ENABLE_AUTONAT: ''
P2P_ENABLE_CIRCUIT_RELAY_SERVER: ''
P2P_ENABLE_CIRCUIT_RELAY_CLIENT: ''
P2P_BOOTSTRAP_NODES: ''
P2P_FILTER_ANNOUNCED_ADDRESSES: ''
# P2P_ANNOUNCE_PRIVATE: ''
# P2P_pubsubPeerDiscoveryInterval: ''
# P2P_dhtMaxInboundStreams: ''
# P2P_dhtMaxOutboundStreams: ''
# P2P_mDNSInterval: ''
# P2P_connectionsMaxParallelDials: ''
# P2P_connectionsDialTimeout: ''
# P2P_ENABLE_UPNP: ''
# P2P_ENABLE_AUTONAT: ''
# P2P_ENABLE_CIRCUIT_RELAY_SERVER: ''
# P2P_ENABLE_CIRCUIT_RELAY_CLIENT: ''
# P2P_BOOTSTRAP_NODES: ''
# P2P_FILTER_ANNOUNCED_ADDRESSES: ''
networks:
- ocean_network
depends_on:
Expand All @@ -138,7 +132,7 @@ services:
image: typesense/typesense:26.0
container_name: typesense
ports:
- "8108:8108"
- '8108:8108'
networks:
- ocean_network
volumes:
Expand Down
64 changes: 32 additions & 32 deletions deployment/ocean-node-quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,46 +141,46 @@ services:
DB_URL: 'http://typesense:8108/?apiKey=xyz'
IPFS_GATEWAY: 'https://ipfs.io/'
ARWEAVE_GATEWAY: 'https://arweave.net/'
LOAD_INITIAL_DDOS: ''
FEE_TOKENS: ''
FEE_AMOUNT: ''
ADDRESS_FILE: ''
NODE_ENV: ''
AUTHORIZED_DECRYPTERS: ''
OPERATOR_SERVICE_URL: ''
INTERFACES: ''
ALLOWED_VALIDATORS: ''
INDEXER_NETWORKS: '[]'
# LOAD_INITIAL_DDOS: ''
# FEE_TOKENS: ''
# FEE_AMOUNT: ''
# ADDRESS_FILE: ''
# NODE_ENV: ''
# AUTHORIZED_DECRYPTERS: ''
# OPERATOR_SERVICE_URL: ''
INTERFACES: '["HTTP","P2P"]'
# ALLOWED_VALIDATORS: ''
# INDEXER_NETWORKS: '[]'
ALLOWED_ADMINS: '["$ALLOWED_ADMINS"]'
INDEXER_INTERVAL: ''
# INDEXER_INTERVAL: ''
DASHBOARD: 'true'
RATE_DENY_LIST: ''
MAX_REQ_PER_SECOND: ''
MAX_CHECKSUM_LENGTH: ''
LOG_LEVEL: ''
# RATE_DENY_LIST: ''
# MAX_REQ_PER_SECOND: ''
# MAX_CHECKSUM_LENGTH: ''
# LOG_LEVEL: ''
HTTP_API_PORT: '$HTTP_API_PORT'
P2P_ENABLE_IPV4: ''
P2P_ENABLE_IPV6: ''
P2P_ipV4BindAddress: ''
P2P_ENABLE_IPV4: 'true'
P2P_ENABLE_IPV6: 'false'
P2P_ipV4BindAddress: '0.0.0.0'
P2P_ipV4BindTcpPort: '$P2P_ipV4BindTcpPort'
P2P_ipV4BindWsPort: '$P2P_ipV4BindWsPort'
P2P_ipV6BindAddress: ''
P2P_ipV6BindAddress: '::'
P2P_ipV6BindTcpPort: '$P2P_ipV6BindTcpPort'
P2P_ipV6BindWsPort: '$P2P_ipV6BindWsPort'
P2P_ANNOUNCE_ADDRESSES: '$P2P_ANNOUNCE_ADDRESSES'
P2P_ANNOUNCE_PRIVATE: ''
P2P_pubsubPeerDiscoveryInterval: ''
P2P_dhtMaxInboundStreams: ''
P2P_dhtMaxOutboundStreams: ''
P2P_mDNSInterval: ''
P2P_connectionsMaxParallelDials: ''
P2P_connectionsDialTimeout: ''
P2P_ENABLE_UPNP: ''
P2P_ENABLE_AUTONAT: ''
P2P_ENABLE_CIRCUIT_RELAY_SERVER: ''
P2P_ENABLE_CIRCUIT_RELAY_CLIENT: ''
P2P_BOOTSTRAP_NODES: ''
P2P_FILTER_ANNOUNCED_ADDRESSES: ''
# P2P_ANNOUNCE_PRIVATE: ''
# P2P_pubsubPeerDiscoveryInterval: ''
# P2P_dhtMaxInboundStreams: ''
# P2P_dhtMaxOutboundStreams: ''
# P2P_mDNSInterval: ''
# P2P_connectionsMaxParallelDials: ''
# P2P_connectionsDialTimeout: ''
# P2P_ENABLE_UPNP: ''
# P2P_ENABLE_AUTONAT: ''
# P2P_ENABLE_CIRCUIT_RELAY_SERVER: ''
# P2P_ENABLE_CIRCUIT_RELAY_CLIENT: ''
# P2P_BOOTSTRAP_NODES: ''
# P2P_FILTER_ANNOUNCED_ADDRESSES: ''
networks:
- ocean_network
depends_on:
Expand Down
Loading

0 comments on commit 53632a8

Please sign in to comment.