-
Notifications
You must be signed in to change notification settings - Fork 39
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
Redesign mithril client api #1332
Conversation
4fd9587
to
a1f5ca9
Compare
/// If not set a default implementation will be used. | ||
pub fn with_immutable_digester( | ||
mut self, | ||
immutable_digester: Arc<dyn ImmutableDigester>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we re-export ImmutableDigester
and it's error chain ?
a1f5ca9
to
96628b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Nice work guys 💪
The majority of the comments are related to fixing typos.
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
mithril-client/examples/snapshot_list_get_show_download_verify.rs
Outdated
Show resolved
Hide resolved
mithril-client/examples/snapshot_list_get_show_download_verify.rs
Outdated
Show resolved
Hide resolved
342795d
to
27fc71f
Compare
@scarmuega, @falcucci this is the PR for the new We also intend to publish it on |
amazing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more comments 👼
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
docs/website/root/manual/developer-docs/nodes/mithril-client-library.md
Outdated
Show resolved
Hide resolved
c3c9d98
to
862eca1
Compare
862eca1
to
863b4c1
Compare
…ient This allow to reduce the number of re-export of `mithril-common` needed since we can now use a `CerticateMessage` as our main certicate type instead of using the `mithril_common::entities::Certificate` full type. Meaning that we don't have to re-export crypto helpers or types anymore ! To do so we define a new `CertificateVerifier` trait that only have a method that validate a chain and implement it with a new `MithrilCertificateVerifier` struct that use internally the verifier from `mithril-common`. As with the `InternalCertificateRetriever` this add some complexity to this specific part but the trade-off for it are worth it (as said before: no crypto type re-export leading to far less mithril-common dependency on the api level).
Using `pub use` instead of `pub type` lead to a better rust-doc since the re-exported type are displayed as 'internal' type instead of alias. + Move all alias to a dedicated mod to cleanup the `lib.rs`.
This simplify the import of those types that are likely the one that will be the most used by third parties. Co-authored-by: Damien Lachaume <dlachaumepalo@users.noreply.github.com>
Fix typos and move `certificate().verify_chain` before `snapshot().download_unpack` in integration test, doc and example.
… 'mithril-client' to 'mithril-client-cli'
- Fix outdated `utils` module documentation. - Add more details on a hack comment. - rename `aggregator_url` to `aggregator_endpoint`. - rename `SnapshotDownloadComplete` mithril event to `SnapshotDownloadCompleted`. - Add a Todo on the verify chain to specify that we want to merge most of its code in the `mithril-common` codebase.
Since the cli won't be used anymore to define the client library.
Typos in dev documentation and lib.rs
Only use the features that we needs
By running 'nix flake update' command.
f6f73d3
to
76347c5
Compare
…/1311/redesign_mithril_client_api Redesign mithril client api
…/1311/redesign_mithril_client_api Redesign mithril client api
Content
This PR add the
mithril-client
library crate, see #1311 for details.Still todo:
Pre-submit checklist
Issue(s)
Relates to #1311