🛅Worker Nodes

What are Worker Nodes?

To learn more about worker nodes, see Worker Nodes and Worker Node Networks.

Types of Worker Nodes

Currently, EWF provides two (2) implementations of Worker Nodes:

How does a Worker Node work?

In a nutshell, a Worker Node is a single processing unit in a network of nodes which has the ability to execute enterprise calculations, and submit votes to derive consensus-based, transparent results.

A general worker node typically involves below processes:

  1. Sync operator subscriptions

  2. Download and install solutions

  3. Run solutions and cast votes

Sync operator subscriptions

The worker node periodically syncs on-chain data for operator subscriptions. The syncing process informs the worker node that either a set of solutions is available to be installed (new subscriptions) or uninstalled (unsubscription or subscription expiry).

Download and install solutions

Solution flows, which are currently in the form of Node RED flow JSON files, contain the actual detailed specifications and implementation of a specific business use-case. These are stored in a decentralized file storage called IPFS. The EWX registry stores the CID of the flow along with the rest of the solution metadata. These are stored locally in the worker node during the syncing process.

When the worker node is enabled to run the flows, it downloads the actual Node RED flow JSON files from IPFS using the CID. Subsequently, the flow files are installed in the local Node RED server bundled in the worker node itself.

Run solutions and cast votes

An enterprise use-case is considered executing when the flow files get installed and are running in the Node RED server of the worker node. Each solution flow determines when and how the solution flow produces a result, and when to use the result to cast a vote.

Casting a vote simply follows below steps:

  1. A solution is triggered to process the flow

  2. The flow gets executed to produce a result

  3. The result is transformed in to a Merkle Tree Root Hash

  4. The flow requests for the worker to submit the hash as a vote

  5. The worker enqueues the voting request

  6. The worker submits the vote to EWX

Why does the result gets transformed into a Merkle Tree Root Hash? EWX nor the Worker Node never stores raw or calculated data unless the solution flow created by the enterprise themselves are designed and approved to do so after an extensive audit. EWX as a chain only stores the result hash for optimum performance and data security.

The Merkle Tree Root Hash can represent the actual calculated data as a single, unique vote. However, an adversary can never reverse-engineer the hash to derive the calculated or raw data. This ensures that the entire EWX ecosystem is secure and robust.

Please refer to potential enterprise use-cases for some examples of what a worker node can actually do.

Last updated

#52:

Change request updated