1796 Commits

Author SHA1 Message Date
Roger Willis
d2d7d89e0f DOCS - State pointers are always resolved, so the kdocs should reflect this. (#4716) 2019-02-06 12:28:21 +00:00
Mike Hearn
48efbf5b5b CORDA-2540 Adjust no overlap rule to avoid premature optimization (#4693)
Fix invalid optimization in AttachmentsClassLoader.
2019-01-31 17:04:13 +00:00
josecoll
91589849bb CORDA-2515 - Fix bug in verifier for has to signature constraints (auto-migration). (#4680) (#4689) 2019-01-31 09:59:52 +00:00
Tudor Malene
1324676348 CORDA-2536 - Tighten no overlap check. (#4690) (#4692)
(cherry picked from commit 37eb93fa76459babce423940ee8e965cf5801633)
2019-01-31 09:47:59 +00:00
Katarzyna Streich
d3ba2223d2 CORDA-2520 - Add FetchParametersFlow (#4682)
* CORDA-2520: Add FetchParametersFlow (#4674)

* CORDA-2520: Add FetchParametersFlow

* Address comments, add test

* Fix test
2019-01-30 17:49:10 +00:00
Katelyn Baker
78b566c163
CORDA-2531 - State mappings are now also updated for new reference states. (#4681) (#4686)
* State mappings are now also updated for new reference states.
Added a test to prove the above works.

* Addressed Rick's review comments.
2019-01-30 16:51:06 +00:00
josecoll
c7a77fda91
CORDA-2514 Constraints checking failures do not provide indication of cause (#4638)
* Add logging to constraints checking to indicate reason of failure.

* Additional debug logging message.
2019-01-30 15:53:32 +00:00
Rick Parker
384a7c37b9 CORDA-2525 - Start pooling classpath scanning and related fixes (#4664) (#4685)
* Start pooling classpath scanning

Quickly patch synchronisation of attachment class loader cache.  Needs a revisit but more complicated due to DJVM.

Annotate away for DJVM

Take ClassGraph utils into their own file so we can exclude for DJVM

Clean up a little

* Daemonize the threads

* Seems to be some concurrency problems with use of ClassGraph.  Using a mutex for now to work around.

(cherry picked from commit 7dc7313fb716388c24bd9de4e9d71b6f15ce0038)
2019-01-30 14:26:47 +00:00
Rick Parker
e4b210603c ENT-2967 - Fix up use of various JDK performance contention points (#4608) (#4678)
* ENT-2967 Various JDK contention points

* Move new private method to bottom of class.

(cherry picked from commit 197a13611dd0f15fe165b3ea0c6738c932c74d17)
2019-01-30 12:50:56 +00:00
Katelyn Baker
b51d8d70e1
CORDA-2497 - fix (#4630) (#4635)
CORDA-2497 fix
* Added test to show the fix working.
* Now backwards compatible.
* Refactored out some duped code.
* Added better explanations for what's going on.
* Fixed test which was failing due to the serializationEnvRule problem.
* Addressed Tudor's review comments.
2019-01-24 23:24:24 +00:00
szymonsztuka
8c35133f70 CORDA-2504 - improve error message of missing contract attachments (#4628) (#4633)
* CORDA-2504 Improved MissingContractAttachments error to ensure it contains contractClassName.

* CORDA-2504 Improved MissingContractAttachments error to ensure it contains contractClassName - additional API overloaded method.

* Docs

(cherry picked from commit 1b89ece09b183338b28030bd086a5e7b4d5de65f)
2019-01-24 21:41:06 +00:00
Shams Asari
9a66a3b4ee CORDA-2228 - Exceptions emanating from ReceiveFinalityFlow are sent to the flow hospital (#4621) (#4626)
(cherry picked from commit 5bb5244e5571f9f7f73e708de6abb68c39493e5b)
2019-01-24 13:32:28 +00:00
josecoll
2bc1e73833 CORDA-2485 - Add minimum platform version check before attempting a hash -> signature constraints auto migration. (#4623) (#4625) 2019-01-23 16:21:08 +00:00
josecoll
1945b2274a CORDA-2475 - Adjust attachments query logic to return correct results (#4612) (#4622)
* CORDA-2475 Adjust attachments query logic to return correct results sets for signed/unsigned jars.

* Updates following PR review feedback by RP.
2019-01-23 09:40:34 +00:00
Shams Asari
9286278f59 CORDA-2442: Added wither methods to the vault query classes (#4585)
(cherry picked from commit 498db538d7c755cefe8aa5b0b99d21241818f2b5)
2019-01-16 17:41:11 +00:00
Dimos Raptis
f5148e8b6c [CORDA-2431] - Small refactorings following-up on PR-4551 (#4564)
* Small refactorings following-up on PR-4551

* Adjust thread context class loader

* Address Shams' comments
2019-01-16 14:28:38 +00:00
Dimos Raptis
0dd245b5ae [CORDA-2431] - Reduce memory footprint of classpath scanning (#4576)
* Reduce memory footprint of classpath scanning

* Close scan result in the end
2019-01-16 14:28:38 +00:00
Shams Asari
c68e1c3edd RELEASE - Fixed release branch due to various issues with back porting (#4588)
* Add back V3 TransactionBuilder c'tor (#4587)

(cherry picked from commit 5bb38e455ca4268500856ab36224c437cd18c860)

* Regen isolated jar to fix failing test(s) (#4583)

https://github.com/corda/corda/pull/4541 removed TransactionBuilder c'tor (which was introduced post-V3) which the frozen isolated jar was using
(cherry picked from commit f5920252735944dc7e28cd633bf79e199b069f7d)

* Fixed AttachmentLoadingTests (#4565)

There were two issues:
* The original "sealing violation: can't seal package net.corda.nodeapi" issue was due to the isolated CorDapp containing some code in the net.corda.nodeapi namespace. This has been moved to the isolated namespace.
* The test was not correctly creating the second transaction with the dummy command

(cherry picked from commit 3b8347e1500ca0c002b11f068d7f7c9cbdc39762)

* Regen isolated.jar to make sure it's based on the branch
2019-01-16 14:27:22 +00:00
Michele Sollecito
31d799f636 CORDA-2403: Flagged API issues between 4.0 and 3.3. (#4541) 2019-01-15 16:56:42 +00:00
Shams Asari
8e535b2a8a CORDA-2418 - Fixed inability to use TestCordapp under gradle in Windows if referring to self cordapp (#4562) (#4570)
The gradle process that runs the tests keeps an exclusive hold on built jars in Windows, which means if a test wants to get hold of the CorDapp, and it's requested from the same module, it will fail. Now instead of deleting the "libs" dir  we just use the latest created jar.

(cherry picked from commit 1bbcb8722edf02d6422888095d7195a4f73079d4)
2019-01-14 14:32:13 +00:00
Dimos Raptis
5b34020e59 [CORDA-2390] - Add whitelists and custom serializers from cordapps to serialization … (#4551)
* Add whitelists and custom serializers from cordapps to serialization context

* Remove changes in TransactionBuilder, add caching

* Add whitelists and custom serializers from cordapps to serialization context

* Remove changes in TransactionBuilder, add caching

* Address comments

* Increase node memory for SIMM integration test

* Cache only serialization context

* Increase integ test timeout

* Fix API breakage

* Increase max heap size for web server integ test

* Move classloading utils from separate module to core.internal

* Adjust heap size for more integ tests

* Increase time window for IRS demo transactions

* Fix determinator

* Add parameter in core-deterministic

* Stub out class-loading method for DJVM
2019-01-13 20:15:05 +00:00
JamesHR3
36cd9b9791
[CORDA-2402] Ensure out of order transactions result in correct vault state (#4559)
* Pass states to record through to transaction resolution

* Add a test case

* Add comment indicating why states are always added in tx resolution

* Update observer node documentation
2019-01-13 15:03:53 +00:00
Roger Willis
084b3a1a1d
CORDA-2426 Fixed bug in state pointer search. (#4561)
* Fixed bug in state pointer search and added tests.

* Blacklisted problematic package.

* Addressed Shams' comments.

* Addressed round two of comments.

* Fixed another bug whereby the DFS gets stuck in an infinite loop.
2019-01-13 08:58:52 +00:00
Michele Sollecito
5c5407fbed Avoid TransactionBuilder behaviour change for v3 or below. (#4555) 2019-01-12 17:56:50 +00:00
Shams Asari
caad18f6db
CORDA-2347: Added backwards compatibility to SwapIdentitiesFlow (#4548)
The API has been reverted to be completely ABI compatible with V3, and the small changes that were made to the wire format in https://github.com/corda/corda/pull/4260 have also been reverted.
2019-01-12 14:23:20 +00:00
Shams Asari
6f14a9f0b9
CORDA-2406: FinalityFlow can support mix of participants using the new and old APIs (#4532)
Otherwise it's impossible to finalise a transaction and the participants are a mix of those using the new API and those using the old.
2019-01-12 12:01:23 +00:00
Florian Friemel
558d2fd45c
[CORDA-2403] Fix API breakage: PermissionException and CordappImpl constructor (#4554)
* Undo renaming of c'tor parameter (API break).
* Re-introduce default param in CordappImpl c'tor.
* Make 'msg' a property of PermissionException to make it serializable.
2019-01-11 17:39:22 +00:00
josecoll
e32ead0548
CORDA-2413 Improve exception handling and recovery for untrusted contract attachments (#4543)
* Improve exception handling and recovery for untrusted contract attachments.

* Fix broken JUnit.

* Fixed incorrect Exception description.

* Additional clarification on flow processing.

* Reasoning and future deterministic JVM clarification.

* Note::

* UntrustedAttachmentException.
2019-01-11 13:23:51 +00:00
szymonsztuka
7bbe4668d6
CORDA-2388 Deprecate CommandWithParties.signingParties (#4520)
* Deprecate `CommandWithParties.signingParties` as it should not be used in contract verification code as it is non-deterministic.
* Remove the remaining usage in contract verification code - replaced by signers collection.
2019-01-11 09:41:16 +00:00
szymonsztuka
9b8fda0d6d
CORDA-2375 Ensure node has unique attachment contract classname/version from signed JARs (#4535)
Corda Node ensures a given contract class and version can be sourced from only one signed and trusted Attachment (JAR).
An attempt to import a signed JAR as a trusted uploader (or promote to be trusted) with a class and version already present in the other trusted Attachment will raise DuplicateContractClassException.

Minor fixes to Hibernate Attachment Query parser (original query to select attachment without signers would always return no attachments)
2019-01-10 14:13:00 +00:00
Andrius Dagys
fa025dedeb
ENT-2822: Move experimental raft and bft-smart notaries back into node, fix reference state support (#4509)
Move Raft and BFT-Smart notaries back into node to preserve backwards compatibility.

* Allow overriding full node config when using internal mock network parameters.

* Make BFT-Smart notary start up in prod mode as well

* Move raft & bftsmart notaries to net.corda.notary.experimental package

* Make sure Raft notary handles reference state edge cases correctly.

* Make sure BFT-Smart notary handles reference state edge cases correctly.

* Include notary schemas in node internal schemas

* Undo Raft notary table schema changes to maintain compatibility.
2019-01-09 15:52:42 +00:00
Tudor Malene
d33cb16c5e
ENT-2923 - remove db access code from the verification thread pool (#4504)
* ENT-2923 - remove db access code from the verification thread pool

* Remove worker pool for tx verification and disable db access.

* Address code review comments
2019-01-08 14:37:26 +00:00
Manos Batsis
2acb3d37cb AttachmentsClassLoader fails when calling setURLStreamHandlerFactory (#4512) 2019-01-08 13:23:47 +00:00
Shams Asari
8e61d11a49
CORDA-2399: Samples using public TestCordapp API rather than internal one (#4521)
Also moved the contents of TestCordappUtils.kt to InternalTestUtils.kt to make it more obvious they're internal.
2019-01-08 11:55:23 +00:00
Michele Sollecito
8e0b2558ad
[CORDA-2394]: Fixed ABI issue with VaultQueryCriteria. (#4516)
* [CORDA-2394]: Fixed ABI issue with VaultQueryCriteria.

* [CORDA-2394]: Fixed ABI issue with VaultCustomQueryCriteria.
2019-01-08 11:39:33 +00:00
Roger Willis
eea348768b
CORDA-2098: State pointers are now comparable. (#4494)
* State pointers are now data classes, so now comparable.

* Pointers now are not data classes. Implemented hashCode and equals for comparability.
2019-01-08 11:03:57 +00:00
Shams Asari
ad1a96fefb
CORDA-1942: Removed new deprecated overload of toLedgerTransaction (#4492) 2019-01-03 17:45:26 +00:00
fraspadafora
de5a49457c Update ServiceHub.kt (#4501) 2019-01-03 17:39:28 +00:00
Shams Asari
055beefd02
CORDA-2391: Revert behaviour of Try.on to V3 (#4497)
Apps may depend on the previous behaviour of catching Throwable rather than just Exception. Better to not risk this break and instead provide a helper to throw Errors.

Also using Consumer to avoid ugly usage in Java for doOnSuccess and doOnFailure.
2019-01-03 16:48:42 +00:00
JamesHR3
17c654803d
[CORDA-2298] Update trackBy documentation (#4496)
* Update the documentation for trackBy to better indicate that updates are not filtered according to the query criteria
* Add a test that shows the behaviour, which is skipped for now until a solution is implemented.
2019-01-03 16:23:54 +00:00
Shams Asari
2622c8fe51
CORDA-1942: Renamed NetworkParametersStorage to NetworkParametersService to match its public usage (#4487)
As a public API it's not a true storage - CorDapps can't add network parameters.
2019-01-03 08:52:39 +00:00
Shams Asari
1ae1e4909d
CORDA-2128: Made DEFAULT_TRACKER lambda private (#4493) 2019-01-02 22:41:53 +00:00
josecoll
87adc1c831
CORDA-2331 - Code alignment to produce identical finance contracts JAR. (#4482)
* Remove discrepancies between OS and ENT caused by manifest metadata.
Unsigned (until identify why signing causes different .EC file)

* Align comments between OS and ENT.
2019-01-02 16:31:25 +00:00
Tudor Malene
ee9251bd25
CORDA-2327 add attachments for missing dependencies (#4456)
* CORDA-2327 first draft - add attachments for missing dependencies

* CORDA-2327 draft - fix unit tests

* CORDA-2327 draft - some cleanup.

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 fix test

* CORDA-2327 Address code review comments

* CORDA-2327 fix api

* Address code review comments

* CORDA-2327 Address code review comments

* CORDA-2327 Address code review comments

* Fix merge

* Address code review comments
2019-01-02 16:16:53 +00:00
Shams Asari
b1112dd264
CORDA-1942: Improvements to the WithReferencedStatesFlow API (#4464)
* Internal classe were being exposed and have been hidden
* The single flowLogic instance has been changed into a lambda producer. Flows may not be written to be executed twice, especially if they hold internal state.
* Added JVM c'tor overloads
2019-01-02 13:43:04 +00:00
Shams Asari
9a484998bb No longer using deprecated MockNetwork c'tor (#4481) 2019-01-02 09:51:51 +00:00
Shams Asari
b4c3fa1948
Fixed incorrect attachment loading integration test (#4453)
* Fixed incorrect attachment loading integration test

`AttachmentLoadingTests.test that attachments retrieved over the network are not used for code` was a false-positive - it was incorrect on multiple levels. Fixing it required updating the finance:isolated CorDapp, at which point it was given the new MANIFEST metadata for V4, and moved out of the net.corda.finance namespace to avoid package sealing issues.

The new test exposed a bug in the LedgerTransaction verification logic. This was cleaned up as it was too easy to verify on the wrong instance.
2018-12-31 15:02:11 +00:00
Florian Friemel
d7f5a767e4
Add VaultService functions for paginating queryBy(class), trackBy(class). (#4473) 2018-12-28 15:26:11 +00:00
Shams Asari
347d779c03
CORDA-2128: Some utils which shouldn't be public (#4468) 2018-12-27 18:11:26 +00:00
Shams Asari
c08f65a92c
CORDA-2128: Moved all the helper methods added to NetworkParameters.kt into internal (#4466) 2018-12-27 14:21:37 +00:00