Aleo Deploy and Execute Demo Showcases the Power of Decentralized Private Computation with Zero-Knowledge Proofs

HEORHII YABLONSKYI
4 min readMar 19, 2023

Aleo, the blockchain platform that focuses on privacy, recently released a Deploy and Execute functionality that allows developers to write and deploy zero-knowledge circuits to the Aleo blockchain, enabling private computation. To demonstrate the functionality of this new feature, Aleo released a Deploy and Execute Demo on its website.

The demo showcases the power of Aleo’s privacy-focused approach, which is based on zero-knowledge proofs. The demo features a simple example in which a user inputs two numbers and requests the sum of those numbers. The Aleo blockchain performs the computation, returning the sum of the two numbers to the user without revealing any information about the inputs themselves.

To deploy a program to our Testnet, refer to Aleo special guide here.

Usage guide

1. Prerequisites

Make sure you have both Leo and snarkOS installed on your machine.

  • To verify if you have Leo, open your terminal and type leo. If you don't see something like zsh: command not found: leo, you're good
  • To verify if you have snarkOS, do the same thing you did with Leo but replace leo with snarkos

2. Generate your test keys and wallet address

  • In your favorite browser, navigate to https://aleo.tools/ and click the Generate button
  • Save your Address, View Key, and Private Key in a safe place, you’ll need them later

3a. Seeding your wallet with credits

  • To seed your wallet, you’ll need to request credits from @AleoFaucet.
  • When @AleoFaucet quote retweets your request, you are ready for the next steps.

3b. Create a Leo application

We’ll need something to deploy, so let’s create a simple test Leo application.
Open your terminal and enter the following commands consecutively:
Create a directory to store your Leo application — feel free to use a different name for this directory or location

  • Assign $WALLETADDRESS to the wallet address you saved
  • Generate a unique application name using part of your wallet address
  • Create a new test Leo application
  • Run your Leo application to make sure things are working
  • Save the path of your application — this is important later

4. Confirm @AleoFaucet has sent your wallet credits and obtain your ciphertext record value

By this point, @AleoFaucet should have retweeted your request along with a URL with a prefix of vm.aleo.org/api/testnet3/transaction...

  • Click on the link retweeted by @AleoFaucet. You should be presented with a JSON object in a new browser window. If you haven’t already, we highly recommend you install the JSON Beautifier & Editor Chrome extension.
  • Navigate to object.execution.transitions[0].outputs[0].value and copy the ciphertext stored there

5. Obtain your records plaintext

  • Navigate to https://aleo.tools/ and click the Record button in the nav bar at the top of the page
  • Place the record ciphertext you copied in the previous step in the Record (Ciphertext) field
  • Place your view key in the View Key field
  • Copy the plaintext record provided. If you do not see it, it’s likely you copied the wrong ciphertext record in step 4. Consider revisiting or reach out to hello@aleo.org.
  • Save your plaintext record in the same place as you did your address, view key, and private key. You will need it later.

6. Deploy your test application

Now that we have all the details required, we can deploy your first Leo application. Open the same terminal instance as before and enter the following commands consecutively:

  • Navigate to the path of your app
  • Assign $PRIVATEKEY to the private address you saved earlier
  • Assign $RECORD to the plaintext record you saved earlier
  • Deploy your Leo application (if all your variables were assigned correctly, you should be able to copy/paste the following

You should have seen a confirmation that your Aleo application was deployed, how exciting

Perposes of the Deploy and Execute Demo

The demo is designed to show how developers can use Aleo’s Deploy and Execute functionality to build applications that require privacy. By using zero-knowledge proofs, developers can ensure that sensitive data remains private while still allowing users to perform computations on that data.

To use the demo, users must first download and install the Aleo Studio software. This software provides a development environment for writing zero-knowledge circuits that can be deployed to the Aleo blockchain using the Deploy and Execute functionality.

Once the software is installed, users can access the demo on Aleo’s website. The demo provides a user-friendly interface for inputting two numbers and requesting the sum of those numbers. The Aleo blockchain then performs the computation and returns the sum to the user without revealing any information about the inputs.

The Deploy and Execute Demo is an important step forward for Aleo and for the zero-knowledge industry as a whole. It demonstrates the practical applications of zero-knowledge proofs, showcasing how developers can build applications that require privacy without compromising security.

The launch of the demo also highlights the importance of privacy in the Web3 ecosystem. As more applications are built on blockchain technology, it is critical that users have the ability to keep their data private and secure. Aleo’s approach to privacy, based on zero-knowledge proofs, is an important step forward in achieving this goal.

Conclusion

In conclusion, the Aleo Deploy and Execute Demo is a powerful demonstration of the capabilities of Aleo’s Deploy and Execute functionality. It showcases the practical applications of zero-knowledge proofs and highlights the importance of privacy in the Web3 ecosystem. As Aleo continues to develop its platform, it will be interesting to see how developers use this functionality to build new, innovative applications that require privacy and security.

To know more, join now!
Aleo Twitter
Aleo Discord
Aleo Website

Colliseum#6378

--

--