solana-program-library/themis
Michael Vines 448be67cfa Update to Solana 1.6.2 2021-03-30 09:38:04 -07:00
..
client_ristretto Update to Solana 1.6.2 2021-03-30 09:38:04 -07:00
program_ristretto Update to Solana 1.6.2 2021-03-30 09:38:04 -07: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)