# Requirements for running client and the server
## Package requirements
Anvil - https://github.com/foundry-rs/foundry/tree/master/anvil#installing-from-source
Tool for running local ethereum node
Solidity - https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html
## Server
Is a hyper.rs server. The configuration for the server is in `data/protocol-config.json`, where we specify:
- epoch_interval - Interval at which we calculate the proofs
- endpoint - Socket where we listen for connections to the server
- ethereum_node_url - Url for ethereum node we are connecting to
- as_contract_address - Address of AttestationStation smart contract we are fetching events from
The requirement for runnig the server is:
Anvil node running in the backgound on `ethereum_node_url` with Attestation station contract deployed on `as_contract_address`.
To run the server, run `cargo run --release`
## Client
User facing client for interacting with AttestationStation and the server.
The configuration for the client is in `data/client-config.json`, and it contains:
- ops - Contains the scores to the whole group (we have a fixed group of 5)
- secret_key - EdDSA secret key - keys that we use to manage EigenTrust sets
- as_address - AttestationStation address
- et_verifier_wrapper_address - A Verifier smart contract for ET proof
- mnemonic - A mnemonic phrase for ethereum account
- ethereum_node_url - Ethereum node url
- server_url - Server url
Client exposes command line interface written with clap.rs. Commands available:
- show - prints the client-config.json to the terminal
- compile-contracts - compiles all the .sol and .yul contracts available in `data` folder. For .sol contracts, creates a ABI json file, as well as Rust binding file. For .yul smart contract it compiles yul code into binary.
- deploy-contracts - Deploys all the available contracts to a node running on `ethereum_node_url`
- attest - Takes `ops` from `client-config.json`, signs it using `secret_key` and submits it to AttestationStation smart contract
- update - Updates the `client-config.json` using one of the subcommands:
- name - `./[binary] update --name "[name]"`
- score
- sk
- as_address
- mnemonic
- node_url
- verify - Fetches the proof from the server on `server_url` and submits the proof to ET Verifier on `et_verifier_wrapper_address`.