Repository navigation
feat: expose GetStandardFee (upstream v0.6.0); bump to 0.5.0 - #8
Merged
Merged
Conversation
299805c Release lightwallet-protocol v0.6.0 2a80ce8 Merge pull request #34 from dorianvp/feat/expose-getstandardfee-over-grpc f449ee8 Add `GetStandardFee` gRPC exposing the backend `getstandardfee` RPC 12b8925 Merge pull request #28 from zcash/feature/add-integration-tests 13a5ac0 Merge pull request #31 from zcash/release/v0.5.0 73a8ce8 buf breaking: pin baseline subdir to walletrpc baae8e3 Fix proto-validation CI: lint exceptions, plugin URL, toolchain bumps c4c0b78 Add proto-validation CI: buf lint/breaking + per-language codegen git-subtree-dir: lightwallet-protocol git-subtree-split: 299805c19011a027d2c48c5e912dd05041f76156
The field was removed (reserved) in the upstream v0.5.0 protos when the Ironwood bindings were regenerated in 0.4.0; the test still constructed the removed field, so cargo test failed to compile on main.
Subtree-pull zcash/lightwallet-protocol v0.6.0 into lightwallet-protocol/
and regenerate the tonic/prost bindings. Upstream v0.6.0 adds exactly:
- service.StandardFee { feeZat, estimatorVersion }
- rpc GetStandardFee(Empty) returns (StandardFee)
CompactTxStreamerClient gains get_standard_fee; the server trait and
router gain the corresponding method and route. Additive change, so the
crate bumps to 0.5.0. Makefile/README now pin upstream v0.6.0.
The changelog filed GetStandardFee only under Added, which reads as a purely additive change. It is additive for users of CompactTxStreamerClient, but the generated CompactTxStreamer server trait gains get_standard_fee as a required method with no default body. Every existing implementation of that trait fails to compile against 0.5.0 with E0046 until it adds the method. This change adds a Changed entry that names the break, states what an implementor must do, and says what an implementation returns when its backend lacks the getstandardfee JSON-RPC. The 0.4.0 to 0.5.0 version bump already permits the break under Cargo's semver rules, so the manifest needs no change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The crate's release notes were hand-written into lightwallet-protocol/CHANGELOG.md, which is upstream's file and arrives through git subtree. Upstream places each new release section directly under the preamble, exactly where the crate's Unreleased section sat, so the next `make update-proto` would have met a merge conflict there. A three-way merge of a hypothetical upstream v0.7.0 section against the edited file reproduces the conflict. This change gives the crate its own CHANGELOG.md at the repository root and moves the Added and Changed entries into it without rewording them. It restores the vendored changelog to the text of upstream v0.6.0, so the subtree prefix again holds only what upstream ships. The new file's preamble points readers to the vendored changelog for protocol changes and says that file must not be edited here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Cargo.toml on this branch declares version 0.5.0, but the changelog held the release's only entries under Unreleased. This repository has no separate release step that would rename the heading: the 0.4.0 bump rode in its feature commit, and the version was published from there. Publishing 0.5.0 the same way would have shipped a changelog that calls the release unreleased. This change moves the Added and Changed entries under a 0.5.0 heading dated 2026-11-11 and leaves an empty Unreleased section above it for the next change. The date is the day of this commit; correct it if the crate is published on a later day. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The README's dependency snippet still read `lightwallet-protocol = "0.4.0"` after the bump to 0.5.0. Cargo treats that requirement as ^0.4.0, which excludes 0.5.0, so a user who copied the snippet would have resolved the previous release and found neither get_standard_fee nor StandardFee. This change updates the snippet to 0.5.0, the version Cargo.toml declares on this branch. The 0.4.0 release missed the same line and needed a follow-up commit, 486bedd, to correct it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Makefile's usage comment and the README both gave `UPSTREAM_VERSION=v0.4.2` as the example of an upgrade to a new upstream tag. The example was written when the pin was v0.4.1. The pin is now v0.6.0, and upstream never published a v0.4.2 tag, so the documented command asks `git subtree pull` for a ref that does not exist. This change writes the example as `vX.Y.Z` in both places. A concrete next version would go stale again at the following bump, and a placeholder does not. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The v0.6.0 subtree pull vendors upstream's proto-validation workflow and its buf.yaml under lightwallet-protocol/. GitHub runs workflows only from the repository root, so the workflow never runs here, and nothing in this crate reads buf.yaml. Cargo.toml had no include or exclude key, so `cargo publish` would have shipped both files in the 0.5.0 package. This change adds an exclude list that names the vendored .github directory and buf.yaml. The files stay in the repository, so future subtree pulls still merge cleanly. The two .proto files stay in the package, because build.rs reads them under the rebuild-proto feature. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The tests on main stopped compiling when the v0.5.0 protos removed CompactBlock.proto_version, and nobody noticed until a person ran them, because the repository had no CI. Nothing exercised the new StandardFee message either, so stale or mismatched generated bindings would have passed unseen. This change adds a test that pins the wire encoding of StandardFee and decodes it back. The expected bytes carry field 1 as the varint 5000 and field 2 as the varint 1, so a changed tag or type in the generated code fails the test. The test returns the decode error with `?` and holds no unwrap or expect. It also adds a CI workflow that runs on every pull request and on pushes to main. The first job runs `cargo check --all-targets` and `cargo nextest run`, which catches the breakage main carried. The second job regenerates the bindings from the vendored protos with the protoc release that produced them and fails when src/generated differs from what is committed. Cargo.toml now excludes the root .github directory from the package, so the workflow does not ship to crates.io. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
What
This pull request adds
rpc GetStandardFee(Empty) returns (StandardFee)to the crate.StandardFeehas two fields,feeZatandestimatorVersion. The rpc exposes thegetstandardfeeJSON-RPC of the backend to light clients. The crate version changes from0.4.0to0.5.0.Breaking change for server implementors
The change is additive for users of
CompactTxStreamerClient. It is breaking for implementors of the server trait. The generatedCompactTxStreamertrait has a new required method,get_standard_fee, with no default body. Each implementation of the trait must add the method before it compiles against0.5.0. An implementation returnstonic::Status::unimplementedwhen its backend does not havegetstandardfee.How
A
git subtree pullbrings in upstream v0.6.0. The only proto change betweenv0.5.0andv0.6.0is this rpc. The commandcargo build --features rebuild-protoregenerated the bindings. The Makefile and the README now pinv0.6.0.The pull of the full tag also brought the
buf.yamlfile and the CI workflow of upstream into the subtree. These files do nothing in this repository. They stay in the repository, so that future subtree pulls merge without conflicts.Cargo.tomlnow excludes them from the published package (525c9fb).Changelog
The crate now has its own
CHANGELOG.mdat the repository root (cda89ef). The file holds the entries for0.5.0, dated 2026-11-11 (12d9718). The entries include aChangedentry for the breaking change (f555581). The vendoredlightwallet-protocol/CHANGELOG.mdis again identical to the upstream file. Do not edit the vendored file, because a local edit causes a conflict on the next subtree pull.Documentation
The usage snippet in the README now names
0.5.0(28f3bcf). The upgrade example in the README and in the Makefile now uses the placeholdervX.Y.Z(393eae5). The old example namedv0.4.2, which is not an upstream tag.Tests and CI
The tests did not compile on
main. One test setCompactBlock.proto_version, which thev0.5.0protos removed. Commitefda067removes that field from the test.Commit
4374443adds a test and a CI workflow.standard_fee_keeps_its_wire_encodingpins the wire bytes ofStandardFeeand decodes them again.check and testrunscargo check --all-targetsandcargo nextest run.generated bindings are currentregenerates the bindings with protoc 36.1. The job fails ifsrc/generatedis different from the committed file.The workflow runs on each pull request and on each push to
main. The two jobs are required checks in the branch protection ofmain.Both CI jobs pass on this branch. The 4 tests pass.
Release
The version
0.5.0is not yet on crates.io. The README snippet resolves only after the crate is published. Correct the changelog date if the publication is on a later day.🤖 Generated with Claude Code