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

Documentation improvement for runtime #400

Merged
merged 33 commits into from
May 15, 2024
Merged

Conversation

open-junius
Copy link
Contributor

@open-junius open-junius commented May 8, 2024

Description

The pr add all missed doc for all crates. make sure the compilation is successful with the check of #[deny(missing_docs)]

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

No

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

The pr will fix #304

@open-junius open-junius self-assigned this May 8, 2024
@open-junius open-junius added documentation Improvements or additions to documentation in progress blue team defensive programming, CI, etc labels May 8, 2024
@open-junius open-junius marked this pull request as ready for review May 13, 2024 15:24
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/lib.rs Outdated Show resolved Hide resolved
pallets/subtensor/src/serving.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@camfairchild camfairchild left a comment

Choose a reason for hiding this comment

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

Partial review. Needs some changes in the first file.

pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
pallets/admin-utils/src/lib.rs Outdated Show resolved Hide resolved
@@ -624,6 +710,9 @@ pub mod pallet {
Ok(())
}

/// The extrinsic sets the network rate limit for the network.
/// It is only callable by the root account.
/// The extrinsic will call the Subtensor pallet to set the network rate limit.
Copy link
Contributor

Choose a reason for hiding this comment

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

Some docstrings say "for the network" and others "for the subnet". We should clarify how "for the network" differs from "for the subnet", and also clarify "for the network" if root account still synonymous with the subnet owner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about we use "for the network" if there is no netuid in the parameter. and "for the subnet" with specific netuid.

Copy link
Contributor

@rajkaramchedu rajkaramchedu May 14, 2024

Choose a reason for hiding this comment

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

But first, what does "for the network" mean here? What is it referring to? Normally these things refer to subnets but I guess that's not it? I am not getting the meaning of "network rate limit for the network" here. Also it now says "callable by the root account"... I am not getting this either. Root account is doing what here? When we know that, we can tweak the wording then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the network is subtensor blockchain in the context. I think subnet is separate network, they are connected by its own connection method. but sutnet's validators are also playing important role in subtensor blockchain.
I think we need the terminology for our blockchain, the whole system including chain and all subnets.
The root account is a special account in substrate based chain, it can call any function and we can set the different privilege for normal account and root account. At the beginning of blockchain launch, it is a special real account. Later, it is from governance.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, often "network" is used to refer to the entire blockchain network collectively, so "all of finney" for example

Copy link
Contributor

@sam0x17 sam0x17 left a comment

Choose a reason for hiding this comment

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

looks good once any pending tweaks are added 👍🏻

@open-junius open-junius merged commit ed84d0d into development May 15, 2024
8 checks passed
@open-junius open-junius deleted the junius/doc-improvement branch May 15, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blue team defensive programming, CI, etc documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deny missing docs on public items
6 participants