Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOTICK Recurring merge from main #1197

Merged
merged 23 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3c460de
Tech Writer edit
nadinequinr3 Jun 28, 2023
4071eac
CORE-5821: Updated snyk file with the latest reported issues
nargas-ritu Jul 11, 2023
148bf0a
Merge pull request #1174 from corda/nargas-ritu-patch-1
nargas-ritu Jul 11, 2023
813604f
CORE-13098 - Merge feature branch back into release branch (#1169)
nikinagy Jul 11, 2023
a83bee3
CORE-5821: fix indentation in snyk file (#1176)
ronanbrowne Jul 12, 2023
7e9f75f
CORE-9519 Add schemas for group parameters update (#1175)
YashNabar Jul 14, 2023
1c3ed30
CORE-15178 - Allowed the db worker to access the FlowEventTopics. (#1…
filipesoliveira Jul 18, 2023
ef9d903
Merge branch 'release/os/5.1' into nadinequinr3/DOC-4798/externamMess…
nadinequinr3 Jul 18, 2023
84fde0d
Merge pull request #1165 from corda/nadinequinr3/DOC-4798/externamMes…
nadinequinr3 Jul 18, 2023
ff35940
CORE-15539: Increase actor_user column character length (#1179)
BenYip123 Jul 18, 2023
c9bc1de
CORE-9483 Adding clear comments to session send/receive APIs describi…
ben-millar Jul 20, 2023
9b9c301
CORE-10114 Schema update for custom metadata (#1180)
YashNabar Jul 21, 2023
29cc709
CORE-11805 - Update json schema spec (#1183)
dimosr Jul 25, 2023
f4b430b
CORE-13570 Default datasource properties for vnode connections (#1186)
kyriathar Jul 25, 2023
f502069
Align schema version of vnode datasource schema (#1187)
kyriathar Jul 25, 2023
37bc559
CORE-15787: fix downstream compatibility jobs which now compile again…
ronanbrowne Jul 28, 2023
667cc4c
point at public repos (#1173)
seanbrereton Jul 28, 2023
d2f7af8
Merging forward updates from release/os/5.1 to release/os/5.0 - 2023-…
ronanbrowne Jul 28, 2023
27a1d59
Merge pull request #1192 from corda/ronanb/merge-5.0-5.1__2023-07-28
ronanbrowne Jul 28, 2023
69502c8
CORE-15641 Revise character limit on custom metadata values (#1195)
YashNabar Aug 1, 2023
120a5d7
CORE-14023 Find ledger transaction and resolve states (#1193)
lankydan Aug 2, 2023
0393fa0
CORE-15789: upgrade api repo to use Java 17 but compile to 11 bytecod…
jennyang-r3 Aug 2, 2023
2709feb
Merge branch 'release/os/5.1' into alex/recurring-merge-from-main
ac101m Aug 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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