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

Build Error due to conflicting versions of two_party_ecdsa crate #93

Open
Sajjad-Khoshdooni opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Sajjad-Khoshdooni
Copy link

Sajjad-Khoshdooni commented Apr 8, 2024

Description:
I encountered the above build error while working on the project. It seems to be caused by conflicting versions of the two_party_ecdsa crate. Specifically, the error suggests that there are two different versions of the crate being used, resulting in incompatible trait signatures for methods insert and get.

Error:

error[E0053]: method `insert` has an incompatible type for trait
  --> gotham-server/src/public_gotham.rs:56:1
   |
56 | #[async_trait]
   | ^^^^^^^^^^^^^^ expected trait `two_party_ecdsa::party_one::Value`, found a different trait `two_party_ecdsa::party_one::Value`
   |
   = note: expected signature `fn(&'life0 PublicGotham, &'life1 gotham_engine::types::DbIndex, &'life2 (dyn gotham_engine::traits::MPCStruct + 'life2), &'life3 (dyn two_party_ecdsa::party_one::Value + 'static)) -> Pin<_>`
              found signature `fn(&'life0 PublicGotham, &'life1 gotham_engine::types::DbIndex, &'life2 (dyn gotham_engine::traits::MPCStruct + 'life2), &'life3 (dyn two_party_ecdsa::party_one::Value + 'static)) -> Pin<_>`
   = note: perhaps two different versions of crate `two_party_ecdsa` are being used?

error[E0053]: method `get` has an incompatible type for trait
  --> gotham-server/src/public_gotham.rs:56:1
   |
56 | #[async_trait]
   | ^^^^^^^^^^^^^^ expected trait `two_party_ecdsa::party_one::Value`, found a different trait `two_party_ecdsa::party_one::Value`
   |
   = note: expected signature `fn(&'life0 PublicGotham, &'life1 gotham_engine::types::DbIndex, &'life2 (dyn gotham_engine::traits::MPCStruct + 'life2)) -> Pin<Box<(dyn std::future::Future<Output = Result<std::option::Option<Box<(dyn two_party_ecdsa::party_one::Value + 'static)>>, gotham_engine::types::DatabaseError>> + std::marker::Send + 'async_trait)>>`
              found signature `fn(&'life0 PublicGotham, &'life1 gotham_engine::types::DbIndex, &'life2 (dyn gotham_engine::traits::MPCStruct + 'life2)) -> Pin<Box<(dyn std::future::Future<Output = Result<std::option::Option<Box<(dyn two_party_ecdsa::party_one::Value + 'static)>>, gotham_engine::types::DatabaseError>> + std::marker::Send + 'async_trait)>>`
   = note: perhaps two different versions of crate `two_party_ecdsa` are being used?

Environment:
rustc 1.75.0

@Sajjad-Khoshdooni Sajjad-Khoshdooni added bug Something isn't working enhancement New feature or request labels Apr 8, 2024
@auronvila
Copy link

Hey I am having the same build error in my server.

@Anuj-Dhiman
Copy link

I had faced the same issue. this is because gotham-city has two-party-ecdsa and gotham-engine also uses the same repo but picking up latest one - main branch. I have fixed it by replacing bellow packages in main Cargo.toml

two-party-ecdsa = { git = "https://github.com/ZenGo-X/two-party-ecdsa.git", branch="compatibility_gotham_engine" }
gotham-engine = { git = "https://github.com/ZenGo-X/gotham-engine.git", rev="6bdfa4fb302d4e089ac24e488c3ca41c6e35c23c" }

Let me know if still you have issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants