Device and machines for mining cryptocurrency

PLONK on Bitcoin – CoinGeek

This post was first published in Average.

We are proud to announce that Bitcoin Now supports PLONK. For a detailed description of how PLONK works, you can refer to our previous explanations, Part 1 And the Part 2.

We have done it before growth 16, which is the smallest and most efficient SNARK build. However, it requires a reliable setup for each circuit. By eliminating the need for a trusted setup for each circuit, PLONK alleviates concerns about the security of this process and ensures that there is no secure multi-party account (MPC) Preparation ceremony It will be required again if the circuit changes in the future due to, for example, critical bug fixes. Comprehensive and updatable setup celebrations, such as The permanent powers of the Tao, can be reused for any circuit in PLONK. It makes deploying new circuits and upgrading existing circuits easier and safer.

Play your first PLONK on Bitcoin

We have added PLONK support in our list snarkJS Library fully compatible with Circom. All Circom circuits developed for Groth16 can be reused directly in PLONK with absolutely no change. The complete PLONK checker code can be found over herealong with a test in javascript. It’s like creating a PLONK verifier Groth16 . Investigator Development in snarkJS.

You need to install the Circom and snarkJS compiler first.

text in font image 2 setting url text

1. Circle design

Circuit implementation in Circom language. For example, this simple circuit/program called “factor.circom” proves that people know how to decompose the integer “n” into two integers without exposing the integers. The circuit has two special inputs called “p” and “q” and one general input called “n”. For more information on how to use Circom, you can refer to

2. Circuit assembly

Assemble the circuit using the following command:

Command on text about how to translate circles

3. Starting a new **Powers of Tao** party

The “new” command is used to start the **tau powers** ceremony.

Powers of the Tao command to start the celebration in the image of the line

Finally, we’ve checked the protocol so far:

snarkjs powers to check protocol text in font image

4. Setting

This will generate a proof key for the circuit and verify that key with PLONK.

setup snarkjs plonk

5. Export verification key

We export the validation key “circuit_final.zkey” to “verification_key.json.”

Export verification key in line image

6. Witness Account

First, we create an “input.json” file containing the circuit inputs with the following contents:

We are creating a file

Next, we use the factor “factor.wasm” obtained from compiling the circuit to calculate the witnesses:

Calculate the witnesses using the create_witness.js node wasm text circle as in the font image

7. Create a directory

Proof key and witnesses are used to generate proof using PLONK.

Create a directory with PLONK

8. Export sCrypt Checker

This outputs a smart contract The ‘verifier.scrypt’ file that contains all the code needed to verify the proof on the string.

snarkjs zkey export scryptverifier

You can check it locally:

snarkjs plonk Check the text locally

9. Publish the checker

You can now publish the checker for bitcoin. collar verifier.scrypt in a test contract PlonkVerifier As follows.

Now you can use files sCrypt IDE to post it.

Using the sCrypt IDE for publishing

Right click and choose Contract Publishing: Correction.

Publish the contract for correction

After assembling the contract, which will expire in a few minutes, the next panel should appear. click Spread.

Publishing PlonkVerifier construction arguments

If all goes well, the auditor contract should be published.

Initiate output Deploy PlonkVerifier contract Deploy PlonkVerifier

10. Check the proof

Next, you will need to copy and paste from Evidence. json inside a call panel and click on C.all open().

Certified proof of spending transaction

If everything is working fine, you should see proof of validation in the spend transaction.

what is next?

our end! You have just created your first PLONK proof of Bitcoin. So far, we have implemented both Groth16 and PLONK. Which proof system It can be implemented in the same way as a smart contract, thanks to the programmability of Bitcoin and scalability. Now is the time to apply your favorite proof systems, including Marlin, Sonic, Halo, Bulletproof, and STARK.

Watch: BSV Global Blockchain Agreement Presentation, Smart Contracts and Computing on BSV

width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”>

New to Bitcoin? Check out CoinGeek’s Bitcoin for beginners the ultimate resource guide to learn more about Bitcoin – as originally envisioned by Satoshi Nakamoto – and the blockchain.

#PLONK #Bitcoin #CoinGeek

Leave a Comment

Your email address will not be published. Required fields are marked *