This upgrades Sig's conformance harnesses, CI pipeline, and feature set
to be compatible with Agave 4.0.
The diff is large, but the changes to existing sig code are small.
- ~500 lines are the list of fixtures in failing.txt
- ~3000 lines are a python package called `parseout` that I added to
parse test outputs. See the readme for more information.
## Current Test Results
All of the remaining failures are related to crypto programs. #1296
fixes the 80 zksdk instruction harness tests. The 102 txn harness
failures are all related to the zk el gamal proof and secp256r1
programs, and we do not have fixes for those yet.
```
elf_loader/fixtures │ Pass 953 │ Fail 0 │ Skip 0
instr/fixtures/bpf-address-lookup-table │ Pass 2 │ Fail 0 │ Skip 0
instr/fixtures/bpf-config │ Pass 1 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader │ Pass 10 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-upgradeable-v1-programs │ Pass 371 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v1-programs │ Pass 7 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v2 │ Pass 18 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v2-programs │ Pass 7 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v3 │ Pass 349 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v3-programs │ Pass 510 │ Fail 0 │ Skip 0
instr/fixtures/bpf-loader-v4 │ Pass 7 │ Fail 0 │ Skip 0
instr/fixtures/compute-budget │ Pass 127 │ Fail 0 │ Skip 0
instr/fixtures/stake │ Pass 6933 │ Fail 0 │ Skip 0
instr/fixtures/system │ Pass 5324 │ Fail 0 │ Skip 0
instr/fixtures/unknown │ Pass 28 │ Fail 0 │ Skip 0
instr/fixtures/vote │ Pass 5987 │ Fail 0 │ Skip 0
instr/fixtures/zk_sdk │ Pass 168 │ Fail 80 │ Skip 0
syscall/fixtures/abort │ Pass 3 │ Fail 0 │ Skip 0
syscall/fixtures/alt_bn128 │ Pass 3228 │ Fail 0 │ Skip 0
syscall/fixtures/blake3 │ Pass 16 │ Fail 0 │ Skip 0
syscall/fixtures/cpi │ Pass 780 │ Fail 0 │ Skip 0
syscall/fixtures/create_program_address │ Pass 6 │ Fail 0 │ Skip 0
syscall/fixtures/curve25519 │ Pass 106 │ Fail 0 │ Skip 0
syscall/fixtures/get_epoch_schedule │ Pass 2 │ Fail 0 │ Skip 0
syscall/fixtures/get_return_data │ Pass 2 │ Fail 0 │ Skip 0
syscall/fixtures/keccak256 │ Pass 16 │ Fail 0 │ Skip 0
syscall/fixtures/log │ Pass 31 │ Fail 0 │ Skip 0
syscall/fixtures/log_data │ Pass 13 │ Fail 0 │ Skip 0
syscall/fixtures/memcmp │ Pass 3 │ Fail 0 │ Skip 0
syscall/fixtures/memcpy │ Pass 74 │ Fail 0 │ Skip 0
syscall/fixtures/memmove │ Pass 54 │ Fail 0 │ Skip 0
syscall/fixtures/memset │ Pass 88 │ Fail 0 │ Skip 0
syscall/fixtures/panic │ Pass 11 │ Fail 0 │ Skip 0
syscall/fixtures/poseidon │ Pass 42 │ Fail 0 │ Skip 0
syscall/fixtures/secp256k1 │ Pass 33 │ Fail 0 │ Skip 0
syscall/fixtures/sha256 │ Pass 16 │ Fail 0 │ Skip 0
syscall/fixtures/sol_get_sysvar │ Pass 236 │ Fail 0 │ Skip 0
syscall/fixtures/stack_height │ Pass 1 │ Fail 0 │ Skip 0
syscall/fixtures/try_find_program_address │ Pass 15 │ Fail 0 │ Skip 0
syscall/fixtures/vm │ Pass 3 │ Fail 0 │ Skip 0
txn/fixtures │ Pass 5142 │ Fail 102 │ Skip 0
Summary:
Passed: 30723
Failed: 182
Skipped: 0
```
## Overview
1. **Upgrade conformance dependencies:** Latest versions are now
specified in commits.env used for Agave 4.0 conformance.
2. **Wire format updates:** Regenerated protobuf bindings (`v1.pb.zig`)
and hand-wrote FlatBuffer serialization (`elf_types.zig`) to match Agave
4.0's protosol definitions.
3. **Harness adaptation:** Updated `txn_execute.zig`, `elf_loader.zig`,
`utils.zig`, and `vm_interp.zig` to consume/produce the new formats.
4. **Use text-vectors directly**, since it actually contains the
necessary expectations from agave, instead of downloading generated
fixtures from our repository.
4. **Exclude failing tests** from failures.txt and stop getting a list
of fixtures from fixtures.txt because ci-run.sh can find all the
fixtures in test-vectors.
6. **Feature set:** Added new features to the feature set, but didn't
implement the features yet. This fixed many tests in the instruction
harness that panicked due to unknown features.
## Caveats
- Slot is hardcoded (`10` for txn, `0` for instr/VM) rather than read
from the fixture. This was previously the fallback behavior only when
the slot is unspecified. Now the slot is never specified, so it's the
only behavior.
- The ELF loader types are now hand-maintained FlatBuffers -- upstream
format changes require manual updates rather than protobuf regeneration.
- The 2,303 entries in `failing.txt` represent existing conformance gaps
that predate this PR. Fixing these is not in scope.
---------
Co-authored-by: InKryption <inkryption07@gmail.com>
Co-authored-by: InKryption <trevor.berrange@syndica.io>
anza-xyz/agave#10000
Fixes all the zksdk failures in the instruction harness