Terms and Conditions
- I agree to the Grant Agreement terms if funded
- I agree to Provide KYC information if funded above $50,000 USD
- I agree to disclose conflicts of interest
- I understand that this grant program is only eligible for completed work, as it is a retroactive grant program. Applications for planned or partially completed work will not be considered. All completed work will be verified and accepted by its intended users or their representatives, who will confirm that the outputs meet the required quality, functionality, and usability before the work is listed as an option for Coinholder voting.
- I agree that for any new open-source software, I will create a CONTRIBUTING.md file that reflects the high standards of Zcash development, using the
librustzcashstyle guides as a primary reference. - I understand when contributing to existing Zcash code, I am required to adhere to the project specific contribution guidelines, paying close attention to any merge, branch, pull request, and commit guidelines as exemplified in the librustzcash repository.
- I understand all grants are valued in USD but will be disbursed in Shielded ZEC. I acknowledge and accept that disbursement amounts may fluctuate based on the ZEC/USD exchange rate at the time of payment.
Application Owners (@octocat, @octocat1)
@jiehuo100net
Organization or Individual Name
jiehuo100net — individual Zebra contributor
Additional Team Members
The contribution claimed here is my implementation and validation work recorded under @jiehuo100net in the five linked PRs. Original issue reporters and upstream maintainers retain credit for identifying problems, proposing approaches, reviewing changes, and merging them. AI-assisted development is disclosed in the PRs; OpenAI Codex/Claude code assisted with this application draft. No compensation for other contributors is requested here.
How did you learn about the Lockbox: Coinholder Retroactive Grants Program?
The Zcash Community Forum's Q4 call for proposals.
Requested Grant Amount (USD)
$15,000
Category
Infrastructure
Project Summary
I request $15,000 in retroactive recognition for five merged Zebra fixes that make peer enforcement consistent and node operations more reliable. The completed work addresses connected-peer bans, banned-address reconnection candidates, invalid-block misbehavior scoring, upgrade-aware RPC metadata, and safe handling of administrative block-invalidation errors.
Project Description
A node's reliability depends on how its components behave together. Rejecting an invalid block is only part of the job: the error must produce the intended peer response. Recording a ban is insufficient if another representation of the same address remains connected or eligible for reconnection. An administrative request that cannot safely be performed should return an error without leaving the node unable to continue operating.
My contribution closes these gaps through five changes accepted into upstream Zebra. The work connects policy to runtime behavior: consistent peer identity at the network boundary, complete removal of banned addresses, misbehavior scores that survive verifier error wrapping, correct RPC metadata across network upgrades, and state-preserving rejection of an unsafe invalidation request.
The requested award recognizes these completed outcomes and their regression coverage as a body of infrastructure maintenance. It does not depend on a promise of future development. The beneficiaries are node operators, RPC consumers, and maintainers who need these behaviors to remain dependable as Zebra evolves.
Technical Approach (how you did it)
1. Make peer enforcement work across component boundaries.
In PR #11129, I canonicalized inbound peer addresses immediately after TCP acceptance. On a dual-stack listener, an IPv4 connection can otherwise be represented as IPv4-mapped IPv6 while the ban set uses canonical IPv4. Normalizing at the boundary gives the peer set and per-IP accounting a consistent identity. The PR includes a real-listener regression that bans an already-connected peer and checks that it is removed from routing. It preserves an earlier upstream fix that already rejected banned peers at initial acceptance.
In PR #11173, I fixed address-book removal to inspect every entry for a banned IP. The previous scan assumed same-IP entries were adjacent in reconnection order, which need not be true. The change also excludes banned IPs from reconnection candidates and reduces repetitive rejected-update logging. The regression deliberately separates same-IP entries with an unrelated entry, exercising the actual failure condition.
2. Carry invalid-block decisions through to the intended peer response.
PR #11157 assigns the intended misbehavior score to the duplicate-transaction block error. The block was already rejected; this change fixes the missing score rather than introducing a new consensus rejection rule. Its regression obtains the real duplicate-transaction error and checks the semantic and checkpoint error-wrapping paths used by the syncer. It does not claim to resolve separate inbound-gossip error-routing issues.
3. Keep operator-facing behavior correct across upgrades and failure paths.
PR #11172 makes subsidy metadata use the NU6-or-later condition, rather than an exact NU6 match. The regression covers both sides of the boundary and subsequent upgrades. This corrects labels and specification references; subsidy amounts and consensus accounting were not changed.
PR #11733 rejects invalidation of the only non-finalized chain's root before changing live state or invalidation records. It also handles empty non-finalized state during chain-tip updates, including finalized-tip fallback and tip-mode reset. The PR records state regressions and a real-node RPC integration test showing that a rejected request preserves the best tip and subsequent ordinary invalidate/reconsider operations still succeed. This concerns administrative RPC behavior, not an unauthenticated public P2P crash claim.
The linked PRs document targeted regressions and negative controls that remove the relevant production change to check that the regression fails. These are historical validation records for the submitted revisions; this application does not claim a new full test run against today's main branch.
Time Period of Work Completion
The public PR record spans July 28 to October 16, 2026, from the earliest opening date to the final merge. All five PRs were merged between August 1 and October 16, 2026.
Total Budget (USD)
$0 (no costs claimed; outcome-based award)
Budget Breakdown
The requested $15,000 recognizes five completed and upstream-merged Zebra fixes covering peer enforcement, invalid-block scoring, upgrade-aware RPC metadata, and administrative state handling. The award reflects the engineering depth of these production changes, their targeted regression coverage, and their value to node operators and maintainers.
Previous Funding
No
Previous Funding Details
No response
Other Funding Sources
No
Other Funding Sources Details
No response
Success Metrics
- Five upstream-merged fixes, with public production changes and regression evidence across networking, consensus-error handling, RPC metadata and state operations.
- Peer policy applied consistently: canonical peer identity supports connected-peer bans and per-IP accounting; banned address-book entries are removed regardless of their positions in reconnection order.
- Invalid input receives the intended response: duplicate-transaction errors carry the intended score through the verifier wrappers read by the syncer.
- Operator-facing correctness: subsidy metadata follows the relevant upgrade era, and an unsafe administrative invalidation request returns an ordinary error without destroying the state needed for subsequent operations.
- Regression evidence tied to the bugs: the PRs describe controls in which restoring the faulty behavior makes the relevant tests fail. In #11173, the negative control specifically pins complete address removal; the extra candidate filter is defense in depth, not a separately isolated regression claim.
The value claimed is observable behavior and upstream acceptance. No measured uptime percentage, user count, avoided financial loss, new CVE severity, or maintainer endorsement of the requested amount is claimed.
Proof of completion
- Zebra #11129 — canonical inbound peer addresses, merged August 1, 2026. Production accept-path change, listener regressions and connected-peer ban coverage.
- Zebra #11173 — remove every banned-IP address-book entry, merged August 5, 2026. Noncontiguous-entry regression and reconnection filtering.
- Zebra #11157 — duplicate-transaction misbehavior score, merged September 19, 2026. Error score and verifier-wrapper regression.
- Zebra #11172 — NU6-and-later subsidy metadata, merged August 5, 2026. Upgrade-boundary regression.
- Zebra #11733 — reject invalidating the only non-finalized root, merged October 16, 2026. State-preserving rejection, empty-state handling and real-node RPC regression.
The five merge records were rechecked against GitHub on November 13, 2026. Unmerged PR #11535, the local candidate for issue #11954, and future follow-up work are outside the requested award.
Conflict of Interest Disclosure
I am the applicant and would receive the award. I have not previously received any grants or security rewards. I have no other relevant conflicts of interest to disclose.
Community Forum Posting
- I understand it is my responsibility to post a link to this issue on the Zcash Community Forums after this application has been submitted so the community can give input. I understand this is required in order for the community to discuss and vote on this grant application. Note: If you are unable to post on the forum (for example, due to new user restrictions), please leave a comment below, and we will adjust your posting permissions.