Skip to content

Commit

Permalink
refactor: add vk in bitvm challenge data
Browse files Browse the repository at this point in the history
  • Loading branch information
fiamma-builder committed Nov 7, 2024
1 parent 6c5e54f commit be520ff
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 85 deletions.
133 changes: 104 additions & 29 deletions api/fiamma/zkpverify/zkpverify.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/static/openapi.yml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions proto/fiamma/zkpverify/zkpverify.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ enum VerificationStatus {
// DataLocation is the proof data location enum for the proof verification
enum DataLocation {
FIAMMA = 0;
NUBITDA = 1;
NUBIT = 1;
CELESTIA = 2;
AVAILDA = 3;
AVAIL = 3;
}

// ProofSystem is the proof system enum for the proof verification
Expand Down Expand Up @@ -64,5 +64,6 @@ message VerifyResult {
// BitVMChallengeData is the data structure for the bitvm challenge data
message BitVMChallengeData {
bytes witness = 1;
string proposer = 2;
bytes vk = 2;
string proposer = 3;
}
1 change: 1 addition & 0 deletions x/zkpverify/keeper/msg_server_submit_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (k msgServer) SubmitProof(goCtx context.Context, msg *types.MsgSubmitProof)

bitVMChallengeData := types.BitVMChallengeData{
Witness: witness,
Vk: msg.Vk,
Proposer: proposerAddress,
}
k.SetBitVMChallengeData(ctx, proofId[:], bitVMChallengeData)
Expand Down
2 changes: 1 addition & 1 deletion x/zkpverify/module/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{
RpcMethod: "SubmitCommunityVerification",
Use: "submit-community-verification [proof_id] [verify_result]",
Short: "submit a community zkp proof verify tx" + "\n" + "Currently supported proof systems: " + "[GROTH16_BN254_BITVM, FFPLONK_BN254_BITVM]",
Short: "submit a community zkp proof verify tx",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "proof_id"}, {ProtoField: "verify_result"}},
},

Expand Down
Loading

0 comments on commit be520ff

Please sign in to comment.