From 2f6720bb336edfd28280050e6da71a1f7aebc05a Mon Sep 17 00:00:00 2001 From: Sanjit Bhat Date: Mon, 23 Dec 2024 10:48:21 -0500 Subject: [PATCH] comments --- kt/client.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kt/client.go b/kt/client.go index cdff74e..5300885 100644 --- a/kt/client.go +++ b/kt/client.go @@ -19,8 +19,7 @@ type Client struct { nextEpoch uint64 } -// ClientErr abstracts errors in the KT client. -// maybe there's an error. if so, maybe there's irrefutable evidence. +// ClientErr abstracts errors that potentially have irrefutable evidence. type ClientErr struct { Evid *Evid Err bool @@ -104,6 +103,11 @@ func (c *Client) Put(pk []byte) (uint64, *ClientErr) { if err1.Err { return 0, err1 } + // TODO: might be able to use same <= freshness check as Get / SelfMon. + // = case with two puts is mathematically ruled out: + // e.g., first put: [M v1; NM v2]. second put: [M v2; NM v3]. + // altho maybe selfmon wouldn't work bc can no longer say "up thru + // this epoch". the latest epoch might change, as per the put allowance. if dig.Epoch < c.nextEpoch { return 0, stdErr }