-
Notifications
You must be signed in to change notification settings - Fork 55
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
added docs to prunned_utreexo module and its submodules #401
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for this! A few comments
06ceb78
to
6ba5ba3
Compare
87dfa8a
to
c82587b
Compare
Thanks for the throughout review @JoseSK999 ! I believe I have resolved every request, if there is any other just let me know and I'll fix it right away. |
The comment on the |
My bad. I will pay more attention in the next PRs and I appreciate your patience. |
c82587b
to
d8653de
Compare
No problem! The CI error is unrelated, could you push again to trigger a new CI run? |
d8653de
to
11bc843
Compare
//! The pruned utreexo module is where the full blockchain logic is handled (validation, state tracking and interfacing). It uses a pruned chain, which does not keep the historical blocks. | ||
//! | ||
//! This module contains the main traits and types for interacting with an utreexo-enabled blockchain. | ||
//! It also provides some utilities for inspecting the utxo set and managing chain state. | ||
//! | ||
//! The key components are: | ||
//! - [BlockchainInterface]: The main interface for interacting with the blockchain | ||
//! - [UpdatableChainstate]: Handles updates to the chain state including blocks and transactions | ||
//! - [ChainStore]: It defines persistence and retrieval of blockchain data |
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.
A final nit, can you do something like this:
//! The pruned utreexo module handles the full blockchain logic: validation, state tracking and
//! interfacing. This blockchain backend does not store the historical blocks, it's pruned.
//!
//! This module file defines the main traits for an utreexo-enabled chain backend:
//!
//! - [BlockchainInterface]: The main interface for interacting with the backend
//! - [UpdatableChainstate]: Trait defining methods for updating the chain state
//! - [ChainStore]: Trait for persisting and retrieving blockchain data (headers, block hashes,
//! the best chain data, and the accumulator)
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.
Concept ACK.
Just some minor things and we should be ready-to-go.
@@ -21,6 +21,9 @@ pub use pruned_utreexo::error::*; | |||
pub use pruned_utreexo::udata::*; | |||
pub use pruned_utreexo::Notification; | |||
|
|||
/// Simple enum representing the network type. | |||
/// | |||
/// Possible values are Bitcoin, Testnet, Regtest, and Signet. | |||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] |
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.
As per the contributing.md:
If you need an attribute, use the attribute before the docstring
Please swap the attributes (this #[derive]) with the comment
//! | ||
//! Key types: | ||
//! - [ChainState]: The high-level chain backend | ||
//! - [ChainStateInner]: Inner `ChainState` type that is guarded by a lock |
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.
This struct doesn't leaks from our API. I'm not sure it should be here?
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.
Yeah
What is the purpose of this pull request?
Which crates are being modified?
Description
I added missing docs to Floresta Chain crate, prunned utreexo module and its submodules to help on #376 .
Notes to the reviewers
I avoided adding the docs for the structs inside each submodule to make it easier for review.
Checklist
just lint
cargo test
Images of differences bellow