corda/.ci
Shams Asari 11d0054fcc
ENT-11055: Basic external verification (#7545)
* 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
2023-12-07 11:29:27 +00:00
..
dependency-checker CORDA-351: force update dependencies and suppress vulnerabilities not… (#1944) 2017-10-26 12:16:57 +01:00
dev Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
api-current.txt ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
check-api-changes.sh Exclude kotlin.jvm.internal from api scanning (#4478) 2019-01-07 15:02:32 +00:00
ci-gradle-build-cache-init.sh CORDA-1509 Configure and enable Gradle Build Cache (#3908) 2018-09-26 13:38:23 +01:00
Dockerfile add timeouts to all tests (#5875) 2020-02-11 10:14:05 +00:00
kill_corda_procs.cmd Move cmd file to more suitable place 2018-11-09 17:55:15 +01:00
README.md Update references to point to new repo and remove other redundant references. (#3151) 2018-05-15 17:09:50 +01:00

!! DO NOT MODIFY THE API FILE IN THIS DIRECTORY !!

The api-current.txt file contains a summary of Corda's current public APIs, as generated by the api-scanner Gradle plugin. (See here for a detailed description of this plugin.) It will be regenerated and the copy in this repository updated by the Release Manager with each new Corda release. It will not be modified otherwise except under special circumstances that will require extra approval.

Deleting or changing the existing Corda APIs listed in api-current.txt may break developers' CorDapps in the next Corda release! Please remember that we have committed to API Stability for CorDapps.

!! DO NOT MODIFY THE API FILE IN THIS DIRECTORY !!