Skip to content

Commit

Permalink
CORE-18492 notary registration & add backchain required flag on Notar… (
Browse files Browse the repository at this point in the history
#1362)

- new field schema for notary service registration that allows skip backchain or not.
- added a backchainRequired flag to NotaryInfo to be able to use in the implementation of a contract verifying notary which will be a follow-up ticket of this.
  • Loading branch information
jennyang-r3 authored Nov 28, 2023
1 parent 9d560a7 commit 3eefd9d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@
"O=NotaryService, L=London, C=GB"
]
},
"corda.notary.service.backchain.required": {
"description": "Boolean flag whether backchain verification by members is required when using this notary service.",
"type": "string",
"enum": ["true", "false"],
"examples": [
"true",
"false"
]
},
"corda.notary.service.flow.protocol.name": {
"description": "Name of the flow protocol used by the notary service. Valid only when one of the roles is notary.",
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
"O=NotaryService, L=London, C=GB"
]
},
"corda.notary.service.backchain.required": {
"description": "Boolean flag whether backchain verification by members is required when using this notary service.",
"type": "string",
"enum": ["true", "false"],
"examples": [
"true",
"false"
]
},
"corda.notary.service.flow.protocol.name": {
"description": "Name of the flow protocol used by the notary service. Valid only when one of the roles is notary.",
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cordaProductVersion = 5.2.0
# NOTE: update this each time this module contains a breaking change
## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to
## a per module property in which case module versions can change independently.
cordaApiRevision = 8
cordaApiRevision = 9

# Main
kotlinVersion = 1.8.21
Expand Down
14 changes: 11 additions & 3 deletions membership/scans/corda-membership-5.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ net.corda.v5.membership.GroupParametersLookup:
type: public abstract
returnType: net.corda.v5.membership.GroupParameters
net.corda.v5.membership.MGMContext:
annotations: []
annotations:
- CordaSerializable
type: public interface
extends:
- net.corda.v5.base.types.LayeredPropertyMap
interface: true
methods: {}
net.corda.v5.membership.MemberContext:
annotations: []
annotations:
- CordaSerializable
type: public interface
extends:
- net.corda.v5.base.types.LayeredPropertyMap
Expand Down Expand Up @@ -146,4 +148,10 @@ net.corda.v5.membership.NotaryInfo:
- NotNull
default: false
type: public abstract
returnType: java.security.PublicKey
returnType: java.security.PublicKey
isBackchainRequired:
annotations:
- NotNull
default: false
type: public abstract
returnType: Boolean
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
* String protocol = notaryInfo.getProtocol();
* Collection<Integer> protocolVersions = notaryInfo.getProtocolVersions();
* PublicKey publicKey = notaryInfo.getPublicKey();
* Boolean backchainRequired = notaryInfo.getBackchainRequired();
* }</pre></li>
* <li>Kotlin:<pre>{@code
* val name = notaryInfo.name
* val protocol = notaryInfo.protocol
* val protocolVersions = notaryInfo.protocolVersions
* val publicKey = notaryInfo.publicKey
* val backchainRequired = notaryInfo.backchainRequired
* }</pre></li>
* </ul>
*/
Expand All @@ -48,4 +50,9 @@ public interface NotaryInfo {
* @return The public key of the notary service, which will be a composite key of all notary virtual nodes keys.
*/
@NotNull PublicKey getPublicKey();

/**
* @return boolean of whether it requires backchain verification.
*/
@NotNull Boolean isBackchainRequired();
}

0 comments on commit 3eefd9d

Please sign in to comment.