From cd4626d8c2b538154530f8074fb2769c1ac77383 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 22 Jul 2020 08:08:49 +0000 Subject: [PATCH 01/25] CORDA-3917 Update to Jackson 2.9.8 (#6493) * Update to Jackson 2.9.8 to address multiple security issues, and update warning note about updates to clarify that it refers to 2.10+. When the note was added 2.9.7 as the highest available version in the 2.9.x series. * Add PR code checks Jenkinsfile --- .ci/dev/pr-code-checks/Jenkinsfile | 76 ++++++++++++++++++++++++++++++ build.gradle | 4 +- 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .ci/dev/pr-code-checks/Jenkinsfile diff --git a/.ci/dev/pr-code-checks/Jenkinsfile b/.ci/dev/pr-code-checks/Jenkinsfile new file mode 100644 index 0000000000..a64813c92f --- /dev/null +++ b/.ci/dev/pr-code-checks/Jenkinsfile @@ -0,0 +1,76 @@ +@Library('corda-shared-build-pipeline-steps') +import static com.r3.build.BuildControl.killAllExistingBuildsForJob + +killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger()) + +pipeline { + agent { label 'k8s' } + options { + timestamps() + timeout(time: 3, unit: 'HOURS') + buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14')) + } + + environment { + PR_CONTEXT_STRING = "PR Code Checks" + } + + stages { + stage('Detekt check') { + steps { + script { + pullRequest.createStatus( + status: 'pending', + context: "${PR_CONTEXT_STRING}", + description: "Running code checks", + targetUrl: "${env.BUILD_URL}") + } + sh "./gradlew --no-daemon clean detekt" + } + } + + stage('Compilation warnings check') { + steps { + sh "./gradlew --no-daemon -Pcompilation.warningsAsErrors=true compileAll" + } + } + + stage('No API change check') { + steps { + sh "./gradlew --no-daemon generateApi" + sh ".ci/check-api-changes.sh" + } + } + + stage('Deploy Nodes') { + steps { + sh "./gradlew --no-daemon jar deployNodes" + } + } + } + + post { + success { + script { + pullRequest.createStatus( + status: 'success', + context: "${PR_CONTEXT_STRING}", + description: 'Code checks passed', + targetUrl: "${env.BUILD_URL}") + } + } + + failure { + script { + pullRequest.createStatus( + status: 'failure', + context: "${PR_CONTEXT_STRING}", + description: 'Code checks failed', + targetUrl: "${env.BUILD_URL}") + } + } + cleanup { + deleteDir() /* clean up our workspace */ + } + } +} diff --git a/build.gradle b/build.gradle index e1b3594f59..00cc0470be 100644 --- a/build.gradle +++ b/build.gradle @@ -61,8 +61,8 @@ buildscript { ext.asm_version = '7.1' ext.artemis_version = '2.6.2' - // TODO Upgrade Jackson only when corda is using kotlin 1.3.10 - ext.jackson_version = '2.9.7' + // TODO Upgrade to Jackson 2.10+ only when corda is using kotlin 1.3.10 + ext.jackson_version = '2.9.8' ext.jetty_version = '9.4.19.v20190610' ext.jersey_version = '2.25' ext.servlet_version = '4.0.1' From 8cf3fa4ac85c7a21e34d1602491cac5297fafee3 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 22 Jul 2020 15:35:03 +0000 Subject: [PATCH 02/25] CORDA-3916 Update to BouncyCastle 1.61 (#6492) Update to BouncyCastle 1.61. Updating one version at a time to mitigate risk of a complex breaking change being introduced. --- constants.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants.properties b/constants.properties index 915b7e141f..6cf6942c4d 100644 --- a/constants.properties +++ b/constants.properties @@ -22,7 +22,7 @@ quasarVersion11=0.8.0 # Specify a classifier for Java 11 built artifacts jdkClassifier11=jdk11 proguardVersion=6.1.1 -bouncycastleVersion=1.60 +bouncycastleVersion=1.61 classgraphVersion=4.8.41 disruptorVersion=3.4.2 typesafeConfigVersion=1.3.4 From 416d27a909ad07f0f2cac5fe2d149a380d8fb210 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Tue, 11 Aug 2020 23:42:00 +0100 Subject: [PATCH 03/25] CORDA-3982 Revert "CORDA-3917 Update to Jackson 2.9.8 (#6493)" (#6615) This reverts commit cd4626d8c2b538154530f8074fb2769c1ac77383. --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 00cc0470be..e1b3594f59 100644 --- a/build.gradle +++ b/build.gradle @@ -61,8 +61,8 @@ buildscript { ext.asm_version = '7.1' ext.artemis_version = '2.6.2' - // TODO Upgrade to Jackson 2.10+ only when corda is using kotlin 1.3.10 - ext.jackson_version = '2.9.8' + // TODO Upgrade Jackson only when corda is using kotlin 1.3.10 + ext.jackson_version = '2.9.7' ext.jetty_version = '9.4.19.v20190610' ext.jersey_version = '2.25' ext.servlet_version = '4.0.1' From 07fe1b0960dcfa81f11c434d4b19690aefa15744 Mon Sep 17 00:00:00 2001 From: Edoardo Ierina Date: Thu, 13 Aug 2020 11:32:56 +0200 Subject: [PATCH 04/25] ENT-5654: Fixed migration error message, improved success message --- .../internal/persistence/SchemaMigration.kt | 19 ++++++++++++ .../net/corda/node/internal/AbstractNode.kt | 30 ++++++++++++++++--- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/SchemaMigration.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/SchemaMigration.kt index b528203c00..e7b36efa94 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/SchemaMigration.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/SchemaMigration.kt @@ -92,6 +92,25 @@ open class SchemaMigration( } } + /** + * Returns the count of pending database migration changes + * @param schemas The set of MappedSchemas to check + * @param forceThrowOnMissingMigration throws an exception if a mapped schema is missing the migration resource. Can be set to false + * when allowing hibernate to create missing schemas in dev or tests. + */ + fun getPendingChangesCount(schemas: Set, forceThrowOnMissingMigration: Boolean) : Int { + val resourcesAndSourceInfo = prepareResources(schemas, forceThrowOnMissingMigration) + + // current version of Liquibase appears to be non-threadsafe + // this is apparent when multiple in-process nodes are all running migrations simultaneously + mutex.withLock { + dataSource.connection.use { connection -> + val (_, changeToRunCount, _) = prepareRunner(connection, resourcesAndSourceInfo) + return changeToRunCount; + } + } + } + /** * Synchronises the changelog table with the schema descriptions passed in without applying any of the changes to the database. * This can be used when migrating a CorDapp that had its schema generated by hibernate to liquibase schema migration, or when diff --git a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt index e596a8b89a..686a57b77e 100644 --- a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt @@ -448,13 +448,24 @@ abstract class AbstractNode(val configuration: NodeConfiguration, updateAppSchemasWithCheckpoints: Boolean ) { check(started == null) { "Node has already been started" } + check(updateCoreSchemas || updateAppSchemas) { "Neither core nor app schema scripts were specified" } Node.printBasicNodeInfo("Running database schema migration scripts ...") val props = configuration.dataSourceProperties if (props.isEmpty) throw DatabaseConfigurationException("There must be a database configured.") + var pendingAppChanges: Int = 0 + var pendingCoreChanges: Int = 0 database.startHikariPool(props, metricRegistry) { dataSource, haveCheckpoints -> - SchemaMigration(dataSource, cordappLoader, configuration.baseDirectory, configuration.myLegalName) - .checkOrUpdate(schemaService.internalSchemas, updateCoreSchemas, haveCheckpoints, true) - .checkOrUpdate(schemaService.appSchemas, updateAppSchemas, !updateAppSchemasWithCheckpoints && haveCheckpoints, false) + val schemaMigration = SchemaMigration(dataSource, cordappLoader, configuration.baseDirectory, configuration.myLegalName) + if(updateCoreSchemas) { + schemaMigration.runMigration(haveCheckpoints, schemaService.internalSchemas, true) + } else { + pendingCoreChanges = schemaMigration.getPendingChangesCount(schemaService.internalSchemas, true) + } + if(updateAppSchemas) { + schemaMigration.runMigration(!updateAppSchemasWithCheckpoints && haveCheckpoints, schemaService.appSchemas, false) + } else { + pendingAppChanges = schemaMigration.getPendingChangesCount(schemaService.appSchemas, false) + } } // Now log the vendor string as this will also cause a connection to be tested eagerly. logVendorString(database, log) @@ -474,7 +485,18 @@ abstract class AbstractNode(val configuration: NodeConfiguration, cordappProvider.start() } } - Node.printBasicNodeInfo("Database migration done.") + val updatedSchemas = listOfNotNull( + ("core").takeIf { updateCoreSchemas }, + ("app").takeIf { updateAppSchemas } + ).joinToString(separator = " and "); + + val pendingChanges = listOfNotNull( + ("no outstanding").takeIf { pendingAppChanges == 0 && pendingCoreChanges == 0 }, + ("$pendingCoreChanges outstanding core").takeIf { !updateCoreSchemas && pendingCoreChanges > 0 }, + ("$pendingAppChanges outstanding app").takeIf { !updateAppSchemas && pendingAppChanges > 0 } + ).joinToString(prefix = "There are ", postfix = " database changes."); + + Node.printBasicNodeInfo("Database migration scripts for $updatedSchemas schemas complete. $pendingChanges") } fun runSchemaSync() { From c4027e23bf7e7cb82ba0d90007870da798c7a601 Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Fri, 14 Aug 2020 17:42:19 +0100 Subject: [PATCH 05/25] ENT-5649 Always load from db when flow retries (#6637) Always attempt to load a checkpoint from the database when a flow retries. This is to prevent transient errors where the checkpoint is committed to the database but throws an error back to the node. When the node tries to retry in this scenario, `isAnyCheckpointPersisted` is false, meaning that it will try to insert when it tries to save its initial checkpoint again. By loading from the existing checkpoint, even though it doesn't really use it because it is `Unstarted`, the flag gets put into the right state and will update rather than insert later on. --- .../StateMachineFlowInitErrorHandlingTest.kt | 73 +++++++++++++++++-- .../StateMachineGeneralErrorHandlingTest.kt | 17 +++-- .../SingleThreadedStateMachineManager.kt | 66 ++++++++++------- 3 files changed, 115 insertions(+), 41 deletions(-) diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt index 07550ef709..0440680745 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt @@ -331,6 +331,62 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { } } + /** + * Throws an exception when after the first [Action.CommitTransaction] event before the flow has initialised (remains in an unstarted state). + * This is to cover transient issues, where the transaction committed the checkpoint but failed to respond to the node. + * + * The exception is thrown when performing [Action.SignalFlowHasStarted], the error won't actually appear here but it makes it easier + * to test. + * + * The exception is thrown 3 times. + * + * This causes the transition to be discharged from the hospital 3 times (retries 3 times). On the final retry the transition + * succeeds and the flow finishes. + * + * Each time the flow retries, it starts from the beginning of the flow (due to being in an unstarted state). + * + * The first retry will load the checkpoint that the flow doesn't know exists ([StateMachineState.isAnyCheckpointPersisted] is false + * at this point). The flag gets switched to true after this first retry and the flow has now returned to an expected state. + * + */ + @Test(timeout = 300_000) + fun `error during transition when checkpoint commits but transient db exception is thrown during flow initialisation will retry and complete successfully`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + + val rules = """ + RULE Create Counter + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Throw exception on executeSignalFlowHasStarted action + CLASS $actionExecutorClassName + METHOD executeSignalFlowHasStarted + AT ENTRY + IF readCounter("counter") < 3 + DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("i wish i was a sql exception") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + alice.rpc.startFlow( + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow( + 30.seconds + ) + + alice.rpc.assertNumberOfCheckpointsAllZero() + alice.rpc.assertHospitalCounts(discharged = 3) + assertEquals(0, alice.rpc.stateMachinesSnapshot().size) + } + } + /** * Throws an exception when performing an [Action.CommitTransaction] event on a responding node before the flow has initialised and * saved its first checkpoint (remains in an unstarted state). @@ -463,7 +519,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { CLASS $actionExecutorClassName METHOD executeCommitTransaction AT ENTRY - IF createCounter("counter", $counter) + IF createCounter("counter", $counter) && createCounter("counter_2", $counter) DO traceln("Counter created") ENDRULE @@ -479,8 +535,8 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { INTERFACE ${CheckpointStorage::class.java.name} METHOD getCheckpoint AT ENTRY - IF true - DO traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") + IF readCounter("counter_2") < 3 + DO incrementCounter("counter_2"); traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") ENDRULE """.trimIndent() @@ -496,7 +552,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { alice.rpc.assertNumberOfCheckpointsAllZero() charlie.rpc.assertHospitalCounts( discharged = 3, - observation = 0 + dischargedRetry = 1 ) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) assertEquals(0, charlie.rpc.stateMachinesSnapshot().size) @@ -527,7 +583,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { CLASS $actionExecutorClassName METHOD executeCommitTransaction AT ENTRY - IF createCounter("counter", $counter) + IF createCounter("counter", $counter) && createCounter("counter_2", $counter) DO traceln("Counter created") ENDRULE @@ -543,8 +599,8 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { INTERFACE ${CheckpointStorage::class.java.name} METHOD getCheckpoint AT ENTRY - IF true - DO traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") + IF readCounter("counter_2") < 3 + DO incrementCounter("counter_2"); traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") ENDRULE """.trimIndent() @@ -562,7 +618,8 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { charlie.rpc.assertNumberOfCheckpoints(hospitalized = 1) charlie.rpc.assertHospitalCounts( discharged = 3, - observation = 1 + observation = 1, + dischargedRetry = 1 ) assertEquals(1, alice.rpc.stateMachinesSnapshot().size) assertEquals(1, charlie.rpc.stateMachinesSnapshot().size) diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt index f97800214f..ad4f388ff5 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt @@ -494,7 +494,7 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { CLASS $actionExecutorClassName METHOD executeCommitTransaction AT ENTRY - IF createCounter("counter", $counter) + IF createCounter("counter", $counter) && createCounter("counter_2", $counter) DO traceln("Counter created") ENDRULE @@ -510,8 +510,8 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { INTERFACE ${CheckpointStorage::class.java.name} METHOD getCheckpoint AT ENTRY - IF true - DO traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") + IF readCounter("counter_2") < 3 + DO incrementCounter("counter_2"); traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") ENDRULE """.trimIndent() @@ -527,7 +527,7 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { alice.rpc.assertNumberOfCheckpointsAllZero() alice.rpc.assertHospitalCounts( discharged = 3, - observation = 0 + dischargedRetry = 1 ) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) } @@ -557,7 +557,7 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { CLASS $actionExecutorClassName METHOD executeCommitTransaction AT ENTRY - IF createCounter("counter", $counter) + IF createCounter("counter", $counter) && createCounter("counter_2", $counter) DO traceln("Counter created") ENDRULE @@ -573,8 +573,8 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { INTERFACE ${CheckpointStorage::class.java.name} METHOD getCheckpoint AT ENTRY - IF true - DO traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") + IF readCounter("counter_2") < 3 + DO incrementCounter("counter_2"); traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") ENDRULE """.trimIndent() @@ -590,7 +590,8 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { alice.rpc.assertNumberOfCheckpoints(hospitalized = 1) alice.rpc.assertHospitalCounts( discharged = 3, - observation = 1 + observation = 1, + dischargedRetry = 1 ) assertEquals(1, alice.rpc.stateMachinesSnapshot().size) } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 27f9d36bf5..09c7e0f889 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -495,40 +495,51 @@ internal class SingleThreadedStateMachineManager( logger.error("Unable to find flow for flow $flowId. Something is very wrong. The flow will not retry.") return } - val flow = if (currentState.isAnyCheckpointPersisted) { - // We intentionally grab the checkpoint from storage rather than relying on the one referenced by currentState. This is so that - // we mirror exactly what happens when restarting the node. - val checkpoint = database.transaction { - val serializedCheckpoint = checkpointStorage.getCheckpoint(flowId) - if (serializedCheckpoint == null) { - logger.error("Unable to find database checkpoint for flow $flowId. Something is very wrong. The flow will not retry.") - return@transaction null - } + // We intentionally grab the checkpoint from storage rather than relying on the one referenced by currentState. This is so that + // we mirror exactly what happens when restarting the node. + // Ignore [isAnyCheckpointPersisted] as the checkpoint could be committed but the flag remains un-updated + val checkpointLoadingStatus = database.transaction { + val serializedCheckpoint = checkpointStorage.getCheckpoint(flowId) ?: return@transaction CheckpointLoadingStatus.NotFound + val checkpoint = serializedCheckpoint.let { tryDeserializeCheckpoint(serializedCheckpoint, flowId)?.also { if (it.status == Checkpoint.FlowStatus.HOSPITALIZED) { if (checkpointStorage.removeFlowException(flowId)) { checkpointStorage.updateStatus(flowId, Checkpoint.FlowStatus.RUNNABLE) } else { logger.error("Unable to remove database exception for flow $flowId. Something is very wrong. The flow will not be loaded and run.") - return@transaction null + // This code branch is being removed in a different PR + return@transaction CheckpointLoadingStatus.CouldNotDeserialize } } - } ?: return@transaction null - } ?: return + } ?: return@transaction CheckpointLoadingStatus.CouldNotDeserialize + } - // Resurrect flow - flowCreator.createFlowFromCheckpoint( - flowId, - checkpoint, - currentState.reloadCheckpointAfterSuspendCount, - currentState.lock, - firstRestore = false - ) ?: return - } else { - // Just flow initiation message - null + CheckpointLoadingStatus.Success(checkpoint) } + + val flow = when { + // Resurrect flow + checkpointLoadingStatus is CheckpointLoadingStatus.Success -> { + flowCreator.createFlowFromCheckpoint( + flowId, + checkpointLoadingStatus.checkpoint, + currentState.reloadCheckpointAfterSuspendCount, + currentState.lock, + firstRestore = false + ) ?: return + } + checkpointLoadingStatus is CheckpointLoadingStatus.NotFound && currentState.isAnyCheckpointPersisted -> { + logger.error("Unable to find database checkpoint for flow $flowId. Something is very wrong. The flow will not retry.") + return + } + checkpointLoadingStatus is CheckpointLoadingStatus.CouldNotDeserialize -> return + else -> { + // Just flow initiation message + null + } + } + innerState.withLock { if (stopping) { return @@ -758,8 +769,7 @@ internal class SingleThreadedStateMachineManager( ): CordaFuture> { onCallingStartFlowInternal?.invoke() - val existingFlow = innerState.withLock { flows[flowId] } - val existingCheckpoint = if (existingFlow != null && existingFlow.fiber.transientState.isAnyCheckpointPersisted) { + val existingCheckpoint = if (innerState.withLock { flows[flowId] != null }) { // Load the flow's checkpoint // The checkpoint will be missing if the flow failed before persisting the original checkpoint // CORDA-3359 - Do not start/retry a flow that failed after deleting its checkpoint (the whole of the flow might replay) @@ -1098,4 +1108,10 @@ internal class SingleThreadedStateMachineManager( } return false } + + private sealed class CheckpointLoadingStatus { + class Success(val checkpoint: Checkpoint) : CheckpointLoadingStatus() + object NotFound : CheckpointLoadingStatus() + object CouldNotDeserialize : CheckpointLoadingStatus() + } } From 32cb085a5371929ec410c1165d06ed40e0135f52 Mon Sep 17 00:00:00 2001 From: William Vigor <58432369+williamvigorr3@users.noreply.github.com> Date: Fri, 14 Aug 2020 20:07:00 +0100 Subject: [PATCH 06/25] ENT-5672 Know if a paused flow is hospitalized (#6639) * ENT-5672 Update database query to get paused flows which have previously been hospitalised * NOTICK Remove unneeded check if a database exception was removed when switching a flow to RUNNABLE since we were to remove it anyway --- .../node/services/api/CheckpointStorage.kt | 2 +- .../persistence/DBCheckpointStorage.kt | 16 +++++---- .../node/services/statemachine/FlowCreator.kt | 3 +- .../SingleThreadedStateMachineManager.kt | 21 ++++------- .../persistence/DBCheckpointStorageTests.kt | 35 +++++++++++++++++++ .../statemachine/FlowFrameworkTests.kt | 3 +- 6 files changed, 55 insertions(+), 25 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt b/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt index 49ea860589..e4bfe0ebdf 100644 --- a/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt @@ -78,7 +78,7 @@ interface CheckpointStorage { * until the underlying database connection is closed, so any processing should happen before it is closed. * This method does not fetch [Checkpoint.Serialized.serializedFlowState] to save memory. */ - fun getPausedCheckpoints(): Stream> + fun getPausedCheckpoints(): Stream> fun getFinishedFlowsResultsMetadata(): Stream> diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt b/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt index cf2976f662..e08181c86b 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt @@ -555,15 +555,17 @@ class DBCheckpointStorage( return currentDBSession().find(DBFlowException::class.java, id.uuid.toString()) } - override fun getPausedCheckpoints(): Stream> { + override fun getPausedCheckpoints(): Stream> { val session = currentDBSession() val jpqlQuery = """select new ${DBPausedFields::class.java.name}(checkpoint.id, blob.checkpoint, checkpoint.status, - checkpoint.progressStep, checkpoint.ioRequestType, checkpoint.compatible) from ${DBFlowCheckpoint::class.java.name} - checkpoint join ${DBFlowCheckpointBlob::class.java.name} blob on checkpoint.blob = blob.id where - checkpoint.status = ${FlowStatus.PAUSED.ordinal}""".trimIndent() + checkpoint.progressStep, checkpoint.ioRequestType, checkpoint.compatible, exception.id) + from ${DBFlowCheckpoint::class.java.name} checkpoint + join ${DBFlowCheckpointBlob::class.java.name} blob on checkpoint.blob = blob.id + left outer join ${DBFlowException::class.java.name} exception on checkpoint.exceptionDetails = exception.id + where checkpoint.status = ${FlowStatus.PAUSED.ordinal}""".trimIndent() val query = session.createQuery(jpqlQuery, DBPausedFields::class.java) return query.resultList.stream().map { - StateMachineRunId(UUID.fromString(it.id)) to it.toSerializedCheckpoint() + Triple(StateMachineRunId(UUID.fromString(it.id)), it.toSerializedCheckpoint(), it.wasHospitalized) } } @@ -722,8 +724,10 @@ class DBCheckpointStorage( val status: FlowStatus, val progressStep: String?, val ioRequestType: String?, - val compatible: Boolean + val compatible: Boolean, + exception: String? ) { + val wasHospitalized = exception != null fun toSerializedCheckpoint(): Checkpoint.Serialized { return Checkpoint.Serialized( serializedCheckpointState = SerializedBytes(checkpoint), diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt index aa340c582a..bdc750b7e3 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt @@ -32,7 +32,8 @@ data class NonResidentFlow( val runId: StateMachineRunId, var checkpoint: Checkpoint, val resultFuture: OpenFuture = openFuture(), - val resumable: Boolean = true + val resumable: Boolean = true, + val hospitalized: Boolean = false ) { val events = mutableListOf() diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 09c7e0f889..52639cf12c 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -456,12 +456,8 @@ internal class SingleThreadedStateMachineManager( innerState.withLock { if (id in flows) return@Checkpoints } val checkpoint = tryDeserializeCheckpoint(serializedCheckpoint, id)?.also { if (it.status == Checkpoint.FlowStatus.HOSPITALIZED) { - if (checkpointStorage.removeFlowException(id)) { - checkpointStorage.updateStatus(id, Checkpoint.FlowStatus.RUNNABLE) - } else { - logger.error("Unable to remove database exception for flow $id. Something is very wrong. The flow will not be loaded and run.") - return@Checkpoints - } + checkpointStorage.removeFlowException(id) + checkpointStorage.updateStatus(id, Checkpoint.FlowStatus.RUNNABLE) } } ?: return@Checkpoints val flow = flowCreator.createFlowFromCheckpoint(id, checkpoint) @@ -472,9 +468,9 @@ internal class SingleThreadedStateMachineManager( flows[id] = flow } } - checkpointStorage.getPausedCheckpoints().forEach Checkpoints@{ (id, serializedCheckpoint) -> + checkpointStorage.getPausedCheckpoints().forEach Checkpoints@{ (id, serializedCheckpoint, hospitalised) -> val checkpoint = tryDeserializeCheckpoint(serializedCheckpoint, id) ?: return@Checkpoints - pausedFlows[id] = NonResidentFlow(id, checkpoint) + pausedFlows[id] = NonResidentFlow(id, checkpoint, hospitalized = hospitalised) } return Pair(flows, pausedFlows) } @@ -504,13 +500,8 @@ internal class SingleThreadedStateMachineManager( val checkpoint = serializedCheckpoint.let { tryDeserializeCheckpoint(serializedCheckpoint, flowId)?.also { if (it.status == Checkpoint.FlowStatus.HOSPITALIZED) { - if (checkpointStorage.removeFlowException(flowId)) { - checkpointStorage.updateStatus(flowId, Checkpoint.FlowStatus.RUNNABLE) - } else { - logger.error("Unable to remove database exception for flow $flowId. Something is very wrong. The flow will not be loaded and run.") - // This code branch is being removed in a different PR - return@transaction CheckpointLoadingStatus.CouldNotDeserialize - } + checkpointStorage.removeFlowException(flowId) + checkpointStorage.updateStatus(flowId, Checkpoint.FlowStatus.RUNNABLE) } } ?: return@transaction CheckpointLoadingStatus.CouldNotDeserialize } diff --git a/node/src/test/kotlin/net/corda/node/services/persistence/DBCheckpointStorageTests.kt b/node/src/test/kotlin/net/corda/node/services/persistence/DBCheckpointStorageTests.kt index 96f5535a1c..3141d97972 100644 --- a/node/src/test/kotlin/net/corda/node/services/persistence/DBCheckpointStorageTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/persistence/DBCheckpointStorageTests.kt @@ -47,6 +47,7 @@ import java.time.Clock import java.util.* import kotlin.streams.toList import kotlin.test.assertEquals +import kotlin.test.assertFalse import kotlin.test.assertTrue internal fun CheckpointStorage.checkpoints(): List { @@ -803,6 +804,40 @@ class DBCheckpointStorageTests { assertTrue(Checkpoint.FlowStatus.FAILED in finishedStatuses) } + @Test(timeout = 300_000) + fun `'getPausedCheckpoints' fetches paused flows with and without database exceptions`() { + val (_, checkpoint) = newCheckpoint(1) + val serializedFlowState = checkpoint.flowState.checkpointSerialize(context = CheckpointSerializationDefaults.CHECKPOINT_CONTEXT) + val checkpointState = checkpoint.serializeCheckpointState() + val hospitalizedPaused = changeStatus(checkpoint, Checkpoint.FlowStatus.RUNNABLE) + val cleanPaused = changeStatus(checkpoint, Checkpoint.FlowStatus.RUNNABLE) + database.transaction { + checkpointStorage.addCheckpoint(hospitalizedPaused.id, hospitalizedPaused.checkpoint, serializedFlowState, checkpointState) + checkpointStorage.addCheckpoint(cleanPaused.id, cleanPaused.checkpoint, serializedFlowState, checkpointState) + } + database.transaction { + checkpointStorage.updateCheckpoint( + hospitalizedPaused.id, + hospitalizedPaused.checkpoint.addError(IllegalStateException(), Checkpoint.FlowStatus.HOSPITALIZED), + serializedFlowState, + checkpointState + ) + } + database.transaction { + checkpointStorage.updateStatus(hospitalizedPaused.id, Checkpoint.FlowStatus.PAUSED) + checkpointStorage.updateStatus(cleanPaused.id, Checkpoint.FlowStatus.PAUSED) + } + database.transaction { + val checkpoints = checkpointStorage.getPausedCheckpoints().toList() + val dbHospitalizedPaused = checkpoints.single { it.first == hospitalizedPaused.id } + assertEquals(hospitalizedPaused.id, dbHospitalizedPaused.first) + assertTrue(dbHospitalizedPaused.third) + val dbCleanPaused = checkpoints.single { it.first == cleanPaused.id } + assertEquals(cleanPaused.id, dbCleanPaused.first) + assertFalse(dbCleanPaused.third) + } + } + data class IdAndCheckpoint(val id: StateMachineRunId, val checkpoint: Checkpoint) private fun changeStatus(oldCheckpoint: Checkpoint, status: Checkpoint.FlowStatus): IdAndCheckpoint { diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index fd7c926d0d..2a68ef2685 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -886,7 +886,6 @@ class FlowFrameworkTests { Thread.sleep(3000) // wait until flow saves overnight observation state in database aliceNode = mockNet.restartNode(aliceNode) - waitUntilHospitalized.acquire() Thread.sleep(3000) // wait until flow saves overnight observation state in database assertEquals(2, counter) @@ -1268,4 +1267,4 @@ internal class SuspendingFlow : FlowLogic() { stateMachine.suspend(FlowIORequest.ForceCheckpoint, maySkipCheckpoint = false) // flow checkpoints => checkpoint is in DB stateMachine.hookAfterCheckpoint() } -} \ No newline at end of file +} From be6b76ff89bb4512667c519d6996b114d7bb4247 Mon Sep 17 00:00:00 2001 From: William Vigor <58432369+williamvigorr3@users.noreply.github.com> Date: Fri, 14 Aug 2020 21:11:48 +0100 Subject: [PATCH 07/25] ENT-5684 Reconnect flow's progress tracker when unpausing (#6640) Previously we were just throwing this away when pausing, meaning updates would not be passed back to the user. The progress tracker is now maintained in the `NonResidentFlow` allowing it to be reused in the flow when it is retried. --- .../net/corda/node/flows/FlowRetryTest.kt | 2 +- .../node/services/statemachine/FlowCreator.kt | 76 ++++++++++++++++++- .../SingleThreadedStateMachineManager.kt | 11 ++- .../utilities/StateMachineManagerUtils.kt | 66 ---------------- 4 files changed, 81 insertions(+), 74 deletions(-) delete mode 100644 node/src/main/kotlin/net/corda/node/utilities/StateMachineManagerUtils.kt diff --git a/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt b/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt index 499dcfd232..eff577eba5 100644 --- a/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt @@ -468,4 +468,4 @@ class GetCheckpointNumberOfStatusFlow(private val flowStatus: Checkpoint.FlowSta } } } -} \ No newline at end of file +} diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt index bdc750b7e3..83d8795c31 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt @@ -15,6 +15,7 @@ import net.corda.core.serialization.SerializedBytes import net.corda.core.serialization.internal.CheckpointSerializationContext import net.corda.core.serialization.internal.checkpointDeserialize import net.corda.core.serialization.internal.checkpointSerialize +import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.contextLogger import net.corda.node.services.api.CheckpointStorage import net.corda.node.services.api.ServiceHubInternal @@ -23,6 +24,8 @@ import net.corda.node.services.statemachine.transitions.StateMachine import net.corda.node.utilities.isEnabledTimedFlow import net.corda.nodeapi.internal.persistence.CordaPersistence import org.apache.activemq.artemis.utils.ReusableLatch +import org.apache.commons.lang3.reflect.FieldUtils +import java.lang.reflect.Field import java.security.SecureRandom import java.util.concurrent.Semaphore @@ -33,7 +36,8 @@ data class NonResidentFlow( var checkpoint: Checkpoint, val resultFuture: OpenFuture = openFuture(), val resumable: Boolean = true, - val hospitalized: Boolean = false + val hospitalized: Boolean = false, + val progressTracker: ProgressTracker? = null ) { val events = mutableListOf() @@ -42,6 +46,7 @@ data class NonResidentFlow( } } +@Suppress("TooManyFunctions") class FlowCreator( private val checkpointSerializationContext: CheckpointSerializationContext, private val checkpointStorage: CheckpointStorage, @@ -71,7 +76,12 @@ class FlowCreator( } else -> nonResidentFlow.checkpoint } - return createFlowFromCheckpoint(nonResidentFlow.runId, checkpoint, resultFuture = nonResidentFlow.resultFuture) + return createFlowFromCheckpoint( + nonResidentFlow.runId, + checkpoint, + resultFuture = nonResidentFlow.resultFuture, + progressTracker = nonResidentFlow.progressTracker + ) } @Suppress("LongParameterList") @@ -81,7 +91,8 @@ class FlowCreator( reloadCheckpointAfterSuspendCount: Int? = null, lock: Semaphore = Semaphore(1), resultFuture: OpenFuture = openFuture(), - firstRestore: Boolean = true + firstRestore: Boolean = true, + progressTracker: ProgressTracker? = null ): Flow<*>? { val fiber = oldCheckpoint.getFiberFromCheckpoint(runId, firstRestore) var checkpoint = oldCheckpoint @@ -105,6 +116,7 @@ class FlowCreator( ?: if (reloadCheckpointAfterSuspend) checkpoint.checkpointState.numberOfSuspends else null, lock = lock ) + injectOldProgressTracker(progressTracker, fiber.logic) return Flow(fiber, resultFuture) } @@ -250,4 +262,62 @@ class FlowCreator( lock = lock ) } + + /** + * The flow de-serialized from the checkpoint will contain a new instance of the progress tracker, which means that + * any existing flow observers would be lost. We need to replace it with the old progress tracker to ensure progress + * updates are correctly sent out after the flow is retried. + * + * If the new tracker contains any child trackers from sub-flows, we need to attach those to the old tracker as well. + */ + private fun injectOldProgressTracker(oldTracker: ProgressTracker?, newFlowLogic: FlowLogic<*>) { + if (oldTracker != null) { + val newTracker = newFlowLogic.progressTracker + if (newTracker != null) { + attachNewChildren(oldTracker, newTracker) + replaceTracker(newFlowLogic, oldTracker) + } + } + } + + private fun attachNewChildren(oldTracker: ProgressTracker, newTracker: ProgressTracker) { + oldTracker.currentStep = newTracker.currentStep + oldTracker.steps.forEachIndexed { index, step -> + val newStep = newTracker.steps[index] + val newChildTracker = newTracker.getChildProgressTracker(newStep) + newChildTracker?.let { child -> + oldTracker.setChildProgressTracker(step, child) + } + } + resubscribeToChildren(oldTracker) + } + + /** + * Re-subscribes to child tracker observables. When a nested progress tracker is deserialized from a checkpoint, + * it retains the child links, but does not automatically re-subscribe to the child changes. + */ + private fun resubscribeToChildren(tracker: ProgressTracker) { + tracker.steps.forEach { + val childTracker = tracker.getChildProgressTracker(it) + if (childTracker != null) { + tracker.setChildProgressTracker(it, childTracker) + resubscribeToChildren(childTracker) + } + } + } + + /** Replaces the deserialized [ProgressTracker] in the [newFlowLogic] with the old one to retain old subscribers. */ + private fun replaceTracker(newFlowLogic: FlowLogic<*>, oldProgressTracker: ProgressTracker?) { + val field = getProgressTrackerField(newFlowLogic) + field?.apply { + isAccessible = true + set(newFlowLogic, oldProgressTracker) + } + } + + private fun getProgressTrackerField(newFlowLogic: FlowLogic<*>): Field? { + // The progress tracker field may have been overridden in an abstract superclass, so we have to traverse up + // the hierarchy. + return FieldUtils.getAllFieldsList(newFlowLogic::class.java).find { it.name == "progressTracker" } + } } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 52639cf12c..9ce5a4980f 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -41,7 +41,6 @@ import net.corda.node.services.statemachine.interceptors.DumpHistoryOnErrorInter import net.corda.node.services.statemachine.interceptors.HospitalisingInterceptor import net.corda.node.services.statemachine.interceptors.PrintingInterceptor import net.corda.node.utilities.AffinityExecutor -import net.corda.node.utilities.injectOldProgressTracker import net.corda.node.utilities.isEnabledTimedFlow import net.corda.nodeapi.internal.persistence.CordaPersistence import net.corda.nodeapi.internal.persistence.wrapWithDatabaseTransaction @@ -517,7 +516,8 @@ internal class SingleThreadedStateMachineManager( checkpointLoadingStatus.checkpoint, currentState.reloadCheckpointAfterSuspendCount, currentState.lock, - firstRestore = false + firstRestore = false, + progressTracker = currentState.flowLogic.progressTracker ) ?: return } checkpointLoadingStatus is CheckpointLoadingStatus.NotFound && currentState.isAnyCheckpointPersisted -> { @@ -540,7 +540,6 @@ internal class SingleThreadedStateMachineManager( sessionToFlow.remove(sessionId) } if (flow != null) { - injectOldProgressTracker(currentState.flowLogic.progressTracker, flow.fiber.logic) addAndStartFlow(flowId, flow) } extractAndScheduleEventsForRetry(oldFlowLeftOver, currentState) @@ -812,7 +811,11 @@ internal class SingleThreadedStateMachineManager( decrementLiveFibers() //Setting flowState = FlowState.Paused means we don't hold the frozen fiber in memory. val checkpoint = currentState.checkpoint.copy(status = Checkpoint.FlowStatus.PAUSED, flowState = FlowState.Paused) - val pausedFlow = NonResidentFlow(id, checkpoint, flow.resultFuture) + val pausedFlow = NonResidentFlow( + id, + checkpoint, flow.resultFuture, + progressTracker = currentState.flowLogic.progressTracker + ) val eventQueue = flow.fiber.transientValues.eventQueue extractAndQueueExternalEventsForPausedFlow(eventQueue, currentState.pendingDeduplicationHandlers, pausedFlow) pausedFlows.put(id, pausedFlow) diff --git a/node/src/main/kotlin/net/corda/node/utilities/StateMachineManagerUtils.kt b/node/src/main/kotlin/net/corda/node/utilities/StateMachineManagerUtils.kt deleted file mode 100644 index 99aeebc6d8..0000000000 --- a/node/src/main/kotlin/net/corda/node/utilities/StateMachineManagerUtils.kt +++ /dev/null @@ -1,66 +0,0 @@ -package net.corda.node.utilities - -import net.corda.core.flows.FlowLogic -import net.corda.core.utilities.ProgressTracker -import net.corda.node.services.statemachine.StateMachineManagerInternal -import org.apache.commons.lang3.reflect.FieldUtils -import java.lang.reflect.Field - -/** - * The flow de-serialized from the checkpoint will contain a new instance of the progress tracker, which means that - * any existing flow observers would be lost. We need to replace it with the old progress tracker to ensure progress - * updates are correctly sent out after the flow is retried. - * - * If the new tracker contains any child trackers from sub-flows, we need to attach those to the old tracker as well. - */ -//TODO: instead of replacing the progress tracker after constructing the flow logic, we should inject it during fiber deserialization -internal fun StateMachineManagerInternal.injectOldProgressTracker(oldTracker: ProgressTracker?, newFlowLogic: FlowLogic<*>) { - if (oldTracker != null) { - val newTracker = newFlowLogic.progressTracker - if (newTracker != null) { - attachNewChildren(oldTracker, newTracker) - replaceTracker(newFlowLogic, oldTracker) - } - } -} - -private fun attachNewChildren(oldTracker: ProgressTracker, newTracker: ProgressTracker) { - oldTracker.currentStep = newTracker.currentStep - oldTracker.steps.forEachIndexed { index, step -> - val newStep = newTracker.steps[index] - val newChildTracker = newTracker.getChildProgressTracker(newStep) - newChildTracker?.let { child -> - oldTracker.setChildProgressTracker(step, child) - } - } - resubscribeToChildren(oldTracker) -} - -/** - * Re-subscribes to child tracker observables. When a nested progress tracker is deserialized from a checkpoint, - * it retains the child links, but does not automatically re-subscribe to the child changes. - */ -private fun resubscribeToChildren(tracker: ProgressTracker) { - tracker.steps.forEach { - val childTracker = tracker.getChildProgressTracker(it) - if (childTracker != null) { - tracker.setChildProgressTracker(it, childTracker) - resubscribeToChildren(childTracker) - } - } -} - -/** Replaces the deserialized [ProgressTracker] in the [newFlowLogic] with the old one to retain old subscribers. */ -private fun replaceTracker(newFlowLogic: FlowLogic<*>, oldProgressTracker: ProgressTracker?) { - val field = getProgressTrackerField(newFlowLogic) - field?.apply { - isAccessible = true - set(newFlowLogic, oldProgressTracker) - } -} - -private fun getProgressTrackerField(newFlowLogic: FlowLogic<*>): Field? { - // The progress tracker field may have been overridden in an abstract superclass, so we have to traverse up - // the hierarchy. - return FieldUtils.getAllFieldsList(newFlowLogic::class.java).find { it.name == "progressTracker" } -} From 8534aad3b1c5d9fc82e5d80f22aefbbbdab6d569 Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Sat, 15 Aug 2020 10:08:37 +0100 Subject: [PATCH 08/25] ENT-5672 Know if paused flow is hospitalized (#6641) Missing change from the original commit. --- .../statemachine/SingleThreadedStateMachineManager.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 9ce5a4980f..ab4de767c9 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -813,7 +813,9 @@ internal class SingleThreadedStateMachineManager( val checkpoint = currentState.checkpoint.copy(status = Checkpoint.FlowStatus.PAUSED, flowState = FlowState.Paused) val pausedFlow = NonResidentFlow( id, - checkpoint, flow.resultFuture, + checkpoint, + flow.resultFuture, + hospitalized = currentState.checkpoint.status == Checkpoint.FlowStatus.HOSPITALIZED, progressTracker = currentState.flowLogic.progressTracker ) val eventQueue = flow.fiber.transientValues.eventQueue From f1b7bc9dcb7f75af957d4514f5cbde13edb7f175 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sat, 15 Aug 2020 12:28:03 +0100 Subject: [PATCH 09/25] CORDA-3993 Correct mock network handling (#6642) Correct mock network handling in VaultQueryJoinTest so it does not block other mock networks. --- .../node/services/vault/VaultQueryJoinTest.kt | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt index 6bfc1a7874..59d246d3a8 100644 --- a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt +++ b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt @@ -6,6 +6,7 @@ import net.corda.core.contracts.Contract import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateRef import net.corda.core.identity.AbstractParty +import net.corda.core.node.ServiceHub import net.corda.core.node.services.Vault import net.corda.core.node.services.queryBy import net.corda.core.node.services.vault.DEFAULT_PAGE_SIZE @@ -22,7 +23,9 @@ import net.corda.core.transactions.TransactionBuilder import net.corda.testing.core.ALICE_NAME import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetworkParameters +import net.corda.testing.node.StartedMockNode import net.corda.testing.node.internal.cordappsForPackages +import org.junit.AfterClass import org.junit.BeforeClass import org.junit.Test import javax.persistence.Column @@ -33,24 +36,29 @@ import kotlin.test.assertEquals class VaultQueryJoinTest { companion object { - private val mockNetwork = MockNetwork( - MockNetworkParameters( - cordappsForAllNodes = cordappsForPackages( - listOf( - "net.corda.node.services.vault" - ) - ) - ) - ) - private val aliceNode = mockNetwork.createPartyNode(ALICE_NAME) - private val notaryNode = mockNetwork.defaultNotaryNode - private val serviceHubHandle = aliceNode.services + private var mockNetwork: MockNetwork? = null + private lateinit var aliceNode: StartedMockNode + private lateinit var notaryNode: StartedMockNode + private lateinit var serviceHubHandle: ServiceHub private val createdStateRefs = mutableListOf() private const val numObjectsInLedger = DEFAULT_PAGE_SIZE + 1 @BeforeClass @JvmStatic fun setup() { + mockNetwork = MockNetwork( + MockNetworkParameters( + cordappsForAllNodes = cordappsForPackages( + listOf( + "net.corda.node.services.vault" + ) + ) + ) + ).also { mockNetwork -> + aliceNode = mockNetwork.createPartyNode(ALICE_NAME) + notaryNode = mockNetwork.defaultNotaryNode + serviceHubHandle = aliceNode.services + } repeat(numObjectsInLedger) { index -> createdStateRefs.add(addSimpleObjectToLedger(DummyData(index))) } @@ -58,6 +66,13 @@ class VaultQueryJoinTest { System.setProperty("net.corda.vault.query.disable.corda3879", "false"); } + @AfterClass + @JvmStatic + fun teardown() { + mockNetwork?.stopNodes() + mockNetwork = null + } + private fun addSimpleObjectToLedger(dummyObject: DummyData): StateRef { val tx = TransactionBuilder(notaryNode.info.legalIdentities.first()) tx.addOutputState( From 854e6638ff0161eff01e49175e4c055e541d14e2 Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Mon, 17 Aug 2020 10:27:32 +0100 Subject: [PATCH 10/25] CORDA-3881 Get all finished flows with client ids (#6580) Return map of `clientId` -> success/fail --- .../net/corda/core/messaging/CordaRPCOps.kt | 8 +++ .../corda/node/flows/FlowWithClientIdTest.kt | 11 ++++ .../corda/node/internal/CordaRPCOpsImpl.kt | 2 + .../SingleThreadedStateMachineManager.kt | 11 +++- .../statemachine/StateMachineManager.kt | 8 +++ .../statemachine/FlowClientIdTests.kt | 55 +++++++++++++++++-- 6 files changed, 88 insertions(+), 7 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt index 826f52f0d9..51e6939257 100644 --- a/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt +++ b/core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt @@ -321,6 +321,14 @@ interface CordaRPCOps : RPCOps { */ fun removeClientId(clientId: String): Boolean + /** + * Returns all finished flows that were started with a client id. + * + * @return A [Map] containing client ids for finished flows, mapped to [true] if finished successfully, + * [false] if completed exceptionally. + */ + fun finishedFlowsWithClientIds(): Map + /** Returns Node's NodeInfo, assuming this will not change while the node is running. */ fun nodeInfo(): NodeInfo diff --git a/node/src/integration-test/kotlin/net/corda/node/flows/FlowWithClientIdTest.kt b/node/src/integration-test/kotlin/net/corda/node/flows/FlowWithClientIdTest.kt index ec1bff03e5..99f5674620 100644 --- a/node/src/integration-test/kotlin/net/corda/node/flows/FlowWithClientIdTest.kt +++ b/node/src/integration-test/kotlin/net/corda/node/flows/FlowWithClientIdTest.kt @@ -140,6 +140,17 @@ class FlowWithClientIdTest { }.withMessage("java.lang.IllegalStateException: Bla bla bla") } } + + @Test(timeout=300_000) + fun `finishedFlowsWithClientIds returns completed flows with client ids`() { + val clientId = UUID.randomUUID().toString() + driver(DriverParameters(startNodesInProcess = true, cordappsForAllNodes = emptySet())) { + val nodeA = startNode().getOrThrow() + nodeA.rpc.startFlowWithClientId(clientId, ::ResultFlow, 5).returnValue.getOrThrow(20.seconds) + val finishedFlows = nodeA.rpc.finishedFlowsWithClientIds() + assertEquals(true, finishedFlows[clientId]) + } + } } @StartableByRPC diff --git a/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt b/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt index 1a758a4050..c4cd54d7a9 100644 --- a/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt +++ b/node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt @@ -180,6 +180,8 @@ internal class CordaRPCOpsImpl( override fun removeClientId(clientId: String): Boolean = smm.removeClientId(clientId) + override fun finishedFlowsWithClientIds(): Map = smm.finishedFlowsWithClientIds() + override fun stateMachinesFeed(): DataFeed, StateMachineUpdate> { val (allStateMachines, changes) = smm.track() diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index ab4de767c9..52697247c5 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -813,7 +813,7 @@ internal class SingleThreadedStateMachineManager( val checkpoint = currentState.checkpoint.copy(status = Checkpoint.FlowStatus.PAUSED, flowState = FlowState.Paused) val pausedFlow = NonResidentFlow( id, - checkpoint, + checkpoint, flow.resultFuture, hospitalized = currentState.checkpoint.status == Checkpoint.FlowStatus.HOSPITALIZED, progressTracker = currentState.flowLogic.progressTracker @@ -1105,6 +1105,15 @@ internal class SingleThreadedStateMachineManager( return false } + override fun finishedFlowsWithClientIds(): Map { + return innerState.withLock { + clientIdsToFlowIds.asSequence() + .filter { (_, status) -> status is FlowWithClientIdStatus.Removed } + .map { (clientId, status) -> clientId to (status as FlowWithClientIdStatus.Removed).succeeded } + .toMap() + } + } + private sealed class CheckpointLoadingStatus { class Success(val checkpoint: Checkpoint) : CheckpointLoadingStatus() object NotFound : CheckpointLoadingStatus() diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt index 832af2cc99..d1bfc901be 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt @@ -120,6 +120,14 @@ interface StateMachineManager { * @return whether the mapping was removed. */ fun removeClientId(clientId: String): Boolean + + /** + * Returns all finished flows that were started with a client id. + * + * @return A [Map] containing client ids for finished flows, mapped to [true] if finished successfully, + * [false] if completed exceptionally. + */ + fun finishedFlowsWithClientIds(): Map } // These must be idempotent! A later failure in the state transition may error the flow state, and a replay may call diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt index c945b55aa4..3379f14f63 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt @@ -4,8 +4,10 @@ import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.strands.concurrent.Semaphore import net.corda.core.CordaRuntimeException import net.corda.core.flows.FlowLogic +import net.corda.core.flows.KilledFlowException import net.corda.core.internal.FlowIORequest import net.corda.core.internal.FlowStateMachineHandle +import net.corda.core.internal.concurrent.transpose import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.seconds import net.corda.node.services.persistence.DBCheckpointStorage @@ -18,18 +20,17 @@ import net.corda.testing.node.internal.InternalMockNodeParameters import net.corda.testing.node.internal.TestStartedNode import net.corda.testing.node.internal.startFlow import net.corda.testing.node.internal.startFlowWithClientId -import net.corda.core.flows.KilledFlowException import org.assertj.core.api.Assertions.assertThatExceptionOfType import org.junit.After import org.junit.Assert import org.junit.Before import org.junit.Test import rx.Observable -import java.lang.IllegalArgumentException import java.sql.SQLTransientConnectionException -import java.util.UUID +import java.util.* +import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger -import kotlin.IllegalStateException import kotlin.concurrent.thread import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -775,17 +776,59 @@ class FlowClientIdTests { reattachedFlowHandle?.resultFuture?.getOrThrow() }.withMessage("java.lang.IllegalStateException: Bla bla bla") } + + @Test(timeout = 300_000) + fun `finishedFlowsWithClientIds returns completed flows with client ids`() { + val clientIds = listOf("a", "b", "c", "d", "e") + val lock = CountDownLatch(1) + ResultFlow.hook = { clientId -> + if (clientId == clientIds[3]) { + throw java.lang.IllegalStateException("This didn't go so well") + } + if (clientId == clientIds[4]) { + lock.await(30, TimeUnit.SECONDS) + } + } + val flows = listOf( + aliceNode.services.startFlowWithClientId(clientIds[0], ResultFlow(10)), + aliceNode.services.startFlowWithClientId(clientIds[1], ResultFlow(10)), + aliceNode.services.startFlowWithClientId(clientIds[2], ResultFlow(10)) + ) + val failedFlow = aliceNode.services.startFlowWithClientId(clientIds[3], ResultFlow(10)) + val runningFlow = aliceNode.services.startFlowWithClientId(clientIds[4], ResultFlow(10)) + flows.map { it.resultFuture }.transpose().getOrThrow(30.seconds) + assertFailsWith { failedFlow.resultFuture.getOrThrow(20.seconds) } + + val finishedFlows = aliceNode.smm.finishedFlowsWithClientIds() + + lock.countDown() + + assertEquals(4, finishedFlows.size) + assertEquals(3, finishedFlows.filterValues { it }.size) + assertEquals(1, finishedFlows.filterValues { !it }.size) + assertEquals(setOf("a", "b", "c", "d"), finishedFlows.map { it.key }.toSet()) + assertTrue(runningFlow.clientId !in finishedFlows.keys) + + assertEquals( + listOf(10, 10, 10), + finishedFlows.filterValues { it }.map { aliceNode.smm.reattachFlowWithClientId(it.key)?.resultFuture?.get() } + ) + // [CordaRunTimeException] returned because [IllegalStateException] is not serializable + assertFailsWith { + finishedFlows.filterValues { !it }.map { aliceNode.smm.reattachFlowWithClientId(it.key)?.resultFuture?.getOrThrow() } + } + } } internal class ResultFlow(private val result: A): FlowLogic() { companion object { - var hook: (() -> Unit)? = null + var hook: ((String?) -> Unit)? = null var suspendableHook: FlowLogic? = null } @Suspendable override fun call(): A { - hook?.invoke() + hook?.invoke(stateMachine.clientId) suspendableHook?.let { subFlow(it) } return result } From 949489a117cfd4b6ca17f8dd62c5cc2b38055ecb Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Mon, 17 Aug 2020 10:35:22 +0100 Subject: [PATCH 11/25] CORDA-3994 Retry errors in flow init started with client ids (#6643) Flows that were started with a client id would hang because it would retrieve the existing flow's future and wait for it to finish. But, because the flow has failed its flow init and not saved its initial checkpoint, it is relying on `startFlow` to start the flow again (by redelivering the start flow external event). `FlowWithClientIdStatus` now holds the flow id that it is related to. This is then checked in `startFlow`. If a matching client id is found for a flow start, it then checks the flow id as well. If the flow id matches, then it lets the `startFlow` call continue, allowing it to actually start the flow again (how a flow without a client id would retry in this situation). --- .../StateMachineFlowInitErrorHandlingTest.kt | 268 ++++++++++++++++++ .../node/services/api/CheckpointStorage.kt | 14 +- .../persistence/DBCheckpointStorage.kt | 2 +- .../statemachine/ActionExecutorImpl.kt | 5 +- .../SingleThreadedStateMachineManager.kt | 16 +- .../statemachine/StateMachineState.kt | 10 +- 6 files changed, 297 insertions(+), 18 deletions(-) diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt index 0440680745..6817613f85 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt @@ -2,6 +2,7 @@ package net.corda.node.services.statemachine import net.corda.core.CordaRuntimeException import net.corda.core.messaging.startFlow +import net.corda.core.messaging.startFlowWithClientId import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.seconds import net.corda.node.services.api.CheckpointStorage @@ -387,6 +388,273 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { } } + /** + * Throws an exception when performing an [Action.CommitTransaction] event before the flow has initialised and saved its first checkpoint + * (remains in an unstarted state). + * + * The exception is thrown 3 times. + * + * This causes the transition to be discharged from the hospital 3 times (retries 3 times). On the final retry the transition + * succeeds and the flow finishes. + * + * Each time the flow retries, it starts from the beginning of the flow (due to being in an unstarted state). + * + */ + @Test(timeout = 300_000) + fun `with client id - error during transition with CommitTransaction action that occurs during flow initialisation will retry and complete successfully`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + + val rules = """ + RULE Create Counter + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Throw exception on executeCommitTransaction action + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF readCounter("counter") < 3 + DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + alice.rpc.startFlowWithClientId( + "here is my client id", + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow( + 30.seconds + ) + + alice.rpc.assertNumberOfCheckpoints(completed = 1) + alice.rpc.assertHospitalCounts(discharged = 3) + assertEquals(0, alice.rpc.stateMachinesSnapshot().size) + } + } + + /** + * Throws an exception when calling [FlowStateMachineImpl.processEvent]. + * + * This is not an expected place for an exception to occur, but allows us to test what happens when a random exception is propagated + * up to [FlowStateMachineImpl.run] during flow initialisation. + * + * A "Transaction context is missing" exception is thrown due to where the exception is thrown (no transaction is created so this is + * thrown when leaving [FlowStateMachineImpl.processEventsUntilFlowIsResumed] due to the finally block). + */ + @Test(timeout = 300_000) + fun `with client id - unexpected error during flow initialisation throws exception to client`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + val rules = """ + RULE Create Counter + CLASS ${FlowStateMachineImpl::class.java.name} + METHOD processEvent + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Throw exception + CLASS ${FlowStateMachineImpl::class.java.name} + METHOD processEvent + AT ENTRY + IF readCounter("counter") < 1 + DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + assertFailsWith { + alice.rpc.startFlowWithClientId( + "give me all of your client ids, or else", + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow(30.seconds) + } + + alice.rpc.assertNumberOfCheckpoints(failed = 1) + alice.rpc.assertHospitalCounts(propagated = 1) + assertEquals(0, alice.rpc.stateMachinesSnapshot().size) + } + } + + /** + * Throws an exception when performing an [Action.CommitTransaction] event before the flow has initialised and saved its first checkpoint + * (remains in an unstarted state). + * + * The exception is thrown 4 times. + * + * This causes the transition to be discharged from the hospital 3 times (retries 3 times) and then be kept in for observation. + * + * Each time the flow retries, it starts from the beginning of the flow (due to being in an unstarted state). + */ + @Test(timeout = 450_000) + fun `with client id - error during transition with CommitTransaction action that occurs during flow initialisation will retry and be kept for observation if error persists`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + + val rules = """ + RULE Create Counter + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Throw exception on executeCommitTransaction action + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF readCounter("counter") < 4 + DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + executor.execute { + alice.rpc.startFlowWithClientId( + "please sir, can i have a client id?", + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ) + } + + // flow is not signaled as started calls to [getOrThrow] will hang, sleeping instead + Thread.sleep(30.seconds.toMillis()) + + alice.rpc.assertNumberOfCheckpoints(hospitalized = 1) + alice.rpc.assertHospitalCounts( + discharged = 3, + observation = 1 + ) + assertEquals(1, alice.rpc.stateMachinesSnapshot().size) + val terminated = (alice as OutOfProcessImpl).stop(60.seconds) + assertTrue(terminated, "The node must be shutdown before it can be restarted") + val (alice2, _) = createBytemanNode(ALICE_NAME) + Thread.sleep(20.seconds.toMillis()) + alice2.rpc.assertNumberOfCheckpoints(completed = 1) + } + } + + /** + * Throws an exception when performing an [Action.CommitTransaction] event before the flow has initialised and saved its first checkpoint + * (remains in an unstarted state). + * + * An exception is thrown when committing a database transaction during a transition to trigger the retry of the flow. Another + * exception is then thrown during the retry itself. + * + * The flow then retries the retry causing the flow to complete successfully. + */ + @Test(timeout = 300_000) + fun `with client id - error during retrying a flow that failed when committing its original checkpoint will retry the flow again and complete successfully`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + + val rules = """ + RULE Throw exception on executeCommitTransaction action after first suspend + commit + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF !flagged("commit_exception_flag") + DO flag("commit_exception_flag"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") + ENDRULE + + RULE Throw exception on retry + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF flagged("commit_exception_flag") && !flagged("retry_exception_flag") + DO flag("retry_exception_flag"); traceln("Throwing retry exception"); throw new java.lang.RuntimeException("Here we go again") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + alice.rpc.startFlowWithClientId( + "hi, i'd like to be your client id", + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow( + 30.seconds + ) + + alice.rpc.assertNumberOfCheckpoints(completed = 1) + alice.rpc.assertHospitalCounts( + discharged = 1, + dischargedRetry = 1 + ) + assertEquals(0, alice.rpc.stateMachinesSnapshot().size) + } + } + + /** + * Throws an exception when after the first [Action.CommitTransaction] event before the flow has initialised (remains in an unstarted state). + * This is to cover transient issues, where the transaction committed the checkpoint but failed to respond to the node. + * + * The exception is thrown when performing [Action.SignalFlowHasStarted], the error won't actually appear here but it makes it easier + * to test. + * + * The exception is thrown 3 times. + * + * This causes the transition to be discharged from the hospital 3 times (retries 3 times). On the final retry the transition + * succeeds and the flow finishes. + * + * Each time the flow retries, it starts from the beginning of the flow (due to being in an unstarted state). + * + * The first retry will load the checkpoint that the flow doesn't know exists ([StateMachineState.isAnyCheckpointPersisted] is false + * at this point). The flag gets switched to true after this first retry and the flow has now returned to an expected state. + * + */ + @Test(timeout = 300_000) + fun `with client id - error during transition when checkpoint commits but transient db exception is thrown during flow initialisation will retry and complete successfully`() { + startDriver { + val (charlie, alice, port) = createNodeAndBytemanNode(CHARLIE_NAME, ALICE_NAME) + + val rules = """ + RULE Create Counter + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Throw exception on executeSignalFlowHasStarted action + CLASS $actionExecutorClassName + METHOD executeSignalFlowHasStarted + # METHOD executeAcknowledgeMessages + AT ENTRY + IF readCounter("counter") < 3 + DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("i wish i was a sql exception") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + alice.rpc.startFlowWithClientId( + "hello im a client id", + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow( + 30.seconds + ) + + alice.rpc.assertNumberOfCheckpoints(completed = 1) + alice.rpc.assertHospitalCounts(discharged = 3) + assertEquals(0, alice.rpc.stateMachinesSnapshot().size) + } + } + /** * Throws an exception when performing an [Action.CommitTransaction] event on a responding node before the flow has initialised and * saved its first checkpoint (remains in an unstarted state). diff --git a/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt b/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt index e4bfe0ebdf..6e750619f4 100644 --- a/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/api/CheckpointStorage.kt @@ -15,14 +15,20 @@ interface CheckpointStorage { /** * Add a checkpoint for a new id to the store. Will throw if there is already a checkpoint for this id */ - fun addCheckpoint(id: StateMachineRunId, checkpoint: Checkpoint, serializedFlowState: SerializedBytes, - serializedCheckpointState: SerializedBytes) + fun addCheckpoint( + id: StateMachineRunId, checkpoint: Checkpoint, + serializedFlowState: SerializedBytes?, + serializedCheckpointState: SerializedBytes + ) /** * Update an existing checkpoint. Will throw if there is not checkpoint for this id. */ - fun updateCheckpoint(id: StateMachineRunId, checkpoint: Checkpoint, serializedFlowState: SerializedBytes?, - serializedCheckpointState: SerializedBytes) + fun updateCheckpoint( + id: StateMachineRunId, checkpoint: Checkpoint, + serializedFlowState: SerializedBytes?, + serializedCheckpointState: SerializedBytes + ) /** * Update an existing checkpoints status ([Checkpoint.status]). diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt b/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt index e08181c86b..a088e3bf6e 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt @@ -373,7 +373,7 @@ class DBCheckpointStorage( override fun addCheckpoint( id: StateMachineRunId, checkpoint: Checkpoint, - serializedFlowState: SerializedBytes, + serializedFlowState: SerializedBytes?, serializedCheckpointState: SerializedBytes ) { val now = clock.instant() diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt index b1162a390b..a5f8c8060f 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt @@ -94,10 +94,7 @@ internal class ActionExecutorImpl( if (action.isCheckpointUpdate) { checkpointStorage.updateCheckpoint(action.id, checkpoint, serializedFlowState, serializedCheckpointState) } else { - if (flowState is FlowState.Finished) { - throw IllegalStateException("A new checkpoint cannot be created with a finished flow state.") - } - checkpointStorage.addCheckpoint(action.id, checkpoint, serializedFlowState!!, serializedCheckpointState) + checkpointStorage.addCheckpoint(action.id, checkpoint, serializedFlowState, serializedCheckpointState) } } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 52697247c5..4066a8f972 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -199,13 +199,14 @@ internal class SingleThreadedStateMachineManager( // - Incompatible checkpoints need to be handled upon implementing CORDA-3897 for (flow in fibers.values) { flow.fiber.clientId?.let { - innerState.clientIdsToFlowIds[it] = FlowWithClientIdStatus.Active(doneFuture(flow.fiber)) + innerState.clientIdsToFlowIds[it] = FlowWithClientIdStatus.Active(flow.fiber.id, doneFuture(flow.fiber)) } } for (pausedFlow in pausedFlows) { pausedFlow.value.checkpoint.checkpointState.invocationContext.clientId?.let { innerState.clientIdsToFlowIds[it] = FlowWithClientIdStatus.Active( + pausedFlow.key, doneClientIdFuture(pausedFlow.key, pausedFlow.value.resultFuture, it) ) } @@ -311,17 +312,20 @@ internal class SingleThreadedStateMachineManager( status } else { newFuture = openFuture() - FlowWithClientIdStatus.Active(newFuture!!) + FlowWithClientIdStatus.Active(flowId, newFuture!!) } } } // Flow -started with client id- already exists, return the existing's flow future and don't start a new flow. existingStatus?.let { - val existingFuture = activeOrRemovedClientIdFuture(it, clientId) - return@startFlow uncheckedCast(existingFuture) - } - onClientIDNotFound?.invoke() + // If the flow ID is the same as the one recorded in the client ID map, + // then this start flow event has been retried, and we should not de-duplicate. + if (flowId != it.flowId) { + val existingFuture = activeOrRemovedClientIdFuture(it, clientId) + return@startFlow uncheckedCast(existingFuture) + } + } ?: onClientIDNotFound?.invoke() } return try { diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt index c53cf81dc0..7e8efc4ee3 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt @@ -417,9 +417,13 @@ sealed class SubFlowVersion { data class CorDappFlow(override val platformVersion: Int, val corDappName: String, val corDappHash: SecureHash) : SubFlowVersion() } -sealed class FlowWithClientIdStatus { - data class Active(val flowStateMachineFuture: CordaFuture>) : FlowWithClientIdStatus() - data class Removed(val flowId: StateMachineRunId, val succeeded: Boolean) : FlowWithClientIdStatus() +sealed class FlowWithClientIdStatus(val flowId: StateMachineRunId) { + class Active( + flowId: StateMachineRunId, + val flowStateMachineFuture: CordaFuture> + ) : FlowWithClientIdStatus(flowId) + + class Removed(flowId: StateMachineRunId, val succeeded: Boolean) : FlowWithClientIdStatus(flowId) } data class FlowResultMetadata( From abfe83626fef49cb446553ba1409e8ddb899ef7e Mon Sep 17 00:00:00 2001 From: Kyriakos Tharrouniatis Date: Mon, 17 Aug 2020 16:41:45 +0100 Subject: [PATCH 12/25] CORDA-3809 - Remove tests applicable only in ENT (#6645) --- .../statemachine/FlowClientIdTests.kt | 91 ------------------- 1 file changed, 91 deletions(-) diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt index 3379f14f63..0665fea236 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowClientIdTests.kt @@ -458,59 +458,6 @@ class FlowClientIdTests { Assert.assertEquals(5, flowHandle1.resultFuture.getOrThrow(20.seconds)) } - // the below test has to be made available only in ENT -// @Test(timeout=300_000) -// fun `on node restart -paused- flows with client id are hook-able`() { -// val clientId = UUID.randomUUID().toString() -// var noSecondFlowWasSpawned = 0 -// var firstRun = true -// var firstFiber: Fiber? = null -// val flowIsRunning = Semaphore(0) -// val waitUntilFlowIsRunning = Semaphore(0) -// -// ResultFlow.suspendableHook = object : FlowLogic() { -// @Suspendable -// override fun call() { -// if (firstRun) { -// firstFiber = Fiber.currentFiber() -// firstRun = false -// } -// -// waitUntilFlowIsRunning.release() -// try { -// flowIsRunning.acquire() // make flow wait here to impersonate a running flow -// } catch (e: InterruptedException) { -// flowIsRunning.release() -// throw e -// } -// -// noSecondFlowWasSpawned++ -// } -// } -// -// val flowHandle0 = aliceNode.services.startFlowWithClientId(clientId, ResultFlow(5)) -// waitUntilFlowIsRunning.acquire() -// aliceNode.internals.acceptableLiveFiberCountOnStop = 1 -// // Pause the flow on node restart -// val aliceNode = mockNet.restartNode(aliceNode, -// InternalMockNodeParameters( -// configOverrides = { -// doReturn(StateMachineManager.StartMode.Safe).whenever(it).smmStartMode -// } -// )) -// // Blow up the first fiber running our flow as it is leaked here, on normal node shutdown that fiber should be gone -// firstFiber!!.interrupt() -// -// // Re-hook a paused flow -// val flowHandle1 = aliceNode.services.startFlowWithClientId(clientId, ResultFlow(5)) -// -// Assert.assertEquals(flowHandle0.id, flowHandle1.id) -// Assert.assertEquals(clientId, flowHandle1.clientId) -// aliceNode.smm.unPauseFlow(flowHandle1.id) -// Assert.assertEquals(5, flowHandle1.resultFuture.getOrThrow(20.seconds)) -// Assert.assertEquals(1, noSecondFlowWasSpawned) -// } - @Test(timeout = 300_000) fun `on node start -completed- flows with client id are hook-able`() { val clientId = UUID.randomUUID().toString() @@ -557,44 +504,6 @@ class FlowClientIdTests { assertEquals(1, counter) } - // the below test has to be made available only in ENT -// @Test(timeout=300_000) -// fun `On 'startFlowInternal' throwing, subsequent request with same client hits the time window in which the previous request was about to remove the client id mapping`() { -// val clientId = UUID.randomUUID().toString() -// var firstRequest = true -// SingleThreadedStateMachineManager.onCallingStartFlowInternal = { -// if (firstRequest) { -// firstRequest = false -// throw IllegalStateException("Yet another one") -// } -// } -// -// val wait = Semaphore(0) -// val waitForFirstRequest = Semaphore(0) -// SingleThreadedStateMachineManager.onStartFlowInternalThrewAndAboutToRemove = { -// waitForFirstRequest.release() -// wait.acquire() -// Thread.sleep(10000) -// } -// var counter = 0 -// ResultFlow.hook = { counter++ } -// -// thread { -// assertFailsWith { -// aliceNode.services.startFlowWithClientId(clientId, ResultFlow(5)) -// } -// } -// -// waitForFirstRequest.acquire() -// wait.release() -// assertFailsWith { -// // the subsequent request will not hang on a never ending future, because the previous request ,upon failing, will also complete the future exceptionally -// aliceNode.services.startFlowWithClientId(clientId, ResultFlow(5)) -// } -// -// assertEquals(0, counter) -// } - @Test(timeout = 300_000) fun `if flow fails to serialize its result then the result gets converted to an exception result`() { val clientId = UUID.randomUUID().toString() From 742312b85aa64dcb209d2826eba1143244968dd4 Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Tue, 18 Aug 2020 12:05:05 +0100 Subject: [PATCH 13/25] NOTICK Do not replace stacktrace for local errors (#6635) We should not overwrite the stack trace of local errors thrown by `FlowContinuation.Throw` as it hides the real cause of the error. Exceptions received from peer nodes are still overwritten. --- .../statemachine/FlowStateMachineImpl.kt | 6 ++--- .../transitions/StartedFlowTransition.kt | 24 +++++++++---------- .../statemachine/FlowFrameworkTests.kt | 3 ++- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt index 7d2ac7f62a..267ff59aa6 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowStateMachineImpl.kt @@ -237,12 +237,11 @@ class FlowStateMachineImpl(override val id: StateMachineRunId, } private fun Throwable.fillInLocalStackTrace(): Throwable { - fillInStackTrace() - // provide useful information that can be displayed to the user - // reflection use to access private field + // Fill in the stacktrace when the exception originates from another node when (this) { is UnexpectedFlowEndException -> { DeclaredField(UnexpectedFlowEndException::class.java, "peer", this).value?.let { + fillInStackTrace() stackTrace = arrayOf( StackTraceElement( "Received unexpected counter-flow exception from peer ${it.name}", @@ -255,6 +254,7 @@ class FlowStateMachineImpl(override val id: StateMachineRunId, } is FlowException -> { DeclaredField(FlowException::class.java, "peer", this).value?.let { + fillInStackTrace() stackTrace = arrayOf( StackTraceElement( "Received counter-flow exception from peer ${it.name}", diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt index 5ac73c799e..8190a2c49a 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt @@ -389,22 +389,20 @@ class StartedFlowTransition( } private fun convertErrorMessageToException(errorMessage: ErrorSessionMessage, peer: Party): Throwable { - val exception: Throwable = if (errorMessage.flowException == null) { - UnexpectedFlowEndException("Counter-flow errored", cause = null, originalErrorId = errorMessage.errorId) - } else { - errorMessage.flowException.originalErrorId = errorMessage.errorId - errorMessage.flowException - } - when (exception) { - // reflection used to access private field - is UnexpectedFlowEndException -> DeclaredField( + return if (errorMessage.flowException == null) { + UnexpectedFlowEndException("Counter-flow errored", cause = null, originalErrorId = errorMessage.errorId).apply { + DeclaredField( UnexpectedFlowEndException::class.java, "peer", - exception - ).value = peer - is FlowException -> DeclaredField(FlowException::class.java, "peer", exception).value = peer + this + ).value = peer + } + } else { + errorMessage.flowException.apply { + originalErrorId = errorMessage.errorId + DeclaredField(FlowException::class.java, "peer", errorMessage.flowException).value = peer + } } - return exception } private fun collectUncloseableSessions(sessionIds: Collection, checkpoint: Checkpoint): List { diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index 2a68ef2685..13e1eca04b 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -307,7 +307,7 @@ class FlowFrameworkTests { .isThrownBy { receivingFiber.resultFuture.getOrThrow() } .withMessage("Nothing useful") .withStackTraceContaining(ReceiveFlow::class.java.name) // Make sure the stack trace is that of the receiving flow - .withStackTraceContaining("Received counter-flow exception from peer") + .withStackTraceContaining("Received counter-flow exception from peer ${bob.name}") bobNode.database.transaction { assertThat(bobNode.internals.checkpointStorage.checkpoints()).isEmpty() } @@ -630,6 +630,7 @@ class FlowFrameworkTests { Notification.createOnNext(ReceiveFlow.START_STEP), Notification.createOnError(receiveFlowException) ) + assertThat(receiveFlowException).hasStackTraceContaining("Received unexpected counter-flow exception from peer ${bob.name}") assertSessionTransfers( aliceNode sent sessionInit(ReceiveFlow::class) to bobNode, From 21985243159f7797fbd507d96819c531f7f22ee6 Mon Sep 17 00:00:00 2001 From: Joseph Zuniga-Daly <59851625+josephzunigadaly@users.noreply.github.com> Date: Wed, 19 Aug 2020 10:41:51 +0100 Subject: [PATCH 14/25] CORDA-3824: Fix property rename in AMQP object evolution (#6616) * CORDA-3824: Add unit tests * CORDA-3824: Fix property rename in AMQP object evolution * Rename deserializedException to deserializedObject * Rename test class to EvolutionObjectBuilderRenamedPropertyTests * Added descriptions of the different object evolution stages in this test * Rename file containing the serialized object * Regenerate serialized data * Add a comment explaining the commented out code. * Restrict new behaviour to EvolutionObjectBuilder and simplify the loop that builds constructor slots. --- .../internal/amqp/ObjectBuilder.kt | 20 +++- ...lutionObjectBuilderRenamedPropertyTests.kt | 90 ++++++++++++++++++ ...ionObjectBuilderRenamedPropertyTests.Step1 | Bin 0 -> 1437 bytes 3 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 serialization/src/test/kotlin/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.kt create mode 100644 serialization/src/test/resources/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.Step1 diff --git a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt index ab1150ffff..056cfc1197 100644 --- a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt +++ b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt @@ -69,7 +69,7 @@ interface ObjectBuilder { * Create an [ObjectBuilderProvider] for the given [LocalTypeInformation.Composable]. */ fun makeProvider(typeInformation: LocalTypeInformation.Composable): ObjectBuilderProvider = - makeProvider(typeInformation.typeIdentifier, typeInformation.constructor, typeInformation.properties) + makeProvider(typeInformation.typeIdentifier, typeInformation.constructor, typeInformation.properties, false) /** * Create an [ObjectBuilderProvider] for the given type, constructor and set of properties. @@ -79,11 +79,12 @@ interface ObjectBuilder { */ fun makeProvider(typeIdentifier: TypeIdentifier, constructor: LocalConstructorInformation, - properties: Map): ObjectBuilderProvider = - if (constructor.hasParameters) makeConstructorBasedProvider(properties, typeIdentifier, constructor) + properties: Map, + includeAllConstructorParameters: Boolean): ObjectBuilderProvider = + if (constructor.hasParameters) makeConstructorBasedProvider(properties, typeIdentifier, constructor, includeAllConstructorParameters) else makeGetterSetterProvider(properties, typeIdentifier, constructor) - private fun makeConstructorBasedProvider(properties: Map, typeIdentifier: TypeIdentifier, constructor: LocalConstructorInformation): ObjectBuilderProvider { + private fun makeConstructorBasedProvider(properties: Map, typeIdentifier: TypeIdentifier, constructor: LocalConstructorInformation, includeAllConstructorParameters: Boolean): ObjectBuilderProvider { val constructorIndices = properties.mapValues { (name, property) -> when (property) { is LocalPropertyInformation.ConstructorPairedProperty -> property.constructorSlot.parameterIndex @@ -94,6 +95,15 @@ interface ObjectBuilder { "but property $name is not constructor-paired" ) } + }.toMutableMap() + + if (includeAllConstructorParameters) { + // Add constructor parameters not in the list of properties + // so we can use them in object evolution + for ((parameterIndex, parameter) in constructor.parameters.withIndex()) { + // Only use the parameters not already matched to properties + constructorIndices.putIfAbsent(parameter.name, parameterIndex) + } } val propertySlots = constructorIndices.keys.mapIndexed { slot, name -> name to slot }.toMap() @@ -203,7 +213,7 @@ class EvolutionObjectBuilder(private val localBuilder: ObjectBuilder, localProperties: Map, remoteTypeInformation: RemoteTypeInformation.Composable, mustPreserveData: Boolean): () -> ObjectBuilder { - val localBuilderProvider = ObjectBuilder.makeProvider(typeIdentifier, constructor, localProperties) + val localBuilderProvider = ObjectBuilder.makeProvider(typeIdentifier, constructor, localProperties, true) val remotePropertyNames = remoteTypeInformation.properties.keys.sorted() val reroutedIndices = remotePropertyNames.map { propertyName -> diff --git a/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.kt b/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.kt new file mode 100644 index 0000000000..0e7f795839 --- /dev/null +++ b/serialization/src/test/kotlin/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.kt @@ -0,0 +1,90 @@ +package net.corda.serialization.internal.amqp + +import net.corda.core.contracts.BelongsToContract +import net.corda.core.contracts.Contract +import net.corda.core.contracts.ContractState +import net.corda.core.identity.AbstractParty +import net.corda.core.serialization.DeprecatedConstructorForDeserialization +import net.corda.core.serialization.SerializedBytes +import net.corda.core.transactions.LedgerTransaction +import net.corda.serialization.internal.amqp.testutils.deserialize +import net.corda.serialization.internal.amqp.testutils.serialize +import net.corda.serialization.internal.amqp.testutils.testDefaultFactory +import net.corda.serialization.internal.amqp.testutils.writeTestResource +import org.assertj.core.api.Assertions +import org.junit.Test + +class EvolutionObjectBuilderRenamedPropertyTests +{ + private val cordappVersionTestValue = 38854445 + private val dataTestValue = "d7af8af0-c10e-45bc-a5f7-92de432be0ef" + private val xTestValue = 7568055 + private val yTestValue = 4113687 + + class TemplateContract : Contract { + override fun verify(tx: LedgerTransaction) { } + } + + /** + * Step 1 + * + * This is the original class definition in object evolution. + */ +// @BelongsToContract(TemplateContract::class) +// data class TemplateState(val cordappVersion: Int, val data: String, val x : Int?, override val participants: List = listOf()) : ContractState + + /** + * Step 2 + * + * This is an intermediate class definition in object evolution. + * The y property has been added and a constructor copies the value of x into y. x is now set to null by the constructor. + */ +// @BelongsToContract(TemplateContract::class) +// data class TemplateState(val cordappVersion: Int, val data: String, val x : Int?, val y : String?, override val participants: List = listOf()) : ContractState { +// @DeprecatedConstructorForDeserialization(1) +// constructor(cordappVersion: Int, data : String, x : Int?, participants: List) +// : this(cordappVersion, data, null, x?.toString(), participants) +// } + + /** + * Step 3 + * + * This is the final class definition in object evolution. + * The x property has been removed but the constructor that copies values of x into y still exists. We expect previous versions of this + * object to pass the value of x to the constructor when deserialized. + */ + @BelongsToContract(TemplateContract::class) + data class TemplateState(val cordappVersion: Int, val data: String, val y : String?, override val participants: List = listOf()) : ContractState { + @DeprecatedConstructorForDeserialization(1) + constructor(cordappVersion: Int, data : String, x : Int?, participants: List) : this(cordappVersion, data, x?.toString(), participants) + } + + @Test(timeout=300_000) + fun `Step 1 to Step 3`() { + + // The next two commented lines are how the serialized data is generated. To regenerate the data, uncomment these along + // with the correct version of the class and rerun the test. This will generate a new file in the project resources. + +// val step1 = TemplateState(cordappVersionTestValue, dataTestValue, xTestValue) +// saveSerializedObject(step1) + + // serialization/src/test/resources/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.Step1 + val bytes = this::class.java.getResource("EvolutionObjectBuilderRenamedPropertyTests.Step1").readBytes() + + val serializerFactory: SerializerFactory = testDefaultFactory() + val deserializedObject = DeserializationInput(serializerFactory) + .deserialize(SerializedBytes(bytes)) + + Assertions.assertThat(deserializedObject.cordappVersion).isEqualTo(cordappVersionTestValue) + Assertions.assertThat(deserializedObject.data).isEqualTo(dataTestValue) +// Assertions.assertThat(deserializedObject.x).isEqualTo(xTestValue) + Assertions.assertThat(deserializedObject.y).isEqualTo(xTestValue.toString()) + Assertions.assertThat(deserializedObject).isInstanceOf(TemplateState::class.java) + } + + /** + * Write serialized object to resources folder + */ + @Suppress("unused") + fun saveSerializedObject(obj : T) = writeTestResource(SerializationOutput(testDefaultFactory()).serialize(obj)) +} \ No newline at end of file diff --git a/serialization/src/test/resources/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.Step1 b/serialization/src/test/resources/net/corda/serialization/internal/amqp/EvolutionObjectBuilderRenamedPropertyTests.Step1 new file mode 100644 index 0000000000000000000000000000000000000000..c2a94d7f11f57bc2446a00d6cd6ec0e57d769e78 GIT binary patch literal 1437 zcmb_c%}(1u5VjMW2&qD}46cZ9mpdyuVYDyph11(e>Dy{8xw66bRuY<#> zhpOtmx87ELh+emc-unhz`xxD%)Fe?N(W;l#Xl8c4pIO@sA`9>w$G!V*u#@BX9~>us zU_qYy^2mo+GW#7*(Q!j=dHc;u(&{#Kr*rP0LwToGqvt{=r(YMzqE!X#|`MfoxZcTV)HbSIPz~L3?E6Md}4UY_zu0eaBlp!YObXLAzGdI$V79H6xT`goK|r z%!F$e6tbGgYW#ba63Ls4s}#cs0T*2Xi~?UmK8BGGTnTucP|~`AoAmQXh67EkCdjp5 zbOL?gK}(N<5JtH762>@Qdmm@AN3j*gnQrn#c0dG*KS-fKI{ou88ZOLej%({x z;a!$f%J#3c!=PCQU s4Xs0@mN Date: Wed, 19 Aug 2020 14:24:37 +0100 Subject: [PATCH 15/25] Clear flow hospital hooks - commented out for now --- .../net/corda/node/services/statemachine/FlowFrameworkTests.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index 13e1eca04b..cd8c866032 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -147,6 +147,8 @@ class FlowFrameworkTests { SuspendingFlow.hookBeforeCheckpoint = {} SuspendingFlow.hookAfterCheckpoint = {} +// StaffedFlowHospital.onFlowKeptForOvernightObservation.clear() +// StaffedFlowHospital.onFlowResuscitated.clear() } @Test(timeout=300_000) From 5d24b702278446d058a77638bf73919c7203a6dd Mon Sep 17 00:00:00 2001 From: Kyriakos Tharrouniatis Date: Wed, 19 Aug 2020 15:56:12 +0100 Subject: [PATCH 16/25] CORDA-3998 - Commit db transaction before starting flows at node start (#6647) Delay the firing of future/callback chain in 'AbstractNode.start' to after db transaction commit --- .../main/kotlin/net/corda/node/internal/AbstractNode.kt | 9 ++++++++- .../statemachine/SingleThreadedStateMachineManager.kt | 5 ++--- .../node/services/statemachine/StateMachineManager.kt | 2 +- .../node/services/statemachine/FlowFrameworkTests.kt | 9 --------- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt index 686a57b77e..c470394638 100644 --- a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt @@ -588,6 +588,10 @@ abstract class AbstractNode(val configuration: NodeConfiguration, throw e } + // Only execute futures/callbacks linked to [rootFuture] after the database transaction below is committed. + // This ensures that the node is fully ready before starting flows. + val rootFuture = openFuture() + // Do all of this in a database transaction so anything that might need a connection has one. val (resultingNodeInfo, readyFuture) = database.transaction(recoverableFailureTolerance = 0) { networkParametersStorage.setCurrentParameters(signedNetParams, trustRoot) @@ -609,7 +613,8 @@ abstract class AbstractNode(val configuration: NodeConfiguration, tokenizableServices = null verifyCheckpointsCompatible(frozenTokenizableServices) - val smmStartedFuture = smm.start(frozenTokenizableServices) + val callback = smm.start(frozenTokenizableServices) + val smmStartedFuture = rootFuture.map { callback() } // Shut down the SMM so no Fibers are scheduled. runOnStop += { smm.stop(acceptableLiveFiberCountOnStop()) } val flowMonitor = FlowMonitor( @@ -629,6 +634,8 @@ abstract class AbstractNode(val configuration: NodeConfiguration, resultingNodeInfo to readyFuture } + rootFuture.captureLater(services.networkMapCache.nodeReady) + readyFuture.map { ready -> if (ready) { // NB: Dispatch lifecycle events outside of transaction to ensure attachments and the like persisted into the DB diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 4066a8f972..9399176ad1 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -22,7 +22,6 @@ import net.corda.core.internal.concurrent.OpenFuture import net.corda.core.internal.concurrent.doneFuture import net.corda.core.internal.concurrent.map import net.corda.core.internal.concurrent.openFuture -import net.corda.core.internal.mapNotNull import net.corda.core.internal.uncheckedCast import net.corda.core.messaging.DataFeed import net.corda.core.serialization.deserialize @@ -152,7 +151,7 @@ internal class SingleThreadedStateMachineManager( override val changes: Observable = innerState.changesPublisher @Suppress("ComplexMethod") - override fun start(tokenizableServices: List, startMode: StateMachineManager.StartMode): CordaFuture { + override fun start(tokenizableServices: List, startMode: StateMachineManager.StartMode): () -> Unit { checkQuasarJavaAgentPresence() val checkpointSerializationContext = CheckpointSerializationDefaults.CHECKPOINT_CONTEXT.withTokenContext( CheckpointSerializeAsTokenContextImpl( @@ -223,7 +222,7 @@ internal class SingleThreadedStateMachineManager( } ?: logger.error("Found finished flow $id without a client id. Something is very wrong and this flow will be ignored.") } - return serviceHub.networkMapCache.nodeReady.map { + return { logger.info("Node ready, info: ${serviceHub.myInfo}") resumeRestoredFlows(fibers) flowMessaging.start { _, deduplicationHandler -> diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt index d1bfc901be..05887df101 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt @@ -42,7 +42,7 @@ interface StateMachineManager { * * @return `Future` which completes when SMM is fully started */ - fun start(tokenizableServices: List, startMode: StartMode = StartMode.ExcludingPaused) : CordaFuture + fun start(tokenizableServices: List, startMode: StartMode = StartMode.ExcludingPaused) : () -> Unit /** * Stops the state machine manager gracefully, waiting until all but [allowedUnsuspendedFiberCount] flows reach the diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index 13e1eca04b..409e746c90 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -689,9 +689,6 @@ class FlowFrameworkTests { firstExecution = false throw HospitalizeFlowException() } else { - // the below sleep should be removed once we fix : The thread's transaction executing StateMachineManager.start takes long - // and doesn't commit before flow starts running. - Thread.sleep(3000) dbCheckpointStatusBeforeSuspension = aliceNode.internals.checkpointStorage.getCheckpoints().toList().single().second.status currentDBSession().clear() // clear session as Hibernate with fails with 'org.hibernate.NonUniqueObjectException' once it tries to save a DBFlowCheckpoint upon checkpoint inMemoryCheckpointStatusBeforeSuspension = flowFiber.transientState.checkpoint.status @@ -740,9 +737,6 @@ class FlowFrameworkTests { firstExecution = false throw HospitalizeFlowException() } else { - // the below sleep should be removed once we fix : The thread's transaction executing StateMachineManager.start takes long - // and doesn't commit before flow starts running. - Thread.sleep(3000) dbCheckpointStatus = aliceNode.internals.checkpointStorage.getCheckpoints().toList().single().second.status inMemoryCheckpointStatus = flowFiber.transientState.checkpoint.status @@ -857,9 +851,6 @@ class FlowFrameworkTests { var secondRun = false SuspendingFlow.hookBeforeCheckpoint = { if(secondRun) { - // the below sleep should be removed once we fix : The thread's transaction executing StateMachineManager.start takes long - // and doesn't commit before flow starts running. - Thread.sleep(3000) aliceNode.database.transaction { checkpointStatusAfterRestart = findRecordsFromDatabase().single().status dbExceptionAfterRestart = findRecordsFromDatabase() From 6a776a267b77502d90b8bdaef49f48ea88ae8545 Mon Sep 17 00:00:00 2001 From: Joseph Zuniga-Daly Date: Wed, 19 Aug 2020 17:18:39 +0100 Subject: [PATCH 17/25] Extract method to fix detekt ComplexMethod failure --- .../serialization/internal/amqp/ObjectBuilder.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt index 373f96ca8f..ffc2fae5b5 100644 --- a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt +++ b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/ObjectBuilder.kt @@ -124,12 +124,7 @@ interface ObjectBuilder { }.toMutableMap() if (includeAllConstructorParameters) { - // Add constructor parameters not in the list of properties - // so we can use them in object evolution - for ((parameterIndex, parameter) in constructor.parameters.withIndex()) { - // Only use the parameters not already matched to properties - constructorIndices.putIfAbsent(parameter.name, parameterIndex) - } + addMissingConstructorParameters(constructorIndices, constructor) } val propertySlots = constructorIndices.keys.mapIndexed { slot, name -> name to slot }.toMap() @@ -139,6 +134,15 @@ interface ObjectBuilder { } } + private fun addMissingConstructorParameters(constructorIndices: MutableMap, constructor: LocalConstructorInformation) { + // Add constructor parameters not in the list of properties + // so we can use them in object evolution + for ((parameterIndex, parameter) in constructor.parameters.withIndex()) { + // Only use the parameters not already matched to properties + constructorIndices.putIfAbsent(parameter.name, parameterIndex) + } + } + private fun makeSetterBasedProvider( properties: Map, typeIdentifier: TypeIdentifier, From f428836f331d05d0e82682e53e9ac58d546d39c1 Mon Sep 17 00:00:00 2001 From: Kyriakos Tharrouniatis Date: Thu, 20 Aug 2020 09:22:56 +0100 Subject: [PATCH 18/25] Clear hospital hooks after tests; should be fixing tests hanging --- .../corda/node/services/statemachine/FlowFrameworkTests.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt index cd8c866032..cb0191c406 100644 --- a/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt +++ b/node/src/test/kotlin/net/corda/node/services/statemachine/FlowFrameworkTests.kt @@ -147,8 +147,8 @@ class FlowFrameworkTests { SuspendingFlow.hookBeforeCheckpoint = {} SuspendingFlow.hookAfterCheckpoint = {} -// StaffedFlowHospital.onFlowKeptForOvernightObservation.clear() -// StaffedFlowHospital.onFlowResuscitated.clear() + StaffedFlowHospital.onFlowResuscitated.clear() + StaffedFlowHospital.onFlowKeptForOvernightObservation.clear() } @Test(timeout=300_000) From ab218333903a37b5fd1f81b514868a31077dd4e5 Mon Sep 17 00:00:00 2001 From: Nikolett Nagy <61757742+nikinagy@users.noreply.github.com> Date: Thu, 20 Aug 2020 09:23:03 +0100 Subject: [PATCH 19/25] Re-add lost fix (#6652) --- .../node/services/vault/VaultQueryJoinTest.kt | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt index 6bfc1a7874..59d246d3a8 100644 --- a/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt +++ b/node/src/test/kotlin/net/corda/node/services/vault/VaultQueryJoinTest.kt @@ -6,6 +6,7 @@ import net.corda.core.contracts.Contract import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateRef import net.corda.core.identity.AbstractParty +import net.corda.core.node.ServiceHub import net.corda.core.node.services.Vault import net.corda.core.node.services.queryBy import net.corda.core.node.services.vault.DEFAULT_PAGE_SIZE @@ -22,7 +23,9 @@ import net.corda.core.transactions.TransactionBuilder import net.corda.testing.core.ALICE_NAME import net.corda.testing.node.MockNetwork import net.corda.testing.node.MockNetworkParameters +import net.corda.testing.node.StartedMockNode import net.corda.testing.node.internal.cordappsForPackages +import org.junit.AfterClass import org.junit.BeforeClass import org.junit.Test import javax.persistence.Column @@ -33,24 +36,29 @@ import kotlin.test.assertEquals class VaultQueryJoinTest { companion object { - private val mockNetwork = MockNetwork( - MockNetworkParameters( - cordappsForAllNodes = cordappsForPackages( - listOf( - "net.corda.node.services.vault" - ) - ) - ) - ) - private val aliceNode = mockNetwork.createPartyNode(ALICE_NAME) - private val notaryNode = mockNetwork.defaultNotaryNode - private val serviceHubHandle = aliceNode.services + private var mockNetwork: MockNetwork? = null + private lateinit var aliceNode: StartedMockNode + private lateinit var notaryNode: StartedMockNode + private lateinit var serviceHubHandle: ServiceHub private val createdStateRefs = mutableListOf() private const val numObjectsInLedger = DEFAULT_PAGE_SIZE + 1 @BeforeClass @JvmStatic fun setup() { + mockNetwork = MockNetwork( + MockNetworkParameters( + cordappsForAllNodes = cordappsForPackages( + listOf( + "net.corda.node.services.vault" + ) + ) + ) + ).also { mockNetwork -> + aliceNode = mockNetwork.createPartyNode(ALICE_NAME) + notaryNode = mockNetwork.defaultNotaryNode + serviceHubHandle = aliceNode.services + } repeat(numObjectsInLedger) { index -> createdStateRefs.add(addSimpleObjectToLedger(DummyData(index))) } @@ -58,6 +66,13 @@ class VaultQueryJoinTest { System.setProperty("net.corda.vault.query.disable.corda3879", "false"); } + @AfterClass + @JvmStatic + fun teardown() { + mockNetwork?.stopNodes() + mockNetwork = null + } + private fun addSimpleObjectToLedger(dummyObject: DummyData): StateRef { val tx = TransactionBuilder(notaryNode.info.legalIdentities.first()) tx.addOutputState( From d8eb1171048dedc83cd058fa7f4d9736b06dadda Mon Sep 17 00:00:00 2001 From: filipesoliveira Date: Thu, 20 Aug 2020 16:46:41 +0100 Subject: [PATCH 20/25] Fixed an issue caused by the irs-demo project that would prevent builds from succeed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build command that would fail every time: “./gradlew clean build slowIntegrationTest”. Notes: The evaluationDependsOn lines inside the build.gradle file under the irs-demo folder where moved above the dependencies for best practices and to avoid weird errors. The archiveClassifier added to the build.gradle file under irs-demo/web folder is the actual fix. The archive classifier accepts a string that is appended to the jar file. By changing the filename of the jar, Boot Spring is prevented from overwriting the jar and causing build issues. --- samples/irs-demo/build.gradle | 6 +++--- samples/irs-demo/web/build.gradle | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index 7628bf32bc..85a55fd6a3 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -50,6 +50,9 @@ repositories { } } +evaluationDependsOn("cordapp") +evaluationDependsOn("web") + dependencies { compile "commons-io:commons-io:$commons_io_version" compile project(":samples:irs-demo:web") @@ -84,9 +87,6 @@ task slowIntegrationTest(type: Test, dependsOn: []) { classpath = sourceSets.slowIntegrationTest.runtimeClasspath } -evaluationDependsOn("cordapp") -evaluationDependsOn("web") - task systemTest(type: Test, dependsOn: ["cordapp:prepareDockerNodes", "web:generateDockerCompose"]) { testClassesDirs = sourceSets.systemTest.output.classesDirs classpath = sourceSets.systemTest.runtimeClasspath diff --git a/samples/irs-demo/web/build.gradle b/samples/irs-demo/web/build.gradle index c7f130691c..8064af4347 100644 --- a/samples/irs-demo/web/build.gradle +++ b/samples/irs-demo/web/build.gradle @@ -92,6 +92,7 @@ dependencies { jar { from sourceSets.main.output dependsOn clientInstall + archiveClassifier = 'thin' } def docker_dir = file("$project.buildDir/docker") From b2cb0cc51a56f12b7a5c48d1baf77a9f281308aa Mon Sep 17 00:00:00 2001 From: Razvan Codreanu <52859362+Schife@users.noreply.github.com> Date: Fri, 21 Aug 2020 11:18:54 +0100 Subject: [PATCH 21/25] INFRA-608 Split out regression test stage (#6619) Split out regression test stage to reduce fragility --- .ci/dev/regression/Jenkinsfile | 34 +++++++++++++++++++++++++++++++--- build.gradle | 9 ++------- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index fe155dd2f8..c971361c5c 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -114,7 +114,9 @@ pipeline { "-Ddocker.container.env.parameter.CORDA_ARTIFACTORY_USERNAME=\"\${ARTIFACTORY_CREDENTIALS_USR}\" " + "-Ddocker.container.env.parameter.CORDA_ARTIFACTORY_PASSWORD=\"\${ARTIFACTORY_CREDENTIALS_PSW}\" " + "-Ddocker.build.tag=\"\${DOCKER_TAG_TO_USE}\"" + - " clean preAllocateForParallelRegressionTest preAllocateForAllParallelSlowIntegrationTest pushBuildImage --stacktrace" + " clean preAllocateForAllParallelUnitTest preAllocateForAllParallelIntegrationTest " + + " preAllocateForAllParallelSlowIntegrationTest preAllocateForAllParallelSmokeTest " + + " pushBuildImage --stacktrace" } sh "kubectl auth can-i get pods" } @@ -122,7 +124,7 @@ pipeline { stage('Testing phase') { parallel { - stage('Regression Test') { + stage('Unit Test') { steps { sh "./gradlew " + "-DbuildId=\"\${BUILD_ID}\" " + @@ -132,7 +134,33 @@ pipeline { "-Dartifactory.password=\"\${ARTIFACTORY_CREDENTIALS_PSW}\" " + "-Dgit.branch=\"\${GIT_BRANCH}\" " + "-Dgit.target.branch=\"\${GIT_BRANCH}\" " + - " parallelRegressionTest --stacktrace" + " allParallelUnitTest --stacktrace" + } + } + stage('Integration Test') { + steps { + sh "./gradlew " + + "-DbuildId=\"\${BUILD_ID}\" " + + "-Dkubenetize=true " + + "-Ddocker.run.tag=\"\${DOCKER_TAG_TO_USE}\" " + + "-Dartifactory.username=\"\${ARTIFACTORY_CREDENTIALS_USR}\" " + + "-Dartifactory.password=\"\${ARTIFACTORY_CREDENTIALS_PSW}\" " + + "-Dgit.branch=\"\${GIT_BRANCH}\" " + + "-Dgit.target.branch=\"\${GIT_BRANCH}\" " + + " allParallelIntegrationTest --stacktrace" + } + } + stage('Smoke Test') { + steps { + sh "./gradlew " + + "-DbuildId=\"\${BUILD_ID}\" " + + "-Dkubenetize=true " + + "-Ddocker.run.tag=\"\${DOCKER_TAG_TO_USE}\" " + + "-Dartifactory.username=\"\${ARTIFACTORY_CREDENTIALS_USR}\" " + + "-Dartifactory.password=\"\${ARTIFACTORY_CREDENTIALS_PSW}\" " + + "-Dgit.branch=\"\${GIT_BRANCH}\" " + + "-Dgit.target.branch=\"\${GIT_BRANCH}\" " + + " allParallelSmokeTest --stacktrace" } } stage('Slow Integration Test') { diff --git a/build.gradle b/build.gradle index 7224ccc8f9..fcacad11a4 100644 --- a/build.gradle +++ b/build.gradle @@ -753,19 +753,14 @@ distributedTesting { profile 'generalPurpose.yml' distribution DistributeTestsBy.METHOD } - parallelRegressionTest { - testGroups 'test', 'integrationTest', 'smokeTest' - profile 'generalPurpose.yml' - distribution DistributeTestsBy.METHOD - } allParallelSmokeTest { testGroups 'smokeTest' - profile 'generalPurpose.yml' + profile 'regression.yml' distribution DistributeTestsBy.METHOD } allParallelSlowIntegrationTest { testGroups 'slowIntegrationTest' - profile 'generalPurpose.yml' + profile 'regression.yml' distribution DistributeTestsBy.METHOD } } From 133e6fe39a7c309e8e611ca889fdd72a0129d526 Mon Sep 17 00:00:00 2001 From: William Vigor <58432369+williamvigorr3@users.noreply.github.com> Date: Mon, 24 Aug 2020 12:59:51 +0100 Subject: [PATCH 22/25] CORDA-4001 Verify Paused Checkpoints on Node Startup (#6655) We should check that PAUSED Checkpoints can be deserialised on node startup as we do for RUNNABLE checkpoints. Otherwise a user might get into trouble if they update the CorDapp. --- ...owCheckpointVersionNodeStartupCheckTest.kt | 67 ++++++++++++++----- .../corda/node/internal/CheckpointVerifier.kt | 5 +- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/flows/FlowCheckpointVersionNodeStartupCheckTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/flows/FlowCheckpointVersionNodeStartupCheckTest.kt index 0cb4c7fd77..87175bb06d 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/flows/FlowCheckpointVersionNodeStartupCheckTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/flows/FlowCheckpointVersionNodeStartupCheckTest.kt @@ -10,11 +10,13 @@ import net.corda.core.messaging.startFlow import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.unwrap import net.corda.node.internal.CheckpointIncompatibleException +import net.corda.node.services.statemachine.Checkpoint import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.BOB_NAME import net.corda.testing.core.singleIdentity import net.corda.testing.driver.DriverDSL import net.corda.testing.driver.DriverParameters +import net.corda.testing.driver.NodeHandle import net.corda.testing.driver.NodeParameters import net.corda.testing.driver.driver import net.corda.testing.node.internal.assertUncompletedCheckpoints @@ -32,7 +34,7 @@ class FlowCheckpointVersionNodeStartupCheckTest { } @Test(timeout=300_000) - fun `restart node with mismatch between suspended flow and installed CorDapps`() { + fun `restart node with mismatch between suspended flow and installed CorDapps`() { driver(DriverParameters( startNodesInProcess = false, inMemoryDB = false, // Ensure database is persisted between node restarts so we can keep suspended flows @@ -40,7 +42,44 @@ class FlowCheckpointVersionNodeStartupCheckTest { notarySpecs = emptyList(), allowHibernateToManageAppSchema = false )) { - createSuspendedFlowInBob() + val (bob, _) = createSuspendedFlowInBob() + bob.stop() + restartBobWithMismatchedCorDapp() + } + } + + @Test(timeout=300_000) + fun `restart node with mismatch between suspended paused flow and installed CorDapps`() { + driver(DriverParameters( + startNodesInProcess = false, + inMemoryDB = false, // Ensure database is persisted between node restarts so we can keep suspended flows + cordappsForAllNodes = emptyList(), + notarySpecs = emptyList(), + allowHibernateToManageAppSchema = false + )) { + val (bob, flowId) = createSuspendedFlowInBob() + val flow = bob.rpc.startFlow(::UpdateStatusToPaused, flowId) + flow.returnValue.getOrThrow() + bob.stop() + restartBobWithMismatchedCorDapp() + } + } + + private fun DriverDSL.createSuspendedFlowInBob(): Pair { + val (alice, bob) = listOf( + startNode(providedName = ALICE_NAME), + startNode(NodeParameters(providedName = BOB_NAME, additionalCordapps = listOf(defaultCordapp))) + ).map { it.getOrThrow() } + + alice.stop() // Stop Alice so that Bob never receives the message + + val flowId = bob.rpc.startFlow(FlowCheckpointVersionNodeStartupCheckTest::ReceiverFlow, alice.nodeInfo.singleIdentity()).id + // Wait until Bob's flow has started + bob.rpc.stateMachinesFeed().let { it.updates.map { it.id }.startWith(it.snapshot.map { it.id }) }.toBlocking().first() + return Pair(bob, flowId) + } + + fun DriverDSL.restartBobWithMismatchedCorDapp() { val cordappsDir = baseDirectory(BOB_NAME) / "cordapps" // Test the scenerio where the CorDapp no longer exists @@ -58,21 +97,6 @@ class FlowCheckpointVersionNodeStartupCheckTest { // The part of the log message generated by CheckpointIncompatibleException.FlowVersionIncompatibleException "that is incompatible with the current installed version of" ) - } - } - - private fun DriverDSL.createSuspendedFlowInBob() { - val (alice, bob) = listOf( - startNode(providedName = ALICE_NAME), - startNode(NodeParameters(providedName = BOB_NAME, additionalCordapps = listOf(defaultCordapp))) - ).map { it.getOrThrow() } - - alice.stop() // Stop Alice so that Bob never receives the message - - bob.rpc.startFlow(FlowCheckpointVersionNodeStartupCheckTest::ReceiverFlow, alice.nodeInfo.singleIdentity()) - // Wait until Bob's flow has started - bob.rpc.stateMachinesFeed().let { it.updates.map { it.id }.startWith(it.snapshot.map { it.id }) }.toBlocking().first() - bob.stop() } private fun DriverDSL.assertBobFailsToStartWithLogMessage(logMessage: String) { @@ -107,4 +131,13 @@ class FlowCheckpointVersionNodeStartupCheckTest { @Suspendable override fun call() = otherSide.send("Hello!") } + + @StartableByRPC + class UpdateStatusToPaused(private val id: StateMachineRunId): FlowLogic() { + @Suspendable + override fun call() { + val statement = "Update node_checkpoints set status = ${Checkpoint.FlowStatus.PAUSED.ordinal} where flow_id = '${id.uuid}'" + serviceHub.jdbcSession().prepareStatement(statement).execute() + } + } } diff --git a/node/src/main/kotlin/net/corda/node/internal/CheckpointVerifier.kt b/node/src/main/kotlin/net/corda/node/internal/CheckpointVerifier.kt index 5042e2e9ff..052de0ab3c 100644 --- a/node/src/main/kotlin/net/corda/node/internal/CheckpointVerifier.kt +++ b/node/src/main/kotlin/net/corda/node/internal/CheckpointVerifier.kt @@ -6,6 +6,7 @@ import net.corda.core.flows.FlowLogic import net.corda.core.node.ServiceHub import net.corda.core.serialization.internal.CheckpointSerializationDefaults import net.corda.node.services.api.CheckpointStorage +import net.corda.node.services.statemachine.Checkpoint import net.corda.node.services.statemachine.SubFlow import net.corda.node.services.statemachine.SubFlowVersion import net.corda.serialization.internal.CheckpointSerializeAsTokenContextImpl @@ -13,6 +14,8 @@ import net.corda.serialization.internal.withTokenContext object CheckpointVerifier { + private val statusToVerify = setOf(Checkpoint.FlowStatus.RUNNABLE, Checkpoint.FlowStatus.HOSPITALIZED, Checkpoint.FlowStatus.PAUSED) + /** * Verifies that all Checkpoints stored in the db can be safely loaded with the currently installed version. * @throws CheckpointIncompatibleException if any offending checkpoint is found. @@ -35,7 +38,7 @@ object CheckpointVerifier { val cordappsByHash = currentCordapps.associateBy { it.jarHash } - checkpointStorage.getCheckpointsToRun().use { + checkpointStorage.getCheckpoints(statusToVerify).use { it.forEach { (_, serializedCheckpoint) -> val checkpoint = try { serializedCheckpoint.deserialize(checkpointSerializationContext) From df7e3ca184189970e112c601f868f72eb509355a Mon Sep 17 00:00:00 2001 From: Joseph Zuniga-Daly <59851625+josephzunigadaly@users.noreply.github.com> Date: Mon, 24 Aug 2020 14:32:10 +0100 Subject: [PATCH 23/25] CORDA-3908: Update corda-4.5 .ci/api-current.txt to match the previous release (corda-4.4) (#6648) * CORDA-3908: Update corda-4.5 .ci/api-current.txt to match the previous release (corda-4.4) * Reapply changes from PR 5998 https://github.com/corda/corda/pull/5998 --- .ci/api-current.txt | 550 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 550 insertions(+) diff --git a/.ci/api-current.txt b/.ci/api-current.txt index 64e351610e..e60d7ef22c 100644 --- a/.ci/api-current.txt +++ b/.ci/api-current.txt @@ -478,6 +478,8 @@ public interface net.corda.core.contracts.Attachment extends net.corda.core.cont public interface net.corda.core.contracts.AttachmentConstraint public abstract boolean isSatisfiedBy(net.corda.core.contracts.Attachment) ## +public final class net.corda.core.contracts.AttachmentConstraintKt extends java.lang.Object +## @CordaSerializable public final class net.corda.core.contracts.AttachmentResolutionException extends net.corda.core.flows.FlowException public (net.corda.core.crypto.SecureHash) @@ -500,6 +502,12 @@ public @interface net.corda.core.contracts.BelongsToContract public abstract Class value() ## @CordaSerializable +public final class net.corda.core.contracts.BrokenAttachmentException extends net.corda.core.flows.FlowException + public (net.corda.core.crypto.SecureHash, String, Throwable) + @NotNull + public final net.corda.core.crypto.SecureHash getAttachmentId() +## +@CordaSerializable public final class net.corda.core.contracts.Command extends java.lang.Object public (T, java.security.PublicKey) public (T, java.util.List) @@ -569,6 +577,7 @@ public interface net.corda.core.contracts.Contract public abstract void verify(net.corda.core.transactions.LedgerTransaction) ## @DoNotImplement +@CordaSerializable public final class net.corda.core.contracts.ContractAttachment extends java.lang.Object implements net.corda.core.contracts.Attachment public (net.corda.core.contracts.Attachment, String) public (net.corda.core.contracts.Attachment, String, java.util.Set) @@ -647,6 +656,11 @@ public final class net.corda.core.contracts.HashAttachmentConstraint extends jav public boolean isSatisfiedBy(net.corda.core.contracts.Attachment) @NotNull public String toString() + public static final net.corda.core.contracts.HashAttachmentConstraint$Companion Companion +## +public static final class net.corda.core.contracts.HashAttachmentConstraint$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) + public final boolean getDisableHashConstraints() ## @CordaSerializable public final class net.corda.core.contracts.InsufficientBalanceException extends net.corda.core.flows.FlowException @@ -675,15 +689,20 @@ public final class net.corda.core.contracts.Issued extends java.lang.Object public @interface net.corda.core.contracts.LegalProseReference public abstract String uri() ## +@DoNotImplement @CordaSerializable public final class net.corda.core.contracts.LinearPointer extends net.corda.core.contracts.StatePointer + @DeprecatedConstructorForDeserialization public (net.corda.core.contracts.UniqueIdentifier, Class) + public (net.corda.core.contracts.UniqueIdentifier, Class, boolean) + public (net.corda.core.contracts.UniqueIdentifier, Class, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public boolean equals(Object) @NotNull public net.corda.core.contracts.UniqueIdentifier getPointer() @NotNull public Class getType() public int hashCode() + public boolean isResolved() @NotNull public net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull @@ -871,6 +890,7 @@ public final class net.corda.core.contracts.StateAndRef extends java.lang.Object @NotNull public String toString() ## +@DoNotImplement @CordaSerializable public abstract class net.corda.core.contracts.StatePointer extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -878,10 +898,15 @@ public abstract class net.corda.core.contracts.StatePointer extends java.lang.Ob public abstract Object getPointer() @NotNull public abstract Class getType() + public abstract boolean isResolved() @NotNull public abstract net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull public abstract net.corda.core.contracts.StateAndRef resolve(net.corda.core.transactions.LedgerTransaction) + public static final net.corda.core.contracts.StatePointer$Companion Companion +## +public static final class net.corda.core.contracts.StatePointer$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) ## @CordaSerializable public final class net.corda.core.contracts.StateRef extends java.lang.Object @@ -899,15 +924,20 @@ public final class net.corda.core.contracts.StateRef extends java.lang.Object @NotNull public String toString() ## +@DoNotImplement @CordaSerializable public final class net.corda.core.contracts.StaticPointer extends net.corda.core.contracts.StatePointer + @DeprecatedConstructorForDeserialization public (net.corda.core.contracts.StateRef, Class) + public (net.corda.core.contracts.StateRef, Class, boolean) + public (net.corda.core.contracts.StateRef, Class, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public boolean equals(Object) @NotNull public net.corda.core.contracts.StateRef getPointer() @NotNull public Class getType() public int hashCode() + public boolean isResolved() @NotNull public net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull @@ -1010,12 +1040,17 @@ public final class net.corda.core.contracts.TransactionState extends java.lang.O ## public final class net.corda.core.contracts.TransactionStateKt extends java.lang.Object ## +@CordaSerializable public abstract class net.corda.core.contracts.TransactionVerificationException extends net.corda.core.flows.FlowException public (net.corda.core.crypto.SecureHash, String, Throwable) @NotNull public final net.corda.core.crypto.SecureHash getTxId() ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$BrokenTransactionException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) +## +@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ConflictingAttachmentsRejection extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, String) @NotNull @@ -1023,6 +1058,7 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ConstraintPropagationRejection extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, String, net.corda.core.contracts.AttachmentConstraint, net.corda.core.contracts.AttachmentConstraint) @NotNull public final String getContractClass() @@ -1035,6 +1071,7 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ContractCreationError extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String, Throwable) public (net.corda.core.crypto.SecureHash, String, Throwable, String) @NotNull public final String getContractClass() @@ -1052,12 +1089,32 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public static net.corda.core.contracts.TransactionVerificationException$Direction[] values() ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$DuplicateAttachmentsRejection extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.Attachment) + @NotNull + public final net.corda.core.contracts.Attachment getAttachmentId() +## +@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$DuplicateInputStates extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, net.corda.core.utilities.NonEmptySet) @NotNull public final net.corda.core.utilities.NonEmptySet getDuplicates() ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$InvalidAttachmentException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, net.corda.core.crypto.SecureHash) + @NotNull + public final net.corda.core.crypto.SecureHash getAttachmentHash() +## +@CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$InvalidConstraintRejection extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String, String) + @NotNull + public final String getContractClass() + @NotNull + public final String getReason() +## +@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$InvalidNotaryChange extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash) ## @@ -1068,6 +1125,11 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public final String getContractClass() ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$MissingNetworkParametersException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) + public (net.corda.core.crypto.SecureHash, net.corda.core.crypto.SecureHash) +## +@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$MoreThanOneNotary extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash) ## @@ -1082,6 +1144,8 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$OverlappingAttachmentsException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, String) + @NotNull + public final String getPath() ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$PackageOwnershipException extends net.corda.core.contracts.TransactionVerificationException @@ -1101,11 +1165,13 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionContractConflictException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.TransactionState, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionDuplicateEncumbranceException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, int) + public (net.corda.core.crypto.SecureHash, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionMissingEncumbranceException extends net.corda.core.contracts.TransactionVerificationException @@ -1115,18 +1181,34 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public final int getMissing() ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNetworkParameterOrderingException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) + public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.StateRef, net.corda.core.node.NetworkParameters, net.corda.core.node.NetworkParameters) +## +@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNonMatchingEncumbranceException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, java.util.Collection) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNotaryMismatchEncumbranceException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, int, int, net.corda.core.identity.Party, net.corda.core.identity.Party) + public (net.corda.core.crypto.SecureHash, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionRequiredContractUnspecifiedException extends net.corda.core.contracts.TransactionVerificationException + public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.TransactionState) ## @CordaSerializable +public static final class net.corda.core.contracts.TransactionVerificationException$UntrustedAttachmentsException extends net.corda.core.CordaException + public (net.corda.core.crypto.SecureHash, java.util.List) + @NotNull + public final java.util.List getIds() + @NotNull + public final net.corda.core.crypto.SecureHash getTxId() +## +@CordaSerializable public abstract class net.corda.core.contracts.TypeOnlyCommandData extends java.lang.Object implements net.corda.core.contracts.CommandData public () public boolean equals(Object) @@ -1367,6 +1449,48 @@ public final class net.corda.core.cordapp.CordappContext extends java.lang.Objec public static final class net.corda.core.cordapp.CordappContext$Companion extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) ## +@CordaSerializable +public final class net.corda.core.cordapp.CordappInfo extends java.lang.Object + public (String, String, String, int, int, String, String, String, net.corda.core.crypto.SecureHash$SHA256) + @NotNull + public final String component1() + @NotNull + public final String component2() + @NotNull + public final String component3() + public final int component4() + public final int component5() + @NotNull + public final String component6() + @NotNull + public final String component7() + @NotNull + public final String component8() + @NotNull + public final net.corda.core.crypto.SecureHash$SHA256 component9() + @NotNull + public final net.corda.core.cordapp.CordappInfo copy(String, String, String, int, int, String, String, String, net.corda.core.crypto.SecureHash$SHA256) + public boolean equals(Object) + @NotNull + public final net.corda.core.crypto.SecureHash$SHA256 getJarHash() + @NotNull + public final String getLicence() + public final int getMinimumPlatformVersion() + @NotNull + public final String getName() + @NotNull + public final String getShortName() + public final int getTargetPlatformVersion() + @NotNull + public final String getType() + @NotNull + public final String getVendor() + @NotNull + public final String getVersion() + public int hashCode() + @NotNull + public String toString() +## @DoNotImplement public interface net.corda.core.cordapp.CordappProvider @NotNull @@ -1528,6 +1652,8 @@ public final class net.corda.core.crypto.CordaObjectIdentifier extends java.lang ## public final class net.corda.core.crypto.CordaSecurityProvider extends java.security.Provider public () + @Nullable + public java.security.Provider$Service getService(String, String) public static final net.corda.core.crypto.CordaSecurityProvider$Companion Companion @NotNull public static final String PROVIDER_NAME = "Corda" @@ -1680,6 +1806,9 @@ public static class net.corda.core.crypto.DigitalSignature$WithKey extends net.c @NotNull public final net.corda.core.crypto.DigitalSignature withoutKey() ## +public final class net.corda.core.crypto.DummySecureRandom extends java.security.SecureRandom + public static final net.corda.core.crypto.DummySecureRandom INSTANCE +## public abstract class net.corda.core.crypto.MerkleTree extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @NotNull @@ -1860,6 +1989,8 @@ public static final class net.corda.core.crypto.SecureHash$Companion extends jav @CordaSerializable public static final class net.corda.core.crypto.SecureHash$SHA256 extends net.corda.core.crypto.SecureHash public (byte[]) + public boolean equals(Object) + public int hashCode() ## public final class net.corda.core.crypto.SecureHashKt extends java.lang.Object @NotNull @@ -2154,11 +2285,17 @@ public class net.corda.core.flows.DataVendingFlow extends net.corda.core.flows.F @Suspendable protected void verifyDataRequest(net.corda.core.internal.FetchDataFlow$Request$Data) ## +@DoNotImplement +public interface net.corda.core.flows.Destination +## @InitiatingFlow public final class net.corda.core.flows.FinalityFlow extends net.corda.core.flows.FlowLogic public (net.corda.core.transactions.SignedTransaction) public (net.corda.core.transactions.SignedTransaction, java.util.Collection) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, java.util.Collection, net.corda.core.utilities.ProgressTracker) + public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord) + public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord, net.corda.core.utilities.ProgressTracker) + public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord, net.corda.core.utilities.ProgressTracker, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.utilities.ProgressTracker) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.utilities.ProgressTracker, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.transactions.SignedTransaction, java.util.Set) @@ -2338,6 +2475,9 @@ public abstract class net.corda.core.flows.FlowLogic extends java.lang.Object public final net.corda.core.node.ServiceHub getServiceHub() @Suspendable @NotNull + public final net.corda.core.flows.FlowSession initiateFlow(net.corda.core.flows.Destination) + @Suspendable + @NotNull public final net.corda.core.flows.FlowSession initiateFlow(net.corda.core.identity.Party) @Suspendable public final void persistFlowStackSnapshot() @@ -2417,6 +2557,8 @@ public abstract class net.corda.core.flows.FlowSession extends java.lang.Object @Suspendable @NotNull public abstract net.corda.core.flows.FlowInfo getCounterpartyFlowInfo(boolean) + @NotNull + public abstract net.corda.core.flows.Destination getDestination() @Suspendable @NotNull public abstract net.corda.core.utilities.UntrustworthyData receive(Class) @@ -2472,6 +2614,13 @@ public static final class net.corda.core.flows.FlowStackSnapshot$Frame extends j @NotNull public String toString() ## +@CordaSerializable +public class net.corda.core.flows.HospitalizeFlowException extends net.corda.core.CordaRuntimeException + public () + public (String) + public (String, Throwable) + public (Throwable) +## public interface net.corda.core.flows.IdentifiableException @Nullable public Long getErrorId() @@ -2489,6 +2638,22 @@ public @interface net.corda.core.flows.InitiatingFlow public abstract int version() ## @CordaSerializable +public final class net.corda.core.flows.MaybeSerializedSignedTransaction extends java.lang.Object implements net.corda.core.contracts.NamedByHash + public (net.corda.core.crypto.SecureHash, net.corda.core.serialization.SerializedBytes, net.corda.core.transactions.SignedTransaction) + @Nullable + public final net.corda.core.transactions.SignedTransaction get() + @NotNull + public net.corda.core.crypto.SecureHash getId() + @Nullable + public final net.corda.core.transactions.SignedTransaction getNonSerialised() + @Nullable + public final net.corda.core.serialization.SerializedBytes getSerialized() + public final boolean isNull() + @NotNull + public final String payloadContentDescription() + public final int serializedByteCount() +## +@CordaSerializable public final class net.corda.core.flows.NotarisationPayload extends java.lang.Object public (Object, net.corda.core.flows.NotarisationRequestSignature) @NotNull @@ -2562,6 +2727,11 @@ public final class net.corda.core.flows.NotaryChangeFlow extends net.corda.core. @CordaSerializable public abstract class net.corda.core.flows.NotaryError extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) + public static final net.corda.core.flows.NotaryError$Companion Companion + public static final int NUM_STATES = 5 +## +public static final class net.corda.core.flows.NotaryError$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) ## @CordaSerializable public static final class net.corda.core.flows.NotaryError$Conflict extends net.corda.core.flows.NotaryError @@ -2668,6 +2838,10 @@ public final class net.corda.core.flows.NotaryFlow extends java.lang.Object public static class net.corda.core.flows.NotaryFlow$Client extends net.corda.core.internal.BackpressureAwareTimedFlow public (net.corda.core.transactions.SignedTransaction) public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker) + public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker, boolean) + public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.transactions.SignedTransaction, boolean) + public (net.corda.core.transactions.SignedTransaction, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) @Suspendable @NotNull public java.util.List call() @@ -2983,6 +3157,7 @@ public final class net.corda.core.identity.IdentityUtils extends java.lang.Objec public static final java.util.Map> groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, java.util.Collection) @NotNull public static final java.util.Map> groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, java.util.Collection, boolean) + public static final boolean x500Matches(String, boolean, net.corda.core.identity.CordaX500Name) ## @DoNotImplement @CordaSerializable @@ -3078,6 +3253,8 @@ public interface net.corda.core.messaging.CordaRPCOps extends net.corda.core.mes @NotNull public abstract net.corda.core.messaging.DataFeed networkParametersFeed() @NotNull + public abstract net.corda.core.node.NodeDiagnosticInfo nodeDiagnosticInfo() + @NotNull public abstract net.corda.core.node.NodeInfo nodeInfo() @Nullable public abstract net.corda.core.node.NodeInfo nodeInfoFromParty(net.corda.core.identity.AbstractParty) @@ -3381,10 +3558,23 @@ public static final class net.corda.core.messaging.StateMachineUpdate$Removed ex ## @DoNotImplement public interface net.corda.core.node.AppServiceHub extends net.corda.core.node.ServiceHub + @NotNull + public abstract net.corda.core.node.services.vault.CordaTransactionSupport getDatabase() + public abstract void register(int, kotlin.jvm.functions.Function1) + public abstract void register(int, net.corda.core.node.services.ServiceLifecycleObserver) @NotNull public abstract net.corda.core.messaging.FlowHandle startFlow(net.corda.core.flows.FlowLogic) @NotNull public abstract net.corda.core.messaging.FlowProgressHandle startTrackedFlow(net.corda.core.flows.FlowLogic) + public static final net.corda.core.node.AppServiceHub$Companion Companion + public static final int SERVICE_PRIORITY_HIGH = 200 + public static final int SERVICE_PRIORITY_LOW = 20 + public static final int SERVICE_PRIORITY_NORMAL = 100 +## +public static final class net.corda.core.node.AppServiceHub$Companion extends java.lang.Object + public static final int SERVICE_PRIORITY_HIGH = 200 + public static final int SERVICE_PRIORITY_LOW = 20 + public static final int SERVICE_PRIORITY_NORMAL = 100 ## public @interface net.corda.core.node.AutoAcceptable ## @@ -3435,6 +3625,34 @@ public final class net.corda.core.node.NetworkParameters extends java.lang.Objec public String toString() ## @CordaSerializable +public final class net.corda.core.node.NodeDiagnosticInfo extends java.lang.Object + public (String, String, int, String, java.util.List) + @NotNull + public final String component1() + @NotNull + public final String component2() + public final int component3() + @NotNull + public final String component4() + @NotNull + public final java.util.List component5() + @NotNull + public final net.corda.core.node.NodeDiagnosticInfo copy(String, String, int, String, java.util.List) + public boolean equals(Object) + @NotNull + public final java.util.List getCordapps() + public final int getPlatformVersion() + @NotNull + public final String getRevision() + @NotNull + public final String getVendor() + @NotNull + public final String getVersion() + public int hashCode() + @NotNull + public String toString() +## +@CordaSerializable public final class net.corda.core.node.NodeInfo extends java.lang.Object public (java.util.List, java.util.List, int, long) @NotNull @@ -3459,6 +3677,7 @@ public final class net.corda.core.node.NodeInfo extends java.lang.Object public final net.corda.core.identity.PartyAndCertificate identityAndCertFromX500Name(net.corda.core.identity.CordaX500Name) @NotNull public final net.corda.core.identity.Party identityFromX500Name(net.corda.core.identity.CordaX500Name) + public final boolean isLegalIdentity(net.corda.core.identity.CordaX500Name) public final boolean isLegalIdentity(net.corda.core.identity.Party) @NotNull public String toString() @@ -3502,6 +3721,8 @@ public interface net.corda.core.node.ServiceHub extends net.corda.core.node.Serv @NotNull public abstract net.corda.core.node.services.ContractUpgradeService getContractUpgradeService() @NotNull + public abstract net.corda.core.node.services.diagnostics.DiagnosticsService getDiagnosticsService() + @NotNull public abstract net.corda.core.node.services.KeyManagementService getKeyManagementService() @NotNull public abstract net.corda.core.node.NodeInfo getMyInfo() @@ -3550,6 +3771,8 @@ public interface net.corda.core.node.ServicesForResolution public abstract net.corda.core.contracts.TransactionState loadState(net.corda.core.contracts.StateRef) @NotNull public abstract java.util.Set> loadStates(java.util.Set) + @NotNull + public net.corda.core.transactions.LedgerTransaction specialise(net.corda.core.transactions.LedgerTransaction) ## public final class net.corda.core.node.StatesToRecord extends java.lang.Enum public static net.corda.core.node.StatesToRecord valueOf(String) @@ -3588,11 +3811,18 @@ public interface net.corda.core.node.services.ContractUpgradeService ## public @interface net.corda.core.node.services.CordaService ## +public final class net.corda.core.node.services.CordaServiceCriticalFailureException extends java.lang.Exception + public (String) + public (String, Throwable) +## @DoNotImplement public interface net.corda.core.node.services.IdentityService public abstract void assertOwnership(net.corda.core.identity.Party, net.corda.core.identity.AnonymousParty) @Nullable public abstract net.corda.core.identity.PartyAndCertificate certificateFromKey(java.security.PublicKey) + @Suspendable + @Nullable + public abstract java.util.UUID externalIdForPublicKey(java.security.PublicKey) @NotNull public abstract Iterable getAllIdentities() @NotNull @@ -3606,6 +3836,9 @@ public interface net.corda.core.node.services.IdentityService @Nullable public abstract net.corda.core.identity.Party partyFromKey(java.security.PublicKey) @NotNull + public abstract Iterable publicKeysForExternalId(java.util.UUID) + public abstract void registerKey(java.security.PublicKey, net.corda.core.identity.Party, java.util.UUID) + @NotNull public abstract net.corda.core.identity.Party requireWellKnownPartyFromAnonymous(net.corda.core.identity.AbstractParty) @Nullable public abstract net.corda.core.identity.PartyAndCertificate verifyAndRegisterIdentity(net.corda.core.identity.PartyAndCertificate) @@ -3615,6 +3848,9 @@ public interface net.corda.core.node.services.IdentityService public abstract net.corda.core.identity.Party wellKnownPartyFromAnonymous(net.corda.core.identity.AbstractParty) @Nullable public abstract net.corda.core.identity.Party wellKnownPartyFromX500Name(net.corda.core.identity.CordaX500Name) + public static final net.corda.core.node.services.IdentityService$Companion Companion +## +public static final class net.corda.core.node.services.IdentityService$Companion extends java.lang.Object ## @DoNotImplement public interface net.corda.core.node.services.KeyManagementService @@ -3625,7 +3861,13 @@ public interface net.corda.core.node.services.KeyManagementService public abstract java.security.PublicKey freshKey() @Suspendable @NotNull + public abstract java.security.PublicKey freshKey(java.util.UUID) + @Suspendable + @NotNull public abstract net.corda.core.identity.PartyAndCertificate freshKeyAndCert(net.corda.core.identity.PartyAndCertificate, boolean) + @Suspendable + @NotNull + public abstract net.corda.core.identity.PartyAndCertificate freshKeyAndCert(net.corda.core.identity.PartyAndCertificate, boolean, java.util.UUID) @NotNull public abstract java.util.Set getKeys() @Suspendable @@ -3768,6 +4010,10 @@ public static final class net.corda.core.node.services.PartyInfo$SingleNode exte @NotNull public String toString() ## +public final class net.corda.core.node.services.ServiceLifecycleEvent extends java.lang.Enum + public static net.corda.core.node.services.ServiceLifecycleEvent valueOf(String) + public static net.corda.core.node.services.ServiceLifecycleEvent[] values() +## public interface net.corda.core.node.services.ServiceLifecycleObserver public abstract void onServiceLifecycleEvent(net.corda.core.node.services.ServiceLifecycleEvent) ## @@ -3996,6 +4242,8 @@ public static final class net.corda.core.node.services.Vault$UpdateType extends @CordaSerializable public final class net.corda.core.node.services.VaultQueryException extends net.corda.core.flows.FlowException public (String) + public (String, Exception) + public (String, Exception, int, kotlin.jvm.internal.DefaultConstructorMarker) ## @DoNotImplement public interface net.corda.core.node.services.VaultService @@ -4045,6 +4293,34 @@ public interface net.corda.core.node.services.VaultService public final class net.corda.core.node.services.VaultServiceKt extends java.lang.Object public static final int MAX_CONSTRAINT_DATA_SIZE = 20000 ## +@DoNotImplement +public interface net.corda.core.node.services.diagnostics.DiagnosticsService + @NotNull + public abstract net.corda.core.node.services.diagnostics.NodeVersionInfo nodeVersionInfo() +## +public final class net.corda.core.node.services.diagnostics.NodeVersionInfo extends java.lang.Object + public (String, String, int, String) + @NotNull + public final String component1() + @NotNull + public final String component2() + public final int component3() + @NotNull + public final String component4() + @NotNull + public final net.corda.core.node.services.diagnostics.NodeVersionInfo copy(String, String, int, String) + public boolean equals(Object) + public final int getPlatformVersion() + @NotNull + public final String getReleaseVersion() + @NotNull + public final String getRevision() + @NotNull + public final String getVendor() + public int hashCode() + @NotNull + public String toString() +## @CordaSerializable public final class net.corda.core.node.services.vault.AggregateFunctionType extends java.lang.Enum public static net.corda.core.node.services.vault.AggregateFunctionType valueOf(String) @@ -4071,9 +4347,13 @@ public static final class net.corda.core.node.services.vault.AttachmentQueryCrit @CordaSerializable public static final class net.corda.core.node.services.vault.AttachmentQueryCriteria$AttachmentsQueryCriteria extends net.corda.core.node.services.vault.AttachmentQueryCriteria public () + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate>, net.corda.core.node.services.vault.ColumnPredicate>, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, int, kotlin.jvm.internal.DefaultConstructorMarker) @@ -4582,6 +4862,10 @@ public static final class net.corda.core.node.services.vault.ColumnPredicate$Nul @NotNull public String toString() ## +@DoNotImplement +public interface net.corda.core.node.services.vault.CordaTransactionSupport + public abstract T transaction(kotlin.jvm.functions.Function1) +## @CordaSerializable public abstract class net.corda.core.node.services.vault.CriteriaExpression extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -4779,6 +5063,10 @@ public abstract static class net.corda.core.node.services.vault.QueryCriteria$Co @Nullable public abstract java.util.Set> getContractStateTypes() @Nullable + public java.util.List getExactParticipants() + @NotNull + public java.util.List getExternalIds() + @Nullable public java.util.List getParticipants() @NotNull public net.corda.core.node.services.Vault$RelevancyStatus getRelevancyStatus() @@ -4789,17 +5077,30 @@ public abstract static class net.corda.core.node.services.vault.QueryCriteria$Co ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria + @DeprecatedConstructorForDeserialization public () + @DeprecatedConstructorForDeserialization public (java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) + public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final java.util.List component1() @Nullable @@ -4816,14 +5117,20 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi public final java.util.Set> component7() @NotNull public final net.corda.core.node.services.Vault$RelevancyStatus component8() + @Nullable + public final java.util.List component9() @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) + @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) public boolean equals(Object) @Nullable public java.util.Set> getContractStateTypes() @Nullable + public java.util.List getExactParticipants() + @Nullable public final java.util.List getIssuer() @Nullable public final java.util.List getIssuerRef() @@ -4845,6 +5152,8 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withContractStateTypes(java.util.Set>) @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withExactParticipants(java.util.List) + @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withIssuer(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withOwner(java.util.List) @@ -4905,18 +5214,33 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria + @DeprecatedConstructorForDeserialization public () + @DeprecatedConstructorForDeserialization public (java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) + public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) + @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final java.util.List component1() @@ -4930,14 +5254,20 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Linea public final java.util.Set> component5() @NotNull public final net.corda.core.node.services.Vault$RelevancyStatus component6() + @Nullable + public final java.util.List component7() @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) + @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) public boolean equals(Object) @Nullable public java.util.Set> getContractStateTypes() @Nullable + public java.util.List getExactParticipants() + @Nullable public final java.util.List getExternalId() @Nullable public java.util.List getParticipants() @@ -4955,6 +5285,8 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Linea @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withContractStateTypes(java.util.Set>) @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withExactParticipants(java.util.List) + @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withExternalId(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withParticipants(java.util.List) @@ -5024,9 +5356,13 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$TimeI ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$VaultCustomQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) @@ -5068,19 +5404,38 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria public () + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List) + @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) + @DeprecatedConstructorForDeserialization + public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List) + @DeprecatedConstructorForDeserialization + public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List) + public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.core.node.services.Vault$StateStatus component1() @Nullable public final java.util.List component10() + @NotNull + public final java.util.List component11() + @Nullable + public final java.util.List component12() @Nullable public final java.util.Set> component2() @Nullable @@ -5101,6 +5456,10 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List) + @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List) + @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List) public boolean equals(Object) @NotNull public java.util.Set getConstraintTypes() @@ -5109,6 +5468,10 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @Nullable public java.util.Set> getContractStateTypes() @Nullable + public java.util.List getExactParticipants() + @NotNull + public java.util.List getExternalIds() + @Nullable public final java.util.List getNotary() @Nullable public java.util.List getParticipants() @@ -5134,6 +5497,10 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withContractStateTypes(java.util.Set>) @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withExactParticipants(java.util.List) + @NotNull + public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withExternalIds(java.util.List) + @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withNotary(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withParticipants(java.util.List) @@ -5162,6 +5529,11 @@ public final class net.corda.core.node.services.vault.QueryCriteriaUtils extends public static final int DEFAULT_PAGE_SIZE = 200 public static final int MAX_PAGE_SIZE = 2147483646 ## +@DoNotImplement +public interface net.corda.core.node.services.vault.SessionScope + @NotNull + public abstract org.hibernate.Session getSession() +## @CordaSerializable public final class net.corda.core.node.services.vault.Sort extends net.corda.core.node.services.vault.BaseSort public (java.util.Collection) @@ -5274,6 +5646,10 @@ public static final class net.corda.core.node.services.vault.SortAttribute$Stand @NotNull public String toString() ## +public final class net.corda.core.observable.Observables extends java.lang.Object + @NotNull + public static final rx.Observable continueOnError(rx.Observable) +## public final class net.corda.core.schemas.CommonSchema extends java.lang.Object public static final net.corda.core.schemas.CommonSchema INSTANCE ## @@ -5464,6 +5840,7 @@ public final class net.corda.core.serialization.SerializationAPIKt extends java. ## @DoNotImplement public interface net.corda.core.serialization.SerializationContext + public abstract boolean getCarpenterDisabled() @NotNull public abstract java.util.Set> getCustomSerializers() @NotNull @@ -5504,6 +5881,8 @@ public interface net.corda.core.serialization.SerializationContext @NotNull public abstract net.corda.core.serialization.SerializationContext withWhitelisted(Class) @NotNull + public abstract net.corda.core.serialization.SerializationContext withoutCarpenter() + @NotNull public abstract net.corda.core.serialization.SerializationContext withoutReferences() ## public static final class net.corda.core.serialization.SerializationContext$UseCase extends java.lang.Enum @@ -5706,6 +6085,7 @@ public static final class net.corda.core.transactions.ContractUpgradeFilteredTra @DoNotImplement public final class net.corda.core.transactions.ContractUpgradeLedgerTransaction extends net.corda.core.transactions.FullTransaction implements net.corda.core.transactions.TransactionWithSignatures public (java.util.List>, net.corda.core.identity.Party, net.corda.core.contracts.Attachment, String, net.corda.core.contracts.Attachment, net.corda.core.crypto.SecureHash, net.corda.core.contracts.PrivacySalt, java.util.List, net.corda.core.node.NetworkParameters) + public (java.util.List, net.corda.core.identity.Party, net.corda.core.contracts.Attachment, net.corda.core.contracts.Attachment, net.corda.core.crypto.SecureHash, net.corda.core.contracts.PrivacySalt, java.util.List, net.corda.core.node.NetworkParameters, net.corda.core.contracts.UpgradedContract, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final java.util.List> component1() @NotNull @@ -5756,6 +6136,10 @@ public final class net.corda.core.transactions.ContractUpgradeLedgerTransaction public int hashCode() @NotNull public String toString() + public static final net.corda.core.transactions.ContractUpgradeLedgerTransaction$Companion Companion +## +public static final class net.corda.core.transactions.ContractUpgradeLedgerTransaction$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) ## @DoNotImplement @CordaSerializable @@ -5889,6 +6273,7 @@ public abstract class net.corda.core.transactions.FullTransaction extends net.co public final class net.corda.core.transactions.LedgerTransaction extends net.corda.core.transactions.FullTransaction public (java.util.List>, java.util.List>, java.util.List>, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt) public (java.util.List>, java.util.List>, java.util.List>, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt, net.corda.core.node.NetworkParameters) + public (java.util.List, java.util.List, java.util.List, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt, net.corda.core.node.NetworkParameters, java.util.List, java.util.List, java.util.List, java.util.List, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final java.util.List> commandsOfType(Class) @NotNull @@ -6204,6 +6589,7 @@ public final class net.corda.core.transactions.SignedTransaction extends java.la public final net.corda.core.transactions.SignedTransaction withAdditionalSignatures(Iterable) public static final net.corda.core.transactions.SignedTransaction$Companion Companion ## +@CordaSerializable public static final class net.corda.core.transactions.SignedTransaction$SignaturesMissingException extends java.security.SignatureException implements net.corda.core.CordaThrowable, net.corda.core.contracts.NamedByHash public (java.util.Set, java.util.List, net.corda.core.crypto.SecureHash) public void addSuppressed(Throwable[]) @@ -6251,6 +6637,8 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, String, net.corda.core.identity.Party, Integer, net.corda.core.contracts.AttachmentConstraint) @NotNull + public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, net.corda.core.contracts.AttachmentConstraint) + @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, net.corda.core.identity.Party) @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.TransactionState) @@ -6497,6 +6885,8 @@ public final class net.corda.core.utilities.KotlinUtilsKt extends java.lang.Obje @NotNull public static final org.slf4j.Logger contextLogger(Object) public static final void debug(org.slf4j.Logger, kotlin.jvm.functions.Function0) + @NotNull + public static final org.slf4j.Logger detailedLogger() public static final int exactAdd(int, int) public static final long exactAdd(long, long) @NotNull @@ -6643,6 +7033,7 @@ public final class net.corda.core.utilities.ProgressTracker extends java.lang.Ob public final net.corda.core.utilities.ProgressTracker$Step nextStep() public final void setChildProgressTracker(net.corda.core.utilities.ProgressTracker$Step, net.corda.core.utilities.ProgressTracker) public final void setCurrentStep(net.corda.core.utilities.ProgressTracker$Step) + public static final net.corda.core.utilities.ProgressTracker$Companion Companion ## @CordaSerializable public abstract static class net.corda.core.utilities.ProgressTracker$Change extends java.lang.Object @@ -6719,12 +7110,14 @@ public static class net.corda.core.utilities.ProgressTracker$Step extends java.l public (String) @Nullable public net.corda.core.utilities.ProgressTracker childProgressTracker() + public boolean equals(Object) @NotNull public rx.Observable getChanges() @NotNull public java.util.Map getExtraAuditData() @NotNull public String getLabel() + public int hashCode() ## @CordaSerializable public static final class net.corda.core.utilities.ProgressTracker$UNSTARTED extends net.corda.core.utilities.ProgressTracker$Step @@ -6734,6 +7127,10 @@ public static final class net.corda.core.utilities.ProgressTracker$UNSTARTED ext public interface net.corda.core.utilities.PropertyDelegate public abstract T getValue(Object, kotlin.reflect.KProperty) ## +public final class net.corda.core.utilities.SgxSupport extends java.lang.Object + public static final boolean isInsideEnclave() + public static final net.corda.core.utilities.SgxSupport INSTANCE +## @CordaSerializable public abstract class net.corda.core.utilities.Try extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -6913,6 +7310,10 @@ public final class net.corda.testing.contracts.DummyContractV2 extends java.lang @NotNull public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint() @NotNull + public static final net.corda.core.transactions.TransactionBuilder move(java.util.List>, net.corda.core.identity.AbstractParty) + @NotNull + public static final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef, net.corda.core.identity.AbstractParty) + @NotNull public net.corda.testing.contracts.DummyContractV2$State upgrade(net.corda.testing.contracts.DummyContract$State) public void verify(net.corda.core.transactions.LedgerTransaction) public static final net.corda.testing.contracts.DummyContractV2$Companion Companion @@ -6929,6 +7330,10 @@ public static final class net.corda.testing.contracts.DummyContractV2$Commands$M ## public static final class net.corda.testing.contracts.DummyContractV2$Companion extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) + @NotNull + public final net.corda.core.transactions.TransactionBuilder move(java.util.List>, net.corda.core.identity.AbstractParty) + @NotNull + public final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef, net.corda.core.identity.AbstractParty) ## public static final class net.corda.testing.contracts.DummyContractV2$State extends java.lang.Object implements net.corda.core.contracts.ContractState public (int, java.util.List) @@ -6947,6 +7352,8 @@ public static final class net.corda.testing.contracts.DummyContractV2$State exte public int hashCode() @NotNull public String toString() + @NotNull + public final kotlin.Pair withNewOwner(net.corda.core.identity.AbstractParty) ## public final class net.corda.testing.contracts.DummyContractV3 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint public () @@ -7435,6 +7842,7 @@ public class net.corda.client.jackson.StringToMethodCallParser extends java.lang public final net.corda.client.jackson.StringToMethodCallParser.ParsedMethodCall parse(T, String) @NotNull public final Object[] parseArguments(String, java.util.List>, String) + public final void validateIsMatchingCtor(String, java.util.List>, String) public static final net.corda.client.jackson.StringToMethodCallParser$Companion Companion ## public static final class net.corda.client.jackson.StringToMethodCallParser$Companion extends java.lang.Object @@ -7463,6 +7871,9 @@ public static final class net.corda.client.jackson.StringToMethodCallParser$Unpa @NotNull public final String getParamName() ## +public static final class net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException$NoSuchFile extends net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException + public (String) +## public static final class net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException$ReflectionDataMissing extends net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException public (String, int) ## @@ -7489,6 +7900,7 @@ public interface net.corda.testing.driver.DriverDSL public abstract net.corda.core.concurrent.CordaFuture getDefaultNotaryNode() @NotNull public abstract java.util.List getNotaryHandles() + public abstract int nextPort() @NotNull public abstract net.corda.core.concurrent.CordaFuture startNode() @NotNull @@ -7496,6 +7908,8 @@ public interface net.corda.testing.driver.DriverDSL @NotNull public abstract net.corda.core.concurrent.CordaFuture startNode(net.corda.testing.driver.NodeParameters, net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) @NotNull + public abstract net.corda.core.concurrent.CordaFuture startNode(net.corda.testing.driver.NodeParameters, net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, String) + @NotNull public abstract net.corda.core.concurrent.CordaFuture startWebserver(net.corda.testing.driver.NodeHandle) @NotNull public abstract net.corda.core.concurrent.CordaFuture startWebserver(net.corda.testing.driver.NodeHandle, String) @@ -7508,6 +7922,8 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map) + public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map, int, kotlin.jvm.internal.DefaultConstructorMarker) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, boolean) public final boolean component1() @NotNull @@ -7521,6 +7937,12 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O public final boolean component14() @Nullable public final java.util.Collection component15() + @Nullable + public final java.nio.file.Path component16() + @NotNull + public final java.util.List component17() + @NotNull + public final java.util.Map component18() @NotNull public final java.nio.file.Path component2() @NotNull @@ -7539,15 +7961,23 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O @NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection) @NotNull + public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map) + @NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Set) public boolean equals(Object) @Nullable public final java.util.Collection getCordappsForAllNodes() @NotNull public final net.corda.testing.driver.PortAllocation getDebugPortAllocation() + @Nullable + public final java.nio.file.Path getDjvmBootstrapSource() + @NotNull + public final java.util.List getDjvmCordaSource() @NotNull public final java.nio.file.Path getDriverDirectory() @NotNull + public final java.util.Map getEnvironmentVariables() + @NotNull public final java.util.List getExtraCordappPackagesToScan() public final boolean getInMemoryDB() @NotNull @@ -7574,8 +8004,14 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O @NotNull public final net.corda.testing.driver.DriverParameters withDebugPortAllocation(net.corda.testing.driver.PortAllocation) @NotNull + public final net.corda.testing.driver.DriverParameters withDjvmBootstrapSource(java.nio.file.Path) + @NotNull + public final net.corda.testing.driver.DriverParameters withDjvmCordaSource(java.util.List) + @NotNull public final net.corda.testing.driver.DriverParameters withDriverDirectory(java.nio.file.Path) @NotNull + public final net.corda.testing.driver.DriverParameters withEnvironmentVariables(java.util.Map) + @NotNull public final net.corda.testing.driver.DriverParameters withExtraCordappPackagesToScan(java.util.List) @NotNull public final net.corda.testing.driver.DriverParameters withInMemoryDB(boolean) @@ -7660,6 +8096,8 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>) public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>, String) + public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map, String, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final net.corda.core.identity.CordaX500Name component1() @NotNull @@ -7676,10 +8114,14 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public final java.util.Collection component7() @NotNull public final java.util.Map>, Class>> component8() + @Nullable + public final String component9() @NotNull public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) @NotNull public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>) + @NotNull + public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>, String) public boolean equals(Object) @NotNull public final java.util.Collection getAdditionalCordapps() @@ -7687,6 +8129,8 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public final java.util.Map getCustomOverrides() @NotNull public final java.util.Map>, Class>> getFlowOverrides() + @Nullable + public final String getLogLevelOverride() @NotNull public final String getMaximumHeapSize() @Nullable @@ -7707,6 +8151,8 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj @NotNull public final net.corda.testing.driver.NodeParameters withFlowOverrides(java.util.Map>, ? extends Class>>) @NotNull + public final net.corda.testing.driver.NodeParameters withLogLevelOverride(String) + @NotNull public final net.corda.testing.driver.NodeParameters withMaximumHeapSize(String) @NotNull public final net.corda.testing.driver.NodeParameters withProvidedName(net.corda.core.identity.CordaX500Name) @@ -7745,8 +8191,18 @@ public interface net.corda.testing.driver.OutOfProcess extends net.corda.testing public abstract class net.corda.testing.driver.PortAllocation extends java.lang.Object public () @NotNull + public static final net.corda.testing.driver.PortAllocation getDefaultAllocator() + @NotNull public final net.corda.core.utilities.NetworkHostAndPort nextHostAndPort() public abstract int nextPort() + public static final net.corda.testing.driver.PortAllocation$Companion Companion + public static final int DEFAULT_START_PORT = 10000 + public static final int FIRST_EPHEMERAL_PORT = 30000 +## +public static final class net.corda.testing.driver.PortAllocation$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) + @NotNull + public final net.corda.testing.driver.PortAllocation getDefaultAllocator() ## @DoNotImplement public static class net.corda.testing.driver.PortAllocation$Incremental extends net.corda.testing.driver.PortAllocation @@ -7755,6 +8211,11 @@ public static class net.corda.testing.driver.PortAllocation$Incremental extends public final java.util.concurrent.atomic.AtomicInteger getPortCounter() public int nextPort() ## +@DoNotImplement +public class net.corda.testing.driver.SharedMemoryIncremental extends net.corda.testing.driver.PortAllocation + public int nextPort() + public static net.corda.testing.driver.SharedMemoryIncremental INSTANCE +## public final class net.corda.testing.driver.VerifierType extends java.lang.Enum public static net.corda.testing.driver.VerifierType valueOf(String) public static net.corda.testing.driver.VerifierType[] values() @@ -7776,6 +8237,22 @@ public final class net.corda.testing.driver.WebserverHandle extends java.lang.Ob @NotNull public String toString() ## +public final class net.corda.testing.flows.FlowTestsUtilsKt extends java.lang.Object + @NotNull + public static final kotlin.Pair from(T, net.corda.core.flows.FlowSession) + @NotNull + public static final R from(java.util.Map>, net.corda.core.flows.FlowSession) + @NotNull + public static final kotlin.Pair> from(kotlin.reflect.KClass, net.corda.core.flows.FlowSession) + @Suspendable + @NotNull + public static final java.util.List> receiveAll(net.corda.core.flows.FlowLogic, Class, net.corda.core.flows.FlowSession, net.corda.core.flows.FlowSession...) + @Suspendable + @NotNull + public static final java.util.Map> receiveAll(net.corda.core.flows.FlowLogic, kotlin.Pair>, kotlin.Pair>...) + @NotNull + public static final rx.Observable registerCoreFlowFactory(net.corda.testing.node.internal.TestStartedNode, Class>, Class, kotlin.jvm.functions.Function1, boolean) +## @DoNotImplement public abstract class net.corda.testing.node.ClusterSpec extends java.lang.Object public () @@ -7969,16 +8446,21 @@ public final class net.corda.testing.node.MockNetworkNotarySpec extends java.lan public (net.corda.core.identity.CordaX500Name) public (net.corda.core.identity.CordaX500Name, boolean) public (net.corda.core.identity.CordaX500Name, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.identity.CordaX500Name, boolean, String) + public (net.corda.core.identity.CordaX500Name, boolean, String, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.core.identity.CordaX500Name component1() public final boolean component2() @NotNull public final net.corda.testing.node.MockNetworkNotarySpec copy(net.corda.core.identity.CordaX500Name, boolean) public boolean equals(Object) + @Nullable + public final String getClassName() @NotNull public final net.corda.core.identity.CordaX500Name getName() public final boolean getValidating() public int hashCode() + public final void setClassName(String) @NotNull public String toString() ## @@ -8095,6 +8577,7 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public (Iterable, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...) public (Iterable, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, java.security.KeyPair...) + public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, java.security.KeyPair[], net.corda.core.node.services.KeyManagementService) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, java.security.KeyPair...) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) public (Iterable, net.corda.testing.core.TestIdentity, java.security.KeyPair...) @@ -8107,6 +8590,8 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService) public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...) + public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.nodeapi.internal.cordapp.CordappLoader, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, net.corda.testing.core.TestIdentity, java.security.KeyPair[], net.corda.core.node.services.KeyManagementService, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, net.corda.testing.core.TestIdentity...) public (net.corda.testing.core.TestIdentity, net.corda.testing.core.TestIdentity...) public final void addMockCordapp(String) @@ -8137,6 +8622,8 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem @NotNull public net.corda.core.cordapp.CordappProvider getCordappProvider() @NotNull + public net.corda.core.node.services.diagnostics.DiagnosticsService getDiagnosticsService() + @NotNull public net.corda.core.node.services.IdentityService getIdentityService() @NotNull public net.corda.core.node.services.KeyManagementService getKeyManagementService() @@ -8170,6 +8657,12 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public static final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...) @NotNull public static final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...) + @NotNull + public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, java.util.Set, java.util.Set) + @NotNull + public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set) + @NotNull + public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set, net.corda.testing.internal.TestingNamedCacheFactory) public void recordTransactions(Iterable) public void recordTransactions(net.corda.core.node.StatesToRecord, Iterable) public void recordTransactions(net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...) @@ -8198,6 +8691,12 @@ public static final class net.corda.testing.node.MockServices$Companion extends public final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...) @NotNull public final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...) + @NotNull + public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, java.util.Set, java.util.Set) + @NotNull + public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set) + @NotNull + public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set, net.corda.testing.internal.TestingNamedCacheFactory) ## public final class net.corda.testing.node.MockServicesKt extends java.lang.Object @NotNull @@ -8303,6 +8802,8 @@ public final class net.corda.testing.node.UnstartedMockNode extends java.lang.Ob public final int getId() @NotNull public final net.corda.testing.node.StartedMockNode getStarted() + @NotNull + public final T installCordaService(Class) public final boolean isStarted() @NotNull public final net.corda.testing.node.StartedMockNode start() @@ -8339,28 +8840,46 @@ public class net.corda.client.rpc.ConnectionFailureException extends net.corda.c ## public final class net.corda.client.rpc.CordaRPCClient extends java.lang.Object public (java.util.List) + public (java.util.List, java.util.Set>) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration) + public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, java.util.Set>) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set>) + public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort) + public (net.corda.core.utilities.NetworkHostAndPort, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set>) + public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String) @NotNull + public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.client.rpc.GracefulReconnect) + @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor) @NotNull + public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.client.rpc.GracefulReconnect) + @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.core.identity.CordaX500Name) @NotNull + public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.core.identity.CordaX500Name, net.corda.client.rpc.GracefulReconnect) + @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.identity.CordaX500Name) + @NotNull + public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.identity.CordaX500Name, net.corda.client.rpc.GracefulReconnect) public final A use(String, String, kotlin.jvm.functions.Function1) public static final net.corda.client.rpc.CordaRPCClient$Companion Companion ## @@ -8436,12 +8955,33 @@ public static final class net.corda.client.rpc.CordaRPCClientConfiguration$Compa @DoNotImplement public final class net.corda.client.rpc.CordaRPCConnection extends java.lang.Object implements net.corda.client.rpc.RPCConnection public (net.corda.client.rpc.RPCConnection) + public (net.corda.client.rpc.RPCConnection, java.util.concurrent.ExecutorService, net.corda.client.rpc.internal.ReconnectingCordaRPCOps, kotlin.jvm.internal.DefaultConstructorMarker) public void close() public void forceClose() @NotNull public net.corda.core.messaging.CordaRPCOps getProxy() public int getServerProtocolVersion() public void notifyServerAndClose() + public static final net.corda.client.rpc.CordaRPCConnection$Companion Companion +## +public static final class net.corda.client.rpc.CordaRPCConnection$Companion extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) +## +public final class net.corda.client.rpc.GracefulReconnect extends java.lang.Object + public () + public (Runnable, Runnable) + public (Runnable, Runnable, int) + public (Runnable, Runnable, int, int, kotlin.jvm.internal.DefaultConstructorMarker) + public (kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function0, int) + public (kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function0, int, int, kotlin.jvm.internal.DefaultConstructorMarker) + public final int getMaxAttempts() + @NotNull + public final kotlin.jvm.functions.Function0 getOnDisconnect() + @NotNull + public final kotlin.jvm.functions.Function0 getOnReconnect() +## +public final class net.corda.client.rpc.MaxRpcRetryException extends net.corda.client.rpc.RPCException + public (int, reflect.Method, Throwable) ## public final class net.corda.client.rpc.PermissionException extends net.corda.core.CordaRuntimeException implements net.corda.core.ClientRelevantError, net.corda.nodeapi.exceptions.RpcSerializableError public (String) @@ -8450,6 +8990,7 @@ public final class net.corda.client.rpc.PermissionException extends net.corda.co ## @DoNotImplement public interface net.corda.client.rpc.RPCConnection extends java.io.Closeable + public abstract void close() public abstract void forceClose() @NotNull public abstract I getProxy() @@ -8463,9 +9004,18 @@ public class net.corda.client.rpc.RPCException extends net.corda.core.CordaRunti public @interface net.corda.client.rpc.RPCSinceVersion public abstract int version() ## +public class net.corda.client.rpc.UnrecoverableRPCException extends net.corda.client.rpc.RPCException + public (String, Throwable) + public (String, Throwable, int, kotlin.jvm.internal.DefaultConstructorMarker) +## public final class net.corda.client.rpc.UtilsKt extends java.lang.Object public static final void notUsed(rx.Observable) ## +public final class net.corda.client.rpc.reconnect.CouldNotStartFlowException extends net.corda.client.rpc.RPCException + public () + public (Throwable) + public (Throwable, int, kotlin.jvm.internal.DefaultConstructorMarker) +## public final class net.corda.finance.test.CashSchema extends java.lang.Object public static final net.corda.finance.test.CashSchema INSTANCE ## From 99f835bb4a6e26031b49429b03420338e6b60ce3 Mon Sep 17 00:00:00 2001 From: Dan Newton Date: Tue, 25 Aug 2020 11:54:55 +0100 Subject: [PATCH 24/25] CORDA-3995 Redeliver external events if number of suspends differs (#6646) * CORDA-3995 Redeliver external events in number of suspends differs When retrying a flow, only redeliver external events held in a flow's pending deduplication handlers if there is a difference in the `numberOfSuspends` on the `currentState`'s checkpoint or the checkpoint in the database. If the checkpoint committed, but the flow retried, then the external events would have been persisted to the database as part of the same transaction. Therefore there is no need to replay them, as they have already been processed as saved as part of the checkpoint. This change is only relevant when the checkpoint persists, but the flow still needs to retry after this occurs (within the same transition/event). * CORDA-3995 Redeliver external events in number of commits differs When retrying a flow, only redeliver external events held in a flow's pending deduplication handlers if there is a difference in the `numberOfCommits` on the `currentState`'s checkpoint or the checkpoint in the database. If the checkpoint committed, but the flow retried, then the external events would have been persisted to the database as part of the same transaction. Therefore there is no need to replay them, as they have already been processed as saved as part of the checkpoint. This change is only relevant when the checkpoint persists, but the flow still needs to retry after this occurs (within the same transition/event). * CORDA-3995 Redeliver external events if number of commits differs When retrying a flow, only redeliver external events held in a flow's pending deduplication handlers if there is a difference in the `currentState`'s `numberOfCommits` or the `numberOfCommits` the checkpoint has recorded in the database. If the checkpoint committed, but the flow retried, then the external events would have been persisted to the database as part of the same transaction. Therefore there is no need to replay them, as they have already been processed as saved as part of the checkpoint. This change is only relevant when the checkpoint persists, but the flow still needs to retry after this occurs (within the same transition/event). * Add @Suspendable to a test flow. I am surprised this worked at all. * Fix a few minor things based on review. Co-authored-by: Will Vigor --- .../persistence/DatabaseTransaction.kt | 1 + .../StateMachineErrorHandlingTest.kt | 14 +- .../StateMachineFlowInitErrorHandlingTest.kt | 179 +++++++++++++++++- .../StateMachineGeneralErrorHandlingTest.kt | 8 + .../node/services/statemachine/Action.kt | 2 +- .../statemachine/ActionExecutorImpl.kt | 5 +- .../node/services/statemachine/FlowCreator.kt | 5 + .../SingleThreadedStateMachineManager.kt | 45 +++-- .../statemachine/StateMachineState.kt | 33 ++-- .../transitions/ErrorFlowTransition.kt | 46 +++-- .../transitions/KilledFlowTransition.kt | 48 ++--- .../transitions/StartedFlowTransition.kt | 2 +- .../transitions/TopLevelTransition.kt | 133 +++++++------ .../transitions/UnstartedFlowTransition.kt | 22 +-- 14 files changed, 371 insertions(+), 172 deletions(-) diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/DatabaseTransaction.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/DatabaseTransaction.kt index 16c5857ae9..9b8ed573d2 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/DatabaseTransaction.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/DatabaseTransaction.kt @@ -73,6 +73,7 @@ class DatabaseTransaction( firstExceptionInDatabaseTransaction = null } + @Throws(SQLException::class) fun commit() { firstExceptionInDatabaseTransaction?.let { throw DatabaseTransactionException(it) diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineErrorHandlingTest.kt index 37d6cce6ac..311e1d562e 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineErrorHandlingTest.kt @@ -112,11 +112,10 @@ abstract class StateMachineErrorHandlingTest { submit.addScripts(listOf(ScriptText("Test script", rules))) } - internal fun getBytemanOutput(nodeHandle: NodeHandle): List { - return nodeHandle.baseDirectory - .list() - .first { it.toString().contains("net.corda.node.Corda") && it.toString().contains("stdout.log") } - .readAllLines() + private fun NodeHandle.getBytemanOutput(): List { + return baseDirectory.list() + .filter { "net.corda.node.Corda" in it.toString() && "stdout.log" in it.toString() } + .flatMap { it.readAllLines() } } internal fun OutOfProcessImpl.stop(timeout: Duration): Boolean { @@ -126,6 +125,10 @@ abstract class StateMachineErrorHandlingTest { }.also { onStopCallback() } } + internal fun NodeHandle.assertBytemanOutput(string: String, count: Int) { + assertEquals(count, getBytemanOutput().filter { string in it }.size) + } + @Suppress("LongParameterList") internal fun CordaRPCOps.assertHospitalCounts( discharged: Int = 0, @@ -246,6 +249,7 @@ abstract class StateMachineErrorHandlingTest { // Internal use for testing only!! @StartableByRPC class GetHospitalCountersFlow : FlowLogic() { + @Suspendable override fun call(): HospitalCounts = HospitalCounts( serviceHub.cordaService(HospitalCounter::class.java).dischargedCounter, diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt index 6817613f85..97ac7a6387 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineFlowInitErrorHandlingTest.kt @@ -6,6 +6,7 @@ import net.corda.core.messaging.startFlowWithClientId import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.seconds import net.corda.node.services.api.CheckpointStorage +import net.corda.nodeapi.internal.persistence.DatabaseTransaction import net.corda.testing.core.ALICE_NAME import net.corda.testing.core.CHARLIE_NAME import net.corda.testing.core.singleIdentity @@ -59,6 +60,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 3 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -70,6 +79,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { 30.seconds ) + alice.assertBytemanOutput("External start flow event", 4) alice.rpc.assertNumberOfCheckpointsAllZero() alice.rpc.assertHospitalCounts(discharged = 3) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) @@ -257,6 +267,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 4 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -268,6 +286,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { // flow is not signaled as started calls to [getOrThrow] will hang, sleeping instead Thread.sleep(30.seconds.toMillis()) + alice.assertBytemanOutput("External start flow event", 4) alice.rpc.assertNumberOfCheckpoints(hospitalized = 1) alice.rpc.assertHospitalCounts( discharged = 3, @@ -364,12 +383,28 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { DO traceln("Counter created") ENDRULE - RULE Throw exception on executeSignalFlowHasStarted action + RULE Flag when commit transaction reached CLASS $actionExecutorClassName - METHOD executeSignalFlowHasStarted + METHOD executeCommitTransaction AT ENTRY - IF readCounter("counter") < 3 - DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("i wish i was a sql exception") + IF true + DO flag("commit") + ENDRULE + + RULE Throw exception on executeSignalFlowHasStarted action + CLASS ${DatabaseTransaction::class.java.name} + METHOD commit + AT EXIT + IF readCounter("counter") < 3 && flagged("commit") + DO incrementCounter("counter"); clear("commit"); traceln("Throwing exception"); throw new java.sql.SQLException("you thought it worked didnt you!", "1") + ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") ENDRULE """.trimIndent() @@ -382,6 +417,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { 30.seconds ) + alice.assertBytemanOutput("External start flow event", 1) alice.rpc.assertNumberOfCheckpointsAllZero() alice.rpc.assertHospitalCounts(discharged = 3) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) @@ -421,6 +457,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 3 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -433,6 +477,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { 30.seconds ) + alice.assertBytemanOutput("External start flow event", 4) alice.rpc.assertNumberOfCheckpoints(completed = 1) alice.rpc.assertHospitalCounts(discharged = 3) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) @@ -517,6 +562,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 4 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -532,6 +585,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { // flow is not signaled as started calls to [getOrThrow] will hang, sleeping instead Thread.sleep(30.seconds.toMillis()) + alice.assertBytemanOutput("External start flow event", 4) alice.rpc.assertNumberOfCheckpoints(hospitalized = 1) alice.rpc.assertHospitalCounts( discharged = 3, @@ -629,13 +683,28 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { DO traceln("Counter created") ENDRULE - RULE Throw exception on executeSignalFlowHasStarted action + RULE Flag when commit transaction reached CLASS $actionExecutorClassName - METHOD executeSignalFlowHasStarted - # METHOD executeAcknowledgeMessages + METHOD executeCommitTransaction AT ENTRY - IF readCounter("counter") < 3 - DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("i wish i was a sql exception") + IF true + DO flag("commit") + ENDRULE + + RULE Throw exception on executeSignalFlowHasStarted action + CLASS ${DatabaseTransaction::class.java.name} + METHOD commit + AT EXIT + IF readCounter("counter") < 3 && flagged("commit") + DO incrementCounter("counter"); clear("commit"); traceln("Throwing exception"); throw new java.sql.SQLException("you thought it worked didnt you!", "1") + ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") ENDRULE """.trimIndent() @@ -649,6 +718,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { 30.seconds ) + alice.assertBytemanOutput("External start flow event", 1) alice.rpc.assertNumberOfCheckpoints(completed = 1) alice.rpc.assertHospitalCounts(discharged = 3) assertEquals(0, alice.rpc.stateMachinesSnapshot().size) @@ -687,6 +757,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 3 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log session init event + CLASS $stateMachineManagerClassName + METHOD onSessionInit + AT ENTRY + IF true + DO traceln("On session init event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -699,6 +777,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { ) alice.rpc.assertNumberOfCheckpointsAllZero() + charlie.assertBytemanOutput("On session init event", 4) charlie.rpc.assertNumberOfCheckpointsAllZero() charlie.rpc.assertHospitalCounts(discharged = 3) } @@ -735,6 +814,14 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter") < 4 DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.sql.SQLException("die dammit die", "1") ENDRULE + + RULE Log session init event + CLASS $stateMachineManagerClassName + METHOD onSessionInit + AT ENTRY + IF true + DO traceln("On session init event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) @@ -747,6 +834,7 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { Thread.sleep(30.seconds.toMillis()) alice.rpc.assertNumberOfCheckpoints(runnable = 1) + charlie.assertBytemanOutput("On session init event", 4) charlie.rpc.assertNumberOfCheckpoints(hospitalized = 1) charlie.rpc.assertHospitalCounts( discharged = 3, @@ -893,4 +981,77 @@ class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() { assertEquals(1, charlie.rpc.stateMachinesSnapshot().size) } } + + /** + * Throws an exception when after the first [Action.CommitTransaction] event before the flow has initialised (remains in an unstarted state). + * This is to cover transient issues, where the transaction committed the checkpoint but failed to respond to the node. + * + * The exception is thrown when performing [Action.SignalFlowHasStarted], the error won't actually appear here but it makes it easier + * to test. + * + * The exception is thrown 3 times. + * + * This causes the transition to be discharged from the hospital 3 times (retries 3 times). On the final retry the transition + * succeeds and the flow finishes. + * + * Each time the flow retries, it starts from the beginning of the flow (due to being in an unstarted state). + * + * The first retry will load the checkpoint that the flow doesn't know exists ([StateMachineState.isAnyCheckpointPersisted] is false + * at this point). The flag gets switched to true after this first retry and the flow has now returned to an expected state. + * + */ + @Test(timeout = 300_000) + fun `responding flow - error during transition when checkpoint commits but transient db exception is thrown during flow initialisation will retry and complete successfully`() { + startDriver { + val (alice, charlie, port) = createNodeAndBytemanNode(ALICE_NAME, CHARLIE_NAME) + + val rules = """ + RULE Create Counter + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF createCounter("counter", $counter) + DO traceln("Counter created") + ENDRULE + + RULE Flag when commit transaction reached + CLASS $actionExecutorClassName + METHOD executeCommitTransaction + AT ENTRY + IF true + DO flag("commit") + ENDRULE + + RULE Throw exception on executeSignalFlowHasStarted action + CLASS ${DatabaseTransaction::class.java.name} + METHOD commit + AT EXIT + IF readCounter("counter") < 3 && flagged("commit") + DO incrementCounter("counter"); clear("commit"); traceln("Throwing exception"); throw new java.sql.SQLException("you thought it worked didnt you!", "1") + ENDRULE + + RULE Log session init event + CLASS $stateMachineManagerClassName + METHOD onSessionInit + AT ENTRY + IF true + DO traceln("On session init event") + ENDRULE + """.trimIndent() + + submitBytemanRules(rules, port) + + alice.rpc.startFlow( + StateMachineErrorHandlingTest::SendAMessageFlow, + charlie.nodeInfo.singleIdentity() + ).returnValue.getOrThrow( + 30.seconds + ) + + alice.rpc.assertNumberOfCheckpointsAllZero() + charlie.assertBytemanOutput("On session init event", 1) + charlie.rpc.assertNumberOfCheckpointsAllZero() + charlie.rpc.assertHospitalCounts(discharged = 3) + } + } } \ No newline at end of file diff --git a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt index ad4f388ff5..894a66692f 100644 --- a/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt +++ b/node/src/integration-test-slow/kotlin/net/corda/node/services/statemachine/StateMachineGeneralErrorHandlingTest.kt @@ -513,6 +513,14 @@ class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() { IF readCounter("counter_2") < 3 DO incrementCounter("counter_2"); traceln("Throwing exception getting checkpoint"); throw new java.sql.SQLTransientConnectionException("Connection is not available") ENDRULE + + RULE Log external start flow event + CLASS $stateMachineManagerClassName + METHOD onExternalStartFlow + AT ENTRY + IF true + DO traceln("External start flow event") + ENDRULE """.trimIndent() submitBytemanRules(rules, port) diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/Action.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/Action.kt index d5faad801e..615afb8df5 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/Action.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/Action.kt @@ -145,7 +145,7 @@ sealed class Action { /** * Commit the current database transaction. */ - object CommitTransaction : Action() { + data class CommitTransaction(val currentState: StateMachineState) : Action() { override fun toString() = "CommitTransaction" } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt index a5f8c8060f..929d3d594a 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/ActionExecutorImpl.kt @@ -61,7 +61,7 @@ internal class ActionExecutorImpl( is Action.RemoveFlow -> executeRemoveFlow(action) is Action.CreateTransaction -> executeCreateTransaction() is Action.RollbackTransaction -> executeRollbackTransaction() - is Action.CommitTransaction -> executeCommitTransaction() + is Action.CommitTransaction -> executeCommitTransaction(action) is Action.ExecuteAsyncOperation -> executeAsyncOperation(fiber, action) is Action.ReleaseSoftLocks -> executeReleaseSoftLocks(action) is Action.RetryFlowFromSafePoint -> executeRetryFlowFromSafePoint(action) @@ -219,13 +219,14 @@ internal class ActionExecutorImpl( @Suspendable @Throws(SQLException::class) - private fun executeCommitTransaction() { + private fun executeCommitTransaction(action: Action.CommitTransaction) { try { contextTransaction.commit() } finally { contextTransaction.close() contextTransactionOrNull = null } + action.currentState.run { numberOfCommits = checkpoint.checkpointState.numberOfCommits } } @Suppress("TooGenericExceptionCaught") diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt index 83d8795c31..9aab0183b7 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/FlowCreator.kt @@ -103,6 +103,7 @@ class FlowCreator( updateCompatibleInDb(runId, true) checkpoint = checkpoint.copy(compatible = true) } + checkpoint = checkpoint.copy(status = Checkpoint.FlowStatus.RUNNABLE) fiber.logic.stateMachine = fiber @@ -114,6 +115,7 @@ class FlowCreator( anyCheckpointPersisted = true, reloadCheckpointAfterSuspendCount = reloadCheckpointAfterSuspendCount ?: if (reloadCheckpointAfterSuspend) checkpoint.checkpointState.numberOfSuspends else null, + numberOfCommits = checkpoint.checkpointState.numberOfCommits, lock = lock ) injectOldProgressTracker(progressTracker, fiber.logic) @@ -161,6 +163,7 @@ class FlowCreator( fiber = flowStateMachineImpl, anyCheckpointPersisted = existingCheckpoint != null, reloadCheckpointAfterSuspendCount = if (reloadCheckpointAfterSuspend) 0 else null, + numberOfCommits = existingCheckpoint?.checkpointState?.numberOfCommits ?: 0, lock = Semaphore(1), deduplicationHandler = deduplicationHandler, senderUUID = senderUUID @@ -242,6 +245,7 @@ class FlowCreator( fiber: FlowStateMachineImpl<*>, anyCheckpointPersisted: Boolean, reloadCheckpointAfterSuspendCount: Int?, + numberOfCommits: Int, lock: Semaphore, deduplicationHandler: DeduplicationHandler? = null, senderUUID: String? = null @@ -259,6 +263,7 @@ class FlowCreator( flowLogic = fiber.logic, senderUUID = senderUUID, reloadCheckpointAfterSuspendCount = reloadCheckpointAfterSuspendCount, + numberOfCommits = numberOfCommits, lock = lock ) } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt index 9399176ad1..1802f6c89c 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/SingleThreadedStateMachineManager.kt @@ -511,10 +511,11 @@ internal class SingleThreadedStateMachineManager( CheckpointLoadingStatus.Success(checkpoint) } - val flow = when { + val (flow, numberOfCommitsFromCheckpoint) = when { // Resurrect flow checkpointLoadingStatus is CheckpointLoadingStatus.Success -> { - flowCreator.createFlowFromCheckpoint( + val numberOfCommitsFromCheckpoint = checkpointLoadingStatus.checkpoint.checkpointState.numberOfCommits + val flow = flowCreator.createFlowFromCheckpoint( flowId, checkpointLoadingStatus.checkpoint, currentState.reloadCheckpointAfterSuspendCount, @@ -522,6 +523,7 @@ internal class SingleThreadedStateMachineManager( firstRestore = false, progressTracker = currentState.flowLogic.progressTracker ) ?: return + flow to numberOfCommitsFromCheckpoint } checkpointLoadingStatus is CheckpointLoadingStatus.NotFound && currentState.isAnyCheckpointPersisted -> { logger.error("Unable to find database checkpoint for flow $flowId. Something is very wrong. The flow will not retry.") @@ -530,7 +532,7 @@ internal class SingleThreadedStateMachineManager( checkpointLoadingStatus is CheckpointLoadingStatus.CouldNotDeserialize -> return else -> { // Just flow initiation message - null + null to -1 } } @@ -545,7 +547,8 @@ internal class SingleThreadedStateMachineManager( if (flow != null) { addAndStartFlow(flowId, flow) } - extractAndScheduleEventsForRetry(oldFlowLeftOver, currentState) + + extractAndScheduleEventsForRetry(oldFlowLeftOver, currentState, numberOfCommitsFromCheckpoint) } } @@ -571,13 +574,27 @@ internal class SingleThreadedStateMachineManager( /** - * Extract all the incomplete deduplication handlers as well as the [ExternalEvent] and [Event.Pause] events from this flows event queue - * [oldEventQueue]. Then schedule them (in the same order) for the new flow. This means that if a retried flow has a pause event - * scheduled then the retried flow will eventually pause. The new flow will not retry again if future retry events have been scheduled. - * When this method is called this flow must have been replaced by the new flow in [StateMachineInnerState.flows]. This method differs - * from [extractAndQueueExternalEventsForPausedFlow] where (only) [externalEvents] are extracted and scheduled straight away. + * Extract all the (unpersisted) incomplete deduplication handlers [currentState.pendingDeduplicationHandlers], as well as the + * [ExternalEvent] and [Event.Pause] events from this flows event queue [oldEventQueue]. Then schedule them (in the same order) for the + * new flow. This means that if a retried flow has a pause event scheduled then the retried flow will eventually pause. The new flow + * will not retry again if future retry events have been scheduled. When this method is called this flow must have been replaced by the + * new flow in [StateMachineInnerState.flows]. + * + * This method differs from [extractAndQueueExternalEventsForPausedFlow] where (only) [externalEvents] are extracted and scheduled + * straight away. + * + * @param oldEventQueue The old event queue of the flow/fiber to unprocessed extract events from + * + * @param currentState The current state of the flow, used to extract processed events (held in [StateMachineState.pendingDeduplicationHandlers]) + * + * @param numberOfCommitsFromCheckpoint The number of commits that the checkpoint loaded from the database has, to compare to the + * commits the flow has currently reached */ - private fun extractAndScheduleEventsForRetry(oldEventQueue: Channel, currentState: StateMachineState) { + private fun extractAndScheduleEventsForRetry( + oldEventQueue: Channel, + currentState: StateMachineState, + numberOfCommitsFromCheckpoint: Int + ) { val flow = innerState.withLock { flows[currentState.flowLogic.runId] } @@ -587,9 +604,13 @@ internal class SingleThreadedStateMachineManager( if (event is Event.Pause || event is Event.GeneratedByExternalEvent) events.add(event) } while (event != null) - for (externalEvent in currentState.pendingDeduplicationHandlers) { - deliverExternalEvent(externalEvent.externalCause) + // Only redeliver events if they were not persisted to the database + if (currentState.numberOfCommits >= numberOfCommitsFromCheckpoint) { + for (externalEvent in currentState.pendingDeduplicationHandlers) { + deliverExternalEvent(externalEvent.externalCause) + } } + for (event in events) { if (event is Event.GeneratedByExternalEvent) { deliverExternalEvent(event.deduplicationHandler.externalCause) diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt index 7e8efc4ee3..5293616cef 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineState.kt @@ -49,6 +49,8 @@ import java.util.concurrent.Semaphore * @param senderUUID the identifier of the sending state machine or null if this flow is resumed from a checkpoint so that it does not participate in de-duplication high-water-marking. * @param reloadCheckpointAfterSuspendCount The number of times a flow has been reloaded (not retried). This is [null] when * [NodeConfiguration.reloadCheckpointAfterSuspendCount] is not enabled. + * @param numberOfCommits The number of times the flow's checkpoint has been successfully committed. This field is a var so that it can be + * updated after committing a database transaction that contained a checkpoint insert/update. * @param lock The flow's lock, used to prevent the flow performing a transition while being interacted with from external threads, and * vise-versa. */ @@ -67,6 +69,7 @@ data class StateMachineState( val isKilled: Boolean, val senderUUID: String?, val reloadCheckpointAfterSuspendCount: Int?, + var numberOfCommits: Int, val lock: Semaphore ) : KryoSerializable { override fun write(kryo: Kryo?, output: Output?) { @@ -129,7 +132,9 @@ data class Checkpoint( emptyMap(), emptySet(), listOf(topLevelSubFlow), - numberOfSuspends = 0 + numberOfSuspends = 0, + // We set this to 1 here to avoid an extra copy and increment in UnstartedFlowTransition.createInitialCheckpoint + numberOfCommits = 1 ), flowState = FlowState.Unstarted(flowStart, frozenFlowLogic), errorState = ErrorState.Clean @@ -229,21 +234,23 @@ data class Checkpoint( } /** - * @param invocationContext the initiator of the flow. - * @param ourIdentity the identity the flow is run as. - * @param sessions map of source session ID to session state. - * @param sessionsToBeClosed the sessions that have pending session end messages and need to be closed. This is available to avoid scanning all the sessions. - * @param subFlowStack the stack of currently executing subflows. - * @param numberOfSuspends the number of flow suspends due to IO API calls. + * @param invocationContext The initiator of the flow. + * @param ourIdentity The identity the flow is run as. + * @param sessions Map of source session ID to session state. + * @param sessionsToBeClosed The sessions that have pending session end messages and need to be closed. This is available to avoid scanning all the sessions. + * @param subFlowStack The stack of currently executing subflows. + * @param numberOfSuspends The number of flow suspends due to IO API calls. + * @param numberOfCommits The number of times this checkpoint has been persisted. */ @CordaSerializable data class CheckpointState( - val invocationContext: InvocationContext, - val ourIdentity: Party, - val sessions: SessionMap, // This must preserve the insertion order! - val sessionsToBeClosed: Set, - val subFlowStack: List, - val numberOfSuspends: Int + val invocationContext: InvocationContext, + val ourIdentity: Party, + val sessions: SessionMap, // This must preserve the insertion order! + val sessionsToBeClosed: Set, + val subFlowStack: List, + val numberOfSuspends: Int, + val numberOfCommits: Int ) /** diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/ErrorFlowTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/ErrorFlowTransition.kt index 4f4e6cd51e..39044de821 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/ErrorFlowTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/ErrorFlowTransition.kt @@ -49,7 +49,7 @@ class ErrorFlowTransition( checkpointState = startingState.checkpoint.checkpointState.copy(sessions = newSessions) ) currentState = currentState.copy(checkpoint = newCheckpoint) - actions.add(Action.PropagateErrors(errorMessages, initiatedSessions, startingState.senderUUID)) + actions += Action.PropagateErrors(errorMessages, initiatedSessions, startingState.senderUUID) } // If we're errored but not propagating keep processing events. @@ -59,32 +59,38 @@ class ErrorFlowTransition( // If we haven't been removed yet remove the flow. if (!currentState.isRemoved) { - val newCheckpoint = startingState.checkpoint.copy(status = Checkpoint.FlowStatus.FAILED) + val newCheckpoint = startingState.checkpoint.copy( + status = Checkpoint.FlowStatus.FAILED, + flowState = FlowState.Finished, + checkpointState = startingState.checkpoint.checkpointState.copy( + numberOfCommits = startingState.checkpoint.checkpointState.numberOfCommits + 1 + ) + ) + currentState = currentState.copy( + checkpoint = newCheckpoint, + pendingDeduplicationHandlers = emptyList(), + isRemoved = true + ) val removeOrPersistCheckpoint = if (currentState.checkpoint.checkpointState.invocationContext.clientId == null) { Action.RemoveCheckpoint(context.id) } else { - Action.PersistCheckpoint(context.id, newCheckpoint.copy(flowState = FlowState.Finished), isCheckpointUpdate = currentState.isAnyCheckpointPersisted) + Action.PersistCheckpoint( + context.id, + newCheckpoint, + isCheckpointUpdate = currentState.isAnyCheckpointPersisted + ) } - actions.addAll(arrayOf( - Action.CreateTransaction, - removeOrPersistCheckpoint, - Action.PersistDeduplicationFacts(currentState.pendingDeduplicationHandlers), - Action.ReleaseSoftLocks(context.id.uuid), - Action.CommitTransaction, - Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers), - Action.RemoveSessionBindings(currentState.checkpoint.checkpointState.sessions.keys) - )) + actions += Action.CreateTransaction + actions += removeOrPersistCheckpoint + actions += Action.PersistDeduplicationFacts(startingState.pendingDeduplicationHandlers) + actions += Action.ReleaseSoftLocks(context.id.uuid) + actions += Action.CommitTransaction(currentState) + actions += Action.AcknowledgeMessages(startingState.pendingDeduplicationHandlers) + actions += Action.RemoveSessionBindings(startingState.checkpoint.checkpointState.sessions.keys) + actions += Action.RemoveFlow(context.id, FlowRemovalReason.ErrorFinish(allErrors), currentState) - currentState = currentState.copy( - checkpoint = newCheckpoint, - pendingDeduplicationHandlers = emptyList(), - isRemoved = true - ) - - val removalReason = FlowRemovalReason.ErrorFinish(allErrors) - actions.add(Action.RemoveFlow(context.id, removalReason, currentState)) FlowContinuation.Abort } else { // Otherwise keep processing events. This branch happens when there are some outstanding initiating diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/KilledFlowTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/KilledFlowTransition.kt index bc059668d3..f80733f9c5 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/KilledFlowTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/KilledFlowTransition.kt @@ -29,39 +29,31 @@ class KilledFlowTransition( startingState.checkpoint.checkpointState.sessions, errorMessages ) - val newCheckpoint = startingState.checkpoint.setSessions(sessions = newSessions) - currentState = currentState.copy(checkpoint = newCheckpoint) - actions.add( - Action.PropagateErrors( - errorMessages, - initiatedSessions, - startingState.senderUUID - ) - ) - - if (!startingState.isFlowResumed) { - actions.add(Action.CreateTransaction) - } - // The checkpoint and soft locks are also removed directly in [StateMachineManager.killFlow] - if (startingState.isAnyCheckpointPersisted) { - actions.add(Action.RemoveCheckpoint(context.id, mayHavePersistentResults = true)) - } - actions.addAll( - arrayOf( - Action.PersistDeduplicationFacts(currentState.pendingDeduplicationHandlers), - Action.ReleaseSoftLocks(context.id.uuid), - Action.CommitTransaction, - Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers), - Action.RemoveSessionBindings(currentState.checkpoint.checkpointState.sessions.keys) - ) - ) - currentState = currentState.copy( + checkpoint = startingState.checkpoint.setSessions(sessions = newSessions), pendingDeduplicationHandlers = emptyList(), isRemoved = true ) + actions += Action.PropagateErrors( + errorMessages, + initiatedSessions, + startingState.senderUUID + ) + + if (!startingState.isFlowResumed) { + actions += Action.CreateTransaction + } + // The checkpoint and soft locks are also removed directly in [StateMachineManager.killFlow] + if (startingState.isAnyCheckpointPersisted) { + actions += Action.RemoveCheckpoint(context.id, mayHavePersistentResults = true) + } + actions += Action.PersistDeduplicationFacts(startingState.pendingDeduplicationHandlers) + actions += Action.ReleaseSoftLocks(context.id.uuid) + actions += Action.CommitTransaction(currentState) + actions += Action.AcknowledgeMessages(startingState.pendingDeduplicationHandlers) + actions += Action.RemoveSessionBindings(startingState.checkpoint.checkpointState.sessions.keys) + actions += Action.RemoveFlow(context.id, createKilledRemovalReason(killedFlowError), currentState) - actions.add(Action.RemoveFlow(context.id, createKilledRemovalReason(killedFlowError), currentState)) FlowContinuation.Abort } } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt index 8190a2c49a..85af30f898 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/StartedFlowTransition.kt @@ -121,7 +121,7 @@ class StartedFlowTransition( actions = listOf( Action.CreateTransaction, Action.TrackTransaction(flowIORequest.hash, state), - Action.CommitTransaction + Action.CommitTransaction(state) ) ) } else { diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/TopLevelTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/TopLevelTransition.kt index a7e408503f..9eba35f0db 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/TopLevelTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/TopLevelTransition.kt @@ -189,15 +189,16 @@ class TopLevelTransition( private fun suspendTransition(event: Event.Suspend): TransitionResult { return builder { - val newCheckpoint = currentState.checkpoint.run { - val newCheckpointState = if (checkpointState.invocationContext.arguments!!.isNotEmpty()) { - checkpointState.copy( - invocationContext = checkpointState.invocationContext.copy(arguments = emptyList()), - numberOfSuspends = checkpointState.numberOfSuspends + 1 - ) - } else { - checkpointState.copy(numberOfSuspends = checkpointState.numberOfSuspends + 1) - } + val newCheckpoint = startingState.checkpoint.run { + val newCheckpointState = checkpointState.copy( + invocationContext = if (checkpointState.invocationContext.arguments!!.isNotEmpty()) { + checkpointState.invocationContext.copy(arguments = emptyList()) + } else { + checkpointState.invocationContext + }, + numberOfSuspends = checkpointState.numberOfSuspends + 1, + numberOfCommits = checkpointState.numberOfCommits + 1 + ) copy( flowState = FlowState.Started(event.ioRequest, event.fiber), checkpointState = newCheckpointState, @@ -206,29 +207,26 @@ class TopLevelTransition( ) } if (event.maySkipCheckpoint) { - actions.addAll(arrayOf( - Action.CommitTransaction, - Action.ScheduleEvent(Event.DoRemainingWork) - )) - currentState = currentState.copy( + currentState = startingState.copy( checkpoint = newCheckpoint, isFlowResumed = false ) + actions += Action.CommitTransaction(currentState) + actions += Action.ScheduleEvent(Event.DoRemainingWork) } else { - actions.addAll(arrayOf( - Action.PersistCheckpoint(context.id, newCheckpoint, isCheckpointUpdate = currentState.isAnyCheckpointPersisted), - Action.PersistDeduplicationFacts(currentState.pendingDeduplicationHandlers), - Action.CommitTransaction, - Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers), - Action.ScheduleEvent(Event.DoRemainingWork) - )) - currentState = currentState.copy( + currentState = startingState.copy( checkpoint = newCheckpoint, pendingDeduplicationHandlers = emptyList(), isFlowResumed = false, isAnyCheckpointPersisted = true ) + actions += Action.PersistCheckpoint(context.id, newCheckpoint, isCheckpointUpdate = startingState.isAnyCheckpointPersisted) + actions += Action.PersistDeduplicationFacts(startingState.pendingDeduplicationHandlers) + actions += Action.CommitTransaction(currentState) + actions += Action.AcknowledgeMessages(startingState.pendingDeduplicationHandlers) + actions += Action.ScheduleEvent(Event.DoRemainingWork) } + FlowContinuation.ProcessEvents } } @@ -238,44 +236,40 @@ class TopLevelTransition( val checkpoint = currentState.checkpoint when (checkpoint.errorState) { ErrorState.Clean -> { - val pendingDeduplicationHandlers = currentState.pendingDeduplicationHandlers - currentState = currentState.copy( - checkpoint = checkpoint.copy( - checkpointState = checkpoint.checkpointState.copy( - numberOfSuspends = checkpoint.checkpointState.numberOfSuspends + 1 - ), - flowState = FlowState.Finished, - result = event.returnValue, - status = Checkpoint.FlowStatus.COMPLETED + currentState = startingState.copy( + checkpoint = checkpoint.copy( + checkpointState = checkpoint.checkpointState.copy( + numberOfSuspends = checkpoint.checkpointState.numberOfSuspends + 1, + numberOfCommits = checkpoint.checkpointState.numberOfCommits + 1 ), - pendingDeduplicationHandlers = emptyList(), - isFlowResumed = false, - isRemoved = true + flowState = FlowState.Finished, + result = event.returnValue, + status = Checkpoint.FlowStatus.COMPLETED + ), + pendingDeduplicationHandlers = emptyList(), + isFlowResumed = false, + isRemoved = true ) - if (currentState.isAnyCheckpointPersisted) { - if (currentState.checkpoint.checkpointState.invocationContext.clientId == null) { - actions.add(Action.RemoveCheckpoint(context.id)) - } else { - actions.add( - Action.PersistCheckpoint( - context.id, - currentState.checkpoint, - isCheckpointUpdate = currentState.isAnyCheckpointPersisted - ) - ) + if (startingState.checkpoint.checkpointState.invocationContext.clientId == null) { + if (startingState.isAnyCheckpointPersisted) { + actions += Action.RemoveCheckpoint(context.id) } + } else { + actions += Action.PersistCheckpoint( + context.id, + currentState.checkpoint, + isCheckpointUpdate = startingState.isAnyCheckpointPersisted + ) } - val allSourceSessionIds = currentState.checkpoint.checkpointState.sessions.keys - actions.addAll(arrayOf( - Action.PersistDeduplicationFacts(pendingDeduplicationHandlers), - Action.ReleaseSoftLocks(event.softLocksId), - Action.CommitTransaction, - Action.AcknowledgeMessages(pendingDeduplicationHandlers), - Action.RemoveSessionBindings(allSourceSessionIds), - Action.RemoveFlow(context.id, FlowRemovalReason.OrderlyFinish(event.returnValue), currentState) - )) + actions += Action.PersistDeduplicationFacts(startingState.pendingDeduplicationHandlers) + actions += Action.ReleaseSoftLocks(event.softLocksId) + actions += Action.CommitTransaction(currentState) + actions += Action.AcknowledgeMessages(startingState.pendingDeduplicationHandlers) + actions += Action.RemoveSessionBindings(startingState.checkpoint.checkpointState.sessions.keys) + actions += Action.RemoveFlow(context.id, FlowRemovalReason.OrderlyFinish(event.returnValue), currentState) + sendEndMessages() // Resume to end fiber FlowContinuation.Resume(null) @@ -358,17 +352,22 @@ class TopLevelTransition( private fun overnightObservationTransition(): TransitionResult { return builder { - val flowStartEvents = currentState.pendingDeduplicationHandlers.filter(::isFlowStartEvent) + val flowStartEvents = startingState.pendingDeduplicationHandlers.filter(::isFlowStartEvent) val newCheckpoint = startingState.checkpoint.copy(status = Checkpoint.FlowStatus.HOSPITALIZED) + currentState = startingState.copy( + checkpoint = startingState.checkpoint.copy( + status = Checkpoint.FlowStatus.HOSPITALIZED, + checkpointState = startingState.checkpoint.checkpointState.copy( + numberOfCommits = startingState.checkpoint.checkpointState.numberOfCommits + 1 + ) + ), + pendingDeduplicationHandlers = startingState.pendingDeduplicationHandlers - flowStartEvents + ) actions += Action.CreateTransaction actions += Action.PersistDeduplicationFacts(flowStartEvents) - actions += Action.PersistCheckpoint(context.id, newCheckpoint, isCheckpointUpdate = currentState.isAnyCheckpointPersisted) - actions += Action.CommitTransaction + actions += Action.PersistCheckpoint(context.id, newCheckpoint, isCheckpointUpdate = startingState.isAnyCheckpointPersisted) + actions += Action.CommitTransaction(currentState) actions += Action.AcknowledgeMessages(flowStartEvents) - currentState = currentState.copy( - checkpoint = startingState.checkpoint.copy(status = Checkpoint.FlowStatus.HOSPITALIZED), - pendingDeduplicationHandlers = currentState.pendingDeduplicationHandlers - flowStartEvents - ) FlowContinuation.ProcessEvents } } @@ -394,15 +393,11 @@ class TopLevelTransition( private fun pausedFlowTransition(): TransitionResult { return builder { if (!startingState.isFlowResumed) { - actions.add(Action.CreateTransaction) + actions += Action.CreateTransaction } - actions.addAll( - arrayOf( - Action.UpdateFlowStatus(context.id, Checkpoint.FlowStatus.PAUSED), - Action.CommitTransaction, - Action.MoveFlowToPaused(currentState) - ) - ) + actions += Action.UpdateFlowStatus(context.id, Checkpoint.FlowStatus.PAUSED) + actions += Action.CommitTransaction(currentState) + actions += Action.MoveFlowToPaused(currentState) FlowContinuation.Abort } } diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/UnstartedFlowTransition.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/UnstartedFlowTransition.kt index 7361943cde..b250b42232 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/UnstartedFlowTransition.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/transitions/UnstartedFlowTransition.kt @@ -27,14 +27,14 @@ class UnstartedFlowTransition( createInitialCheckpoint() } - actions.add(Action.SignalFlowHasStarted(context.id)) + actions += Action.SignalFlowHasStarted(context.id) if (unstarted.flowStart is FlowStart.Initiated) { initialiseInitiatedSession(unstarted.flowStart) } currentState = currentState.copy(isFlowResumed = true) - actions.add(Action.CreateTransaction) + actions += Action.CreateTransaction FlowContinuation.Resume(null) } } @@ -73,16 +73,14 @@ class UnstartedFlowTransition( // Create initial checkpoint and acknowledge triggering messages. private fun TransitionBuilder.createInitialCheckpoint() { - actions.addAll(arrayOf( - Action.CreateTransaction, - Action.PersistCheckpoint(context.id, currentState.checkpoint, isCheckpointUpdate = currentState.isAnyCheckpointPersisted), - Action.PersistDeduplicationFacts(currentState.pendingDeduplicationHandlers), - Action.CommitTransaction, - Action.AcknowledgeMessages(currentState.pendingDeduplicationHandlers) - )) - currentState = currentState.copy( - pendingDeduplicationHandlers = emptyList(), - isAnyCheckpointPersisted = true + currentState = startingState.copy( + pendingDeduplicationHandlers = emptyList(), + isAnyCheckpointPersisted = true ) + actions += Action.CreateTransaction + actions += Action.PersistCheckpoint(context.id, startingState.checkpoint, isCheckpointUpdate = startingState.isAnyCheckpointPersisted) + actions += Action.PersistDeduplicationFacts(startingState.pendingDeduplicationHandlers) + actions += Action.CommitTransaction(currentState) + actions += Action.AcknowledgeMessages(startingState.pendingDeduplicationHandlers) } } From 797ecf3b7cb234cca20f7aa70adcfe6fd337c77b Mon Sep 17 00:00:00 2001 From: Joseph Zuniga-Daly Date: Tue, 25 Aug 2020 12:00:37 +0100 Subject: [PATCH 25/25] Don't change api-current because we are about to regenerate it --- .ci/api-current.txt | 550 -------------------------------------------- 1 file changed, 550 deletions(-) diff --git a/.ci/api-current.txt b/.ci/api-current.txt index 0c7554da00..10374f09e3 100644 --- a/.ci/api-current.txt +++ b/.ci/api-current.txt @@ -478,8 +478,6 @@ public interface net.corda.core.contracts.Attachment extends net.corda.core.cont public interface net.corda.core.contracts.AttachmentConstraint public abstract boolean isSatisfiedBy(net.corda.core.contracts.Attachment) ## -public final class net.corda.core.contracts.AttachmentConstraintKt extends java.lang.Object -## @CordaSerializable public final class net.corda.core.contracts.AttachmentResolutionException extends net.corda.core.flows.FlowException public (net.corda.core.crypto.SecureHash) @@ -502,12 +500,6 @@ public @interface net.corda.core.contracts.BelongsToContract public abstract Class value() ## @CordaSerializable -public final class net.corda.core.contracts.BrokenAttachmentException extends net.corda.core.flows.FlowException - public (net.corda.core.crypto.SecureHash, String, Throwable) - @NotNull - public final net.corda.core.crypto.SecureHash getAttachmentId() -## -@CordaSerializable public final class net.corda.core.contracts.Command extends java.lang.Object public (T, java.security.PublicKey) public (T, java.util.List) @@ -577,7 +569,6 @@ public interface net.corda.core.contracts.Contract public abstract void verify(net.corda.core.transactions.LedgerTransaction) ## @DoNotImplement -@CordaSerializable public final class net.corda.core.contracts.ContractAttachment extends java.lang.Object implements net.corda.core.contracts.Attachment public (net.corda.core.contracts.Attachment, String) public (net.corda.core.contracts.Attachment, String, java.util.Set) @@ -656,11 +647,6 @@ public final class net.corda.core.contracts.HashAttachmentConstraint extends jav public boolean isSatisfiedBy(net.corda.core.contracts.Attachment) @NotNull public String toString() - public static final net.corda.core.contracts.HashAttachmentConstraint$Companion Companion -## -public static final class net.corda.core.contracts.HashAttachmentConstraint$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) - public final boolean getDisableHashConstraints() ## @CordaSerializable public final class net.corda.core.contracts.InsufficientBalanceException extends net.corda.core.flows.FlowException @@ -689,20 +675,15 @@ public final class net.corda.core.contracts.Issued extends java.lang.Object public @interface net.corda.core.contracts.LegalProseReference public abstract String uri() ## -@DoNotImplement @CordaSerializable public final class net.corda.core.contracts.LinearPointer extends net.corda.core.contracts.StatePointer - @DeprecatedConstructorForDeserialization public (net.corda.core.contracts.UniqueIdentifier, Class) - public (net.corda.core.contracts.UniqueIdentifier, Class, boolean) - public (net.corda.core.contracts.UniqueIdentifier, Class, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public boolean equals(Object) @NotNull public net.corda.core.contracts.UniqueIdentifier getPointer() @NotNull public Class getType() public int hashCode() - public boolean isResolved() @NotNull public net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull @@ -890,7 +871,6 @@ public final class net.corda.core.contracts.StateAndRef extends java.lang.Object @NotNull public String toString() ## -@DoNotImplement @CordaSerializable public abstract class net.corda.core.contracts.StatePointer extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -898,15 +878,10 @@ public abstract class net.corda.core.contracts.StatePointer extends java.lang.Ob public abstract Object getPointer() @NotNull public abstract Class getType() - public abstract boolean isResolved() @NotNull public abstract net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull public abstract net.corda.core.contracts.StateAndRef resolve(net.corda.core.transactions.LedgerTransaction) - public static final net.corda.core.contracts.StatePointer$Companion Companion -## -public static final class net.corda.core.contracts.StatePointer$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) ## @CordaSerializable public final class net.corda.core.contracts.StateRef extends java.lang.Object @@ -924,20 +899,15 @@ public final class net.corda.core.contracts.StateRef extends java.lang.Object @NotNull public String toString() ## -@DoNotImplement @CordaSerializable public final class net.corda.core.contracts.StaticPointer extends net.corda.core.contracts.StatePointer - @DeprecatedConstructorForDeserialization public (net.corda.core.contracts.StateRef, Class) - public (net.corda.core.contracts.StateRef, Class, boolean) - public (net.corda.core.contracts.StateRef, Class, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public boolean equals(Object) @NotNull public net.corda.core.contracts.StateRef getPointer() @NotNull public Class getType() public int hashCode() - public boolean isResolved() @NotNull public net.corda.core.contracts.StateAndRef resolve(net.corda.core.node.ServiceHub) @NotNull @@ -1040,17 +1010,12 @@ public final class net.corda.core.contracts.TransactionState extends java.lang.O ## public final class net.corda.core.contracts.TransactionStateKt extends java.lang.Object ## -@CordaSerializable public abstract class net.corda.core.contracts.TransactionVerificationException extends net.corda.core.flows.FlowException public (net.corda.core.crypto.SecureHash, String, Throwable) @NotNull public final net.corda.core.crypto.SecureHash getTxId() ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$BrokenTransactionException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) -## -@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ConflictingAttachmentsRejection extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, String) @NotNull @@ -1058,7 +1023,6 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ConstraintPropagationRejection extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, String, net.corda.core.contracts.AttachmentConstraint, net.corda.core.contracts.AttachmentConstraint) @NotNull public final String getContractClass() @@ -1071,7 +1035,6 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$ContractCreationError extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String, Throwable) public (net.corda.core.crypto.SecureHash, String, Throwable, String) @NotNull public final String getContractClass() @@ -1089,32 +1052,12 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public static net.corda.core.contracts.TransactionVerificationException$Direction[] values() ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$DuplicateAttachmentsRejection extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.Attachment) - @NotNull - public final net.corda.core.contracts.Attachment getAttachmentId() -## -@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$DuplicateInputStates extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, net.corda.core.utilities.NonEmptySet) @NotNull public final net.corda.core.utilities.NonEmptySet getDuplicates() ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$InvalidAttachmentException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, net.corda.core.crypto.SecureHash) - @NotNull - public final net.corda.core.crypto.SecureHash getAttachmentHash() -## -@CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$InvalidConstraintRejection extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String, String) - @NotNull - public final String getContractClass() - @NotNull - public final String getReason() -## -@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$InvalidNotaryChange extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash) ## @@ -1125,11 +1068,6 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public final String getContractClass() ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$MissingNetworkParametersException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) - public (net.corda.core.crypto.SecureHash, net.corda.core.crypto.SecureHash) -## -@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$MoreThanOneNotary extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash) ## @@ -1144,8 +1082,6 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$OverlappingAttachmentsException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, String) - @NotNull - public final String getPath() ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$PackageOwnershipException extends net.corda.core.contracts.TransactionVerificationException @@ -1165,13 +1101,11 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionContractConflictException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.TransactionState, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionDuplicateEncumbranceException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, int) - public (net.corda.core.crypto.SecureHash, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionMissingEncumbranceException extends net.corda.core.contracts.TransactionVerificationException @@ -1181,34 +1115,18 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept public final int getMissing() ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNetworkParameterOrderingException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) - public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.StateRef, net.corda.core.node.NetworkParameters, net.corda.core.node.NetworkParameters) -## -@CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNonMatchingEncumbranceException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, java.util.Collection) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionNotaryMismatchEncumbranceException extends net.corda.core.contracts.TransactionVerificationException public (net.corda.core.crypto.SecureHash, int, int, net.corda.core.identity.Party, net.corda.core.identity.Party) - public (net.corda.core.crypto.SecureHash, String) ## @CordaSerializable public static final class net.corda.core.contracts.TransactionVerificationException$TransactionRequiredContractUnspecifiedException extends net.corda.core.contracts.TransactionVerificationException - public (net.corda.core.crypto.SecureHash, String) public (net.corda.core.crypto.SecureHash, net.corda.core.contracts.TransactionState) ## @CordaSerializable -public static final class net.corda.core.contracts.TransactionVerificationException$UntrustedAttachmentsException extends net.corda.core.CordaException - public (net.corda.core.crypto.SecureHash, java.util.List) - @NotNull - public final java.util.List getIds() - @NotNull - public final net.corda.core.crypto.SecureHash getTxId() -## -@CordaSerializable public abstract class net.corda.core.contracts.TypeOnlyCommandData extends java.lang.Object implements net.corda.core.contracts.CommandData public () public boolean equals(Object) @@ -1449,48 +1367,6 @@ public final class net.corda.core.cordapp.CordappContext extends java.lang.Objec public static final class net.corda.core.cordapp.CordappContext$Companion extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) ## -@CordaSerializable -public final class net.corda.core.cordapp.CordappInfo extends java.lang.Object - public (String, String, String, int, int, String, String, String, net.corda.core.crypto.SecureHash$SHA256) - @NotNull - public final String component1() - @NotNull - public final String component2() - @NotNull - public final String component3() - public final int component4() - public final int component5() - @NotNull - public final String component6() - @NotNull - public final String component7() - @NotNull - public final String component8() - @NotNull - public final net.corda.core.crypto.SecureHash$SHA256 component9() - @NotNull - public final net.corda.core.cordapp.CordappInfo copy(String, String, String, int, int, String, String, String, net.corda.core.crypto.SecureHash$SHA256) - public boolean equals(Object) - @NotNull - public final net.corda.core.crypto.SecureHash$SHA256 getJarHash() - @NotNull - public final String getLicence() - public final int getMinimumPlatformVersion() - @NotNull - public final String getName() - @NotNull - public final String getShortName() - public final int getTargetPlatformVersion() - @NotNull - public final String getType() - @NotNull - public final String getVendor() - @NotNull - public final String getVersion() - public int hashCode() - @NotNull - public String toString() -## @DoNotImplement public interface net.corda.core.cordapp.CordappProvider @NotNull @@ -1652,8 +1528,6 @@ public final class net.corda.core.crypto.CordaObjectIdentifier extends java.lang ## public final class net.corda.core.crypto.CordaSecurityProvider extends java.security.Provider public () - @Nullable - public java.security.Provider$Service getService(String, String) public static final net.corda.core.crypto.CordaSecurityProvider$Companion Companion @NotNull public static final String PROVIDER_NAME = "Corda" @@ -1806,9 +1680,6 @@ public static class net.corda.core.crypto.DigitalSignature$WithKey extends net.c @NotNull public final net.corda.core.crypto.DigitalSignature withoutKey() ## -public final class net.corda.core.crypto.DummySecureRandom extends java.security.SecureRandom - public static final net.corda.core.crypto.DummySecureRandom INSTANCE -## public abstract class net.corda.core.crypto.MerkleTree extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @NotNull @@ -1989,8 +1860,6 @@ public static final class net.corda.core.crypto.SecureHash$Companion extends jav @CordaSerializable public static final class net.corda.core.crypto.SecureHash$SHA256 extends net.corda.core.crypto.SecureHash public (byte[]) - public boolean equals(Object) - public int hashCode() ## public final class net.corda.core.crypto.SecureHashKt extends java.lang.Object @NotNull @@ -2285,17 +2154,11 @@ public class net.corda.core.flows.DataVendingFlow extends net.corda.core.flows.F @Suspendable protected void verifyDataRequest(net.corda.core.internal.FetchDataFlow$Request$Data) ## -@DoNotImplement -public interface net.corda.core.flows.Destination -## @InitiatingFlow public final class net.corda.core.flows.FinalityFlow extends net.corda.core.flows.FlowLogic public (net.corda.core.transactions.SignedTransaction) public (net.corda.core.transactions.SignedTransaction, java.util.Collection) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, java.util.Collection, net.corda.core.utilities.ProgressTracker) - public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord) - public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord, net.corda.core.utilities.ProgressTracker) - public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.node.StatesToRecord, net.corda.core.utilities.ProgressTracker, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.utilities.ProgressTracker) public (net.corda.core.transactions.SignedTransaction, java.util.Collection, net.corda.core.utilities.ProgressTracker, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.transactions.SignedTransaction, java.util.Set) @@ -2475,9 +2338,6 @@ public abstract class net.corda.core.flows.FlowLogic extends java.lang.Object public final net.corda.core.node.ServiceHub getServiceHub() @Suspendable @NotNull - public final net.corda.core.flows.FlowSession initiateFlow(net.corda.core.flows.Destination) - @Suspendable - @NotNull public final net.corda.core.flows.FlowSession initiateFlow(net.corda.core.identity.Party) @Suspendable public final void persistFlowStackSnapshot() @@ -2557,8 +2417,6 @@ public abstract class net.corda.core.flows.FlowSession extends java.lang.Object @Suspendable @NotNull public abstract net.corda.core.flows.FlowInfo getCounterpartyFlowInfo(boolean) - @NotNull - public abstract net.corda.core.flows.Destination getDestination() @Suspendable @NotNull public abstract net.corda.core.utilities.UntrustworthyData receive(Class) @@ -2614,13 +2472,6 @@ public static final class net.corda.core.flows.FlowStackSnapshot$Frame extends j @NotNull public String toString() ## -@CordaSerializable -public class net.corda.core.flows.HospitalizeFlowException extends net.corda.core.CordaRuntimeException - public () - public (String) - public (String, Throwable) - public (Throwable) -## public interface net.corda.core.flows.IdentifiableException @Nullable public Long getErrorId() @@ -2638,22 +2489,6 @@ public @interface net.corda.core.flows.InitiatingFlow public abstract int version() ## @CordaSerializable -public final class net.corda.core.flows.MaybeSerializedSignedTransaction extends java.lang.Object implements net.corda.core.contracts.NamedByHash - public (net.corda.core.crypto.SecureHash, net.corda.core.serialization.SerializedBytes, net.corda.core.transactions.SignedTransaction) - @Nullable - public final net.corda.core.transactions.SignedTransaction get() - @NotNull - public net.corda.core.crypto.SecureHash getId() - @Nullable - public final net.corda.core.transactions.SignedTransaction getNonSerialised() - @Nullable - public final net.corda.core.serialization.SerializedBytes getSerialized() - public final boolean isNull() - @NotNull - public final String payloadContentDescription() - public final int serializedByteCount() -## -@CordaSerializable public final class net.corda.core.flows.NotarisationPayload extends java.lang.Object public (Object, net.corda.core.flows.NotarisationRequestSignature) @NotNull @@ -2727,11 +2562,6 @@ public final class net.corda.core.flows.NotaryChangeFlow extends net.corda.core. @CordaSerializable public abstract class net.corda.core.flows.NotaryError extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) - public static final net.corda.core.flows.NotaryError$Companion Companion - public static final int NUM_STATES = 5 -## -public static final class net.corda.core.flows.NotaryError$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) ## @CordaSerializable public static final class net.corda.core.flows.NotaryError$Conflict extends net.corda.core.flows.NotaryError @@ -2838,10 +2668,6 @@ public final class net.corda.core.flows.NotaryFlow extends java.lang.Object public static class net.corda.core.flows.NotaryFlow$Client extends net.corda.core.internal.BackpressureAwareTimedFlow public (net.corda.core.transactions.SignedTransaction) public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker) - public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker, boolean) - public (net.corda.core.transactions.SignedTransaction, net.corda.core.utilities.ProgressTracker, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.transactions.SignedTransaction, boolean) - public (net.corda.core.transactions.SignedTransaction, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) @Suspendable @NotNull public java.util.List call() @@ -3157,7 +2983,6 @@ public final class net.corda.core.identity.IdentityUtils extends java.lang.Objec public static final java.util.Map> groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, java.util.Collection) @NotNull public static final java.util.Map> groupPublicKeysByWellKnownParty(net.corda.core.node.ServiceHub, java.util.Collection, boolean) - public static final boolean x500Matches(String, boolean, net.corda.core.identity.CordaX500Name) ## @DoNotImplement @CordaSerializable @@ -3253,8 +3078,6 @@ public interface net.corda.core.messaging.CordaRPCOps extends net.corda.core.mes @NotNull public abstract net.corda.core.messaging.DataFeed networkParametersFeed() @NotNull - public abstract net.corda.core.node.NodeDiagnosticInfo nodeDiagnosticInfo() - @NotNull public abstract net.corda.core.node.NodeInfo nodeInfo() @Nullable public abstract net.corda.core.node.NodeInfo nodeInfoFromParty(net.corda.core.identity.AbstractParty) @@ -3558,23 +3381,10 @@ public static final class net.corda.core.messaging.StateMachineUpdate$Removed ex ## @DoNotImplement public interface net.corda.core.node.AppServiceHub extends net.corda.core.node.ServiceHub - @NotNull - public abstract net.corda.core.node.services.vault.CordaTransactionSupport getDatabase() - public abstract void register(int, kotlin.jvm.functions.Function1) - public abstract void register(int, net.corda.core.node.services.ServiceLifecycleObserver) @NotNull public abstract net.corda.core.messaging.FlowHandle startFlow(net.corda.core.flows.FlowLogic) @NotNull public abstract net.corda.core.messaging.FlowProgressHandle startTrackedFlow(net.corda.core.flows.FlowLogic) - public static final net.corda.core.node.AppServiceHub$Companion Companion - public static final int SERVICE_PRIORITY_HIGH = 200 - public static final int SERVICE_PRIORITY_LOW = 20 - public static final int SERVICE_PRIORITY_NORMAL = 100 -## -public static final class net.corda.core.node.AppServiceHub$Companion extends java.lang.Object - public static final int SERVICE_PRIORITY_HIGH = 200 - public static final int SERVICE_PRIORITY_LOW = 20 - public static final int SERVICE_PRIORITY_NORMAL = 100 ## public @interface net.corda.core.node.AutoAcceptable ## @@ -3625,34 +3435,6 @@ public final class net.corda.core.node.NetworkParameters extends java.lang.Objec public String toString() ## @CordaSerializable -public final class net.corda.core.node.NodeDiagnosticInfo extends java.lang.Object - public (String, String, int, String, java.util.List) - @NotNull - public final String component1() - @NotNull - public final String component2() - public final int component3() - @NotNull - public final String component4() - @NotNull - public final java.util.List component5() - @NotNull - public final net.corda.core.node.NodeDiagnosticInfo copy(String, String, int, String, java.util.List) - public boolean equals(Object) - @NotNull - public final java.util.List getCordapps() - public final int getPlatformVersion() - @NotNull - public final String getRevision() - @NotNull - public final String getVendor() - @NotNull - public final String getVersion() - public int hashCode() - @NotNull - public String toString() -## -@CordaSerializable public final class net.corda.core.node.NodeInfo extends java.lang.Object public (java.util.List, java.util.List, int, long) @NotNull @@ -3677,7 +3459,6 @@ public final class net.corda.core.node.NodeInfo extends java.lang.Object public final net.corda.core.identity.PartyAndCertificate identityAndCertFromX500Name(net.corda.core.identity.CordaX500Name) @NotNull public final net.corda.core.identity.Party identityFromX500Name(net.corda.core.identity.CordaX500Name) - public final boolean isLegalIdentity(net.corda.core.identity.CordaX500Name) public final boolean isLegalIdentity(net.corda.core.identity.Party) @NotNull public String toString() @@ -3721,8 +3502,6 @@ public interface net.corda.core.node.ServiceHub extends net.corda.core.node.Serv @NotNull public abstract net.corda.core.node.services.ContractUpgradeService getContractUpgradeService() @NotNull - public abstract net.corda.core.node.services.diagnostics.DiagnosticsService getDiagnosticsService() - @NotNull public abstract net.corda.core.node.services.KeyManagementService getKeyManagementService() @NotNull public abstract net.corda.core.node.NodeInfo getMyInfo() @@ -3771,8 +3550,6 @@ public interface net.corda.core.node.ServicesForResolution public abstract net.corda.core.contracts.TransactionState loadState(net.corda.core.contracts.StateRef) @NotNull public abstract java.util.Set> loadStates(java.util.Set) - @NotNull - public net.corda.core.transactions.LedgerTransaction specialise(net.corda.core.transactions.LedgerTransaction) ## public final class net.corda.core.node.StatesToRecord extends java.lang.Enum public static net.corda.core.node.StatesToRecord valueOf(String) @@ -3811,18 +3588,11 @@ public interface net.corda.core.node.services.ContractUpgradeService ## public @interface net.corda.core.node.services.CordaService ## -public final class net.corda.core.node.services.CordaServiceCriticalFailureException extends java.lang.Exception - public (String) - public (String, Throwable) -## @DoNotImplement public interface net.corda.core.node.services.IdentityService public abstract void assertOwnership(net.corda.core.identity.Party, net.corda.core.identity.AnonymousParty) @Nullable public abstract net.corda.core.identity.PartyAndCertificate certificateFromKey(java.security.PublicKey) - @Suspendable - @Nullable - public abstract java.util.UUID externalIdForPublicKey(java.security.PublicKey) @NotNull public abstract Iterable getAllIdentities() @NotNull @@ -3836,9 +3606,6 @@ public interface net.corda.core.node.services.IdentityService @Nullable public abstract net.corda.core.identity.Party partyFromKey(java.security.PublicKey) @NotNull - public abstract Iterable publicKeysForExternalId(java.util.UUID) - public abstract void registerKey(java.security.PublicKey, net.corda.core.identity.Party, java.util.UUID) - @NotNull public abstract net.corda.core.identity.Party requireWellKnownPartyFromAnonymous(net.corda.core.identity.AbstractParty) @Nullable public abstract net.corda.core.identity.PartyAndCertificate verifyAndRegisterIdentity(net.corda.core.identity.PartyAndCertificate) @@ -3848,9 +3615,6 @@ public interface net.corda.core.node.services.IdentityService public abstract net.corda.core.identity.Party wellKnownPartyFromAnonymous(net.corda.core.identity.AbstractParty) @Nullable public abstract net.corda.core.identity.Party wellKnownPartyFromX500Name(net.corda.core.identity.CordaX500Name) - public static final net.corda.core.node.services.IdentityService$Companion Companion -## -public static final class net.corda.core.node.services.IdentityService$Companion extends java.lang.Object ## @DoNotImplement public interface net.corda.core.node.services.KeyManagementService @@ -3861,13 +3625,7 @@ public interface net.corda.core.node.services.KeyManagementService public abstract java.security.PublicKey freshKey() @Suspendable @NotNull - public abstract java.security.PublicKey freshKey(java.util.UUID) - @Suspendable - @NotNull public abstract net.corda.core.identity.PartyAndCertificate freshKeyAndCert(net.corda.core.identity.PartyAndCertificate, boolean) - @Suspendable - @NotNull - public abstract net.corda.core.identity.PartyAndCertificate freshKeyAndCert(net.corda.core.identity.PartyAndCertificate, boolean, java.util.UUID) @NotNull public abstract java.util.Set getKeys() @Suspendable @@ -4010,10 +3768,6 @@ public static final class net.corda.core.node.services.PartyInfo$SingleNode exte @NotNull public String toString() ## -public final class net.corda.core.node.services.ServiceLifecycleEvent extends java.lang.Enum - public static net.corda.core.node.services.ServiceLifecycleEvent valueOf(String) - public static net.corda.core.node.services.ServiceLifecycleEvent[] values() -## public interface net.corda.core.node.services.ServiceLifecycleObserver public abstract void onServiceLifecycleEvent(net.corda.core.node.services.ServiceLifecycleEvent) ## @@ -4242,8 +3996,6 @@ public static final class net.corda.core.node.services.Vault$UpdateType extends @CordaSerializable public final class net.corda.core.node.services.VaultQueryException extends net.corda.core.flows.FlowException public (String) - public (String, Exception) - public (String, Exception, int, kotlin.jvm.internal.DefaultConstructorMarker) ## @DoNotImplement public interface net.corda.core.node.services.VaultService @@ -4293,34 +4045,6 @@ public interface net.corda.core.node.services.VaultService public final class net.corda.core.node.services.VaultServiceKt extends java.lang.Object public static final int MAX_CONSTRAINT_DATA_SIZE = 20000 ## -@DoNotImplement -public interface net.corda.core.node.services.diagnostics.DiagnosticsService - @NotNull - public abstract net.corda.core.node.services.diagnostics.NodeVersionInfo nodeVersionInfo() -## -public final class net.corda.core.node.services.diagnostics.NodeVersionInfo extends java.lang.Object - public (String, String, int, String) - @NotNull - public final String component1() - @NotNull - public final String component2() - public final int component3() - @NotNull - public final String component4() - @NotNull - public final net.corda.core.node.services.diagnostics.NodeVersionInfo copy(String, String, int, String) - public boolean equals(Object) - public final int getPlatformVersion() - @NotNull - public final String getReleaseVersion() - @NotNull - public final String getRevision() - @NotNull - public final String getVendor() - public int hashCode() - @NotNull - public String toString() -## @CordaSerializable public final class net.corda.core.node.services.vault.AggregateFunctionType extends java.lang.Enum public static net.corda.core.node.services.vault.AggregateFunctionType valueOf(String) @@ -4347,13 +4071,9 @@ public static final class net.corda.core.node.services.vault.AttachmentQueryCrit @CordaSerializable public static final class net.corda.core.node.services.vault.AttachmentQueryCriteria$AttachmentsQueryCriteria extends net.corda.core.node.services.vault.AttachmentQueryCriteria public () - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate>, net.corda.core.node.services.vault.ColumnPredicate>, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate) public (net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, net.corda.core.node.services.vault.ColumnPredicate, int, kotlin.jvm.internal.DefaultConstructorMarker) @@ -4862,10 +4582,6 @@ public static final class net.corda.core.node.services.vault.ColumnPredicate$Nul @NotNull public String toString() ## -@DoNotImplement -public interface net.corda.core.node.services.vault.CordaTransactionSupport - public abstract T transaction(kotlin.jvm.functions.Function1) -## @CordaSerializable public abstract class net.corda.core.node.services.vault.CriteriaExpression extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -5063,10 +4779,6 @@ public abstract static class net.corda.core.node.services.vault.QueryCriteria$Co @Nullable public abstract java.util.Set> getContractStateTypes() @Nullable - public java.util.List getExactParticipants() - @NotNull - public java.util.List getExternalIds() - @Nullable public java.util.List getParticipants() @NotNull public net.corda.core.node.services.Vault$RelevancyStatus getRelevancyStatus() @@ -5077,30 +4789,17 @@ public abstract static class net.corda.core.node.services.vault.QueryCriteria$Co ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria - @DeprecatedConstructorForDeserialization public () - @DeprecatedConstructorForDeserialization public (java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) - public (java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final java.util.List component1() @Nullable @@ -5117,20 +4816,14 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi public final java.util.Set> component7() @NotNull public final net.corda.core.node.services.Vault$RelevancyStatus component8() - @Nullable - public final java.util.List component9() @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) - @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria copy(java.util.List, java.util.List, net.corda.core.node.services.vault.ColumnPredicate, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) public boolean equals(Object) @Nullable public java.util.Set> getContractStateTypes() @Nullable - public java.util.List getExactParticipants() - @Nullable public final java.util.List getIssuer() @Nullable public final java.util.List getIssuerRef() @@ -5152,8 +4845,6 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withContractStateTypes(java.util.Set>) @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withExactParticipants(java.util.List) - @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withIssuer(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$FungibleAssetQueryCriteria withOwner(java.util.List) @@ -5214,33 +4905,18 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Fungi ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria - @DeprecatedConstructorForDeserialization public () - @DeprecatedConstructorForDeserialization public (java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) - public (java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) - @DeprecatedConstructorForDeserialization public (java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final java.util.List component1() @@ -5254,20 +4930,14 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Linea public final java.util.Set> component5() @NotNull public final net.corda.core.node.services.Vault$RelevancyStatus component6() - @Nullable - public final java.util.List component7() @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) - @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria copy(java.util.List, java.util.List, java.util.List, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus, java.util.List) public boolean equals(Object) @Nullable public java.util.Set> getContractStateTypes() @Nullable - public java.util.List getExactParticipants() - @Nullable public final java.util.List getExternalId() @Nullable public java.util.List getParticipants() @@ -5285,8 +4955,6 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Linea @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withContractStateTypes(java.util.Set>) @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withExactParticipants(java.util.List) - @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withExternalId(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$LinearStateQueryCriteria withParticipants(java.util.List) @@ -5356,13 +5024,9 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$TimeI ## @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$VaultCustomQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set>) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set>, net.corda.core.node.services.Vault$RelevancyStatus) public (net.corda.core.node.services.vault.CriteriaExpression, net.corda.core.node.services.Vault$StateStatus, java.util.Set, net.corda.core.node.services.Vault$RelevancyStatus, int, kotlin.jvm.internal.DefaultConstructorMarker) @@ -5404,38 +5068,19 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @CordaSerializable public static final class net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria extends net.corda.core.node.services.vault.QueryCriteria$CommonQueryCriteria public () - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List) - @DeprecatedConstructorForDeserialization public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) - @DeprecatedConstructorForDeserialization - public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List) - @DeprecatedConstructorForDeserialization - public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List) - public (net.corda.core.node.services.Vault$StateStatus, java.util.Set, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.core.node.services.Vault$StateStatus component1() @Nullable public final java.util.List component10() - @NotNull - public final java.util.List component11() - @Nullable - public final java.util.List component12() @Nullable public final java.util.Set> component2() @Nullable @@ -5456,10 +5101,6 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List) - @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List) - @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria copy(net.corda.core.node.services.Vault$StateStatus, java.util.Set>, java.util.List, java.util.List, net.corda.core.node.services.vault.QueryCriteria$SoftLockingCondition, net.corda.core.node.services.vault.QueryCriteria$TimeCondition, net.corda.core.node.services.Vault$RelevancyStatus, java.util.Set, java.util.Set, java.util.List, java.util.List, java.util.List) public boolean equals(Object) @NotNull public java.util.Set getConstraintTypes() @@ -5468,10 +5109,6 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @Nullable public java.util.Set> getContractStateTypes() @Nullable - public java.util.List getExactParticipants() - @NotNull - public java.util.List getExternalIds() - @Nullable public final java.util.List getNotary() @Nullable public java.util.List getParticipants() @@ -5497,10 +5134,6 @@ public static final class net.corda.core.node.services.vault.QueryCriteria$Vault @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withContractStateTypes(java.util.Set>) @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withExactParticipants(java.util.List) - @NotNull - public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withExternalIds(java.util.List) - @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withNotary(java.util.List) @NotNull public final net.corda.core.node.services.vault.QueryCriteria$VaultQueryCriteria withParticipants(java.util.List) @@ -5529,11 +5162,6 @@ public final class net.corda.core.node.services.vault.QueryCriteriaUtils extends public static final int DEFAULT_PAGE_SIZE = 200 public static final int MAX_PAGE_SIZE = 2147483646 ## -@DoNotImplement -public interface net.corda.core.node.services.vault.SessionScope - @NotNull - public abstract org.hibernate.Session getSession() -## @CordaSerializable public final class net.corda.core.node.services.vault.Sort extends net.corda.core.node.services.vault.BaseSort public (java.util.Collection) @@ -5646,10 +5274,6 @@ public static final class net.corda.core.node.services.vault.SortAttribute$Stand @NotNull public String toString() ## -public final class net.corda.core.observable.Observables extends java.lang.Object - @NotNull - public static final rx.Observable continueOnError(rx.Observable) -## public final class net.corda.core.schemas.CommonSchema extends java.lang.Object public static final net.corda.core.schemas.CommonSchema INSTANCE ## @@ -5844,7 +5468,6 @@ public final class net.corda.core.serialization.SerializationAPIKt extends java. ## @DoNotImplement public interface net.corda.core.serialization.SerializationContext - public abstract boolean getCarpenterDisabled() @NotNull public abstract java.util.Set> getCustomSerializers() @NotNull @@ -5885,8 +5508,6 @@ public interface net.corda.core.serialization.SerializationContext @NotNull public abstract net.corda.core.serialization.SerializationContext withWhitelisted(Class) @NotNull - public abstract net.corda.core.serialization.SerializationContext withoutCarpenter() - @NotNull public abstract net.corda.core.serialization.SerializationContext withoutReferences() ## public static final class net.corda.core.serialization.SerializationContext$UseCase extends java.lang.Enum @@ -6089,7 +5710,6 @@ public static final class net.corda.core.transactions.ContractUpgradeFilteredTra @DoNotImplement public final class net.corda.core.transactions.ContractUpgradeLedgerTransaction extends net.corda.core.transactions.FullTransaction implements net.corda.core.transactions.TransactionWithSignatures public (java.util.List>, net.corda.core.identity.Party, net.corda.core.contracts.Attachment, String, net.corda.core.contracts.Attachment, net.corda.core.crypto.SecureHash, net.corda.core.contracts.PrivacySalt, java.util.List, net.corda.core.node.NetworkParameters) - public (java.util.List, net.corda.core.identity.Party, net.corda.core.contracts.Attachment, net.corda.core.contracts.Attachment, net.corda.core.crypto.SecureHash, net.corda.core.contracts.PrivacySalt, java.util.List, net.corda.core.node.NetworkParameters, net.corda.core.contracts.UpgradedContract, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final java.util.List> component1() @NotNull @@ -6140,10 +5760,6 @@ public final class net.corda.core.transactions.ContractUpgradeLedgerTransaction public int hashCode() @NotNull public String toString() - public static final net.corda.core.transactions.ContractUpgradeLedgerTransaction$Companion Companion -## -public static final class net.corda.core.transactions.ContractUpgradeLedgerTransaction$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) ## @DoNotImplement @CordaSerializable @@ -6277,7 +5893,6 @@ public abstract class net.corda.core.transactions.FullTransaction extends net.co public final class net.corda.core.transactions.LedgerTransaction extends net.corda.core.transactions.FullTransaction public (java.util.List>, java.util.List>, java.util.List>, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt) public (java.util.List>, java.util.List>, java.util.List>, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt, net.corda.core.node.NetworkParameters) - public (java.util.List, java.util.List, java.util.List, java.util.List, net.corda.core.crypto.SecureHash, net.corda.core.identity.Party, net.corda.core.contracts.TimeWindow, net.corda.core.contracts.PrivacySalt, net.corda.core.node.NetworkParameters, java.util.List, java.util.List, java.util.List, java.util.List, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final java.util.List> commandsOfType(Class) @NotNull @@ -6593,7 +6208,6 @@ public final class net.corda.core.transactions.SignedTransaction extends java.la public final net.corda.core.transactions.SignedTransaction withAdditionalSignatures(Iterable) public static final net.corda.core.transactions.SignedTransaction$Companion Companion ## -@CordaSerializable public static final class net.corda.core.transactions.SignedTransaction$SignaturesMissingException extends java.security.SignatureException implements net.corda.core.CordaThrowable, net.corda.core.contracts.NamedByHash public (java.util.Set, java.util.List, net.corda.core.crypto.SecureHash) public void addSuppressed(Throwable[]) @@ -6641,8 +6255,6 @@ public class net.corda.core.transactions.TransactionBuilder extends java.lang.Ob @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, String, net.corda.core.identity.Party, Integer, net.corda.core.contracts.AttachmentConstraint) @NotNull - public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, net.corda.core.contracts.AttachmentConstraint) - @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.ContractState, net.corda.core.identity.Party) @NotNull public final net.corda.core.transactions.TransactionBuilder addOutputState(net.corda.core.contracts.TransactionState) @@ -6889,8 +6501,6 @@ public final class net.corda.core.utilities.KotlinUtilsKt extends java.lang.Obje @NotNull public static final org.slf4j.Logger contextLogger(Object) public static final void debug(org.slf4j.Logger, kotlin.jvm.functions.Function0) - @NotNull - public static final org.slf4j.Logger detailedLogger() public static final int exactAdd(int, int) public static final long exactAdd(long, long) @NotNull @@ -7037,7 +6647,6 @@ public final class net.corda.core.utilities.ProgressTracker extends java.lang.Ob public final net.corda.core.utilities.ProgressTracker$Step nextStep() public final void setChildProgressTracker(net.corda.core.utilities.ProgressTracker$Step, net.corda.core.utilities.ProgressTracker) public final void setCurrentStep(net.corda.core.utilities.ProgressTracker$Step) - public static final net.corda.core.utilities.ProgressTracker$Companion Companion ## @CordaSerializable public abstract static class net.corda.core.utilities.ProgressTracker$Change extends java.lang.Object @@ -7114,14 +6723,12 @@ public static class net.corda.core.utilities.ProgressTracker$Step extends java.l public (String) @Nullable public net.corda.core.utilities.ProgressTracker childProgressTracker() - public boolean equals(Object) @NotNull public rx.Observable getChanges() @NotNull public java.util.Map getExtraAuditData() @NotNull public String getLabel() - public int hashCode() ## @CordaSerializable public static final class net.corda.core.utilities.ProgressTracker$UNSTARTED extends net.corda.core.utilities.ProgressTracker$Step @@ -7131,10 +6738,6 @@ public static final class net.corda.core.utilities.ProgressTracker$UNSTARTED ext public interface net.corda.core.utilities.PropertyDelegate public abstract T getValue(Object, kotlin.reflect.KProperty) ## -public final class net.corda.core.utilities.SgxSupport extends java.lang.Object - public static final boolean isInsideEnclave() - public static final net.corda.core.utilities.SgxSupport INSTANCE -## @CordaSerializable public abstract class net.corda.core.utilities.Try extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) @@ -7314,10 +6917,6 @@ public final class net.corda.testing.contracts.DummyContractV2 extends java.lang @NotNull public net.corda.core.contracts.AttachmentConstraint getLegacyContractConstraint() @NotNull - public static final net.corda.core.transactions.TransactionBuilder move(java.util.List>, net.corda.core.identity.AbstractParty) - @NotNull - public static final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef, net.corda.core.identity.AbstractParty) - @NotNull public net.corda.testing.contracts.DummyContractV2$State upgrade(net.corda.testing.contracts.DummyContract$State) public void verify(net.corda.core.transactions.LedgerTransaction) public static final net.corda.testing.contracts.DummyContractV2$Companion Companion @@ -7334,10 +6933,6 @@ public static final class net.corda.testing.contracts.DummyContractV2$Commands$M ## public static final class net.corda.testing.contracts.DummyContractV2$Companion extends java.lang.Object public (kotlin.jvm.internal.DefaultConstructorMarker) - @NotNull - public final net.corda.core.transactions.TransactionBuilder move(java.util.List>, net.corda.core.identity.AbstractParty) - @NotNull - public final net.corda.core.transactions.TransactionBuilder move(net.corda.core.contracts.StateAndRef, net.corda.core.identity.AbstractParty) ## public static final class net.corda.testing.contracts.DummyContractV2$State extends java.lang.Object implements net.corda.core.contracts.ContractState public (int, java.util.List) @@ -7356,8 +6951,6 @@ public static final class net.corda.testing.contracts.DummyContractV2$State exte public int hashCode() @NotNull public String toString() - @NotNull - public final kotlin.Pair withNewOwner(net.corda.core.identity.AbstractParty) ## public final class net.corda.testing.contracts.DummyContractV3 extends java.lang.Object implements net.corda.core.contracts.UpgradedContractWithLegacyConstraint public () @@ -7846,7 +7439,6 @@ public class net.corda.client.jackson.StringToMethodCallParser extends java.lang public final net.corda.client.jackson.StringToMethodCallParser.ParsedMethodCall parse(T, String) @NotNull public final Object[] parseArguments(String, java.util.List>, String) - public final void validateIsMatchingCtor(String, java.util.List>, String) public static final net.corda.client.jackson.StringToMethodCallParser$Companion Companion ## public static final class net.corda.client.jackson.StringToMethodCallParser$Companion extends java.lang.Object @@ -7875,9 +7467,6 @@ public static final class net.corda.client.jackson.StringToMethodCallParser$Unpa @NotNull public final String getParamName() ## -public static final class net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException$NoSuchFile extends net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException - public (String) -## public static final class net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException$ReflectionDataMissing extends net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException public (String, int) ## @@ -7904,7 +7493,6 @@ public interface net.corda.testing.driver.DriverDSL public abstract net.corda.core.concurrent.CordaFuture getDefaultNotaryNode() @NotNull public abstract java.util.List getNotaryHandles() - public abstract int nextPort() @NotNull public abstract net.corda.core.concurrent.CordaFuture startNode() @NotNull @@ -7912,8 +7500,6 @@ public interface net.corda.testing.driver.DriverDSL @NotNull public abstract net.corda.core.concurrent.CordaFuture startNode(net.corda.testing.driver.NodeParameters, net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) @NotNull - public abstract net.corda.core.concurrent.CordaFuture startNode(net.corda.testing.driver.NodeParameters, net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, String) - @NotNull public abstract net.corda.core.concurrent.CordaFuture startWebserver(net.corda.testing.driver.NodeHandle) @NotNull public abstract net.corda.core.concurrent.CordaFuture startWebserver(net.corda.testing.driver.NodeHandle, String) @@ -7926,8 +7512,6 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map) - public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map, int, kotlin.jvm.internal.DefaultConstructorMarker) public (boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, boolean) public final boolean component1() @NotNull @@ -7941,12 +7525,6 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O public final boolean component14() @Nullable public final java.util.Collection component15() - @Nullable - public final java.nio.file.Path component16() - @NotNull - public final java.util.List component17() - @NotNull - public final java.util.Map component18() @NotNull public final java.nio.file.Path component2() @NotNull @@ -7965,23 +7543,15 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O @NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection) @NotNull - public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Map, boolean, java.util.Collection, java.nio.file.Path, java.util.List, java.util.Map) - @NotNull public final net.corda.testing.driver.DriverParameters copy(boolean, java.nio.file.Path, net.corda.testing.driver.PortAllocation, net.corda.testing.driver.PortAllocation, java.util.Map, boolean, boolean, boolean, java.util.List, java.util.List, net.corda.testing.driver.JmxPolicy, net.corda.core.node.NetworkParameters, java.util.Set) public boolean equals(Object) @Nullable public final java.util.Collection getCordappsForAllNodes() @NotNull public final net.corda.testing.driver.PortAllocation getDebugPortAllocation() - @Nullable - public final java.nio.file.Path getDjvmBootstrapSource() - @NotNull - public final java.util.List getDjvmCordaSource() @NotNull public final java.nio.file.Path getDriverDirectory() @NotNull - public final java.util.Map getEnvironmentVariables() - @NotNull public final java.util.List getExtraCordappPackagesToScan() public final boolean getInMemoryDB() @NotNull @@ -8008,14 +7578,8 @@ public final class net.corda.testing.driver.DriverParameters extends java.lang.O @NotNull public final net.corda.testing.driver.DriverParameters withDebugPortAllocation(net.corda.testing.driver.PortAllocation) @NotNull - public final net.corda.testing.driver.DriverParameters withDjvmBootstrapSource(java.nio.file.Path) - @NotNull - public final net.corda.testing.driver.DriverParameters withDjvmCordaSource(java.util.List) - @NotNull public final net.corda.testing.driver.DriverParameters withDriverDirectory(java.nio.file.Path) @NotNull - public final net.corda.testing.driver.DriverParameters withEnvironmentVariables(java.util.Map) - @NotNull public final net.corda.testing.driver.DriverParameters withExtraCordappPackagesToScan(java.util.List) @NotNull public final net.corda.testing.driver.DriverParameters withInMemoryDB(boolean) @@ -8100,8 +7664,6 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>) public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>, String) - public (net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map, String, int, kotlin.jvm.internal.DefaultConstructorMarker) @Nullable public final net.corda.core.identity.CordaX500Name component1() @NotNull @@ -8118,14 +7680,10 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public final java.util.Collection component7() @NotNull public final java.util.Map>, Class>> component8() - @Nullable - public final String component9() @NotNull public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String) @NotNull public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>) - @NotNull - public final net.corda.testing.driver.NodeParameters copy(net.corda.core.identity.CordaX500Name, java.util.List, net.corda.testing.driver.VerifierType, java.util.Map, Boolean, String, java.util.Collection, java.util.Map>, ? extends Class>>, String) public boolean equals(Object) @NotNull public final java.util.Collection getAdditionalCordapps() @@ -8133,8 +7691,6 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj public final java.util.Map getCustomOverrides() @NotNull public final java.util.Map>, Class>> getFlowOverrides() - @Nullable - public final String getLogLevelOverride() @NotNull public final String getMaximumHeapSize() @Nullable @@ -8155,8 +7711,6 @@ public final class net.corda.testing.driver.NodeParameters extends java.lang.Obj @NotNull public final net.corda.testing.driver.NodeParameters withFlowOverrides(java.util.Map>, ? extends Class>>) @NotNull - public final net.corda.testing.driver.NodeParameters withLogLevelOverride(String) - @NotNull public final net.corda.testing.driver.NodeParameters withMaximumHeapSize(String) @NotNull public final net.corda.testing.driver.NodeParameters withProvidedName(net.corda.core.identity.CordaX500Name) @@ -8195,18 +7749,8 @@ public interface net.corda.testing.driver.OutOfProcess extends net.corda.testing public abstract class net.corda.testing.driver.PortAllocation extends java.lang.Object public () @NotNull - public static final net.corda.testing.driver.PortAllocation getDefaultAllocator() - @NotNull public final net.corda.core.utilities.NetworkHostAndPort nextHostAndPort() public abstract int nextPort() - public static final net.corda.testing.driver.PortAllocation$Companion Companion - public static final int DEFAULT_START_PORT = 10000 - public static final int FIRST_EPHEMERAL_PORT = 30000 -## -public static final class net.corda.testing.driver.PortAllocation$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) - @NotNull - public final net.corda.testing.driver.PortAllocation getDefaultAllocator() ## @DoNotImplement public static class net.corda.testing.driver.PortAllocation$Incremental extends net.corda.testing.driver.PortAllocation @@ -8215,11 +7759,6 @@ public static class net.corda.testing.driver.PortAllocation$Incremental extends public final java.util.concurrent.atomic.AtomicInteger getPortCounter() public int nextPort() ## -@DoNotImplement -public class net.corda.testing.driver.SharedMemoryIncremental extends net.corda.testing.driver.PortAllocation - public int nextPort() - public static net.corda.testing.driver.SharedMemoryIncremental INSTANCE -## public final class net.corda.testing.driver.VerifierType extends java.lang.Enum public static net.corda.testing.driver.VerifierType valueOf(String) public static net.corda.testing.driver.VerifierType[] values() @@ -8241,22 +7780,6 @@ public final class net.corda.testing.driver.WebserverHandle extends java.lang.Ob @NotNull public String toString() ## -public final class net.corda.testing.flows.FlowTestsUtilsKt extends java.lang.Object - @NotNull - public static final kotlin.Pair from(T, net.corda.core.flows.FlowSession) - @NotNull - public static final R from(java.util.Map>, net.corda.core.flows.FlowSession) - @NotNull - public static final kotlin.Pair> from(kotlin.reflect.KClass, net.corda.core.flows.FlowSession) - @Suspendable - @NotNull - public static final java.util.List> receiveAll(net.corda.core.flows.FlowLogic, Class, net.corda.core.flows.FlowSession, net.corda.core.flows.FlowSession...) - @Suspendable - @NotNull - public static final java.util.Map> receiveAll(net.corda.core.flows.FlowLogic, kotlin.Pair>, kotlin.Pair>...) - @NotNull - public static final rx.Observable registerCoreFlowFactory(net.corda.testing.node.internal.TestStartedNode, Class>, Class, kotlin.jvm.functions.Function1, boolean) -## @DoNotImplement public abstract class net.corda.testing.node.ClusterSpec extends java.lang.Object public () @@ -8450,21 +7973,16 @@ public final class net.corda.testing.node.MockNetworkNotarySpec extends java.lan public (net.corda.core.identity.CordaX500Name) public (net.corda.core.identity.CordaX500Name, boolean) public (net.corda.core.identity.CordaX500Name, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.identity.CordaX500Name, boolean, String) - public (net.corda.core.identity.CordaX500Name, boolean, String, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.core.identity.CordaX500Name component1() public final boolean component2() @NotNull public final net.corda.testing.node.MockNetworkNotarySpec copy(net.corda.core.identity.CordaX500Name, boolean) public boolean equals(Object) - @Nullable - public final String getClassName() @NotNull public final net.corda.core.identity.CordaX500Name getName() public final boolean getValidating() public int hashCode() - public final void setClassName(String) @NotNull public String toString() ## @@ -8581,7 +8099,6 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public (Iterable, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...) public (Iterable, net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, java.security.KeyPair...) - public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, java.security.KeyPair[], net.corda.core.node.services.KeyManagementService) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, java.security.KeyPair...) public (Iterable, net.corda.testing.core.TestIdentity, net.corda.core.node.services.IdentityService, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) public (Iterable, net.corda.testing.core.TestIdentity, java.security.KeyPair...) @@ -8594,8 +8111,6 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService) public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair...) - public (net.corda.core.identity.CordaX500Name, net.corda.core.node.services.IdentityService, java.security.KeyPair, java.security.KeyPair[], int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.nodeapi.internal.cordapp.CordappLoader, net.corda.core.node.services.IdentityService, net.corda.core.node.NetworkParameters, net.corda.testing.core.TestIdentity, java.security.KeyPair[], net.corda.core.node.services.KeyManagementService, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, net.corda.testing.core.TestIdentity...) public (net.corda.testing.core.TestIdentity, net.corda.testing.core.TestIdentity...) public final void addMockCordapp(String) @@ -8626,8 +8141,6 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem @NotNull public net.corda.core.cordapp.CordappProvider getCordappProvider() @NotNull - public net.corda.core.node.services.diagnostics.DiagnosticsService getDiagnosticsService() - @NotNull public net.corda.core.node.services.IdentityService getIdentityService() @NotNull public net.corda.core.node.services.KeyManagementService getKeyManagementService() @@ -8661,12 +8174,6 @@ public class net.corda.testing.node.MockServices extends java.lang.Object implem public static final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...) @NotNull public static final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...) - @NotNull - public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, java.util.Set, java.util.Set) - @NotNull - public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set) - @NotNull - public static final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set, net.corda.testing.internal.TestingNamedCacheFactory) public void recordTransactions(Iterable) public void recordTransactions(net.corda.core.node.StatesToRecord, Iterable) public void recordTransactions(net.corda.core.transactions.SignedTransaction, net.corda.core.transactions.SignedTransaction...) @@ -8695,12 +8202,6 @@ public static final class net.corda.testing.node.MockServices$Companion extends public final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.security.KeyPair...) @NotNull public final kotlin.Pair makeTestDatabaseAndMockServices(java.util.List, net.corda.core.node.services.IdentityService, net.corda.testing.core.TestIdentity, java.security.KeyPair...) - @NotNull - public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, java.util.Set, java.util.Set) - @NotNull - public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set) - @NotNull - public final kotlin.Pair makeTestDatabaseAndPersistentServices(java.util.List, net.corda.testing.core.TestIdentity, net.corda.core.node.NetworkParameters, java.util.Set, java.util.Set, net.corda.testing.internal.TestingNamedCacheFactory) ## public final class net.corda.testing.node.MockServicesKt extends java.lang.Object @NotNull @@ -8806,8 +8307,6 @@ public final class net.corda.testing.node.UnstartedMockNode extends java.lang.Ob public final int getId() @NotNull public final net.corda.testing.node.StartedMockNode getStarted() - @NotNull - public final T installCordaService(Class) public final boolean isStarted() @NotNull public final net.corda.testing.node.StartedMockNode start() @@ -8844,46 +8343,28 @@ public class net.corda.client.rpc.ConnectionFailureException extends net.corda.c ## public final class net.corda.client.rpc.CordaRPCClient extends java.lang.Object public (java.util.List) - public (java.util.List, java.util.Set>) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration) - public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, java.util.Set>) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set>) - public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (java.util.List, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort) - public (net.corda.core.utilities.NetworkHostAndPort, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, int, kotlin.jvm.internal.DefaultConstructorMarker) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set>) - public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (net.corda.core.utilities.NetworkHostAndPort, net.corda.client.rpc.CordaRPCClientConfiguration, net.corda.core.messaging.ClientRpcSslOptions, java.util.Set>) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader) public (net.corda.core.utilities.NetworkHostAndPort, net.corda.core.messaging.ClientRpcSslOptions, ClassLoader, int, kotlin.jvm.internal.DefaultConstructorMarker) @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String) @NotNull - public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.client.rpc.GracefulReconnect) - @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor) @NotNull - public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.client.rpc.GracefulReconnect) - @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.core.identity.CordaX500Name) @NotNull - public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.context.Trace, net.corda.core.context.Actor, net.corda.core.identity.CordaX500Name, net.corda.client.rpc.GracefulReconnect) - @NotNull public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.identity.CordaX500Name) - @NotNull - public final net.corda.client.rpc.CordaRPCConnection start(String, String, net.corda.core.identity.CordaX500Name, net.corda.client.rpc.GracefulReconnect) public final A use(String, String, kotlin.jvm.functions.Function1) public static final net.corda.client.rpc.CordaRPCClient$Companion Companion ## @@ -8959,33 +8440,12 @@ public static final class net.corda.client.rpc.CordaRPCClientConfiguration$Compa @DoNotImplement public final class net.corda.client.rpc.CordaRPCConnection extends java.lang.Object implements net.corda.client.rpc.RPCConnection public (net.corda.client.rpc.RPCConnection) - public (net.corda.client.rpc.RPCConnection, java.util.concurrent.ExecutorService, net.corda.client.rpc.internal.ReconnectingCordaRPCOps, kotlin.jvm.internal.DefaultConstructorMarker) public void close() public void forceClose() @NotNull public net.corda.core.messaging.CordaRPCOps getProxy() public int getServerProtocolVersion() public void notifyServerAndClose() - public static final net.corda.client.rpc.CordaRPCConnection$Companion Companion -## -public static final class net.corda.client.rpc.CordaRPCConnection$Companion extends java.lang.Object - public (kotlin.jvm.internal.DefaultConstructorMarker) -## -public final class net.corda.client.rpc.GracefulReconnect extends java.lang.Object - public () - public (Runnable, Runnable) - public (Runnable, Runnable, int) - public (Runnable, Runnable, int, int, kotlin.jvm.internal.DefaultConstructorMarker) - public (kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function0, int) - public (kotlin.jvm.functions.Function0, kotlin.jvm.functions.Function0, int, int, kotlin.jvm.internal.DefaultConstructorMarker) - public final int getMaxAttempts() - @NotNull - public final kotlin.jvm.functions.Function0 getOnDisconnect() - @NotNull - public final kotlin.jvm.functions.Function0 getOnReconnect() -## -public final class net.corda.client.rpc.MaxRpcRetryException extends net.corda.client.rpc.RPCException - public (int, reflect.Method, Throwable) ## public final class net.corda.client.rpc.PermissionException extends net.corda.core.CordaRuntimeException implements net.corda.core.ClientRelevantError, net.corda.nodeapi.exceptions.RpcSerializableError public (String) @@ -8994,7 +8454,6 @@ public final class net.corda.client.rpc.PermissionException extends net.corda.co ## @DoNotImplement public interface net.corda.client.rpc.RPCConnection extends java.io.Closeable - public abstract void close() public abstract void forceClose() @NotNull public abstract I getProxy() @@ -9008,18 +8467,9 @@ public class net.corda.client.rpc.RPCException extends net.corda.core.CordaRunti public @interface net.corda.client.rpc.RPCSinceVersion public abstract int version() ## -public class net.corda.client.rpc.UnrecoverableRPCException extends net.corda.client.rpc.RPCException - public (String, Throwable) - public (String, Throwable, int, kotlin.jvm.internal.DefaultConstructorMarker) -## public final class net.corda.client.rpc.UtilsKt extends java.lang.Object public static final void notUsed(rx.Observable) ## -public final class net.corda.client.rpc.reconnect.CouldNotStartFlowException extends net.corda.client.rpc.RPCException - public () - public (Throwable) - public (Throwable, int, kotlin.jvm.internal.DefaultConstructorMarker) -## public final class net.corda.finance.test.CashSchema extends java.lang.Object public static final net.corda.finance.test.CashSchema INSTANCE ##