Skip to content

Consensus Profiles

github-actions[bot] edited this page Nov 20, 2026 · 2 revisions

Consensus profiles · 共识规范

This table specifies the built-in node profiles. Activation is by genesis identity. All listed post-genesis blocks use format 5 and state transition 2. There is no height at which a node switches from format 4. A profile's parameter digest and genesis hash form part of its identity. Reproduce them with hyphen-node --network PROFILE --print-chain-identity (see the node's --help for the identity option). Identity vectors

CLI profile / magic Block / state Active feature mask at genesis Block rule Target seconds / window / initial field AetherCompute result verifier
mainnet / HYPN (research) 5 / 2 0x0ff, VRE enforcement from 128 C4, momentum LWMA 60 / 60 / 8 Work v1, system 2
testnet / HYTS (research) 5 / 2 0x0ff, VRE enforcement from 32 C4, momentum LWMA 30 / 30 / 4 Work v1, system 2
devnet / HYDV 5 / 2 0 C3, LWMA 30 / 30 / 1 Envelopes disabled
contract-devnet / HYCD 5 / 2 0x240 C3, LWMA 30 / 30 / 1 Envelopes disabled
compute-devnet / HYAC 5 / 2 0x620 C3, LWMA 30 / 30 / 1 Inline Alice v1, system 3
offline-devnet / HYOF 5 / 2 0xa00 C3, LWMA 30 / 30 / 1 Envelopes disabled
neural-devnet / HYNN 5 / 2 0x100 Parent-derived neural descriptor, no C index 30 / 16 intervals / threshold 2^56 Envelopes disabled

Ck denotes the Cunningham validation rule below with L=k. All C rows share the authenticated list and full-node index rules below. Protocol state_root combines compute, VM and WES state. Commitment and nullifier fields have their own validation paths. No profile supplies a witness-set Merkle root. Feature bits 0 through 11 are uncles, TERA, VRE, MSE, canonical transaction order, useful work, WASM, H-WES, neural block work, asset rules v1, inline compute and offline claims. Profile constructors

Ordinary block validity and fork choice

The block wire image consists, in order, of the header, a vector of u64 witness values, a vector of transaction byte vectors, a vector of uncle headers, and an authorization byte vector. A vector starts with its element count. Fixed byte arrays have no prefix. Each unsigned integer other than a raw u8 uses its shortest encoding. Values up to 250 occupy one byte. Larger values use marker 251, 252, 253 or 254 followed by 2, 4, 8 or 16 little-endian bytes respectively, provided the value fits the declared field. Reject trailing bytes and non-minimal encodings. Block size is limited to 2 MiB of actual serialized bytes. The decoder also limits each container to one million elements. Wire profile

The header fields in wire order are version:u32, height:u64, timestamp:u64, prev_hash, tx_root, commitment_root, nullifier_root, state_root, receipt_root, uncle_root, pow_commitment, epoch_seed, difficulty:u64, nonce:u64, extra_nonce, miner_pubkey, total_fee:u64, reward:u64, view_tag:u8, block_size:u32. Unannotated fields are 32 raw bytes. The block ID is BLAKE3 of exactly that header. tx_root and uncle_root are binary Merkle roots over hashes of transaction bytes and uncle headers respectively. Join adjacent hashes by hashing their concatenation, promote a final unpaired hash unchanged, and use 32 zero bytes for an empty list. receipt_root must be zero. Block format

Authorization bytes encode compact version 1, the 32-byte reward view key, the 32-byte reward spend key and a length-prefixed 64-byte Ed25519 signature. Verify with miner_pubkey over BLAKE3("Hyphen/NCAP/block-authorization/v1" || u16LE(1) || magic || params_hash || genesis_hash || block_ID || reward_view || reward_spend). Require nonzero miner and reward keys. Asset-rules profiles also require extra_nonce = BLAKE3("Hyphen/reward-recipient/v1" || reward_view || reward_spend). At height h, let e = h / epoch_length using integer division. Epoch zero uses BLAKE3("HyphenGenesisEpoch/v2" || magic || params_hash). Later epochs use BLAKE3 of the block ID at e * epoch_length − 1 in that branch. Epoch length is 2048 on HYPN and 128 on the other built-ins. Authorization · Genesis

For a parent state P, recompute the header height, parent hash, epoch seed and required difficulty D. Before two non-genesis headers exist D is the profile's initial count. Subsequently feed the most recent min(parent_height, window) non-genesis headers in ascending order to the profile controller, then clamp to [1,4096]. Require header.difficulty == D. Require exactly D strictly increasing u64 origins. Each origin is odd and at least 3. For j=0..L−1, 2^j(n+1)−1 must fit in u64 and be prime. Trial division and the deterministic seven-base u64 Miller–Rabin predicate decide primality. The mathematical predicate depends only on (L,n). The branch predicate additionally requires n absent from P's canonical claims. A longer chain may supply overlapping windows starting at n and 2n+1. They are separate keys and their discovery costs are correlated. Predicate

The block's pow_commitment is BLAKE3 of the concatenation of ASCII Hyphen/PoW/witness-commitment/v1, u16LE(3), u64LE(height), the parent's 32-byte pow_commitment, u64LE(D), then every origin as u64LE. The parent block hash and epoch seed are checked separately. Forks with the same origin lists at the same heights can have the same work commitments and different block hashes. When applying a block insert (origin, height) for each origin. At detach remove exactly its entries. Two branches can independently consume the same origin after their common ancestor. The header commits to the ordered list history. It carries no separately authenticated membership index.

For C profiles add validated D to the branch's u128 cumulative weight. HYNN uses floor(u64::MAX / validated_threshold) for a post-genesis block and zero for genesis. Switch only if the validated candidate total exceeds the canonical total. Equal weight preserves the current tip. Recompute from the common ancestor, verify the declared candidate total, then execute every block against its own parent state before exposing the result. Nodes enforce local branch recovery size/depth bounds. An announced total alone cannot certify the branch. Chain implementation

Security interpretation. The current C profiles implement an inventory of publicly verifiable origins. There is no initial allocation, ownership test or discovery timestamp. Inventory may be held privately, copied, or learned from a detached block. A branch can gain D with zero new candidate tests after its parent became known. Over a branch the weight bounds the number of distinct origins it consumed. Converting that count into an adversary's marginal cost requires independent bounds on prior inventory, leakage between branches, correlated windows and search density. Current rules provide no such bounds. The value-bearing design remains unselected pending a reviewed parent-dependent search space or a quantified inventory model. Primecoin's prime-chain origin must be divisible by its block-header hash. Hyphen's comparison point is branch-local consumption. Primecoin proof verification

State, replay and upgrades

Construct the genesis header at height zero with format 5, timestamp 1767225600000, the epoch-zero seed, and reward 100000000000000. The serialized genesis difficulty is 8 on HYPN, 4 on HYTS and 1 on each development profile, including HYNN. All remaining header fields are zero. All four block vectors are empty. Hash the compact header to obtain the genesis ID. For HYNN the first child uses the initial threshold in the table. Genesis construction · Expected hashes

Every profile checks the post-transition state_root. When all three component roots are zero the result is zero. Otherwise hash ASCII HYPHEN_CONSENSUS_STATE_ROOT_V1 followed by the 32-byte compute, VM and WES roots in that order. Profiles with asset rules v1 additionally compare the header's commitment_root and nullifier_root with the parent payment state. The other profiles sign those header fields but skip the equality checks. A full node still computes the resulting output and nullifier state. Either canonical-order or asset-rules activation requires the declared total_fee to equal the checked sum. The canonical-order bit independently requires strictly ascending BLAKE3 transaction hashes. Ordinary genesis begins with its configured difficulty credited to cumulative weight, zero claimed origins, and no work commitment history. The origin-count interpretation applies to the weight added after genesis. State root · Block transition

Full nodes start from the profile genesis. A sled multi-tree transaction updates the canonical tip, block mapping, witness index, undo and other participating state together. The reorg journal persists both paths and its apply/restore mode. Startup resumes from the durable tip. The index stores an eight-byte big-endian key and eight-byte little-endian claiming height. An older unmarked index is rebuilt from canonical blocks. A nonempty legacy witness SMT with no recoverable index requires genesis replay. A migration changing L, format, or identity needs explicit carry-forward rules if the successor is to recognize old claims. No live cross-version migration is specified. State transaction · Index migration

For an untrusted snapshot, use the profile identity and a validated block archive through the chosen tip, replay into a fresh database and compare the resulting tip. A block hash by itself cannot authenticate a supplied list of index leaves. Importing a third party's sled directory trusts the supplier. Header-only clients cannot decide witness uniqueness. They need full list history with branch validation or a future consensus version authenticating set updates and non-membership. Local snapshots carrying payment-output roots serve a different purpose.

Difficulty and time

The shared LWMA estimate uses linearly increasing interval weights, clamped intervals [T/10,6T] and the truncated mean of the corresponding header difficulties. Research v2 additionally applies its significance gate, momentum, dampening and per-step bounds. With at least four timestamps, take the last min(6,N) and compute span*100/((k−1)*T) with integer truncation. If this is below 25, the controller returns at least previous*clamp_up subject to saturation and the final 4096 cap. Slow production does not satisfy this fast-span guard. The next window re-evaluates it. Integer formulas

Number the intervals i=1..m from oldest to newest. Let s[i] be the clamped timestamp difference, and d[i] the difficulty at the end of that interval. For nonzero sum(d) the LWMA estimate is floor(floor(sum(d)/m) * T * sum(i) / sum(i*s[i])), saturated at u64::MAX. For zero total difficulty use the profile's genesis difficulty as the estimate. Bound the ordinary result between max(1,previous/3) and max(1,saturating_mul(previous,3)), then apply the witness-count limit. For the research controller retarget and dampener in the independent Python implementation specify the intermediate integer ratios and order of operations for the built-in windows. Its controller_root starts at 1 << floor(bit_length(n)/2) and returns the current value when the next Newton iterate is at least as large. For the 29-interval testnet window it returns 4. Python implementation · Integer vectors

For a post-genesis parent require strictly increasing millisecond timestamps. The first child is exempt from that parent-time comparison. A live receiver also requires timestamp <= saturating_add(adjusted_now, future_limit), with 120 s on HYPN and 60 s on the other profiles. HYNN also checks its median window. NTP trust is clock diagnostics, not a permanent invalidity marker. A future-time rejection can change upon later submission. An archive admission result must identify its observation time. Header checks

--verify-history verifies every transition from genesis in a temporary database. Its time horizon is the supplied historical record. --replay-history admits an archive into a fresh persistent database using one observation time for the entire import. A new candidate branch must pass live admission before its reorganization journal is written. On restart the node finishes that journal using parent-relative historical rules. Archive verification

HYNN derives its work seed from the parent hash, height and miner key and fixes the MLP shape at 16 × 64 × 16. Each witness word represents a signed Q32.32 component and its score must be strictly below the threshold. The header commits to BLAKE3("Hyphen/neural-work-commitment/v1" || parent_hash || u64LE(height) || u64LE(threshold) || miner_pubkey || u64LE(components...)). With 17 headers available take the span of the last 16 intervals in milliseconds. Multiply the parent threshold in u128 by clamp(span,120000,1920000) and divide by 480000, truncating. Clamp the result to [1,2^62]. The child timestamp must exceed the element at index floor(k/2) in the sorted last k=min(11,available) parent timestamps, including genesis when in the window. Neural work

Settlement and private payments

Enabled result verifiers execute fixed integer code. Their verification material is a descriptor and a deterministic program, with no separate SNARK verifying key. System 2 identifies HYPHEN_NEURAL_WORK_V1, checks the task's program hash against its 56-byte descriptor and decodes exactly input_dim signed little-endian Q32.32 values. The general envelope limit is 1 MiB and proof limit 768 KiB. System 3 identifies AETHER_INLINE_ALICE_V1, commits to descriptor and input, and compares the entire recomputed execution claim, including worker, operations, trace, checkpoints and output. HYAC limits inline envelopes to 4096 bytes, 32 transitions per block and 2048 tasks. Fraud and custody proofs have no accepting verifier. The legacy Alice inverse verifier (system 1) has no built-in consensus profile. None of the research circuits carries independent certification. Work verifier · Inline verifier

For both circuit identifiers use the AetherCompute framed hash of a single empty part. Frame the ASCII domain and each part with its own u64 big-endian byte length, then BLAKE3 the concatenation. For a program hash, the single part is the descriptor. The system 2 domain is HYPHEN_NEURAL_WORK_PARAMS_V1, and the system 3 domain is HYPHEN_NEURAL_ALICE_PARAMS_V1. A descriptor concatenates LE version (u16), epoch (u64), input/hidden/output widths (three u16), threshold or tolerance (u64), and 32 seed bytes. Work uses descriptor version 3 with a positive threshold. Inline Alice uses descriptor version 1 with tolerance in [1, floor(2^32/1000)]. The MLP accepts positive input/output widths through 16 and hidden widths through 512. A signed system 2 result authenticates the submitter and the declared fields, but its circuit only verifies the solution score against the committed descriptor. The general state machine enforces the declared operations budget. System 3 additionally recomputes the execution claim and operation count from the descriptor. Neither verification relation establishes a market price, a refund, or custody of an external dataset. Descriptors · State machine

For an ordinary spend resolve each ring index in the parent output set. CLSAG aggregates authorization of the one-time spend key and knowledge of the mask difference for C_real − C_pseudo at the same secret index. The signature binds the prefix and uses the ring public keys and commitments. Its spend-key image must equal the declared nullifier and must be fresh within the transaction, block and canonical state. Verify the aggregated 64-bit range proof against the ordered output commitments. In the prime-order Ristretto group require ΣC_pseudo = ΣC_out + fee·G_value. The fee is a public u64, signed as eight LE bytes in the prefix. Hidden amounts rely on the commitment relation, range soundness and honest generator construction. This describes a verification relation, not an independent monetary-soundness proof. Transaction · Validation

One-time output keys conceal the reusable address from observers without the relevant keys. Ring indices and linkable spend images are public and permit statistical inference. Amounts are committed and encrypted to the recipient, while fees remain visible. The ordinary CLSAG prefix has no explicit chain identity. Profile-specific ring state or TERA context can indirectly restrict reuse. Signer transport network binding alone supplies no consensus-level cross-network guarantee for matching state. A mandatory new transcript needs coordinated version activation and wallet support. HYOF's separate reserve-claim signature already binds its genesis. Aggregation shortens a proof. Verification latency and failed-batch fallback require separate measurements.

For the existing ordinary payment transcript, concatenate the raw version byte, the compact encoding of each input, the compact encoding of each output, u64LE(fee) and the raw extra bytes. Hash once with BLAKE3. Input and output list lengths and the extra length prefix are omitted from this preimage. The valid private spend vector freezes the 432-byte preimage's digest alongside the signed transaction. All seven existing identities retain these transcript rules for their history. A successor requiring the genesis in the signed message needs a new profile identity and a specified transaction version and activation point. Such a successor has no activation in this table. The foreign-authorization vector checks a miner's signature, and the HYOF foreign-genesis vector checks a reserve claim. Neither provides an ordinary payment with a network-specific signature. Ordinary payment vector · HYOF claim vector

中文操作结论

上表为各内置 profile 唯一的现行规则表。C3、C4 指固定长度的第一类 Cunningham 链。全节点按父状态重算见证数量,对起点逐项验素并查规范索引,再校验父工作承诺、高度、数量和有序起点的哈希。起点身份仅为 u64。两个重叠窗口可以分别计权,同一份库存也可能出现在两条分支。累计权重只度量该分支认领了多少个不同起点。它没有给出父块出现之后新增搜索成本的正下界。

全节点用同一数据库事务维护认领索引与链尖。快照节点需要核对身份并从创世重放,轻客户端仅凭头部无法验证唯一性。旧格式不能在现有链原地激活。研究版难度护栏针对过快时间样本。未来块可以在时钟追上后重验。隐私支付的手续费公开,普通签名的前缀没有显式链身份。资金安全仍依赖金额守恒、范围证明和可链接标记均得到正确验证。正式启用资产或新增电路前,需要分别完成共识及密码学审查。

Replaying the vectors · 向量重放

Use each suite's observation_ms as the fixed live clock for every single-block and competing-branch admission. It equals the largest block timestamp present in that suite. This makes the recorded transitions reproducible on a machine with a different clock.

Start each suite from its named profile's genesis, check parent against the current tip, and perform the steps in order. bytes contains hex-encoded canonical wire images. accept submits a single block. reorg submits an ancestor-first list with the advertised total work. check_transactions validates the ordered byte list at the next height without committing it. A null error means success. Other values give the reference implementation's reason. After each step compare post, including all three state roots, cumulative weight, tip, work commitment and claim count. The signed development blocks preserve their original timestamps. Different implementations can compare validation semantics without matching Rust error strings. Transition vectors

范围边界向量包含金额 0 与 2^64−1 的证明、同一盲因子下金额 −1 和 2^64 的承诺,以及同一份 HYOF 兑付签名在正确和错误创世身份下的结果。普通付款、已消费标记、费用守恒与非规范编码经完整状态或交易入口验证。难度边界覆盖截断、饱和、异常输入和快时间护栏的两侧。验证命令为 cargo test --locked --release -p hyphen-consensus --lib。金额与网络向量 · 难度边界 · 实验与测量

Clone this wiki locally