Skip to content

feat: add NuTachyon and V7 transactions - #795

Draft
S1nus wants to merge 17 commits into
zakura-core:mainfrom
S1nus:c/nu-tachyon
Draft

feat: add NuTachyon and V7 transactions#795
S1nus wants to merge 17 commits into
zakura-core:mainfrom
S1nus:c/nu-tachyon

Conversation

@S1nus

@S1nus S1nus commented Aug 24, 2026

Copy link
Copy Markdown

The bulk of Tachyon’s logic is tachyon::coherence (semantic verification), TachyonMiningData in the state service, and the get_block_template handler in RPC, update_chain_tip_with_block_parallel in crates/zakura-state/src/service/non_finalized_state/chain.rs; the rest of the PR is mostly plumbing.

zakura-chain

  • Adds a cfg-gated zakura_chain::tachyon module containing wrappers for Tachyon’s Anchor and Tachygram types.
  • Updates V4 history tree computation to hash the Tachyon anchor into the tree.
  • Adds the NuTachyon NetworkUpgrade, ConsensusBranchId, and TX_V7_VERSION_GROUP_ID.
  • Adds the V7 transaction type, which carries Tachyon bundles.
  • Updates value balance calculation to include Tachyon bundles.
  • Adds tachyon_anchor and tachyon_epoch_anchor to NoteCommitmentTrees.

zakura-consensus

  • Modifies the mempool transaction verifier to enforce valid digests for Tachyon actions and accept only autonome transactions for now. In the future, we will perform peer-to-peer aggregation and allow other kinds of Tachyon transactions to propagate through the mempool.
  • Adds parallelized validation of Tachyon signatures.
  • Adds proof stamp verification.
  • Adds error types for Tachyon’s invariants.
  • Adds Tachyon coherence checks to semantic block verification.

zakura-network

  • Updates CURRENT_NETWORK_PROTOCOL_VERSION_VALUE.
  • Adds NuTachyon and V7 transaction arms to exhaustive match statements in tests.

zakura-state

  • Adds tachyon_anchor and tachyon_epoch_anchor to TreeState.
  • Updates ChainInner with Tachyon anchors, epoch anchors, tachygrams, and their height/epoch indexes.
  • Executes Tachyon transactions while updating the chain tip in parallel.
  • Adds TachyonMiningData to the read state service so miners can retrieve anchor data and revealed tachygrams for aggregation during block construction.
  • Adds contextual transaction verification for nullifiers and anchors.
  • Updates the database version and adds four finalized-state column families for Tachyon anchors, anchor indexes, epoch anchors, and tachygrams.
  • Filters Tachyon-enabled blocks from VCT roots in commit_finalized_direct_with_aux (we may want to revisit how Tachyon affects VCT).
  • Verifies Tachyon commitment roots.
  • Updates history tree computation.
  • Adds helpers to store and prune tachygrams.

zakura-rpc

  • Updates get_block_template so miners aggregate autonome transactions from the mempool.
  • Adds aggregation logic under zakura-rpc/src/methods/types/get_block_template/tachyon.rs.

Validation

  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 check --locked -p zakura-chain -p zakura-consensus -p zakura-state -p zakura-rpc --all-targets
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 test --locked -p zakura-chain
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 test --locked -p zakura-consensus tachyon
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 test --locked -p zakura-state tachyon
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 clippy --locked -p zakura-chain -p zakura-consensus -p zakura-state -p zakura-rpc --all-targets --no-deps -- -D warnings
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" RUSTFLAGS='' cargo +1.91.0 check --locked -p zakura-chain -p zakura-consensus -p zakura-state -p zakura-rpc --all-targets
  • Generated empty, Adjunct, single-action Proven, and multi-action Proven V7 vectors match the exact fixtures in feat: add NuTachyon support to forked librustzcash crates common#178.
  • Formatting, Markdown lint, locked metadata, and changelog policy checks.

@S1nus
S1nus marked this pull request as ready for review August 31, 2026 19:55
@S1nus
S1nus marked this pull request as draft August 31, 2026 19:55
@S1nus

S1nus commented Sep 7, 2026

Copy link
Copy Markdown
Author

Follow-up validation for d5fce97:

  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 test -p zakura-rpc nu_tachyon_template_converts_to_proposal_block
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 clippy -p zakura-rpc --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • ./scripts/changelog.py check

The regression test constructs a NuTachyon block template, converts it through the internal-miner proposal path, and verifies the header uses the block-commitments hash.

@S1nus

S1nus commented Sep 7, 2026

Copy link
Copy Markdown
Author

Validation for 96cea46: cargo fmt --all -- --check; cargo +1.97.1 clippy -p zakura-rpc --all-targets -- -D warnings; cargo +1.97.1 test -p zakura-rpc; RUSTFLAGS= cargo +1.91.0 check --locked -p zakura-rpc --all-targets; ./scripts/changelog.py check. Cargo commands used ROCKSDB_LIB_DIR=/opt/homebrew/lib.

@S1nus

S1nus commented Sep 7, 2026

Copy link
Copy Markdown
Author

Validation for a871092: cargo fmt --all -- --check; cargo +1.97.1 clippy -p zakura-state -p zakura-rpc --all-targets -- -D warnings; cargo +1.97.1 test -p zakura-state tachyon; cargo +1.97.1 test -p zakura-rpc get_block_template::tachyon::tests; RUSTFLAGS= cargo +1.91.0 check --locked -p zakura-state -p zakura-rpc --all-targets; ./scripts/changelog.py check. Cargo commands used ROCKSDB_LIB_DIR=/opt/homebrew/lib.

@S1nus

S1nus commented Sep 7, 2026

Copy link
Copy Markdown
Author

Added structured Tachyon bundle data to verbose getblock / getrawtransaction transaction objects, including actions, balances, memo, signatures, proof stamps, and adjunct aggregate IDs.

Validation:

  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 fmt --all -- --check
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 clippy -p zakura-rpc --all-targets -- -D warnings
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" cargo +1.97.1 test -p zakura-rpc --lib (134 passed, 1 ignored)
  • ROCKSDB_LIB_DIR="/opt/homebrew/lib" RUSTFLAGS="" cargo +1.91.0 check --locked -p zakura-rpc --all-targets
  • ./scripts/changelog.py check

# Conflicts:
#	.github/workflows/lint.yml
#	Cargo.lock
#	Cargo.toml
#	crates/zakura-chain/src/value_balance.rs
#	crates/zakura-state/src/response.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant