Commit Graph

778 Commits

Author SHA1 Message Date
Chris Rankin
d419faa185 ENT-4652: Tighten Groovy code for writing Cordapp-Dependencies. 2020-02-13 19:43:30 +00:00
Stefano Franz
b23af5f0d2
add timeouts to all tests (#5875) 2020-02-11 10:14:05 +00:00
Chris Rankin
08925ee0a5 ENT-4911: Split network verifier's sealed CorDapps into separate packages. (#5900) 2020-01-27 15:20:08 +00:00
Chris Rankin
a7147c1ffd ENT-4652: Provide an "attachment fixup" mechanism to repair broken transactions. (#5825)
* Do not register cordapp custom serialisers when using attachment classloader.

* Record the URLs of CorDapp JARs that contain custom serialisers. Include these JARs as extra attachments if we discover that we're missing a custom serialiser during transaction verification.

* Check for disabled serializer when explicitly requesting a custom serializer.
Refactor test case to force use of a custom serializer.

* Tidy up basic custom serializer test.

* Also test that TransactionBuilder rejects missing custom serializers.

* Remove test whitelists, which should not be needed with custom serialisers.

* Add changelog entry. Also align TestCordappImpl.findRoots() with OS backports.

* Second approach based around CorDapps inside AttachmentStorage - report missing type descriptor or any non-composable types.

* Initial implementation of Corda-Fixup rules inside a CorDapp jar.

* Replace original "automatic attachment fixing" mechanism completely.

* First review comments: restore "missing class" logic to TransactionBuilder.

* Restore "missing class" mechanism as fallback for SignedTransaction too.
2020-01-14 15:18:51 +00:00
Christian Sailer
06f97cfed5 ENT-4610 Move tx signing to the Uniqueness provider (#5773)
* ENT-4610 Move tx signing to the Uniqueness provider

* Make detekt happy

* Remove unused imports

* Address review comment
2019-11-29 17:30:33 +00:00
Tudor Malene
5cdf7f2b2f CORDA-3370 Remove Network visualiser reference 2019-10-30 16:45:33 +00:00
Tudor Malene
e32f1ca4f2 CORDA-3369 fix samples readme 2019-10-30 16:30:18 +00:00
Christian Sailer
df8cc7282f CORDA-3360 Add nodeInfo permissions to web user 2019-10-23 09:58:59 +01:00
Chris Rankin
971eb56a98 CORDA-3346: Remove the JitPack repository from Corda. 2019-10-21 13:15:03 +01:00
Ryan Fowler
6ca4b589e2 CORDA-3091: Move executor thread management into CordaRPCConnection (#5491) 2019-09-26 17:48:07 +01:00
Tudor Malene
298d8ba69c CORDA-3024 Rename the webserver (#5489) 2019-09-26 10:20:49 +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
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
Stefano Franz
3476a47378
move irs-demo to slowIntegrationTest (#5447) 2019-09-09 10:49:44 +00: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
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
Jonathan Locke
122bf3b3e0 Merge OS 4.1 into OS 4.3
Corrected changelog
Corrected irs-demo cordapp build.gradle file - removed unnecessary dependency

feel free to be detailed.
2019-08-27 16:21:47 +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
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
Dominic Fox
dd98461d87 CORDA-3031 Constrain max heap size for Spring boot processes (#5234)
* Constrain max heap size for Spring boot processes

* Increase allowance to 256M
2019-06-20 18:13:57 +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
2152961d46
CORDA-2333: Dependency update pass for tests and demos (#5211) 2019-06-13 10:15:13 +01:00
fowlerrr
f273d894ef Extract jackson dependency from finance-workflows (#5163)
Extract jackson dependency from finance-workflows and move it to IRS Demo where it is actually needed
2019-05-23 18:22:56 +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
c48e72ae66 SIMM valuation sample: do not use shrink custom task by default (and only use for JDK 1.8 due to Proguard version not supporting JDK 11) 2019-05-20 15:08:27 +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
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
750033540a CORDA-2535 - Fixes to IRS demo (#4995)
* CORDA-2535 Move classes from test src to main

For some reason a load of classes were in the test src rather than the
main src even though they were needed during runtime. These have been
moved back into main so they are compiled for use in the demo app.

* CORDA-2535 Fix missing trade id irs-demo home page

Change `deal.ref` to `deal.common.tradeID`

* CORDA-2535 Highlight in irs-demo that `node` module should not be depended on

The demo relies on `node` unless some larger refactoring is made. This
is being kept as it is, but to discourage developers from doing the
same in their CorDapps, a comment has been added to `build.gradle`
explaining why it is there and that developers should not do the same.
2019-05-03 13:47:42 +01:00
Tudor Malene
bb41d2941d CORDA-2847 -Support custom serialisers when attaching missing attachments to txs (#5046) (#5062)
(cherry picked from commit 2e4c5d79f6)
2019-05-01 11:13:31 +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
851ceac3d1 Use compileOnly instead of cordaCompile in irs-demo to depend on node module (#5044) 2019-04-25 12:45:23 +01:00
Dan Newton
69526229e1 CORDA-2535: Fixes to IRS demo (#4995)
* CORDA-2535 Move classes from test src to main

For some reason a load of classes were in the test src rather than the
main src even though they were needed during runtime. These have been
moved back into main so they are compiled for use in the demo app.

* CORDA-2535 Fix missing trade id irs-demo home page

Change `deal.ref` to `deal.common.tradeID`

* CORDA-2535 Highlight in irs-demo that `node` module should not be depended on

The demo relies on `node` unless some larger refactoring is made. This
is being kept as it is, but to discourage developers from doing the
same in their CorDapps, a comment has been added to `build.gradle`
explaining why it is there and that developers should not do the same.
2019-04-16 12:33:45 +01:00
Tudor Malene
4a1f149b49 CORDA-2858: Wire-up Corda components with better RPC reconnect logic (#4933)
Implemented the ReconnectingRPC into the WebServer, Standalone Shell, Explorer and BankOfCordaClientApi
2019-04-15 11:26:53 +01:00
Katelyn Baker
71114cd412 Merge branch 'master' into release/4 2019-04-03 16:01:54 +01:00
Chris Rankin
b5f0004185 BUILD: Tidy up Gradle for irs-demo:web. 2019-03-22 14:56:57 +01:00
josecoll
94d827ebe4
CORDA-2741 RPC client connection management section not fully working (#4870)
* RPC Client using HA addresses.

* Fix incorrect document code snippets by referencing working, compilable code.

* Minor updates following PR review.
2019-03-13 16:31:28 +00:00
Chris Rankin
dc83afb4de CORDA-2672: Tidy up CorDapp deployments in samples. (#4815)
* CORDA-2672: Tidy up CorDapp deployments in samples.

* CORDA-2672: Refactor Attachment Demo.

* Remove Bank of Corda from Trader Demo.

* Configure SLF4J simple loggers, fix comments and documentation.
2019-03-11 16:48:35 +00:00
Mike Hearn
4e98ea3bbf Docs: repair a lot of broken docs pages. 2019-02-21 12:05:07 +01:00
Mike Hearn
37627ae256 Bugfix: register SwapIdentitiesHandler again. (#4789) 2019-02-19 18:46:31 +00:00
Mike Hearn
96134c8cfa Bugfix: register SwapIdentitiesHandler again. (#4789) 2019-02-19 18:42:32 +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
Anthony Keenan
aad1ae5945 [CORDA-2560] Add upgrade notes for custom configuration and improve cordapp config… (#4730)
* Add upgrade notes for custom configuration and improve cordapp configuration documentation.

* Address review comments

* Couple of minor nitpicks
2019-02-14 14:57:34 +00:00
Shams Asari
c39c61ecab
CORDA-2467: Moved non-contract things out of finance-contracts and into finance-workflows (#4700)
This includes all of the cash selection logic, JSON support using jackson and a bunch of utilities which are not relevant to contract verification. The exception to this are Interpolator which has been moved to the IRS demo, and PhysicalLocationStructures.kt which is now in explorer.
2019-02-01 17:31:12 +00:00
Anthony Keenan
84e7cb231d
Minor docs fix (#4675) 2019-01-29 13:10:07 +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
Katarzyna Streich
35acbc8107
CORDA-2361: Split samples into contracts and workflows (#4575) 2019-01-23 13:26:33 +00:00
Dimos Raptis
22f960fb8c
Remove dependencies from classpath in SIMM valuation integ test (#4603) 2019-01-18 13:02:17 +00:00
Stefano Franz
d95c68c2ae make usage of flow overrides more explicit in documentation for trader-demo 2019-01-17 11:22:06 +00:00
Stefano Franz
2220514bde Fix trader demo README to describe what the "LoggingBank" node is for 2019-01-17 11:22:06 +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
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
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
Shams Asari
837d2d7106
Updated docs on the need to load confidential-identities CorDapp separately (#4547)
Also, updated the trader and BoC demos to include confidential-identities jar.
2019-01-11 13:51:23 +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
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
Tudor Malene
24d91c5f89
CORDA-2384 - Fix driver classpath (#4472)
* Fix driver classpath

* Fix tests

* Fix classloader bug.

* Fix tests

* Fix tests

* Fix api

* Disable failing irs test.

* Address code review comments

* Remove @Ignore from test

* Remove @Ignore from tests

* Address code review comments.

* Attempt to fix simm valuation test

* Attempt to fix simm valuation test

* Comment failing functionality.
2019-01-03 20:06:35 +00:00
Shams Asari
f590300cdf
CORDA-2345: Updated docs to use the new TestCordapp API, rather than the old scan cordapp packages (#4491)
Also made some improvements to the API, especially for Java users.
2019-01-03 17:57:28 +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
Anthony Keenan
af75a05502
Fix irs-demo dependency issues (#4438)
* Fix irs-demo dependency issues

* Fixed a problem with the IRS demo test JAR.

* Fixed deployNodes problem and log4j info statement.
2018-12-20 12:31:16 +00:00
Shams Asari
830959c9f7
CORDA-2345: Simplified TestCordapp to make it inline with the recent CorDapp versioning changes (#4434)
TestCordapp has now two implementations to clearly separate the two use cases it has in the Corda repo:

* TestCordappImpl which implements the revised public API of TestCordapp; namely that a TestCordapp instance references a real CorDapp jar on the classpath. This is either an external dependency jar in which case it’s taken as is and given to the node, or it’s a local gradle project in which case it’s compiled using the gradle “jar” task to generate the CorDapp jar. This approach means the jar has all the original CorDapp versioning information, which is important that it’s correct when testing. To this end, TestCordapp only needs to expose the ability to specify the app’s config. All the remaining properties have moved to CustomCordapp.

* CustomCordapp for creating arbitrary custom CorDapps, including specifying the jar’s MANIFEST values. This is internal API and only used for testing the platform. Technically this shouldn’t implement TestCordapp but does so to reduce the complexity of the driver and mock network.
2018-12-20 09:49:58 +00:00
szymonsztuka
4aaefb4fe9 CORDA-2331 Split Workflow and contracts of Finance App into separate Cordapps (#4422)
* Split Workflow and contracts of Finance App into separate Cordapps, part 1 - content which is different between OS and ENT is still in contract Cordapp.

* Move CashSelection implementations to workflow module.

* Move CashSelection implmentations to workflow module.

* Move finance module to finance-flows, top level finance module is empty.

* Move finance module to finance-flows, top level finance module is empty.

* Updated build comment.

* Revert publication of combined (contracts and flows) corda-finance.jar (to maintain backwards compatibility with 3rd party cordapps dependent on finance)

* Added backwards compatibility clarification comment.

* Re-instate new cordapp metadata.

* Global rename of `finance-flows` to `finance-workflows` to follow adopted naming conventions.

* Addressed final review comments.

* Rename application to "Corda Finance Demo"

* Generation of original corda-finance jar from new sub-modules.

* Fixed and tested demobench with new split finance contract and workflow jars.

* Renamed finance sub-modules to contracts and workflows.

* Remove Michele!!!

* Minor fix to filtering logic.

* Align CorDapp configuration filename with workflows jar.

* Fix breaks caused by finance module naming changes.

* Final alignment between OS/ENT of finance contract code.
2018-12-19 18:02:51 +00:00
Venelin Stoykov
86b0e71f3a Add BelongsToContract for network verifier state (#4431) 2018-12-18 13:22:53 +00:00
josecoll
9cdda3bd77
CORDA-2149 CorDapp Contract and Workflow version identifiers (#4363)
* Implementation of Contract and Workflow attribute identifiers.

* Fixes following rebase from master.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Added missing constants.

* Further clean-up.

* Updated documentation.

* Added changelog entry.

* Updated all samples (using new Gradle Plugin 4.0.37 functionality)

* Temporarily resolve gradle plugins from latest published snapshot.

* Temporarily resolve gradle plugins from latest published snapshot.

* Updates following feedback from PR review.

* Move constants into CordappInfo companion object.

* Contract and Workflow attribute `version` to `versionId` (as version is a reserved gradle variable)

* Clarified warning message on incorrect version identifier.

* Align version identifier processing logic with gradle cordapp plugin.

* Updated comment.

* Minor fixes following rebase from master.

* Fixed broken unit test.

* Improved exception reporting.

* Update to use 4.0.37 of Gradle Plugins.

* Added support for combined Contract and Workflow CorDapp info.

* Updated following discussions with Shams + cleanup.

* Updated following Shams PR review.

* Minor API improvements.

* Added missing cordapp info causing deployNodes to fail.
2018-12-14 09:39:23 +00:00
szymonsztuka
e7d1306335
CORDA-1915 Simm Valuation demo update for JAR signing (#4105)
The build process creates new version fo Cordapp JAR in post 'jar' task.
So far JAR signing was integral part of the jar task, now it's also available as a separate task signJar (gradle-plugins PR corda/corda-gradle-plugins#130).
Using signJar to re-sign Cordapp shrinked JAR.
2018-12-10 13:57:56 +00:00
Michele Sollecito
c31da13c70
[CORDA-2213]: IRS Demo is unable to simulate future dates (fix). (#4384)
* [CORDA-2213]: IRS Demo is unable to simulate future dates (fix).

* [CORDA-2213]: IRS Demo is unable to simulate future dates (fix).
2018-12-07 16:59:52 +00:00
Michele Sollecito
3f46dec033
[CORDA-1190]: Removed confusing reference to an attachments directory in LoggingBuyerFlow in trader-demo. (#4381) 2018-12-07 14:25:47 +00:00
Andrius Dagys
838c99c6e4 CORDA-2115: Notary whitelist verification changes (#4293)
* CORDA-2115: Notary whitelist verification changes

- For regular and contract upgrade transactions: check that the notary is in the network parameter whitelist
- For notary change transactions: check the the new notary is in the network parameter whitelist. This enabled support for network merging: the old notary doesn't have to be in the current network's notary whitelist for re-pointing old states to another notary.

These checks are done during transaction construction/verification and also by the non-validating notary.

* Address comments

* Remove stale todo

* Use notary whitelist of current network parameters for platform versoin 3

* Cleanup test

* Move `getHistoricNotary` to `HistoricNetworkParameterStorage` in `core.internal`

* Require `newNotary` to be notary on the network map during notary change
2018-12-04 13:54:24 +00:00
Michele Sollecito
dc1f5f0ccd
[CORDA-2257]: Enabling optional global test port allocation (#4310) 2018-11-27 16:40:30 +00:00
szymonsztuka
759fd9b5bb
Update to corda-gradle-plugins v4.0.36 (#4292)
* Update to corda-gradle-plugins v4.0.36 (new development key for JAR signing).
* Changed maven repo from https://dl.bintray.com/kotlin/kotlin-eap/   to https://kotlin.bintray.com/kotlinx.
2018-11-27 11:41:05 +00:00
Dominic Fox
88fbb47f67
ENT-2320 state contract identification (#4285)
* Enforce state/contract agreement validation

* Fix some broken tests

* Ascertain targetVersion by inspecting the jar source of the ContractState

* Docs added and rebased against master

* contextLogger doesn't work here

* Java examples in docs

* Label IRSState with owning contract

* Fix rst formatting

* Add @BelongsToContract annotation to PortfolioState
2018-11-26 16:02:32 +00:00
Stefano Franz
8f463c46a9 Add message to uses of require(...) (#4192) 2018-11-16 17:13:55 +00:00
Shams Asari
e8b6f5f2f2
CORDA-2005: FinalityFlow has been made into an inlined flow to resolve issue with FinalityHandler (#4050)
FinalityHandler is insecure in that it is open to receive any transaction from any party.

Any CorDapp targeting platform version 4 or above is required use the new c'tors which take in FlowSession objects to the counterpart flow. This flow must subcall ReceiveFinalityFlow to receive and record the finalised transaction.

Old CorDapps (with target platform version < 4) will continue to work as previously. However if there are no old CorDapps loaded then the node will disable FinalityHandler.
2018-11-14 14:16:22 +00:00
tudor.malene@gmail.com
1e27f0cbe0 Merge remote-tracking branch 'private/master' into feature/tudor_constraints
# Conflicts:
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
2018-11-14 11:50:19 +00:00
Michele Sollecito
dc62b20c5d
[CORDA-1879]: Ensure Node dies on unrecoverable errors. (#4213) 2018-11-12 15:56:04 +00:00
Andrius Dagys
336185de23
CORDA-2190: Improve notary service flow exception handling (#4200)
* CORDA-2190: Improve notary service flow exception handling

- Refactored notary flows to reduce validation code duplication
- Improved notarisation error handling to provide more helpful responses to the client
2018-11-09 14:00:40 +00:00
Roger Willis
80591bc6fd
StatePointer (#4074)
* Introducing linear pointer.

* Added design document.
Added StatePointer interface.
Updated design document.
Updated StatePointer implementation.
Added doc section for state pointer.

* Updated design document.
Added API for StatePointer.

* Update core/src/main/kotlin/net/corda/core/contracts/Structures.kt

Co-Authored-By: roger3cev <roger.willis@r3cev.com>

* Update core/src/main/kotlin/net/corda/core/contracts/Structures.kt

Co-Authored-By: roger3cev <roger.willis@r3cev.com>

* Update core/src/main/kotlin/net/corda/core/contracts/Structures.kt

Co-Authored-By: roger3cev <roger.willis@r3cev.com>

* Update docs/source/design/linear-pointer/design.md

Co-Authored-By: roger3cev <roger.willis@r3cev.com>

* Update docs/source/design/linear-pointer/design.md

Co-Authored-By: roger3cev <roger.willis@r3cev.com>

* Resolve pointers
Added test to check pointers are resolved.
Updated docs and kdocs.
Reverted changes to api-current.txt
Revert "Reverted changes to api-current.txt"
This reverts commit dc1cece91a595a4e772f63917b830c7e1fd0586d.
Fix CI bug.
Made StatePointers type safe.
Resolving StatePointers is now optionally recursive
Addressed review comments.

Fixed compile error.

Addressed review comments.

Fixed bug in state pointer search.
Improved efficiency of state pointer search.

Removed whitespace.

TxBuilder logs warning when no service hub is supplied for resolving pointers as opposed to throwing an exception.

* Addressed review comments.
2018-11-05 10:33:26 +00:00
Andrius Dagys
66116e8d20
ENT-1858: Notary cleanup (#4134)
* Migrated all non-BFT notary implementations to use async commits.

* Mock network: await for async operation completion. When calling runNetwork()
it keeps "pumping" messages between participants until no more messages are generated.
The problem comes in when a flow suspends on an async operation: the mock network
thinks the flow finished the work for the current step, and since no more messages
are generated, completes the runNetwork() function. The message that the flow
generates once it resumes after async operation completion never gets processed.
This change makes runNetwork() wait until all flow async operations finish,
and only then check whether no more messages can be transferred.
2018-11-01 19:03:43 +00:00
Anthony Keenan
30fedec343
CORDA-1838: A few misc fixes (#4126)
* Remove unused code

* Make comment readable

* Remove joptsimple from node/shell

* tabs vs whitespace
2018-10-30 14:01:20 +00:00
tudor.malene@gmail.com
29a8c153ed Merge branch 'master' into tudor_merge_os_24_10
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/JarSignatureCollector.kt
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	core/src/test/kotlin/net/corda/core/contracts/PackageOwnershipVerificationTests.kt
#	core/src/test/kotlin/net/corda/core/internal/JarSignatureCollectorTest.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TestDSL.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TransactionDSLInterpreter.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-24 17:09:30 +01:00
Stefano Franz
0919b01271
ENT-2509 - Make @InitiatedBy flows overridable via node config (#3960)
* first attempt at a flowManager

fix test breakages

add testing around registering subclasses

make flowManager a param of MockNode

extract interface
rename methods

more work around overriding flows

more test fixes

add sample project showing how to use flowOverrides

rebase

* make smallest possible changes to AttachmentSerializationTest and ReceiveAllFlowTests

* add some comments about how flow manager weights flows

* address review comments
add documentation

* address more review comments
2018-10-23 16:45:07 +01:00
Shams Asari
d3c5479826
CORDA-1621: The finance CorDapp uses the app config feature rather than the node's config (#4100) 2018-10-22 18:56:30 +01:00
Andrius Dagys
e0d8ea8a58
CORDA-535: Move implementation specific configuration values out of n… (#4058)
The configuration objects for specific notary implementations have been replaced
by a single untyped "extraConfig" Config object that is left to the notary service
itself to parse.

* Remove the raft bootstrapping command from node, we'll need a different
mechanism for that.

* Remove pre-generated identity config value.

* Split up obtainIdentity() in AbstractNode to make it easier to read.

* A temporary workaround for the bootstrapper tool to support BFT notaries.

* Update docs

* Add upgrade notes

* Fix rebase issue

* Add a config diff for the bft notary as well
2018-10-22 10:26:10 +01:00
Rick Parker
55731ef816
ENT-2431 Tidy up buildNamed and CacheFactory 2018-10-18 10:38:43 +01:00
Stefano Franz
456c9a85e1
remove requirement to override default progress tracker for interacti… (#3985)
* remove requirement to override default progress tracker for interactive shell - this is no longer needed

* fix failing tests
2018-10-17 11:27:14 +01:00
Florian Friemel
47068e6b7a [CORDA-2077] Use latest gradle plugin version (4.0.32), set target version in core and sample CorDapps (#4038)
* Upgrade gradle plugin; add target version attribute to finance and sample cordapps.
* Remove '-SNAPSHOT' from gradlePluginsVersion.
* Fix naming.
* Update docs.
* Respond to feedback.
* Fix irs demo
* Fix more samples
* Fix more samples
* Fix deployNodes
* Fix deployNodes
* more fixes
* fix simm valuation
* more fixes
* more fixes
* more fixes
* more fixes
* Publication should have *nothing* to do with cordformation and deployNodes.
Remove it! And if this exposes a bug then "so be it".
* Disable CorDapp signing for Cordapp Configuration and Network Verifier.
* Disable CorDapp signing for SIMM Valuation Demo.
* Remove remaining publishing nonsense from samples.
* Workarounds fpr cordapp-configuration, network-verifier and simm-valuation-demo:
JarSigner rejects jars with duplicates inside, so remove them.
* Upgrade to Gradle plugin 4.0.32 and reenable CorDapp signing for samples.
2018-10-15 21:11:52 +01:00
Shams Asari
6d4bdb84b9
Code cleanup, mostly shortening long lines (#4070) 2018-10-15 12:01:15 +01:00
Andrius Dagys
b8b2cc772d CORDA-535: Remove the old mechanism for loading custom notary service implementations.
All notary service implementations are now assumed to be loaded from CorDapps.
2018-10-10 17:16:57 +01:00
Andrius Dagys
9ebeac1ad8
CORDA-535: Extract notary implementations into CorDapps (#3978)
* Move Raft and BFT notaries into separate modules

* Move schemas

* Fix tests & demos

* Modified logic for creating notary services:

Added a new field 'className' to the notary configuration. The node now
loads the specified implementation via reflection. The default className
value points to the simple notary implementation for backwards compatibility.
Relevant schemas are loaded in a similar fashion.

For backwards compatibility purposes the default SimpleNotaryService will
remain built-in to node, but its cordapp will be generated on startup – so
the loading of notary services is streamlined.

* Move test namedcache factory to test utils
2018-10-10 10:04:22 +01:00
tudor.malene@gmail.com
40825fef99 Merge branch 'tudor_merge_os_master' into feature/ENT-2222/constraints_propagation_private
# Conflicts:
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-02 16:10:19 +01:00
Tudor Malene
f96a59932c ENT-2222 Constraints propagation
ENT-2222 Fix tests

ENT-2222 Fix tests

ENT-2222 Add ledger transaction verification logic

ENT-2222 Fixed IRS test

ENT-2222 Fixed IRS test

ENT-2222 Fixed unit test

ENT-2222 Better kdocs

ENT-2222 Support for reference states

ENT-2222 Fix support for reference states

ENT-2222 Revert wrong change

ENT-2222 Fix Kdoc

ENT-2222 Fix Kdoc

ENT-2222 Better docs

ENT-2222 Address code review comments

ENT-2222 Fix test

ENT-2222 Fix rebase

ENT-2222 Add documentation around constraint propagation

ENT-2222 Add tests for contract propagation

ENT-2222 Add Signature Constraints propagation - first draft

ENT-2222 fix tests

ENT-2222 more tests

ENT-2222 unseal the TransactionVerificationException

ENT-2222 unseal the TransactionVerificationException

ENT-2222 more docs

ENT-2222 address code review comments

ENT-2222 address code review comments

ENT-2222 re-implement transition logic

ENT-2222 better comments and checks

ENT-2222 Fix tests

ENT-2222 merge fixes
2018-09-28 13:38:35 +01:00
Rick Parker
965f9ce528
ENT-2431 Lay foundations for caching metrics (#3955) 2018-09-24 09:55:56 +01:00
Andrius Dagys
160bc147ed ENT-1245: Cleanup: remove unused node from notary demo 2018-09-17 10:29:02 +01:00
Thomas Schroeter
057ee74611
Single node notary thread safety (#3924) 2018-09-12 13:36:04 +01:00
Shams Asari
ca5d88e65a
Minor changes made in ENT which should have been ported over (#3932) 2018-09-12 11:26:37 +01:00
Shams Asari
83e66d542d
Syncing Cordapp info code from ENT so that ENT-1731 is fully ported (#3914)
Also, Cordapp.Info has been made internal as it's not used in the public API
2018-09-10 10:43:00 +01:00
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +01:00
Chris Rankin
dfea9b6940
CORDA-1889: Update some CordFormation samples to use nodeDefaults{}. (#3771) 2018-08-11 12:57:04 +01:00
szymonsztuka
c23167f08e
ENT-2188 fix H2 insecure default configuration (#3692)
Set the "h2.allowedClasses" system property, require database password when exposing H2 server on non-localhost address, samples start H2 server by default (reintroduces the behaviour before h2Settings.address configuration option was added)
2018-08-01 11:50:42 +01:00
Tudor Malene
85caa9ee9d
Feature/corda 1847/remove hibernate observers (#3696)
* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests
2018-07-31 13:52:13 +01:00