Commit Graph

1900 Commits

Author SHA1 Message Date
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
Chris Rankin
632a3f4a7a CORDA-3015: Add StatePointer classes to corda-core-deterministic. (#5227) 2019-06-17 18:05:59 +01:00
Shams Asari
2152961d46
CORDA-2333: Dependency update pass for tests and demos (#5211) 2019-06-13 10:15:13 +01:00
Michal Kit
d72ec57c1c CORDA-2974 Fixing x500Prinicipal matching (#5186) 2019-06-11 16:07:52 +01:00
Shams Asari
d685c2154b
ENT-3489: Removing unnecessary @CordaSerializable annotation from exceptions (#5209) 2019-06-11 11:51:30 +01: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
Tudor Malene
a4cd859282 Improve performance of the no-overlap check 2019-05-28 17:49:39 +02: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
1a70646d02 Temporary remove Kotlin JUnit test that requires module directives to access private packages (sun.security.util, sun.security.x509)
Awaiting Kotlion compiler support: https://youtrack.jetbrains.com/issue/KT-20740
2019-05-20 15:08:27 +01:00
josecoll
877cbb1815 EXPERIMENTAL: tweaks and attempts to set module directives (with/without using gradle module plugin) 2019-05-20 15:08:27 +01:00
josecoll
cfd2661385 Move Java unit test into kotlin package to prevent ASM compilation/classloading error (REVISIT)
* What went wrong:
Execution failed for task ':core:test'.
> failed to read class file /Users/josecoll/IdeaProjects/corda-jdk11/core/build/classes/java/test/net/corda/core/flows/FlowsInJavaTest$PrimitiveReceiveFlow.class
2019-05-20 15:08:27 +01:00
josecoll
804f8dc17b Update Java Version checking. 2019-05-20 15:08:27 +01:00
josecoll
41b7916332 Move test Java schemas to Kotlin as they are used only by Kotlin JUnit test (was causing ASM compilation failure). 2019-05-20 15:08:27 +01:00
josecoll
7afd1e8b25 Move test Java schemas to Kotlin as they are used only by Kotlin JUnit test (was causing ASM compilation failure). 2019-05-20 15:08:27 +01:00
josecoll
a56ef580b2 Temp remove usage of java modularity plugin. 2019-05-20 15:08:27 +01:00
josecoll
594fca9d3f Add explicit reference to JAXB. 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
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
Dan Newton
6769b00ed5 CORDA-2892 Add a TransactionBuilder.addOutputState overload (#5104)
To allow better usage in Java, a new `addOutputState` overload has
been added.
2019-05-08 10:56:05 +01:00
Vardan Nadkarni
5a3073aeb1 Corrected a comment to use SchedulableState instead of QueryableState 2019-05-08 11:48:55 +02: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
Tudor Malene
25f335861b Fix ClassNotFound handling (#5078) 2019-05-02 18:03:02 +01:00
Dan Newton
cb85dd1e92 CORDA-2477 Improve Signature Constraints documentation (#5041)
The Signature Constraint documentation in `api-contract-constraints`
was very limited and referred to the design doc for most information.
Information was extracted from the design doc and added to the main
documentation.
2019-04-30 11:50:12 +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
JamesHR3
7a7c471ebf [CORDA-2575] Allow users to whitelist attachments by public key config (#5035) 2019-04-25 16:55:43 +01:00
Mario Schlipf
4607b0c151 CORDA-2817 Remove CORDA_VERSION_THAT_INTRODUCED_FLATTENED_COMMANDS as commands are not flattened anymore (#5056) 2019-04-25 16:54:56 +01:00
Tudor Malene
2e4c5d79f6 CORDA-2847: Support custom serialisers when attaching missing attachments to txs (#5046) 2019-04-25 14:05:52 +01: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
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
Tudor Malene
685f94bf66 CORDA-2825 Fix Progress Tracker bug (#4986)
* CORDA-2825 Fix Progress Tracker bug

CORDA-2825 Add discriminator

CORDA-2825 Fix hashcode

CORDA-2825 remove todo

CORDA-2825 more tests

* CORDA-2825 Address code review comments
2019-04-05 12:08:18 +01:00
josecoll
b93a4d91d3
Merge pull request #4848 from corda/corda-2696-eliminate-unwanted-duplicate-class-warnings
CORDA-2696 eliminate unwanted duplicate class warnings
2019-04-05 10:13:04 +01:00
Rick Parker
2685596798
CORDA-2817 Revert CORDA-2162 but modify Cash move to allow multiple m… (#4971)
* CORDA-2817 Revert CORDA-2162 but modify Cash move to allow multiple move commands and thus multiple generateSpends in the same transaction.

* CORDA-2817 Remove API changes and internalise into Cash.
2019-04-02 18:23:43 +01:00
Tudor Malene
24f63b2e64 CORDA-2689 Remove annoying ProgressTracker warning. (#4970) 2019-04-01 17:20:39 +01: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
JamesHR3
d9e11b21ae Remove targetPlatformVersion check from FinalityFlow and update docs (#4955)
In Corda 4, FinalityFlow was updated to become an initiated flow, in order to ensure a node does not have to accept any signed transaction it receives without being able to check it first. The old behaviour of FinalityFlow was gated behind a targetPlatformVersion check, to prevent apps targeting V4 from using the old behaviour.

This is problematic for a few reasons. For an app wishing to be backwards compatible with a version running on V3, this forces the app to set targetPlatformVersion = 3, even if the app is thoroughly tested against V4. This goes against the purpose of the targetPlatformVersion. Another consequence is that an app remains pinned to targetPlatformVersion = 3 until it is sure that there are no other apps running at a lower version in the network, which would prevent newer versions of the app from taking advantage of features gated behind targetPlatformVersion checks. (Note that the restriction only prevents a new version of the app from initiating FinalityFlow with the old version - the old version is able to initiate a FinalityFlow and the new version will handle it, assuming the app has been written correctly.)

This fix removes the targetPlatformVersion check from FinalityFlow, and also provides a few documentation updates to clarify what level of testing would be expected to set a targetPlatformVersion.
2019-03-28 14:21:59 +00:00
dazraf
270444ab3e CORDA-2769 - fixed infinite recursive call for copy implementation. (#4912) 2019-03-27 18:51:35 +00:00
Chris Rankin
6cd2e6eb86 CORDA-2804: Replace JPA 2.1 annotations with JPA 2.2. 2019-03-27 15:33:23 +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
Tudor Malene
51a983bd8e CORDA-2803: Add default timeouts for the http connections (#4929) 2019-03-25 17:03:13 +00:00
dazraf
b6f9b86998 CORDA-2772 - fix edge case when stickTo.hashCode return Int.MIN_VALUE 2019-03-22 14:56:05 +01:00
josecoll
5eea37679f
Minor clarification on implication of setting 'checkSufficientSignatures' parameter. (#4919) 2019-03-22 13:48:09 +00:00
Dominic Fox
0ab6b4de89 CORDA-2765 Make TransactionVerificationExceptions serializable (#4908) 2019-03-20 17:33:37 +00:00
Chris Rankin
3333464c39 BUILD: Fix some warnings about @BelongsToContract in tests. (#4902) 2019-03-19 18:16:24 +00:00
JamesHR3
a90f394d43 [CORDA-2738] Allow the ProgressTracker to cope with child trackers with the same steps (#4894) 2019-03-18 13:50:29 +00:00