solana-program-library/themis
Jon Cinque 14daf0d370
Stake pool: adding pool balance confirmation (Redo of #960) (#1116)
* Added validator stake account list storage, deprecated old tests

* Added join and leave stake pool instructions, error messages refactoring

* Stake pool tests refactoring, tests for join and leave pool added

* Added validator stake account creation instruction, join/leave pool instructions renamed, version field added

* Formatting fixes

* Added update list/pool instructions (no tests yet), updated deposit instruction logic, claim instruction removed, refactoring

* Updated deposit logic and tests, updated withdraw logic and added tests, refactoring

* Stake pool CLI updated to work with new deposit/withdraw instructions, claim usage removed

* Added validator stake account management and balance update commands to the stake pool CLI, updated dependency versions, updated devnet program address

* Merge conflicts fixed

* Removed deprecated tests

* Fixes for review comments

* Additional program id checks across the code

* Formatting errors fixed

* Changed minimum stake balance in CLI, removed deprecated tests, removed check for stake history id

* Added TODO for stake account warmup status check

* Cargo.lock conflict fix

* Formatting fixed

* Update Cargo lock file for CI

* Pin themis version of subtle

Co-authored-by: Yuriy Savchenko <yuriy.savchenko@gmail.com>
2021-01-21 14:48:46 +01:00
..
client_ristretto Update to Solana 1.5.0 2020-12-17 21:24:30 -08:00
program_ristretto Stake pool: adding pool balance confirmation (Redo of #960) (#1116) 2021-01-21 14:48:46 +01:00
README.md Fix markdown 2020-10-23 17:04:43 -06:00

README.md

Brave THEMIS

An implementation of Brave's THEMIS research project. This project contains two privacy-oriented smart contracts, the Policy Smart Contract (PSC) and the Fund Smart Contract (FSC). Together, the two contracts allow users to be compensated for engaging with ad publishers. The users do not expose their identities or preferences.

Build and Run the TPS demo client

The demo client simulates 1,000 users interacting with the Ristretto version of the THEMIS on-chain program.

Install prerequisites

Create an Ubuntu 20.04 instance with at least 8GB of memory and 20 GB of disk space.

Install system dependencies:

sudo apt update
sudo apt install -y g++ libclang-dev pkg-config make libssl-dev libudev-dev

Install the Rust compiler:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env

Install the Solana command-line tools:

curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.4.2/install/solana-install-init.sh | sh -s - v1.4.2
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"

Build the TPS example app

Clone this git repo:

git clone https://github.com/solana-labs/solana-program-library.git
cd solana-program-library

Build the demo client:

cd themis/client_ristretto
cargo build --example tps

Configure the default Solana wallet

Point to the testnet cluster (default is mainnet-beta):

solana config set --url http://testnet.solana.com

Create a keypair and airdrop it some SOL:

solana-keygen new --no-passphrase
solana airdrop 10

Run the TPS example app

cargo run --example tps

You should see something like:

Seeding feepayer accounts...
Starting benchmark...
Benchmark complete.
4000 transactions in 27.880907273s (143.4673542303847 TPS)