Skip to content

Mw/fixed lib.rs#33

Merged
nallux-dozryl merged 3 commits into
nockpool/hoonfrom
mw/fixed_lib.rs
Aug 7, 2025
Merged

Mw/fixed lib.rs#33
nallux-dozryl merged 3 commits into
nockpool/hoonfrom
mw/fixed_lib.rs

Conversation

@nallux-dozryl

Copy link
Copy Markdown

No description provided.

@nallux-dozryl nallux-dozryl merged commit c53fe98 into nockpool/hoon Aug 7, 2025
yapishu pushed a commit that referenced this pull request Mar 19, 2026
… support in rust (#33)

Detailed Changes

Wallet / CLI

Added Rust-side create-tx planning to nockchain-wallet before dispatching the existing kernel command.
Made create-tx --names optional; omitting it now enables automatic note selection.
Made create-tx --fee optional; when omitted, the planner computes the fee.
Added planner-aware fee override behavior, including explicit low-fee override handling.
Kept manual note selection mode, with parity checks to ensure the planner selects exactly the user-requested notes.
Added ascending/descending note selection support to the CLI and test coverage for the default/override behavior.
Updated wallet docs to describe auto-selection and planner-computed fees.
Added extensive wallet tests for parsing, signer selection, refund handling, planner constants, fakenet behavior, and lock matching.

New wallet-tx-builder crate

Added a new workspace crate for transaction planning.
Added normalized snapshot collection with height/block-id consistency checks and duplicate-note detection.
Added deterministic candidate ordering and planner-side selection policies.
Added typed decoding and construction for %lock, %bridge, and %bridge-w note-data payloads.
Added lock resolution logic for simple PKH and coinbase-style PKH+timelock spends.
Added seed-word and witness-word estimation, including pre-/post-Bythos fee behavior.
Added fee computation with Bythos witness divisor handling and minimum-fee enforcement.
Added checked-in planner fixtures and tests for note-data decoding and fee logic.

nockchain-types / tx-engine

Moved blockchain constants and fakenet defaults into nockchain-types as shared protocol/runtime data.
Added a canonical FirstName wrapper and first-name derivation from lock roots.
Added handwritten v1 hashable support for lock primitives, spend conditions, list/mary hashables, and first-name derivation.
Expanded v1 locks from simple spend conditions to tagged lock trees (%2, %4, %8, %16), including flattening, leaf counting, and consensus hashing.
Replaced bespoke z-map/z-set encode/decode logic across v0/v1 types with typed ZMap/ZSet usage.
Canonicalized PKH and HAX hash collections through typed constructors so duplicate and out-of-order inputs normalize cleanly.
Added a raw-tx word-count oracle jam fixture and expanded fixture regeneration documentation.
Extended v1 raw-tx tests to assert seed words, witness words, tx word count, minimum fee, and paid fee from the checked-in fixture.

Math / serde / hashing

Added OwnedBasedNoun, an allocator-free owned noun representation for based atoms plus direct noun hashing support.
Added reusable owned ZTree infrastructure and public ZMap / ZSet types with deterministic ordering, deduplication, encode/decode, and hash folding.
Defined ZMap duplicate-key behavior as last-write-wins and ZSet behavior as insertion-order-independent deduplication.
Fixed Belt noun encoding to always allocate atoms instead of assuming direct immediates.
Extended noun-serde-derive to support numeric enum tags like #[noun(tag = 2)].
Added support for per-variant #[noun(untagged)] decoding/encoding paths.
Added duplicate-tag validation in the derive macros.
Added derive tests for lock-tree-style tagged unions and mixed numeric/string tags.

gRPC / conversion

Added protobuf-to-Rust conversion for v1 raw transactions.
Updated gRPC lock decoding to canonicalize PKH/HAX hash collections before constructing tx-engine values.
Added conversion tests covering canonicalization through lock primitives, spend conditions, and full raw transactions.
Added a proto note that NoteData is still blob-only and may later expose typed decoded data.

Wallet Hoon / runtime integration

Changed wallet %fakenet handling to carry full blockchain constants instead of only patching the coinbase timelock.
Added machine-readable wallet peeks for %blockchain-constants, %signing-keys, and %tracked-locks.
Updated wallet utility code to count seed words against the wallet’s bound tx-engine instance.
Aligned Hoon first-name helpers with the Rust planner for simple and coinbase lock handling.

Node / integration updates

Updated nockchain to consume shared fakenet blockchain constants from nockchain-types.
Added wallet-tx-builder as a wallet dependency and nockchain-types as a zkvm-jetpack dependency so shared hashing/helpers can be reused by jets and wallet code.

---------

Co-authored-by: bitemyapp <bitemyapp@users.noreply.github.com>
Co-authored-by: litlep-nibbyt <9344275+litlep-nibbyt@users.noreply.github.com>
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.

4 participants