Skip to content

Conversation

@querolita
Copy link
Member

@querolita querolita commented Oct 2, 2025

Implements wrappers and functions to enable gate-vector-related FFIs.

o1js side: o1-labs/o1js@6fbc6a3 o1-labs/o1js#2564
mina side: MinaProtocol/mina#17951
proof-systems side: #3341 (this)

(Parent PR: #3340)

Closes o1-labs/o1js#2476 o1-labs/o1js#2480 o1-labs/o1js#2479 o1-labs/o1js#2482 o1-labs/o1js#2484

@querolita querolita force-pushed the native/napi-polycomm branch from d1e0e48 to e913408 Compare October 9, 2025 17:44
@querolita querolita force-pushed the native/napi-gatevector branch 2 times, most recently from a726918 to d002456 Compare October 9, 2025 18:04
@querolita querolita changed the title [WIP] (proof-systems) Native Prover with Napi - Gate Vector (proof-systems) Native Prover with Napi - Gate Vector Oct 16, 2025
@querolita querolita force-pushed the native/napi-gatevector branch from cc6304b to 18e19f6 Compare October 16, 2025 17:49
@querolita querolita self-assigned this Oct 20, 2025
@querolita querolita marked this pull request as ready for review October 20, 2025 18:01
@querolita querolita changed the title (proof-systems) Native Prover with Napi - Gate Vector (proof-systems) Native Prover with Napi - GateVector Oct 21, 2025
@querolita querolita force-pushed the native/napi-polycomm branch from 31af9cf to 0d95c15 Compare October 23, 2025 15:28
@querolita querolita force-pushed the native/napi-gatevector branch from 18e19f6 to fd41b37 Compare October 23, 2025 16:32
Base automatically changed from native/napi-polycomm to native/napi November 5, 2025 22:34
@querolita
Copy link
Member Author

querolita commented Nov 5, 2025

I am afraid I merged florian/napi-prover-index too early: I thought gate vector had already been approved, but I got confused by the green tick on the o1js counterpart 🤦🏻

So, in order to make review of this one PR, I pushed a branch called native/napi-gatevector-backup before the merges happened. This way you can use the diff between that one and the parent to see the actual changes that are included in this PR:

https://github.com/o1-labs/proof-systems/compare/native/napi...native/napi-gatevector-backup?expand=1

Also, the following commits are also part of the GateVector alone (annotations with js_name)

9929eb5
b092588
214a69c
4f80d3c

}
}

#[napi(js_name = [<"caml_pasta_" $field_name:snake "_plonk_gate_vector_create">])]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah so this does work with the templates? nice!

caml_pasta_fq_plonk_gate_vector_digest, caml_pasta_fq_plonk_gate_vector_from_bytes,
caml_pasta_fq_plonk_gate_vector_get, caml_pasta_fq_plonk_gate_vector_len,
caml_pasta_fq_plonk_gate_vector_to_bytes, caml_pasta_fq_plonk_gate_vector_wrap,
NapiFpGate as WasmFpGate, NapiFpGateVector as WasmFpGateVector, NapiFqGate as WasmFqGate,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was actually a little confusing when i worked on top of this PR - I think we should probbably leave it as NapiXX and leave it to the crate that imports these to rename them if needed, wdyt? we cna do this in a follow up PR tho

}

// TOOD: remove incl all dependencies when no longer needed and we only pass napi objects around
#[napi(js_name = "prover_index_fp_from_bytes")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding these! <3

Copy link
Member

@Trivo25 Trivo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Some minor things but we can clean them up in a final review

@querolita querolita merged commit 8e63d6c into native/napi Nov 6, 2025
21 of 26 checks passed
@querolita querolita deleted the native/napi-gatevector branch November 6, 2025 10:38
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.

3 participants