Files
chains/zkvm/codec.go
T
zeekay 4a9b1b3456 chains: migrate bridgevm/zkvm/thresholdvm to node/vms/pcodecs
Wave 2D codec-rip extension for chains repo:
- bridgevm/codec.go: codec.Manager + linearcodec.NewDefault → pcodecs
- zkvm/codec.go: same pattern
- thresholdvm/codec.go: same pattern
- Bump luxfi/warp v1.18.6 → v1.19.3 (closes warp→ids→codec/wrappers transitive)
- Bump luxfi/ids v1.2.14 → v1.2.15 (drops codec/wrappers from Prefix/Append)

luxfi/codec remains as // indirect via proto/zap_codec → codec/zapcodec
(the actual ZAP wire impl — physical relocation to luxfi/zap/codec
queued separately). Tests pass for all three VMs.
2026-06-06 15:40:20 -07:00

32 lines
577 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package zkvm
import (
"errors"
"github.com/luxfi/node/vms/pcodecs"
)
const codecVersion = 0
var Codec pcodecs.Manager
func init() {
Codec = pcodecs.NewMaxIntManager()
lc := pcodecs.NewLinearCodec()
err := errors.Join(
lc.RegisterType(&Transaction{}),
lc.RegisterType(&Block{}),
lc.RegisterType(&UTXO{}),
lc.RegisterType(&Genesis{}),
lc.RegisterType(&ZConfig{}),
Codec.RegisterCodec(codecVersion, lc),
)
if err != nil {
panic(err)
}
}