Commit Graph

49 Commits

Author SHA1 Message Date
Shams Asari
62b26bcd89 Moved Currency stuff in ContractsDSL out of core and into finance 2017-08-15 18:08:02 +01:00
Andrzej Cichocki
3a3ead2dfe Remove ListenableFuture from core/main (#1030) 2017-08-07 14:31:24 +01:00
josecoll
64ba8d3a88 Updated samples and demos to use new Vault Query service. (#924)
* Updated all sample code to use new Vault Query service APIs.

* Fix broken Unit test.

* Added missing transaction boundary.

* Fix broken ScheduledFlow test (caused by assertion on non-ordered collection)

* Remove redundant negative test (as new Vault Query no longer returns iterators).

* Whitespace formatting fixed following PR review from SA.

* Force query to specify a PAGE SIZE equivalent to total states to be exited (RP review comment).

* Use single (and fail fast) instead of first - when only expecting a single result.

* Demonstrate paging and sorting; failfast on single expected result.

* Enhancement: added Sorting by CommonStateAttribute (StateRef txnId and index)

* Fix: incorrect total states count.

* Fixed incorrect total states counting.

* Remove redundant filter (UNCONSUMED).

* Updated tutorial code and associated documentation (building transactions).

* Updated all vaultAndUpdates to vault[Track|Query]By.

* Temporary disable failing Vault Query tests (awaiting pagination PR fix).

* Rebase from master to pick up pagination changes/fix.

* Fixed criteria filter on track.

* Cleanup redundant print output.

* Refactor to extract common function for Vault Query paging and sorting.

* Identified problem in SimmValuation demo failing test caused by query by single participant in participants list (not yet supported in VaultQuery criteria).

* Minor fixes following rebase from master.

* Minor updates following rebase.

* Removed redundant import.

* Fixed type casting error.

* Minor fixes following rebase from master.

* VQ Fix - applied in other PR.

* Removed duplication after rebase and minor fix to failing smoke test.
2017-08-03 11:47:15 +01:00
Shams Asari
4312dc0771 Resolved all non-deprecation warnings 2017-08-02 12:17:52 +01:00
Ross Nicoll
2c62f8968a Sample corrections for M14
* Update node configurations to match changes to test constants
* Look up notary via RPC in attachment demo rather than using the static identity to ensure the correct key is resolved
* Use notary service identity instead of legal identity in Bank of Corda demo
* Correct typo in deprecation annotation in CordaRPCOps
* Update from deprecated calls to new equivalents
2017-08-01 13:59:20 +01:00
Ross Nicoll
b6902aada6 Use notary identity in Bank of Corda demo
Resolve notary identity via node identity in Bank of Corda demo.
2017-07-20 15:28:09 +01:00
Matthew Nesbit
7a06d941c4 Put Services.kt in clear files, so that at a glance people can see what public services there are.
Fix include

Correct doc links after code movement
2017-07-17 09:34:07 +01:00
Ross Nicoll
773aa28873 Clean up IssuerFlow
* Switch to using anonymous party as recipient
* Enable anonymisation for issuance as well as move in issuer flows.
* Pass notary into issuer flow rather than taking a notary at random from the network map.
* Enable anonymisation in Bank of Corda RPC test
* Parameterize issuer flow tests into anonymous and deanonymised versions
2017-07-13 11:23:56 +01:00
Ross Nicoll
d6d5edc33b Check vault updates in IssuerFlowTest
Modify issuer flow test to verify the consumed/produced states, rather than just checking the transaction matches the value returned via the flow state machine. This is both a simpler and more relevant test.
2017-07-11 15:30:21 +01:00
Andrzej Cichocki
cefa14507a Retire HostAndPort (#962)
* Don't attempt to parse a resolved InetSocketAddress toString
* A mock node isn't reachable via an address
2017-07-07 15:11:07 +01:00
Shams Asari
8f1529b863 Moved ByteArrays.kt to core.utilities 2017-07-06 17:58:18 +01:00
Shams Asari
2973755bc8 Moved TestConstants.kt from core into test-utils 2017-07-05 11:54:43 +01:00
Ross Nicoll
1a4965c294 Change CashIssueFlow to use anonymous identity
* Add functions for:
    * Retrieving nodes via their legal identity
    * Filtering a set of public keys down to those the node has corresponding private keys for
* Modify contract upgrade flows to handle identifying participants after an anomymisation step
* Correct terminology: "party who" -> "party which"
* Modify CashIssueFlow and CashPaymentFlow to optionally use an anonymous identity for the recipient.
2017-06-28 13:47:50 +01:00
Ross Nicoll
19ff72a411 Correct ISO country code in names 2017-06-21 14:04:22 +01:00
szymonsztuka
4195adfb7b Move Web API from CordaPluginRegistry to new class WebPluginRegistry (#864)
Move Web API from CordaPluginRegistry to new class WebPluginRegistry
2017-06-20 15:29:35 +01:00
Shams Asari
b52d3706eb Moved Driver.kt to net.corda.testing.driver in the test-utils module 2017-06-14 15:12:39 +01:00
Katarzyna Streich
54ee708b27 Fix bank of corda demo (#787)
* Small fix in Bank Of Corda demo, move Notary to Zurich so it's better displayed.
Add CashExitFlow permission to Bank Of Corda node.

* Changes in running-the-demos documentation.
2017-06-06 12:01:32 +01:00
Shams Asari
329e5ff17b Introducing InitiatedBy annotation to be used on initiated flows to simplify flow registration.
This removes the need to do manual registration using the PluginServiceHub. As a result CordaPluginRegistry.servicePlugins is no longer needed. For oracles and services there is a CorDappService annotation.

I've also fixed the InitiatingFlow annotation such that client flows can be customised (sub-typed) without it breaking the flow sessions.
2017-05-31 10:50:16 +01:00
Konstantinos Chalkias
9f2b44f8f7 Rename Timestamp to TimeWindow (#706)
Rename Timestamp to TimeWindow + refactoring
2017-05-25 13:18:49 +01:00
Shams Asari
48f58b6dbc Introducing StartableByRPC and SchedulableFlow annotations, needed by flows started via RPC and schedulable flows respectively.
CordaPluginRegistry.requiredFlows is no longer needed as a result.
2017-05-11 14:55:40 +01:00
Ross Nicoll
e4a0bc6e11 Move party classes into identity package
Move AbstractParty, AnonymousParty and Party into a new net.corda.core.identity package,
as they're not really cryptography tools, and in preparation for further code coming in
for identity.

Optimize imports on many files to clean up the resulting refactor.
2017-05-11 11:25:59 +01:00
Andras Slemmer
de88ad4f40 RPC muxing, multithreading, RPC driver, performance tests 2017-05-05 17:10:52 +01:00
Ross Nicoll
25dbac0f07 Change party to hold an X.500 name
Change the legal name of parties to be an X500 name. This ensures that we aren't converting between
common names and X500 names in various places, eliminating substantial scope for error in the conversion
process. As a result, all node names must now be full X500 names, which has impact on most configurations.
2017-05-05 16:13:29 +01:00
Chris Rankin
e22ad19fcd Use assert methods from test framework. Don't use Java assert. (#625) 2017-05-03 17:32:30 +01:00
Ross Nicoll
d65d63e4f6 Interim patch introducing X500Names
This is an intermediary step to introducing X500Names in all Party instances, which adds:

* Party constructor which accepts X500Name and then converts it to string.
* startNode() function which takes in X500Name instead of String
* Numerous legal name fixes to use full distinguished names
2017-05-03 10:46:03 +01:00
Ross Nicoll
684d1089f0 Introduce full legal names for test parties
Use full names for test parties, ahead of complete X.500 name support.
2017-04-24 15:18:21 +01:00
Andrzej Cichocki
160d13b6f7 Prohibit Java deserialisation in the Corda process (#566) 2017-04-21 16:26:35 +01:00
Ross Nicoll
d35bd74596 Standardise identities used in tests, demos, etc.
Standaridise the identity names of Alice, Bob and Charlie, notary, map service, etc. in order
to ensure consistency across the code base and reduce number of places that have to be changed
to introduce proper X.500 names.

Move Alice, Bob & Charlie identities into the utilities package so they can be used in demos
2017-04-12 11:40:48 +01:00
Mike Hearn
0c0c5521c0 Minor: address more formatting issues spotted by Shams 2017-04-11 15:53:05 +02:00
Mike Hearn
9948815df1 Minor: auto-format of module: samples 2017-04-11 15:53:05 +02:00
Qian Hong
d9a1e352cd Bank of Corda demo: Fix broken RPC client test. 2017-03-28 09:53:42 +02:00
Chris Rankin
98266da41c Refactor CordaRPCClient into new :client:rpc Gradle module. (#405)
* CORDA-305: Refactor CordaRPCClient into :client:rpc module

* CORDA-305: Remove the Kotlin test framework from the artifacts.

* CORDA-305: Migrate serialisation whitelist into node-api module.

* CORDA-305: Clean up unused RPC observables.

* CORDA-305: Add :client:rpc module to documentation tasks.

* CORDA-305: Include :finance into :client:rpc for its serialisable classes.

* CORDA-305: Move test classes into the correct directory.

* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.

* CORDA-305: Update wording of TODO about handling Observables.
2017-03-22 15:52:54 +00:00
Ross Nicoll
486368d926 Clean up messaging/RPC port configuration and docs (#296)
* Non-ssl artemis acceptor for RPC connection. (#271)

* New non-ssl acceptor in artemis server for RPC connection.

* Rename artemisAddress with messagingAddress

Rename artemisAddress with messagingAddress so that the node configuration file properties match
the code variable names.
Rename artemisPort to messagingPort in Gradle configuration to match node configuration naming.

* Add rpcPort configuration option for Gradle

* Update docs to reflect changes to RPC port configuration

* Renumber ports in example CorDapp to match numbering used elsewhere

* Restructure upgrade guide

* added config file checks on corda startup to make the upgrade path a bit smoother.
2017-03-17 10:32:14 +00:00
Ross Nicoll
b5ba070301 Revert "Non-ssl artemis acceptor for RPC connection. (#271)"
This reverts commit f0d82e4918.
2017-03-06 14:03:23 +00:00
Patrick Kuo
f0d82e4918 Non-ssl artemis acceptor for RPC connection. (#271)
* New non-ssl acceptor in artemis server for RPC connection.
2017-02-24 15:36:36 +00:00
Ross Nicoll
9055c9d9b0 Split CashFlow into three flows
Split CashFlow into independent CashIssueFlow, CashExitFlow and CashPaymentFlow,
so that users can be given access to one but not the other(s).

Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
2017-02-09 15:43:48 +00:00
Ross Nicoll
950cfd62e4 Split users for bank and big corp 2017-02-08 15:48:03 +00:00
Shams Asari
b86c80691e FlowException serialised over RPC (subtypes are flattened), and improvement to startFlow RPC for correct exception handling 2017-02-03 11:21:10 +00:00
Ross Nicoll
2f9af7d7dc Revert Party.Full in preference for a less invasive change 2017-02-02 13:47:32 +00:00
Ross Nicoll
1b86ddfd6e Replace Party with Party.Full
Replace Party with Party.Full as an interim step to introducing the Party.Anonymised class.

Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
2017-02-01 15:18:12 +00:00
Clinton Alexander
d2ebcbfab0 Fixed whitespace and formatting with IntelliJ autoformat tool. 2017-01-30 12:05:22 +00:00
Clinton Alexander
537ffae113 Moved file uploading to RPC interface. 2017-01-27 14:13:58 +00:00
Clinton Alexander
d4b6e32682 t # This is a combination of 5 commits.
Driver now queries webserver to ensure it has started.
2017-01-27 14:13:29 +00:00
Clinton Alexander
5f4d4c1da3 Moved the webserver code into the main node module. Driver can now start webserver for nodes. 2017-01-27 14:12:54 +00:00
josecoll
172be1301d Fixed incorrect configuration of Issuer node. (#136) 2017-01-10 17:07:09 +00:00
Shams Asari
59456cb6b1 Added a method to NodeHandle to simplify using RPC in the Driver 2017-01-06 14:14:32 +00:00
josecoll
eac2cb1cc6 Bank of Corda integration with Trader Demo and Explorer
Initial conversion of Explorer to use IssuerFlow (from BankOfCorda)

Initial conversion of TraderDemo to use IssuerFlow (from BankOfCorda)

Updated TraderDemo to use IssuerFlow (from BankOfCorda)

Fixed TraderDemo integration text (added new BankOfCorda node)

Updated Explorer with changes IssuerRequest params

Explorer now correctly displaying transaction id upon Issue.

Moved IssuerFlow into finance package so can be reused across multiple demos (TraderDemo) and applications (eg Explorer)

Refactored BankOfCorda demo to use Finance package and TestUtil constants

Updated TraderDemo to use IssuerFlow

Updated Explorer to use finance package IssuerFlow.

Advertised BankOfCorda as Issuer for usage by Explorer.

Explorer no longer depends on BankOfCorda demo since IssuerFlow promoted to Finance module

Added IssuerFlow to AbstractNode whitelist.
Explicit declarations of IssuerFlow no longer required.

Added plugin registration of IssuerFlow at bootstrap.

Revert whitelisting of IssuerFlow (plugin configured)

Refactored to use constant BOC definition.

Added gradle RPC security config.

Updated documentation

Fixed incorrect references.

Renamed Issuer banks.
Added new permission set (for Issuer nodes)
Added node nearestCity info
Added new Issuer Event Generator for Issuer nodes only

Associated currency with issuer using ServiceType naming structure.

Added argument flag (-S) to trigger event generator simulation node.

Fixed problem with issuers not resolving from network map.

Updated perms on Issuer rpc proxy nodes.

Fixed minor in cash generateExit identified by Explorer.

Changes applied in prep for AWG demo.

Added IntelliJ run-configurations for launching Explorer demo nodes (with and without simulation)

Updated documentation (and added additional gradle task to launch Explorer nodes in simulation mode).

Fix following rebase.

Addressed review items from PR.

Updated TraderDemo readme.

Updated TraderDemo gradle file to launch Bank of Corda node.

Updated JRE properties.

Updated IssuerModel to incorporate correct JFX Observable handling.
Fixed bug with Exit command not displaying any currency.

Added TODO's for revisiting correct Exception handling strategy.

Optimization for when issuing cash to self.

Minor updates following PR review.

Remove old refs to Royal Mint and Federal Reserve
2016-12-22 15:55:50 +00:00
Andras Slemmer
7ee88b6ec8 Add SMM test for round robin node picking 2016-12-15 11:36:06 +00:00
Jose Coll
453f7cd223 Bank of Corda demo - Issuer of Cash
Resolve BankOfCorda through NMS in protocol

Fixes following Integration testing.

Register custom RPC Kryo classes.

Protocol -> Flow renaming

Bank of Corda demo - Issuer of Cash

Resolve BankOfCorda through NMS in protocol

Fixes following Integration testing.

Protocol -> Flow renaming

Addressed all comments in PR review.

Removed bank lines.

Updated minor inconsistency in README.md

All protocol references changed to flow.

changed protocol -> flow in TODO comment.

changed startProtocolPermission -> startFlowPermission in README.md

Added transaction id to IssuerFlow Success response.
Removed explicit call to record Cash Move transaction (as already recorded in subflow)

Removed quasar dependency.

Addressed comment in PR.

Updated to use CompositeKey.

Added arguments to pass in Currency and Amount.

Updated run configurations to pass in Currency and Amount values

Added additional parameter to IssuerFlow request: issueToPartyReference

Added Vault updates verification in RPC Integration test.

Fixed RPC Integration test (Vault assertions)

Updated run-time dependencies in line with other demos.

Applied changes following PR review (exception handling, party resolution handling, docs)

Updated gradle client run configs with new parameters.

Main driver app now uses standard out for display (was using logger info() but nothing was being displayed because of restrictive config)

Fixed formatting display problems.

Updated Web Api code to use new CordaRPCOps interface (and new partyFromName() exposed method)

Removed unused import.
2016-12-08 17:38:21 +00:00