The mixer operator is a Rust-based off-chain service that generates consume-note transactions using the provided cross-chain notes and preconfigured public faucet accounts.
The service provides singe endpoint POST /mix that generates tx from the note and account and returns tx id
./Rocket.toml contains the configs for the service
- rpc_url URL of miden node GRPC api
- rpc_timeout_ms miden rpc request timeout in milliseconds
- public_account_ids comma separated list of public faucet accounts on miden chain to work with
- rust v1.88.0
Start the service with the cmd
cargo run --release
- Build the service with target
x86_64-unknown-linux-gnu - Connect to the server via SSH
ssh [email protected] - Stop the previous version
killall mixer-operator - Copy the binaries to the server
scp ./target/x86_64-unknown-linux-gnu/release/mixer-operator [email protected]:/root/mixer/mixer-operator - Start the service
cd ./mixer && nohup ./mixer-operator &
- Latest version of miden-bridge CLI (Install with
cargo install --git https://github.com/arcane-finance-defi/miden-bridge-cli miden-client-clicommand) - Foundry toolchain
- Cleanup previous cli configs
rm -r miden-client.toml store.sqlite3 templates keystore - Fill .env file.
cp .env.example .envand fill the TEST_PRIVATE_KEY env var with EVM private key of the source test account, TEST_RECEIVER_ADDRESS with public EVM address of target account, TEST_USDC_AMOUNT to specify custom amount of USDC tokens to be mixed. DO NOT USE THE ACCOUNT THAT HOLDS ANY REAL ASSETS. THE PRIVATE KEY WILL BE INCLUDED INTO THE TEST LOGS - Run test with
cargo test --package mixer-operator --test mixing_flow test_usdc_mixing_flow -- --exact(may take some time)