Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.
Go to file
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
.ci ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
.github Merge branch 'release/os/4.11' into merge-release/os/4.10-release/os/4.11-2023-10-17-7 2023-10-17 11:03:02 +01:00
.idea ENT-6947 Intern common types to reduce heap footprint (#7239) 2022-10-18 09:28:41 +01:00
buildSrc Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
client ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
common Added explicit publishing configuration for projects bundled as jars, this change was required when upgrading to kotlin 1.9.0 2023-11-08 10:48:10 +00:00
confidential-identities Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
config Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
core ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
core-tests ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
detekt-plugins Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
docker Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
docs Added explicit publishing configuration for projects bundled as jars, this change was required when upgrading to kotlin 1.9.0 2023-11-08 10:48:10 +00:00
experimental Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
finance ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
gradle/wrapper Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
isolated Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
node ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
node-api ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
node-api-tests ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
opentelemetry Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
release-tools CORDA-3017 - Fix release tooling when product name != jira project (#5229) 2019-06-21 09:28:07 +01:00
samples Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
serialization ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
serialization-tests ENT-11192: Migrate usage of @Test.expected annotation parameter (#7593) 2023-12-06 16:45:51 +00:00
testing ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
tools ENT-11192: Migrate usage of @Test.expected annotation parameter (#7593) 2023-12-06 16:45:51 +00:00
verifier ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
.dockerignore WIP Kubenetes parallel build (#5396) 2019-09-03 15:40:08 +00:00
.gitignore INFRA-505: Move integration tests to unit tests (#6530) 2020-08-06 15:16:27 +01:00
.snyk Merge branch 'release/os/4.9' into shams-4.10-merge-e6a80822 2023-07-13 10:53:30 +01:00
build.gradle ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
BUILD.md add a shared memory port allocator to allow multiple processes to sha… (#5223) 2019-07-02 18:38:33 +00:00
buildCacheSettings.gradle Explicitly disable remote gradle build cache when building locally. (#4095) 2018-10-19 16:40:06 +01:00
constants.properties ENT-10560 JDK 17 Test Cases Fixes (#7598) 2023-12-07 10:46:56 +00:00
CONTRIBUTING.md LEDG-67 updating contrib links (#7036) 2022-02-14 10:09:36 +00:00
CONTRIBUTORS.md EG-4168 Updating contributors.md list for OS 4.7 release branch (#6782) 2020-10-22 22:52:11 +01:00
detekt-baseline-config.yml TM-45 Make detektBaseline pass (#5561) 2019-10-15 15:49:31 +01:00
detekt-baseline.xml Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
detekt-config.yml [NOTICK] - Enable check in detekt for unused imports (#6106) 2020-03-26 15:46:33 +00:00
gradle.properties Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
gradlew Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
gradlew.bat Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
Jenkinsfile Upgrade to gradle 7.6, kotlin 1.8 and jdk 17 2023-11-06 10:24:17 +00:00
LICENSE Use full Apache 2.0 license so GitHub recognizes it 2019-08-23 12:24:37 +02:00
README.md NOTICK: Fix typos (#7255) 2022-10-28 12:33:39 +02:00
SECURITY.md CORDA-2958 Security policy for corda 2019-06-03 10:38:13 +02:00
settings.gradle ENT-11055: Basic external verification (#7545) 2023-12-07 11:29:27 +00:00
sizing.sh add a shared memory port allocator to allow multiple processes to sha… (#5223) 2019-07-02 18:38:33 +00:00
TRADEMARK Updated URL link to R3 trademark policy 2017-07-13 11:43:41 +01:00

Corda

License

Corda

Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.

Architecture Evolution

The code present in this repository reflects the first version of the implementation of the Corda model for DLT technology. This first architecture version covers Corda versions 1 through 4 and continues to deliver on the promise of DLT for both the open source community and industry as a whole.

However, like all things, Corda must evolve to serve the more stringent needs of today. This is why the second (and current) version of the Corda Architecture can be found here and will form the basis of the Corda 5 release.

Features

  • Smart contracts that can be written in Java and other JVM languages
  • Flow framework to manage communication and negotiation between participants
  • Peer-to-peer network of nodes
  • "Notary" infrastructure to validate uniqueness and sequencing of transactions without global broadcast
  • Enables the development and deployment of distributed apps called CorDapps
  • Written in Kotlin, targeting the JVM

Getting started

  1. Read the Getting Started documentation
  2. Run the Example CorDapp
  3. Read about Corda's Key Concepts
  4. Follow the Hello, World! tutorial

Contributing

Corda is an open-source project and contributions are welcome!

To find out how to contribute, please see our contributing docs.

License

Apache 2.0

Acknowledgements

YourKit

YourKit supports open source projects with its full-featured Java Profiler.

YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.