Skip to content

feat: expose GetStandardFee (upstream v0.6.0); bump to 0.5.0 - #8

Merged
zancas merged 11 commits into
mainfrom
get-standard-fee
Nov 12, 2026
Merged

zancas merged 11 commits into
mainfrom
get-standard-fee

Conversation

@dorianvp

@dorianvp dorianvp commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

What

This pull request adds rpc GetStandardFee(Empty) returns (StandardFee) to the crate. StandardFee has two fields, feeZat and estimatorVersion. The rpc exposes the getstandardfee JSON-RPC of the backend to light clients. The crate version changes from 0.4.0 to 0.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 generated CompactTxStreamer trait has a new required method, get_standard_fee, with no default body. Each implementation of the trait must add the method before it compiles against 0.5.0. An implementation returns tonic::Status::unimplemented when its backend does not have getstandardfee.

How

A git subtree pull brings in upstream v0.6.0. The only proto change between v0.5.0 and v0.6.0 is this rpc. The command cargo build --features rebuild-proto regenerated the bindings. The Makefile and the README now pin v0.6.0.

The pull of the full tag also brought the buf.yaml file 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.toml now excludes them from the published package (525c9fb).

Changelog

The crate now has its own CHANGELOG.md at the repository root (cda89ef). The file holds the entries for 0.5.0, dated 2026-11-11 (12d9718). The entries include a Changed entry for the breaking change (f555581). The vendored lightwallet-protocol/CHANGELOG.md is 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 placeholder vX.Y.Z (393eae5). The old example named v0.4.2, which is not an upstream tag.

Tests and CI

The tests did not compile on main. One test set CompactBlock.proto_version, which the v0.5.0 protos removed. Commit efda067 removes that field from the test.

Commit 4374443 adds a test and a CI workflow.

  • The test standard_fee_keeps_its_wire_encoding pins the wire bytes of StandardFee and decodes them again.
  • The job check and test runs cargo check --all-targets and cargo nextest run.
  • The job generated bindings are current regenerates the bindings with protoc 36.1. The job fails if src/generated is 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 of main.

Both CI jobs pass on this branch. The 4 tests pass.

Release

The version 0.5.0 is 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

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.
zancas and others added 7 commits November 11, 2026 17:52
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>
@zancas
zancas merged commit 5541975 into main Nov 12, 2026
2 checks passed
@dorianvp
dorianvp deleted the get-standard-fee branch November 12, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants