Commit Graph

153 Commits

Author SHA1 Message Date
Mike Hearn
67e6bbc068 Support overloads in the StringToMethodCallParser 2017-03-24 12:44:54 +01:00
Mike Hearn
68ff33549a Address review comments 2017-03-24 12:44:54 +01:00
Marek Skocovsky
262c87a5c6 Integrate CRaSH shell (SSHD). Joint effort between Mike Hearn and Marek Skocovsky.
The shell is embedded in the node and offers the ability to monitor
and control the node via the launching terminal.

Still to do:

* Switch to a fork of CRaSH that we can maintain ourselves, and merge in Marek's SSH patch so we can enable SSH access.
* Add persistent command history that survives restarts.
* Tab completion for the 'flow' and 'run' commands.
* Remove the 'jul' command and replace it with a command that lets you see and tail the log4j logs instead.
* Fix or remove the other crash commands that have bitrotted since 2015.
2017-03-24 12:44:54 +01:00
Chris Rankin
eaf9dad7c9 Remove junit-quickcheck from Corda because it is only used for testing. (#416) 2017-03-23 17:32:14 +00: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
Chris Rankin
9e43df36d3 Refactor :client module into :client:javafx and :client:mock (#388)
* CORDA-304: Refactor :client modules into :client:javafx and :client:mock.

* CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task.

* CORDA-304: Migrate DriverBasedTest from node into test-utils.

* CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate".

* CORDA-304: Rename module to ':client:jfx'.
2017-03-21 19:45:12 +00:00
Chris Rankin
18c57cf951 Merge DemoBench into Corda. (#380)
* Add basic spec for the demobench tool.

* Initial commit: Creating new tabs whenever the "Add Node" button is pressed. These tabs currently contain the bash shell only.

* Refactor shutdown code, although AWT is still misbehaving.

* Remove duplicate libpty native objects.

* Add initial form for configuring new nodes.

* Update to Corda 0.8-SNAPSHOT

* Patch JediTerm to allow the application to shutdown cleanly.

* Write configuration parameters into node.conf, and then run corda.jar in its own directory.

* The first node now becomes the session's Network Map service used by all other nodes. Force nodes to be created one-by-one.

* Trim node name and nearest city values.

* Fix logging location of corda.jar

* legalName field can be val.

* Allow configuration of extra network services.

* Launch DB viewer for node.

* Small tidy-up.

* Allow services to be loaded as a resources as well as a file.

* Include native artifacts in distribution.

* Add cash and issuer services to DemoBench.

* Configure Node and DemoBench to use same version of H2 database.

* Implement launching "Node Explorer" for each node.

* Create a capsule for Node Explorer, and allow login via command line parameters to bypass login screen.

* Simplify Kotlin objects.

* Include issuer for CHF (Swiss Francs)

* Fix SLF4J logging.

* Display simple statistics about the node on each tab.

* Add new RPC operation getCashBalances() to Node.

* Ensure demobench is built after explorer:capsule.

* Grant permissions to the Node's user, and install BanfOfCorda plugin for cash issuers.

* Initial inclusion of Corda and BankOfCorda JARs in distribution.

* Fix DemoBench distribution target.

* Add SLF4J binding for Log4J 2.x

* First batch of code review changes.

* More changes from review.

* Remove ".exe" from Java executable path, because Windows doesn't need it.

* Remove superfluous lamba parameter names.

* Better usage of Paths vs File API.

* Simplify the configuration object.

* Ensure a DemoBench installation is relocatable.

* Ensure that Node Explorer can write into its working directory.

* Disable Node Explorer and Database Viewer buttons until the node has launched and is responding to RPC.

* Only allow the first node to run notary services. And validate port numbers more strongly.

* Force all chosen port numbers to be different.

* Initial javapackager task: currently builds RPMs.

* Ensure JavaPackager task finds custom resources on the classpath.

* Move demobench.log into the user's demobench directory.

* Upgrade to Logback 1.1.10

* Make the javapackage task "more gradle" and "less ant".

* Display "0" balance for a node which has no cash balances at all.

* CORPRIV-665: Ensure tab closes if the node exits.

* CORPRIV-665: Protect against NPE

* CORPRIV-665: Protect harder against NPE

* CORPRIV-665: Protect NodeTerminalView from being destroyed twice.

* Initial custom resource script for Windows bundle.

* Take java executable from JRE.

* Allow Node Explorer to be relaunched.

* CORPRIV-658: Add gradle parameter "packageType" for javapackage task.

* Replace R3 logo with Corda logo.

* CORPRIV-658: Add icon file for Windows installer.

* CORPRIV-658: Add BAT file to create unsigned DemoBench.exe.

* CORPRIV-659: Add icon file for DMG package.

* Improve packaging information.

* CORPRIV-660: Allow user to launch Web server for each node.

* Tidy up gradle usage.

* Document provenance of jediterm-terminal-2.5.jar.

* Use "safe" casting operator.

* CORPRIV-659: Add bin/java to minimal JRE.

* CORPRIV-659: Basic shell script to package DemoBench as DMG.

* Add utility function for creating SLF4J loggers, and close unused I/O streams from forked processes.

* Switch from Runtime.exec() to ProcessBuilder.

* CORPRIV-660: Display Web server's port number on launch button.

* CORPRIV-661: Allow profiles to be loaded into DemoBench.

* Upgrade to TornadoFX 1.6.2.

* CORPRIV-661: Implement saving profiles.

* CORPRIV-661: Refactor code for guaranteeing a .zip extension.

* CORRIV-658: Add icon for Windows installer.

* CORPRIV-659: Update installer script and icons for DMG.

* CORPRIV-659: Tweak post-image script for DMG.

* CORPRIV-658: I've wasted enough time on this - Windows rejects this BMP
as invalid, and I have no idea why!?

* CORPRIV-658: Add external manifest for DemoBench.exe that declares it incapable of native HiDPI support.

* CORPRIV-661: Ensure that we can rewrite saved profiles correctly.

* Fix terminal resizing.

* CORPRIV-659: Fix DMG installer.

* CORPRIV-659: Better validation for JAVA_HOME.

* Downgrade JDK requirement to 8u102, for consistency with capsules.

* Comment how JediTerm is not available via Maven.

* CORPRIV-658: Rename packaging script.

* CORPRIV-659: Renaming packaging script.

* Comment file copying vs file filtering during packaging.

* Fixes from code review.

* CORPRIV-661: Ensure that nodes loaded from a profile have the correct network map service.

* Break textfield definitions out into separate functions.

* Fixes from code review.

* Code review tweaks.

* More code review tweaks.

* Another simple code review tweak.

* Replace companion object with a BiPredicate lambda.

* CORPRIV-664: Implement saving/loading of Cordapps with profiles.

* CORPRIV-664: Refactor saving/loading plugins.

* CORPRIV-664: Add initial unit tests for model.

* CORPRIV-664: Add simple unit tests for NodeController.

* CORPRIV-664: Unit test enhancements, e.g. configure JUL properly.

* CORPRIV-664: Use Suite instead of abstract test class.

* CORPRIV-664: Allow Cordapps to be loaded when each Node is configured.

* CORPRIV-664: Document which checked Java exceptions are thrown.

* Write JavaPackager output into build/javapackage directory.

* CORPRIV-664: Document more checked Java exceptions.

* Refactor Web and Explorer classes into their own packages.

* Declare WebServer and Explorer constructors as "internal".

* Update packaging scripts: tell user where the installer is!

* CORPRIV-659: Set "system menu bar" property for MacOSX.

* CORPRIV-661: Use "*.profile" for profile files.

* Remove unnecessary <children/> elements, as they are defaults.

* Fix build breakage when on Windows.

* Tweaks for EXE packaging script.

* Change function to extension function.

* Merged in corpriv-702 (pull request #25)

CORPRIV-702: Sign the DMG with a 'Developer ID Application' certificate.

* CORPRIV-702: Sign the DMG with a 'Mac Developer' certificate.

* CORPRIV-702: Use "Developer ID Application" certificate instead. And now JavaPackager signs the application, which means that we only need to resign our embedded JVM.

* CORPRIV-702: Update comment better to explain why JRE must be resigned.

Approved-by: Mike Hearn

* Exclude old version of Javassist in favour of Hibernate's version from Node. (#320)

* Exclude old version of Javassist in favour of Hibernate's version.

* Comment why we are excluding javassist:javassist, and add TODO for when junit-quickcheck 0.8 is released.

* CORDA-265: Implement "ALL" permission for RPC users. (#306)

* CORDA-265: Implement "ALL" permission for RPC users. Users with this permission in node.conf can use any flow.

* CORDA-265: Ensure that we always close the RPC proxy object after each test.

* CORDA-265: Refactor construction of dummy RPC client into an abstract base class.

* CORDA-265: Document RPC "ALL" permission.

* CORDA-266: Update DemoBench to be compatible with 0.10-SNAPSHOT.

* CORDA-268: Reimplement to work on both JDK8 and JDK9 (for now).

* CORDA-268: Copy java from $JAVA_HOME/bin as this also works on JDK > 8.

* Code review fixes.

* Use SLF4J's version of the commons-logging bindings. Only include SLF4J's Log4J back-end for actual applications, e.g. Node. (#350)

* Update with SLF4J change.

* CORDA-266: Update to latest node.conf format.

* Upgrade to H2 1.4.194. (#389)

- Timezone related fixes.
- A Turkish case canonicalisation bug.
- Fixes for some scary threading related bugs.
2017-03-21 14:24:13 +00:00
Mike Hearn
afbc8f9b5c De-issuerify the cash payment flow. This makes it easier to use the payment flow from the shell. 2017-03-20 15:14:28 +01:00
Andras Slemmer
d3f956ab60 Address PR 379 comments 2017-03-17 15:09:04 +00:00
Andras Slemmer
c3c1f3d801 Add :node-api, factor out some artemis code 2017-03-17 11:47:05 +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
Mike Hearn
b8a4c7bea3 Add a general string to method call parsing utility class to the Jackson module. It is useful for the shell work. 2017-03-15 19:01:22 +01:00
Mike Hearn
d576468a93 Minor: take out unused variable from Jackson party mapper. 2017-03-15 19:01:22 +01:00
Mike Hearn
2634e1673f JacksonSupport: add support for Amount<Currency> and OpaqueBytes 2017-03-15 19:01:22 +01:00
Mike Hearn
6d8ce50a41 Make Jackson module use the official java.time module instead of our own, add the Yaml dependency in prep for a future commit, remove the unnecessary dependency on node and the SecureHash hack no longer seems to be needed. 2017-03-15 19:01:22 +01:00
Andras Slemmer
31dc6e4b8f Merge pull request #338 from corda/aslemmer-generator-remove-any-constraint
Remove Any constraint from Generator type param
2017-03-13 18:05:24 +00:00
Chris Rankin
ba4cce36ab Use SLF4J's version of the commons-logging bindings. Only include SLF4J's Log4J back-end for actual applications, e.g. Node. (#350) 2017-03-13 15:57:17 +00:00
Andras Slemmer
c8b13b257f Remove Any constraint from Generator type param 2017-03-09 17:48:53 +00:00
Mike Hearn
ce0dcafb95 Document JSON/Jackson support 2017-03-08 12:31:22 +01:00
Mike Hearn
2628a10c51 Refactor the JSON support out into a separate module, :corda:jackson, as Jackson/JSON configuration is generally useful outside the context of web servers. 2017-03-08 12:31:22 +01:00
Andras Slemmer
f4f83325a7 client: Address PR 290 comments 2017-03-07 16:38:40 +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
dab80510f4 Fix not displaying Anonymous issuer name correctly in Explorer 2017-03-02 12:07:12 +00:00
Andras Slemmer
1532318ae7 client: Fix wrong pickN generator 2017-02-27 11:36:01 +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
Chris Rankin
221278197a Implement RPCOp getCashBalances(). 2017-02-22 13:57:15 +00:00
Ross Nicoll
98c30f6432 Remove CashFlow
Remove the CashFlow flow, replacing it with CashFlowCommand which can be used for the use-cases
with instructions passed around as an object.
2017-02-09 18:22:58 +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
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
Andras Slemmer
de63f90745 Add isRegisteredWithNetworkMap RPC, poll in Driver, expose RPC proxy 2017-02-02 10:54:50 +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
Patrick Kuo
7f96b752d1 Added reconnect capability to RPC (#192)
* Added reconnect capability to RPC
* Issue - https://github.com/corda/corda/issues/184
* JIRA - https://r3-cev.atlassian.net/browse/CORDA-189
2017-01-31 17:04:05 +00:00
Shams Asari
20fe0f32f2 Removed "Node" prefix from NodeSSLConfiguration and renamed two file properties to end in "File" 2017-01-23 15:46:36 +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
Mike Hearn
119d00c384 Upgrade dependencies and centralise some more version numbers in the root gradle file 2017-01-04 15:44:56 +01: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
Mike Hearn
eec16a41cf Minor: fix some compiler warnings and update some universal contract DSL code to use may as an infix function 2016-12-20 15:18:25 +01:00
Andras Slemmer
2f12f79f19 CashFlow progress tracking, remove unused clientToService stream 2016-12-20 10:20:37 +00:00
Andrius Dagys
7cb4cbcad4 Made vault updates contain full StateAndRef in the consumed set (instead of just StateRef). This allows subscribers to check whether the update contains relevant states.
Cash balances are now calculated by keeping only the aggregate values (it no longer needs to iterate through all states in the vault).
2016-12-15 16:27:39 +00:00
Andras Slemmer
66477a0955 Merge pull request #57 from corda/aslemmer-service-identity-sessions
Service identity sessions
2016-12-15 13:29:50 +00:00
Patrick Kuo
64732f8701 Client observable improvement (#56)
* merge foldToObservableList and foldToObservableMap to fold
* added a 1 second buffer to the rx observable subscription to batch up the incoming updates, to avoid flooding FX UI thread with runnable
* renamed GatheredTransactionDataModel to TransactionDataModel
2016-12-15 12:48:27 +00:00
exfalso
53bbb57345 Add ReceivedSessionMessage, DriverBasedTest re #57 2016-12-15 11:37:15 +00:00
Andras Slemmer
a3138ab0dc Address PR comments 2016-12-15 11:37:15 +00:00
Andras Slemmer
6a796cef35 Add raft notary integration tests, testing service addressing 2016-12-15 11:36:06 +00:00
Clinton
b43d940297 Merge pull request #35 from corda/clint-M6publishing
Corda can be published to bintray and reduced publishing boilerplate in build.gradle.
2016-12-09 15:07:46 +00:00
Andras Slemmer
a601f0abf5 Local RPC, demos use RPC, NODE has special privileges 2016-12-08 11:58:31 +00:00
Clinton Alexander
b24c628e34 Publications now publish JARs again. Install task now publishes again. 2016-12-06 16:06:16 +00:00
Clinton Alexander
bf49dda731 Corda now publishes with updated publish utils. 2016-12-06 16:06:16 +00:00
Clinton Alexander
dec9cfc5a4 Added client and node publishing. 2016-12-06 16:06:16 +00:00