mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
Its transactions were the named job and are done; what was left was everything else the chain writes. Three more schemas, and the offsets are out of the source entirely. chains/schema/warp.zap — the warp envelope, the payloads it carries, and the conversion preimage an L1's id is the hash of. Eleven structs across warp.rs and warpmsg.rs, and the differential still reproduces the warp message Go wrote, byte for byte. chains/schema/state.zap — what a P node writes to its own disk. Separate from the wire on purpose: a change to a wire schema is a fork, a change to this one is a migration, and one file per consequence is how you can tell which you just made. The rest went into pchain.zap: the fx primitives the chain spends when they travel alone rather than inside a transaction, the standalone owner key a locked balance is tallied under, and a genesis blob. TWO THINGS THE SCHEMAS HAD TO SAY OUT LOUD, and would have moved bytes otherwise. The stored Staker reserves sixteen bytes past its last field — it always has, and a schema that stopped at the public key would write a shorter record than every record already on disk, so those bytes are named Reserved for the same reason Out and In name their Pad. And the P-chain's standalone owner key is NOT the fx owner shape: the same two fields in the other order, because one is a key and one is a wire. Naming them apart is what keeps a reader from finding a threshold where a locktime is. TransferOutput and Utxo are now declared in two schemas — xchain.zap and pchain.zap — because the X-chain makes them and the P-chain spends them. That is two statements of one format and it is the wrong number. The right number needs an import across schemas that zapgen does not have, and cannot get cheaply: xchain.zap's own envelope holds list<ptr<TransferableOut>>, so the reference cannot be moved away from the file that declares it. Until then chains/rust/zap/tests/one_format.rs reads both schemas and fails the day the two declarations drift — which is the day before a P node and an X node stop agreeing about a UTXO. Its negative control was run: change one offset in one file and it fails, naming the struct. WHAT IS LEFT. Nothing. No Rust chain hand-writes a wire shape any more. The only remaining calls to the builder outside a generated module are two tests crafting deliberate buffers to feed a reader, which is where a hand-built object belongs, and two generic list helpers that take a builder and know nothing about any shape. 424 platformvm tests including the warp and chain differentials, the corpus byte test and the hostile-bytes fuzz; `make wire` verified a fixed point over all seven schemas.
8 lines
151 B
TOML
8 lines
151 B
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "lux-zap"
|
|
version = "0.1.0"
|