To learn more about worker nodes, see Worker Nodes and Worker Node Networks.
Currently, EWF provides two (2) implementations of Worker Nodes:
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:
Sync operator subscriptions
Download and install solutions
Run solutions and cast votes
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).
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.
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:
A solution is triggered to process the flow
The flow gets executed to produce a result
The result is transformed in to a Merkle Tree Root Hash
The flow requests for the worker to submit the hash as a vote
The worker enqueues the voting request
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.