Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: support Aleo's version of Marlin #290

Open
DmytroTym opened this issue Dec 1, 2023 · 6 comments
Open

[FEAT]: support Aleo's version of Marlin #290

DmytroTym opened this issue Dec 1, 2023 · 6 comments
Labels

Comments

@DmytroTym
Copy link
Contributor

DmytroTym commented Dec 1, 2023

Description

Aleo created their version of Marlin called Varuna which is (as far as I understand) what is ran when https://github.com/AleoHQ/snarkVM/blob/testnet3/synthesizer/src/vm/execute.rs#L26 is executed.
Because the time outside witness generation is spent predominantly on NTT and MSM, the drop-and-replacement integration should be fairly simple and reasonably effective.
However, as this is our first potential project where privacy is involved we should, strictly speaking, provide constant-time execution for this. I'm concerned that this might be time-consuming, and especially hard to do with the bucket method MSM algorithm.

Motivation

Aleo are using their version of Marlin to make transactions succinct and (optionally) private. It was reported in our discord that proof of a private transfer takes ~5min 20 seconds on a desktop which can probably be significantly accelerated using icicle.

@DmytroTym DmytroTym added type:feature New feature or request lang:rust labels Dec 1, 2023
@Zack-Xb
Copy link

Zack-Xb commented Dec 22, 2023

Would just like to comment that this will become very important for actually making Aleo transaction execution practical on mobile through delegation. We have been working on a way to make this privacy preserving but if we can delegate to specific machines that are GPU enabled we can really accelerate this computation and bring the value of private self custody to everyone around the world whilst have a great user experience.

@Zack-Xb
Copy link

Zack-Xb commented Dec 22, 2023

Update on desktop we've actually gotten it down to 40 seconds but this is for a simple private transfer, there can be more complex compute and we can still speed up further where this would take a few seconds hopefully.

@omershlo
Copy link
Member

@Zack-Xb what desktop machine you are using? how do you measure latency? is there an Aleo code for that ?

@Zack-Xb
Copy link

Zack-Xb commented Dec 22, 2023

So the update I gave on desktop and the metrics I've given till now are not through delegation but through local execution using aleo's snarkvm rust library with optimizing compilation using profiles in the cargo.toml for performance. We are able to utilize this directly in our app because the core is built with rust.
This is basically the code we utilize for execution https://github.com/AleoHQ/snarkVM/blob/testnet3/synthesizer/src/vm/execute.rs#L26 as mentioned before.

The metrics I provided are from a asus zenbook has 7 cores and from macbook m1 pro was only a few seconds. I have not tested delegating the execution to another machine and have not taken latency issues into account as of yet, but yes of course it will effect.

Transparent delegation code can be done by forming an Authorization object locally, as can be seen here https://github.com/AvailX/documentation/blob/main/proof_of_concepts/proof-delegation/src/authorization.rs in the function authorize prover. And then another machine could run execute authorization as seen in the first link to execute.rs . The goal is to make this privacy preserving by not delegating the whole process to the prover.

@omershlo
Copy link
Member

@Zack-Xb
Copy link

Zack-Xb commented Dec 23, 2023

Aa sorry that's my bad, this is the link I wanted to send https://github.com/AleoHQ/snarkVM/blob/testnet3/synthesizer/src/vm/authorize.rs . The link I sent is some internal work where we are trying to get the transparent delegation to be privacy preserving through doing the first part of the execution locally.

This will should see be public at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants