17 Commits
Author SHA1 Message Date
zeekay d6d5029ffb fix(deps): correct moved-tag hashes for luxfi modules in go.sum
Several luxfi versions carry TWO different contents across this workspace,
because published tags were moved instead of a new patch being cut:
age@v1.5.0, pq@v1.0.3, threshold@v1.9.4, zap@v0.6.0, zap@v0.8.1.

Adjudicated before editing, since "checksum mismatch / SECURITY ERROR" is also
what a real supply-chain attack looks like. It is not one here: sum.golang.org
holds the OLD hash while proxy.golang.org and a direct fetch BOTH serve the same
NEW bytes. Two independent transports agreeing means nothing is rewriting
content in flight — the tag moved at source. The sumdb entry is a fossil:
GOPRIVATE covers github.com/luxfi/* with GOSUMDB=off, so our own modules never
consult the checksum DB and a moved tag splits consumers silently.

The old bytes are served by nothing now, so a stale pin can never build.
Corrected to the only content that exists, in BOTH line forms (h1: and
/go.mod h1:) — Go reports these one at a time, so a partial fix just relocates
the error.

Deliberately no `go mod tidy`: this changes no selected version, only the
recorded hash of versions already chosen.

Verified: `go list -m all` resolves with no checksum error.

The durable fix is upstream: never move a published tag, cut x.y.z+1 instead.
2026-07-26 02:42:51 -07:00
zeekay 6c71523404 chore(deps): bump geth v1.20.1 + luxfi deps — stack unification 2026-07-15 11:12:36 -07:00
zeekayandHanzo Dev 88092f354c deps: zap v1.2.4 — eager-reserve + value ObjectBuilder (X-tx wire build 922->655ns)
Byte-identical wire; all 11 fx round-trip suites green. Composite build now
655ns/5allocs (from 922/11 at zap v1.2.3).

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-14 09:35:08 -07:00
zeekayandHanzo Dev 40d500f6dd wire: export AppendTransferable{Out,In} + TransferableXFromObject
So node ExportTx/ImportTx nest their extra outs/ins as native object-ptr lists
the SAME way XVMBaseTx does — one way to nest a transferable, no standalone
envelope. XVMBaseTx switched to the exported names internally.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-14 06:35:46 -07:00
zeekayandHanzo Dev b1055294a2 wire: native-nested XVMBaseTx (AddObjectPtr object lists) — 2.8x faster X-tx build
Replace the byte-blob composite (per-container TypeKind/ShapeKind prefix +
OutsBytes/InsBytes concat + parallel u32 length lists) with native ZAP nesting:
XVMBaseTx carries Outs/Ins as AddObjectPtr object-lists, each element a
TransferableOut/In OBJECT living inline in the same buffer. The fx-agnostic
container needs no prefix (fx polymorphism stays on the inner Output/Input
envelope's discriminator, stored zero-copy in the leaf bytes field). Needs zap
v1.2.3 (List.ObjectPtr).

Composite 2in/2out money-move build (vs prior wire):
  v0.5.2 byte-blob:      2551ns / 5328B / 37 allocs
  v0.5.4 pooled+fixed:   1345ns / 2401B / 19 allocs
  v0.5.5 native-nested:  ~913ns / 1328B / 11 allocs   (2.8x / 4x mem / 3.4x allocs vs v0.5.2)

Fully general — all 11 fx round-trip suites green (secp/ed25519/mldsa/slhdsa/
secp256r1/schnorr/bls/nft/property + wire). NewXVMBaseTx now takes
XVMTransferOut/In (AssetID + inner envelope) directly; standalone
NewTransferableOut/In + WrapTransferableOut/In envelopes are gone (they only
ever nested). The remaining 11 allocs are the 4 leaf .Bytes() envelopes + slices;
leaf-inline (per-fx AppendObject) is the zero-alloc follow-up.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-14 06:33:40 -07:00
zeekayandHanzo Dev 542c597c19 lint: fix remaining 3 math.Mul64 (secp256k1fx/secp256r1fx/slhdsafx)
golangci-lint's max-same-issues:3 truncated the CI display to 3 of 6 Mul64
sites; v0.5.2 fixed the 3 shown, these are the 3 suppressed ones. All safemath
Mul64/Add64 now use the generic math.Mul/Add. CI lint job now clean (the 3
residual staticcheck findings are Go-1.26 crypto-coordinate deprecations in
secp256r1fx/keychain.go that golangci-lint v2.1.6 does not flag; crypto/ecdh
refactor tracked separately). 11/11 packages pass.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-13 03:50:52 -07:00
zeekayandHanzo Dev 8c27b47bdf wire: pool builders + SetBytesFixed for IDs — 1.9x faster X-tx composition
Write-path hot fix across all 21 wire constructors:
- zap.NewBuilder(capEstimate) -> zap.GetBuilder()/defer PutBuilder: recycle the
  Builder + its grown backing array (needs zap v1.2.2). All 21 return
  writeEnvelopePrefix(...b.Finish()), which COPIES out before the deferred Put,
  so pooling is safe.
- 7 per-byte ID loops (for i<32 { SetUint8(off+i, id[i]) }) -> one SetBytesFixed
  memcpy (TxID/AssetID/BlockchainID in utxo, transferable, xvm_base_tx;
  AttestedHash in attestation).
- rides zap v1.2.2's zero-copy SetBytes (no per-field heap copy).

Composite X-chain money-move (2out+2in, secp256k1fx) wire build:
2551ns/5328B/37allocs -> 1345ns/2401B/19allocs (1.9x faster, 2.2x less mem,
48% fewer allocs). Byte output UNCHANGED — full round-trip suite (11 pkgs) green.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-13 03:43:05 -07:00
zeekayandHanzo Dev 6efa1285f9 lint: clean all 21 staticcheck findings — CI green, drop last codec reference
- SA1019: math.Mul64/Add64 -> generic math.Mul/Add (ed25519fx, mldsafx,
  schnorrfx inputs; flow_checker; utxo_fetching); prefixdb.NewNested -> New (alias)
- unused: DELETE dead codecVersion const (last codec reference in utxo — full
  ZAP native now), isSortedAndUniqueOrdered (root + secp256k1fx), mldsafx
  Keychain.get, and all 6 redundant TransferOutput.isState() markers (the
  embedded verify.IsState already provides State membership)
- QF1008: drop embedded-field selectors (utxo_wire, ed25519fx, nftfx,
  propertyfx + tests); ST1005: lowercase Schnorr error string

Behavior-identical; 11/11 packages pass.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-12 22:32:45 -07:00
zeekayandHanzo Dev f106a1abb9 wire: TransferableOut/In envelopes (AssetID + inner fx) — multi-asset XVMBaseTx
X-Chain is multi-asset, but XVMBaseTx.OutAt/InAt returned bare fx
TransferOutput/TransferInput with no AssetID. Add the reserved cross-fx
envelopes TransferableOut (ShapeKindTransferableOut=0x0B) and
TransferableIn (ShapeKindTransferableIn=0x0C) in wire/transferable.go,
mirroring wire/utxo.go's AssetID+Output layout, and rewire OutAt/InAt to
return them so callers recover the per-out/per-in AssetID (and, for
inputs, the spent UTXOID).

- TransferableOut: AssetID 32B @0, Output bytes @32 (size 40);
  TypeKindReserved + ShapeKindTransferableOut.
- TransferableIn: TxID 32B @0, OutputIndex u32 @32, AssetID 32B @36,
  Input bytes @68 (size 76); TypeKindReserved + ShapeKindTransferableIn.
- Both Wrap* reject trailing bytes (msg.Size()!=len) via ErrTrailingBytes,
  matching the proven node block/blockwire.go ErrExtraSpace canonical gate.
- NewXVMBaseTx unchanged (Outs/Ins are pre-built envelopes).

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-11 23:13:51 -07:00
zeekayandHanzo Dev 1ef876c1ed wire: nftfx + propertyfx envelopes (TypeKindNFT/Property + 6 shapes)
Completes the fx wire for the two application fx families so xvm can go
struct-is-wire (LP-023): TypeKindNFT=0x08, TypeKindProperty=0x09; shapes
NFTMintOutput=0x10, NFTTransferOutput=0x11, NFTMintOperation=0x13,
NFTTransferOp=0x14, OwnedOutput=0x15, BurnOperation=0x16 (appended; bare-
owners property MintOutput + credentials reuse the shared shapes). fx-side
Bytes()/Wrap* per type in nftfx/wire.go + propertyfx/wire.go following the
secp256k1fx/wire.go template. NEW wire.NextEnvelope: the ONE packed-envelope
walker (SignedTx creds / XVMBaseTx outs-ins / nft mint owners all use the
same split rule). Round-trip + cross-shape-confusion tests green.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-11 17:55:06 -07:00
zeekayandHanzo Dev 2a0077bde9 fix(deps): repair vanished pins / go.sum drift ( core-bump@latest pq@v1.1.0) + build green
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-06-30 14:12:43 -07:00
zeekay 49aecb55f7 Merge branch 'bump/luxdb-v1.19.3' 2026-06-30 14:11:53 -07:00
zeekay 20e4e03229 chore: bump luxfi/database v1.19.3 2026-06-25 13:06:02 -07:00
zeekay 2dec8ce94d deps: update to latest real-semver, drop local replaces, fix breaks 2026-06-11 09:09:32 -07:00
Zach Kelling 919ebecbf4 chore: add BSD-3-Clause LICENSE 2026-02-14 05:26:25 -08:00
Zach Kelling e3020ee02b chore: sync dependencies and format code 2026-02-04 15:45:43 -08:00
Zach Kelling 1c265396e1 fix: update dependencies and fix type errors
- Fix ids.ToShortID multi-value error in mldsafx
- Add runtime v1.0.1 dependency
- Update transferables for consensus compatibility
2026-01-26 09:10:39 -08:00