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

added docs to prunned_utreexo module and its submodules #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucad70
Copy link
Contributor

@lucad70 lucad70 commented Mar 6, 2025

What is the purpose of this pull request?

  • Bug fix
  • Documentation update
  • New feature
  • Test
  • Other:

Which crates are being modified?

  • floresta-chain
  • floresta-cli
  • floresta-common
  • floresta-compact-filters
  • floresta-electrum
  • floresta-watch-only
  • floresta-wire
  • floresta
  • florestad
  • Other: .

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

  • I've signed all my commits
  • I ran just lint
  • I ran cargo test
  • I've checked the integration tests
  • I've followed the contribution guidelines
  • I'm linking the issue being fixed by this PR (if any)

Images of differences bellow

Screenshot 2025-03-06 at 12 49 36 Screenshot 2025-03-06 at 12 53 25

@Davidson-Souza Davidson-Souza added documentation Improvements or additions to documentation chore Cleaning, refactoring, reducing complexity code quality Generally improves code readability and maintainability labels Mar 6, 2025
Copy link
Contributor

@JoseSK999 JoseSK999 left a 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

//! The chain state contains both the blocks and blockchain validation logic
//!
//! This module provides the implementation of Bitcoin's consensus rules and chain validation,
//! enabling verification of transactions and blocks. It maintains:
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically this is not correct for the module, the consensus rules for validating transactions and blocks are not here but in consensus.rs.

You should explain here that this module is centered around the ChainState type, which implements BlockchainInterface and UpdatableChainstate, meaning it is a Chain backend for the node, which:

  • Keeps track of the chain state, and uses a ChainStore for persisted storage
  • Updates such state with the help of the consensus functions implemented in consensus.rs
  • Can interface with other components, and provide data about the current view of the chain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out!

@lucad70 lucad70 force-pushed the 376-floresta-chain branch from 06ceb78 to 6ba5ba3 Compare March 8, 2025 14:09
@lucad70 lucad70 force-pushed the 376-floresta-chain branch from 6ba5ba3 to 87dfa8a Compare March 8, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Cleaning, refactoring, reducing complexity code quality Generally improves code readability and maintainability documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants