Commit Graph

3271 Commits

Author SHA1 Message Date
Shams Asari
61a05a90eb
ENT-11155: Remove internal Kotlin utilities which have since been added after 1.2 (#7585)
This is mostly the `Path` extension functions in `PathUtils.kt`.
2023-12-18 12:05:08 +00:00
Arshad Mahmood
c94f1d730c ENT-11271 Publish dependencies in the maven pom.xml 2023-12-12 13:24:15 +00:00
Adel El-Beik
6c4ab9a440
Merge pull request #7575 from corda/merge-release/os/4.11-release/os/4.12-2023-11-14-36
ENT-11130: Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-11-14
2023-12-07 17:54:21 +00:00
Shams Asari
e2bcd0499e ENT-11263: Remove TooGenericExceptionCaught detekt rule 2023-12-07 13:36:21 +00:00
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
Balwant Kothari
74ca2c6734
ENT-10560 JDK 17 Test Cases Fixes (#7598)
* Updated mockito version and removed ignored annotation to relevant test cases

* Updated mockito version and removed ignored annotation to relevant test cases
2023-12-07 10:46:56 +00:00
Shams Asari
199e167639
ENT-11192: Migrate usage of @Test.expected annotation parameter (#7593)
Replaced usage of `@Test.expected` annotation parameter with more specific exception assertions. This is also needed to migrate away from the explicit timeouts in every tests.
2023-12-06 16:45:51 +00:00
Shams Asari
4cf5fe55dd
ENT-11099: Update Java compile source & target to 17 (#7594)
And removed unused `jdkClassifier` in build files.
2023-12-06 09:46:29 +00:00
r3-build
45bd9c95d8 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-11-14 2023-11-14 13:58:20 +00:00
Chris Cochrane
9065c1703a
Updated changeset to match Enterprise 2023-11-13 17:07:49 +00:00
Chris Cochrane
974d81cf41
Revert netty version 2023-11-10 12:41:44 +00:00
Jose Coll
e94e02fc4b Update index name (to meet Oracle max length limitation of 30 chars). 2023-11-09 11:25:56 +00:00
Arshad Mahmood
1b4189b2b3 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
Jose Coll
c445c72d3a
ENT-10110 Store Ledger Recovery records only if the transaction was locally stored in the first place. (#7564) 2023-11-08 08:52:25 +00:00
Chris Cochrane
3c34caabc3
ENT-10888,ENT-11108 - Security vulnerabilties (#7556)
* Security vulnerabilties
* Upgraded netty
* ENT-11108: Upgraded tcnative depedency to 2.2.224.
* Added architecture classifiers for netty-tcnative
2023-11-07 10:46:03 +00:00
Arshad Mahmood
6dd33fb8f7 Upgrade to gradle 7.6, kotlin 1.8 and jdk 17
Major changes due to JDK 17:
1. JDK17 JCE Provider now has built-in support for eddsas, corda uses
   the bouncycastle (i2p) implementation. This PR removes the conflicting
   algorithms from the built-in JCE provider.

2. JavaScript scripting has been removed from the JDK, the corda log4j config was using
   scripting to conditionally output additional diagnostic info if the MDC
   was populated. This PR has removed the scripting.

3. The artifactory plug-ins used are now deprecated, this PR has removed them
   and uses the same code as Corda 5 for publishing to artifactory.

4. Javadoc generation has been modified to use the latest dokka plug-ins.

5. Gradle 7.6 has implemented an incredibly annoying change where transitive
   dependencies are not put on the compile classpath, so that they have to be
   explicitly added as dependencies to projects.

6. Mockito has been updated, which sadly meant that quite a few source files
   have to changes to use the new (org.mockito.kotlin) package name. This makes
   this PR appear much larger than it is.

7. A number of tests have been marked as ignored to get a green, broadly they fall
   into 3 classes.

   The first is related to crypto keypair tests, it appears some logic
   in the JDK prefers to use the SunJCE implementation and we prefer to use
   bouncycastle. I believe this issue can be fixed with better test setup.

   The second group is related to our use of a method called "uncheckedCast(..)",
   the purpose of this method was to get rid of the annoying unchecked cast compiler
   warning that would otherwise exist. It looks like the Kotlin 1.9 compiler type
   inference differs and at runtime sometimes the type it infers is "Void" which causes
   an exception at runtime. The simplest solution is to use an explicit cast instead of
   unchecked cast, Corda 5 have removed unchecked cast from their codebase.

   The third class are a number of ActiveMQ tests which appear to have a memory leak somewhere.
2023-11-06 10:24:17 +00:00
Jose Coll
361cd678cb
ENT-10531 Add additional index on distribution records tables. Sync table names. (#7548) 2023-11-02 18:31:43 +00:00
Jose Coll
be433c1fd0
ENT-10100 Filter out UNVERIFIED txns + move TransactionStatus package. (#7543) 2023-10-24 17:01:37 +01:00
Jose Coll
bc718088fe
ENT-10100 Changes required to support recovery of IN_FLIGHT transactions. (#7541) 2023-10-24 10:38:46 +01:00
Jose Coll
6a2bad8077
ENT-10110 Back-port changes from ENT + additional clean-up (#7532) 2023-10-17 07:03:49 +01:00
Jose Coll
a66042ec09
ENT-10110 Ledger Recovery database table tweaks (#7528) 2023-10-10 17:41:49 +01:00
Jose Coll
fdf8d5344b
ENT-10110 Ledger Recovery tweaks (#7519) 2023-10-05 16:53:20 +01:00
Jose Coll
4e355b953b
ENT-10110 timeDiscriminator must also be shared for DR synchronisation. (#7517) 2023-10-02 17:28:44 +01:00
Adel El-Beik
b7e484c3d8 ENT-9943: Missed test that had assumed party id was still a long, now updated to string. 2023-09-29 16:14:10 +01:00
Adel El-Beik
3a23f60199
ENT-9943: Now use SecureHash to represent CordaX500Name in distributi… (#7501) 2023-09-29 09:03:00 +01:00
Adel El-Beik
238608224b
ENT-10607: Reduced length of distribution records table name to under… (#7505)
* ENT-10607: Reduced length of distribution records table name to under 30 chars for Oracle.

* ENT-10607: Need to update the entity classes as well.
2023-09-27 14:01:44 +01:00
Shams Asari
ea4bcd5369 ENT-10811: Removed index on primary key column in node_aes_encryption_keys table
The index is redundant on the primary key, and causes an issue in the schema migration for some databases, such as Oracle.
2023-09-22 15:09:33 +01:00
Jose Coll
b16c93e76b
ENT-6875 Deserialisation exception on output state can cause ledger inconsistency (#7476) 2023-09-20 08:44:56 +01:00
r3-build
13e32ae978 Merging forward updates from release/os/4.10 to release/os/4.11 - 2023-09-08 2023-09-08 16:48:35 +00:00
r3-build
17f5cd5524 Merging forward updates from release/os/4.9 to release/os/4.10 - 2023-09-08 2023-09-08 14:56:56 +00:00
Shams Asari
fb4247d5c9
ENT-10756: Use normal select count query for totalStatesAvailable (#7492)
Some DBs do not like the use of `distinct` in the count query for the `Page.totalStatesAvailable` result. It turns out it's not needed anyway and a non-distinct select count works as well.
2023-09-08 15:55:23 +01:00
r3-build
33798df51d Merging forward updates from release/os/4.10 to release/os/4.11 - 2023-09-04 2023-09-04 10:21:44 +00:00
r3-build
612cfcdb32 Merging forward updates from release/os/4.9 to release/os/4.10 - 2023-09-01 2023-09-01 20:47:47 +00:00
Adel El-Beik
134ff60af8 ENT-10694: Switch the noisy SSL handshake to trace logging. But allow it to be enabled again with a system property. 2023-08-31 18:33:34 +01:00
Adel El-Beik
3ae6db8c04
ENT-10122: Now also added consuming transaction id in the resolveAndMakeUpdate code path. (#7459) 2023-08-30 11:33:01 +01:00
Shams Asari
6edb1b779c Placate Detekt 2023-08-23 15:03:08 +01:00
Shams Asari
fe416879cd Merge branch 'release/os/4.10' into shams-4.11-merge-53fe0e6c
# Conflicts:
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
2023-08-23 14:56:46 +01:00
Jose Coll
4fef01a5b0 Clean-up. 2023-08-22 16:03:13 +01:00
Jose Coll
32c3b0c517 Merge remote-tracking branch 'origin/release/os/4.11' into colljos/encryption_receiver_self_recovery 2023-08-22 12:31:29 +01:00
Shams Asari
46914a2b35 Merge branch 'release/os/4.9' into shams-4.10-merge-c8135331 2023-08-22 11:24:38 +01:00
Shams Asari
4a7a4eb5bb
ENT-9876: Encrypting the ledger recovery participant distribution list (#7423) 2023-08-22 11:14:37 +01:00
Shams Asari
fb303a20bf Merge branch 'release/os/4.8' into shams-4.9-merge-5cdbec9d
# Conflicts:
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
2023-08-21 14:18:09 +01:00
Shams Asari
5cdbec9ddf
ENT-6876: Optimised vault query to not query for total state count if the first page isn't full (#7449) 2023-08-21 10:30:42 +01:00
Jose Coll
a6786769e5
ENT-10306 Determine whether to use 2PF based on the execution CorDapp TPV. (#7447) 2023-08-21 09:11:00 +01:00
Jose Coll
6a7e9000a4 Detekt 2023-08-18 17:26:22 +01:00
Jose Coll
4a6e99556b Incorporating PR review feedback. 2023-08-18 17:22:42 +01:00
Jose Coll
06e43eb9e2 Fixes following merge. 2023-08-17 08:47:58 +01:00
Jose Coll
f565232f36 Fix compilation errors following merge. 2023-08-16 18:05:18 +01:00
Jose Coll
9b7affa6b3 Fix compilation errors following merge. 2023-08-16 17:40:33 +01:00
Jose Coll
daea257214 Merge remote-tracking branch 'origin/release/os/4.11' into colljos/encryption_receiver_self_recovery 2023-08-16 17:38:34 +01:00