Repository navigation
v0.10.0-testnet — sampling, batch/SSE, policy, signed snapshots, protocol v2
verinoo-node v0.10.0-testnet
Released 2026-11-18 · testnet · AGPL-3.0
This release turns the v0.9.0 base into a protocol-v2 node: deterministic
per-task sampling, batch inference, final-only task streams, a submission
policy boundary, signed state snapshots, and a zero-copy .vnnw decoder path.
Validators, replicas and API nodes must upgrade together; old binaries reject
v2 blocks.
Upgrade warning — protocol v2
v0.10.0 accepts historical v1 blocks and produces v2 blocks. A v0.9.0
binary rejects a v2 block, so a mixed network will stall or split once the
first v0.10.0 validator produces. Upgrade every validator and every replica
in one coordinated window. Do not roll back to v0.9.0 after a v2 block has
been produced. See Upgrade required and
docs/upgrade-v2.md.
Highlights
- Deterministic sampling. Decoder tasks may carry a signed
sampling
object; the result is part of consensus execution and the receipt commits to
it. - Batch, streams and policy.
/v1/infer/batchadds per-item admission,
gas-cap checks and a nonce/balance overlay. Task SSE streams deliver only the
committed result. A node-local policy gate checks plaintext and ciphertext
size before mempool admission. - Signed state snapshots. The
verinoo-statesnapshot library provides
checkpoint create/verify/apply, canonical manifests, per-file SHA-256 checks,
expectation re-verification and backup/rollback. The shipped
verinoo-node snapshot create|verify|applyCLI adds operator signing and
verification;createalways signs the manifest. The node also serves
/snapshot/manifestand/snapshot/files/*whenVNN_SNAPSHOT_DIRis set. - Protocol v2.
HEADER_VERSION=2, v1 replay remains accepted, sampling is
gated on v2, and v0.9.0 peers cannot follow the chain after the first v2
block. Genesis remains a v1 block; the first block produced after the upgrade
is v2. - Runtime and readiness. Memory-mapped
.vnnwweights, a config-driven
GPT-2/GPT-Neo importer, and a fail-closed/readyprobe for fresh,
caught-up, consistent nodes.
Per-task sampling
submitInference data may include:
"sampling": {
"temperatureMilli": 800,
"topK": 40,
"topPMilli": 900,
"seed": 7
}- The object is canonical transaction data: it changes the signed
txIdand
the task id. Omitted fields are zero, so"sampling": {}is a valid greedy
override. - Ranges:
temperatureMilli0..=100000,topKat most both 1,000,000 and the
resolved decoder vocabulary,topPMilli0..=1000, andseedanyu64.
Sampling is accepted only for decoder models. A classifier task carrying an
override is rejected at validation. - Receipts add
sampling,samplingHash = sha256(canonical_json(sampling))
andsamplingSource: "task"only for tasks with an explicit override.
Old receipts keep their historical shape. /v1/verifyregenerates the output with the effective sampling (the override
or the model default) and marks the result verified only when the output hash
and, when present, the receiptsamplingHashmatch.- Sampling is gated on block format v2. A v1 block containing a sampling
transaction is rejected. Every validator and verifier must load the same
model file; changing a published model's default sampling is a new model
version.
Batch inference
POST /v1/infer/batch accepts 1–32 signed TxEnvelope objects and returns a
per-item result in input order.
- The 32-item count is a transport cap. Each batch must also fit one block's
1,000 gas:submitInferencecosts 60 gas (120 sampled, 240 full-zk), so at
most 16 optimistic inference items fit. An over-gas batch is rejected with
400before any item is admitted. - Signature, nonce, balance, sampling, encryption and policy checks are the
same as/v1/infer. - Nonce and balance use a batch-local overlay seeded from committed state, so
consecutive nonces from one sender are admitted in order. A rejected middle
item cascades to later items from that sender; other senders are unaffected. - After request-level checks the endpoint returns
200with per-item results,
even when every item is rejected. Accepted items enter the mempool and are
gossiped independently; admission is not a block reservation. - Gas-limited transactions left out of a produced block are re-queued at the
front of the mempool in their original order; invalid or reverted
transactions are dropped. The mempool admits at most 5,000 transactions
across RPC and gossip (429single submission, per-item error in a batch).
Batch is API fan-out. It is not runtime batching and gives no gas discount.
Task event stream (final-only)
GET /v1/tasks/:id/events returns text/event-stream with:
status—{taskId,status,height,resultHash,updatedAt}, input and
ciphertext redacted.result—{taskId,task,receipt}once the task iscompletedorfailed,
thendone.timeout— after 60 seconds without a terminal state, thendone.
The node polls about once per second, sends heartbeat comments through idle
proxies, and allows 64 concurrent streams per process (429 beyond that).
A task row exists only after the block carrying its submitInference is
applied, so the stream returns 404 before inclusion. The stream exposes only
the consensus-committed result: there are no token-level previews.
Request policy boundary
VNN_POLICY_FILE loads a deterministic, node-local policy once at startup.
An unreadable or invalid file fails startup; unset means permissive defaults.
The policy is immutable until restart.
- Applies to
/v1/infer, inference transactions on/tx, and every batch
item, after signature/nonce/balance/sampling checks and before mempool
admission. - Plaintext
inputis checked formaxInputBytes, model allowlist, blocked
terms/patterns, and configured email/phone/SSN redaction. maxInputBytesalso applies to the serializedencryptedInputenvelope, so
ciphertext cannot bypass the size limit. Content checks and redaction are
skipped for encrypted and commitment-only payloads;requirePlaintext
rejects them.- A policy failure returns
422withreason: "policy"and a stable
policyReason. Blocked text is never echoed. If redaction would change a
signed plaintext, the request is rejected withredaction_required; the node
never rewrites a signed transaction. - Policy is an API-boundary control only. It does not run in consensus, does
not change block validity, results, receipts or/v1/verify, and never
mutates committed state.
Encryption still protects inputs from API and block readers only. Validators,
including the operator, hold the network key and can decrypt.
State snapshots
Snapshot create/verify/apply ships in two layers:
verinoo-state(crates/state/src/snapshot.rs) owns the RocksDB checkpoint,
the canonical manifest (sorted file list, sizes and SHA-256 hashes), file-set
verification, and atomic apply with backup/rollback. It verifies files
against caller-supplied expectations but does not know chain truth.verinoo-node(crates/node/src/snapshot.rs) owns the operator CLI
verinoo-node snapshot create|verify|apply, Ed25519 manifest signatures and
signer thresholds,stateRootrecomputation, and validator-set/model-set
hash checks. WithVNN_SNAPSHOT_DIR, the node serves
/snapshot/manifestand/snapshot/files/*path.
create requires the node to be stopped (it takes the RocksDB lock) and a
signing seed (--key-seed or VNN_KEY_SEED); it always signs the manifest.
--signer on create pins the derived key. verify and apply require at
least one --signer (or VNN_SNAPSHOT_SIGNERS) and recompute stateRoot, the
validator-set hash, the checkpoint head fields, and the local model hashes.
apply requires the target to be stopped, re-verifies immediately before the
rename, moves an existing database to a backup instead of deleting it, and rolls
back if the swap fails. Run verinoo-node snapshot --help for the exact flags.
Trust boundary. Snapshot signatures are operator attestations, not BFT
certificates. Verification proves the file set matches the signed manifest and
that the checkpoint's state root, validator set, head fields and local model
hashes match; it does not prove canonical chain truth or finality. There is no
automatic snapshot sync, download, trust-on-first-use or failover. Keep the
pre-upgrade database/snapshot until the node has produced or validated new
blocks.
Memory-mapped weights, importer and readiness
.vnnwmmap. Binary decoder weights are memory-mapped instead of copied.
The 48-byte header carries magic, format version, payload length and SHA-256;
the model's requiredweightsSha256pin is checked as well. A tampered byte
is rejected. Unaligned payloads or a big-endian host fall back to an owned
copy instead of unsafe reinterpretation.- Generic GPT-2/GPT-Neo importer.
scripts/import_hf_gpt.pyaccepts a
HuggingFace id or local directory, handles tied/untied heads,gelu_newor
relu, transposes GPT-2 Conv1D weights, and supports the GPT-2 byte-level
BPE tokenizer. LLaMA/SentencePiece, rotary embeddings, other activations and
GPT-Neo contexts beyond the local-attention window are rejected. - Readiness.
GET /readyreturns 200 only when a head exists, the node is
not syncing,headAgeMs < 3 * blockTimeMs, the state-derived validator set
matches the configured set, and the node is withinVNN_PEER_LAG_BLOCKSof
the best same-chain peer. Failures return 503 with a stablereason
(no_head,validator_set_mismatch,syncing,stale_head,
behind_peer)./healthis liveness only and returns HTTP 200 even before a
head exists ("ok": false); use/readyfor traffic decisions.
Upgrade required: protocol v2
HEADER_VERSION is now 2. Genesis remains a v1 block so every node keeps the
same genesis hash and chain id; the first block produced after the upgrade is
v2. This binary validates and replays historical v1 blocks, but it produces v2
blocks and a v1 block may not contain sampling transactions. A v0.9.0 binary
rejects unknown block version 2.
Single-validator testnet
sudo scripts/upgrade-v2.sh \
--binary /root/verinoo-node-v0.10.0-testnet \
--sha256 "$(sha256sum /root/verinoo-node-v0.10.0-testnet | awk '{print $1}')"The helper requires the new binary's SHA-256 (or --sums-file), preflights
/ready, takes a database and old-binary backup, stops the service, verifies
the installed binary, waits for /health and /ready, then prints /v1/models
and parses /blocks for the first block above the recorded height. It exits
non-zero with installed but v2 unconfirmed if it cannot prove that block is
v2, and only prints old-binary rollback commands with --force-rollback. Read
docs/upgrade-v2.md before running it. For a manual
single-validator upgrade: stop the service, back up the database, install the
binary, start, and check /ready.
Multi-validator and replicas
All validators and replicas must run v0.10.0 before any v0.10.0 validator
produces its first block. A safe coordinated window is:
- Back up every node and confirm
/readyis currently 200. - Stop all validators (or enter a maintenance window with production
suspended). Upgrade replicas first if they are not producing. - Install v0.10.0 on every validator, then start them together.
- Verify
/ready, then confirm the first new block has"version": 2.
Do not leave a v0.9.0 validator producing after another validator has produced
a v2 block: the old nodes reject that block and the network no longer agrees on
the head.
Rollback rule
- Before the first v2 block: stop the node, reinstall the saved old binary,
and restore the pre-upgrade database backup if needed. Deleting the failed
database is never required. - After the first v2 block: do not roll back to v0.9.0. It cannot
validate v2 and will stall or diverge. Either roll forward with v0.10.0 on
every node, or restore all nodes from pre-upgrade snapshots/backups and
re-genesis. Backups are never deleted automatically. The upgrade helper
prints exact old-binary commands only when--force-rollbackis passed and
no v2 block is observed.
There is no automatic failover, fencing or split-brain protection. Promotion of
a replica is manual; see docs/upgrade-v2.md.
Verification
The release was verified with:
cargo test --workspace --locked # 243 Rust tests, snapshot coverage included
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo fmt --all -- --check
cd sdk/typescript && node --test # 17 tests
cd sdk/python && python3 -m pytest -q # 15 tests
python3 scripts/test_hf_gpt_import.py # 24 importer tests
python3 scripts/test_stripe_invoice.py # 20 Stripe testsThe 243 Rust tests include the state-layer snapshot and node snapshot CLI
cases. If later snapshot fixes add cases, treat the green workspace suite in
the tagged tree as the release gate; the counts above are the current
baseline.
Install
# From the download directory, next to the published checksum file:
sha256sum -c SHA256SUMS.v0.10.0-testnet
tar xzf verinoo-node-v0.10.0-testnet-x86_64-linux.tar.gz
cd verinoo-node-v0.10.0-testnet-x86_64-linux
# Verify the extracted package contents:
sha256sum -c SHA256SUMS
sudo install -m 0755 bin/verinoo-node /usr/local/bin/verinoo-node
sudo systemctl restart verinoo-node
curl -fsS localhost:7100/health
curl -fsS localhost:7100/ready
curl -fsS localhost:7100/v1/modelsFor a local demo:
VNN_DB=/tmp/verinoo-demo VNN_KEY_SEED="$(openssl rand -hex 32)" \
VNN_VALIDATOR=1 VNN_API_PORT=7100 VNN_P2P_PORT=7101 \
./bin/verinoo-nodeArtifact contents
verinoo-node-v0.10.0-testnet-x86_64-linux.tar.gz contains:
bin/verinoo-node— stripped x86_64 Linux binary. The packaging script
rejects non-ELF, non-x86_64 or non-Linux inputs.models/— the explicit seven-file allowlist:
acme-support-v1.graph.json,claims-triage-v1.graph.json,
claims-triage-v1.test.json,intent-transformer-v1.json,
intent-transformer-v1.test.json,tiny-gpt-v1.jsonand
tiny-gpt-v1.test.json.intent-classifier-v1is compiled into the binary.
TinyStories and DistilGPT-2 weights are not redistributed; import them
locally with the included scripts.scripts/—claims_report.py,demo-claims.sh,
import_tiny_stories.py,import_distilgpt2.py,import_hf_gpt.py,
hf_gpt_common.py,test_hf_gpt_import.py,stripe_invoice.py,
test_stripe_invoice.py,backup.sh,verify.sh,upgrade-v2.sh.sdk/typescript/andsdk/python/— client SDKs with batch and SSE support.deploy/node.env.example— environment template.LICENSE,README.txt,SHA256SUMS(package contents),
docs/snapshots.md,docs/policy.md,docs/upgrade-v2.md,
docs/releases/v0.10.0.md.SHA256SUMS.v0.10.0-testnetis published next to the archive; the archive
filename inside that sums file is relative.README.txtshows both the
archive check (from the download directory) and the extracted-package check.
Non-claims
This is a testnet release with a single-operator trust model. It does not
provide:
- GPU execution, 7B+ serving, a request queue, or production LLM throughput.
- BFT finality, quorum certificates, slashing of live validators, or
Byzantine fault tolerance. - Automatic failover, leader leases, fencing, split-brain protection, or
automatic snapshot transfer. - Trustless snapshots. State-layer verification is file integrity plus
caller-supplied expectations; signatures are operator attestations, not BFT
certificates, and there is no automatic sync. - Token-level streaming or unverified execution previews. SSE is final-only.
- Arbitrary model import. GPT-2/GPT-Neo checkpoints with the GPT-2 byte-level
BPE tokenizer are supported; LLaMA/SentencePiece, rotary architectures and
arbitrary checkpoints are rejected. - Privacy from the operator. Validators hold the input decryption key.
- Production moderation or a PII guarantee. Policy is a deterministic
API-boundary filter configured by the operator.
License
AGPL-3.0. See LICENSE.