Skip to content

Commit

Permalink
Merge branch 'release/os/5.1' into alex/recurring-merge-from-main
Browse files Browse the repository at this point in the history
  • Loading branch information
ac101m committed Aug 2, 2023
2 parents ffa34ff + 0393fa0 commit 2709feb
Show file tree
Hide file tree
Showing 61 changed files with 552 additions and 80 deletions.
4 changes: 3 additions & 1 deletion .ci/JenkinsApiCompatibility
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Check corda-api compatibility with downstream consumers which implement CordApps
@Library('[email protected]') _

cordaApiCompatibilityCheck()
cordaApiCompatibilityCheck(
javaVersion: '17'
)
3 changes: 2 additions & 1 deletion .ci/JenkinsfileSnykDelta
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

snykDelta(
snykOrgId: 'corda5-snyk-org-id',
snykTokenId: 'r3-snyk-corda5'
snykTokenId: 'r3-snyk-corda5',
javaVersion: '17'
)
3 changes: 2 additions & 1 deletion .ci/nightly/JenkinsfileNightly
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ cordaPipelineKubernetesAgent(
runIntegrationTests: false,
dailyBuildCron: 'H 02 * * *',
gradleAdditionalArgs: '-Dscan.tag.Nightly-Build',
generateSbom: true
generateSbom: true,
javaVersion: '17'
)
3 changes: 2 additions & 1 deletion .ci/nightly/JenkinsfileSnykScan
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@Library('[email protected]') _

cordaSnykScanPipeline (
snykTokenId: 'r3-snyk-corda5'
snykTokenId: 'r3-snyk-corda5',
javaVersion: '17'
)
2 changes: 1 addition & 1 deletion .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ ignore:
artifacts.
expires: 2023-06-19T13:28:02.582Z
created: 2023-03-20T13:28:02.597Z
patch: {}
patch: {}
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ cordaPipeline(
localPublishVersionSuffixOverride: '-beta-9999999999999',
// allow publishing artifacts to S3 bucket
publishToMavenS3Repository: true,
javaVersion: '17'
)
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,13 @@ String callFacade(
* Suspends until a message has been received for each session in the specified {@code sessions}.
* <p>
* Consider {@link #receiveAllMap(Map)} when sessions are expected to receive different types.
* <p>
* 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 <R> type of object to be received for all {@code sessions}.
* @param receiveType Type of object to be received for all {@code sessions}, which should be either a primitive type
* or a type annotated with @CordaSerializable.
* @param sessions Set of sessions to receive from.
* @return a {@link List} containing the objects received from the {@code sessions}.
*
Expand All @@ -168,6 +173,9 @@ String callFacade(
* Suspends until a message has been received for each session in the specified {@code sessions}.
* <p>
* Consider {@link #receiveAll(Class, Set)} when the same type is expected from all sessions.
* <p>
* 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.
Expand All @@ -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.
* <p>
* 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.
Expand All @@ -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.
* <p>
* 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
* <p>
* 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 <R> The data type received from the counterparty.
* @param receiveType The data type received from the counterparty.
* @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.
*
* @return The received data <R>
*
Expand All @@ -87,9 +91,13 @@ public interface FlowSession {

/**
* Suspends until a message of type <R> is received from {@link #getCounterparty}.
* <p>
* 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 <R> The data type received from the counterparty.
* @param receiveType The data type received from the counterparty.
* @param receiveType The data type received from the counterparty, which should be either a primitive type
* or a type annotated with @CordaSerializable.
*
* @return The received data <R>
*
Expand All @@ -106,8 +114,12 @@ public interface FlowSession {
* Note that the other party may receive the message at some arbitrary later point or not at all: if {@link #getCounterparty}
* is offline then message delivery will be retried until it comes back or until the message is older than the
* network's event horizon time.
* <p>
* 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.
*/
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -406,4 +406,4 @@ if (project.hasProperty('generateSBOM')) {
artifactoryPublish {
publications('sbom')
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
{
"name": "request",
"doc": "Request's payload, depends on the requested action.",
"type": ["DistributeMemberInfo"]
"type": [
"DistributeMemberInfo",
"DistributeGroupParameters"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 2709feb

Please sign in to comment.