OpenRank SDK
A command-line SDK for interacting with the OpenRank AVS (Actively Validated Service) - a decentralized trust and reputation system that runs PageRank-style algorithms in Trusted Execution Environments (TEEs).
What is OpenRank?
OpenRank is a decentralized system for computing trust scores and reputation rankings using the EigenTrust algorithm (a variant of PageRank). It operates within Trusted Execution Environments to ensure computational integrity and provides censorship-resistant, verifiable trust computations.
The system works with:
- Trust data: Relationships between entities with trust weights
- Seed data: Initial trust scores for bootstrapping the algorithm
- Score computation: Running EigenTrust to generate final trust scores
Installation
Build the SDK from source:
The binary will be available at target/release/openrank.
Commands
Initialisation
Initialise the workspace with example datasets and .env file:
This command will create a folder with following structure:
- trust/
- seed/
- .env
.env file contains a placeholder for your mnemonic phrase:
MNEMONIC="add your mnemonic phrase here"
Operations
compute-request
Submit a computation request using trust and seed data from local folders.
Arguments:
TRUST_FOLDER_PATH- Path to folder containing trust CSV filesSEED_FOLDER_PATH- Path to folder containing seed CSV files
Example:
compute-watch
Monitor and watch for computation results by compute ID.
Arguments:
COMPUTE_ID- The computation ID to monitor
Options:
--out-dir <OUT_DIR>- Output directory for results (optional)
Example:
download-scores
Download computed scores for a specific computation.
Arguments:
COMPUTE_ID- The computation ID to download scores for
Options:
--out-dir <OUT_DIR>- Output directory for downloaded scores (optional)
Example:
Local Operations
compute-local
Run OpenRank computation locally using trust and seed CSV files.
Arguments:
TRUST_PATH- Path to trust CSV fileSEED_PATH- Path to seed CSV fileOUTPUT_PATH- Output path for computed scores (optional)
CSV Format:
- Trust CSV:
from_id,to_id,trust_weight - Seed CSV:
peer_id,score
Example:
verify-local
Verify computed scores against trust and seed data locally.
Arguments:
TRUST_PATH- Path to trust CSV fileSEED_PATH- Path to seed CSV fileSCORES_PATH- Path to scores CSV file to verify
Example:
Data Formats
Trust CSV Format
from_id,to_id,trust_weight
alice,bob,0.8
bob,charlie,0.6
charlie,alice,0.9
Seed CSV Format
peer_id,score
alice,1.0
bob,0.5
charlie,0.3
Scores CSV Format
peer_id,score
alice,0.45
bob,0.32
charlie,0.23
Or use AWS credential files and profiles as per standard AWS CLI configuration.
Examples
Complete Local Workflow
-
Prepare your data files:
-
Run local computation:
-
Verify the results:
Distributed Computation Workflow
-
Submit computation request:
-
Monitor computation:
-
Download results:
Algorithm Details
OpenRank implements the EigenTrust algorithm with the following key features:
- Pre-trust weighting: Uses a 0.5 weight for seed trust values
- Convergence threshold: Stops iteration when delta < 0.01
- Reachability filtering: Only includes peers reachable from seed nodes
- Normalization: Ensures trust distributions sum to 1.0
The algorithm iteratively computes trust scores until convergence, providing a robust measure of reputation in decentralized networks.
Getting Help
For more information about the OpenRank system and TEE deployment, see the main project documentation.