From 3eefd9de4b2d133352ba5c31090801ba7a382c41 Mon Sep 17 00:00:00 2001 From: Jenny Yang <135036209+jennyang-r3@users.noreply.github.com> Date: Tue, 28 Nov 2023 15:38:01 +0000 Subject: [PATCH] =?UTF-8?q?CORE-18492=20notary=20registration=20&=20add=20?= =?UTF-8?q?backchain=20required=20flag=20on=20Notar=E2=80=A6=20(#1362)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- .../1.0/corda.member.dynamic.registration.json | 9 +++++++++ .../1.0/corda.member.static.registration.json | 9 +++++++++ gradle.properties | 2 +- membership/scans/corda-membership-5.2.0.yaml | 14 +++++++++++--- .../java/net/corda/v5/membership/NotaryInfo.java | 7 +++++++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json index b54178bc4c..b932a5fd2e 100644 --- a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json +++ b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/dynamic/registration/1.0/corda.member.dynamic.registration.json @@ -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", diff --git a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json index 653613198b..aa7a14897e 100644 --- a/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json +++ b/data/membership-schema/src/main/resources/net/corda/schema/membership/member/static/registration/1.0/corda.member.static.registration.json @@ -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", diff --git a/gradle.properties b/gradle.properties index bc2a165e07..903ed62639 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/membership/scans/corda-membership-5.2.0.yaml b/membership/scans/corda-membership-5.2.0.yaml index 2700313fa3..4e31e52b76 100644 --- a/membership/scans/corda-membership-5.2.0.yaml +++ b/membership/scans/corda-membership-5.2.0.yaml @@ -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 @@ -146,4 +148,10 @@ net.corda.v5.membership.NotaryInfo: - NotNull default: false type: public abstract - returnType: java.security.PublicKey \ No newline at end of file + returnType: java.security.PublicKey + isBackchainRequired: + annotations: + - NotNull + default: false + type: public abstract + returnType: Boolean \ No newline at end of file diff --git a/membership/src/main/java/net/corda/v5/membership/NotaryInfo.java b/membership/src/main/java/net/corda/v5/membership/NotaryInfo.java index f627c85c7d..ff9127c064 100644 --- a/membership/src/main/java/net/corda/v5/membership/NotaryInfo.java +++ b/membership/src/main/java/net/corda/v5/membership/NotaryInfo.java @@ -18,12 +18,14 @@ * String protocol = notaryInfo.getProtocol(); * Collection protocolVersions = notaryInfo.getProtocolVersions(); * PublicKey publicKey = notaryInfo.getPublicKey(); + * Boolean backchainRequired = notaryInfo.getBackchainRequired(); * } *
  • Kotlin:
    {@code
      * val name = notaryInfo.name
      * val protocol = notaryInfo.protocol
      * val protocolVersions = notaryInfo.protocolVersions
      * val publicKey = notaryInfo.publicKey
    + * val backchainRequired = notaryInfo.backchainRequired
      * }
  • * */ @@ -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(); }