Commit Graph

597 Commits

Author SHA1 Message Date
Tommy Lillehagen
dd329c860c CORDA-878 - Update IRS demo instructions 2018-01-03 14:19:03 +00:00
Maksymilian Pawlak
5c85e80b17 Restoring apparently missing SIMM demo documentation (#2293)
(cherry picked from commit 2e84bad)
2018-01-02 16:48:08 +00:00
Maksymilian Pawlak
b8421e5028
Increase memory allowance for SIMM demo to pass with external DB on MacOS (#2303) 2018-01-02 09:56:26 +00:00
Shams Asari
4a2f157118
Validating the entire cert path in node registration, rather just checking the root cert. (#2298)
Also reduced duplicate code when creating the node CA cert path for testing, and renamed IdentityGenerator to DevIdentityGenerator.
2017-12-29 14:38:30 +00:00
Shams Asari
39d25958e2
Fixed identity generation of single node notaries as used by the driver and MockNetwork. (#2296)
The identity cert generated used to be of type SERVICE_IDENTITY when it should have been a LEGAL_IDENTITY.
2017-12-28 15:32:09 +00:00
Maksymilian Pawlak
5ce873a6e4 Removed unparseable % sign (#2294)
(cherry picked from commit f05de54)
2017-12-28 09:13:57 +00:00
Maksymilian Pawlak
f8f5639b38 More descriptive error message (#2295) 2017-12-28 09:12:06 +00:00
Shams Asari
e1e715ee81 Removed all remaining special treatment of the X500 common name.
With network parameters the CN is no longer needed to identify notaries. This frees it up to be used in the node's name alongside the other attributes.

Also, the identity generation logic has been simplified, removing the need to have magic string values for storing distributed identities in the keystore. Now there are just two alias prefixes: "identity" as it was previously, and "distributed-notary".
2017-12-18 21:39:11 +00:00
Andrzej Cichocki
8114a20abd
CORDA-716 Move non-API things to internal (#2256) 2017-12-17 18:44:35 +00:00
Andrzej Cichocki
2652ae111a
CORDA-716 Devrel feedback (#2266)
* * Document TestIdentity entropy and enforce that it actually works
* Ledger/transaction DSL default notary with fresh key
* MockServices default identity with fresh key
* makeTestIdentityService now takes vararg
* Require cordappPackages for MockServices
* DSL automatic serialization init
* Improve error when two MockNetworks used

* * Make cordappPackages required by MockNetwork
* Default identity service in MockServices
* Make notarySpecs Java-friendly
2017-12-15 19:18:31 +00:00
Katelyn Baker
8dfe377ae1 Corda-862 - Fix notary demo for AMQP 2017-12-15 10:13:18 +00:00
Andrzej Cichocki
05bc05a936
CORDA-716 Retire withTestSerialization (#2240) 2017-12-14 12:42:18 +00:00
Shams Asari
2319bf396c Renamed TestIdentity.key to keyPair and pubkey to publicKey (#2249) 2017-12-14 11:30:55 +00:00
Andrzej Cichocki
c3b9955344
CORDA-716 Fix split packages in testing (#2232) 2017-12-12 19:37:01 +00:00
Andrzej Cichocki
905c8252a6
CORDA-654 Remaining key constants (#2226) 2017-12-12 18:03:06 +00:00
Andrzej Cichocki
08bbf9061e
Introduce TestIdentity. (#2217) 2017-12-12 15:52:05 +00:00
Maksymilian Pawlak
537e304536
IRS demo permissions fix (#2231) 2017-12-12 13:56:12 +00:00
Tommy Lillehagen
64c0d41a5d ENT-1237 Fix run script for IRS Demo web apps 2017-12-12 11:47:14 +00:00
Shams Asari
6d6393d984 Merge branch 'feature-network-parameters' into shams-merge-feature-network-parameters 2017-12-11 21:10:34 +00:00
Andrzej Cichocki
d8c7f0ae23
Inline DUMMY_CASH/OBLIGATION_ISSUER. (#2214) 2017-12-11 16:17:20 +00:00
Andrzej Cichocki
544e19e277
CORDA-654 Remove key constants from NodeTestUtils (#2205)
* DUMMY_NOTARY was hiding in a couple more places
2017-12-11 11:44:01 +00:00
Katelyn Baker
4b5c60637c
Merge pull request #2017 from corda/kat/feature/enableAMQP
CORDA-780 - Enable AMQP for P2P and Storage Contexts
2017-12-11 11:37:16 +00:00
Shams Asari
41bfd7a971 Merge fixes 2017-12-10 20:15:33 +00:00
Shams Asari
65ff931f53 Merge branch 'master' into shams-master-merge-081217
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreWrapper.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/test/kotlin/net/corda/node/services/identity/InMemoryIdentityServiceTests.kt
#	node/src/test/kotlin/net/corda/node/services/identity/PersistentIdentityServiceTests.kt
#	samples/irs-demo/src/integration-test/kotlin/net/corda/test/spring/SpringDriver.kt
#	testing/node-driver/src/integration-test/kotlin/net/corda/testing/driver/DriverTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/DriverDSL.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/NodeBasedTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/RPCDriver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/CoreTestUtils.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-08 16:03:16 +00:00
Shams Asari
db9eb8a63f Preliminary work to make merge with master manageable 2017-12-08 13:39:05 +00:00
Andrzej Cichocki
32ea59d085
Inline some DUMMY constants. (#2200) 2017-12-08 10:45:22 +00:00
Katelyn Baker
8878fa99a0 CORDA-553 - Remove CordaCustomSerializer annotation
It isn't actually needed as we can scan the jar for classes implementing
the interface.
2017-12-07 21:15:33 +00:00
Katelyn Baker
fcec60e232 CORDA-786 - Use reflection to infer proxy and proxied types in CorDapp custom serializers
This removes any need for the user implement and override types from the
super class

    * CORDA-786 - Docs update
    * CORDA-786 - Remove unneeded second annotation on the proxy objects
    * Fix merge conflicts
2017-12-07 21:15:14 +00:00
Katelyn Baker
d25b7f560c CORDA-786 - Genericise the CorDapp Proxy 2017-12-07 21:15:14 +00:00
Katelyn Baker
81eb0c1898 CORDA-780 / CORDA-786 - Enable AMQP for P2P and Storage Contexts
Add plugable mechanism for CorDapps such that they can add their own
custom serializers
2017-12-07 21:13:59 +00:00
Andrzej Cichocki
c36bea3af5
CORDA-654 MockServices no longer has hard-coded identities (#2192)
* Resurrect a test
* Fix a broken test
* Pass in the initial identity
* Make IdentityService easier to mock
2017-12-07 11:55:18 +00:00
Shams Asari
8461837f1a Cleaned up Driver.kt so that only the relevant bits are exposed as public API 2017-12-05 23:52:15 +00:00
Andrzej Cichocki
e4d76204c1
Pass some key constants into MockServices. (#2173) 2017-12-05 14:50:56 +00:00
Shams Asari
4374c32a75 HttpUtils methods now throw an IOException when a request isn't successful, rather than returning a Boolean. This has been the cause of previous bugs as people forget to check for the false case. 2017-12-04 21:50:19 +00:00
Shams Asari
66515d24b5 Merge fixes and fix to attachment demo 2017-12-04 14:35:03 +00:00
Shams Asari
6a1aa59e3e Merge branch 'master' into shams-merge-master-041217
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/services/DistributedServiceTests.kt
#	samples/bank-of-corda-demo/src/main/kotlin/net/corda/bank/BankOfCordaCordform.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/NodeBasedTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/NotarySpec.kt
#	verifier/src/integration-test/kotlin/net/corda/verifier/VerifierDriver.kt
2017-12-04 13:39:32 +00:00
Shams Asari
5264072752 Renamed n.c.nodeapi.config to n.c.nodeapi.internal.config as that config code is not public API. For the same reason, also moved User into the same internal package. 2017-12-03 17:20:30 +00:00
Katarzyna Streich
6958cbbc44
Fix demobench as part of network parameters work (#2148)
* Fix demobench - network parameters

Demobench uses ServiceIdentityGenerator to pregenerate notary identity
for network parameters.
2017-12-01 16:14:03 +00:00
Andrzej Cichocki
a314a6a125
CORDA-654 Simplify TransactionDSL API (#2152) 2017-11-30 16:28:44 +00:00
Shams Asari
fdc31091a6 Merge branch 'feature-network-parameters' into shams-master-merge-291117
# Conflicts:
#	constants.properties
#	gradle-plugins/cordformation/src/main/kotlin/net/corda/plugins/Cordform.kt
#	gradle-plugins/cordformation/src/main/kotlin/net/corda/plugins/Node.kt
2017-11-30 12:05:42 +00:00
Shams Asari
2f0bc249ad Merge fixes and getting tests to pass 2017-11-30 11:59:39 +00:00
Katarzyna Streich
c9f3e98795
Another approach to fixing deployNodes task and network parameters generation (#2066)
* Generate networkParameteres for Cordformation.

Fix deployNodes task in Cordformation to generate NetworkParameters before running the nodes.
Add TestNetworkParametersGenerator utility loaded after node infos generation step.

* Get rid of bouncy castle provider dependency
For cordform-common. It caused problems with loading our custom
X509EdDSAEngine for generation of network parameters in deployNodes
task.
2017-11-30 10:39:29 +00:00
Shams Asari
71763ff1d3 Merge branch 'master' into shams-master-merge-291117
# Conflicts:
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/network/PersistentNetworkMapCache.kt
#	node/src/test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTests.kt
#	samples/notary-demo/src/main/kotlin/net/corda/notarydemo/BFTNotaryCordform.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/internal/demorun/DemoRunner.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt
2017-11-29 18:00:16 +00:00
Shams Asari
b638b30d2a Moved CordaPersistence and dependent classes into internal package in node-api. This is so that the doorman can make use of them without needing a compile dependency to node. 2017-11-29 17:14:05 +00:00
Shams Asari
5c53a91785 Overhaul of the Bank of Corda demo to fix two problems it had:
1. The runRPCCashIssue and runWebCashIssue gradle tasks didn't work because they were using the wrong ports
2. Notary lookup was failing because the lookup name didn't include the correct CN for the notary name (this slipped through when reverting the network parameters)

The ports change occurred in #1922 which was attempting the fix the runIssuer gradle task. This is actually a misleading and redundant task as all it does is start up the nodes, which is what the documented deployNodes already does. The ports runIssuer allocated to the nodes were different to the ones specified in deployNodes.

To make sure we have integration tests which closely match deployNodes, the BoC demo has been updated to make use of CordformDefinition. This keeps the node definitions in one place, removing the need to have disparate files in sync. runIssuer has been removed.
2017-11-29 14:48:05 +00:00
Andrzej Cichocki
dbe2dca7b9
CORDA-654 Make VaultFiller a class so I can change its hardcoded bits (#2141) 2017-11-29 09:49:34 +00:00
Andrzej Cichocki
4bd6fef0f9
StateMachineManager is no longer lateinit. (#2123) 2017-11-27 17:55:08 +00:00
Shams Asari
9fefabbb88 Merge branch 'master' into shams-master-merge-271117 2017-11-27 17:08:13 +00:00
Shams Asari
1705df4d1f Made the database config option typesafe, rather than relying on String properties 2017-11-27 13:51:53 +00:00
Andrzej Cichocki
449155cea3
IdentityService is no longer obtained lazily. (#2130) 2017-11-27 12:34:33 +00:00
Shams Asari
9097107d2e Revert "Revert "Introducing network parameters.""
This reverts commit 953a4a3790.
2017-11-21 15:05:24 +00:00
Michele Sollecito
37b4d0e939
Fixed some permission issues with demos. (#2099) 2017-11-21 11:20:17 +00:00
Andrzej Cichocki
f26aa33553
Introduce contextLogger (#2085)
* Revert with comment, probably lazy for a reason.
2017-11-20 11:31:08 +00:00
Ross Nicoll
19aba62fc6
Move tests to using named identities (#1879)
Move tests to using named identities in preparation for multiple identities work. Includes:

* NetworkMapCacheTest
* NodeInterestRatesTest
* NodeVaultServiceTest
* ContractUpgradeFlowTest
* Cash tests
* AttachmentSerializationTest
* CordaRPCOpsImplTest
* VaultWithCashTest
* ScheduledFlowTests
2017-11-17 14:16:17 +00:00
Shams Asari
953a4a3790 Revert "Introducing network parameters."
This reverts commit d04e487
2017-11-17 10:04:38 +00:00
Ross Nicoll
e4f5e16bf4
Clean up identities in tests, stage 1 (#2059)
* Clean up identities in CashTests so that the mini/mega corp keys and identities are correctly
paired together throughout. Previously `miniCorpServices` presented the same key as the
MegaCorp identity, but with the name Mini Corp attached.
* Correct key/name matches in VaultWithCashTest
* Split services in CashTests to not have multiple identities per service hub
2017-11-16 17:17:45 +00:00
Michele Sollecito
92c8861802
[CORDA-760]: Propagate invocation context across the codebase. (#2016) 2017-11-15 14:58:43 +00:00
Shams Asari
2fe41715cc On exit, the driver will automaticallly shutdown any nodes which weren't waited for.
The motivation for this came with the recent change that a default notary is started by the driver, which if ignored will leak the notary process.

Also, waitForAllNodesToFinish() has been replaced by a driver parameter.
2017-11-14 20:20:00 +00:00
Andrzej Cichocki
6a569fb3f1
Retire findTokenizableService. (#2036) 2017-11-10 16:40:18 +00:00
Andrzej Cichocki
052124bbe0
CORDA-716 Make serialization init less static (#1996) 2017-11-10 15:44:43 +00:00
Christian Sailer
449a714478
Merge pull request #1999 from corda/christians_fix_irs-demo-deploy
IRS demo gradle files
2017-11-10 11:26:40 +00:00
Andrzej Cichocki
6b71c6cf75
Retire some initialiseSerialization booleans. (#2019) 2017-11-10 10:15:55 +00:00
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
Christian Sailer
1b332e2cb3 Add extra version pinning for spring.boot gradle plug-in 2017-11-06 14:34:09 +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
Christian Sailer
68481765e1 Clean up build gradle files 2017-11-03 16:16:23 +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