Back to Fhevm

Fhevm Coprocessor

coprocessor/fhevm-engine/tfhe-worker/README.md

0.12.3965 B
Original Source

Fhevm Coprocessor

Dependencies installation

  • docker-compose
  • rust
  • sqlx-cli:
cargo install sqlx-cli

Development

Start the database

docker compose up -d

Export database url for development

export DATABASE_URL="postgres://postgres:postgres@localhost/coprocessor"

Create the database

sqlx db create

Run the migrations

sqlx migrate run

Debugging database

Exec into postgresql shell

docker exec -u postgres -it fhevm-coprocessor-db-1 psql coprocessor

Running tests

cargo test

operators_from_events uses the full type matrix by default. To run a lighter local matrix (up to uint64) set TFHE_WORKER_EVENT_TYPE_MATRIX=local before cargo test.

Running the first working fhevm coprocessor smoke test

Reload database and apply schemas from scratch

make recreate_db

Run the background FHE worker

cargo run -- --run-bg-worker --worker-polling-interval-ms 1000