mirror of
https://github.com/corda/corda.git
synced 2024-12-23 23:02:29 +00:00
11d0054fcc
* ENT-11055: Basic external verification Introduction of the external transaction verifier, a separate JVM process for verifying `SignedTransaction`s. The end goal is for this verifier to be built with Kotlin 1.2 so that it creates a compatible verification environment for transactions with 4.11 contracts. For now however the verifier is built against Kotlin 1.8, same as the node. External verification is enabled when the the system property `net.corda.node.verification.external` is set to `true`. When enabled, all verification requests made via `SignedTransaction.verify` are sent to the external verifier, regardless of the transaction content. It will do the vast bulk of the verification and then send the result back, namely if an exception occurred. If it did, then it's re-thrown in the node. The external verifier is a stateless process, with no connection to the node's database. All transaction resolution information needed to create the relevant ledger transaction object are made to the node, which waits in a loop servicing these requests until it receives the result. The verifier Jar is embedded in the Corda node Jar, and is extracted and run when needed for the first time. The node opens up a local port for the verifier to communicate with, which is specified to the verifier in the process command line. This all means there is no extra configuration or deployment required to support external verification. The existing code had some initial attempts and abstractions to support a future external verification feature. However, they were either incorrect or didn't quite fit. One such example was `TransactionVerifierService`. It incorrectly operated on the `LedgerTransaction` level, which doesn't work since the transaction needs to be first serialised. Instead a new abstraction, `VerificationSupport` has been introduced, which represents all the operations needed to resolve and verify a `SignedTransaction`, essentially replacing `ServicesForResolution` (a lot of the changes are due to this). The external verifier implements this with a simple RPC mechanism, whilst the node needed a new (internal) `ServiceHub` abstraction, `VerifyingServiceHub`. `ServicesForResolution` hasn't been deleted since it's public API, however all classes implementing it must also implement `VerifyingServiceHub`. This is possible to do without breaking compatibility since `ServicesForResolution` is annotated with `@DoNotImplement`. Changes to `api-current.txt` were made due to the removal of `TransactionVerifierService`, which was clearly indicated as an internal class, and returning `TransactionBuilder.toLedgerTransactionWithContext` back to an internal method. * Address review comments * One bulk load states method * Merge fix
130 lines
4.5 KiB
Groovy
130 lines
4.5 KiB
Groovy
pluginManagement {
|
|
ext.artifactory_contextUrl = 'https://software.r3.com/artifactory'
|
|
ext.publicArtifactURL = 'https://download.corda.net/maven'
|
|
|
|
repositories {
|
|
// Use system environment to activate caching with Artifactory,
|
|
// because it is actually easier to pass that during parallel build.
|
|
// NOTE: it has to be a name of a virtual repository with all
|
|
// required remote or local repositories!
|
|
if (System.getenv("CORDA_USE_CACHE")) {
|
|
maven {
|
|
name "R3 Maven remote repositories"
|
|
url "${artifactory_contextUrl}/${System.getenv("CORDA_USE_CACHE")}"
|
|
authentication {
|
|
basic(BasicAuthentication)
|
|
}
|
|
credentials {
|
|
username = System.getenv('CORDA_ARTIFACTORY_USERNAME')
|
|
password = System.getenv('CORDA_ARTIFACTORY_PASSWORD')
|
|
}
|
|
}
|
|
} else {
|
|
mavenLocal()
|
|
gradlePluginPortal()
|
|
maven { url "${publicArtifactURL}/corda-dependencies" }
|
|
maven { url "${publicArtifactURL}/corda-dependencies-dev" }
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.jetbrains.kotlin.jvm' version kotlin_version
|
|
id 'org.jetbrains.kotlin.plugin.allopen' version kotlin_version
|
|
id 'org.jetbrains.kotlin.plugin.jpa' version kotlin_version
|
|
}
|
|
}
|
|
// The project is named 'corda-project' and not 'corda' because if this is named the same as the
|
|
// output JAR from the capsule then the buildCordaJAR task goes into an infinite loop.
|
|
rootProject.name = 'corda-project'
|
|
include 'opentelemetry'
|
|
include 'opentelemetry:opentelemetry-driver'
|
|
include 'confidential-identities'
|
|
include 'finance:contracts'
|
|
include 'finance:workflows'
|
|
include 'core'
|
|
include 'core-tests'
|
|
include 'docs'
|
|
include 'node-api'
|
|
include 'node-api-tests'
|
|
include 'node'
|
|
include 'node:capsule'
|
|
include 'verifier'
|
|
include 'client:jackson'
|
|
include 'client:jfx'
|
|
include 'client:mock'
|
|
include 'client:rpc'
|
|
include 'docker'
|
|
include 'testing:client-rpc'
|
|
include 'testing:testserver'
|
|
include 'testing:testserver:testcapsule:'
|
|
include 'experimental'
|
|
include 'experimental:avalanche'
|
|
include 'experimental:blobwriter'
|
|
include 'experimental:quasar-hook'
|
|
include 'experimental:corda-utils'
|
|
include 'experimental:nodeinfo'
|
|
include 'experimental:netparams'
|
|
include 'test-common'
|
|
include 'test-cli'
|
|
include 'test-utils'
|
|
include 'test-db'
|
|
include 'smoke-test-utils'
|
|
include 'node-driver'
|
|
include 'core-test-utils'
|
|
// Avoid making 'testing' a project, and allow build.gradle files to refer to these by their simple names:
|
|
['test-common', 'core-test-utils', 'test-utils', 'test-cli', 'test-db', 'smoke-test-utils', 'node-driver'].each {
|
|
project(":$it").projectDir = new File("$settingsDir/testing/$it")
|
|
}
|
|
include 'tools:explorer'
|
|
include 'tools:explorer:capsule'
|
|
//include 'tools:demobench'
|
|
include 'tools:loadtest'
|
|
include 'tools:graphs'
|
|
include 'tools:bootstrapper'
|
|
include 'tools:blobinspector'
|
|
include 'tools:network-builder'
|
|
include 'tools:cliutils'
|
|
include 'tools:worldmap'
|
|
include 'tools:checkpoint-agent'
|
|
include 'samples:attachment-demo:contracts'
|
|
include 'samples:attachment-demo:workflows'
|
|
include 'samples:trader-demo:workflows-trader'
|
|
// include 'samples:irs-demo'
|
|
// include 'samples:irs-demo:cordapp:contracts-irs'
|
|
// include 'samples:irs-demo:cordapp:workflows-irs'
|
|
// include 'samples:irs-demo:web'
|
|
include 'samples:simm-valuation-demo'
|
|
include 'samples:simm-valuation-demo:flows'
|
|
include 'samples:simm-valuation-demo:contracts-states'
|
|
include 'samples:notary-demo:contracts'
|
|
include 'samples:notary-demo:workflows'
|
|
include 'samples:bank-of-corda-demo'
|
|
include 'samples:cordapp-configuration:workflows'
|
|
include 'samples:network-verifier:contracts'
|
|
include 'samples:network-verifier:workflows'
|
|
include 'serialization'
|
|
include 'serialization-tests'
|
|
include 'testing:cordapps:dbfailure:dbfcontracts'
|
|
include 'testing:cordapps:dbfailure:dbfworkflows'
|
|
include 'testing:cordapps:missingmigration'
|
|
include 'testing:cordapps:sleeping'
|
|
include 'testing:cordapps:cashobservers'
|
|
|
|
// Common libraries - start
|
|
include 'common-validation'
|
|
project(":common-validation").projectDir = new File("$settingsDir/common/validation")
|
|
|
|
include 'common-configuration-parsing'
|
|
project(":common-configuration-parsing").projectDir = new File("$settingsDir/common/configuration-parsing")
|
|
|
|
|
|
include 'common-logging'
|
|
project(":common-logging").projectDir = new File("$settingsDir/common/logging")
|
|
// Common libraries - end
|
|
|
|
apply from: 'buildCacheSettings.gradle'
|
|
|
|
include 'detekt-plugins'
|
|
include 'tools:error-tool'
|
|
|