Protocol documentationSource snapshot: 0.1.0 alphaNetwork: testnet / devnet

Reference

Constants & limits

A consolidated reference for network identities, byte layouts, integer domains, consensus timing, economics, storage, P2P, RPC, explorer, gateway, and official wallet limits.

Canonical reference · implementation snapshot 0.1.0Reviewed August 31, 2026
Specification status

This page documents the implemented alpha. Executable source, interoperability vectors, and tests remain authoritative if prose and code ever diverge.

Reading this reference

This chapter consolidates defaults and protocol limits that are otherwise distributed through source modules. Classify each value before changing it:

  • consensus: changing it can make nodes disagree on valid history;
  • wire: changing it breaks P2P byte compatibility;
  • network identity: changing it creates or collides with a namespace;
  • storage/API/client policy: local compatibility or operational behavior, not block validity;
  • default: may be overridden without changing the protocol.

When a table and source differ, source and executable tests win until documentation is corrected.

Version matrix

Item Value Class
Python package 0.1.0 release
Python runtime >=3.10,<3.13 build/runtime
wallet/site Node runtime >=22.22.2 build/runtime
block version 1 consensus
transaction format v1, no encoded version field consensus
P2P protocol version 2 wire
private RPC API version 1 local API
Explorer API version 1 public API
explorer index schema 1 storage
block-location format version 1 storage
wallet vault version 1 client storage

Network identities

Network Chain ID Magic Redis default DB Explorer port RPC port Genesis
mainnet 0 ba77d89f 0 8000 8444 undefined; startup blocked
testnet 1 fbc0b6db 1 18000 18444 built-in educational manifest
devnet 2 faceb00c 2 28000 28444 built-in educational manifest

The default selected network is testnet. Default data path is:

~/.luracoin/<network>

LURACOIN_HOME changes the root; LURACOIN_DATA_DIR sets the exact directory.

Known genesis values

Network Allocation Nonce ID
testnet 100,000 LURA 14,121,310 0000009e2bcc8e56cee8b5e0fbdac9edc04513542af5c5791ea6165179c468bf
devnet 100,000 LURA 11,943,016 00000033e4111007fd85423c7a527595e8efefe158a1250db62a32870857ef91

These identify disposable alpha chains.

Money and integer domains

Field/unit Domain/value Class
lurashis per LURA 100,000,000 consensus/UI
account balance uint64 consensus
transaction value 1–2^64 - 1 consensus
transaction fee uint32 consensus
transaction nonce uint32 consensus
chain ID in transaction uint8 consensus
block height uint32 consensus
block PoW nonce uint32 consensus
transaction count uint16, at least 1 consensus
JSON monetary representation decimal string API

Arithmetic is integer-only and checked. Overflow is invalid, not wrapping behavior.

Address and key constants

Item Value
elliptic curve secp256k1
private key 32 bytes, valid scalar
compressed public key 33 bytes
raw transaction public key 64 bytes `x
address version 0x30
address payload version + HASH160(compressed key), 21 bytes
checksum first 4 bytes of double-SHA256(payload)
encoded address length 34 ASCII Base58Check characters
mnemonic entropy 256 bits
mnemonic words 24, English list
BIP39 passphrase LURA
BIP32 path master/root key; no child derivation path
zero address sentinel 34 ASCII 0 characters

The zero sentinel is not a valid Base58Check destination. It is reserved as coinbase origin.

Transaction sizes and offsets

Offset Size Field
0 1 chain
1 4 nonce, little-endian
5 4 fee, little-endian
9 8 value, little-endian
17 34 sender ASCII
51 34 recipient ASCII
85 64 raw public key
149 64 compact signature
unsigned bytes          85
unlock field           128
complete transaction   213
complete transaction hex characters 426

Signing digest is one SHA-256 of the unsigned 85 bytes. Transaction ID is double-SHA256 of all 213 bytes. Signature is deterministic RFC 6979 compact r || s with low-S enforced.

Block constants

Item Value
transmitted header 118 bytes
block version 1
declared ID 32 bytes
predecessor 32 bytes
miner 34 ASCII bytes
timestamp encoding 4-byte big-endian Unix seconds
bits 4 bytes
nonce 4-byte little-endian
hash-preimage transaction count 2-byte little-endian
maximum transactions 65,535 including coinbase
coinbase maturity in implementation constant 1
maximum future timestamp 500 seconds

The coinbase is credited after normal transaction evaluation, so current-block subsidy is not spendable in its own block.

Block-size schedule

Height from Bytes maximum
0 10,000
28,800 50,000
57,600 75,000
86,400 200,000
172,800 1,000,000
259,200 2,000,000
345,600 3,000,000
432,000 8,000,000

Serialized size is 118 + 213 × transaction_count.

PoW and economics

Item Value Class
starting compact bits 1dffffff consensus
maximum compact target basis 1fffffff consensus
target block interval 180 seconds consensus
difficulty interval 480 blocks consensus
expected retarget span 86,400 seconds consensus
adjustment clamp ¼× to 4× time span consensus
starting recurring subsidy 50 LURA consensus
halving interval 259,200 blocks consensus
tail subsidy floor 1 LURA forever consensus

There is no finite maximum supply under permanent tail emission.

P2P framing and limits

Item Value
default bind host 0.0.0.0
default P2P port 9999
message header 24 bytes
command field 12 bytes
checksum first 4 bytes of payload double-SHA256
max block payload 8,000,000 bytes
max global P2P payload 8,000,004 bytes
v2 VERSION payload 18 bytes
peers maximum in payload 256 IPv4 endpoints
sync batch 50 blocks
total peers default 8
inbound peers default 8
ping interval 60 seconds
pong wait 10 seconds
send timeout 5 seconds
known inventory cache 50,000 hashes

Exact command payload sizes are listed in P2P v2 wire protocol.

Synchronization and relay defaults

Item Default Environment
sync cooldown base 30 seconds LURACOIN_SYNC_COOLDOWN_BASE
sync cooldown maximum 900 seconds LURACOIN_SYNC_COOLDOWN_MAX
stored host histories 4,096 LURACOIN_SYNC_COOLDOWN_LIMIT
pending relay backlog 1,000 LURACOIN_PENDING_RELAY_LIMIT
replay batch per peer 100 LURACOIN_REPLAY_BATCH_SIZE
replay budget per peer 5 seconds LURACOIN_REPLAY_BUDGET_SECONDS
peer maintenance interval 30 seconds internal default
per-block sync wait 30 seconds internal default

These are node policy/DoS bounds, not consensus fields.

Canonical storage

Item Value
block record prefix 4-byte little-endian serialized length
block file rotation 134,217,728 bytes (128 MiB)
block filename blkNNNNNN.dat
location entry 17 bytes
location version 1
location file number 4-byte little-endian
location offset 8-byte little-endian
location expected length 4-byte little-endian
account DB accounts.db
block/index DB blocks.db
chain metadata DB chainstate.db
optional explorer DB explorer.sqlite3

Redis defaults

Item Value
host localhost
port 6379
mainnet/testnet/devnet DB 0 / 1 / 2
tests DB 9
payload key 64-hex transaction ID
nonce key nonce:<chain>:<sender>:<nonce>

Override with LURACOIN_REDIS_HOST, LURACOIN_REDIS_PORT, and LURACOIN_REDIS_DB.

Private RPC limits

Item Value
bind loopback only
ports 8444 / 18444 / 28444 by network
token path <data-dir>/rpc.token
token minimum 32 characters
desired token mode 0600
maximum token file 4,096 bytes
maximum request body 1,000,000 bytes
history page limit 1–200; default 50
canonical submit bytes 213
successful submit status 202

The official Electron RPC client adds an 8-second request timeout and 2,000,000-byte response cap.

Browser-wallet gateway limits

Item Value
default host 127.0.0.1
default port 8080
request body 16 KiB
proxied RPC response 2,000,000 bytes
static file maximum 16 MiB
upstream timeout 5 seconds
cookie name luracoin_wallet_session
API prefix /wallet-api

Allowed bind hosts are 127.0.0.1 and 0.0.0.0; the latter is intended only for a container published back to host loopback.

Explorer API limits

Item Value
API prefix /api/v1
default page size 25
maximum normal page 100
default/max block page 10 / 10
maximum offset 2,147,483,647
default bind 127.0.0.1
ports 8000 / 18000 / 28000
index enabled false by default
index polling base 2 seconds
index retry maximum 60 seconds
CORS methods GET
CORS origins *, credentials false
CORS max age 600 seconds

Official wallet constants

Item Value
wallet storage key luracoin.wallet.v1
preferences key luracoin.preferences.v1
vault KDF PBKDF2-HMAC-SHA256
default KDF iterations 250,000
accepted stored KDF range 100,000–5,000,000
salt 16 random bytes
cipher AES-256-GCM
IV 12 random bytes
default auto-lock 5 minutes
selectable auto-lock 0, 1, 5, 15 minutes
default/only live network testnet
live refresh interval 15 seconds
history request limit 100 per page
UI history bound 5 pages / 500 entries
official transaction fee 0 lurashis in current UI
pending outgoing policy one at a time in current UI
wallet-name maximum 60 characters

Client policy can change without changing consensus, but any signing/encoding change must remain byte-compatible.

Configuration precedence

For node commands:

explicit CLI option > environment-derived Config default > built-in default

The CLI does not load .env automatically. Use exported environment variables or a service manager. Keep each network’s data directory, Redis DB, service ports, and peers explicit when running multiple instances.

Source anchors

Primary implementation files used for this chapter: