Commit Graph

3292 Commits

Author SHA1 Message Date
Shams Asari
d811f6f456 Investigating DuplicateSerializerLogTest 2024-01-08 11:00:50 +00:00
Shams Asari
0123b141d3 ENT-11328: Update node initialisation to be flexible if JDK modules are not open to reflection 2024-01-04 11:07:51 +00:00
Shams Asari
2e63ca6264
ENT-11065: Remove the need for JVM flags in client code (#7635) 2024-01-03 11:22:03 +00:00
Shams Asari
406f7ff292
ENT-11056: Compile the external verifier using Kotlin 1.2 (#7622)
This requires Kotlin 1.2 versions of core and serialization (core-1.2 and serialization-1.2 respectively), which are just "shell" modules and which compile the existing source code with Kotlin 1.2. The 1.2 plugin does not work with the current version of Gradle and so the 1.2 compiler has to be called directly.

Now with two versions of Kotlin in the code base, each module needs to have its version manually specified to ensure a clean separation. Otherwise, the default Kotlin version can override 1.2 when needed.

Some of the code was tidied-up or improved to enable it to be cross-compiled. For post-1.2 APIs being used, they have been copied into core-1.2 with the same method signatures. OpenTelemetryComponent was moved to node-api, along with the dependency, to avoid also having a 1.2 version for the opentelemetry module.
2024-01-02 17:02:20 +00:00
Adel El-Beik
4791f0d84f
Merge pull request #7630 from corda/merge-release/os/4.11-release/os/4.12-2023-12-21-86
ENT-11118: Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-12-21
2023-12-22 12:23:02 +00:00
Arshad Mahmood
26861ffd05 ENT-11295 ActiveMQ behaviour has changed so that CREATE_ADDRESS is perforned before CREATE_DURABLE_QUEUE in this situation 2023-12-21 15:03:09 +00:00
Balwant Kothari
d235e887fe
ENT-11113 Ignored JDK 17 related fixes for byteman related issues (#7626)
* Updated mockito version and removed ignored annotation to relevant test cases
2023-12-21 11:11:55 +00:00
r3-build
2eb1e9f426 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-12-21 2023-12-21 03:50:35 +00:00
Adel El-Beik
e815b381ef
Merge pull request #7617 from corda/merge-release/os/4.11-release/os/4.12-2023-12-15-79
ENT-11281: Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-12-15
2023-12-19 13:15:51 +00:00
Adel El-Beik
7cbfc71a74
Merge pull request #7621 from corda/feature/arshad/ent-11294-fix-checkpoint-failing-test
ENT-11294  Fix failing tests in - FlowCheckpointVersionNodeStartupCheckTest
2023-12-19 11:26:10 +00:00
Jose Coll
5a807e1eed Detekt. 2023-12-19 09:25:43 +00:00
Jose Coll
b47d5ec5c7 Merge branch 'release/os/4.12' into merge-release/os/4.11-release/os/4.12-2023-12-15-79 2023-12-19 08:46:52 +00:00
Jose Coll
c1fe0e739a Resolve conflicts. 2023-12-19 08:46:26 +00:00
Arshad Mahmood
2a149e3aee ENT-11294 Handle kryo exception wrapped in KryoException 2023-12-18 16:12:34 +00:00
Adel El-Beik
422786dccc
Merge pull request #7608 from corda/shams-verification-service
ENT-11267: Introducing VerificationService, which implements VerificationSupport in terms of node-based services
2023-12-18 13:47:32 +00:00
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
r3-build
16ade601ad Merging forward updates from release/os/4.10 to release/os/4.11 - 2023-12-16 2023-12-16 19:18:14 +00:00
r3-build
1cf66d4a8f Merging forward updates from release/os/4.9 to release/os/4.10 - 2023-12-15 2023-12-15 20:02:41 +00:00
Tom Stark
71e187dddb ENT-11118: Netty SSL handshake fix (#5028)
* ENT-11118: Added fix for netty SSL handshake fail
2023-12-15 17:16:15 +00:00
Shams Asari
a34932e887 ENT-11267: Introducing VerificationService, which implements VerificationSupport in terms of node-based services 2023-12-12 15:01:48 +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
Rick Parker
59ff476a40
ENT-11050: Support flag to indicate if in transaction back chain resolution, and use it to drop deserialization errors to warn (#7591)
* Support flag to indicate if in transaction back chain resolution, and use it to drop deserialization errors to warn
* Fix and rename test that has different outcome now
2023-11-28 11:15:21 +00:00
Chris Cochrane
d8b19de46e
Renamed index to keep Oracle happy 2023-11-21 11:48:37 +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