Commit Graph

2742 Commits

Author SHA1 Message Date
Stefano Franz
6e98adb085
use zulu for jdk in testing image (#5583)
* use zulu for jdk
add some parallel groups

* port kubesTest to Java
remove asterix from tests listed by ListTests, instead add after allocation
2019-10-14 13:35:22 +01:00
Stefano Franz
970f60c625 NOTICK: Fix Initiate Flow with Anonymous party (#5579)
* delete buildSrc block configuring multiple plugins

* remove outer stage block

* fix issues around initiateFlow with anonymous party

* code checks

* disable unit tests

* fix flowframeworktest

* undo some extraneous changes
2019-10-14 11:32:22 +01:00
RogerWillis
c261a8447a Merge branch 'release/os/4.3' into rog-os-merge 2019-10-14 10:37:21 +01:00
Stefan Iliev
6de6702cb4 CORDA-3244, CORDA-3245 - Jolokia docs update (#5486)
* Fixed wrong command line. Added security policy how to.

* Elaborated on security policy to mention when it applies and when not.

* Changes according to PR review.

* Magic to get jolokia version from a single place and forwarded to the docs.
2019-10-14 10:08:01 +01:00
Roger Willis
8a5b6ed52b
Fix for CORDA-3315 (#5580)
* Fix for CORDA-3315. Removed default implementation of partyFromKey and replaced with implementations in IdentityService sub-types.

* Added test.

* Added missing DB transaction to append only persistent map lookup.
2019-10-14 10:01:03 +01:00
Nick Dunstone
7a929f177c CORDA-3043 RPC Invocation fails when calling classes with defaulted constructors O/S (#5569)
* Fix for defaulted constructor arguments

* Code changes from 4.3 applied to O/S

* Detekt and code review
2019-10-11 11:00:40 +01:00
Dimos Raptis
7666ca0d80 [CORDA-3303] - Avoid flushing when inside a cascade (#5575)
* [CORDA-3303] - Avoid flushing when inside a cascade

* Remove listener infrastructure
2019-10-11 10:58:26 +01:00
Stefan Iliev
48fd78d059 CORDA-3236 fix observables not being tagged with notUsed() (#5557)
* Fixed not utilising the observables being returned by stateMachines added response with a notUsed(). Opening a ticket for implementation investigation.

* stateMachinesFeed will unsubscribe on interrupt rather than remaining infinitely subscribed.

* Fixed reported detekt issues on the InteractiveShell.

* Changes according to PR review.
2019-10-10 14:24:32 +01:00
stefano
0488a5ac5d Merge remote-tracking branch 'origin/release/os/4.3' into merge_4.3_to_4.4
# Conflicts:
#	constants.properties
2019-10-08 15:57:14 +01:00
josecoll
efa01410ec CORDA-3263 Improve error handling for registering peer node (#5559)
* Capture and log "nodeInfo" persistence failures, whilst maintaining an optimistic retry mechanism.

* Additional test cases (update and insert)

* Handle both updates and inserts consistently (single transaction for happy path)

* Fix detekt violations and update baseline with false detection.

* Streamline the code a little.

* Update baseline reporting false violation.
2019-10-08 11:38:11 +01:00
josecoll
246ec8766e
CORDA-3224 JDK11 built and published artifacts to include classifier. (#5488)
* JDK11 built and published artifacts to include classifier.

* Added additional non-intuitive gradle dust sprinkled recommended by CR.

* Added additional non-intuitive gradle dust sprinkled recommended by CR.

* Bump corda gradle plugins version.

* Incorporating PR review feedback.

* jdk11Classifier
2019-10-08 10:45:10 +01:00
Dimos Raptis
ec4d20d987 [CORDA-3243] - Improve CorDapp loading logic for duplicates (#5551) 2019-10-07 16:20:55 +01:00
josecoll
42e104ca4f
Publish checkpoint agent jar and allow for inclusion of version id in jar upon run-time execution. (#5553) 2019-10-04 14:28:42 +01:00
Nick Dunstone
dfa6291b2f CORDA-3235: O/S version of fix for slow running in 4.3 (#5531)
* O/S version of fix for slow running in 4.3

* Removal of IdentityServiceInternal from test classes

* Code review comments

* O/S version of fix for slow running in 4.3

* Removal of IdentityServiceInternal from test classes

* Code review comments

* Re-baselined Detekt

* Fixed warning
2019-10-04 11:15:31 +01:00
Dimos Raptis
4f0c87a697 [CORDA-3274] - Enhance backwards compatibility logic to include Inter… (#5549)
* [CORDA-3274] - Enhance backwards compatibility logic to include InternalCordaRPCOps

* Add InternalCordaRPCOps in server-side backwards compatibility logic
2019-10-03 18:17:48 +01:00
josecoll
1a4aaf32f0
CORDA-2050 Prevent node startup failure upon cross-platform execution. (#5527)
* Prevent fat packaging of platform-specific JDK tools.jar (required at compile time for Java 8).

* Catch Throwable.

* Re-instate "tools.jar" in corda.jar as JRE's do not ship with this platform dependency.

* Baseline "TooGenericExceptionCaught".
2019-10-03 15:46:54 +01:00
Stefano Franz
0a4240d58d
Merge pull request #5540 from corda/merge/2019-10-30-os-43-to-44
Merge/2019 10 30 os 43 to 44
2019-10-01 16:42:35 +01:00
Stefano Franz
fa2720783a Revert "OS 4.3 to OS 4.4 merge on 2019/09/30 (#5534)"
This reverts commit 191fb83dec.
2019-10-01 16:37:49 +01:00
josecoll
1ac1c483ff
ENT-4240 Added general exception handler for Virtual Machine errors. (#5530)
* Added general exception handler for capturing and exiting on all types of Virtual Machine errors.

* Minimize additional processing (use constant string for error message).

* Remove redundant DB specific thread termination handler.

* Incorporating PR review feedback.

* Add println before halt.

* Add println before halt ... to stderr
2019-10-01 16:12:55 +01:00
szymonsztuka
191fb83dec OS 4.3 to OS 4.4 merge on 2019/09/30 (#5534)
* CORDA-3273: Replace deprecated use of Class.newInstance() for sake of DJVM. (#5522)

* ENT-4090: move startFlow into try block so exception is caught and managed (#5519)

* CORDA-3091: Move executor thread management into CordaRPCConnection (#5491)

* CORDA-3184 - Vault Query API enhancement: strict participants matching (#5524)

* Implementation of exact participant parsing for common query criteria.

* Added more unit tests + fixed a minor bug.

* Additional clean-up.

* Add documentation and changelog entry.

* Revert debug level SQL logging.

* Fix detekt errors.

* Fix docs formatting in code samples.

* Updating baseline (false positives being reported).

* Fix "Name shadowed: subRoot" code quality check.

* Fix API stability checker failures.

* Update baseline.

* TM-43 updating code style docs to reflect the addition of Detekt (#5521)

* CORDA-3226 Fix dba migration for PostgreSQL following changes in CORDA-3009 and ENT-4192 (#5529)

* Fix dta migration for PostgreSQL following changes for CORDA-3009 Invalid hash function used for PersistentIdentity in PersistentIdentityService
and ENT-4192 Identity service refactor for confidential-identities and accounts.

* Different table definition for PostgreSQL and other dbs in one changeset instead of running generic DDL and the specifically fix table in Postgres (in relation to CORDA-3009 Invalid hash function used for PersistentIdentity in PersistentIdentityService and ENT-4192 Identity service refactor for confidential-identities and accounts).
2019-10-01 13:22:42 +01:00
szymonsztuka
3874e0c178 CORDA-3226 Fix dba migration for PostgreSQL following changes in CORDA-3009 and ENT-4192 (#5529)
* Fix dta migration for PostgreSQL following changes for CORDA-3009 Invalid hash function used for PersistentIdentity in PersistentIdentityService
and ENT-4192 Identity service refactor for confidential-identities and accounts.

* Different table definition for PostgreSQL and other dbs in one changeset instead of running generic DDL and the specifically fix table in Postgres (in relation to CORDA-3009 Invalid hash function used for PersistentIdentity in PersistentIdentityService and ENT-4192 Identity service refactor for confidential-identities and accounts).
2019-09-30 14:20:12 +01:00
josecoll
7dd6ecf96e
CORDA-3184 - Vault Query API enhancement: strict participants matching (#5524)
* Implementation of exact participant parsing for common query criteria.

* Added more unit tests + fixed a minor bug.

* Additional clean-up.

* Add documentation and changelog entry.

* Revert debug level SQL logging.

* Fix detekt errors.

* Fix docs formatting in code samples.

* Updating baseline (false positives being reported).

* Fix "Name shadowed: subRoot" code quality check.

* Fix API stability checker failures.

* Update baseline.
2019-09-27 15:44:04 +01:00
Andrius Dagys
ef57e9909c
CORDA-3124: Ensure transaction is fully verified before sending to notary (#5516)
NotaryFlow.Client flow assumes the passed transaction is verified, which is
the case when it's invoked as a sub-flow in FinalityFlow. However,
NotaryFlow.Client can also be called directly from any custom flow, so
we need to ensure it performs transaction verification to avoid accidentally
sending an invalid transaction to a non-validating notary.
2019-09-27 13:09:36 +01:00
Ryan Fowler
6ca4b589e2 CORDA-3091: Move executor thread management into CordaRPCConnection (#5491) 2019-09-26 17:48:07 +01:00
Viktor Kolomeyko
51330c2e44 CORDA-3232: Support of multiple interfaces for RPC calls (#5495)
* CORDA-3232: Make backward compatible RPC client changes

Such that it will be able to talk to new and old server versions.

* CORDA-3232: Make backward compatible RPC server changes

Such that it will be able to talk to new and old client versions.

* CORDA-3232: Trick Detekt

* CORDA-3232: Integration test for multi-interface communication.

* CORDA-3232: Add legacy mode test.

* CORDA-3232: Making Detekt happier

* CORDA-3232: Fix Detekt baseline after merge with `4.3` branch

* CORDA-3232: Incrementing Platform version

As discussed with @lockathan

* CORDA-3232: Fix legacy test post platform version increment

* CORDA-3232: Use recursive logic to establish complete population of method names

* Revert "CORDA-3232: Incrementing Platform version"

This reverts commit d75f48aa

* CORDA-3232: Remove logic that conditions on PLATFORM_VERSION

* CORDA-3232: Making Detekt happier

* CORDA-3232: Few more changes after conversation with @mnesbit

* CORDA-3232: Make a strict match to `CordaRPCOps` on client side

Or else will fail:
net.corda.tools.shell.InteractiveShellIntegrationTest.dumpCheckpoints creates zip with json file for suspended flow

Flagging that `InternalCordaRPCOps.dumpCheckpoints` cannot be called.

* CORDA-3232: Address PR comments by @rick-r3

* CORDA-3232: Address further review input from @rick-r3

* Change the way how methods stored in the map;
* Extend test to make sure that `CordaRPCOps` can indeed be mixed with other RPC interfaces.
2019-09-26 16:01:14 +01:00
Jonathan Locke
f945e57c17
OS 4.1 -> OS 4.3 merge
OS 4.1 -> OS 4.3 merge
2019-09-26 09:41:58 +01:00
Ed Prosser
defa2565ea Merge branch 'release/os/4.1' of https://github.com/corda/corda into ENT-4104-4.3-EdP 2019-09-25 10:47:06 +01:00
bpaunescu
4672c3a13c
CORDA-3240: optional node.conf property not recognized when overridden (#5505)
* CORDA-3240: optional node.conf property not recognized when overridden

* CORDA-3240: address detekt issues

* [NOTICK]: undo incorrectly commmented out include
2019-09-25 10:34:26 +01:00
josecoll
f4f46af706
CORDA-3209 Fix vault query for participants specified in common criteria (#5508)
* Generalise participant parsing code & additional test cases.

* Use a common predicate to expand the participants query (when specified more than once - eg. in fungible and linear query criteria).

* Introduce some re-usable functions.

* Additional code clean-up and improvements.

* Fix detekt MaxLineLength errors.
2019-09-24 10:32:06 +01:00
Roger Willis
fc45fac84c
These changes should fix the ENT database integration tests. (#5500) 2019-09-20 16:22:08 +01:00
Stefan Iliev
c5dc905705 [CORDA-2368] Added exception handling for missing files that displays appropriate messages rather than defaulting to file names. (#5472) 2019-09-20 09:39:57 +01:00
opticyclic
eaed69f26f Check If Quasar Is Active Using API (#5471)
* Do a proper check for whether the quasar agent is active instead of sniffing JVM args

* Use JavaAgent.isActive instead of SuspendableHelper.isJavaAgentActive for clarity
2019-09-18 17:15:56 +01:00
josecoll
3fafbe551c
CORDA-2050 Upgrade Corda to Java 11 (compatibility mode) (#5356)
Upgrade Corda to run with Java 11 (compatibility mode) - see https://github.com/corda/corda/pull/5356
2019-09-18 10:26:26 +01:00
Ryan Fowler
75e66f9db9 CORDA-3141: Add GracefulReconnect callbacks which allow logic to be performed when RPC disconnects unexpectedly (#5430)
Also removed potential for growing stack trace on reconnects.
2019-09-17 10:00:27 +01:00
Roger Willis
1c2c3d3fed
Identity service refactor for confidential-identities and accounts (#5434)
* Removed IdentityServiceInternal as it is no longer used.

* Removed externalIdForPublicKey API from KMS and added it to IdentityService.
Added a registerKeyToExternalId API on IdentityService.

* Fix remaining compile errors.

* Removed "registerKeyToParty" and in its place added a new registerKey method which takes a PublicKey, Party and optionally a UUID.
Added a cache to the "PersistentIdentityService" to store other node's public keys.
Added the cache and new hibernate entity to all teh places where one needs to add them.
New keys created by teh node now automatically get associated entries in the KEY -> PARTY map and optionally the KEy -> EXT ID map.
Added a test.

* Removed old comments and TODOs.

* Fixed broken test.
Added comments/explanations for what's going on in IdentityService.
Updated kdocs.

* First try at Implementing publicKeysForExternalId.

* Fixed broken test.

* Added migration.
Amended existing persistent identity service migration to handle new migration.
Addressed some review comments.

* Fixed broken test - whoops!

* Implemented mock identity service methods.

* Added back exception when remapping a key to a different party.

* Fixed compile errors.
Fixed broken tests.

* Use set instead of first entry in ourNames.
2019-09-16 13:14:12 +01:00
Shams Asari
39adfbb9ea
CORDA-1836: Checkpoints which cannot be deserialised no longer prevent the node from starting up (#5367)
Instead they are logged with the flow ID. The kill flow RPC has been updated to delete such checkpoints.
2019-09-13 17:27:20 +01:00
Andrius Dagys
c7cd947c32 CORDA-3060: Notary logging improvements
Add more detailed logging to the notary service flow.
2019-09-13 12:13:55 +03:00
Jonathan Locke
16e4650d8d CORDA-3060: Improve Notary logging from an operator/admins point of view
Added logging during the processing steps of the PersistentUniqunessProvider and the RaftUniquenessProvider
Bumped up logging level of existing logging statements that occur while processing from debug to info
Added mention of txId to logging statements to enable a request to be traced through from the time it is added to the queue to the time that it is committed.
2019-09-13 12:13:55 +03:00
willhr3
79c675fb41 CORDA-3200 Fix postgres oid/ bytea column issue (#5465)
* CORDA-3200 Add postgres specific migration to change from @Lob to @Type(type = corda-blob)

* CORDA-3200 Remove unwanted changes

* CORDA-3200 Change column length to 64000 for long cert chains
2019-09-12 11:23:28 +00:00
Stefan Iliev
81a6a9ecba [CORDA-3079] Load drivers directory automatically (#5454) 2019-09-12 10:29:38 +01:00
Zoltan Kiss
f171de7b69 TM-23 Fail build on compiler warnings (#5453)
* java compile respects compilation.allWarningsAsErrors

* suppress or cleanup warnings

* suppress warning

* use non-deprecated kotlin dependency

* rename property

* handle property existence check

* Deal with warnings
2019-09-11 16:34:51 +01:00
Matthew Layton
4e6edd012a CORDA-3133 (Version 2) (#5428)
* CORDA-3133 [v1]
This proposal is a little more flexible by design. It adds a property to the state pointer class, allowing them to be referenced in transactions on a per-state-pointer basis.

* CORDA-3133
 - Updated `resolveAtTransaction` to `isResolved`.
 - Moved `isResolved` out of the constructor into an abstract property.
 - Added deprecation constructor declaration for backwards compatibility.

* CORDA-3133 (version 2)
 - Added required changes to state pointers as per PR comments.
 - Added unit tests to ensure isResolved can be used to configure when state pointers should be resolved to reference inputs.

* CORDA-3133 (version 2)
 - fixed unit tests.
 - added comment to changelog.rst.
 - added helper functions to `StatePointer` to allow easier creation of static and linear pointers.
2019-09-11 08:51:27 +01:00
willhr3
aad2e82d07 CORDA-3200 Split migrations as per https://github.com/corda/enterpris… (#5456)
* CORDA-3200 Split migrations as per https://github.com/corda/enterprise/pull/2514/files

* CORDA-3200 Additional comment to explain the ordering of migration scripts
2019-09-10 15:52:22 +01:00
Tudor Malene
a88c519096 CORDA-2740 - Remove RPC exception obfuscation (#5455) 2019-09-10 15:06:15 +01:00
Dan Newton
4cbe22949d CORDA-3018 Whitelisting attachments by public key - phase two tooling (#5386)
Allow node operators to blacklist signing keys (using blacklistedAttachmentSigningKeys config option). These blacklisted keys prevent attachments that are received over the network from being trusted. The docs have been updated to detail how to generate the key hashes that the config requires.

A new shell command attachments trustRoots has been added to see what attachments exist on the node along with information about their trust and where it comes from.

run dumpCheckpoints has been replaced by checkpoints dump as InternalCordaRPCOps needed to change to prevent a function that is meant to be internal from being visible on the shell.
2019-09-10 12:16:34 +01:00
willhr3
4fb1787f1e CORDA-3200 Use PersistentIdentityMigrationBuilder instead of schema a… (#5449)
* CORDA-3200 Use PersistentIdentityMigrationBuilder instead of schema and correctly name table using node prefix

* CORDA-3200 Remove hacky test migration from PersistentIdentityMigrationNewTable into a unit test to fix postgres failure
2019-09-10 10:51:38 +01:00
tudor.malene@gmail.com
ea73dcfb22 Merge branch 'release/os/4.1' into tudor_merge_4.1_to_4.3
# Conflicts:
#	node/src/test/kotlin/net/corda/node/services/vault/NodeVaultServiceTest.kt
2019-09-09 16:04:39 +03:00
Denis Rekalov
a4650b2bb3 CORDA-3187: Add -XX:+HeapDumpOnOutOfMemoryError -XX:+CrashOnOutOfMemoryError to default JVM args for node (#5432) 2019-09-06 13:49:52 +01:00
Nick Dunstone
9d6922d11e CORDA-3177 Additional Back Chain Resolution performance enhancements (#5415)
* Applied backchain fetch optimisations

* Removed test for bulk fetch

* Removed import

* Removed extraneous import

* Review comment
2019-09-05 14:27:42 +01:00
Dimos Raptis
1ac7715e28 [CORDA-2890] - Close security manager after broker is shut down (#5425) 2019-09-04 14:06:46 +01:00
Stefano Franz
a842740c9e
WIP Kubenetes parallel build (#5396)
* Split integration tests

* add simple example of printing all methods annotated with @Test

* add docker plugin to root project
remove docker plugin from child projects
add Dockerfile for image to use when testing
add task to build testing image to root project

* add comment describing proposed testing workflow

* simple attempt at running tests in docker container

* add my first k8s interaction script

* add fabric8 as dependnency to buildSrc

* before adding classpath

* collect reports from containers and run through testReports

* re-enable kubes backed testing

* for each project
1. add a list tests task
2. use this list tests task to modify the included tests
3. add a parallel version of the test task

* tweak logic for downloading test report XML files

* use output of parallel testing tasks in report tasks to determine build resultCode

* prepare for jenkins test

* prepare for jenkins test

* make docker reg password system property

* add logging to print out docker reg creds

* enable docker build

* fix gradle build file

* gather xml files into root project

* change log level for gradle modification

* stop printing gradle docker push passwd

* tidy up report generation

* fix compilation errors

* split signature constraints test into two

* change Sig constraint tests type hierarchy

* tidy up build.gradle

* try method based test includes

* add unit test for test listing

* fix  bug with test slicing

* stop filtering ignored tests to make the numbers match existing runs

* change log level to ensure print out

* move all plugin logic to buildSrc files

* tidy up test modification
add comments to explain what DistributedTesting plugin does

* move new plugins into properly named packages

* tidy up runConfigs

* fix compile errors due to merge with slow-integration-test work

* add system parameter to enable / disable build modification

* add -Dkubenetise to build command

* address review comments

* type safe declaration of parameters in KubesTest
2019-09-03 15:40:08 +00:00
Roger Willis
99f4e4aac2
CORDA-3182: Added additional property on VaultQueryCriteria for querying by account (#5423)
* Added an additional property on VaultQueryCriteria to specify an externalId/accountId when performing a vault query.
Added logic in hibernate query criteria parser to handle the exernalId join and lookup.
Added a test.

* Fixed error in test.
Fixed backwards incompatible changes.

* Updated changelog.

* Updated docs to remove incorrect instructions for querying by external ID.
2019-09-03 11:55:26 +01:00
Stefano Franz
c2057e0893 CORDA-3180: Added ability to lookup the associated UUID for a public key to KeyManagementService (#5411)
* expose identity cache to KMSinternal

* apply shams comments

* Addressed review comments.
2019-09-01 07:57:46 +01:00
Stefano Franz
cd0d5c7724 Ensure that ServiceHub.WithEntityManager has a database transaction available (#5413)
* tidy up withEntityManager

* address rick review comment

* api break
2019-08-30 15:58:50 +01:00
Roger Willis
6202165957
Fix for CORDA-3178. FilterMyKeys now uses the key store as opposed to the cert store. (#5418) 2019-08-30 10:55:31 +01:00
willhr3
07b96aea18 CORDA-2925 Rebase identity service changes onto 4.3 (#5407)
* CORDA-2925 Rebase identity service changes onto 4.3

* CORDA-2925 Move migration to after v13

* CORDA-2925 Update schema list

* Change corda-version
2019-08-29 11:57:07 +01:00
josecoll
f09bff9c0f
Make concurrent updates to contractStateTypeMappings thread safe. (#5410) 2019-08-29 09:55:21 +01:00
Dimos Raptis
b97062bacc [CORDA-3098] - Close previous connection after reconnection (#5339) 2019-08-28 16:44:57 +01:00
Jonathan Locke
20585266a5
[NOTICK]: Change Corda version
Change Corda version
2019-08-28 15:38:36 +01:00
Stefan Iliev
3a6787437d CORDA-3022 Add wildcard RPC permissions (#5174)
* Added small poc changes to accommodate requested permissions.

* Added node user that can only start flows and has the neccessary permissions.

* Fixed type in the rpc unit tests.

* Finaliase wildcard RPC permissions, remove builtin maintainer/nodeuser roles

* Tidy up
2019-08-28 15:29:06 +01:00
Stefano Franz
e35c0c1df7
CORDA-3009 - Migrate identity service to use to string short (#5217)
* migrate PersistentIdentityService to use key.toShortString()
update definition of PublicKeyToExternalId mapping to allow fast lookup by externalId/publicKey

* fix misspelled table name

* add test of migration script

* add design document for proposal to move IdentityService to using the correct PK.toStringShort() method for hashing a publickey

* add enterprise testing considerations to design

* address review comments

* fix compilation errors

* modify PublicKeyToOwningIdentityCache to use toStringShort() as it's lookup key

* address syzmon's code review comments
2019-08-28 14:16:18 +00:00
Jonathan Locke
5ede8b5761 [NOTICK]: Change Corda version
Removed unnecessary comment which will just get outdated.
2019-08-28 14:35:06 +01:00
Jonathan Locke
c525f77ae9 [NOTICK]: Change Corda version
Changed Corda version in places where it was missed.
2019-08-28 14:14:39 +01:00
Jonathan Locke
35d0170b0a Merge branch 'master' into jlocke/merge_4.1_20190827 2019-08-27 15:21:21 +01:00
Jonathan Locke
e5f314ffbf Merge branch 'release/4' into jlocke/merge_4.1_20190827
Merged release/4 (Corda OS version 4.1) into a branch created from master (Corda OS version 4.3)

Conflicts:
	build.gradle
	client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt
	common/logging/build.gradle
	common/logging/src/main/kotlin/net/corda/common/logging/CordaVersion.kt
	constants.properties
	core-tests/src/test/kotlin/net/corda/coretests/utilities/ProgressTrackerTest.kt
	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
	docs/source/api-contract-constraints.rst
	docs/source/api-stability-guarantees.rst
	docs/source/app-upgrade-notes.rst
	docs/source/changelog.rst
	docs/source/clientrpc.rst
	docs/source/conf.py
	docs/source/corda-network/UAT.md
	docs/source/getting-set-up.rst
	docs/source/network-builder.rst
	docs/source/upgrading-cordapps.rst
	docs/source/versioning.rst
	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt
	serialization/src/main/kotlin/net/corda/serialization/internal/model/LocalTypeInformationBuilder.kt
	tools/network-builder/src/main/resources/node-Dockerfile
	tools/network-builder/src/main/resources/notary-Dockerfile
2019-08-27 14:51:22 +01:00
Shams Asari
90284a6143
CORDA-2919: JacksonSupport, for CordaSerializable classes, improved to only uses those properties that are part of Corda serialisation (#5397) 2019-08-27 13:06:28 +01:00
James Higgs
d1b9e95cd5 [ENT-4024] Use string for the status column in the transaction table (#5379) 2019-08-21 10:50:08 +01:00
James Higgs
101d978050 [CORDA-3149] Update cache to check node identity keys in identity table (#5371) 2019-08-19 20:03:51 +01:00
Shams Asari
69d1b4e4e5
CORDA-3138: Removed InMemoryTransactionsResolver as it's not needed and other resolution cleanup (#5370) 2019-08-16 12:34:25 +01:00
Dan Newton
a477d59c15 CORDA-3094 improvements to checkpoint dumper (#5324)
- Handle errors in Jackson and checkpoint deserialisation. A file
  notifying the user that the checkpoint dump failed is created when
  errors occur.
- Handle message deserialisation errors. A string placeholder is used
  if an error occurs.
- Add more information about subflows (include their `FlowLogic`)
- Increase clarity in checkpoint output field names

* CORDA-3904 Add `flowCallStackSummary`

Add `flowCallStackSummary` to the output which contains the same content
as `flowCallStack` minus each subflow's `FlowLogic`. The `FlowLogic`
contains a ton of info which is normally repeated in each subflow.
Adding the summary gives an overview of the steps the flow executed
and which step it is currently on.

The `suspendedOn` field is put underneath the summary and the original
call stack is moved below the suspended info.

This puts the most useful information towards the top of the json file.
2019-08-14 14:08:58 +01:00
James Higgs
72ac722451 [CORDA-3130] Add a cache for looking up external UUIDs from public keys (#5357) 2019-08-14 13:24:56 +01:00
Ryan Fowler
98329444f5 Revert "ENT-3658, ENT-3660: Add timeouts and hospital flow handling to CryptoService (#5364)
This reverts commit 6df142bf

* Clean some code to better merge between versions
2019-08-13 11:42:03 +01:00
Dan Newton
fc265ee472 CORDA-3018 Whitelisting attachments by public key - relax signer restrictions (#5358)
* CORDA-3018 Allow loading an untrusted contract jar if another attachment exists that was signed with the same keys and uploaded by a trusted uploader

`TransactionUtils.isAttachmentTrusted` requirements have been relaxed
to allow an untrusted attachment to be loaded as long as another
attachment exists that is signed by the same keys and was uploaded
by a trusted uploader.

The requirement of containing the same contract classes has been
removed. Therefore the contents of the existing trusted attachment
no longer matters.

* CORDA-3018 Allow a subset/intersection of signers in `isAttachmentTrusted`

Allow a subset/intersection of signers to satisfy the signer
requirements of `isAttachmentTrusted`. This allows an "untrusted"
attachment that is signed by one or more keys to be "trusted" as long
as another trusted attachment already exists that is signed by at least
one of the "untrusted" attachments signers.

A cache of trusted and untrusted public keys is now held (replacing the
previous cache of `List<PublicKey>`.

Tests have been added to `NodeAttachmentServiceTest` to confirm that
an attachment query using an `EQUAL` statement will actually return
attachments that are signed by any of the keys passed into the query.

Confirming this allowed an `EQUAL` query to satisfy the search that
had to be done as part of this change.

`MockAttachmentStorage`'s query criteria was updated to better match
the real `NodeAttachmentService` implementation.

* CORDA-3018 Update cache name and kdoc on `isAttachmentTrusted`

* CORDA-3018 Verify that chains of trust do not occur

* CORDA-3018 Switch keys around to improve chain of trust tests
2019-08-08 09:33:45 +01:00
James Higgs
44428b6048 ENT-3801 Backport to OS (#5355)
* [ENT-3801] Store transactions in the database during transaction resolution (#2305)

* ENT-3801: Store downloaded txns as part of the backchain resolution into the db rather than the checkpoint

It's very inefficient to store the downloaded backchain in the checkpoint as more of it downloaded. Instead, if a threshold is reached (which currently defaults at 0) then the backchain is stored in the transactions table as unverified. A new is_verified column has been added to track this. Initially testing on the OS codebase has been very promising but unfortunately this current code is not quite ready. I had to quickly port it to ENT as this is meant to be an ENT-only optimisation.

To that effect, there is a TransactionResolver abstraction with two implementations: an in-memory one which has the old behaviour, and which will be the behaviour for OS, and a db one.

DBTransactionStorage hasn't been fully updated and I had to comment out the optimistic path for now.

Most of these changes will need to be ported to OS to keep the merge conflicts in check, but obviously not DbTransactionsResolver and the "is_verified" changes in DBTransactionStorage. DBTransactionStorage does have other refactoring which will make sense to port though.

* [ENT-3801] Start work on allowing modifications in AppendOnlyPersistentMap

* [ENT-3801] Add transaction resolver tests

* [ENT-3801] Adjust suspendable annotations

* [ENT-3801] Fix the ResolveTransactionFlow tests

* [ENT-3801] Update ResolveTransactionsFlow tests

* [ENT-3801] Add a liquibase migration script for isVerified

* [ENT-3801] Ensure the migration runs in the correct place

* [ENT-3801] Handle resolution of already present transactions

* [ENT-3801] Fix compile error in performance test app

* [ENT-3801] Logging and comment updates, plus a test case

* [ENT-3801] Add a notary change resolution test

* [ENT-3801] Add a contract upgrade transaction test

* [ENT-3801] Change new column to be a character based status

* [ENT-3801] Migration script type change

* [ENT-3801] Address first round of review comments

* [ENT-3801] Update variable names in AppendOnlyPersistentMap

* [ENT-3801] Another variable name clarification

* [ENT-3801] Fix missing name changes

* [ENT-3801] Make the signature list immutable when constructing cache value

* [ENT-3801] Add a locking strategy for unverified transactions

* [ENT-3801] Address tidying up review comments

* [ENT-3801] First attempt at ensuring locks are released after commit

* [ENT-3801] Remove references to old cache name

* [ENT-3801] Update locking logic

* [ENT-3801] Fix potential deadlock with read/write transaction locks

* [ENT-3801] Remove read locks, and ensure minimal extra suspends

* [ENT-3801] Fix build issues in tests

* [ENT-3801] Use the correct clock when calculating sleep durations

* [ENT-3801] Add a pessimism flag for writing verified transactions

* [ENT-3801] Change logging statement to debug

(cherry picked from commit 8ab6a55e17)

* [NOTICK] Fix up imports for some changed files

* [NOTICK] Fix transaction resolution tests

* [NOTICK] Reinstate the DBTransactionsResolver

* [NOTICK] Add the topological sort back to recordTransactions

* [NOTICK] Adjust test case to remove dependency on query ordering

* [NOTICK] Make test code match that in ENT
2019-08-07 16:49:49 +01:00
Viktor Kolomeyko
b60ab70440 CORDA-2617: Add failover listeners to terminate node process (#5337)
* CORDA-2617: Add failover listeners to terminate node process

This is a backport of changes done in Corda Enterprise.

It will be triggered in case of:
a) Loss of connectivity to in-built Artemis for Bridge Control;
b) Loss of connectivity to in-built Artemis for P2P connectivity.

Note on merge to CE: Disregard these changes and take whatever CE already has.

* CORDA-2617: Update documentation on stability of Corda Node

* CORDA-2617: Documentation update after discussion with @mnesbit
2019-08-06 11:28:16 +01:00
Stefano Franz
fa75711647 CORDA-3055 - Parallel node info download (#5097)
* parallelize download of nodeInfos

* actually call new list based addNodes method

* address review comments
fix NetworkMapUpdaterTest

* ensure threadpools are shutdown after network-map download is completed

* use NamedThreadFactory instead of re-implementing it.

* fix imports after rebase

* address review comments

* remove extra whitespace
2019-08-02 13:54:18 +01:00
Chris Rankin
813ff39eaa CORDA-3127: Move evaluationDependsOn() from core to core-tests. (#5349)
* CORDA-3127: Move evaluationDependsOn() from core to core-tests.

* Increase JVM memory for node unit tests to 3G.
2019-08-02 09:05:19 +01:00
josecoll
99e802c5c5 CORDA-3071 - Checkpoint agent tool (#5295)
* Initial commit based on experimental kryo hook agent.

* WIP

* Added documentation.

* Additional improvements and documentation following more testing.

* Added field level instrumentation + basic type handlers for String, byteArray, charArray, primitive types.

* Working version (without array type handling)

* Missing build.gradle file.

* Handle display of Arrays and String.
Pruning output to avoid repetition (by loop depth, object count).

* Added configurable StackDepth (for display purposes) and filter out ProgressTracker stacks.

* Further array handling (Object arrays, 2D, 3D), improved display and general code cleanup.

* Various fixes and improvements following demo to RP.

* Clean-up

* Further clean-up

* Set checkpoint id before deserialization.

* Update documentation

* Final clean-up.

* Minor documentation fixes.

* Updates following PR review feedback.

* Add changelog entry.
2019-08-01 09:40:52 +01:00
szymonsztuka
eff762a5c3 CORDA-3012 More information in log warning for Cordapps missing advised JAR manifest file entries. (#5325) 2019-07-31 15:30:00 +01:00
Dan Newton
8ac472b933 ENT-3504 Do not throw exception for missing fiber and log instead - OS version
Change to `SingleThreadedStateMachineManager`.

Instead of throwing an exception when a flow's fiber cannot be found,
just log the message at info level.

(cherry picked from commit 70b2a94fda)
2019-07-30 17:27:04 +01:00
LankyDan
9bf26c20e0 CORDA-2920 Hash to Signature Constraint automatic propagation
Allow Hash Constraints to propagate to Signature Constraints. When
propagating, the new jar is added to the transaction instead of the
original contract attachment (jar).

The following requirements must be met to do so:
- System property "net.corda.node.disableHashConstraints" must be set
  to `true`
- The min platform version must be 4 or greater
- There must be an input state with a hash constraint
- There must be no output states with a hash constraint
- The new jar must be signed

If these requirements are not met, the original Hash
Constraint will be kept and the contract attachment related to it is
also used.

This transition is done at the start of `handleContract` as it is not
the normal path a transition would follow. It is considered a backdoor
and should be treated separately from the rest of the attachment and
constraint logic. Furthermore, it will only work in private network
since all nodes must set the special `disableHashConstraints` flag.
2019-07-29 12:58:58 +02:00
Shams Asari
06e709f86b
CORDA-3092: Exception is logged if flow session message can't be deserialised (#5308) 2019-07-18 09:22:29 +01:00
josecoll
b4749eb8f9
CORDA-2991 (Cont): set node info polling interval to 1 second in DriverDSL Node Startup (#5285)
* Fix test execution flakiness on fast hardware: set node info polling interval to 1 second in DriverDSL Node Startup (was only being set to 1 sec in Node Registration). Follow-up to https://github.com/corda/corda/pull/5240

* Diagnostics: add additional logging to NodeInfoFilersCopier.

* Diagnostics: add additional logging to NodeInfoWatcher

* Downgrade logging level severity to debug.

* Make atomic counter unique across instances.
2019-07-17 14:48:46 +01:00
Dan Newton
70b2a94fda ENT-3504 Do not throw exception for missing fiber and log instead - OS version (#5292)
Change to `SingleThreadedStateMachineManager`.

Instead of throwing an exception when a flow's fiber cannot be found,
just log the message at info level.
2019-07-16 11:31:37 +01:00
Dimos Raptis
8962d930d4 [CORDA-2923] - Make the RPC client reconnect with gracefulReconnect param (#5244)
When set to true the RPC client will:

* automatically reconnect when the connection is broken
* simple RPC calls will block until connection is established
* Observables returned from RPC will automatically resubscribe on reconnect so the client continues to receive events. This doesn't guarantee that events will not be lost during the reconnect.
2019-07-16 11:29:21 +01:00
Viktor Kolomeyko
e96dcedfc6 CORDA-3068: Pass base directory when resolving relative paths (#5297) 2019-07-15 10:51:39 +01:00
Shams Asari
dfa3c67919 Removing reference to Enterprise in test (#5293) 2019-07-11 13:36:00 +01:00
Shams Asari
49cda57c81
AppendOnlyPersistentMapBase.allPersisted no longer loads everything into memory at once (#5286)
As a general purpose API, allPersisted should not be loading the entire contents of the database table into memory. Instead now it returns a Stream for processing of elements.
2019-07-10 18:09:02 +01:00
Dan Newton
9bcaecfbe3 Delete unused DuplicateContractClassException (#5284) 2019-07-10 17:01:38 +01:00
gwr3com
22e4b8e962 CORDA-3028: Add Node Diagnostics Info RPC Call - Backport a diff from… (#5287)
* CORDA-3028: Add Node Diagnostics Info RPC Call - Backport a diff from Corda ENT

* CORDA-3028: Add Node Diagnostics Info RPC Call - Rename a value for consistency

* CORDA-3028: Add Node Diagnostics Info RPC Call - One more change
2019-07-10 11:31:44 +01:00
Christian Sailer
687fa81894 ETO-39 Move core tests (#5255)
* Moved core.flows and core.contract tests

* move internal tests

* move node, schemas and serialization tests

* Move transactions tests

* Move test access helper into test package

* Move remaining tests, and create access helpers to test internals.

* Fix test dependencies.

* Delete some cruft that flagged up on the API checker

* Add readme explaing where tests need to go.

* fix typo
2019-07-09 10:09:21 +01:00
gwr3com
933330bc4c CORDA-3028: Add Node Diagnostics Info RPC Call (#5271)
* CORDA-3028: Add Node Diagnostics Info RPC Call - Initial commit

* CORDA-3028: Add Node Diagnostics Info RPC Call - Changes after code review

* CORDA-3028: Add Node Diagnostics Info RPC Call - Additional code review update and documentation

* CORDA-3028: Add Node Diagnostics Info RPC Call - Additional changes to documentation

* CORDA-3028: Add Node Diagnostics Info RPC Call - Another change to documentation

* CORDA-3028: Add Node Diagnostics Info RPC Call - More changes to documentation

* CORDA-3028: Add Node Diagnostics Info RPC Call - Comment change
2019-07-08 14:43:50 +01:00
Dan Newton
6d3a6a3998 ENT-3710 Add TransientConnectionCardiologist to Flow Hospital (#5277) 2019-07-08 11:07:50 +01:00
Rick Parker
306df8e219
CORDA-3053 Validation should pass with systemProperties defined in config (#5276)
* CORDA-3053 Validation should pass with systemProperties defined in config

* CORDA-3053 Fix failing test and add new one
2019-07-05 17:20:57 +01:00
James Higgs
075f68f179 [CORDA-2086] Allow transactions to be re-recorded using StatesToRecord.ALL_VISIBLE (#5184) 2019-07-04 14:00:42 +01:00
Dominic Fox
14a20654bd CORDA-2991 shorten poll intervals for node info file propagation (#5240)
* CORDA-2991 shorten poll intervals for node info file propagation

* Relax minimum poll time constraint

* Relax, not comment out, minimum poll time constraint

* Correct error message
2019-07-03 15:00:55 +01:00
fowlerrr
6df142bf7a ENT-3658, ENT-3660: Add timeouts and hospital flow handling to CryptoServices (#5226) 2019-07-03 12:39:32 +01:00
Manoj
44835bd17c CORDA-2914: Allow certificate directory to be a symlink (#5102) 2019-07-03 10:39:40 +01:00
Stefano Franz
88894bc592
add a shared memory port allocator to allow multiple processes to sha… (#5223)
* add a shared memory port allocator to allow multiple processes to share a single allocation pool

* remove dangerous reset function on port allocator

* set forkCount = 2 in node integration test

* only allow one build of a cordapp at any given time for Driver tests

* make all portallocation requests use same starting point

* globally set forks to 6

* tweak forking parameters to allow parallel builds

* tweak unit test parallelism

* 2 workers for integrationTest

* some more tweaks for parallel builds

* some more tweaks for parallel builds

* seems that 49K is not the start of ephemeral ports on all kernels

* tweak parallel settings

* try fix RPC shutdown test in parallel env

* add some logging for RPC shutdown test

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* added some logging around PortAllocation tests - try figure out where they are getting stuck

* fix api-scanner tests

* minimize api changes

* revert to complying with existing API

* add the AtomicInteger for api compatibility reasons

* make sizing script executable

* address review comments pt1

* address review comments pt2

* fix compile errors after review comments

* return to using home dir as temp dir seemed to interact badly with gradle
2019-07-02 18:38:33 +00:00
Viktor Kolomeyko
0ad5c2176d CORDA-3021: Use CryptoService in Node's ConfigUtilities to minimise merge conflicts with ENT (#5264) 2019-06-28 09:53:41 +01:00
fowlerrr
ffe328c604 CORDA-2720: Refactor NodeConfiguration out of NodeRegistrationHelper (#5181) 2019-06-27 16:56:03 +01:00
Andrius Dagys
c1542f386a CORDA-2996: NotaryLoader - improve exception handling (#5210)
Ignore InvocationTargetException and only propagate the cause to avoid noise.
2019-06-27 13:33:38 +01:00
Viktor Kolomeyko
51f1e442a3 CORDA-3021: Introduce SignOnlyCryptoService and use it whenever possible (#5239)
* CORDA-3021: Introduce `SignOnlyCryptoService` and use it whenever possible

Also modify `CryptoServiceFactory` to show how sign only implementation can be created.

* CORDA-3021: Undo some of my earlier changes

Which after discussion with @dimosr and @fowlerrr proven to be contradictory.
2019-06-27 11:55:59 +01:00
Stefan Iliev
0083931eb7 NOTICK - renamed postgres to postgresql (#5220) 2019-06-26 18:52:45 +01:00
Shams Asari
2e02968c63
ENT-3496: dumpCheckpoints shell command (#5171)
Dumps all the node's checkpoints as JSON into a single zip file in the node's directory. The output contains:

* All the fields for the top-level flow
* The current sub-flow call stack, along with the current progress tracker step for each sub-flow
* The event that suspended the flow, which if it's a send or sendAndReceive will show the payload that was sent
* Low level information on the active sessions with other peers
2019-06-26 15:31:02 +01:00
Stefan Iliev
d1e7850dd1 CORDA-2176 - test that logging is not broken. (#5224)
* Initial commit with a test that can detect a logger that isn't initialised with by lazy that gets called during startup.

* Test improvement. Test fix for api stability.

* Added explanatory comment for the test.

* Changes according to PR review. Added empty file check to make test more robust.
2019-06-25 14:35:39 +01:00
Shams Asari
99bc614b7c Merge remote-tracking branch 'origin/feature/CID-878-non_party_flow_sessions' into shams-merge-cid-878 2019-06-21 16:46:41 +01:00
Shams Asari
76eec9aa8b
CORDA-3033: Introducing Destination interface for initiating flows with (#5242)
Party and AnonymousParty have been retrofitted to implement this interface and are currently the only supported types. A new FlowLogic.initiateFlow(Destination) method overload to easily support the addition of new destination types in future versions.
2019-06-21 16:39:56 +01:00
Christian Sailer
0cd57c81bc Test the scheduler picking up a persisted scheduled state without shutting down/restart the db. (#5236) 2019-06-21 15:16:10 +01:00
Viktor Kolomeyko
3ceb242ee1 CORDA-2935 - Align timeouts for CRL retrieval and TLS handshake (#5126) 2019-06-21 09:34:15 +01:00
James Brown
0101cdbd56 ENT-3542 remove unused commons-codec dep (#5207) 2019-06-21 09:30:40 +01:00
Shams Asari
4e835d5483
CORDA-2333: Updated the majority of the dependencies that were out of date (#5235)
Some where not touched, including the crypto ones, libraries related to messaging and Kotlin.
2019-06-20 16:19:16 +01:00
Shams Asari
843c3a0190
All uses of CheckpointStorage.getAllCheckpoints() close the stream after use (#5230) 2019-06-19 09:45:38 +01:00
Shams Asari
f0f05df9f4 Merge branch 'master' into feature/CID-878-non_party_flow_sessions
# Conflicts:
#	core/src/test/kotlin/net/corda/core/flows/CollectSignaturesFlowTests.kt
2019-06-18 13:14:55 +01:00
Stefano Franz
f9c034aa7c CORDA-3000: Allow AbstractParty to initiate flow (#5219) 2019-06-18 13:13:09 +01:00
LankyDan
e3db3a386e ENT-3496 Address pr comments 2019-06-17 16:43:05 +01:00
LankyDan
afc36615d0 ENT-3496 Address pr comments 2019-06-17 16:04:05 +01:00
Shams Asari
2152961d46
CORDA-2333: Dependency update pass for tests and demos (#5211) 2019-06-13 10:15:13 +01:00
LankyDan
245a14d499 ENT-3496 Add suspendedTimestamp and secondsSpentWaiting to checkpoint dump 2019-06-11 16:22:17 +01:00
Stefan Iliev
3b73e60605 CORDA-2774 Fix for liquibase changelog warnings. (#5199) 2019-06-11 15:33:05 +01:00
LankyDan
143499f6fd ENT-3496 Add the checkpointed flow's simple name to the json file name 2019-06-11 09:38:48 +01:00
LankyDan
330b5a1d3c ENT-3496 Fix compile error in ThreadContextAdjustingRpcOpsProxyTest 2019-06-11 09:06:44 +01:00
LankyDan
31a0c077b8 ENT-3496 Move dumpCheckpoints to the new InternalCordaRPCOps interface
To prevent making `dumpCheckpoints` part of the public API a new
interface, `InternalCordaRPCOps` has been created and the function
has been moved there. `InternalCordaRPCOps` inherits from
`CordaRPCOps`.

`CordaRPCOpsImpl` now implements `InternalCordaRPCOps`.

`RunShellCommand` and `StringToMethodCallParser` required additional
changes due to issues handling inherited functions. This has only been
raised now due to `InternalCordaRPCOps` inheriting from `CordaRPCOps`.

Many classes have had references to `CordaRPCOps` changed to
`InternalCordaRPCOps`.
2019-06-10 16:15:03 +01:00
LankyDan
d8395baf62 ENT-3496 Create log directory to place dumps if it does not already exist 2019-06-10 15:10:34 +01:00
bpaunescu
726798cce8 ENT-3642: move the crypto service builder method to node-api (#5198)
* ENT-3642: move the crypto service builder method to node-api

* ENT-3642: add arg for different crypto services

* ENT-3642: add arg for cryptoservice config

* ENT-3642: add null check for BCC requirement

* ENT-3642: remove double-bang operator

* ENT-3642: cryptoservice factory method moved to its own class, improve API

* ENT-3642: remove import
2019-06-07 09:10:42 +01:00
josecoll
603da3eeff
CORDA-2984 Re-instate CordaCaplet tests and move CordaCaplet code into :node:cap… (#5197)
* Re-instate CordaCaplet tests and move CordaCaplet code into :node:capsule module.

* Clean-up verbose IntelliJ refactoring.

* Updated buildCordaJAR task references to resolve CordaCaplet from :node:capsule project.

* Incorporating feedback from PR review.
2019-06-07 08:55:19 +01:00
LankyDan
684e9cdf58 ENT-3496 Store dump in logs directory and only one dump at a time
Store the flow dump zip in the logs directory.

Only allow one dump to be created at a time. This is protected by
using a `AtomicInteger` lock and checking for the zip's existence.
2019-06-06 15:35:15 +01:00
Rick Parker
0c0101948b
CORDA-2981 Disable slow consumers for RPC since it doesn't work. (#5194)
* CORDA-2981 Disable slow consumers for RPC since it doesn't work.
2019-06-05 11:47:38 +01:00
josecoll
8678bad88d
CORDA-2970 Revert usage of Gradle JUnit 5 Platform Runner (#5173)
* Revert usage of Gradle 5 useJUnitPlatform() which causes significant test execution performance degradation.

* Remove completely top-level Java CordaCaplet unit tests causing consistent TC failure on Azure VMs:

 java.security.NoSuchAlgorithmException: no such algorithm: NONEwithEdDSA for provider BC
2019-06-05 10:17:02 +01:00
szymonsztuka
937e467aac CORDA-2971 - added tests for initialiseSchema configuration option (#5153) 2019-06-04 11:37:32 +00:00
Roger Willis
1fc7405c7f
Fix for CORDA-2972. (#5185) 2019-06-04 11:21:56 +01:00
Tudor Malene
f8d8de7555 CORDA-2975 Remove version uniqueness check - fix tests 2019-06-03 14:41:10 +02:00
Tudor Malene
77ab33d5b0 CORDA-2975 Remove version uniqueness check 2019-06-03 14:41:10 +02:00
Stefan Iliev
3b7f0aff92 ENT-3484 - Added periodic log.warn message to remind that the node has been set into draining mode. (#5151)
* Added periodic message logged from a timer which is switched on and off by the node drain events.

* Timer also spawns on start() to ensure that if a node is shutdown in draining mode and started with it, it will continue logging messages.
2019-06-03 13:49:29 +03:00
josecoll
06db5973d5
Reduce test execution times by explicitly configure quasar package exclusions (#5161)
* Reduce test execution times by explicitly configure quasar package exclusions (using new quasar util extension introduced in Corda gradle plugins 5.0.1-SNAPSHOT).

* Remove SNAPSHOT from Corda gradle plugins version identifier.

* Incorporating PR review feedback from CR.

* Minor consolidation clean-up.

* Minor consolidation clean-up.

* Minor consolidation clean-up.
2019-05-30 10:09:11 +01:00
Shams Asari
a70bd6ffa0 Clean up 2019-05-24 17:50:17 +01:00
Shams Asari
5619debf18 ENT-3496: dumpCheckpoints RPC
Dumps all the node's checkpoints as JSON into a single zip file in the node's directory. The output contains:

* All the fields for the top-level flow
* The current sub-flow call stack, along with the current progress tracker step for each sub-flow
* The event that suspended the flow, which if it's a send or sendAndReceive will show the payload that was sent
* Low level information on the active sessions with other peers
2019-05-24 17:28:36 +01:00
Rick Parker
d6ac4e2393
CORDA-2838 Set Artemis memory config. (#5011)
* CORDA-2838 Set Artemis memory config.

* CORDA-2838 Cannot have page size larger than max size.

* CORDA-2838 Use real slow consumers.  Need to see if the old config settings can work with a global limit to avoid this.
2019-05-23 14:30:11 +01:00
Shams Asari
71c316ca5a
CORDA-2954: Upgrade to common-lang3 (#5152)
Utilised Fields.getAllFieldsList where we were doing the equivalent
2019-05-21 17:48:32 +01:00
josecoll
0263650a5f
Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146)
This reverts commit f46377556c, reversing
changes made to ba675e73b9.
2019-05-20 16:16:49 +01:00
josecoll
a7966e6176 Fix attempt to access boot classpath from runtimeMXBean (in JDK9+) 2019-05-20 15:09:36 +01:00
josecoll
da189a3cd2 EXPERIMENTAL: tweaks and attempts to set module directives (with/without using gradle module plugin) 2019-05-20 15:08:27 +01:00
josecoll
4603305a35 Move Java unit test into kotlin package to prevent ASM compilation/classloading error (REVISIT)
* What went wrong:
Caused by: org.gradle.api.GradleException: failed to read class file /Users/josecoll/IdeaProjects/corda-jdk11/node/build/classes/java/test/net/corda/node/services/events/FlowLogicRefFromJavaTest$JavaNoArgFlowLogic.class
2019-05-20 15:08:27 +01:00
josecoll
cce16c8522 Remove usage of private JDK class "sun.misc.Signal" (REVISIT) 2019-05-20 15:08:27 +01:00
josecoll
804f8dc17b Update Java Version checking. 2019-05-20 15:08:27 +01:00
josecoll
4db2447e0b Fixed JUnit to not use a deprecated/removed JDK package "com.sun.xml.internal.messaging.saaj". 2019-05-20 15:08:27 +01:00
josecoll
c8eb13efe2 Fix JUnit by adjusting assertion to reflect improved uncompressed byte size. 2019-05-20 15:08:27 +01:00
josecoll
6d99e0fec4 Upgrade quasar to JDK11 supported version (0.8.0) - dependent on Corda "quasar-utils" gradle plugin upgrade. 2019-05-20 15:08:27 +01:00
josecoll
2a2fb6f82a Change checkJavaVersion() startup check to support JDK 11. 2019-05-20 15:08:27 +01:00
josecoll
ac56f302eb TEMP disable use of "sun.security, sun.misc.Unsafe" in serializer lists (re-instate with module add-exports directive) 2019-05-20 15:08:27 +01:00
josecoll
b8fb617ee1 TEMP disable use of "sun.misc.VMSupport" (re-instate with module add-exports directive) 2019-05-20 15:08:27 +01:00
josecoll
579a95b849 Remove illegal imports: sun.security, sun.reflect. 2019-05-20 15:08:27 +01:00
josecoll
ba675e73b9
CORDA-2893 Upgrade Corda to use Gradle 5.4.1 (Take 2) (#5137)
Upgrade Corda to use Gradle 5.4.1
2019-05-20 14:26:42 +01:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
josecoll
0eab42b63e
Revert "CORDA-2893 Upgrade Corda to use Gradle 5.x (#5063)" (#5135)
This reverts commit 88babefd89.
2019-05-17 11:11:05 +01:00
josecoll
88babefd89
CORDA-2893 Upgrade Corda to use Gradle 5.x (#5063)
* Upgrade gradle wrapper to Gradle 5.0

* Upgrade to use locally deployed version of Capsule plugin (using Gradle 5.0)

* Upgrade to use Corda Gradle Plugins 5.x (inclusive of Gradle 5.0 compatibility fixes)

* Fix compile-time problems resolving log4j packages.

* Update to use Artifactory deployed version of Capsule plugin (using Gradle 5.0)

* Upgrade to use Gradle 4.2.1 (excluding default memory setting change: command line client now starts with 64MB of heap instead of 1GB.)

* Added explicit compile-time dependency on 'de.jensd:fontawesomefx-commons:8.13' (compile-time error in tools:explorer without)

* Update "wrapper" gradleVersion to 5.4.1

* Update Capsule plugin version label to reference R3 forked build.

* Commit all gradle upgrade changes following: ./gradlew wrapper --gradle-version 5.4.1

* Increase maximum heap memory for Test tasks to 1GB, and upgrade build-scan plugin to 2.2.1.

* Increase Test tasks' maximum memory to 1.5GB - what could go wrong?

* Up maxHeapSize to 2g for gradle test runner (global setting).

* Added explicit compile-time dependency on 'de.jensd:fontawesomefx-commons:8.13' (compile-time error in tools:demobench without)

* Added forkEvery for node Unit tests.

* Up :node test task 'forkEvery' to 10.

* TC test execution tuning (:core, :node => forkEvery 10, default JVM heap size)

* TC test execution tuning (bump JVM heap size up to 1g for :node)

* TC test execution tuning (bump JVM heap size up to 1.5g for :node)

* TC test execution tuning (re-instate global JVM heap size of 1Gb)

* TC test execution tuning (re-instate JVM heap size of 2Gb for :node)

* Update Corda Gradle plugins to 5.0.0

* Updated plugin resolution order + renamed artifactory URL to use "software.r3.com"

* Reorder plugin resolution such that mavenlocal() is always queried first.
2019-05-17 10:36:21 +01:00
James Brown
c832b4dd6c ENT-3542 remove unused commons-codec dep (#5087) 2019-05-16 15:15:38 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
Viktor Kolomeyko
355604457f CORDA-2935: Align timeouts for CRL retrieval and TLS handshake (#5125) 2019-05-15 09:19:51 +01:00
JamesHR3
d8a790b3ce [CORDA-2866] Adjust RPC test case to prevent failures on non-H2 databases (#5114) 2019-05-10 11:13:12 +01:00
JamesHR3
b4e96778bf [CORDA-2517] Whitelist attachments signed by keys that already sign existing trusted attachments (#5068)
This allows a different signed version of the same CorDapp to be automatically trusted.

This reverts "[CORDA-2575] Allow users to whitelist attachments by public key config (#5035)"
2019-05-07 12:55:27 +01:00
JamesHR3
c533792f3f [CORDA-2866] Prevent node startup if legal identity key is lost but node key isn't (#5090) 2019-05-07 11:49:29 +01:00
Dan Newton
268f6db430 CORDA-825 Test jdbc session and entity manager in corda service constructors (#5088) 2019-05-02 16:34:44 +01:00
Tudor Malene
4c31e8c1fe Increase the wait time for events as it can take longer on some environments (#5085) 2019-05-02 11:03:52 +01:00
Dan Newton
fa38012339 CORDA-2572 - Add peer information to stacktrace of received FlowException (#4998)
When a `UnexpectedFlowEndException` or a `FlowException` is received the
peer that the exception was thrown from will be added to the stacktrace.
This is due to it being easier to see and a field that developers
are much less likely to override.

A nullable field `peer` has been added to `FlowException` and
`UnexpectedFlowEndException`. This is read later on (when peer info
is not available) to append the peer info to the stacktrace.
2019-05-01 13:51:44 +01:00
Stefan Iliev
1802e48963 CORDA-2586 - explorer exception handling (#4957)
* Initial version of new(old) dialog that won't print a stacktrace for rpc exceptions.

* Decoupled CordaVersionProvider. Moved common files to common-logging to lower dependencies on the node explorer.

* Removed unused import and duplicate documentation comment.

* Moved error code rewrite policy in the new common/logging module according to PR review.

* Removed extra line.

* Updated log4j configurations with new package name where logging policies will be contained.

* Included common-logging module with cliutils.
2019-05-01 13:50:50 +01:00
Stefan Iliev
1128156153 CORDA-2821 Fix issue with Quasar errors redirecting to useless page (#4982)
* Changed dead url to the new location.

* Modified documentation. Linked new place for intelliJ guide.

* Changed url to the new link.
2019-05-01 11:21:13 +01:00
Bartman250
b4ba2ca4c1 CORDA-2834 Clarify error message when base directory doesn't exist (#4992)
* setting non existant base directory now yields suitable error message

* corrections to missing base directory message and comments added for clarity

* added check for valid base directory before node loggin and bootstrapping

* removed uneeded import

* quantum computer joke back by popular demand and not back at the same time
2019-05-01 11:20:33 +01:00
Dan Newton
c163365229 CORDA-2280 Move assumeFalse in SignatureConstraintVersioningTests (#5076)
A test was failing due to `assumeFalse` (to stop a test running on windows)
being inside of a `assertThatExceptionOfType` block. The exception it
threw was consumed by the block instead of junit.
2019-04-30 16:08:10 +01:00
Dan Newton
6662d205f8 CORDA-2280 Automatic propagation of whitelisted to Signature Constraints (#5053)
If a single whitelisted constraint is being used by input states and the version of the cordapp changes + is signed, then the constraint will transition to a signature constraint.
2019-04-29 17:37:57 +01:00
Tudor Malene
7b0d177a34 More leniency with auth errors in RpcReconnectTests (#5061) 2019-04-26 15:17:26 +01:00
JamesHR3
7a7c471ebf [CORDA-2575] Allow users to whitelist attachments by public key config (#5035) 2019-04-25 16:55:43 +01:00
Stefan Iliev
b0a9656746 CORDA-2821 Fix issue with Quasar errors redirecting to useless page (#4982)
* Changed dead url to the new location.

* Modified documentation. Linked new place for intelliJ guide.

* Changed url to the new link.
2019-04-25 15:34:05 +00:00
Dan Newton
627096b217 CORDA-2572: Add peer information to stacktrace of received FlowException (#4998)
When a `UnexpectedFlowEndException` or a `FlowException` is received the
peer that the exception was thrown from will be added to the stacktrace.
This is due to it being easier to see and a field that developers
are much less likely to override.

A nullable field `peer` has been added to `FlowException` and
`UnexpectedFlowEndException`. This is read later on (when peer info
is not available) to append the peer info to the stacktrace.
2019-04-24 11:45:10 +01:00
Manoj
87fe7b4d88 CORDA-2862: Fix to allow softlinks of logs directory (#5034) 2019-04-23 09:48:13 +01:00
Tudor Malene
50649d7b99 CORDA-2743 Add dynamic port allocation (#5042) 2019-04-18 14:22:23 +01:00
bpaunescu
95a3631628 CORDA-2861 - give the message executor its own Artemis session and producer (#5036) 2019-04-17 19:05:06 +01:00
bpaunescu
33e9f125db CORDA-2861: give the message executor its own artemis session and producer (#5031) 2019-04-17 16:07:56 +01:00
Tudor Malene
5821ad5f5c CORDA-2743: Tweak RPC reconnecting test. Adjust the exponential retry factor. (#5026) 2019-04-17 10:56:55 +01:00
Dan Newton
855d1323a4 CORDA-2645 Do not remove exception information in dev mode (#5023)
`ExceptionSerialisingRpcOpsProxy` was removing information about the
original exception in dev mode. This code has been removed. Although
there is no check in `ExceptionSerialisingRpcOpsProxy` for dev mode
(and also due to it being about serialising),
`ExceptionMaskingRpcOpsProxy` will handle the removal of exception data
in non dev mode (production mode).
2019-04-15 13:54:36 +01:00
Tudor Malene
21adcffd31 CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) (#5015)
(cherry picked from commit 6771386b4b)
2019-04-15 10:25:55 +01:00
JamesHR3
ee884a92de CORDA-2522 - Improve error reporting around failed flows (#5016)
* [CORDA-2522] Improve error reporting around failed flows (#5000)

* Improve error reporting around failed flows

* Fix an index to start from 1 when printed

* Address first set of review comments

(cherry picked from commit 24699cd7f4)

* [CORDA-2522] Follow up changes to error reporting around failed flows (#5006)

* Follow up changes to error reporting around failed flows

* Have FinalityDoctor report stack trace

* Revert changes to the DumpHistoryOnErrorInterceptor

(cherry picked from commit 2da597a5b7)
2019-04-15 10:25:18 +01:00
Tudor Malene
43e3755c6f CORDA-2621 - change message when rpc/p2p login fails (#4994) (#5020)
(cherry picked from commit d15699289c)
2019-04-15 10:23:30 +01:00
JamesHR3
2da597a5b7 [CORDA-2522] Follow up changes to error reporting around failed flows (#5006)
* Follow up changes to error reporting around failed flows

* Have FinalityDoctor report stack trace

* Revert changes to the DumpHistoryOnErrorInterceptor
2019-04-12 16:12:28 +01:00
Tudor Malene
6771386b4b CORDA-2743 - utilities and test to show rpc operations that support disconnects (#5009) 2019-04-12 14:03:38 +01:00
Adel El-Beik
367c98ec7c ENT-3482: Move BC crypto service implementation to node api. (#5008)
* ENT-3482: Move BC crypto service implementation to node api.

* ENT-3482: Added missing unit test.
2019-04-12 11:35:12 +01:00
JamesHR3
24699cd7f4 [CORDA-2522] Improve error reporting around failed flows (#5000)
* Improve error reporting around failed flows

* Fix an index to start from 1 when printed

* Address first set of review comments
2019-04-11 13:10:20 +00:00
Dimos Raptis
a38891fc44 [CORDA-2851] - Fix the way serialization whitelist is calculated for CordappImpl (#4743) 2019-04-11 11:53:13 +01:00
Stefan Iliev
e4615f7f47 CORDA-2586 explorer exception handling (#4957)
* Initial version of new(old) dialog that won't print a stacktrace for rpc exceptions.

* Decoupled CordaVersionProvider. Moved common files to common-logging to lower dependencies on the node explorer.

* Removed unused import and duplicate documentation comment.

* Moved error code rewrite policy in the new common/logging module according to PR review.

* Removed extra line.

* Updated log4j configurations with new package name where logging policies will be contained.

* Included common-logging module with cliutils.
2019-04-09 19:14:37 +00:00
Bartman250
856f7671d9 CORDA-2834 Clarify error message when base directory doesn't exist (#4992)
* setting non existant base directory now yields suitable error message

* corrections to missing base directory message and comments added for clarity

* added check for valid base directory before node loggin and bootstrapping

* removed uneeded import

* quantum computer joke back by popular demand and not back at the same time
2019-04-09 18:37:28 +00:00
Tudor Malene
d15699289c CORDA-2621 - change message when rpc/p2p login fails (#4994) 2019-04-09 13:17:46 +01:00
Matthew Nesbit
76d738c452
Do not start the P2P consumer until we have at least one registered handler (the state machine). This prevents message being delivered too early. (#4988)
Consider shutdown logic if network map doesn't finish
2019-04-05 15:55:45 +01:00
Dominic Fox
1f6a4a0cba CORDA-2827 extend timeout on test (#4984) 2019-04-05 08:08:29 +01:00
Thomas Schroeter
e0f19ca70b CORDA-2647 ROLLBACK (#4964)
* Revert "Address comments"

This reverts commit f884d112c3.

* Revert "CORDA-2647 - Prevent registration when previous state exists"

This reverts commit 4e9d1f1924.
2019-03-29 18:06:12 +00:00
josecoll
add380b135
Merge pull request #4963 from corda/colljos-backport-secfix-serializer
(BACKPORT) ENT-3121 restrict custom serializers
2019-03-29 16:51:44 +00:00
Christian Sailer
9668b8530a CORDA-2813 Handle loss of database (#4962)
* CORDA-2813 Add DbException handler to terminate process when the DB goes away or gives up.
Also add a helper to terminate the node and use it instead of calling Runtime.halt() in random places.

* CORDA-2813 Address threading/blocking concerns raised during review
2019-03-29 16:47:38 +00:00
Dominic Fox
17e7cd3abc ENT-3121 - restrict custom serializers (#1852)
* Tests for custom registry restrictions

* ENT-3121 restrict custom serialisation

* Remove redundant code

* Only count declared annotations

* Check annotation on superclasses, remove annotation from ByteArray

* Forbid custom serialization of primitive types

* Remove @CordaSerializable from another class that is always handled by custom serialisation

* Add log warnings to aid diagnosis of custom serialization issues

* Remove another annotation

* Remove another annotation

* Remove another annotation

* Remove another annotation

* Fixup api-current

* Fixup api-current

* KDocs on exceptions
2019-03-29 14:48:07 +00:00
Thomas Schroeter
dc46446432 [CORDA-2807] Don't retry db transaction in AbstactNode start (#4942)
Retries can lead to confusing error messages in case the CFT notary is
misconfigured and throws a SQLException causing a retry.
2019-03-29 09:41:39 +00:00
Dimos Raptis
328becb2d3 Introduce global port allocation 2019-03-27 12:30:40 +01:00
Dimos Raptis
f884d112c3 Address comments 2019-03-27 12:30:40 +01:00
Dimos Raptis
4e9d1f1924 CORDA-2647 - Prevent registration when previous state exists 2019-03-27 12:30:40 +01:00
Tudor Malene
b0cf41ef58 CORDA-2615 - add fix for serialization failure on relevancy check.
CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - add fix for serialization failure on relevancy check.

CORDA-2615 - fix test

Create reconnecting proxies
2019-03-27 11:51:36 +01:00
Dominic Fox
c2ad64ccde CORDA-2802 use eventually to wait (#4932)
* CORDA-2802 use eventually to wait

* Catch Exception, not Throwable
2019-03-26 16:01:06 +00:00
Tommy Lillehagen
48e008d271
CORDA-2783 - Improve error message for initial registration with devMode=true (#4928) 2019-03-25 15:16:58 +00:00
Jonathan Locke
07031ae0fe CORDA-2786 - Certificates directory is only required for node startup. This was causing problems with initial registration. (#4926)
Addressed review comments - removed nested if and added parameter name for the usage of requiresCertificates.

Removed unnecessary import and white space.
2019-03-25 15:14:13 +00:00
Chris Rankin
d9a67d7426 BUILD: Use global port allocator for flaky HardRestartTest. (#4921) 2019-03-23 19:32:39 +00:00
Shams Asari
acd2f8bce4
CORDA-2683: Requests to start unknown flows can be deleted using killFlow (#4903)
Normally, these requests are left unacknowledged in the MQ broker to allow recovery via installing the missing CorDapp. If this is not applicable then the request be dropped (and the other side informed of the error).
2019-03-22 14:46:02 +00:00
alexeykorening
57d0040b7b PR review fixes 2019-03-22 14:58:24 +01:00
alexeykorening
4f812bbd90 Preconditions draft 2019-03-22 14:58:24 +01:00
dazraf
a5dd23dd43 CORDA-2770 - file watcher subscription in NetworkMapUpdater should be unsubscribed on close (#4914) 2019-03-22 09:42:29 +00:00
Jonathan Locke
2777e32a1c ENT-3327: Check for missing certificates directory (#4905)
While the node is starting up, we now check for the presence of the certificates directory. This allows us to print out an easily understandable error message if the directory is not present. An exception is made for devMode, as devMode will result in the directory being created in any case.
2019-03-21 16:56:18 +00:00
dazraf
52ec48d63d CORDA-2653 - ensure that during initialisation of a Corda Service, the current thread has a context classloader. (#4907) 2019-03-20 16:42:37 +00:00
Tommy Lillehagen
eb7928d761
CORDA-2763 - Log censored config at startup (#4906) 2019-03-20 15:30:20 +00:00
Chris Rankin
3333464c39 BUILD: Fix some warnings about @BelongsToContract in tests. (#4902) 2019-03-19 18:16:24 +00:00
Jonathan Locke
dc179d4ea1 ENT-3057: Log hibernate warns and errors in different log (#4889)
* ENT-3057: Log hibernate warns and errors in different log

If a hibernate error occurs (deadlock, for example) that would cause a flow to be sent to the hospital, hibernate logs the warnings and errors before we do. This results in duplication in the logs, and pollutes the log. To solve this, we create a new log appender named diagnostic-{node-name}.log and log any org.hibernate messages of warn and above to that file. This way, messages are not lost, which means that the information can be retrieved if need be.

* Corrected indentation of comment (changed tab to space)

* Updated node-administration document to mention diagnostic logging change

* Fixed integration test. It was breaking because it was fetching the first log file in the folder, assuming there would be only one. This assumption is now invalid because the diagnostic log file that was introduced. Two tests were found that used similar logic to find a log file to examine, hence both were corrected to look for log files beginning with "node"

* Updated documentation as per review comments.
2019-03-18 17:08:13 +00:00
Chris Rankin
1fc8e1d7ae CORDA-2759: Use GlobalTestPortAllocation for Node's integration tests. (#4899) 2019-03-18 14:48:13 +00:00
Rick Parker
31100cd708
CORDA-2748 Always set the ThreadLocal in the Fiber from the Thread, even if not yet set in the Thread. (#4896) 2019-03-18 11:51:08 +00:00
Tommy Lillehagen
fb4dc0a6ac
ENT-3060 - Change log level in transition executor (#4898)
CORDA-2757 / ENT-3060 - Change log level in flow transition executor
2019-03-18 10:29:23 +00:00
Andrius Dagys
e3ada049d4
CORDA-2745: Cache notary identity lookups (#4892)
Add a cache for notary identities in the PersistentIdentityService. This
solves a reported problem where notary identity lookup fails if its network
map entry is missing, which results in an exception when trying to insert
a state into the vault after recording a transaction.
2019-03-15 11:14:48 +01:00
Jonathan Locke
82c45c6f83 CORDA-2506: Better handling of invalid log path (#4895)
Test if we have access to the logging path (baseDirectory/logs) before attempting to write to them. This allows us to shut down gracefully with an easily understandable error message.
Without doing this, the log4j2 will attempt to access the logPath when it first uses the logger in the call() function.
2019-03-15 09:54:53 +00:00
JamesHR3
76dc981b91 [CORDA-2737] Buffer events from observables in ProgressTracker until subscribed to (#4882) 2019-03-13 16:33:29 +00:00
Dimos Raptis
9a2c474996 Make debug lazy 2019-03-12 16:41:15 +01:00
Dimos Raptis
3c1a8b3de1 Remove redundant transaction 2019-03-12 16:41:15 +01:00
Dimos Raptis
5f7f809084 CORDA-2705 - Prevent duplicates in cache and fix the mappings persisted for confidential identities 2019-03-12 16:41:15 +01:00
Jonathan Locke
ed2fe13436 CORDA-2629: Provide a better error msg when notary type misconfig (#4864)
* CORDA-2629: Provide a better error msg when notary type misconfig

If a notary service is misconfigured with the type (either validating or not validating) stored in the node's configuration not matching that advertised in the network map cache, the notary will throw an exception and fail on startup.
Previously, this misconfiguration would result in an exception being thrown when attempting to notarise a transaction. This change results in the exception being thrown at node startup and the node operator being aware of the misconfiguration earlier.

* Corrected exception message when the notary does not have a party

* Changed exception message to include configured and advertised values.
Fixed unit test that was failing because of the new check.
2019-03-12 13:45:25 +00:00
Rick Parker
061db8b1a1
ENT-3256 Cleaner way to override (#4862) 2019-03-08 17:14:14 +00:00
Chris Rankin
ea263b3e54 CORDA-2569: Add "flow kill <ID>" command to Corda's shell. (#4861)
* CORDA-2569: Add "flow kill <ID>" command to Corda's shell.

* Add testing and documentation for RPC killFlow operation.
2019-03-08 16:39:22 +00:00
JamesHR3
b3b184c93e [CORDA-2701] Ensure crlCheckSoftFail config option is respected (#4854)
* Plumb through the crlCheckSoftFail configuration option to bridge manager

* Add crlCheckSoftFail test to bridge manager and fix equivalent proton wrapper test

* Update documentation and set the node configuration default to true

* Revert default change and clarify consequences of setting option to false

* Remove NodeConfiguration default to leave only AMQPConfiguration default
2019-03-08 16:23:07 +00:00
Florian Friemel
65e7886168 Fix flaky test. (#4851) 2019-03-08 15:15:40 +00:00
Mike Hearn
785755067a Docs: use version numbers read from the build system, not duplicated. 2019-03-07 16:44:50 +01:00
Rick Parker
1c38ecee7b
ENT-3256 Small performance enhancement and OS preparation for ENT changes (#4857) 2019-03-07 14:47:51 +00:00
Shams Asari
96b23eea6f
ENT-3266: Do not attempt to overrwite an existing CorDapp jar in tests (#1906) (#4858)
There's a bug with the ServiceLoader which leaks a file handle to the app jar on shutdown. This causes an issue if a mock node is restarted in Windows. To avoid the problem completely we no longer overwrite any existing jars, as the jar to be copied will be same anyway.

(cherry picked from commit 0038a86481)
2019-03-07 11:40:43 +00:00
Tudor Malene
9ab4a3e24c ENT-3141 - Improve jar verification. (#4841)
ENT-3141 Address code review comments
2019-03-05 13:26:06 +00:00
Katarzyna Streich
8f45340276 CORDA-2706: Change logging level from warn to info (#4847)
CORDA-2706: Change logging level from warn to info
2019-03-05 13:15:26 +00:00
Thomas Schroeter
f2b21bea5a [CORDA-2698] Allow theoretical page size of Integer.MAX_VALUE (#4845)
* [ENT-3213] Allow theoretical page size of `Integer.MAX_VALUE`

* Fix vault query test
2019-03-05 11:29:26 +00:00
Jonathan Locke
e3c0b6e7df CORDA-2690: Reduce CordApp scanning logging
Only log a line about looking for notary implementations if at least notary implementation is found.

It might be unnecessary and confusing to log when no implementations are found.
Replaced TrustedAuthorityNotaryService with SinglePartyNotaryService in comment
2019-03-04 11:57:10 +00:00
Katarzyna Streich
fa2cd907c5 Add more readable error message. (#1855)
ENT-3136 Add more readable error message.
2019-03-02 17:41:48 +01:00
Katarzyna Streich
a000ac3dcc ENT-3075 Java versions with -ea at the end are valid too (#1853) 2019-03-02 17:41:48 +01:00
Shams Asari
f52d158f2d CORDA-2665: Updated OwnableState relevancy check put back to V3 version (#4819)
* CORDA-2665: Updated OwnableState relevancy check is now gated on target version 4

https://github.com/corda/corda/pull/3789 changed the relevancy check of OwnableState to include the participants list in addition to the owner. This however breaks existing apps which assume (in their vault query) an OwnableState is recorded to the vault if-and-only-if the owner matches.

* CORDA-2665 Don't switch to new behaviour on target version upgrade.
2019-02-27 12:05:39 +00:00
Rick Parker
2ff7860e4b
ENT-3165 Backport caching changes to OS. (#4821) 2019-02-27 11:40:48 +00:00
Jonathan Locke
d102a8ac11 ENT-3059: RPC disconnect log entry changed to info
When an RPC client disconnects from the RPC server, the log entry created now has its log level set to info rather than warning. It is perfectly normal for an RPC client to disconnect - only the RPC client knows if it was intentional.
2019-02-26 15:35:51 +01:00
Bernd Stoeger
254d1b1631 Include ch package in quasar instrumentation 2019-02-24 16:40:34 +01:00
Tommy Lillehagen
8fb3d4dc01
CORDA-2669 - Reintroduce pendingFlowsCount (#4806)
* CORDA-2669 - pendingFlowsCount not in public API

Reintroduce `pendingFlowsCount` to public API (as deprecated). Advise
to use the `gracefulShutdown` command in the shell instead.

* CORDA-2669 - Add pendingFlowsCount to api-current.txt
2019-02-23 17:10:32 +00:00
Rick Parker
6c4433d0b5 CORDA-2646 - Database connection pools leaking memory on every checkpoint (#4773)
* ENT-3053 Database connection pools leaking memory on every checkpoint. Flip in the thread local from the thread into the fiber.

* Back port to OS (needs some gradle changes) and added TODO, ability for it to avoid erroring if not using Hikari.

* Review feedback to remove warning.
2019-02-20 11:28:32 +00:00
Mike Hearn
96134c8cfa Bugfix: register SwapIdentitiesHandler again. (#4789) 2019-02-19 18:42:32 +00:00
JamesHR3
efabab35c4 [CORDA-2636] Ensure states created with contract upgrades can be migrated (#4786)
* Ensure states created with contract upgrades can be migrated

* Remove line from api-current.txt representing an uncallable constructor
2019-02-19 09:48:39 +00:00
Tommy Lillehagen
21d32681ff
CORDA-2634 - Fix derivation of currentTargetVersion for abstract classes (#4784)
* CORDA-2634 - Fix default currentTargetVersion

* CORDA-2634 - Include abstract flow classes in CorDapp class scanning

* CORDA-2634 - Run test for target platform version 4
2019-02-19 08:47:49 +00:00
JamesHR3
055aabe1bb [CORDA-2627] Fail the custom vault state migration if any states were skipped (#4782)
* Fail the migration if any states were skipped

* Update test case to check running a second time
2019-02-18 15:39:37 +00:00
Tudor Malene
626fa19769 CORDA-2631 - removed unused version mapping and revert tracking test (#4781)
CORDA-2631 - removed unused version mapping and revert tracking test
2019-02-18 14:49:57 +00:00
Mike Hearn
1ed5fce6a6 Backwards compat: Put the confidential-identities module back in the node classpath by default. Separating it out into a standalone "app" needs more thought and design work, if we do it at all. 2019-02-18 14:02:36 +01:00