Skip to content

zksdk 5.0 conformance#1296

Merged
Rexicon226 merged 1 commit intomainfrom
Rexicon226/zksdk-upgrade
Apr 5, 2026
Merged

zksdk 5.0 conformance#1296
Rexicon226 merged 1 commit intomainfrom
Rexicon226/zksdk-upgrade

Conversation

@Rexicon226
Copy link
Copy Markdown
Collaborator

@Rexicon226 Rexicon226 commented Mar 7, 2026

anza-xyz/agave#10000

Fixes all the zksdk failures in the instruction harness

@Rexicon226 Rexicon226 requested review from dnut, ultd and yewman as code owners March 7, 2026 03:05
@github-project-automation github-project-automation Bot moved this to 🏗 In progress in Sig Mar 7, 2026
@Sobeston
Copy link
Copy Markdown
Contributor

Sobeston commented Mar 9, 2026

Total test cases: 23245
Passed: 23226, Failed: 19, Skipped: 0
Failed tests: ['w18_c92df030cdb833aa', '2a159c214135a36023fae14efcfbecd62b230823_2631802', '1a3584a220639d46eb8b03a7069ca7d3796b8659_2372912', 'acc3_ebe44c34d0597db7', 'verif14_1ba273b1d8d85441', 'verif25_e9f1b479e374d536', 'wacc5_0911bf548e5e3c07', 'w6_bc897ab8d4acd863', 'wacc17_4f5f5fe4c473e8df', 'a16_9d4b872403a2bb84', 'a4_03631e91808838e0', 'acc15_e915998cb43a6dc7', 'acc9_22b1290373d08572', 'wacc11_2402696422b7b1a2', 'faa94a86ce1c305065c1eab52d5d9695d3d4bf12_2829813', 'acc0_e91f37cfbb12b8fb', '900e0f020d6c8d0915ed19a5c54adafd979a3390_2277057', 'ea61f1835dbf6f41385197459b9396f66e3af963_2210014', '849d28ffcec100ce4572d341bc9fe4f74fb9d0b7_2140423']

@Rexicon226
Copy link
Copy Markdown
Collaborator Author

To be clear, this is waiting on 4.0 conformance upgrade. This requires 4.0 tests vectors to pass.

Comment thread src/zksdk/sigma_proofs/grouped_ciphertext/2_handles.zig Outdated
github-merge-queue Bot pushed a commit that referenced this pull request Mar 30, 2026
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>
@dnut dnut force-pushed the Rexicon226/zksdk-upgrade branch from 0442def to 31988ef Compare March 30, 2026 17:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 98.52580% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/zksdk/range_proof/bulletproofs.zig 95.77% 3 Missing ⚠️
src/zksdk/merlin.zig 86.66% 2 Missing ⚠️
...ksdk/sigma_proofs/grouped_ciphertext/2_handles.zig 98.91% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/runtime/program/zk_elgamal/execute.zig 91.97% <ø> (ø)
src/zksdk/elgamal.zig 100.00% <100.00%> (ø)
src/zksdk/pedersen.zig 86.95% <100.00%> (-13.05%) ⬇️
src/zksdk/range_proof/ipp.zig 100.00% <100.00%> (ø)
src/zksdk/sigma_proofs/ciphertext_ciphertext.zig 100.00% <100.00%> (ø)
src/zksdk/sigma_proofs/ciphertext_commitment.zig 100.00% <100.00%> (ø)
...ksdk/sigma_proofs/grouped_ciphertext/3_handles.zig 99.70% <100.00%> (ø)
src/zksdk/sigma_proofs/percentage_with_cap.zig 93.41% <100.00%> (-0.17%) ⬇️
src/zksdk/sigma_proofs/pubkey_validity.zig 100.00% <100.00%> (ø)
src/zksdk/sigma_proofs/zero_ciphertext.zig 100.00% <100.00%> (ø)
... and 3 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dnut dnut force-pushed the Rexicon226/zksdk-upgrade branch from 31988ef to 74fcbf1 Compare March 31, 2026 00:25
@dnut dnut requested a review from kprotty March 31, 2026 00:25
kprotty
kprotty previously approved these changes Apr 1, 2026
@Rexicon226 Rexicon226 force-pushed the Rexicon226/zksdk-upgrade branch 2 times, most recently from 31c8ebc to 25e850c Compare April 3, 2026 16:53
@Rexicon226 Rexicon226 force-pushed the Rexicon226/zksdk-upgrade branch from 25e850c to a0b67bc Compare April 3, 2026 17:03
@yewman yewman requested a review from kprotty April 5, 2026 02:12
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to 👀 In review in Sig Apr 5, 2026
@Rexicon226 Rexicon226 added this pull request to the merge queue Apr 5, 2026
Merged via the queue into main with commit faf95e0 Apr 5, 2026
13 checks passed
@Rexicon226 Rexicon226 deleted the Rexicon226/zksdk-upgrade branch April 5, 2026 02:48
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Sig Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants