Skip to content

Commit a3d576a

Browse files
committed
docs(validitywindow)
1 parent 1819aad commit a3d576a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

internal/validitywindow/validitywindow.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,18 @@ type Interface[T emap.Item] interface {
6262
// 1. Included - The item is currently tracked within validity window
6363
// 2. Expired - The item has passed its expiry time and is automatically removed
6464
// from tracking. Once expired, an item is considered invalid for its original
65-
// purpose, but this expiration also means it could potentially be included
66-
// again in a new transaction.
65+
// purpose. After the validity window period elapses, the item's ID is
66+
// removed from the TimeValidityWindow tracking map (seen emap.EMap) through
67+
// the SetMin method. This removal means that while the original transaction
68+
// remains cryptographically unique and cannot be replayed, a completely new
69+
// transaction could potentially reuse the same identifier space once the ID
70+
// is no longer tracked by the validity window.
6771
//
6872
// TimeValidityWindow builds on an assumption of ChainIndex being up to date to populate TimeValidityWindow state.
69-
// This means ChainIndex must provide access to all blocks within the validity window (both in-memory and saved on-disk),
70-
// as missing blocks would create gaps in transaction history that could allow replay attacks and state inconsistencies.
73+
// This means ChainIndex must provide access to all blocks within the validity window
74+
// (both in-memory and saved on-disk),
75+
// as missing blocks would create gaps in transaction history
76+
// that could allow replay attacks and state inconsistencies.
7177
type TimeValidityWindow[T emap.Item] struct {
7278
log logging.Logger
7379
tracer trace.Tracer

0 commit comments

Comments
 (0)