forked from bnb-chain/zkbnb-crypto
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zns 2 l2 offer #2
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruslangm
pushed a commit
that referenced
this pull request
Apr 14, 2023
* update nameHash to address * add NftContentType of NFT * add NftContentType of NFT * update Address []byte to string * add ChangePubKey deal with * add NftContentType,GetAccountIndex,GetToAccountIndex * isTransferTx to isChangePubKey * add l1Sig * add l1Sig * add l1 account index * adjust pubdata sort * update L1Address string to []byte * update after address * update accountDelta * update NftContentType int64 * update NftContentType int64 * update NftContentType int8 * update NbAccountsPerTx to 5 * update L1Signature * add GetPubKey * remove L1Signature * check Sig * Adjust the double signature logic in the crypto part * remove mark code * Adjust the double signature logic in the crypto part * check Sig * check full exit * check full exit * check full exit * update NftContentType init64 * remove withdraw NftContentType * update NftContentType int64 * check full exit * check full exit * check l1 address * create account when transfer nft * create account when transfer nft * Zns 2 l2 offer (#2) * add offer Chanel * add offer Chanel * add offer Chanel * add offer Chanel * deal with CallData length * add check field --------- Co-authored-by: toni.x <toni.x@binance.com> * update offer Protocol * update offer Protocol * Remove obsolete sparse_merkle.go * add protocol account (#3) (#5) Co-authored-by: toni.x <toni.x@binance.com> * cancel offer accountIndex error information * update channel * update NftContentType * update NftContentType * update NftContentType * UnpackAmount * amount precision check --------- Co-authored-by: toni.x <toni.x@binance.com> Co-authored-by: markc <mark.c@binance.com> Co-authored-by: Smith S <smith.s@binance.com> Co-authored-by: qct <tango.qct@gmail.com> Co-authored-by: garyxiong123 <502238410@qq.com>
ruslangm
added a commit
that referenced
this pull request
May 22, 2023
* Changed hash func from keccak to sha256 for block commitment * update nameHash to address * add NftContentType of NFT * add NftContentType of NFT * update Address []byte to string * add ChangePubKey deal with * Added gkr for merkle proof * add NftContentType,GetAccountIndex,GetToAccountIndex * isTransferTx to isChangePubKey * add l1Sig * add l1Sig * add l1 account index * adjust pubdata sort * update L1Address string to []byte * update after address * update accountDelta * update NftContentType int64 * update NftContentType int64 * Replaced poseidon with mimc gkr for node hash calculation * update NftContentType int8 * update NbAccountsPerTx to 5 * update L1Signature * add GetPubKey * remove L1Signature * check Sig * Adjust the double signature logic in the crypto part * remove mark code * Adjust the double signature logic in the crypto part * check Sig * check full exit * check full exit * check full exit * update NftContentType init64 * remove withdraw NftContentType * update NftContentType int64 * check full exit * check full exit * check l1 address * Change all poseidon to mimc with gkr, include inside smt * Bump gnark lib * create account when transfer nft * AllocateGKRCircuit while setting witness * Debug unsatisfied constraint * Debug unsatisfied constraint * Testing Gkr mimc * create account when transfer nft * Zns 2 l2 offer (#2) * add offer Chanel * add offer Chanel * add offer Chanel * add offer Chanel * deal with CallData length * add check field --------- Co-authored-by: toni.x <toni.x@binance.com> * update offer Protocol * update offer Protocol * Enlarge bN to 19 * Revert "Enlarge bN to 19" This reverts commit 3e1dc6a. * Remove obsolete sparse_merkle.go * fix: generation problems * Enlarge bN to 19 * add protocol account (#3) (#5) Co-authored-by: toni.x <toni.x@binance.com> * Adapted zkbnb-crypto for gnark v0.8.0 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * change bN to 17 * cancel offer accountIndex error information * change bN to 15 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * update channel * change bN to 16 * Added support for persisting r1cs len * Added support for persisting r1cs len * Added support for persisting r1cs len * fixed mimc hash calculation * fixed empty asset root * added different batch sizes * Fix gkr under 0.8 * added different batch sizes * update NftContentType * Replace Deprecated GetNbVariables() * Fix README.md * Ignore generated files * update NftContentType * update NftContentType * updated gnark version * Bump gnark, gkr ontop 0.8 * debug gkr * Tmp fix commitment * rollback asset root * UnpackAmount * updated gnark versions * updated gnark version * lazify + change to getNbR1C * amount precision check * hack to fix creation of r1cs * Bump gnark * Bump gnark & gnark-crypto * Choose bN from block size * check whether offer id is too high * check whether offer id is too high * Fix AssertIsLessOrEqual and enlarge bN * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * Use BlockCommitment for AssertValid * Use bnb-chain gnark, gkr mimc function to zkbnb * Use golang 1.18 * test solve under block size 1 * fixes mimc call data hash calculation * Fixes signature generation after crypto lib update (#9) * Fixes signature generation after crypto lib update (#10) * fix maxOfferId too high * added flag to not generate pk and vk (#11) * added flag to not generate pk and vk * changed flag name * changed flag name * adjust account index * addressed audit review * addressed audit review (#12) * adjust account index * addressed audit review * addressed audit review * fixed wrong assert * addressed audit review * addressed audit review * addressed audit review * rollback unnecessary changes * Revert "Bugfix/audit changes" --------- Co-authored-by: toni.x <toni.x@binance.com> Co-authored-by: markc <mark.c@binance.com> Co-authored-by: Smith S <smith.s@binance.com> Co-authored-by: qct <tango.qct@gmail.com> Co-authored-by: toni <98298250+15000785133@users.noreply.github.com> Co-authored-by: garyxiong123 <502238410@qq.com>
15000785133
added a commit
that referenced
this pull request
May 22, 2023
* Changed hash func from keccak to sha256 for block commitment * update nameHash to address * add NftContentType of NFT * add NftContentType of NFT * update Address []byte to string * add ChangePubKey deal with * Added gkr for merkle proof * add NftContentType,GetAccountIndex,GetToAccountIndex * isTransferTx to isChangePubKey * add l1Sig * add l1Sig * add l1 account index * adjust pubdata sort * update L1Address string to []byte * update after address * update accountDelta * update NftContentType int64 * update NftContentType int64 * Replaced poseidon with mimc gkr for node hash calculation * update NftContentType int8 * update NbAccountsPerTx to 5 * update L1Signature * add GetPubKey * remove L1Signature * check Sig * Adjust the double signature logic in the crypto part * remove mark code * Adjust the double signature logic in the crypto part * check Sig * check full exit * check full exit * check full exit * update NftContentType init64 * remove withdraw NftContentType * update NftContentType int64 * check full exit * check full exit * check l1 address * Change all poseidon to mimc with gkr, include inside smt * Bump gnark lib * create account when transfer nft * AllocateGKRCircuit while setting witness * Debug unsatisfied constraint * Debug unsatisfied constraint * Testing Gkr mimc * create account when transfer nft * Zns 2 l2 offer (#2) * add offer Chanel * add offer Chanel * add offer Chanel * add offer Chanel * deal with CallData length * add check field --------- * update offer Protocol * update offer Protocol * Enlarge bN to 19 * Revert "Enlarge bN to 19" This reverts commit 3e1dc6a. * Remove obsolete sparse_merkle.go * fix: generation problems * Enlarge bN to 19 * add protocol account (#3) (#5) * Adapted zkbnb-crypto for gnark v0.8.0 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * change bN to 17 * cancel offer accountIndex error information * change bN to 15 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * update channel * change bN to 16 * Added support for persisting r1cs len * Added support for persisting r1cs len * Added support for persisting r1cs len * fixed mimc hash calculation * fixed empty asset root * added different batch sizes * Fix gkr under 0.8 * added different batch sizes * update NftContentType * Replace Deprecated GetNbVariables() * Fix README.md * Ignore generated files * update NftContentType * update NftContentType * updated gnark version * Bump gnark, gkr ontop 0.8 * debug gkr * Tmp fix commitment * rollback asset root * UnpackAmount * updated gnark versions * updated gnark version * lazify + change to getNbR1C * amount precision check * hack to fix creation of r1cs * Bump gnark * Bump gnark & gnark-crypto * Choose bN from block size * check whether offer id is too high * check whether offer id is too high * Fix AssertIsLessOrEqual and enlarge bN * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * Use BlockCommitment for AssertValid * Use bnb-chain gnark, gkr mimc function to zkbnb * Use golang 1.18 * test solve under block size 1 * fixes mimc call data hash calculation * Fixes signature generation after crypto lib update (#9) * Fixes signature generation after crypto lib update (#10) * fix maxOfferId too high * added flag to not generate pk and vk (#11) * added flag to not generate pk and vk * changed flag name * changed flag name * adjust account index * addressed audit review * addressed audit review (#12) * adjust account index * addressed audit review * addressed audit review * fixed wrong assert * addressed audit review * addressed audit review * addressed audit review * rollback unnecessary changes * Revert "Bugfix/audit changes" --------- Co-authored-by: garyxiong123 <502238410@qq.com> Co-authored-by: toni.x <toni.x@binance.com> Co-authored-by: markc <mark.c@binance.com> Co-authored-by: Smith S <smith.s@binance.com> Co-authored-by: qct <tango.qct@gmail.com> Co-authored-by: toni <98298250+15000785133@users.noreply.github.com>
tengwei
pushed a commit
that referenced
this pull request
Jun 5, 2023
* Changed hash func from keccak to sha256 for block commitment * update nameHash to address * add NftContentType of NFT * add NftContentType of NFT * update Address []byte to string * add ChangePubKey deal with * Added gkr for merkle proof * add NftContentType,GetAccountIndex,GetToAccountIndex * isTransferTx to isChangePubKey * add l1Sig * add l1Sig * add l1 account index * adjust pubdata sort * update L1Address string to []byte * update after address * update accountDelta * update NftContentType int64 * update NftContentType int64 * Replaced poseidon with mimc gkr for node hash calculation * update NftContentType int8 * update NbAccountsPerTx to 5 * update L1Signature * add GetPubKey * remove L1Signature * check Sig * Adjust the double signature logic in the crypto part * remove mark code * Adjust the double signature logic in the crypto part * check Sig * check full exit * check full exit * check full exit * update NftContentType init64 * remove withdraw NftContentType * update NftContentType int64 * check full exit * check full exit * check l1 address * Change all poseidon to mimc with gkr, include inside smt * Bump gnark lib * create account when transfer nft * AllocateGKRCircuit while setting witness * Debug unsatisfied constraint * Debug unsatisfied constraint * Testing Gkr mimc * create account when transfer nft * Zns 2 l2 offer (#2) * add offer Chanel * add offer Chanel * add offer Chanel * add offer Chanel * deal with CallData length * add check field --------- Co-authored-by: toni.x <toni.x@binance.com> * update offer Protocol * update offer Protocol * Enlarge bN to 19 * Revert "Enlarge bN to 19" This reverts commit 3e1dc6a. * Remove obsolete sparse_merkle.go * fix: generation problems * Enlarge bN to 19 * add protocol account (#3) (#5) Co-authored-by: toni.x <toni.x@binance.com> * Adapted zkbnb-crypto for gnark v0.8.0 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * change bN to 17 * cancel offer accountIndex error information * change bN to 15 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * update channel * change bN to 16 * Added support for persisting r1cs len * Added support for persisting r1cs len * Added support for persisting r1cs len * fixed mimc hash calculation * fixed empty asset root * added different batch sizes * Fix gkr under 0.8 * added different batch sizes * update NftContentType * Replace Deprecated GetNbVariables() * Fix README.md * Ignore generated files * update NftContentType * update NftContentType * updated gnark version * Bump gnark, gkr ontop 0.8 * debug gkr * Tmp fix commitment * rollback asset root * UnpackAmount * updated gnark versions * updated gnark version * lazify + change to getNbR1C * amount precision check * hack to fix creation of r1cs * Bump gnark * Bump gnark & gnark-crypto * Choose bN from block size * check whether offer id is too high * check whether offer id is too high * Fix AssertIsLessOrEqual and enlarge bN * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * Use BlockCommitment for AssertValid * Use bnb-chain gnark, gkr mimc function to zkbnb * Use golang 1.18 * test solve under block size 1 * fixes mimc call data hash calculation * Fixes signature generation after crypto lib update (#9) * Fixes signature generation after crypto lib update (#10) * fix maxOfferId too high * added flag to not generate pk and vk (#11) * added flag to not generate pk and vk * changed flag name * changed flag name * adjust account index * addressed audit review * addressed audit review (#12) * adjust account index * addressed audit review * addressed audit review * fixed wrong assert * addressed audit review * addressed audit review * addressed audit review * rollback unnecessary changes * Revert "Bugfix/audit changes" * Change Signature Message Template * only bnb * only bnb * bnb and busd * blocksizes * Bugfix/audit changes (#16) * addressed audit review * addressed audit review * fixed wrong assert * addressed audit review * addressed audit review * addressed audit review * rollback unnecessary changes * fixes verification issue * update L1Signature * fix set the wrong ChannelAccountIndex * qa -> testnet (bnb-chain#84) (#17) * Changed hash func from keccak to sha256 for block commitment * update nameHash to address * add NftContentType of NFT * add NftContentType of NFT * update Address []byte to string * add ChangePubKey deal with * Added gkr for merkle proof * add NftContentType,GetAccountIndex,GetToAccountIndex * isTransferTx to isChangePubKey * add l1Sig * add l1Sig * add l1 account index * adjust pubdata sort * update L1Address string to []byte * update after address * update accountDelta * update NftContentType int64 * update NftContentType int64 * Replaced poseidon with mimc gkr for node hash calculation * update NftContentType int8 * update NbAccountsPerTx to 5 * update L1Signature * add GetPubKey * remove L1Signature * check Sig * Adjust the double signature logic in the crypto part * remove mark code * Adjust the double signature logic in the crypto part * check Sig * check full exit * check full exit * check full exit * update NftContentType init64 * remove withdraw NftContentType * update NftContentType int64 * check full exit * check full exit * check l1 address * Change all poseidon to mimc with gkr, include inside smt * Bump gnark lib * create account when transfer nft * AllocateGKRCircuit while setting witness * Debug unsatisfied constraint * Debug unsatisfied constraint * Testing Gkr mimc * create account when transfer nft * Zns 2 l2 offer (#2) * add offer Chanel * add offer Chanel * add offer Chanel * add offer Chanel * deal with CallData length * add check field --------- * update offer Protocol * update offer Protocol * Enlarge bN to 19 * Revert "Enlarge bN to 19" This reverts commit 3e1dc6a. * Remove obsolete sparse_merkle.go * fix: generation problems * Enlarge bN to 19 * add protocol account (#3) (#5) * Adapted zkbnb-crypto for gnark v0.8.0 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * change bN to 17 * cancel offer accountIndex error information * change bN to 15 * Adapted zkbnb-crypto for gnark v0.8.0, added support for split ccs file loading * update channel * change bN to 16 * Added support for persisting r1cs len * Added support for persisting r1cs len * Added support for persisting r1cs len * fixed mimc hash calculation * fixed empty asset root * added different batch sizes * Fix gkr under 0.8 * added different batch sizes * update NftContentType * Replace Deprecated GetNbVariables() * Fix README.md * Ignore generated files * update NftContentType * update NftContentType * updated gnark version * Bump gnark, gkr ontop 0.8 * debug gkr * Tmp fix commitment * rollback asset root * UnpackAmount * updated gnark versions * updated gnark version * lazify + change to getNbR1C * amount precision check * hack to fix creation of r1cs * Bump gnark * Bump gnark & gnark-crypto * Choose bN from block size * check whether offer id is too high * check whether offer id is too high * Fix AssertIsLessOrEqual and enlarge bN * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * mintnft toaddress not exist * Use BlockCommitment for AssertValid * Use bnb-chain gnark, gkr mimc function to zkbnb * Use golang 1.18 * test solve under block size 1 * fixes mimc call data hash calculation * Fixes signature generation after crypto lib update (#9) * Fixes signature generation after crypto lib update (#10) * fix maxOfferId too high * added flag to not generate pk and vk (#11) * added flag to not generate pk and vk * changed flag name * changed flag name * adjust account index * addressed audit review * addressed audit review (#12) * adjust account index * addressed audit review * addressed audit review * fixed wrong assert * addressed audit review * addressed audit review * addressed audit review * rollback unnecessary changes * Revert "Bugfix/audit changes" --------- Co-authored-by: garyxiong123 <502238410@qq.com> Co-authored-by: toni.x <toni.x@binance.com> Co-authored-by: markc <mark.c@binance.com> Co-authored-by: Smith S <smith.s@binance.com> Co-authored-by: qct <tango.qct@gmail.com> Co-authored-by: toni <98298250+15000785133@users.noreply.github.com> --------- Co-authored-by: toni.x <toni.x@binance.com> Co-authored-by: markc <mark.c@binance.com> Co-authored-by: Smith S <smith.s@binance.com> Co-authored-by: qct <tango.qct@gmail.com> Co-authored-by: toni <98298250+15000785133@users.noreply.github.com> Co-authored-by: garyxiong123 <502238410@qq.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
add a description of your changes here...
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: