Prerequisites
Before starting, make sure you have these tools installed:- Node.js and npm
- Sui CLI
- Docker
- Download from Docker Desktop
- Ensure Docker is running before proceeding
- Silvana CLI
Getting Started
Step 1: Create a New Project
Use the Silvana CLI to create a new project from the template:- Download the project template;
- Generate Sui and Mina keypairs for both user and Coordinator;
- Automatically fund all accounts from testnets;
- Fetch devnet configuration;
- Create a Silvana registry on-chain;
- Store the agent’s private key in secure storage;
- Generate environment files with all necessary configuration.
Step 2: Navigate to Your Project
Run this command:Step 3: Build and Deploy Move Contract
Navigate to the move directory and deploy your smart contract:Step 4: Build and Compile the Agent
Navigate to the agent directory and set up the TypeScript agent:Step 5: Verify Account Funding
The setup process automatically funded your accounts, but you can verify the balances:silvana faucet command.
Step 6: Deploy the Application
Deploy your application to both Mina and Sui blockchains:- Deploy the Mina zkApp contract;
- Create the application on the Sui blockchain;
- Register the app in the Silvana registry;
- Generate the app instance configuration.
.env.app file with:
- App ID: the unique identifier for your application;
- App instance ID: the specific instance of your deployed app;
- Mina contract address: the deployed zkApp address on Mina;
- Registry information: connection to the Silvana registry.
Step 7: Start the Silvana Coordinator
Open a new terminal window and navigate to the silvana folder:- Connect to the Sui blockchain;
- Monitor for incoming jobs;
- Coordinate execution between the agent and blockchain;
- Handle settlement and verification.
- Configuration Loading: fetches devnet configuration from the RPC server and injects environment variables.
- Sui Connection: connects to the Sui blockchain RPC endpoint.
- Balance Check: verifies sufficient SUI balance for operations.
- Gas Coin Pool: initializes a pool of gas coins by splitting large coins for better transaction performance.
- Service Startup: starts multiple background services:
- Job Searcher: monitors for new jobs on the blockchain;
- Multicall Processor: batches multiple operations for efficiency;
- Docker Buffer Processor: manages Docker container execution;
- Event Monitor: watches blockchain events;
- gRPC Server: provides API for agent communication;
- Periodic Tasks: runs reconciliation, block creation, and proof analysis.
- Detect new jobs created on the blockchain;
- Launch Docker containers to execute agent code;
- Process job results and update blockchain state;
- andle proof generation and settlement.
Step 8: Send Test Transactions
With the Coordinator running, open another terminal and navigate to the agent directory to send test transactions:- Sends multiple addition requests to the Sui blockchain;
- Each transaction creates a job that the Coordinator detects;
- The Coordinator launches Docker containers to process each job;
- Results are computed, proven with zkSNARKs, and settled on-chain.
Congratulations! Your first Silvana app is now up and running!
- ✅ Created a new Silvana project with the automated setup;
- ✅ Deployed a Move smart contract on Sui;
- ✅ Built and compiled a TypeScript agent with zkSNARK circuits;
- ✅ Deployed a Mina zkApp for proof verification;
- ✅ Started the Silvana Coordinator to orchestrate execution;
- ✅ Sent transactions that trigger distributed computation.
- Sui handles job creation, proving orchestration and optimistic state calculations;
- Docker containers execute the computation securely;
- Mina verifies zero-knowledge proofs of correct execution;
- Silvana coordinates the entire workflow.
Running Agent on Silvana Devnet
Instead of running your own Coordinator, you can deploy your application to the Silvana devnet, where it will be processed by the shared Silvana infrastructure.Option 1: Deploy to Shared Silvana Devnet
To use the shared Silvana devnet registry:- Get the devnet registry ID:
- Update your agent configuration to use the shared registry:
- Register your app in the shared registry using Silvana registry commands:
Option 2: Join as a Devnet Operator
To contribute computing power to the Silvana devnet:- Configure your Coordinator to use the shared registry:
- Start your Coordinator:
Amending the Code
When you want to modify the application logic and deploy your own version:Step 1: Modify the Circuit Logic
Editagent/src/circuit.ts to implement your custom computation logic. This file contains the zkSNARK circuit that defines what computation will be proven and verified.
Step 2: Configure Docker Hub
Before building and pushing your Docker image, configure your Docker Hub credentials inagent/.env:
- Log in to Docker Hub.
- Go to Account Settings → Security.
- Create a New Access Token.
- Copy the token to
DOCKER_ACCESS_TOKEN.
Step 3: Build and Deploy
After making your changes, rebuild and deploy your agent:- Builds your modified TypeScript code;
- Compiles the zkSNARK circuits to generate prover/verifier keys;
- Creates a Docker image containing your agent code and prover keys;
- Pushes the image to Docker Hub under your account.
Step 4: Update Your App Configuration
After pushing your new Docker image, update your app to use it:- Note your new Docker image URL:
docker.io/your-username/your-image-name:latest. - Update your app configuration to reference this new image.
- Redeploy your app with
npm run deploy.
Troubleshooting
In the table below, see typical issues you may encounter and how you can handle them:| Issue | How to Fix |
|---|---|
| The Coordinator refuses to detect jobs | Ensure the Coordinator is running and connected to the correct SILVANA_REGISTRY_PACKAGE and SILVANA_REGISTRY on Sui Devnet. |
| Docker error | Verify Docker Desktop is running and you’re logged in to Docker Hub. |
| Insufficient balance | Run silvana faucet commands to request more tokens. |
| Transaction failures | Check the explorer for detailed error messages and look at the Coordinator logs in the terminal. |
| Debugging | Use silvana instance command to show App Instance state, silvana block, silvana proofs commands to show block information and aggregated proof production details for the block, and silvana jobs and silvana job commands to show the details about proving, merging and settlement jobs being run by Coordinators. |
| Manual transactions | Use silvana transaction to manually execute transactions for your App Instance. |
Silvana CLI
Runsilvana help to see all available commands: