docs(pong): document zero-value contract for Property.ends, Peer.expires, Pong.expires#40
Open
VasilevNStas wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@davvd plz review |
Member
|
@VasilevNStas we have merge conflicts here, please resolve them and we'll merge |
…res, Pong.expires Lease.ends already documents that 0 means free tier, but the three sibling timestamp fields shared the same uint64 type without a zero-value contract. A client evaluating expires < now would see 0 < now == true for any unpopulated field and treat a perfectly live Node/Peer/slot as permanently expired/deleted. Add 'Zero means ...' to each field comment so implementers know the sentinel is safe to test for.
VasilevNStas
force-pushed
the
8-docs/zero-value-contracts
branch
from
July 4, 2026 18:07
6dd87f5 to
c172350
Compare
Contributor
Author
|
@davvd conflicts resolved. |
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.
Description
Documents the zero-value contract for three uint64 timestamp fields in pong.proto. No wire changes.
Problem
Lease.ends(line 16) explicitly documents thatends == 0means "free tier", butProperty.ends,Peer.expiresandPong.expires(all uint64) say nothing about zero.A client evaluating
expires < nowto decide on migration will always find0 < now == truefor any unpopulated field — making a perfectly live Node/Peer look permanently decommissioned and a country slot appear expired at Unix epoch.Changes
Property.endsPeer.expiresPong.expiresCloses #8