All Implemented Interfaces:
Serializable, DataStructure

public class Lease2extends Lease
Implementation of Lease2 as specified in Proposal 123: New NetDb Entries.

Lease2 extends the original Lease format with enhanced timestamp resolution:

  • Uses 4-byte timestamps instead of 8-byte for space efficiency
  • Timestamps have 1-second resolution (stored as seconds since epoch)
  • Fixed length of 40 bytes for consistent serialization
  • Designed for use with LeaseSet2 and its variants

Structure:

  • Gateway: 32-byte Hash of the gateway router
  • Tunnel ID: 4-byte tunnel identifier
  • End Time: 4-byte timestamp (seconds since epoch)

Key Differences from Lease:

  • Timestamp resolution: 4 bytes vs 8 bytes in original Lease
  • Time representation: Seconds vs milliseconds
  • Fixed total length: 40 bytes
  • Optimized for LeaseSet2 serialization format

Usage:

  • Used within LeaseSet2, MetaLeaseSet, and EncryptedLeaseSet
  • Provides more compact representation for large numbers of leases
  • Maintains compatibility with existing tunnel infrastructure

Implementation Status: PRELIMINARY - Subject to change as the proposal evolves.

See Also: