Add data access#64
Conversation
piercetrey-figure
left a comment
There was a problem hiding this comment.
Looking good, nice job on working through figuring out who the heck is supposed to sign stuff 😆
| val affiliate = | ||
| transaction { affiliateService.get(publicKey) }.orThrowNotFound("Affiliate with public key ${publicKey.toHex()} not found") | ||
| val affiliateKeyPair = | ||
| KeyPair(affiliate.publicKey.value.toJavaPublicKey(), affiliate.privateKey.toJavaPrivateKey()) |
There was a problem hiding this comment.
We may need to add SmartKey support here as well ... probably setup data under KeyRef data class (hopefully this branch goes out before mine so you don't have to worry about it) :)
Essentially instead of a KeyPair, we have KeyRef that contains key information such as public key, maybe private key?, UUID (SmartKey way of identifying a private key stored on their system).
| if (envelopeDataAccess.any { it !in existingScopeDataAccess }) { | ||
| p8e.Jobs.MsgAddScopeDataAccessRequest.newBuilder() | ||
| .addAllDataAccess(envelopeDataAccess) | ||
| .addAllSigners(envelope.data.result.signaturesList.map { |
There was a problem hiding this comment.
By any chance did you test this with a multiparty contract? I'm not positive, but I think the only signer we want is the scope owner. In the case for our scopes that's always a single invoker. If you only ran single party contracts, the envelope.data.result.signaturesList should only contain the invoker so it's not a big deal. It would take a multiparty contract to see if this fails or not as is.
scirner22
left a comment
There was a problem hiding this comment.
I left one comment about something to try out. Otherwise this looks great!
Description
This PR adds Data access to the contract scope after memorialization. Files to Check:
IndexHandler.kt
DataAccessChaincodeService.kt