Skip to content

fix(zkvm): remove dead hash_input allocation in verify syscall#395

Merged
eigmax merged 1 commit intoProjectZKM:mainfrom
yyhrnk:fix/remove-dead-hash-input
Dec 30, 2025
Merged

fix(zkvm): remove dead hash_input allocation in verify syscall#395
eigmax merged 1 commit intoProjectZKM:mainfrom
yyhrnk:fix/remove-dead-hash-input

Conversation

@yyhrnk
Copy link
Copy Markdown
Contributor

@yyhrnk yyhrnk commented Dec 29, 2025

The verify syscall was creating a local Vec named hash_input, filling it with the previous deferred proofs digest, and then never using it. The actual deferred proofs digest is updated exclusively via hash_deferred_proof, which already reconstructs the full Poseidon2 input internally. Keeping hash_input introduces an unnecessary heap allocation and a misleading hint that the Vec participates in the hash chain. This change removes the dead Vec and leaves the digest update logic solely in hash_deferred_proof, matching how the prover side computes the deferred proofs digest.

@eigmax eigmax merged commit c8ff5d7 into ProjectZKM:main Dec 30, 2025
3 checks passed
eigmax pushed a commit that referenced this pull request Jan 4, 2026
* fix: correct stateless prove_core doc reference (#392)

* fix(sdk): remove unnecessary clone in zkm_dump (#393)

* fix(zkvm): remove dead hash_input allocation in verify syscall (#395)

* docs: clarify Shape::new constructor comment (#394)

* docs: correct septic curve documentation comments (#396)

* fix: avoid extra allocation in ZKMPublicValues::raw

---------

Co-authored-by: ANtutov <tutovanton26@gmail.com>
Co-authored-by: Snezhkko <snezhkodaria38@gmail.com>
Co-authored-by: yyhrnk <yaroslavnerest@gmail.com>
Co-authored-by: sashass1315 <sashass1315@gmail.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants