mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The module already called itself github.com/luxfi/node while containing no node in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and the Go column of the matrix measured a VM plugin. A repo that fetches the thing it claims to be has not replaced it, so the Go sources move in — 1515 files, the daemon and everything under it — and the build reaches outside this module for nothing. Rust and C++ sit beside it unchanged and are still measured against it by the differential. That is the point of one repo: the reference implementation and the two ports are the same checkout, so parity is a thing you can run rather than a thing you assert. Verified: builds, and the closure carries no lux-private — checked at build time rather than believed. The daemon starts twelve chains on a local network (P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
2.0 KiB
2.0 KiB
Block Composition and Formation Logic
Lux's P-Chain always builds and verifies the latest block format. The post-upgrade block model is the only model that ever runs on a Lux network: all legacy upgrade gates resolve to "active" at chain birth, so block formation has exactly one shape.
Block Types
- Standard Blocks may contain multiple transactions of the following
types:
CreateChainTx,CreateNetTx,ImportTx,ExportTx,AddValidatorTx,AddDelegatorTx,AddNetValidatorTx,RemoveNetValidatorTx,TransformNetTx,AddPermissionlessValidatorTx,AddPermissionlessDelegatorTx. - Proposal Blocks may contain a single transaction of type
RewardValidatorTx. - Option Blocks (
Commit Block,Abort Block) carry no transactions.
Every block header contains ParentID, Height, and Time.
Block Formation Logic
The P-Chain picks transactions to include in the next block in this order:
- Advance chain time. Try to move chain time forward to the current local time or the earliest staker-set change event, issuing a Standard or Proposal block as needed.
- Reward expiring stakers. Walk any stakers whose staking period has
ended at the new chain time and issue a
RewardValidatorTxinto a Proposal Block per staker. - Pack mempool decision transactions. Fill a Standard Block with mempool decision transactions up to the default block size.
Block formation terminates as soon as any step produces a block. If no step finds work the builder schedules a fresh attempt and returns.