arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Ocean Nodes

The new Ocean stack

Ocean Nodes are a vital part of the Ocean Protocol core technology stack. The Ocean Nodes monorepo that replaces the three previous components: Provider, Aquarius and subgraph. It has been designed to significantly simplify the process of starting the Ocean stack - it runs everything you need with one simple command.

It integrates multiple services for secure and efficient data operations, utilizing technologies like libp2p for peer-to-peer communication. Its modular and scalable architecture supports various use cases, from simple data retrieval to complex compute-to-data (C2D) tasks.

The node is structured into separate layers, including the network layer for communication, and the components layer for core services like the Indexer and Provider. This layered architecture ensures efficient data management and high security.

Flexibility and extensibility are key features of Ocean Node, allowing multiple compute engines, such as Docker and Kubernetes, to be managed within the same framework. The orchestration layer coordinates interactions between the core node and execution environments, ensuring the smooth operation of compute tasks.

For details on how to run a node see the in the GitHub repository.

However, your nodes must meet specific criteria in order to be eligible for incentives. Here’s what’s required:

  1. Public Accessibility: Nodes must have a public IP address

  2. API and P2P Ports: Nodes must expose both HTTP API and P2P ports to facilitate seamless communication within the network

You can easily check the eligibility of the nodes by connecting to the and looking for the green status indicator next to your IP address

Follow the steps to install the Node and be eligible for rewards-

  1. Find your public IP: You’ll need this for the configuration. You can easily find it by googling “my IP”

  2. Run the : If you’ve already deployed a node, we recommend either redeploying with the guide or ensuring that your environment variables are correct and you’re running the latest version

  3. Get your Node ID: After starting the node, you can retrieve the ID from the console

  1. Expose Your Node to the Internet: From a different device, check if your node is accessible by running - telnet{your ip}{P2P_ipV4BindTcpPort}

  2. To forward the node port, please follow the instructions provided by your router manufacturer — ex: , , , etc.

Verify eligibility on the Ocean Node Dashboard: Check https://nodes.oceanprotocol.com/ and search for your peerID to ensure your node is correctly configured.

hashtag
Ocean Nodes replace the Provider:

  • The Node is the only component that can access your data

  • It performs checks on-chain for buyer permissions and payments

  • Encrypts the URL and metadata during publish

hashtag
Ocean Nodes replace Aquarius:

  • A new component called Indexer replaces the functionality of Aquarius.

  • The indexer acts as a cache for on-chain data. It stores the metadata from the smart contract events off-chain in a Typesense database.

  • It monitors events: It continually checks for MetadataCreated and MetadataUpdated events, processing these events and updating them in the database.

Ocean Nodes replace the Subgraph:

  • Indexing the data from the smart contact events.

  • The data is indexed and updated in real-time.

  • Providing an API which receives and responds to queries.

hashtag
API

For details on all of the HTTP endpoints exposed by the Ocean Nodes API, refer to the API.md file in the github repository.

hashtag
Compute to Data (C2D)

The Ocean nodes provide a convenient and easy way to run a compute-to-data environment. This gives you the opportunity to monetize your node as you can charge fees for using the C2D environment and there are also additional incentives provided Ocean Protocol Foundation (OPF). Soon we will also be releasing C2D V2 which will provide different environments and new ways to pay for computation.

For more details on the C2D V2 architecture, refer to the documentation in the repository:\

Decrypts the URL when the dataset is downloaded or a compute job is started
  • Provides access to data assets by streaming data (and never the URL)

  • Provides compute services (connects to C2D environment)

  • Typically run by the Data owner

  • Serves as an API: It provides a REST API that fetches data from the off-chain datastore.
  • Offers easy query access: The API provides a convenient method to access metadata without scanning the blockchain.

  • Simplifying the development experience for anyone building on Ocean.
    readmearrow-up-right
    Ocean Nodes Dashboardarrow-up-right
    Quickstart Guidearrow-up-right
    Asusarrow-up-right
    TpLinkarrow-up-right
    Huaweiarrow-up-right
    Mercusysarrow-up-right
    image

    Node Architecture

    Ocean Nodes are the core infrastructure component within the Ocean Protocol ecosystem, designed to facilitate decentralized data exchange and management. It operates by leveraging a multi-layered architecture that includes network, components, and module layers.

    Key features include secure peer-to-peer communication via libp2p, flexible and secure encryption solutions, and support for various Compute-to-Data (C2D) operations.

    Ocean Node's modular design allows for customization and scalability, enabling seamless integration of its core services—such as the Indexer for metadata management and the Provider for secure data transactions—ensuring robust and efficient decentralized data operations.

    hashtag
    Architecture Overview

    The Node stack is divided into the following layers:

    • Network layer (libp2p & HTTP API)

    • Components layer (Indexer, Provider)

    • Modules layer

    hashtag
    Features

    • libp2p supports ECDSA key pairs, and node identity should be defined as a public key.

    • Multiple ways of storing URLs:

      • Choose one node and use that private key to encrypt URLs (enterprise approach).

    hashtag
    Nodes and Network Model

    Nodes can receive user requests in two ways:

    • HTTP API

    • libp2p from another node

    They are merged into a common object and passed to the appropriate component.

    Nodes should be able to forward requests between them if the local database is missing objects. (Example: Alice wants to get DDO id #123 from Node A. Node A checks its local database. If the DDO is found, it is sent back to Alice. If not, Node A can query the network and retrieve the DDO from another node that has it.)

    Nodes' libp2p implementation:

    • Should support core protocols (ping, identify, kad-dht for peering, circuit relay for connections).

    • For peer discovery, we should support both mDNS & Kademlia DHT.

    • All Ocean Nodes should subscribe to the topic: OceanProtocol. If any interesting messages are received, each node is going to reply.

    hashtag
    Components & Modules

    hashtag
    Indexer

    An off-chain, multi-chain metadata & chain events cache. It continually monitors the chains for well-known events and caches them (V4 equivalence: Aquarius).

    Features:

    • Monitors MetadataCreated, MetadataUpdated, MetadataState and stores DDOs in the database.

    • Validates DDOs according to multiple SHACL schemas. When hosting a node, you can provide your own SHACL schema or use the ones provided.

    • Provides proof for valid DDOs.

    hashtag
    Provider

    • Performs checks on-chain for buyer permissions and payments.

    • The provider is crucial in checking that all the relevant fees have been paid before the consumer is able to download the asset. See the for details on all of the different types of fees.

    • Encrypts the URL and metadata during publishing.

    For more details on the C2D V2 architecture, refer to the documentation in the repository:

    hashtag

    Choose several nodes, so your files can be accessed even if one node goes down (given at least one node is still alive).
  • Supports multiple C2D types:

    • Light Docker only (for edge nodes).

    • Ocean C2D (Kubernetes).

  • Each component can be enabled/disabled on startup (e.g., start node without Indexer).

  • Monitors all transactions and events from the data token contracts. This includes minting tokens, creating pricing schema (fixed & free pricing), and orders.
  • Allows queries for all the above.

  • Decrypts the URL when the dataset is downloaded or a compute job is started.
  • Encrypts/decrypts files before storage/while accessing.

  • Provides access to data assets by streaming data (and never the URL).

  • Provides compute services.

  • The node operator can charge provider fees, compensating the individuals or organizations operating their own node when users request assets.

  • Currently, we are providing the legacy Ocean C2D compute services (which run in Kubernetes) via the node. In the future, we will soon be releasing C2D V2 which will also allow connections to multiple C2D engines: light, Ocean C2D, and third parties.

  • Fees page
    Ocean Nodes Infrastructure diagram
    ocean-node/API.md at develop · oceanprotocol/ocean-nodeGitHubchevron-right
    Logo
    ocean-node/docs/C2DV2.md at develop · oceanprotocol/ocean-nodeGitHubchevron-right
    ocean-node/docs/C2DV2.md at develop · oceanprotocol/ocean-nodeGitHubchevron-right
    Logo
    Logo