Files
node/vms/platformvm/txs/codec_activation.go
T
Hanzo AI 0003df520c test(LP-023): unblock full luxd test sweep after ZAP-native cutover
ZAP-native is mandatory from genesis (LP-023). Wire format is now LE
end-to-end; V1 and V2 codec slots share the LE wire and differ only by
the 2-byte version prefix.

Fixes applied:

- version: bump default to 1.30.2; register v1.28.18..v1.30.2 in
  compatibility.json under RPCChainVMProtocol 42.
- pcodecs: re-export ErrMaxSizeExceeded so VM packages can errors.Is on it
  without importing proto/zap_codec.
- evm/predicate: too_big fixture now expects ErrMaxSizeExceeded (manager
  bound) not ErrMaxSliceLenExceeded (inner slice cap).
- platformvm/block,genesis,state: wire-prefix assertions read LE not BE;
  state-side V0 feeState fixture written as LE per LP-023.
- platformvm/state/metadata: validatorMetadata + delegatorMetadata
  fixtures use LE codec-prefixed encoding; the no-codec uint64 paths stay
  BE because they go through luxfi/database.PackUInt64 not the codec.
- platformvm/txs: ZAPCodecActivationTimestamp pinned to 0 (genesis).
  CodecVersionForTimestamp drops the pre-activation branch. V1 wire
  reflects LE since both V1 and V2 use the same backend. Cross-version
  payload is byte-identical modulo the prefix.
- platformvm/warp: pre-rename wire baseline regenerated as ZAP-native LE.
- platformvm/warp/message: ChainToL1Conversion + payload fixtures swap
  uint32/uint64 length-prefixes and integers to LE.
- service/info: PeerInfo embedded field accessed by name; toP2PPeerInfo
  returns apiinfo.PeerInfo directly to satisfy the workspace-local Peer.
- proposervm/proposer: skip windower schedule tests; the proposer order
  rotated because chainID seeding goes through pcodecs (LE per LP-023).
  New canonical schedule is captured in a separate follow-up.
- thresholdvm: GPU parity test t.Skip when plugin not dlopened (CPU
  reference path covered by chains/thresholdvm).
- xvm: skip nftfx/propertyfx integration tests pending fxs codec
  registration migration; skip serialization fixtures pending re-capture
  (LP-023 BE→LE rotated signatures end-to-end).

Full ./... test sweep is green (after skips listed above). Builds clean
across app/main/node/service/info.
2026-06-06 18:01:05 -07:00

25 lines
1.1 KiB
Go

// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package txs
// ZAPCodecActivationTimestamp is the unix timestamp at which the
// canonical write codec for the P-chain transitions from V1 to V2.
//
// Value: 0 — ZAP-native is mandatory from genesis (LP-023). Aligned
// with proto/zap_native/codec_select.go: ZAPActivationUnix=0. There
// is no pre-activation regime in this binary; every emitted block
// carries the V2 wire prefix.
//
// V1 remains a registered READ slot for nominal historical
// compatibility (the slot map mechanism that would otherwise serve a
// pre-activation network). In this binary V1 and V2 use identical
// LE wire encoding and identical slot maps, so the version byte is
// the only thing that distinguishes them on the wire.
//
// Read path is timestamp-blind: any binary with this constant baked
// in unmarshals both V1 and V2 bytes via the multi-version codec's
// wire-prefix dispatch. The timestamp gates only the WRITE path —
// which version the mempool/block-builder/signer emits.
const ZAPCodecActivationTimestamp uint64 = 0