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

ConstantValueNotes
DefaultDifficulty0xfffff80000000000~2M attempts, ~1s on single core
TestDifficulty0x0000000000000002Near-instant, for tests only

See Proof of Work for algorithm details.

#Timing

ConstantValueUsed by
Block timestamp window±1 hourBlock validation
Vote window±5 minutesVote acceptance
Attestation skew±10 minutesLease attestation validation
Quorum fallback delay10 secondsConflict resolution timeout
Stale conflict sweep15 secondsPeriodic conflict cleanup
Periodic sync10 secondsFrontier sync interval
Sync rate limit5 seconds per peerPer-peer sync throttle
Session timeout (wallet)5 minutesAuto-lock idle wallet
Poller interval (wallet)5 secondsPending transaction check
Directory TTL30 minutesAccount directory entry expiry

#Size limits

#Protocol limits

ConstantValueDescription
Conflict hashes10 maxMaximum competing block hashes per conflict
Pending votes per conflict10 maxMaximum votes tracked per conflict
Attestations per block20 maxMaximum timekeeper attestations per lease block
Gossip message size256 KBMaximum gossip pubsub message
Sync request size1 MiBMaximum sync request payload
Sync response size10 MiBMaximum sync response payload
Sync total blocks10,000 per sessionMaximum blocks transferred in one sync session
Frontiers per request10,000Maximum frontiers in a single request

#State chain limits

ConstantValueDescription
State key128 bytes maxMaximum key length for KV operations
State value64 KB maxMaximum value size for KV operations
State block256 KB maxMaximum serialized state chain block

#Messaging limits

ConstantValueDescription
Message request64 KBMaximum chat message request
Message response64 KBMaximum chat message response

#Lease economics

ConstantValueDescription
Min duration60 secondsShortest allowed lease
Max duration31,536,000 secondsLongest allowed lease (365 days)
vCPU rate20 milli-XUSD / hourPer-vCPU cost
Memory rate10 milli-XUSD / GB / hourPer-GB memory cost
Disk rate1 milli-XUSD / GB / hourPer-GB disk cost
Stake formulaCost / 5 (min 1)Provider stake requirement
XE rewardSame as costXE emitted to provider on settlement

See Cost Model for the full pricing specification.

#Performance certificates

ConstantValueDescription
BenchmarkIterations375,000,000Sequential SHA-256 hash chain (~60s on mid-range hardware)
MemoryTableSize8,388,608Memory table entries (256 MB at 32 bytes each)
MemoryReads1,000,000Sequential-dependency random reads from memory table
WorkloadVersion3Benchmark algorithm version (increment on changes)
CertificateValidity7 daysHow long a certificate is valid after issuance

See Performance Evaluation for benchmark and scoring details.

#Consensus

ConstantValueDescription
Quorum threshold67%Voting weight required to confirm/reject
Connection manager low100 peersMinimum peer target
Connection manager high400 peersMaximum peer target
Connection grace period1 minuteNew connection protection window
Bootstrap retry10 secondsRetry interval for bootstrap dial

#API

ConstantValueDescription
Rate limit (sustained)100 req/secPer-IP sustained request rate
Rate limit (burst)500 reqPer-IP burst allowance
Default API port8080HTTP API listen port
Default libp2p port9000libp2p TCP listen port
Default CORS originhttp://localhost:3000Allowed CORS origin

#See also