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

parity-secp256k1 relies on a library that is no longer maintained. Should we switch to rust-secp256k1? #1126

Closed
zwong91 opened this issue Dec 23, 2023 · 3 comments

Comments

@zwong91
Copy link

zwong91 commented Dec 23, 2023

Updating crates.io index

error: no matching package named parity-secp256k1 found
location searched: registry crates-io
required by package near-crypto v0.14.0
... which satisfies dependency near-crypto = "^0.14" of package near-sdk v4.1.1
... which satisfies dependency near-sdk = "^4.1.1" of package hello_near v1.0.0 (/workspaces/hello-near)

@Wabinab
Copy link

Wabinab commented Dec 27, 2023

Temporary workaround if one need to use it asap before the team solve this issue:

Add this to your cargo.toml at the end

[patch.crates-io]
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1"}

It'll get the installation of the yanked package directly from github, hence installation proceeds without getting stuck.

For those with cargo.lock created, you could pass --locked to cargo build, one didn't tried but some say it'll work with yanked package. The above strategy more for new project, or if you changed cargo.toml in the meantime...

@zwong91
Copy link
Author

zwong91 commented Jan 6, 2024

[package]
name = "contract"
version = "1.0.0"
authors = ["Near Inc hello@near.org"]
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
near-sdk = "4.1.1"
uint = { version = "0.9.3", default-features = false }

[patch.crates-io]
parity-secp256k1 = {git = "https://github.com/paritytech/rust-secp256k1"}

[profile.release]
codegen-units = 1
opt-level = "z"
lto = true
debug = false
panic = "abort"
overflow-checks = true

[workspace]
members = []

@zwong91 zwong91 closed this as completed Jan 6, 2024
@zwong91
Copy link
Author

zwong91 commented Jan 6, 2024

Your suggestion is very effective, thank you

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

No branches or pull requests

2 participants