Welcome to the eigenRPC project! This project leverages the power of Eigen Layer and Othentic Stack to create a robust and secure decentralized RPC network. By decentralizing the RPC, we help decentralize the blockchain space and provide a reliable connection to blockchain data, ensuring enhanced security, reliability, and trust in the network. 🌟
Operators are the backbone of our network. Here's what they need to do:
- Join the Network: Operators must run an Ethereum node.
- Run Logic: They also need to implement Performer/Attestation operator logic.
- Expose Endpoints: The Ethereum node exposes RPC endpoints.
- Validation: Operators validate other operators' logic and results.
The decentralized RPC process follows a structured approach to ensure the accuracy and validity of the data:
- Operator Selection: Every 10 blocks, a random operator is selected.
- Data Fetching: The selected operator retrieves the latest block from their end.
- Result Dissemination: The operator sends the block number and block hash to other operators.
- Validation: Other operators validate the block by comparing the provided block hash with their own, ensuring the block is not older than 10 blocks and verifying the operator's selection.
- Aggregation: The results are sent to an aggregator node. The aggregator sums the signatures.
- Consensus: If more than 66% of the operators agree that the result is valid, a true value is passed; otherwise, a false value is passed.
- Reputation Management: The aggregator's result is sent to a smart contract, which adjusts the user’s reputation score based on the validity of the result.
Built using Eigen Layer, Othentic Stack, Foundry, Viem, and TypeScript. 🛠️
- Ethereum Node: Runs the Ethereum blockchain and exposes RPC endpoints.
- Performer/Attestation Logic: Custom logic that operators need to run for validation.
- Aggregator Node: Collects and aggregates validation results from operators.
- Smart Contract: Manages user reputation scores based on validation results.
- Join the Network: Operator sets up the Ethereum node and logic.
- Operator Selection: Random selection every 10 blocks.
- Data Fetching: Selected operator retrieves block data.
- Result Dissemination: Operator sends data to peers.
- Validation: Peers validate the data.
- Aggregation: Results sent to aggregator.
- Consensus: Aggregator determines validity.
- Reputation Update: Smart contract updates user scores.
By utilizing the Eigen Layer and Othentic Stack, this project provides a decentralized and secure RPC network. Operators work together to ensure the integrity and reliability of the network, and reputation scores keep the system honest and trustworthy. Join us in building a decentralized future! 🚀
Feel free to reach out if you have any questions or want to contribute! 🌐💬
Before you begin, you need to install the following tools:
Clone the Repository
git clone git@github.com:vaniiiii/othentic-drpc.git
cd othentic-drpc
To set up the environment, create a .env file with the usual Othentic configurations (see the .env.example)
- Install Dependencies
cd nextjs
npm install
- Run App
npx run dev
- Setup the environment
Create a .env file (see the .env.example)
- Install Dependencies
cd contracts/
forge install
- Compile and Test Contracts
forge build
forge test
- Deploy contracts
forge script PRNGDeploy --rpc-url $L2_RPC --private-key $PRIVATE_KEY --broadcast -vvvv --verify --etherscan-api-key $L2_ETHERSCAN_API_KEY --chain $L2_CHAIN --verifier-url $L2_VERIFIER_URL --sig="run(address)" $ATTESTATION_CENTER_ADDRESS