System Constants
System Constants
All hard-coded constants used across the XE network. These values are consistent between the Go node, web wallet, and explorer.
Proof of work
Constant
Value
Notes
DefaultDifficulty
0xfffff80000000000
~2M attempts, ~1s on single core
TestDifficulty
0x0000000000000002
Near-instant, for tests only
See Proof of Work for algorithm details.
Timing
Constant
Value
Used by
Block timestamp window
±1 hour
Block validation
Vote window
±5 minutes
Vote acceptance
Attestation skew
±10 minutes
Lease attestation validation
Quorum fallback delay
10 seconds
Conflict resolution timeout
Stale conflict sweep
15 seconds
Periodic conflict cleanup
Periodic sync
10 seconds
Frontier sync interval
Sync rate limit
5 seconds per peer
Per-peer sync throttle
Session timeout (wallet)
5 minutes
Auto-lock idle wallet
Poller interval (wallet)
5 seconds
Pending transaction check
Directory TTL
30 minutes
Account directory entry expiry
[!INFO] Timestamp windows The block timestamp window (±1 hour) is intentionally generous to accommodate clock drift between nodes. Votes use a tighter ±5 minute window because representatives are expected to have reasonably synchronized clocks.
Size limits
Protocol limits
Constant
Value
Description
Conflict hashes
10 max
Maximum competing block hashes per conflict
Pending votes per conflict
10 max
Maximum votes tracked per conflict
Attestations per block
20 max
Maximum timekeeper attestations per lease block
Gossip message size
256 KB
Maximum gossip pubsub message
Sync request size
1 MiB
Maximum sync request payload
Sync response size
10 MiB
Maximum sync response payload
Sync total blocks
10,000 per session
Maximum blocks transferred in one sync session
Frontiers per request
10,000
Maximum frontiers in a single request
State chain limits
Constant
Value
Description
State key
128 bytes max
Maximum key length for KV operations
State value
64 KB max
Maximum value size for KV operations
State block
256 KB max
Maximum serialized state chain block
Messaging limits
Constant
Value
Description
Message request
64 KB
Maximum chat message request
Message response
64 KB
Maximum chat message response
Lease economics
[!WARNING] Placeholder values The rates and economic constants below are dummy values for development. Final pricing is pending design review. See Cost Model.
Constant
Value
Description
Min duration
60 seconds
Shortest allowed lease
Max duration
31,536,000 seconds
Longest allowed lease (365 days)
vCPU rate
20 milli-XUSD / hour
Per-vCPU cost
Memory rate
10 milli-XUSD / GB / hour
Per-GB memory cost
Disk rate
1 milli-XUSD / GB / hour
Per-GB disk cost
Stake formula
Cost / 5 (min 1)
Provider stake requirement
XE reward
Same as cost
XE emitted to provider on settlement
[!EXAMPLE] Cost calculation A lease requesting 2 vCPUs, 4 GB memory, 50 GB disk for 24 hours (86400s):
perHourMilli = 2×20 + 4×10 + 50×1 = 130 milli-XUSD/hour hours = 24 costMilli = 130 × 24 = 3120 cost = ceil(3120 / 1000) = 4 XUSD Stake = 4 / 5 = 0 → min 1 = 1 XUSD XE reward = 4 XE
See Cost Model for the full pricing specification.
Performance certificates
Constant
Value
Description
BenchmarkIterations
375,000,000
Sequential SHA-256 hash chain (~60s on mid-range hardware)
MemoryTableSize
8,388,608
Memory table entries (256 MB at 32 bytes each)
MemoryReads
1,000,000
Sequential-dependency random reads from memory table
WorkloadVersion
3
Benchmark algorithm version (increment on changes)
CertificateValidity
7 days
How long a certificate is valid after issuance
See Performance Evaluation for benchmark and scoring details.
Consensus
Constant
Value
Description
Quorum threshold
67%
Voting weight required to confirm/reject
Connection manager low
100 peers
Minimum peer target
Connection manager high
400 peers
Maximum peer target
Connection grace period
1 minute
New connection protection window
Bootstrap retry
10 seconds
Retry interval for bootstrap dial
API
Constant
Value
Description
Rate limit (sustained)
100 req/sec
Per-IP sustained request rate
Rate limit (burst)
500 req
Per-IP burst allowance
Default API port
8080
HTTP API listen port
Default libp2p port
9000
libp2p TCP listen port
Default CORS origin
http://localhost:3000
Allowed CORS origin
See also
- Proof of Work -- difficulty algorithm
- Compute Leasing -- lease lifecycle
- Cost Model -- pricing details
- Consensus -- quorum and voting
- Configuration -- runtime flag defaults