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

[Feature Request] Remove patch for Merlin (Patched Merlin dependency needed for Rust SDK users) #9340

Open
gregnazario opened this issue Jul 27, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@gregnazario
Copy link
Contributor

gregnazario commented Jul 27, 2023

🚀 Feature Request

Push upstream patch for Merlin, so users of the Rust SDK don't have to patch it locally.

DO NOT CLOSE

Details

Anyone who has this error, will need to apply the patches for Merlin:

error[E0597]: `dst` does not live long enough
   --> /aptos/aptos-core/aptos-move/framework/src/natives/cryptography/bulletproofs.rs:195:41
    |
174 |     dst: Vec<u8>,
    |     --- binding `dst` declared here
...
195 |     let mut ver_trans = Transcript::new(dst.as_slice());
    |                         ----------------^^^^-
    |                         |               |
    |                         |               borrowed value does not live long enough
    |                         argument requires that `dst` is borrowed for `'static`
...
208 | }
    | - `dst` dropped here while still borrowed

They can add the patch for the aptos-sdk by adding to their Cargo.toml, which removes the error:

[patch.crates-io]
merlin = { git = "https://github.com/aptos-labs/merlin" }

Rust doesn't let you apply a patch globally, so every user has to apply the patch. The maintainers of Merlin have been unresponsive on Github, Twitter. The patch is already ready here: zkcrypto/merlin#6, but we have to maintain our own patch. @alinush had a previous conversation about it, and we should be able to get it in, but we're blocked on that.

Documentation added here: #9324

Blocked on: zkcrypto/merlin#6

Additional user details here: #9377

@gregnazario
Copy link
Contributor Author

Fix is here, but author is unresponsive zkcrypto/merlin#6

@gregnazario gregnazario added the stale-exempt Prevents issues from being automatically marked and closed as stale label Aug 7, 2023
@sausagee sausagee moved this from 🎉 New to ❌ Blocked in Developer Experience Aug 23, 2023
@gregnazario gregnazario changed the title [Feature Request] Remove patch for Merlin [Feature Request] Remove patch for Merlin (Patched Merlin dependency needed for Rust SDK users) Nov 13, 2023
@gregnazario
Copy link
Contributor Author

I've got access to Bluesky now, which both contributors to the Merlin repository seem to use. So, I'm reaching out to them again about it.

@gregnazario
Copy link
Contributor Author

Pinged both contributors on Bluesky again. Waiting on a response still.

@Tranduy1dol
Copy link

can anyone write a more detail to fix this, i applied [patch.crates-io] merlin = { git = "https://github.com/aptos-labs/merlin" } but it still error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Status: ❌ Blocked
Development

No branches or pull requests

3 participants