Skip to content

bump#47

Open
yapishu wants to merge 99 commits into
nockpool/hoonfrom
master
Open

bump#47
yapishu wants to merge 99 commits into
nockpool/hoonfrom
master

Conversation

@yapishu

@yapishu yapishu commented Dec 7, 2025

Copy link
Copy Markdown

No description provided.

tacryt-socryp and others added 30 commits October 25, 2025 15:39
…for examining raw-txs, add batch writes to file driver, add file exts to http driver
* Sync from Nockup development repo.

* Change to workspace.

* Post with openssl
* Update README to remove status and development notes

Removed pre-release status and development notes from README.

* Fix URL branch reference in installation command

* Add permissions for contents in release workflow
* Post new deploy chain.

* Add pruning.

* Add protobuf support

* Add protobuf support

* Add protobuf support

* Tweak CI

* Tweak CI

* Tweak CI

* Tweak CI

* Fix nockup for new manifest format.

* Adjust

* Fix so build cleanup doesn't happen on PR.
* Post new deploy chain.

* Add pruning.

* Add protobuf support

* Add protobuf support

* Add protobuf support

* Tweak CI

* Tweak CI

* Tweak CI

* Tweak CI

* Fix nockup for new manifest format.

* Adjust

* Fix so build cleanup doesn't happen on PR.

* Fix install script and update old links to sigilante repo.

* Fix last URLs
* Post new deploy chain.

* Add pruning.

* Add protobuf support

* Add protobuf support

* Add protobuf support

* Tweak CI

* Tweak CI

* Tweak CI

* Tweak CI

* Fix nockup for new manifest format.

* Adjust

* Fix so build cleanup doesn't happen on PR.

* Fix install script and update old links to sigilante repo.

* Fix last URLs

* Fix cleanup logic.
litlep-nibbyt and others added 30 commits June 12, 2026 20:26
Recover withdrawal proposals that can become stranded when local bridge state drifts from the sequencer-owned pending epoch or when a provisional prepared attempt times out before canonicalization.

Summary:

- Reconcile bridge-local pending rows with the sequencer's pending epoch before local assembly chooses the next request to stage.

- Reconcile provisional prepared rows against the sequencer's pending epoch and handoff metadata before proposing locally or validating peer proposals.

- Advance the sequencer-owned pre-canonical handoff when a prepared attempt times out, allowing the next owner to retry in the same epoch behind a shared handoff barrier.

- Keep same-epoch prepared hash replacement rejected until handoff reconciliation explicitly clears the stale prepared row.

- Reset prepared rows with local-only epoch drift back to the sequencer's pending epoch so replacements do not get stuck behind stale local bookkeeping.

- Update the withdrawal design notes to document same-epoch prepared handoff, pending epoch reconciliation, and stale prepared-row clearing.

Coverage:

- Add restart coverage for same-epoch replacement rejection before handoff reconciliation and acceptance after stale prepared rows are cleared.

- Add assembly tests for stranded pending and prepared rows reconciling to the sequencer epoch.

- Add transport tests that peer proposal validation reconciles stale pending epochs and accepts replacement proposals only after sequencer handoff state allows it.

Validation:

- cargo fmt --check -p bridge

- cargo test -p bridge withdrawal::proposals -- --nocapture

- cargo test -p bridge withdrawal::transport -- --nocapture

- cargo test -p bridge withdrawal_assembly_tick -- --nocapture

- No Hoon changes; jam assets were not rebuilt.

Co-authored-by: bitemyapp <bitemyapp@users.noreply.github.com>
Add cross-compilation support for Linux x86_64 release binaries from any
host (notably macOS) via cargo-zigbuild, plus a tidy-up of the Docker
build assets.

Cross-compilation (tools/zig/ + Makefile):
- zig_cc_linker.sh: zig cc/linker wrapper that resolves a hermetic Zig
  (ZIG_EXE -> Bazel-staged rules_zig -> zig on PATH), sets writable cache
  dirs for sandboxed builds, normalizes Rust-style target triples, and
  strips/translates GCC-specific linker flags that zig cc rejects.
- zig_ar.sh / zig_ranlib.sh: AR/RANLIB wrappers around Zig's LLVM ar/ranlib.
  tikv-jemalloc-sys builds via autotools that read plain AR/RANLIB, so
  without these the host (macOS) ar silently drops cross-compiled ELF
  objects, yielding an empty libjemalloc.a and undefined
  mallocx/rallocx/sdallocx at link time.
- Makefile: wire the wrappers in via zigbuild_aws_lc_env and add targets
  zig-build (nockchain w/ jemalloc, wallet, peek), zig-build-nockchain-api,
  zig-build-nockchain-bridge-sequencer, zig-build-bridge, and
  zig-build-roswell, all against the glibc 2.39 floor (ubuntu:24.04).

Docker reorganization:
- Move Dockerfile, docker-compose.metrics.yml, and telegraf.conf into
  docker/; add docker/Dockerfile.dockerignore; drop the root .dockerignore.
- Update Makefile (docker build -f docker/Dockerfile, DOCKER_METRICS_COMPOSE
  path) and the NOCK-PMA.md doc reference accordingly.

FolderOrigin-RevId: /home/gitlab-runner/builds/Izlke1EJS/0/zorpcorp/nada
Increase the per-peer request rate-limit threshold (and the per-IP-bucket
request admission limit it feeds via IP_BUCKET_REQUEST_ADMISSION_LIMIT)
from 60 to 256 requests per REQUEST_HIGH_RESET window. The previous value
of 60 was too low and throttled legitimate peers during normal
request/response traffic.
Two unrelated changes from the upstream import:

nockchain-libp2p-io (driver.rs, tests.rs):
- Drop the finite initial-peer retry budget (initial_peer_retries /
  initial_peer_retries_remaining). With zero connected peers we now
  redial seed peers forever instead of giving up after N attempts.
- Replace the fixed retry count with exponential backoff between
  redial attempts, capped at INITIAL_PEER_REDIAL_MAX_INTERVAL (1h).
  reset_after is called every tick to hold the backoff cadence; the
  backoff resets to the base interval once peers connect (so a later
  disconnect retries promptly again).
- Update should_redial_initial_peers and its tests to drop the
  retry-budget argument.

hoon/apps/dumbnet (inner.hoon, lib/asert, consensus, derived, miner):
- Add ~% / ~/ jet-registration hints across the inner kernel arms and
  the asert, consensus, derived, and miner libraries so these gates
  can be jetted.
- Restructure +poke to wrap its body in a ~%-hinted %poke-helpers core
  (=< $ over |% ++ $) so the arm and its helpers carry jet hints.

FolderOrigin-RevId: /home/gitlab-runner/builds/Izlke1EJS/0/zorpcorp/nada

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The node deleted .nockchain_identity and generated a fresh peer ID on
every boot (no_new_peer_id defaulted to false). Peers that still mapped
the node's IP to its old peer ID rejected it with wrong-peer-id and
IP-banned it (repeated-wrong-peer-id, up to 6h), isolating the node from
the network and stalling it behind the chain tip.

Default to persisting the existing identity. Add --new-peer-id to force
a fresh one; keep --no-new-peer-id as a backward-compatible no-op (now
the default).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tx-admission check materialized the entire key-set of the heaviest
block's balance (the full UTXO set) via ~(key h-by ...) on every heard
transaction, then silted the tx's few inputs and diffed against it --
O(n log n) plus n allocations per tx, work proportional to the whole
chain's notes rather than to the transaction.

Probe the balance map directly instead: ~(all z-in input-names) with a
jetted ~(has h-by balance) lookup per input. O(k log n) where k is the
tx's input count (tiny) and n is the UTXO set. The same hoist applies to
the dropable-txs GC fold, which no longer builds the key-set at all.

Semantically equivalent: "input present in balance map" is identical to
"input name in key-set of balance map", since the set was exactly
~(key h-by balance). Empty input lists stay vacuously true; duplicate
input names are probed independently. The now-unused get-cur-balance-names
arm is removed.

Validated: roswell test-dumb 252/252 OK, including
test-pending-accepts-inputs-in-heaviest-balance and the v1 variant.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Report of changes:

- Expose additional open zkVM hot-state jets for base58 encoding, Cheetah point serialization, array/Mary helpers, base-field and extension-field arithmetic, polynomial FFT/IFFT/intercosation, Tip5 hashing, Merkle heap construction, and Zoon map/set operations.
- Add backing nockchain-math primitives for base and extension polynomials: inverse FFTs, intercosation, fast extension-field multiplication, quotient helpers, Mary layout/conversion helpers, and direct Tip5 hash/sponge entry points.
- Optimize Tip5 by adding direct ten-cell and varlen hashing paths, shared absorb/squeeze helpers, Montgomery round constants, and a cyclotomic MDS implementation covered against the dense reference.
- Refactor zkVM prover/verifier math so NTT precomputation, degree processing, Merkle heap building, challenge decoding, and composition evaluation are reusable from the open jet layer.
- Harden compute_deep and related jets with explicit input-shape errors/fallbacks instead of panics, keep non-default Tip5 round vectors on the interpreted path, and remove the open verifier backend selector that only resolved to baseline.
- Add Roswell proof-snapshot-for so callers can create proof snapshots for caller-supplied version/header/nonce/length inputs.
- Update build/toolchain support for nightly-2026-04-03 / rustc 1.96, align Clippy allowances between Cargo and Bazel, add smallvec to nockchain-math, and patch Bazel crate builds for aws-lc-sys and tracy-client-sys under macOS/Nix/Bazel.
- Clean up now-unneeded feature gates, tune an e2e dead-process test timeout, and silence an unused retry error binding.

Diffstat:

- 54 files changed
- 3,425 insertions
- 1,171 deletions

Validation:

- Not run locally in this metadata-only amend.

FolderOrigin-RevId: /home/gitlab-runner/builds/Izlke1EJS/0/zorpcorp/nada

Co-authored-by: bitemyapp <bitemyapp@users.noreply.github.com>
Introduce a backbone module and round-robin dialing for built-in backbone peers. Added crate::backbone with BACKBONE_NODES and DEFAULT_BACKBONE_PEER_COUNT (and tests). Updated the libp2p driver to accept backbone_peers and backbone_dial_count, pick a randomized start cursor, and dial a rotating window via next_backbone_window; redial logic now considers backbone peers as well. Removed the old REALNET_BACKBONE_NODES constant from config and wired backbone peers into init. Also added unit tests for the new windowing behavior and updated wallet defaults (README and CLI default public endpoint) to 23.252.122.18:5556.
Introduce CLI commands to list notes for a watched multisig in CSV and to show its aggregate balance. Rust changes: add Commands variants (ListNotesByMultisigCsv, ShowBalanceMultisig), wire them into main dispatch, implement Wallet helpers (watch_multisig, build_multisig_args, list_notes_by_multisig_csv, show_balance_multisig) and adjust TAS/slab handling and validation for multisig args. Hoon changes: add new tags in types, a resolver (watch-first-name-by-b58), reuseable multisig-first-name builder, update do-watch-address-multisig to use it, and add do-list-notes-by-multisig-csv and do-show-balance-multisig implants to produce CSV output and a balance summary for watched multisigs. Also update .gitignore to ignore .DS_Store and notes-*.csv.
Add a .githooks/pre-commit hook that runs cargo fmt and (unless SKIP_CLIPPY=1) cargo clippy --fix on staged Rust files, then stages any fixes so they land in the commit. Add Makefile targets: clippy-fix (apply clippy autofixes) and install-hooks (set core.hooksPath -> .githooks). Apply minor style/import/formatting cleanup across crates (driver.rs, wallet/src/main.rs, backbone.rs) consistent with rustfmt/clippy fixes.
Replace references to the old GitHub organization 'zorp-corp' with 'nockchain' across documentation. Updates include the repo clone URL and internal nockvm links in README.md, crates/nockapp/README.md, and crates/nockvm/rust/murmur3/README.md to reflect the repository/organization rename; no functional code changes.
Add a new CLI command (create-multisig-tx) and plumbing to support planner-backed m-of-n multisig spends. Introduces MultisigLockContext and parsing/validation of --threshold and --participants, reconstructing the canonical SpendCondition and lock_root; builds a multisig payload passed to the kernel so notes whose data omit the lock can be spent. Adjust create_tx planner flow to use a LockRootLockMatcher when multisig context is present, and default refund behavior to return change to the multisig lock when no refund PKH is supplied. Add multisig noun encoding for the kernel, hoon types and wallet changes to accept a supplied input lock, and unit tests validating multisig lock reconstruction and input validation.
Support protocol-fund (014-aletheia) coinbase notes that carry an unsatisfiable wrapped %pkh first-name by adding a canonical fund-note-firstname constant and the corresponding fund-multisig-lock. Route spends whose on-chain first-name matches this constant to a new check-multisig-lock routine that binds the witness-revealed spend-condition to the expected fund lock-root and validates its m-of-n primitive. Update wallet and utils to watch and resolve the wrapped fund note first-name to the real multisig for signing. Add a script to regenerate the fund-note-firstname, and extend unit tests to pin the firstname/multisig constants and exercise valid/invalid recovery flows. Also ignore /txs in .gitignore.
Adds a `--notes-csv` option to `create-tx` and `create-multisig-tx` that reads candidate notes from a previously-downloaded CSV (written by `list-notes-by-address-csv` / `list-notes-by-multisig-csv`) instead of re-downloading the balance. After the transaction is created, notes actually spent are removed from the CSV so they are not reselected on a future run.

Also adds bridge-deposit recipient support to the CLI help text and updates the `--recipient` argument description to document all supported JSON kinds (p2pkh, multisig, bridge-deposit).
Extend `LockRootLockMatcher` to optionally accept protocol-fund coinbase-wrapped first-names derived from multisig lock roots, and use that path in wallet tx planning for multisig spends. This fixes note selection for fund notes while preserving direct lock-root matching behavior, with focused tests covering wrapped-name derivation, selection, regressions, and opt-in behavior. Also reduce log noise by downgrading PMA shutdown flush logs to `debug` and removing redundant "Command executed successfully" info logs in the wallet CLI.
Add a fail-fast block-size guard for create-tx planning and only commit notes-CSV reservations when a real `.tx` file was written. This prevents spending time building unmineable oversized transactions and avoids dropping notes when the kernel rejects the poke without producing output.
Update the wallet tx builder to split v1 fees evenly per input note (with ceiling division) and charge each note before gift allocation, while preserving at least one seedable unit per spent note. This fixes cases where fee-only notes were previously dropped without crediting fee, causing false "insufficient funds" failures. Tests were updated across spend, edge-case, m-to-n, and multisig suites to reflect the new behavior and assert fee totals and conservation instead of expecting those failures.
Implements and registers a new `sign_affine_jet` for `+sign:affine:schnorr:cheetah`, including deterministic signing logic that mirrors Hoon semantics and punts on guard/input mismatches to avoid divergence. Adds comprehensive Rust tests (known-answer vectors, sign/verify roundtrips, guard violations, and jet wrapper coverage) and introduces matching Hoon KAT fixtures/tests to pin byte-identical `[chal sig]` outputs.
Replace tape/string interpolation with cord-based concatenation (rap/cat, bloq 3) in +transaction display. String interpolation with {} on large note cords dominated create-tx time (~22s at 100 inputs); cord concatenation is linear.

Also adds +format-nocks to render amounts as 'X nocks Y nicks' instead of raw nicks, updates note display accordingly, and adds jet hints (~%/~/) throughout wallet-utils for performance.
Adds two rust-script helpers for high-volume multisig workflows:
- `batch_multisig_create.rs`: drains a notes CSV by repeatedly calling `create-multisig-tx` until exhausted
- `batch_multisig_sign.rs`: processes a folder of `.tx` files as a work queue, signing each and moving to done/sent dirs

Also adds `batch-multisig.md` documenting usage, flags, and end-to-end examples.
Updates project branding and ownership details across CI, docs, bridge tooling, tests, and template metadata by replacing legacy Zorp references with Nockchain-neutral naming. Also removes old author/copyright attributions from license and template manifests, drops the deprecated backbone DNS peer entry, and deletes the crate-local nockvm LICENSE file as part of license cleanup.
Introduce a new Hoon utility script that computes the bridge lock-root from a fixed 3-of-5 operator participant set. The script decodes the configured participant PKHs, builds the multisig lock, derives the bridge address hash, and prints both atom and base58 forms (plus a round-trip decode) so the value can be copied into bridge constants after participant/threshold updates.
Introduce --to/--amount/--amount-nicks as shorthand for simple p2pkh sends, and --bridge-deposit/--to-evm-address for Base bridge deposits. Amounts can be specified in whole nocks or raw nicks. Adds --fee and --fee-nicks for fee overrides in both denominations. After successful create-tx, print the saved transaction file path and next-step guidance (including sign-multisig-tx step for multisig). Also document Base bridge details: minimum 100,000 nock deposits, 0.3% fee, and ERC-20 token contract address.
Introduce a new `tx-status` wallet CLI command that checks whether a transaction is confirmed, pending in mempool, or unknown, with optional polling via `--wait` and `--timeout-secs`. Update wallet UX to clarify that `send-tx` means broadcast (not mined), include paid vs consensus minimum fee, and warn when underpaid. Also harden tx rendering in Hoon by tolerating missing input notes (showing placeholders instead of failing) and improve balance output formatting by adding a human-readable nocks line alongside the raw nicks value.
* Fix block-size divergence that wedged the chain on large txs

A large protocol-fund transaction (many small fund-note inputs, each with
a multisig witness) could pass mempool acceptance and gossip between nodes,
then wedge block production: the local miner mined a candidate it then
self-rejected as %block-too-large, so height never advanced.

Root cause: +compute-size-without-txs:page:v1 jams `+>.pag` to size the
page without its digest/proof (both bounded by +max-size constants). That
axis is correct for v0's [digest pow parent ...], but the v1 page prepends
a `version` head, so on v1 `+>.pag` is [pow parent ...] -- it folds the
proof into the jam. A candidate carries pow=~ while the mined block carries
the full proof, so the miner's +candidate-block-below-max-size guard
disagreed with consensus +check-size and produced unminable blocks.

Changes:
- tx-engine-1: jam `+>+.pag` (excludes version, digest, AND pow), so the
  candidate guard and consensus size check agree and the proof is accounted
  for solely by the +max-size:proof reservation.
- tx-engine-0: raise +max-size:proof 1.000.000 -> 2.000.000 bits so the
  reservation stays a true upper bound across variable proof sizes, and
  raise max-block-size 8.000.000 -> 100.000.000 bits so legitimate large
  fund-note transactions fit. Both are consensus-critical (coordinate as an
  upgrade); both only relax limits, so historical blocks remain valid.
- inner.hoon: reject in +heard-tx any transaction too large to ever fit in
  a block, mirroring consensus +check-size, so an unminable tx is discarded
  on receipt instead of being gossiped and re-attempted forever.

Tests (roswell):
- unit/block-size: +compute-size-without-txs is invariant to the presence
  of the proof.
- integration/mempool: an oversize fan-in tx is discarded by the mempool
  size guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

* Set max-block-size to exactly 8 MB (64.000.000 bits)

size is @bits and +compute-size-jam is (met 0 (jam n)), so 8.000.000 bits
== 1 MB and 64.000.000 bits == 8 MB. The cap already includes the proof
(compute-size-without-txs reserves max-size:proof within this budget, and
the real proof is <= that reservation), so the whole block stays at/under
8 MB -- under the 10 MB ceiling. More conservative than the prior value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

* Set max-block-size to 4 MB (32.000.000 bits)

4 MB (32.000.000 bits) block cap, proof included via the max-size:proof
reservation. Comfortably fits the incident-sized fund-note transactions
(bounded under ~875 KB) with margin, while keeping a conservative
DoS/validation surface well under the 10 MB ceiling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

* Keep max-size:proof at 1.000.000 bits (~125 kB)

Revert the proof reservation to its original bound. The size-divergence fix
does not depend on this value -- it only requires the reservation to be a
true upper bound on real proofs, which this already is. Keeps the reserved
proof budget unchanged while max-block-size grows to 4 MB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

* Set max-size:proof to 2.000.000 bits (~250 kB)

Raise the proof reservation from 125 kB to 250 kB for margin over the
largest real proofs, since proofs are not all the same size. The block
cap (4 MB) already includes this reservation, so blocks stay well under
the 10 MB ceiling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

* Set max-block-size to 2 MB (16.000.000 bits)

Less extreme cap than 4 MB. 2 MB (16.000.000 bits), proof included via the
max-size:proof reservation. Still comfortably fits the incident-sized
fund-note transactions (block ~1.1 MB) with margin, under the 10 MB ceiling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PScHfkA8184y7tJaPzeWRw

---------

Co-authored-by: Claude <noreply@anthropic.com>
Update the `block-size` unit test to use `%+ expect-eq` with proper Hoon rune structure, preserving the same assertion while correcting the invocation form.
…ault max block size

Raise the default `max_block_size` from 8 MB to 16 MB in `BlockchainConstants` and update the corresponding test expectation to match the new default.
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.

8 participants