Mw/fixed lib.rs#33
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.