feat: add hinted fp12 inverse#153
Conversation
|
chunked version of fp12 inverse is not included here. |
Are you planning on submitting a PR for a chunked version? |
|
I have already implemented a chunked version of this which I can include in this PR. @Hakkush-07 , @wz14 do you have answer if it can be useful to you with the chunker ? |
yes, it is also useful for chunker , please include the chunked version, thanks. |
|
I have split the hinted_fp12 inverse into 3 parts, each fits within a tapscript and adjusted tests accordingly. I haven't integrated it to the chunker implementation though. I did not feel very sure about the changes required but I assume it may not be as difficult to integrate it with the examples given. Stats: |
|
that is great, thank you, |
|
thanks, in that case, should be good to merge |
This PR requests addition of hinted Fp12 inverse.
It is useful because pairing operation makes use of auxiliary hint "c" and its inverse.
It seems cheaper to do the inverse directly on-script instead of receiving it as bit commitment input.
Script and max stack size used by a single joint script is 6,168,525 bytes and stack 1116 respectively.
This script can be split into 3 chunks with the intermediates hashed, each of these chunks fit within 4 MB and stack limit.
In total, the cost on Assert Tx is from having to bit commit 3 hashed elements.
Tests have been added and does not impact any other code.