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

Replace circuits gen with runtime download from zeto releases #133

Merged
merged 9 commits into from
Sep 6, 2024

Conversation

jimthematrix
Copy link
Contributor

No description provided.

Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
@@ -267,3 +267,5 @@ require (
)

replace github.com/kaleido-io/paladin/toolkit => ../../toolkit/go

replace github.com/iden3/go-iden3-crypto => github.com/kaleido-io/go-iden3-crypto v0.0.0-20240905154504-333f60687c26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we forked this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep this is temporary, until iden3/go-iden3-crypto#66 is merged (the maintainer of the project has been contacted, who is on vacation this week but has promised to take a look soon)

args 'run', 'gen'
args '--', '-c', 'anon'
workingDir "${rootDir}/zeto/zkp/circuits"
task extractZetoProver(type: Exec, dependsOn: [downloadZetoProver]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gradle actually lets you extract tars using a Copy task and a tarTree: https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api/-project/tar-tree.html

Would recommend this rather than trying to run tar directly, which may not be available on every OS.

mkdir(f.parent)
new URL(url).withInputStream{ i -> f.withOutputStream{ it << i }}
f.setExecutable(true)
mkdir(zkpOut)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like this dir needs to be created here

Copy link
Contributor Author

@jimthematrix jimthematrix Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I tried to keep it in the doFirst{} section of the task that needs it, because the task has a workdingDir that needs to be set to it, it seems this dir must exist prior to even doFirst. I otherwise get a "dir not exist" error.

But maybe using the Copy task this can be done in the doFirst{} block. will try that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok it looks like the Copy task with tarTree creates target dir automatically 👍

Signed-off-by: Jim Zhang <jim.zhang@kaleido.io>
@jimthematrix jimthematrix merged commit 409be6f into main Sep 6, 2024
2 checks passed
@jimthematrix jimthematrix deleted the build-zeto branch September 6, 2024 12:15
awrichar pushed a commit that referenced this pull request Sep 13, 2024
Replace circuits gen with runtime download from zeto releases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants