Commit Graph

483 Commits

Author SHA1 Message Date
Shams Asari
e26e41a384 Various structural cleanups of node-driver:
* Extracted out ShutdownManager into its own file
* Moved RPCDriver and ProcessUtilities into internal package
* Made n.c.testing.performance package internal
2017-11-07 16:58:40 +00:00
Shams Asari
a4be26a296 Removed unnecessary calls to MockNetwork.runNetwork (b/c there is no more P2P node registration) and removed redundant entries in cordappPackages 2017-11-06 21:28:20 +00:00
Konstantinos Chalkias
4e1578c19a
Remove retired IntegrationTestCategory reference (#2007) 2017-11-06 18:36:19 +00:00
Andrzej Cichocki
00a9014852
CORDA-716 Rename one TestClock to DemoClock, and unduplicate code (#1988) 2017-11-06 11:13:56 +00:00
Andrzej Cichocki
9baa9037ae
Retire marker interface. (#1997) 2017-11-06 10:53:02 +00:00
Shams Asari
3bb018a5ce Removed the ability to manually start notary nodes from the driver and MockNetwork. Instead by default a single notary is automatically started. This can be customised at creation time of the driver and MockNetwork. This more accurately models the concept of network parameters in a CZ.
Also added helper methods to retrieve this default notary.
2017-11-05 22:55:33 +00:00
Alberto Arri
9be37c2b88
Remove useless call to waitUntilNetworkReady within driver started nodes (#1998)
Remove usages of waitUntilNetworkReady in conjunction with driver
2017-11-03 14:27:46 +00:00
Shams Asari
d04e48740b Introducing network parameters.
network-parameters file read in by the node at startup, of which only the list of notaries is used. For now, the driver and MockNetwork have been updated to require notaries to be started first. This is so that the same set of network parameters can be defined for all the nodes.

CN in the legal name is not longer disallowed since it's no longer reserved for distributed notary names.

Single-node notaries now only have one identity, their main identity. Nodes part of a cluster continue to have two.

(Based off Kasia's work)
2017-11-03 09:46:10 +00:00
Alberto Arri
5490465750
[CORDA-446] Remove entities from netmap cache & friends (#1980)
* Remove PersistentNetworkMapService and related classes. They were part of the old network map node code.
2017-11-03 09:28:52 +00:00
Michele Sollecito
d882f8871e
[CORDA-758]: Permissions are now checked for each RPC method. (#1985)
* Permissions are now checked for each RPC method.

* Fixed NodeMonitorModelTest

* Fixed IRSDemoTest
2017-11-02 15:09:49 +00:00
Alberto Arri
00e682a544
[CORDA-446] Clean up other mentions of network map node and logic (#1974)
* [CORDA-446] Clean up other mentions of network map node and logic

* Rename AbstractNetworkMapService to NetworkMapService and remove the empty NetworkMapService

* fix build

* fix artemismessaging tests

* pr comments
2017-11-01 14:25:48 +00:00
Andrzej Cichocki
6b2b663ab3
CORDA-716 Retire MockNetwork.Factory (#1937) 2017-10-31 17:10:37 +00:00
Shams Asari
6ebba9dea1 Removed the startNotary methods from NodeBasedTest, and moved it into an internal package
This commit is in preparation for the upcoming network parameters work.
2017-10-31 11:49:33 +00:00
Andrzej Cichocki
4b0b13dad4
CORDA-716 Retire TestDependencyInjectionBase (#1939) 2017-10-31 10:21:38 +00:00
Maksymilian Pawlak
02a5ddb7df
Remove Bower dependencies from repo and download them on demand (#1959)
Bower dependencies installed by Gradle as a part of deployment
2017-10-30 16:51:38 +00:00
Andrzej Cichocki
05d6fb91c7
Reinstate Simulation config overrides for notary. (#1947) 2017-10-30 11:41:53 +00:00
Alberto Arri
a0b9768be7 Retire FullNodeConfiguration (#1954)
* Retire FullNodeConfiguration

* Moved logic and tests for Artermis user names in RPCUserServiceImpl
2017-10-27 14:30:10 +01:00
Mike Hearn
d7e4aa1783 Add more formal support for observer/regulator nodes. This is a simplistic
approach which assumes a dedicated node for observers: states that are
reported to the node will appear in the database and update feeds as
normal. Apps that expect all updates to be relevant to themselves may
need adjusting if they run on an observer node too, but this is likely
to be rare.
2017-10-26 18:05:24 +02:00
Maksymilian Pawlak
44a7d872d8 IRS Demo - split IRS Demo into two separate applications to showcase … (#1638)
* IRS Demo - split IRS Demo into two separate applications to showcase the separation and usage of RPC client
2017-10-25 16:40:21 +01:00
Andrzej Cichocki
ba75146446 CORDA-716 Unpollute MockNode with Simulation-specific code (#1945) 2017-10-25 14:33:36 +01:00
Joel Dudley
5bb4601812 Reflects V1.0 changes on Master re: internal samples and identity sync flow API. 2017-10-25 09:29:32 +01:00
Andrzej Cichocki
927924498b Introduce MockNodeParameters/Args (#1923) 2017-10-24 11:58:32 +01:00
Alberto Arri
b04368e36a [CORDA-442] make MockNetwork not start a networkmap node (#1908)
* [CORDA-442] make MockNetwork not start a networkmap node

Now MockNetwork will put the appropriate NodeInfos inside each running node networkMapCache.

Tests relating to networkmap node starting and interaction have been removed since they where relaying on MockNetwork
2017-10-23 16:50:53 +01:00
Viktor Kolomeyko
cbb5135097 Fixing Bank-Of-Corda Demo in master (#1922)
* Fix-up: Bank Of Corda sample

Use correct CorDapp packages to scan

(cherry picked from commit 2caa134)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Set adequate permissions for the nodes such that NodeExplorer can connect

(cherry picked from commit ae88242)

* Correct run configuration

* Fix-up port numbers
2017-10-23 15:04:25 +01:00
Andras Slemmer
c66a84bfc6 Interface changes for multi-threading 2017-10-20 11:29:30 +01:00
Viktor Kolomeyko
11db199b7b Fix-up: Bank Of Corda sample (#1912)
In the previous version when running with `--role ISSUER` the application failed to start.
The reason was that in spite of `quantity` and `currency` were optional,
un-necessary `requestParams` been constructed regardless.
2017-10-20 11:00:48 +01:00
Clinton
3dd09fd69b Cordformation in Kotlin (#1873)
Cordformation rewritten in kotlin.
2017-10-19 15:41:25 +01:00
Andrzej Cichocki
12fa945077 CORDA-680 Update cordapp packages documentation (#1901)
* Introduce MockNetworkParameters
2017-10-19 15:06:51 +01:00
Konstantinos Chalkias
479ab9a36a [CORDA-694] Commands visibility for Oracles (without sacrificing privacy) (#1835)
new checkCommandVisibility feature for Oracles
2017-10-19 10:21:20 +01:00
Andrzej Cichocki
b2454c646c Eliminate circular dependency of NodeSchedulerService on ServiceHub. (#1891) 2017-10-19 09:26:26 +01:00
szymonsztuka
6a00df322b reference to finance module via not hardcoded group ID (#1515)
*  generic way to reference to group id when loading finance.jar via cordapp
2017-10-17 11:03:49 +01:00
Andrzej Cichocki
38cf4a489e CORDA-676 Eager cordapp schemas (#1839)
* Retire customSchemas.
* Key cordapp-to-hash map by url as native equality too strict.
2017-10-16 11:35:29 +01:00
Andrius Dagys
7b10e92819 Fixed AbstractNode to load custom notary services properly (#1720)
* Fixed AbstractNode to load custom notary services properly.
Added a custom notary sample.

* Prevent multiple custom notaries from being loaded

* Throw if more than once custom notary service is loaded
2017-10-13 10:36:25 +01:00
Ross Nicoll
327f0ebd73 CORDA-654: Migrate test APIs to match identity changes (#1744)
Rework identity usage in tests to extract identity from nodes by name, rather than just arbitrarily choosing the first identity. This better models the intended design for production (future work).
2017-10-11 18:26:09 +01:00
Andrzej Cichocki
4ee250a19b Retire setCordappPackages. (#1860) 2017-10-11 10:35:21 +01:00
Matthew Nesbit
f19ff141dd Update code to use AppServiceHub in services and support for services when using MockServices hub. 2017-10-10 17:11:32 +01:00
Alberto Arri
3bee830604 [CORDA-442] Removed the NetworkMap option from Cordform, changed all the examples… (#1827)
[CORDA-442]
Removed the option for Cordformation to specify a networkMap.

All the samples have been migrated to not specify a networkMap.
2017-10-10 15:45:42 +01:00
Shams Asari
bd53a22efa Removed extraAdvertisedServiceIds config
The remaining use for it was the finance CorDapp for permissioning CCY issuers. Instead this is now taken from a custom config in node.conf.
2017-10-10 13:47:37 +01:00
Alberto Arri
22b1dead32 Remove functions with spaces in their name (#1850)
Remove all the Kotlin functions with spaces in them since the Android doesn't support them.

See https://github.com/corda/corda/issues/1730 for a more in-depth discussion.
2017-10-10 09:32:43 +01:00
Clinton
484cf75420 CORDA-686 - Split Cordapp gradle plugin from cordformation (#1817)
Added CorDapp gradle plugin written in Kotlin and bumped the version of gradle plugins to 2.0.0 to reflect that this backwards incompatible change is a part of the on going stabilisation of the Corda gradle plugin suite.
2017-10-09 20:08:08 +01:00
Tommy Lillehagen
14f959b4af Code clean-up run 2017-10-09 15:26:40 +01:00
Tommy Lillehagen
fcc4bdae7e Reformat files in testing 2017-10-09 15:26:40 +01:00
Shams Asari
727cd0e55c Cleaned up notary configuration by introducing a notary config option.
extraAdvertisedServiceIds is no longer used for this.
2017-10-07 12:52:37 +01:00
Michele Sollecito
0b35a99c5a [CORDA-682]: Claim Jigsaw module names (#1824)
[CORDA-682] Specify Jigsaw module names for all JAR projects.
2017-10-06 15:37:33 +01:00
Katarzyna Streich
66d78fcf65 Cleanup of mock network pre-NetworkParameters (#1802)
* MockNode rename overrideServices to notaryIdentity

Permit only one override of service.

* MockNetwork: force creation of NetworkMapNode

Tests cleanup: decouple normal nodes and network map. NetworkMap node is created as first.
2017-10-06 10:32:54 +01:00
josecoll
dd3d8ba626 Merge release-v1 onto master (mostly documentation changes) (#1797)
* Updated corda release version to 1.0.0.RC2 (#1641)

* Fixed Simm Valuation Demo Test and enable serializabe java 8 lambdas. (#1655)

* [CORDA-624] Node Explorer on Issuing cash throws MissingContractAttachements exception (#1656)

(cherry picked from commit 27fea4d)

* BIGINT fix for H2 coin selection. (#1658)

* BIGINT fix for H2 coin selection.

* Review feedback

* CORDA-637 Node Explorer shows Network Map Service in Cash Issue dropdown (#1665)

* [CORDA-637] Node Explorer shows Network Map Service in Cash Issue dropdown

* add TODO to remove the hack

* Declare this internal message string as "const". (#1676)

* Merge "A variety of small fixes" into the 1.0 release branch (#1673)

* Minor: improve javadocs in NodeInfo

* Minor: use package descriptions in Kotlin build of api docs too, not just javadocs.

* RPC: make RPCConnection non-internal, as it's a core API. Move docs around so they're on public API not internal API.

* Add an IntelliJ scope that covers the currently supported Corda API.

This is useful when used in combination with the "Highlight public
declarations with missing KDoc" inspection.

* Ironic: upgrade the version of the Gradle plugin that checks for upgraded versions of things.

It had broken due being incompatible with the new versions of Gradle
itself.

* Docs: flesh out javadocs on ServiceHub

* Docs: add @suppress to a few things that were polluting the Dokka docs.

* Docs: mention RPC access in NodeInfo javadoc

* IRS Fixes to bring UI closer to declared financial types (#1662)

* Made problematic CordaRPCClient c'tor private (with internal bridge methods) and added correct c'tors for public use. (#1653)

initialiseSerialization param has also been removed.

* Fixing flow snapshot feature (#1685)

* Fix validating notary flow to handle notary change transactions properly. (#1687)

Add a notary change test for checking longer chains involving both regular and notary change transactions.

* Unification of VaultQuery And VaultService APIs (into single VaultService interface) to simplify node bootstrapping and usability. (#1677) (#1688)

* Identity documentation (#1620)

* Sketch initial identity docs

* Restructure confidential identity docs to better fit structure

* Split confidential identities into API and concepts

* Further expansion on basic identity conceptS

* Merge Party type into api-identity.rst

* Address feedback on written content

* Rework inline code with literalinclude

* Start addressing feedback from Richard

* Clarify use of "counterparty"

* Address comments on key concepts

* Correct back to US english

* Clarify distribution/publishing of identities

* Update changelog around confidential identities

* CORDA-642 Notary demo documentation fixes (#1682)

* Notary demo documentation fixes.

* One of the tables is prefixed.

* CORDA-641: A temporary fix for contract upgrade transactions (#1700)

* A temporary fix for contract upgrade transactions:
during LedgerTransaction verification run the right logic based on whether
it contains the UpgradeCommand.

* Move ContractUpgradeFlowTest away from createSomeNodes()

* Remove assembleBareTx as it's not used

* Update corda version tag to 1.0.0-RC3 (#1705)

* Hide SerializationContext from public API on TransactionBuilder (#1707)

* Hide SerializationContext from public API on TransactionBuilder

(cherry picked from commit 6ff7b7e)

* Hide SerializationContext from public API on TransactionBuilder

(cherry picked from commit 6ff7b7e)

* Address feedback on confidential identities docs (#1701)

* Address minor comments on confidential identities docs

* Expand on implementation details of confidential identities

* Cleanup

* Clarify details of the data blob in the swap identites flow

* Add that certificate path is not made public for confidential identities

* FlowSession docs (#1693)

* FlowSession docs (#1660)

* FlowSession docs

* PR comments

* Milder example flow name

* Fixes bugs with contract constraints (#1696)

* Added schedulable flows to cordapp scanning

Fixed a bug where the core flows are included in every cordapp. Added a test to prove the scheduled flows are loaded correctly. Added scheduled flow support to cordapp.

Renabled broken test.

Fixed test to prove cordapps aren't retreived from network.

Review fixes.

Fixed a test issue caused by gradle having slightly different paths to IntelliJ

* Fixed test for real this time.

* Consistent use of CordaException and CordaRuntimeException (#1710)

* Custom exceptions in corda, should either derive from an appropriate closely related java exception, or CordaException, or CordaRuntimeException. They should not inherit just from Exception, or RuntimeException.

Handle PR comments

Add nicer constructors to CordaException and CordaRuntimeException

* Fix ambiguous defaulted constructor

* Add @suppress (#1725)

* Git-ignore Node Explorer config. (#1709)

* add message warning windows users they might need to manually kill explorer demo nodes started by gradle (#1717) (#1726)

* Misc documentation fixes (#1694)

(cherry picked from commit 592896f)

* Document -parameters compiler arg for Java CorDapps. (#1712)

* Correct non-anonymous two party trade flow (#1731)

* Parameterize TwoPartyTradeFlowTests to confirm deanonymised functionality works.
* Correct handling of counterparty using well known identity in TWoPartyTradeFlow

* CORDA-594 - SIMM Demo doc update (#1723) (#1735)

* CORDA-594 - SIMM Demo doc update

For V1 write a series of JSON / curl commands a user can follow to run
the demo

* Review Comments

* Updated the rationale behind as to why SIMM was introduced.

* typo

* Cordapps now have a name field. (#1664)

Corrected cordapp name generation.

Added changelog entry.

* Small API fixes against M16 (#1737)

* Move CompositeSignaturesWithKeys into net.corda.core.crypto package.

(cherry picked from commit 8f29562)

* Rename and move CordaPluginRegistry to reflect its real purpose now.
Simplify serialization code a bit.

(cherry picked from commit e2ecd3a)

* Docs: docsite improvements

* Remove discussion of webserver from 'writing a cordapp' page.
* Fixup some flow docs.
* Add a couple more package descriptions.

(cherry picked from commit 2aedc43)

* Review comments

(cherry picked from commit ba1d007)

* Review comments - always apply default whitelist and no longer load it via ServiceLoader

(cherry picked from commit 7d4d7bb)

* Added wording about renaming services resource file

* Update corda version tag to 1.0.0-RC4 (#1734)

* Update corda version tag to 1.0.0-RC3

* Update corda version tag to 1.0.0-RC4

* Update build.gradle

* V1 tests and fixes for the ContractConstraints work (#1739)

* V1 tests and fixes for the ContractConstraints work

* More fixes.

* Added a contract constraints section to the key concepts doc. (#1704)

Documentation for contract constraints.

Added to index.

Review fixes round 1.

More review fixes.

Review fixes.

Explained package contents.

review fixes.

Addressed RGB's final review comments.

Updated source code type to 'java'

* Fixes dead links. (#1749)

* Update gradle plugins version to 1.0.0 (#1753)

* Update Readme (#1756)

* Update Readme

Minor tweaks to Readme -- consistent capitalisation and more descriptive list of features (also reordered to put the important things first)

* Copied master readme.

* Update Readme

Minor tweaks to Readme -- consistent capitalisation and more descriptive list of features (also reordered to put the important things first)

* Fixes .rst formatting. (#1751)

* Updates tutorials. (#1649)

* Updates tutorials.

* Addresses review comments.

* Tutorial refresh for v1.0 and moving of code into separate files. (#1758)

* Moves code sections in tutorials to code files.

* Removes wallet references.

* Updates repo layout doc.

* Removes remaining cordapp-tutorial references, replaced with cordapp-example.

* Fixes broken link.

* Misc docs fixes.

* Refreshes the ServiceHub and rpc ops api pages.

* Updates the cheat sheet.

* Updates cookbooks.

* Refreshes the running-a-notary tutorial.

* Updates flow-testing tutorial

* Updates tear-offs tutorial.

* Refreshes integration-testing tutorial.

* Updates to contract tutorial and accompanying code to bring inline with V1 release.

* Refreshes contract-upgrade tutorial.

* Fixed broken code sample in "writing a contract" and updated contracts dsl.

* Added contract ref to java code. Fixed broken rst markup.

* Updates transaction-building tutorial.

* Updates the client-rpc and flow-state-machines tutorials.

* Updates the oracles tutorial.

* Amended country in X500 names from "UK" to "GB"

* Update FlowCookbook.kt

* Amended cheatsheet. Minor update on contract upgrades tutoraial.

* Added `extraCordappPackagesToScan` to node driver.

* Changes to match new function signature.

* Update to reflect change in location of cash contract name.

* CORDA-670: Correct scanned packages in network visualiser (#1763)

* Add CorDapp dependency of IRS to network visualiser

* Set CorDapp directories

* Checking out the latest milestone will no longer be required. (#1761)

* Updated documentation indices (#1754)

* Update documentation indices.

* Reference a moveable tag for V1 docs.
Remove redundant warning text.

* Reverted proposed usage of new docs release tag

* Minor: print a deprecation warning when the web server starts. (#1767)

* Release and upgrade notes for V1.0 (#1736)

* Release and upgrade notes for V1.0

* Update changelog.rst

* Update changelog.rst

* Formatting.

* Incorporating review feedback from KB and MN.

* "guarantee" instead of "promise"

* Updated with final review comments from KB and RGB.

* Updated upgrade notes to describe migration from removed CordaPluginRegistry.

* Minor clarification.

* Minor updates following final RGB feedback.

* Kat's further pedantic feedback

* Minor changes following feedback from KB.

* Incorporating review feedback from MH.

* killed 'patent-pending'

* Made the visualiser into a regular JVM module - not a CorDapp. (#1771)

* Docs: more package descriptions and take non-stabilised APIs out of the docs build. (#1775)

* Update corda version tag to 1.0.0

* Updated release notes to fix minor typos (#1779)

Fixed bold type on simplified annotation driven scanning bullet and added bold type to module name bullets

* Fixed drop down.. probably. (#1780)

* fixed formatting for release notes. (#1782)

* Improve API page wording (#1784)

* Removed "unreleased" sections from the release notes and change log.

* Merge remote-tracking branch 'origin/release-V1' into colljos-merge-v1-docs

# Conflicts:
#	build.gradle
#	client/jfx/src/main/kotlin/net/corda/client/jfx/model/NodeMonitorModel.kt
#	client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt
#	client/rpc/src/main/kotlin/net/corda/client/rpc/PermissionException.kt
#	constants.properties
#	core/src/main/kotlin/net/corda/core/flows/FlowSession.kt
#	core/src/test/kotlin/net/corda/core/contracts/DummyContractV2Tests.kt
#	core/src/test/kotlin/net/corda/core/flows/ContractUpgradeFlowTest.kt
#	docs/source/api-flows.rst
#	docs/source/api-index.rst
#	docs/source/changelog.rst
#	docs/source/example-code/src/main/java/net/corda/docs/java/tutorial/testdsl/CommercialPaperTest.java
#	docs/source/example-code/src/main/kotlin/net/corda/docs/FlowCookbook.kt
#	docs/source/example-code/src/main/kotlin/net/corda/docs/tutorial/contract/TutorialContract.kt
#	docs/source/example-code/src/main/kotlin/net/corda/docs/tutorial/testdsl/TutorialTestDSL.kt
#	docs/source/hello-world-state.rst
#	docs/source/key-concepts-contract-constraints.rst
#	docs/source/serialization.rst
#	docs/source/tut-two-party-flow.rst
#	docs/source/tutorial-tear-offs.rst
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/CordaClassResolver.kt
#	node-api/src/test/java/net/corda/nodeapi/internal/serialization/ForbiddenLambdaSerializationTests.java
#	node-api/src/test/java/net/corda/nodeapi/internal/serialization/LambdaCheckpointSerializationTest.java
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.kt
#	node/src/integration-test/kotlin/net/corda/services/messaging/MQSecurityTest.kt
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
#	node/src/test/kotlin/net/corda/node/internal/cordapp/CordappLoaderTest.kt
#	node/src/test/kotlin/net/corda/node/services/NotaryChangeTests.kt
#	samples/attachment-demo/src/main/kotlin/net/corda/attachmentdemo/AttachmentDemo.kt
#	samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemo.kt
#	testing/node-driver/src/integration-test/kotlin/net/corda/testing/FlowStackSnapshotTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
#	webserver/src/main/kotlin/net/corda/webserver/internal/NodeWebServer.kt
2017-10-03 17:32:11 +01:00
Clinton
e6e3c29d74 Fixed a few instances of waitUntilNetworkReady() to fix flaky tests. (#1785) 2017-10-03 14:31:36 +01:00
Shams Asari
457f95f188 Removed the network map service type as it's no longer needed.
The absence or presence of the networkMapService config is what determines if a node is the network map or not.
2017-10-03 11:32:37 +01:00
Rick Parker
9a16011448 * Move CompositeSignaturesWithKeys into net.corda.core.crypto package.
* Rename and move CordaPluginRegistry to reflect its real purpose now.
* Docs: docsite improvements
* Remove discussion of webserver from 'writing a cordapp' page.
* Fixup some flow docs.
* Add a couple more package descriptions.
* Review comments - always apply default whitelist and no longer load it via ServiceLoader
* Added wording about renaming services resource file
2017-10-02 16:03:07 +01:00
Viktor Kolomeyko
383eb2bef8 CORDA-540: Fix to make IRS demo code pass in AMQP mode (#1769)
* CORDA-540: Do not use concrete instance of an ArrayList as wire representation of it may be different

* CORDA-540: Make data structures suitable for AMQP serialization

* CORDA-540: Use "name" instead of "toString()"

Classes like "net.corda.finance.contracts.DayCountBasisDay" override "toString()" which leads to error behaviour
2017-10-02 15:59:31 +01:00