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

Add more sysvar API docs #26849

Merged
merged 19 commits into from
Aug 15, 2022
Merged

Add more sysvar API docs #26849

merged 19 commits into from
Aug 15, 2022

Conversation

brson
Copy link
Contributor

@brson brson commented Jul 29, 2022

Problem

More docs needed.

Summary of Changes

This adds documentation to the sysvar module and its submodules, to the data types and supporting functions associated with each sysvar. It moves the crate-level sysvar docs into the sysvar module.

@mergify mergify bot added the community Community contribution label Jul 29, 2022
@mergify mergify bot requested a review from a team July 29, 2022 19:34
@brson
Copy link
Contributor Author

brson commented Jul 29, 2022

The CI sanity check is tripping on println! invocations in examples that are written correctly. I am willing to change them to msg! but it will not be idiomatic.

@brson
Copy link
Contributor Author

brson commented Jul 29, 2022

I'll think about other ways to present those examples.

@CriesofCarrots
Copy link
Contributor

The CI sanity check is tripping on println! invocations in examples that are written correctly. I am willing to change them to msg! but it will not be idiomatic.

Ah, yeah, our println net is too broad. We ought to allow them in docs. I'll see how tedious that would be to update.

@brson
Copy link
Contributor Author

brson commented Aug 7, 2022

@CriesofCarrots i just removed the printlns from the examples

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Some nits, but generally great work, as always!

sdk/program/src/clock.rs Outdated Show resolved Hide resolved
sdk/program/src/clock.rs Outdated Show resolved Hide resolved
sdk/program/src/clock.rs Outdated Show resolved Hide resolved
sdk/program/src/clock.rs Outdated Show resolved Hide resolved
sdk/program/src/clock.rs Outdated Show resolved Hide resolved
sdk/program/src/rent.rs Outdated Show resolved Hide resolved
sdk/program/src/sysvar/clock.rs Show resolved Hide resolved
sdk/program/src/sysvar/slot_hashes.rs Outdated Show resolved Hide resolved
sdk/program/src/sysvar/slot_history.rs Outdated Show resolved Hide resolved
sdk/program/src/sysvar/slot_history.rs Outdated Show resolved Hide resolved
@brson
Copy link
Contributor Author

brson commented Aug 15, 2022

Great reviews, thanks.

@brson
Copy link
Contributor Author

brson commented Aug 15, 2022

CI failure is a rustsec advisory unrelated to this patch.

brson and others added 19 commits August 15, 2022 10:53
CriesofCarrots
CriesofCarrots previously approved these changes Aug 15, 2022
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Lgtm, thank you!
I'm going to rebase on master to pick up the audit fix and make sure we get through checks

@mergify mergify bot dismissed CriesofCarrots’s stale review August 15, 2022 16:54

Pull request has been modified.

@CriesofCarrots CriesofCarrots merged commit b6762fc into solana-labs:master Aug 15, 2022
xiangzhu70 pushed a commit to xiangzhu70/solana that referenced this pull request Aug 17, 2022
* Add more sysvar API docs

* Remove println from examples

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/clock.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Fix docs for ACCOUNT_STORAGE_OVERHEAD

* Update sdk/program/src/epoch_schedule.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/sysvar/slot_hashes.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/sysvar/slot_history.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/sysvar/slot_history.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Update sdk/program/src/sysvar/mod.rs

Co-authored-by: Tyera Eulberg <[email protected]>

* Fix docs for DEFAULT_LEADER_SCHEDULE_SLOT_OFFSET

* Fix recent_blockhash short description

* Fix whitespace

Co-authored-by: Tyera Eulberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants