diff --git a/.ci/JenkinsApiCompatibility b/.ci/JenkinsApiCompatibility index 9d073b5a2b..2fb1d7ca2e 100644 --- a/.ci/JenkinsApiCompatibility +++ b/.ci/JenkinsApiCompatibility @@ -1,4 +1,6 @@ // Check corda-api compatibility with downstream consumers which implement CordApps @Library('corda-shared-build-pipeline-steps@5.1') _ -cordaApiCompatibilityCheck() +cordaApiCompatibilityCheck( + javaVersion: '17' +) diff --git a/.ci/JenkinsfileSnykDelta b/.ci/JenkinsfileSnykDelta index dbb04113df..edbcec3751 100644 --- a/.ci/JenkinsfileSnykDelta +++ b/.ci/JenkinsfileSnykDelta @@ -2,5 +2,6 @@ snykDelta( snykOrgId: 'corda5-snyk-org-id', - snykTokenId: 'r3-snyk-corda5' + snykTokenId: 'r3-snyk-corda5', + javaVersion: '17' ) diff --git a/.ci/nightly/JenkinsfileNightly b/.ci/nightly/JenkinsfileNightly index eb836f8963..a1b6dbf1f9 100644 --- a/.ci/nightly/JenkinsfileNightly +++ b/.ci/nightly/JenkinsfileNightly @@ -4,5 +4,6 @@ cordaPipelineKubernetesAgent( runIntegrationTests: false, dailyBuildCron: 'H 02 * * *', gradleAdditionalArgs: '-Dscan.tag.Nightly-Build', - generateSbom: true + generateSbom: true, + javaVersion: '17' ) diff --git a/.ci/nightly/JenkinsfileSnykScan b/.ci/nightly/JenkinsfileSnykScan index 5d18b08b68..c654195c7a 100644 --- a/.ci/nightly/JenkinsfileSnykScan +++ b/.ci/nightly/JenkinsfileSnykScan @@ -1,5 +1,6 @@ @Library('corda-shared-build-pipeline-steps@5.1') _ cordaSnykScanPipeline ( - snykTokenId: 'r3-snyk-corda5' + snykTokenId: 'r3-snyk-corda5', + javaVersion: '17' ) diff --git a/.snyk b/.snyk index 36101b2ced..10630206a1 100644 --- a/.snyk +++ b/.snyk @@ -56,4 +56,4 @@ ignore: artifacts. expires: 2023-06-19T13:28:02.582Z created: 2023-03-20T13:28:02.597Z -patch: {} +patch: {} \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 000dba9570..77b1931115 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,4 +9,5 @@ cordaPipeline( localPublishVersionSuffixOverride: '-beta-9999999999999', // allow publishing artifacts to S3 bucket publishToMavenS3Repository: true, + javaVersion: '17' ) diff --git a/application/src/main/java/net/corda/v5/application/messaging/FlowMessaging.java b/application/src/main/java/net/corda/v5/application/messaging/FlowMessaging.java index 2f1c52f78a..8d2442bf85 100644 --- a/application/src/main/java/net/corda/v5/application/messaging/FlowMessaging.java +++ b/application/src/main/java/net/corda/v5/application/messaging/FlowMessaging.java @@ -153,8 +153,13 @@ String callFacade( * Suspends until a message has been received for each session in the specified {@code sessions}. *
* Consider {@link #receiveAllMap(Map)} when sessions are expected to receive different types. + *
+ * The {@code receiveType} should be of a type that is annotated with @CordaSerializable or a primitive type. This
+ * function cannot handle types that do not meet these criteria.
*
- * @param receiveType type of object to be received for all {@code sessions}.
+ * @param
* Consider {@link #receiveAll(Class, Set)} when the same type is expected from all sessions.
+ *
+ * The types of objects expected to be received should be annotated with @CordaSerializable or be a primitive type. This
+ * function cannot handle types that do not meet these criteria.
*
* @param sessions Map of session to the type of object that is expected to be received
* @return a {@link Map} containing the objects received by the {@link FlowSession}s who sent them.
@@ -184,8 +192,11 @@ String callFacade(
* Note that the other parties may receive the message at some arbitrary later point or not at all: if one of the provided [sessions]
* is offline then message delivery will be retried until the session expires. Sessions are deemed to be expired when this session
* stops receiving heartbeat messages from the counterparty within the configurable timeout.
+ *
+ * The {@code payload} object should be of a type that is annotated with @CordaSerializable or a primitive type. This
+ * function cannot handle types that do not meet these criteria.
*
- * @param payload the payload to send.
+ * @param payload the payload to send, which should be either a primitive type or a type annotated with @CordaSerializable.
* @param sessions the sessions to send the provided payload to.
*
* @throws CordaRuntimeException if any session is closed or in a failed state.
@@ -199,8 +210,12 @@ String callFacade(
* Note that the other parties may receive the message at some arbitrary later point or not at all: if one of the provided [sessions]
* is offline then message delivery will be retried until the session expires. Sessions are deemed to be expired when this session
* stops receiving heartbeat messages from the counterparty within the configurable timeout.
+ *
+ * The objects in {@code payloadsPerSession} should be of types that are annotated with @CordaSerializable or be primitive types. This
+ * function cannot handle types that do not meet these criteria.
*
* @param payloadsPerSession a mapping that contains the payload to be sent to each session.
+ * The payloads should be either of primitive types or types annotated with @CordaSerializable.
*
* @throws CordaRuntimeException if any session is closed or in a failed state.
*/
diff --git a/application/src/main/java/net/corda/v5/application/messaging/FlowSession.java b/application/src/main/java/net/corda/v5/application/messaging/FlowSession.java
index 2672b6395d..4615a0498c 100644
--- a/application/src/main/java/net/corda/v5/application/messaging/FlowSession.java
+++ b/application/src/main/java/net/corda/v5/application/messaging/FlowSession.java
@@ -71,10 +71,14 @@ public interface FlowSession {
* Note that this function is not just a simple send and receive pair. It is more efficient and more correct to use
* sendAndReceive when you expect to do a message swap rather than use {@link FlowSession#send} and then
* {@link FlowSession#receive}.
+ *
+ * Both the {@code payload} object and the {@code receiveType} should be of a type that is annotated
+ * with @CordaSerializable or a primitive type. This function cannot handle types that do not meet these criteria.
*
* @param
+ * The {@code receiveType} should be a type that is annotated with @CordaSerializable or a primitive type. This
+ * function cannot handle types that do not meet these criteria.
*
* @param
+ * The {@code payload} object should be of a type that is annotated with @CordaSerializable or a primitive type. This
+ * function cannot handle types that do not meet these criteria.
*
- * @param payload The data sent to the counterparty.
+ * @param payload The data sent to the counterparty, which should be either a primitive type
+ * or a type annotated with @CordaSerializable.
*
* @throws CordaRuntimeException if the session is closed or in a failed state.
*/
diff --git a/build.gradle b/build.gradle
index a701f8e2a6..6781274fb1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import static org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
import static org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_8
-import static org.gradle.api.JavaVersion.VERSION_11
+import static org.gradle.api.JavaVersion.VERSION_17
import static org.gradle.jvm.toolchain.JavaLanguageVersion.of
import org.jetbrains.dokka.gradle.DokkaTask
@@ -71,7 +71,7 @@ void configureKotlinForOSGi(Configuration configuration) {
}
def releaseType = System.getenv('RELEASE_TYPE') ?: "SNAPSHOT"
-def javaVersion = VERSION_11
+def javaVersion = VERSION_17
logger.quiet("********************** CORDA BUILD **********************")
if (!JavaVersion.current().isCompatibleWith(javaVersion)) {
@@ -129,8 +129,8 @@ subprojects {
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-parameters'
-
options.encoding = 'UTF-8'
+ options.release.set(11)
}
// Added to support junit5 tests
@@ -406,4 +406,4 @@ if (project.hasProperty('generateSBOM')) {
artifactoryPublish {
publications('sbom')
}
-}
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/FindSignedLedgerTransaction.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/FindSignedLedgerTransaction.avsc
new file mode 100644
index 0000000000..3f8e2d19e6
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/FindSignedLedgerTransaction.avsc
@@ -0,0 +1,18 @@
+{
+ "type": "record",
+ "name": "FindSignedLedgerTransaction",
+ "doc": "Retrieve the specified ledger transaction, specified by id. One of several types of ledger persistence request {@link LedgerPersistenceRequest}",
+ "namespace": "net.corda.data.ledger.persistence",
+ "fields": [
+ {
+ "name": "id",
+ "type": "string",
+ "doc": "The transaction ID, derived from the root hash of its Merkle tree"
+ },
+ {
+ "name": "transactionStatus",
+ "type": "string",
+ "doc": "The status of the transaction"
+ }
+ ]
+}
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/LedgerPersistenceRequest.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/LedgerPersistenceRequest.avsc
index 7ba53d16e7..f45bde6967 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/LedgerPersistenceRequest.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/ledger/persistence/LedgerPersistenceRequest.avsc
@@ -38,7 +38,8 @@
"net.corda.data.ledger.persistence.UpdateTransactionStatus",
"net.corda.data.persistence.FindWithNamedQuery",
"net.corda.data.ledger.persistence.FindSignedGroupParameters",
- "net.corda.data.ledger.persistence.PersistSignedGroupParametersIfDoNotExist"
+ "net.corda.data.ledger.persistence.PersistSignedGroupParametersIfDoNotExist",
+ "net.corda.data.ledger.persistence.FindSignedLedgerTransaction"
]
},
{
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/DistributeGroupParameters.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/DistributeGroupParameters.avsc
new file mode 100644
index 0000000000..ab606d18a5
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/DistributeGroupParameters.avsc
@@ -0,0 +1,18 @@
+{
+ "type": "record",
+ "name": "DistributeGroupParameters",
+ "namespace": "net.corda.data.membership.actions.request",
+ "doc": "Distribute group parameters to the rest of the network.",
+ "fields": [
+ {
+ "name": "mgm",
+ "doc": "The membership group manager of the group.",
+ "type": "net.corda.data.identity.HoldingIdentity"
+ },
+ {
+ "name": "minimumGroupParametersEpoch",
+ "doc": "The minimum group parameters epoch to be distributed (if null, the latest version is used). If the group parameters with this epoch have not been published, then the membership actions processor will requeue this request to be retried later.",
+ "type": ["null", "int"]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/MembershipActionsRequest.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/MembershipActionsRequest.avsc
index 628a08cbdd..aab33c3d3b 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/MembershipActionsRequest.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/actions.request/MembershipActionsRequest.avsc
@@ -7,7 +7,10 @@
{
"name": "request",
"doc": "Request's payload, depends on the requested action.",
- "type": ["DistributeMemberInfo"]
+ "type": [
+ "DistributeMemberInfo",
+ "DistributeGroupParameters"
+ ]
}
]
}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/RegistrationCommand.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/RegistrationCommand.avsc
index 6b1f09e8cc..192e984626 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/RegistrationCommand.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/RegistrationCommand.avsc
@@ -8,6 +8,8 @@
"name": "command",
"doc": "Indicator of the type of registration command that was issued.",
"type": [
+ "net.corda.data.membership.command.registration.mgm.QueueRegistration",
+ "net.corda.data.membership.command.registration.mgm.CheckForPendingRegistration",
"net.corda.data.membership.command.registration.mgm.StartRegistration",
"net.corda.data.membership.command.registration.mgm.VerifyMember",
"net.corda.data.membership.command.registration.mgm.ProcessMemberVerificationResponse",
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/member/PersistMemberRegistrationState.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/member/PersistMemberRegistrationState.avsc
index 66dc1e3f02..5a4e606f66 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/member/PersistMemberRegistrationState.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/member/PersistMemberRegistrationState.avsc
@@ -12,7 +12,7 @@
{
"name": "setStatusRequest",
"doc" : "The request to set the status.",
- "type": "net.corda.data.membership.p2p.SetOwnRegistrationStatus"
+ "type": "net.corda.data.membership.p2p.v2.SetOwnRegistrationStatus"
}
]
}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/CheckForPendingRegistration.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/CheckForPendingRegistration.avsc
new file mode 100644
index 0000000000..7b48eeb335
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/CheckForPendingRegistration.avsc
@@ -0,0 +1,23 @@
+{
+ "type": "record",
+ "name": "CheckForPendingRegistration",
+ "namespace": "net.corda.data.membership.command.registration.mgm",
+ "doc": " Command issued when a member registration request is successfully queued.",
+ "fields": [
+ {
+ "name": "mgm",
+ "doc": "Holding identity of the MGM.",
+ "type": "net.corda.data.identity.HoldingIdentity"
+ },
+ {
+ "name": "member",
+ "doc": "Holding identity of the registering member as provided during P2P communication. Used to verify the registration request.",
+ "type": "net.corda.data.identity.HoldingIdentity"
+ },
+ {
+ "name": "numberOfRetriesSoFar",
+ "doc": "The number of times this request failed so far.",
+ "type": "int"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/QueueRegistration.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/QueueRegistration.avsc
new file mode 100644
index 0000000000..b77d6ae081
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/QueueRegistration.avsc
@@ -0,0 +1,28 @@
+{
+ "type": "record",
+ "name": "QueueRegistration",
+ "namespace": "net.corda.data.membership.command.registration.mgm",
+ "doc": " Command issued when a member registration request is received and needs to be processed.",
+ "fields": [
+ {
+ "name": "mgm",
+ "doc": "Holding identity of the target MGM.",
+ "type": "net.corda.data.identity.HoldingIdentity"
+ },
+ {
+ "name": "member",
+ "doc": "Holding identity of the requesting member.",
+ "type": "net.corda.data.identity.HoldingIdentity"
+ },
+ {
+ "name": "memberRegistrationRequest",
+ "doc": "The full registration request as received from a registering member.",
+ "type": "net.corda.data.membership.p2p.MembershipRegistrationRequest"
+ },
+ {
+ "name": "numberOfRetriesSoFar",
+ "doc": "The number of times this request failed so far.",
+ "type": "int"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/StartRegistration.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/StartRegistration.avsc
index 76bcdcb00b..586942d895 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/StartRegistration.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/command/registration/mgm/StartRegistration.avsc
@@ -3,21 +3,5 @@
"name": "StartRegistration",
"namespace": "net.corda.data.membership.command.registration.mgm",
"doc": " Command issued when a member registration request is received and needs to be processed.",
- "fields": [
- {
- "name": "destination",
- "doc": "Holding identity of the target MGM.",
- "type": "net.corda.data.identity.HoldingIdentity"
- },
- {
- "name": "source",
- "doc": "Holding identity of the requesting member.",
- "type": "net.corda.data.identity.HoldingIdentity"
- },
- {
- "name": "memberRegistrationRequest",
- "doc": "The full registration request as received from a registering member.",
- "type": "net.corda.data.membership.p2p.MembershipRegistrationRequest"
- }
- ]
+ "fields": []
}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/RegistrationRequestDetails.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/RegistrationRequestDetails.avsc
index 9ea0e18c67..b3b90d6550 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/RegistrationRequestDetails.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/RegistrationRequestDetails.avsc
@@ -23,13 +23,18 @@
{
"name": "registrationStatus",
"doc": "Status of the registration request.",
- "type": "RegistrationStatus"
+ "type": "net.corda.data.membership.common.v2.RegistrationStatus"
},
{
"name": "registrationId",
"doc": "ID of the registration request.",
"type": "string"
},
+ {
+ "name": "holdingIdentityId",
+ "doc": "ID of the owner of this registration request.",
+ "type": "string"
+ },
{
"name": "registrationProtocolVersion",
"doc": "Registration protocol number.",
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/v2/RegistrationStatus.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/v2/RegistrationStatus.avsc
new file mode 100644
index 0000000000..da88957759
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/common/v2/RegistrationStatus.avsc
@@ -0,0 +1,20 @@
+{
+ "type": "enum",
+ "name": "RegistrationStatus",
+ "namespace": "net.corda.data.membership.common.v2",
+ "doc": "Registration request status.",
+ "symbols": [
+ "NEW",
+ "SENT_TO_MGM",
+ "RECEIVED_BY_MGM",
+ "STARTED_PROCESSING_BY_MGM",
+ "PENDING_MEMBER_VERIFICATION",
+ "PENDING_MANUAL_APPROVAL",
+ "PENDING_AUTO_APPROVAL",
+ "DECLINED",
+ "INVALID",
+ "FAILED",
+ "APPROVED"
+ ],
+ "default": "NEW"
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/MembershipPersistenceRequest.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/MembershipPersistenceRequest.avsc
index 5ff7056166..6196ace8db 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/MembershipPersistenceRequest.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/MembershipPersistenceRequest.avsc
@@ -31,6 +31,7 @@
"net.corda.data.membership.db.request.command.SuspendMember",
"net.corda.data.membership.db.request.command.ActivateMember",
"net.corda.data.membership.db.request.command.UpdateStaticNetworkInfo",
+ "net.corda.data.membership.db.request.command.UpdateGroupParameters",
"net.corda.data.membership.db.request.query.QueryGroupPolicy",
"net.corda.data.membership.db.request.query.QueryMemberInfo",
"net.corda.data.membership.db.request.query.QueryMemberSignature",
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/PersistRegistrationRequest.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/PersistRegistrationRequest.avsc
index 414f6ee40d..eb2baffe3c 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/PersistRegistrationRequest.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/PersistRegistrationRequest.avsc
@@ -7,7 +7,7 @@
{
"name": "status",
"doc": "Indicator of the current status of the request.",
- "type": "net.corda.data.membership.common.RegistrationStatus"
+ "type": "net.corda.data.membership.common.v2.RegistrationStatus"
},
{
"name": "registeringHoldingIdentity",
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateGroupParameters.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateGroupParameters.avsc
new file mode 100644
index 0000000000..1694969dbc
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateGroupParameters.avsc
@@ -0,0 +1,17 @@
+{
+ "type": "record",
+ "name": "UpdateGroupParameters",
+ "namespace": "net.corda.data.membership.db.request.command",
+ "doc": "Update group parameters",
+ "fields": [
+ {
+ "name": "update",
+ "doc": "Updated version of the group parameters.",
+ "type":
+ {
+ "type": "map",
+ "values": "string"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateRegistrationRequestStatus.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateRegistrationRequestStatus.avsc
index e204e8604d..db1331d894 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateRegistrationRequestStatus.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/command/UpdateRegistrationRequestStatus.avsc
@@ -15,7 +15,7 @@
{
"name": "registrationStatus",
"doc": "The new status for this registration request.",
- "type": "net.corda.data.membership.common.RegistrationStatus"
+ "type": "net.corda.data.membership.common.v2.RegistrationStatus"
},
{
"name": "reason",
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/query/QueryRegistrationRequests.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/query/QueryRegistrationRequests.avsc
index 1bd3ca4d42..cec36111f3 100644
--- a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/query/QueryRegistrationRequests.avsc
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/db/request/query/QueryRegistrationRequests.avsc
@@ -14,7 +14,7 @@
"doc": "Requests in the specified statuses will be included in the query result.",
"type": {
"type": "array",
- "items": "net.corda.data.membership.common.RegistrationStatus"
+ "items": "net.corda.data.membership.common.v2.RegistrationStatus"
}
},
{
diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/membership/p2p/v2/SetOwnRegistrationStatus.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/p2p/v2/SetOwnRegistrationStatus.avsc
new file mode 100644
index 0000000000..f58ed8ee4c
--- /dev/null
+++ b/data/avro-schema/src/main/resources/avro/net/corda/data/membership/p2p/v2/SetOwnRegistrationStatus.avsc
@@ -0,0 +1,21 @@
+{
+ "type": "record",
+ "name": "SetOwnRegistrationStatus",
+ "namespace": "net.corda.data.membership.p2p.v2",
+ "doc": "Set the member registration status.",
+ "fields": [
+ {
+ "name": "registrationId",
+ "doc": "ID of the registration to set the status.",
+ "type": {
+ "type": "string",
+ "logicalType": "uuid"
+ }
+ },
+ {
+ "name": "newStatus",
+ "doc": "The new registration status.",
+ "type": "net.corda.data.membership.common.v2.RegistrationStatus"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data/avro-schema/src/test/kotlin/net/corda/data/ledger/persistence/LedgerPersistenceRequestSchemaCompatibilityTest.kt b/data/avro-schema/src/test/kotlin/net/corda/data/ledger/persistence/LedgerPersistenceRequestSchemaCompatibilityTest.kt
new file mode 100644
index 0000000000..834a6bb292
--- /dev/null
+++ b/data/avro-schema/src/test/kotlin/net/corda/data/ledger/persistence/LedgerPersistenceRequestSchemaCompatibilityTest.kt
@@ -0,0 +1,98 @@
+package net.corda.data.ledger.persistence
+
+import net.corda.data.flow.event.external.ExternalEventContext
+import net.corda.data.identity.HoldingIdentity
+import net.corda.data.persistence.FindWithNamedQuery
+import org.apache.avro.Schema
+import org.apache.avro.SchemaCompatibility
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Test
+
+@Suppress("MaxLineLength")
+class LedgerPersistenceRequestSchemaCompatibilityTest {
+
+ @Test
+ fun `LedgerPersistenceRequest schema changes between Corda 5_0 and 5_1 are compatible`() {
+ val oldSchemaJson = """
+ {
+ "type": "record",
+ "name": "LedgerPersistenceRequest",
+ "doc": "Make a persistence request on a ledger. The action is determined by the type of the {@link LedgerPersistenceRequest#request} payload. See also: {@link EntityResponse}, {@link PersistTransaction}",
+ "namespace": "net.corda.data.ledger.persistence",
+ "fields": [
+ {
+ "name": "timestamp",
+ "type": {
+ "type": "long",
+ "logicalType": "timestamp-millis"
+ },
+ "doc": "Time ({@link java.time.Instant}) in milliseconds when the record was created."
+ },
+ {
+ "name": "holdingIdentity",
+ "type": "net.corda.data.identity.HoldingIdentity",
+ "doc": "The holding identity of the user making the DB request."
+ },
+ {
+ "name": "ledgerType",
+ "type": {
+ "name": "LedgerTypes",
+ "type": "enum",
+ "symbols": ["UTXO","CONSENSUAL"]
+ },
+ "doc": "The type of ledger the request is for."
+ },
+ {
+ "name": "request",
+ "doc": "The 'request' that we wish to make to the ledger persistence API.",
+ "type": [
+ "net.corda.data.ledger.persistence.PersistTransaction",
+ "net.corda.data.ledger.persistence.PersistTransactionIfDoesNotExist",
+ "net.corda.data.ledger.persistence.FindTransaction",
+ "net.corda.data.ledger.persistence.FindUnconsumedStatesByType",
+ "net.corda.data.ledger.persistence.ResolveStateRefs",
+ "net.corda.data.ledger.persistence.UpdateTransactionStatus",
+ "net.corda.data.persistence.FindWithNamedQuery",
+ "net.corda.data.ledger.persistence.FindSignedGroupParameters",
+ "net.corda.data.ledger.persistence.PersistSignedGroupParametersIfDoNotExist"
+ ]
+ },
+ {
+ "name": "flowExternalEventContext",
+ "type": "net.corda.data.flow.event.external.ExternalEventContext",
+ "doc": "The context of the external event that this request was sent from."
+ }
+ ]
+ }
+ """.trimIndent()
+
+ val oldSchema = Schema.Parser()
+ .addTypes(
+ mapOf(
+ HoldingIdentity::class.java.name to HoldingIdentity.`SCHEMA$`,
+ PersistTransaction::class.java.name to PersistTransaction.`SCHEMA$`,
+ PersistTransactionIfDoesNotExist::class.java.name to PersistTransactionIfDoesNotExist.`SCHEMA$`,
+ FindTransaction::class.java.name to FindTransaction.`SCHEMA$`,
+ FindUnconsumedStatesByType::class.java.name to FindUnconsumedStatesByType.`SCHEMA$`,
+ ResolveStateRefs::class.java.name to ResolveStateRefs.`SCHEMA$`,
+ UpdateTransactionStatus::class.java.name to UpdateTransactionStatus.`SCHEMA$`,
+ FindWithNamedQuery::class.java.name to FindWithNamedQuery.`SCHEMA$`,
+ FindSignedGroupParameters::class.java.name to FindSignedGroupParameters.`SCHEMA$`,
+ PersistSignedGroupParametersIfDoNotExist::class.java.name to PersistSignedGroupParametersIfDoNotExist.`SCHEMA$`,
+ FindSignedLedgerTransaction::class.java.name to FindSignedLedgerTransaction.`SCHEMA$`,
+ ExternalEventContext::class.java.name to ExternalEventContext.`SCHEMA$`,
+ )
+ )
+ .parse(oldSchemaJson)
+
+ val newSchema = LedgerPersistenceRequest.`SCHEMA$`
+
+ val compatibility = SchemaCompatibility.checkReaderWriterCompatibility(newSchema, oldSchema)
+
+ assertEquals(
+ compatibility.type,
+ SchemaCompatibility.SchemaCompatibilityType.COMPATIBLE,
+ "Failed due to incompatible change. ${compatibility.description}"
+ )
+ }
+}
\ No newline at end of file
diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/ConfigKeys.java b/data/config-schema/src/main/java/net/corda/schema/configuration/ConfigKeys.java
index 829770651b..7b7ec6b18a 100644
--- a/data/config-schema/src/main/java/net/corda/schema/configuration/ConfigKeys.java
+++ b/data/config-schema/src/main/java/net/corda/schema/configuration/ConfigKeys.java
@@ -23,6 +23,7 @@ private ConfigKeys() {
public static final String RECONCILIATION_CONFIG = "corda.reconciliation";
public static final String MEMBERSHIP_CONFIG = "corda.membership";
public static final String SECURITY_CONFIG = "corda.security";
+ public static final String VNODE_DATASOURCE_CONFIG = "corda.vnode.datasource";
// REST
public static final String REST_ADDRESS = "address";
diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/MembershipConfig.java b/data/config-schema/src/main/java/net/corda/schema/configuration/MembershipConfig.java
index 65ff5397ce..4f57ee2562 100644
--- a/data/config-schema/src/main/java/net/corda/schema/configuration/MembershipConfig.java
+++ b/data/config-schema/src/main/java/net/corda/schema/configuration/MembershipConfig.java
@@ -12,6 +12,16 @@ private MembershipConfig() {
*/
public static final String MAX_DURATION_BETWEEN_SYNC_REQUESTS_MINUTES = "maxDurationBetweenSyncRequestsMinutes";
+ /**
+ * The configuration key to get the maximum duration in minutes between polling for expired registration requests.
+ */
+ public static final String MAX_DURATION_BETWEEN_EXPIRED_REGISTRATION_REQUESTS_POLLS = "frequencyOfExpirationPoll";
+
+ /**
+ * The configuration key to get the time frame in minutes after which a registration request is considered as expired and gets force declined.
+ */
+ public static final String EXPIRATION_DATE_FOR_REGISTRATION_REQUESTS = "expirationTimeFrame";
+
public static final class TtlsConfig {
private TtlsConfig() {
}
diff --git a/data/config-schema/src/main/java/net/corda/schema/configuration/VirtualNodeDatasourceConfig.java b/data/config-schema/src/main/java/net/corda/schema/configuration/VirtualNodeDatasourceConfig.java
new file mode 100644
index 0000000000..e90694dffa
--- /dev/null
+++ b/data/config-schema/src/main/java/net/corda/schema/configuration/VirtualNodeDatasourceConfig.java
@@ -0,0 +1,16 @@
+package net.corda.schema.configuration;
+
+public class VirtualNodeDatasourceConfig {
+ private VirtualNodeDatasourceConfig() {
+ }
+
+ public static final String VNODE_DDL_POOL_CONFIG = "pool.ddl";
+ public static final String VNODE_DML_POOL_CONFIG = "pool.dml";
+
+ public static final String VNODE_POOL_MAX_SIZE = "max_size";
+ public static final String VNODE_POOL_MIN_SIZE = "min_size";
+ public static final String VNODE_POOL_IDLE_TIMEOUT_SECONDS = "idleTimeoutSeconds";
+ public static final String VNODE_POOL_MAX_LIFETIME_SECONDS = "maxLifetimeSeconds";
+ public static final String VNODE_POOL_KEEPALIVE_TIME_SECONDS = "keepaliveTimeSeconds";
+ public static final String VNODE_VALIDATION_TIMEOUT_SECONDS = "validationTimeoutSeconds";
+}
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/crypto/1.0/corda.crypto.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/crypto/1.0/corda.crypto.json
index 9b50493310..62f006c0c6 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/crypto/1.0/corda.crypto.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/crypto/1.0/corda.crypto.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/crypto/1.0/corda.crypto.json",
"title": "Corda Crypto Library Configuration Schema",
"description": "Configuration schema for the crypto library subsection.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/db/1.0/corda.db.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/db/1.0/corda.db.json
index 58bbc27f1c..97cb1c96f1 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/db/1.0/corda.db.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/db/1.0/corda.db.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/db/1.0/corda.db.json",
"title": "Corda Database Configuration Schema",
"description": "Configuration schema for the database section. Note that this configuration cannot be updated dynamically through the REST endpoint.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/externalMessaging/1.0/corda.externalMessaging.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/externalMessaging/1.0/corda.externalMessaging.json
index 5ae9361c66..2adbbcc84e 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/externalMessaging/1.0/corda.externalMessaging.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/externalMessaging/1.0/corda.externalMessaging.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/external.messaging/1.0/corda.external.messaging.json",
"title": "Corda External Messaging Configuration Schema",
"description": "Configuration schema for external messaging.",
@@ -14,19 +14,19 @@
"type": "string",
"default": "ext.$HOLDING_ID.$CHANNEL_NAME.receive",
"pattern": "^(ext|EXT)([a-zA-Z0-9\\._\\-]|\\$HOLDING_ID|\\$CHANNEL_NAME){1,100}$",
- "description": "The pattern used to generate the external app receiving topic."
+ "description": "The pattern used to generate the external app receiving topic. When creating routes, Corda replaces any placeholders with the virtual node specific values. "
},
"active": {
"type": "boolean",
"default": true,
- "description": "The default activation type."
+ "description": "Specifies if the route is active."
},
"inactiveResponseType": {
"description": "The default behaviour of the external messaging API when publishing to an inactive route.",
"oneOf": [
{
"const": "ERROR",
- "title": "The API will throw an exception if a flow publishes a message to an inactive topic"
+ "title": "The API will throw an exception if a flow publishes a message to an inactive topic."
},
{
"const": "IGNORE",
@@ -40,4 +40,4 @@
"additionalProperties": false
}
}
-}
\ No newline at end of file
+}
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/flow/1.0/corda.flow.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/flow/1.0/corda.flow.json
index 1c1cb5f1c4..5fe591b4b7 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/flow/1.0/corda.flow.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/flow/1.0/corda.flow.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/flow/1.0/corda.flow.json",
"title": "Corda Flow Configuration Schema",
"description": "Configuration schema for the flow section.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/ledger.utxo/1.0/corda.ledger.utxo.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/ledger.utxo/1.0/corda.ledger.utxo.json
index 686baca7d8..b3d2415539 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/ledger.utxo/1.0/corda.ledger.utxo.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/ledger.utxo/1.0/corda.ledger.utxo.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/ledger/utxo/1.0/corda.ledger.utxo.json",
"title": "Corda UTXO ledger Configuration Schema",
"description": "Configuration schema for the UTXO ledger.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/membership/1.0/corda.membership.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/membership/1.0/corda.membership.json
index be6e1ec153..3fc98ff0ec 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/membership/1.0/corda.membership.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/membership/1.0/corda.membership.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/membership/1.0/corda.membership.json",
"title": "Corda Membership Configuration Schema",
"description": "Configuration schema for the membership subsection.",
@@ -13,6 +13,20 @@
"maximum": 2880,
"default": 480
},
+ "frequencyOfExpirationPoll": {
+ "description": "The maximum duration in minutes between polling for expired registration requests.",
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 2880,
+ "default": 300
+ },
+ "expirationTimeFrame": {
+ "description": "The time frame in minutes after which a registration request is considered as expired and gets force declined.",
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 2880,
+ "default": 180
+ },
"TTLs": {
"description": "The maximum durations in minutes to wait for different types of message to send. If set to null, Corda waits forever.",
"type": "object",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/corda.messaging.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/corda.messaging.json
index baa2ad090a..57eaf5e018 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/corda.messaging.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/corda.messaging.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/messaging/1.0/corda.messaging.json",
"title": "Corda Messaging Configuration Schema",
"description": "Configuration schema for the messaging section. This configures the interactions of the workers with the underlying message bus.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/kafka-properties.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/kafka-properties.json
index da8daba67a..bd04888dc1 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/kafka-properties.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/kafka-properties.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/messaging/1.0/kafka-properties.json",
"title": "Kafka properties schema",
"description": "Schema container for Kafka properties",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/publisher.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/publisher.json
index d8a2cb486f..d751660f0d 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/publisher.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/publisher.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/messaging/1.0/publisher.json",
"title": "Publisher configuration",
"description": "Settings for all publishers that write to the message bus.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json
index 0c2a19485b..14113fdcad 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/messaging/1.0/subscription.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/messaging/1.0/subscription.json",
"title": "Common subscription configuration",
"description": "Configuration settings for all subscriptions to the message bus.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.gateway/1.0/corda.p2p.gateway.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.gateway/1.0/corda.p2p.gateway.json
index 17b5b8b320..383ebd2c4e 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.gateway/1.0/corda.p2p.gateway.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.gateway/1.0/corda.p2p.gateway.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/p2p/1.0/corda.p2p.gateway.json",
"title": "Corda P2P Gateway Configuration Schema",
"description": "Configuration schema for the P2P gateway.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.linkManager/1.0/corda.p2p.linkManager.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.linkManager/1.0/corda.p2p.linkManager.json
index 17a94725e2..5177b39dba 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.linkManager/1.0/corda.p2p.linkManager.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/p2p.linkManager/1.0/corda.p2p.linkManager.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/p2p/1.0/corda.p2p.linkmanager.json",
"title": "Corda P2P Link Manager Configuration Schema",
"description": "Configuration schema for the P2P link manager.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/reconciliation/1.0/corda.reconciliation.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/reconciliation/1.0/corda.reconciliation.json
index 79b0b969c3..8dc1246e5a 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/reconciliation/1.0/corda.reconciliation.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/reconciliation/1.0/corda.reconciliation.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/reconciliation/1.0/corda.reconciliation.json",
"title": "Corda Reconciliation Configuration Schema",
"description": "Configuration schema for the reconciliation section.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/rest/1.0/corda.rest.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/rest/1.0/corda.rest.json
index a4a8ef2ee5..d67fbec7a1 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/rest/1.0/corda.rest.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/rest/1.0/corda.rest.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/rest/1.0/corda.rest.json",
"title": "Corda REST Configuration Schema",
"description": "Configuration schema for the REST section.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/sandbox/1.0/corda.sandbox.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/sandbox/1.0/corda.sandbox.json
index 949d60366e..00fd131199 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/sandbox/1.0/corda.sandbox.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/sandbox/1.0/corda.sandbox.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/sandbox/1.0/corda.sandbox.json",
"title": "Corda Sandbox Configuration Schema",
"description": "Configuration schema for the sandbox section.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/secrets/1.0/corda.secrets.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/secrets/1.0/corda.secrets.json
index 9263d8cc68..3d17366729 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/secrets/1.0/corda.secrets.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/secrets/1.0/corda.secrets.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/secrets/1.0/corda.secrets.json",
"title": "Corda Secrets Configuration Schema",
"description": "Configuration schema for the secrets subsection.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/security/1.0/corda.security.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/security/1.0/corda.security.json
index 5fb1bf49aa..efc6ace176 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/configuration/security/1.0/corda.security.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/security/1.0/corda.security.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/security/1.0/corda.security.json",
"title": "Corda Security Configuration Schema",
"description": "Configuration schema for the security subsection.",
diff --git a/data/config-schema/src/main/resources/net/corda/schema/configuration/vnode.datasource/1.0/corda.vnode.datasource.json b/data/config-schema/src/main/resources/net/corda/schema/configuration/vnode.datasource/1.0/corda.vnode.datasource.json
new file mode 100644
index 0000000000..ea7ce9347b
--- /dev/null
+++ b/data/config-schema/src/main/resources/net/corda/schema/configuration/vnode.datasource/1.0/corda.vnode.datasource.json
@@ -0,0 +1,114 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "https://corda.r3.com/net/corda/schema/configuration/db/1.0/corda.db.json",
+ "title": "Corda Virtual Node Datasource Configuration Schema",
+ "description": "Configuration schema for the Virtual Node Datasource section.",
+ "type": "object",
+ "properties": {
+ "pool": {
+ "description": "Datasource pool settings.",
+ "type": "object",
+ "default": {},
+ "properties": {
+ "ddl": {
+ "description": "DDL Datasource pool config.",
+ "type": "object",
+ "default": {},
+ "properties": {
+ "max_size": {
+ "description": "The maximum database pool size.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 1
+ },
+ "min_size": {
+ "description": "The minimum database pool size. If left null will default to the `max_size` value.",
+ "default": null,
+ "anyOf": [
+ {
+ "type": "integer",
+ "minimum": 0
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "idleTimeoutSeconds": {
+ "description": "The maximum time (in seconds) a connection can stay idle in the pool. A value of 0 means that idle connections are never removed from the pool.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 120
+ },
+ "maxLifetimeSeconds": {
+ "description": "The maximum time (in seconds) a connection can stay in the pool, regardless if it has been idle or has been recently used. If a connection is in-use and has reached \"maxLifetime\" timeout, it will be removed from the pool only when it becomes idle.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 1800
+ },
+ "keepaliveTimeSeconds": {
+ "description": "The interval time (in seconds) in which connections will be tested for aliveness. Connections which are no longer alive are removed from the pool. A value of 0 means this check is disabled.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 0
+ },
+ "validationTimeoutSeconds": {
+ "description": "The maximum time (in seconds) that the pool will wait for a connection to be validated as alive.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 5
+ }
+ },
+ "additionalProperties": false
+ },
+ "dml": {
+ "description": "DML Datasource pool config.",
+ "type": "object",
+ "default": {},
+ "properties": {
+ "max_size": {
+ "description": "The maximum database pool size.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 10
+ },
+ "min_size": {
+ "description": "The minimum database pool size.",
+ "type": "integer",
+ "default": 0,
+ "minimum": 0
+ },
+ "idleTimeoutSeconds": {
+ "description": "The maximum time (in seconds) a connection can stay idle in the pool. A value of 0 means that idle connections are never removed from the pool.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 120
+ },
+ "maxLifetimeSeconds": {
+ "description": "The maximum time (in seconds) a connection can stay in the pool, regardless if it has been idle or has been recently used. If a connection is in-use and has reached \"maxLifetime\" timeout, it will be removed from the pool only when it becomes idle.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 1800
+ },
+ "keepaliveTimeSeconds": {
+ "description": "The interval time (in seconds) in which connections will be tested for aliveness. Connections which are no longer alive are removed from the pool. A value of 0 means this check is disabled.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 0
+ },
+ "validationTimeoutSeconds": {
+ "description": "The maximum time (in seconds) that the pool will wait for a connection to be validated as alive.",
+ "type": "integer",
+ "minimum": 1,
+ "default": 5
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "additionalProperties": false
+ },
+ "default": {}
+ },
+ "additionalProperties": false
+}
\ No newline at end of file
diff --git a/data/config-schema/src/main/resources/net/corda/schema/cordapp/configuration/external.messaging/1.0/corda.external.messaging.json b/data/config-schema/src/main/resources/net/corda/schema/cordapp/configuration/external.messaging/1.0/corda.external.messaging.json
index 49f8f97a81..b66ee8b294 100644
--- a/data/config-schema/src/main/resources/net/corda/schema/cordapp/configuration/external.messaging/1.0/corda.external.messaging.json
+++ b/data/config-schema/src/main/resources/net/corda/schema/cordapp/configuration/external.messaging/1.0/corda.external.messaging.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/cordapp/configuration/external/messaging/1.0/corda.external.messaging.json",
"title": "Corda External Messaging Configuration Schema",
"description": "Configuration schema for the external messaging.",
diff --git a/data/config-schema/src/test/resources/net/corda/schema/configuration/test/1.0/schema-fragment.json b/data/config-schema/src/test/resources/net/corda/schema/configuration/test/1.0/schema-fragment.json
index 317eeb8883..9d7b5c31cf 100644
--- a/data/config-schema/src/test/resources/net/corda/schema/configuration/test/1.0/schema-fragment.json
+++ b/data/config-schema/src/test/resources/net/corda/schema/configuration/test/1.0/schema-fragment.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/configuration/test/1.0/schema-fragment.json",
"title": "Test schema fragment",
"description": "Schema fragment for testing",
diff --git a/data/config-schema/src/test/resources/net/corda/schema/cordapp/configuration/test/1.0/schema-fragment.json b/data/config-schema/src/test/resources/net/corda/schema/cordapp/configuration/test/1.0/schema-fragment.json
index 6786c23589..af623850f3 100644
--- a/data/config-schema/src/test/resources/net/corda/schema/cordapp/configuration/test/1.0/schema-fragment.json
+++ b/data/config-schema/src/test/resources/net/corda/schema/cordapp/configuration/test/1.0/schema-fragment.json
@@ -1,5 +1,5 @@
{
- "$schema": "http://json-schema.org/draft-07/schema#",
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://corda.r3.com/net/corda/schema/cordapp/configuration/test/1.0/schema-fragment.json",
"title": "Test schema fragment",
"description": "Schema fragment for testing",
diff --git a/data/db-schema/src/main/resources/net/corda/db/schema/config/db.changelog-master.xml b/data/db-schema/src/main/resources/net/corda/db/schema/config/db.changelog-master.xml
index a3950057bb..555289cace 100644
--- a/data/db-schema/src/main/resources/net/corda/db/schema/config/db.changelog-master.xml
+++ b/data/db-schema/src/main/resources/net/corda/db/schema/config/db.changelog-master.xml
@@ -6,4 +6,6 @@