Skip to content

Mithril Client verify multi signature #166

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

Merged
merged 4 commits into from
May 4, 2022

Conversation

jpraynaud
Copy link
Member

This PR provides a multi signature verifier for the Mithril Client

Closes #147

@jpraynaud jpraynaud force-pushed the jpraynaud/147-client-verify-multi-signature branch from 05a151b to 2e5bd62 Compare May 4, 2022 09:31
@github-actions
Copy link

github-actions bot commented May 4, 2022

test-results-mithril-client

  1 files  ±  0    1 suites  ±0   0s ⏱️ ±0s
26 tests +10  26 ✔️ +10  0 💤 ±0  0 ±0 

Results for commit 971e4b5. ± Comparison against base commit ee05bd6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 4, 2022

test-results-mithril-aggregator

  1 files  ±0    3 suites  ±0   1s ⏱️ ±0s
26 tests ±0  26 ✔️ ±0  0 💤 ±0  0 ±0 
35 runs  ±0  35 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 971e4b5. ± Comparison against base commit ee05bd6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 4, 2022

test-results-mithril-signer

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 971e4b5. ± Comparison against base commit ee05bd6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 4, 2022

test-results-mithril-core

  2 files  ±0    4 suites  ±0   13m 6s ⏱️ + 2m 35s
35 tests ±0  35 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 971e4b5. ± Comparison against base commit ee05bd6.

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud requested review from Alenar, a user and ghubertpalo May 4, 2022 14:33
@jpraynaud jpraynaud force-pushed the jpraynaud/147-client-verify-multi-signature branch from 2e5fe8d to 2f3f1fc Compare May 4, 2022 14:34
jpraynaud added 3 commits May 4, 2022 16:37
AggregatorHandler needs to be able to get certificate details from the Aggregator
* First version of the multi signature Verifier
* Update Cargo.toml dependencies
* Update entities with new type aliases
* Prefer trait object implementation vs generic
* Add new Verifier dependency
* Add missing tests for restore snapshot
* Cleaned client code for more readability
* Remove errors module
@jpraynaud jpraynaud force-pushed the jpraynaud/147-client-verify-multi-signature branch from 2f3f1fc to 338b079 Compare May 4, 2022 14:46
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

It's great to see this taking shape, TBH I did not review it in full details as this is a lot of code :(


#[dev-dependencies]
rand_core = "0.6.3"
Copy link

Choose a reason for hiding this comment

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

Why do we need the client to be aware of these? Couldn't we reexport types from the mithril-core library?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, reexport sounds like a very good option 🤔


use crate::entities::*;

#[cfg(test)]
use mockall::automock;

#[derive(Error, Debug)]
pub enum AggregatorHandlerError {
Copy link

Choose a reason for hiding this comment

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

👌

}
}

/// Unpack snapshot
async fn unpack_snapshot(&self, digest: &str) -> Result<String, String> {
async fn unpack_snapshot(&self, digest: &str) -> Result<String, AggregatorHandlerError> {
Copy link

Choose a reason for hiding this comment

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

This seems to beg for a general utility to handle snapshot files for both packing and unpacking

Copy link
Member Author

Choose a reason for hiding this comment

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

Absolutely, we definitely need to work shortly on a mithril-common library for all the general utilities such as the snapshotter 👍

@jpraynaud jpraynaud force-pushed the jpraynaud/147-client-verify-multi-signature branch from 338b079 to 971e4b5 Compare May 4, 2022 17:23
@jpraynaud jpraynaud merged commit cac8341 into main May 4, 2022
@jpraynaud jpraynaud deleted the jpraynaud/147-client-verify-multi-signature branch May 4, 2022 17:40
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.

Mithril Client validates a multi signature
1 participant