Commit Graph

2233 Commits

Author SHA1 Message Date
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
Adel El-Beik
dce725ff4b
Merge pull request #7609 from corda/arshadm/ent-11264-serizlized-lambda
ENT-11264  Fix initialization of field serializer
2023-12-18 15:54:15 +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
Adel El-Beik
10e005b072
Merge pull request #7612 from corda/arshadm/feature/ent-11253-publish-sources-and-javadoc
ENT-11253 Publish sources and javadoc
2023-12-15 18:04:56 +00:00
Suhas Krishna Srivastava
dfbc5302a9
ENT-11270: fix structure tests (#7606)
* ENT-11270: Un-ignored new tests as newer JDK adds more details.

Newer JDK adds the line position as well along exception message string, this makes the actual as:
line too long (line 1)
instead of: line too long
So, error is still thrown but the message contains a little more detail in the newer JDK.

Hence, changing equals to contains.
2023-12-14 11:09:16 +00:00
Arshad Mahmood
91d4c33513 ENT-11264 Fixed initialization of field serializer 2023-12-13 16:34:44 +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
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
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
755c7b73b0
ENT-11111: Reverted exposure of internal ConcurrencyUtils method (#7586) 2023-12-06 09:55:35 +00:00
Shams Asari
1b3ea01fc9
ENT-11112: Enabled X509EdDSAEngineTest (#7595) 2023-12-06 09:46:53 +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
Jose Coll
8f87b2060b
ENT-11245 Catch and transform new enum type value. (#7596) 2023-11-30 19:13:34 +00:00
Adel El-Beik
72e5c4fed2
ENT-11036: initiatedBy is now a list of CordaX500Names. (#7592) 2023-11-28 07:10:53 +00:00
Adel El-Beik
b715140625 ENT-11107: Ctors added to LedgerRecoveryFlow to match EnterpriseLedgerRecoveryFlow. 2023-11-15 16:11:45 +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
r3-build
bb2c2b62e5 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-11-02 2023-11-02 17:47:59 +00:00
Jose Coll
60bcc99154
ENT-11037 Expose and use additional Ledger Recovery statistics (#7553) 2023-10-31 15:55:55 +00:00
Adel El-Beik
8ab92f0ee3
Merge pull request #7551 from corda/colljos/finality_flow_force_recover_flowids
ENT-11036 Add "forceRecoverFlowIds" parameter to FinalityRecoveryFlow
2023-10-27 18:17:31 +01:00
Jose Coll
5e017dfbc8 Drop FlowRecoveryQuery criteria: excludeFlowIds 2023-10-27 14:13:29 +01:00
Jose Coll
04b1e8fb3d Add "forceRecoverFlowIds" parameter to FinalityRecoveryFlow 2023-10-27 13:45:19 +01:00
r3-build
2f6d226f9d Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-27 2023-10-27 12:29:00 +00:00
Rick Parker
c626d3a435
ENT-10100: fix batch support during recovery of in flight transactions (#7549) 2023-10-27 13:26:07 +01:00
Jose Coll
e52f086d11
ENT-11036 Additional parameter to enable recovery of IN_FLIGHT transactions (post ledger peer recovery) (#7546) 2023-10-26 09:38:52 +01:00
Jose Coll
be515abd08
ENT-11004 Store Ledger Recovery records only if the transaction was locally stored in the first place. (#7544) 2023-10-24 17:02:17 +01:00
Jose Coll
be433c1fd0
ENT-10100 Filter out UNVERIFIED txns + move TransactionStatus package. (#7543) 2023-10-24 17:01:37 +01:00
r3-build
9d452f0003 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-24 2023-10-24 09:42:55 +00:00
Jose Coll
bc718088fe
ENT-10100 Changes required to support recovery of IN_FLIGHT transactions. (#7541) 2023-10-24 10:38:46 +01:00
r3-build
f296a82642 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-19 2023-10-19 11:12:34 +00:00
Jose Coll
39928563f6 Set verboseLogging to false by default.
Override toString() for ReceiverDistributionRecord
2023-10-19 09:29:05 +01:00
r3-build
5ae5ca95ea Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-17 2023-10-17 06:05:08 +00: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
1981334921
ENT-10110 Clean-up. (#7530) 2023-10-13 11:26:07 +01:00
r3-build
14c9fe06c7 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-05 2023-10-05 15:54:20 +00:00
Jose Coll
fdf8d5344b
ENT-10110 Ledger Recovery tweaks (#7519) 2023-10-05 16:53:20 +01:00
r3-build
ac9b10ef81 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-10-02 2023-10-02 16:29:56 +00:00
Jose Coll
b15ca0f394
ENT-10110 LedgerRecovery parameters + flow return type change. (#7516) 2023-10-02 17:29:48 +01:00
r3-build
7fae4e1b26 Merging forward updates from release/os/4.11 to release/os/4.12 - 2023-09-21 2023-09-21 16:23:31 +00:00
Balwant Kothari
6243088ebb
ENT-10700 Updating timeWindow to nullable (#7498)
* ENT-10700 Updating timeWindow to nullable
2023-09-21 17:22:27 +01:00
Ronan Browne
b2eba94d02
ES-1351: bump platformVersion for new release branch (#7496) 2023-09-15 21:03:13 +01:00
Rick Parker
5d84d0a5c9
ENT-10306 Missed actually verifying transaction from recent refactor (#7483) 2023-09-06 16:32:47 +01:00
Jose Coll
b0ea7a6551
ENT-4973 Remove redundant 2PF warning message. (#7470)
* Remove redundant warning message.
Additional assertion to validate database records deleted.
2023-09-01 10:01:31 +01:00
Jose Coll
3b78b46619 Merge remote-tracking branch 'origin/release/os/4.11' into colljos/encryption_receiver_self_recovery 2023-08-23 11:20:16 +01:00
Rick Parker
ec261cb0c3
ENT-10306 Swap logic from receive finality to receive transaction flows (#7451)
* Swap logic from receive finality to receive transaction flows

* Remote TPV check

* Make finality check more robust

* Make emulation of finality in tests compliant with changes

* Improve deferring of ack when issue transaction

* Remove API checking of SignedTransactionWithDistributionList as added it 4.11 so cannot be incompatible, yet.

* Regenerated API file from 4.10 to check only compatibility with 4.10

* Move function to private

* Revert "Regenerated API file from 4.10 to check only compatibility with 4.10"

This reverts commit 6428f957e1.

* Reset ReceiveTransactionFlow and ReceiveFinalityFlow APIs
2023-08-23 10:09:42 +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
4a7a4eb5bb
ENT-9876: Encrypting the ledger recovery participant distribution list (#7423) 2023-08-22 11:14:37 +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