Skip to content
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

multi: rename RPC AssetLeaf proof field to account for transfer proofs #640

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/tapcli/universe.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,8 @@ func universeProofInsert(ctx *cli.Context) error {
LeafKey: assetKey,
},
AssetLeaf: &unirpc.AssetLeaf{
Asset: rpcAsset,
IssuanceProof: rawProof,
Asset: rpcAsset,
Proof: rawProof,
},
}
resp, err := client.InsertProof(ctxc, req)
Expand Down
4 changes: 2 additions & 2 deletions itest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,8 @@ func AssertUniverseLeavesEqual(t *testing.T, uniIDs []*unirpc.ID,
)

require.Equal(
t, aLeaves.Leaves[i].IssuanceProof,
bLeaves.Leaves[i].IssuanceProof,
t, aLeaves.Leaves[i].Proof,
bLeaves.Leaves[i].Proof,
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions proof/courier.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,8 +1085,8 @@ func (c *UniverseRpcCourier) DeliverProof(ctx context.Context,
}

assetLeaf := unirpc.AssetLeaf{
Asset: rpcAsset,
IssuanceProof: proofBuf.Bytes(),
Asset: rpcAsset,
Proof: proofBuf.Bytes(),
}

// Construct universe key.
Expand Down Expand Up @@ -1202,7 +1202,7 @@ func (c *UniverseRpcCourier) ReceiveProof(ctx context.Context,
err)
}

proofBlob = resp.AssetLeaf.IssuanceProof
proofBlob = resp.AssetLeaf.Proof

return nil
}
Expand Down
6 changes: 3 additions & 3 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -3314,8 +3314,8 @@ func marshalAssetLeaf(ctx context.Context, keys taprpc.KeyLookup,
}

return &unirpc.AssetLeaf{
Asset: rpcAsset,
IssuanceProof: buf.Bytes(),
Asset: rpcAsset,
Proof: buf.Bytes(),
}, nil
}

Expand Down Expand Up @@ -3622,7 +3622,7 @@ func unmarshalAssetLeaf(leaf *unirpc.AssetLeaf) (*universe.Leaf, error) {
// itself.
var assetProof proof.Proof
if err := assetProof.Decode(
bytes.NewReader(leaf.IssuanceProof),
bytes.NewReader(leaf.Proof),
); err != nil {
return nil, err
}
Expand Down
759 changes: 379 additions & 380 deletions taprpc/universerpc/universe.pb.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions taprpc/universerpc/universe.proto
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ message AssetLeaf {

// TODO(roasbeef): only needed for display? can get from proof below ^

// The asset issuance proof, which proves that the asset specified above
// was issued properly. This is always just an individual mint/transfer
// proof and never a proof file.
bytes issuance_proof = 2;
// The asset issuance or transfer proof, which proves that the asset
// specified above was issued or transferred properly. This is always just
// an individual mint/transfer proof and never a proof file.
bytes proof = 2;
}

message AssetLeafResponse {
Expand Down
4 changes: 2 additions & 2 deletions taprpc/universerpc/universe.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1590,10 +1590,10 @@
"$ref": "#/definitions/taprpcAsset",
"description": "The asset included in the leaf."
},
"issuance_proof": {
"proof": {
"type": "string",
"format": "byte",
"description": "The asset issuance proof, which proves that the asset specified above\nwas issued properly. This is always just an individual mint/transfer\nproof and never a proof file."
"description": "The asset issuance or transfer proof, which proves that the asset\nspecified above was issued or transferred properly. This is always just\nan individual mint/transfer proof and never a proof file."
}
}
},
Expand Down
Loading