-
Notifications
You must be signed in to change notification settings - Fork 6
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
btc commiter state and proof #93
Comments
1.1 Batch & Proof flowchart TD
A[proof tx] --> B[check permission]
B --> |no permission| C[return error]
B --> |has permission| D[execute tx verification]
D --> |fail| C
D --> |success| E[save tx to db]
E --> F[emit event]
1.2 Listen for events flowchart TD
A[event] --> B[parse event]
B --> C[structure proposal tx]
1.3 Submit proposal flowchart TD
A[proposal tx] --> B[check permssion]
B --> |fail| C[return error]
B --> |success| D[proposal already exists]
D --> |yes| E[add vote]
D --> |no| F[create vote]
F --> E
E --> G[check if the vote exceeds the majority?]
G --> |yes| H[calculate client address to submit to BTC ]
H --> I[set vote status to success]
G --> |no|J[end]
I --> J
1.4 Check proposal status flowchart TD
A[check proposal status] --> |success| B[parse the winning address of the poll]
B --> C[is the address equal to myself?]
C --> |yes| D[structure proof and sign]
C --> |no| G[end]
A --> |voting| G
1.5 Submit proof flowchart TD
A[proof and signature] --> |submit to BTC| B[end]
|
|
|
|
|
3.1 Interface
3.1.2 Query RPC
3.2 Data Structure MsgBatchProofTx
MsgTapRootTx
MsgTimeoutProposalTx
3.2.2 Query Request QueryLastProposalIdRequest
QueryProposalRequest
3.2.3 State Proposal
|
I suppose the transaction including procedure 1.3 should include ‘finalbatchNum‘. It is used to find which proof and stateRoot should be submitted to BTC network. During phase 1.3, Why should client addresses be submitted to the BTC network? |
@zhouop0 The client's address does not need to be submitted to BTC. Its address only needs to be recorded in B2Node, which means that we have selected the address of the client to submit the proof to BTC. Finally, the selected client submits the proof to BTC and attaches its signature. |
How verify proof which was submited into btc? |
After submitting proof to Bitcoin, the committer client will subscribe the Bitcoin state and submit a result proposal to B2 Nodes. Others committer clients will vote for the result proposal by checking Bitcoin state. The above mechanisam will make sure that the rollup proof will be recoreded on Bitcoin. |
Thank you for reply. But the mechanisam of verifing proof use fraud proof like BitVM maybe much better. |
No description provided.
The text was updated successfully, but these errors were encountered: