mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-06-10 05:21:26 +00:00
readme
This commit is contained in:
parent
18f2db8e91
commit
d62711c27c
10
README.md
10
README.md
@ -9,17 +9,17 @@ We suggest checking proofs on Fluence instead. This option does not has gas prob
|
||||
## How it works
|
||||
The process includes the following entities:
|
||||
- Ethereum smart contract that stores (data, proof) pairs and implements on-chain proof verification. In case the proof is not correct, the smart contract rewards the user who challenged this proof with ether.
|
||||
- Ethereum project Operator who uploads (data, proof) pairs to the smart contract.
|
||||
- Proof Supplier (e.g. Ethereum project operator) who uploads (data, proof) pairs to the smart contract.
|
||||
- Fluence back end that implements off-chain proof verification. It also stores proof verification results.
|
||||
- Ethereum project user. The user checks if Operator provides valid proofs and challenges invalid ones using smart contract to get a reward.
|
||||
- Proof Consumer (e.g. Ethereum project user). Consumer checks if Supplier provides valid proofs and challenges invalid ones using smart contract to get a reward.
|
||||
- Arweave front-end. The user performs all the actions via the front end.
|
||||
|
||||
Here is the workflow:
|
||||
Here is an example of workflow:
|
||||
1. The operator uploads (data, proof) to the smart contract.
|
||||
2. The user takes (data, proof) from the smart contract and uploads it to the back end (Fluence).
|
||||
2. The user takes (data, proof) from the smart contract and sends it to the back end (Fluence).
|
||||
3. The back end checkes the proof.
|
||||
4. a) If the proof is correct, it is stored by the back end with TRUE flag. Other users can see it an will not check this proof again.
|
||||
b) If the proof is false, the user checks the same proof in the smart contract. In that case the user is sure that the proof is FALSE and thus the user will get the reward.
|
||||
b) If the proof is false, the user challenges that proof in the smart contract. The proof is invalid and thus the user will get the reward.
|
||||
|
||||
To better understand the workflow, please review the scheme.
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
# Usage
|
||||
|
||||
0. set the `appId` (Fluence) and `lazyAddress` (Eth contract) in `index.js`
|
||||
|
||||
1. run ```npm i```
|
||||
|
||||
2. run ```npm run build```
|
||||
|
||||
3. run ```npm run start```
|
||||
1. run `npm i`
|
||||
2. run `npm run build`
|
||||
3. run `npm run start`
|
Loading…
x
Reference in New Issue
Block a user