docs(zebra-rpc): clarify z_gettreestate fields hold raw bytes, hex only in JSON - #11231
Open
natalieesk wants to merge 1 commit into
Open
docs(zebra-rpc): clarify z_gettreestate fields hold raw bytes, hex only in JSON#11231natalieesk wants to merge 1 commit into
natalieesk wants to merge 1 commit into
Conversation
|
Note Complete: Audit complete. No review-worthy issues remain after automatic triage. Five findings were auto-invalidated. Open the full results here. Analyzed one file, diff |
Contributor
Merge Protections🟠 1 of 1 protections blocking · waiting on 🕒 schedule
🟠 ❄️ 6.3.0 release [Scheduled Freeze]Waiting for
This freeze has no end date and must be removed manually.A freeze on the repository is scheduled for the following reason: 6.3.0 release
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9847.
Commitments::final_rootandfinal_stateareOption<Vec<u8>>holding raw bytes; they are hex-encoded only when the struct is serialized to JSON (viaserde_as/serde_with::hex). The doc comments described the Rust fields themselves as "hex-encoded", which misled downstream consumers reading the fields/getters directly (e.g. zingolabs/zaino#495).What changed
Doc comments only in
zebra-rpc/src/methods/trees.rs. Reworded the misleading "hex-encoded" descriptions to state that the Rust fields hold raw bytes and are hex-encoded only on JSON serialization. Applied across the same-file structs that share the pattern (the issue asked to examine them):Commitments(+finalRoot/finalState),Treestate::commitments, andGetTreestateResponse(hash,sprout,sapling,orchard,ironwood). No code/behavior change.Testing
cargo doc -p zebra-rpc --no-deps --document-private-itemsbuilds clean (no new warnings; the pre-existinglong_poll.rsprivate-item link note is unrelated and present onmain).cargo fmtclean.AI Disclosure
Claude (Claude Code) made these documentation changes.