Commit Graph

2269 Commits

Author SHA1 Message Date
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
Jose Coll
4a6e99556b Incorporating PR review feedback. 2023-08-18 17:22:42 +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
Jose Coll
492373d180 Introduction of Sender and Receiver Distribution Lists to support receiver self-recovery mode. 2023-08-16 17:02:58 +01:00
Jose Coll
d2029b3e0c
ENT-10290 Create Enterprise Aliases for all new Recovery Flows (#7440) 2023-08-15 15:32:54 +01:00
Shams Asari
e0e4f51ba2
ENT-10285: Remove experimental DJVM support (#7442) 2023-08-09 08:44:32 +01:00
Adel El-Beik
eccb9b4af6
Merge pull request #7430 from corda/adel/ENT-10122
ENT-10122: Add consuming transaction id to vault states table.
2023-08-07 13:35:04 +01:00
Adel El-Beik
c614b21a2a ENT-10122: Added annotation for backwards compatibility and added test. 2023-08-01 15:11:21 +01:00
Adel El-Beik
106ccd7fe8
ENT-10273: Upgrade BC to 1.75. (#7422)
* ENT-10273: Upgrade BC to 1.75.

* Use BC 1.70 for core-deterministic avoid issue with primality checking done in 1.70+ which uses random numbers

---------

Co-authored-by: Shams Asari <shams.asari@r3.com>
2023-07-31 10:42:28 +01:00
Shams Asari
de67ab7377 ENT-9876: Encrypting the ledger recovery participant distribution list 2023-07-25 14:59:43 +01:00
Rick Parker
6ec8855c6e
Add system property to disable public key caching (#7438) 2023-07-21 08:56:22 +01:00
Rick Parker
48213b5f8c
ENT-10284 Performance optimise deserialisation (#7425) 2023-07-20 09:51:35 +01:00
Adel El-Beik
117d319317 ENT-10122: Removed commented code left in. 2023-07-20 09:31:46 +01:00
Adel El-Beik
aa9e41c7c2 ENT-10122: Updated tests to include consuming transaction id in the Vault.Update check. 2023-07-19 16:36:39 +01:00
Adel El-Beik
669d6590af ENT-10122: Add consuming transaction id to vault states table. 2023-07-17 17:58:31 +01:00
Shams Asari
03a9a95216 Merge branch 'release/os/4.10' into shams-4.11-merge-6b655c0f
# Conflicts:
#	.github/workflows/check-pr-title.yml
#	node/src/main/kotlin/net/corda/node/internal/ServicesForResolutionImpl.kt
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
2023-07-17 10:17:38 +01:00
Jose Coll
c3e8284f28
ENT-9927 Ledger Recovery tweaks (#7409) 2023-07-17 09:48:37 +01:00
Tom Stark
58ecce1713
ENT-9875: New network parameters (#7398)
* ENT-9875: Added new network parameters

- Added `transactionRecoveryPeriod`
- Added `confidentialIdentityPreGenerationPeriod`

These new parameters are currently set to be nullable meaning they can be ignored and the duration if not specified will be null rather than, e.g., 0. This currently allows for nothing changing/breaking in the node-api

_Note: if these params can stay as nullable then the deprecated constructor might not even be needed (since the existing one will still work), needs to be discussed._
2023-07-14 12:02:21 +01:00
Shams Asari
3a6deeefa7 Merge branch 'release/os/4.9' into shams-4.10-merge-e6a80822
# Conflicts:
#	.github/workflows/check-pr-title.yml
#	.snyk
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPClient.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/AMQPClientSslErrorsTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
2023-07-13 10:53:30 +01:00
Shams Asari
671ce9ef97 Merge branch 'os-4.8-merge-point' into shams-4.9-merge-0b8536b9
# Conflicts:
#	.github/workflows/check-pr-title.yml
#	node/src/main/kotlin/net/corda/node/services/messaging/NodeNettyAcceptorFactory.kt
2023-07-07 15:20:43 +01:00
Jose Coll
97d8549d4f
ENT-9927 Ledger Recovery tweaks. (#7407) 2023-07-03 10:02:34 +01:00
Jose Coll
49d5b6a4bf
ENT-4973 Introduce explicit constructors to evolve ReceiveFinalityFlow for binary backwards compatibility (#7404)
* Introduce explicit constructors to evolve ReceiveFinalityFlow for binary backwards compatibility.
2023-06-29 11:19:59 +01:00
Jose Coll
0e877958fe
ENT-10009 Enhance SendTransactionFlow to allow sending a txn to multiple sessions. (#7393) 2023-06-09 17:19:43 +01:00
Shams Asari
0bfce451ea ENT-10013: Vault service refactoring backport 2023-06-06 16:17:58 +01:00
nargas-ritu
5510cb151b
Merge pull request #7375 from corda/shams-vault-page-overlap
ENT-9793: Added Page.previousPageAnchor to allow detection of vault changes whilst pages are loaded
2023-06-06 11:07:45 +01:00
Jose Coll
f791adf442
ENT-9924 (Follow-up) Update recording of transaction flow recovery metadata into Send/Receive transaction flows. (#7382) 2023-06-05 16:59:06 +01:00
Jose Coll
2c775bcc41
ENT-9924 Update recording of transaction flow recovery metadata into Send/Receive transaction flows. (#7374) 2023-06-02 16:05:28 +01:00
Shams Asari
5706f89639 Merge branch 'release/os/4.8' into shams-4.9-frwd-merge-a817218b
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisTcpTransport.kt
#	node-api/src/test/kotlin/net/corda/nodeapi/internal/revocation/RevocationTest.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/CertificateRevocationListNodeTests.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/artemis/BrokerJaasLoginModule.kt
#	node/src/main/kotlin/net/corda/node/internal/artemis/CertificateChainCheckPolicy.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/NodeNettyAcceptorFactory.kt
2023-06-01 16:37:57 +01:00
Shams Asari
ed08b2c5de ENT-9793: Added Page.previousPageAnchor to allow detection of vault changes whilst pages are loaded 2023-05-26 12:52:06 +01:00
Jose Coll
2e29e36e01
ENT-9923 Ledger Recovery: split out recovery metadata into own database schema. (#7364) 2023-05-24 09:42:09 +01:00
Shams Asari
c065021328 ENT-8827: The ordering of vault query results is clobbered by ServiceHub.loadStates 2023-05-18 15:59:25 +01:00
Jose Coll
c3e39a7052
ENT-9842 Re-factor 2PF to support issuance transactions (no notarisation) with observers. (#7349)
Re-factor 2PF to support issuance transactions (no notarisation) with observers.
2023-04-27 16:58:17 +01:00
Rick Parker
9ba3919980
ENT-9583 Public key caching of encoded form (OS) (#7332) 2023-04-26 17:49:52 +01:00
Rick Parker
f4917e08e1
ENT-9837 Use a cache to avoid resolving contract class name for a contract state repeatedly. (#7348) 2023-04-26 12:34:57 +01:00
Jose Coll
1d4feedc62
ENT-9147 Propagate and handle Notary Error (Part 2) (#7346) 2023-04-26 09:06:32 +01:00
Jose Coll
0bd4364653
ENT-9823 Rename handleDoubleSpend -> propagateDoubleSpendErrorToPeers (#7338) 2023-04-20 15:34:46 +01:00
Jose Coll
fffc3e4c5d
ENT-9822 Performance optimisation: use getNodeByLegalIdentity() backed by cache. (#7336) 2023-04-20 09:16:55 +01:00
Jose Coll
7bd3f5dd33
ENT-9147 Remove un-notarised transactions upon Double Spend. (#7324) 2023-04-19 15:31:47 +01:00
Jose Coll
18690dba94 Update JavaDoc. 2023-03-30 09:08:09 +01:00
Jose Coll
4beeb470df Additional signature verification and validation: recordTransactions() 2023-03-28 12:48:33 +01:00
Jose Coll
b4983597e2
ENT-6875 Two Phase Finality - CLEAN-UP (#7321)
* Remove completed TODOs

* Prevent mis-leading progress tracker message.
2023-03-24 08:55:37 +00:00
Connel McGovern
fda5cd07d2 INFRA-1955: Merging forward from 4.10 to 4.11 2023-03-22 11:24:31 +00:00
Jose Coll
d2900d54ab
ENT-6875 Two Phase Finality Flow - improve ledger consistency & recoverability (#7290) 2023-03-22 10:47:51 +00:00
Chris Cochrane
f63e049bcb
ENT-8924 Corrected JavaDoc/KDoc comments for ServiceLifecycleEvent (#7294) 2023-02-22 18:04:22 +00:00
Jose Coll
f8896ef706 Bump platform version. 2023-01-24 11:42:34 +00:00
Adel El-Beik
2e724cb82f ENT-8823: Removed unused import. 2022-12-08 16:57:45 +00:00
Adel El-Beik
044b83508e ENT-8823: Added copyBaggageToTags configuration option to control if baggage is copied to tags.
Switched SimplLogTelemetryComponent to info logs.
2022-12-08 16:54:38 +00:00
Adel El-Beik
50a1a4ce09 ENT-8823: StartEnd events now dont get mangled when parent span is a user span. Also other refactorings like using OT propagator now. 2022-12-06 19:24:19 +00:00
Adel El-Beik
e46b7bdd5a
ENT-6893: Added interface for clients to grab openetelemetry handle. (#7264)
* ENT-6893: Added interface for clients to grab openetelemetry handle.

* ENT-6893: Make detekt happy.

* ENT-6893: Fix warnings.

* ENT-6893: Make detekt happy.

* ENT-6893: Now shutdown opentelemetry when node stops or client is closed.

* ENT-6893: OpenTelemetryDriver is not not a singleton.
2022-11-24 13:34:08 +00:00
Chris Cochrane
e3d22dadbc
ENT-8796 - Fwd-merge from OS 4.9 2022-11-21 10:56:58 +00:00
Chris Cochrane
0c4c5bd138
Merge branch 'release/os/4.8' into cc/merge/os-4.8/os-4.9/16-Nov-2022
Fwd-merge from OS 4.8.
2022-11-16 17:35:33 +00:00
Rick Parker
43168387b4
ENT-8794 Delay closing of attachment class loaders (#7267)
* Delay closing of attachment class loaders until all SerializationContext that refer to them (from BasicVerifier) have gone out of scope.

More comments

* Avoid any concurrency issues with queue processing

* Better concurrency behaviour

* Stop re-using attachment URLs as it turns out we can't close the URLClassLoaders when URLs are shared

* Refactor to use a ReferenceQueue.

Co-authored-by: Chris Rankin <chris.rankin@r3.com>
2022-11-15 09:25:54 +00:00
Adel El-Beik
7a133f687c
ENT-6893: First cut of telemetry integration. (#7247)
First cut of telemetry integration.

Open telemetry can be enabled in two ways, first is via an opentelemetry java agent specified on the command line. With this way you get the advantage of spans created from other libraries, like hibernate. The java agent does byte code rewriting to insert spans.
The second way is with the open telemetry driver (that links with the opentelemetry sdk). This is a fat jar provided with this project and needs to go into the node drivers directory.
2022-10-28 14:41:39 +01:00
Rick Parker
bdcd25477d
ENT-7039: Notary signature checking requires non-interned SecureHashes. (#7254)
There was a mistake made when we first introduced notary request signature checking, in that we didn't wrap it in SerializedBytes so it always got deserialized as part of the flow message payload. So to check the signature, it has to be re-serialized. This means for cross-version compatibility we can never change the serialized format of NotarisationRequest. In this case we need make sure that every SecureHash mentioned in that data structure is a distinct instance, even if the values are repeated / identical, as that is how it was in Corda 1.

With the introduction of interning of SecureHash, this ceased to be true once again, including undoing the attempts to force it on the sending side that had been introduced in previous versions of Corda. So here we introduce a way to force it, and consolidate the forcing to distinct SecureHash instances in the NotarisationRequest itself, rather than leaving to the caller of the constructor to remember to do it, so that serialized form will always be as per Corda 1.
2022-10-28 14:03:47 +01:00
Rick Parker
b29713d7b9
ENT-6947 Intern common types to reduce heap footprint (#7239)
ENT-6947: Implement interning for SecureHash, CordaX500Name, PublicKey, AsbtractParty and SignatureAttachmentConstraint, including automatic detection of internable types off companion objects in AMQP & Kyro deserialization.  In some cases, add new factory methods to companion objects, and make main code base use them.

Performance tested in performance cluster with no negative impact visible (so default concurrency setting seems okay).

Testing suggests 5-6x memory saving for tokens in TokensSDK in memory selector.  Should see approx. 1 million tokens per GB or better (1.5 million for the tokens we tested with).
2022-10-18 09:28:41 +01:00
Chris Cochrane
0ab4ac94c8
ENT-6903 - address security issues reported by Snyk (#7244)
ENT-6903: Update versions of BC, Shiro, Netty okhttp
Also updated platform version to 12.
2022-09-30 17:49:21 +01:00
Chris Cochrane
14e2ef3478
Updated KDoc for quick RPCs 2022-08-18 13:02:20 +01:00
Chris Cochrane
03fa529292
ENT-6791 New service lifecycle event published just before starting the state machine (#7164) 2022-06-10 19:56:02 +01:00
Chris Rankin
47ec57186e Merge commit '91ef44dc12b8cc921b9ec0a37b44de75c256d92d' into chrisr3-os-4.8-merge 2022-05-23 12:27:49 +01:00
Chris Rankin
57ddafa148 ENT-6532: Close any deserialization classloader that is evicted from the cache.
Also revert disabling caches when reading URLs.
2022-05-20 11:51:01 +01:00
Ulrik Rasmussen
af1dbf4c6d Do not emit warning when StatePointer.isResolved = false
The warning is misleading because it is emitted in the case where the
ServiceHub reference is not null but one or more state pointers were
configured to not be automatically resolved by the transaction
builder.
2022-04-28 15:13:31 +02:00
Adel El-Beik
ba8cd1b80d Merge remote-tracking branch 'origin/release/os/4.8' into adel/merge-from-4.8-21Feb 2022-02-21 12:52:29 +00:00
Dan Newton
fa739fc467
ENT-6588 Restrict database operations platform flag (#7053)
* ENT-6588 Restrict database operations platform flag

Put the restricting of database operations in `RestrictedConnection` and
`RestrictedEntityManager` behind a platform version flag.

`RESTRICTED_DATABASE_OPERATIONS = 7` was added to signify this.

If the version is less than 7, then the database operations will not be
restricted. A warning is logged to indicate that they are using
potentially dangerous methods.

If the version is 7 or greater, then the database operations are
restricted and throw an error if called.
2022-02-08 10:06:44 +00:00
Chris Rankin
758a69f904
Validate LedgerTransaction deserialised from AttachmentsClassLoader. (#7049) (#7052) 2022-01-31 09:40:01 +00:00
Chris Rankin
c955093ce8
Validate LedgerTransaction deserialised from AttachmentsClassLoader. (#7049) 2022-01-28 17:05:59 +00:00