Commit Graph

1800 Commits

Author SHA1 Message Date
Mike Hearn
0632d275ed
CORDA-2540 Adjust no overlap rule to avoid premature optimization (#4693)
Fix invalid optimization in AttachmentsClassLoader.
2019-01-31 17:59:01 +01:00
Tudor Malene
37eb93fa76
Tighten no overlap check. (#4690) 2019-01-30 22:01:18 +00:00
josecoll
91c2d75f31
Fix bug in verifier for has to signature constraints (auto-migration). (#4680) 2019-01-30 15:54:12 +00:00
Roger Willis
365471d9f4
CORDA-2531 State mappings are now also updated for new reference states. (#4681)
* 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 10:42:43 +00:00
Rick Parker
7dc7313fb7
ENT-3000 Start pooling classpath scanning and related fixes (#4664)
* 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.
2019-01-30 10:35:20 +00:00
Katarzyna Streich
6efd54fce1
CORDA-2520: Add FetchParametersFlow (#4674)
* CORDA-2520: Add FetchParametersFlow

* Address comments, add test
2019-01-29 18:16:37 +00:00
Shams Asari
e20278fbfd
Made FlowCheckpointVersionNodeStartupCheckTest leaner (#4640)
* Removed `restart node successfully with suspended flow` as it duplicates `TraderDemoTest#Test restart node during flow works properly`
* Removed the need for a notary
2019-01-28 14:08:54 +00:00
Roger Willis
0e1c20a883
CORDA-2497 fix (#4630)
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 20:36:33 +00:00
Dimos Raptis
16d53505d7
[CORDA-2496] - Adjust CorDappResolver to handle same CorDapp registered multiple times (#4631) 2019-01-24 17:06:05 +00:00
szymonsztuka
1b89ece09b CORDA-2504 improve error message of missing contract attachments (#4628)
* CORDA-2504 Improved MissingContractAttachments error to ensure it contains contractClassName.

* CORDA-2504 Improved MissingContractAttachments error to ensure it contains contractClassName.

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

* CORDA-2504 Improved MissingContractAttachments error to ensure it contains contractClassName - unnecessary change.

* Docs

* fix docs

* fix docs 2

* fix docs 3
2019-01-24 15:48:07 +00:00
Shams Asari
5bb5244e55
CORDA-2228: Exceptions emanating from ReceiveFinalityFlow are sent to the flow hospital (#4621) 2019-01-23 16:24:49 +00:00
josecoll
82f5a756fe
Add minimum platform version check before attempting a hash -> signature constraints auto migration. (#4623) 2019-01-23 13:10:41 +00:00
josecoll
100a6fcb56
CORDA-2475 Adjust attachments query logic to return correct results (#4612)
* CORDA-2475 Adjust attachments query logic to return correct results sets for signed/unsigned jars.

* Updates following PR review feedback by RP.
2019-01-22 22:57:43 +00:00
Rick Parker
197a13611d
ENT-2967 Fix up use of various JDK performance contention points (#4608)
* ENT-2967 Various JDK contention points

* Move new private method to bottom of class.
2019-01-22 11:19:51 +00:00
Shams Asari
c6a7d14f4f
Reducing the size of the CorDapp jars used in tests (#4600)
The helper method enclosedCordapp is a replacement to scanning the current package (which pulls in a lot more into the jar than intended).
2019-01-21 13:54:26 +00:00
Shams Asari
498db538d7
CORDA-2442: Added wither methods to the vault query classes (#4585) 2019-01-15 21:02:02 +00:00
Shams Asari
5bb38e455c
Add back V3 TransactionBuilder c'tor (#4587) 2019-01-15 18:52:58 +00:00
Shams Asari
f592025273 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
2019-01-15 14:56:57 +00:00
Dimos Raptis
fbb00bff9c
[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-15 14:34:11 +00:00
Michele Sollecito
05ffb3d101
CORDA-2403: Flagged API issues between 4.0 and 3.3. (#4541) 2019-01-15 14:27:29 +00:00
Dimos Raptis
f51cfc34bf
[CORDA-2431] - Reduce memory footprint of classpath scanning (#4576)
* Reduce memory footprint of classpath scanning

* Close scan result in the end
2019-01-15 10:15:40 +00:00
Shams Asari
3b8347e150
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
2019-01-14 14:32:14 +00:00
Shams Asari
1bbcb8722e
CORDA-2418: Fixed inability to use TestCordapp under gradle in Windows if referring to self cordapp (#4562)
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.
2019-01-14 11:33:52 +00:00
Katelyn Baker
8e4dbc7060 RELEASE - Post V4 branch cut update platform version to 5 2019-01-13 20:34:22 +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