6 Commits
Author SHA1 Message Date
Hanzo AI fb53885497 go: 1.26.3 → 1.26.4 (security: crypto/x509, mime, net/textproto) 2026-06-06 22:09:18 -07:00
Hanzo AI c629280b97 deps: bump luxfi/vm v1.2.0, sampler v1.1.0, staking v1.5.0 (relicense)
Picks up the 2026-06-06 relicensing:
- luxfi/vm v1.2.0 → Lux Ecosystem License v1.2 (was Lux Research v1.0).
  License-only retag of the extracted runtime; patent reservation
  preserved for runtime optimization surfaces, royalty-free for
  Descending Chains.
- luxfi/sampler v1.1.0 → BSD-3-Clause (was Lux Research v1.0).
  License restored to match the luxfi/node provenance (originally
  extracted from node/utils/sampler).
- luxfi/staking v1.5.0 → BSD-3-Clause (was Lux Research v1.0).
  License restored to match the luxfi/node provenance.

No code changes in this commit — go.mod/go.sum only.
2026-06-06 19:02:28 -07:00
Hanzo AI d5bf6e461b deps: bump p2p v1.21.1, node v1.29.3, sdk v1.17.6, vm v1.1.11 (Wave 2G-Cascade)
cmd: also drop the local codec replace directive — codec v1.1.5 has the
canonical zapcodec extracted to its own module per Wave 2G-Archive.
2026-06-06 06:31:34 -07:00
Hanzo AI bba8e11fb4 genesis/builder: migrate from staging shim to proto/zap_codec
Wave 2G-Archive completes the genesis-builder migration: the staging
shim builder/zap_codec.go (created during Wave 2G-Genesis to mirror
proto/zap_codec's surface before it was tagged) is now deleted, and
builder.go imports proto/zap_codec directly.

Changes:
  - builder.go: pvmGenesisCodec / newXVMParserCodecs swap to
    proto/zap_codec.NewPVMGenesis / NewXVMParser
  - builder/zap_codec.go: deleted (staging shim no longer needed)
  - go.mod: bump luxfi/proto v1.1.0 → v1.3.0 (first tag that exposes
    proto/zap_codec; v1.3.0 also includes the proto/internal test
    helper migration from Wave 2G-Internal)

luxfi/codec demoted to // indirect — kept transitively via deps that
haven't re-tagged yet. Will drop on the next upstream tagging cascade.
2026-06-06 05:52:54 -07:00
Hanzo AI 8da1cca53b genesis/builder: ZAP-native genesis codec (Wave 2G-Genesis)
Migrates pvmGenesisCodec() and newXVMParserCodecs() off the legacy
linearcodec big-endian wire format onto the ZAP-native zapcodec
little-endian wire format. Aligned with LP-023 ZAP-native activation
(proto/zap_native: ZAPActivationUnix=0 — "ZAP mandatory from genesis"),
forward-only.

Wire-format verdict: BREAK.

ZAP-native bytes are NOT byte-equivalent to legacy linearcodec bytes —
endianness flips for every uint16/uint32/uint64/string-length prefix.
The canonical signature (PVM Genesis with Timestamp=0x0102030405060708,
InitialSupply=0x1112131415161718, Message="z"):

  legacy linearcodec (BE): ... 01 02 03 04 05 06 07 08  11 12 13 14 15 16 17 18 ...
  ZAP-native zapcodec (LE): ... 08 07 06 05 04 03 02 01  18 17 16 15 14 13 12 11 ...

No coordinated network upgrade needed: this is the first ZAP-native
genesis tag, and no production validator was running legacy linearcodec
in the post-LP-023 fleet. Mainnet/testnet/devnet/localnet all bootstrap
ZAP-only from genesis.

Code changes:

  - builder.go:
      Drop github.com/luxfi/codec + .../linearcodec direct imports.
      Drop math.MaxInt32 inline construction.
      pvmGenesisCodec()    calls newZapCodecPVMGenesis(CodecVersion)
                           + pchainblock.RegisterTypes(cm).
      newXVMParserCodecs() calls newZapCodecXVMParser(CodecVersion).
      Mirrors sdk/wallet/chain/p/pcodecs.NewPVMGenesisCodec and
      sdk/wallet/chain/x/constants.go::newXVMParserCodecs which already
      moved to proto/zap_codec in Wave 2G-Wallet.

  - zap_codec.go (new):
      Staging shim mirroring proto/zap_codec's public surface
      (NewPVMGenesis, NewXVMParser, Manager.{Marshal,Unmarshal,Size,
      RegisterType,SkipRegistrations}). When Wave 2G-Wallet lands and
      tags github.com/luxfi/proto/zap_codec, this file deletes and the
      two helpers in builder.go swap to that import — mechanical, no
      behavioural change because both shim and target wrap the same
      zapcodec.Codec backend.

  - wire_test.go (new):
      TestWire_PVMGenesisRoundtrip      — bytes-out, parse-back, re-marshal stable
      TestWire_PVMGenesisVersion        — LE codec-version prefix
      TestWire_PVMGenesisDeterministic  — same Config → same bytes + UTXOAssetID
      TestWire_XVMGenesisRoundtrip      — XVM ParserCodecs construction smoke
      TestWire_XVMGenesisDeterministic  — UTXOAssetID stability across builds
      TestWire_HexSignature_PVMGenesis  — mainnet 32-byte prefix tripwire
      TestWire_FormatBreak_Documented   — pinned hex wire-format signature

  - go.mod:
      luxfi/codec  v1.1.4 (indirect) → v1.1.5 (direct: zapcodec backend)
      luxfi/accel  v1.1.4 (indirect) → v1.1.8 (transitive)

Constraint-compliance:

  - NO github.com/luxfi/codec imports in builder.go (verified by grep).
  - NO snow/avalanche/subnet naming.
  - All builder tests pass (go test ./...).
  - All parent genesis + cmd modules build clean.
  - Race detector clean.

TODO (wave-2g-wallet): once luxfi/proto tags include the zap_codec
subpackage, swap zap_codec.go's shim for the canonical
github.com/luxfi/proto/zap_codec import in builder.go and delete the
shim file.
2026-06-06 04:58:12 -07:00
Hanzo DevandGitHub 0c52be9d9b decomplect: move heavy-dep tests + nest builder/security modules (#12)
This is the third decomplect layer:

1. builder/ now a nested module (github.com/luxfi/genesis/builder)
   — uses luxfi/utxo, vm, database, proto
2. pkg/genesis/security/ now a nested module
   — uses luxfi/consensus for ChainSecurityProfile verification
3. do_transfer_test.go moved from pkg/genesis/ → builder/
   — it imports luxfi/utxo/secp256k1fx which was forcing the entire
   v1.27.x-era dep cascade onto downstream consumers via test-deps
   in the module graph

Result on the root module's MVS-visible graph:
- consensus      v1.25.0  → v1.22.84  (matches luxd v1.23.42 family)
- database       v1.18.3  → v1.17.44  (matches luxd v1.23.42 exactly)
- validators     v1.2.0   → v1.0.0    (matches luxd v1.23.42 exactly)
- threshold      v1.6.17  → GONE      (no longer in graph at all)
- node           v1.27.24 → v1.20.3   (transitive, harmless)

Closes the v1.23.x backport blocker for canonical evmAddr/utxoAddr.

luxd v1.23.43 (genesis bump) can now adopt the canonical genesis
schema without dragging the v1.27.x post-quantum threshold refactor
into a v1.23.x production line.

One-direction module dep:
- github.com/luxfi/genesis          (data types — minimal deps)
- github.com/luxfi/genesis/security (verification — uses consensus)
- github.com/luxfi/genesis/builder  (tx-building — uses utxo/vm/db)
- github.com/luxfi/genesis/cmd      (tools — uses node)

Never the reverse.
2026-05-30 17:38:21 -07:00