Commit Graph

748 Commits

Author SHA1 Message Date
Mike Hearn
2cb02c75eb Minor: remove ANSI progress observer, delete some currently dead code in the shell. 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
Andrius Dagys
71fe3e3d3b Record a metric for duration and rate of execution for every flow (#372)
* Record a metric for the duration and rate of execution for every flow. This is useful for task intense scenarios to detect performance degradation.

* Measure both successful and failed flow durations
2017-03-22 16:52:41 +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
Ross Nicoll
7e0e7bc645 Fix warning in NodeAttachmentService 2017-03-22 12:20:29 +01: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
Andras Slemmer
7a9bc5bfad driver: Add ShutdownManager, make network map service optional 2017-03-21 18:08:21 +00:00
Mike Hearn
1243118aa9 Minor: more banking jokes, surround legal name in quotes 2017-03-21 18:01:17 +01:00
Mike Hearn
4c6548107a Minor: don't repeat the legal name of the node multiple times in the output (which causes indentation issues) 2017-03-21 18:01:17 +01:00
Shams Asari
209f5c8a25 Logging fixes, including broken --logging-level cmd line arg 2017-03-21 15:36:32 +00:00
Mike Hearn
0d54832d88 FlowSessionException is sent over RPC so must be serializable and documented. 2017-03-20 15:17:31 +01: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
4f6b44ceff Merge pull request #379 from corda/aslemmer-node-api
Add :node-api, factor out some artemis code
2017-03-20 13:31:21 +00:00
Chris Rankin
64fe92ce34 Upgrade to H2 1.4.194. (#389)
- Timezone related fixes.
- A Turkish case canonicalisation bug.
- Fixes for some scary threading related bugs.
2017-03-20 10:27:45 +00:00
Andras Slemmer
d3f956ab60 Address PR 379 comments 2017-03-17 15:09:04 +00:00
Rick Parker
1de1f9095f Several tests were corrupting Kryo which was then returned to the common pool. (#378)
* We were leaving trailing attachmentStorage on pooled kryo instances after some tests.  Changed attachment storage logic to make it impossible to leave it behind.

* Some low level tests corrupt the Kryo config, so do not return to pool when this is the case.  Also, we discovered that Kryo is caching class name to class resolution.  We don't want to do this where attachments are involved.  The errors raised highlighted a class missing from the whitelist.  Need to write a unit test to test the class loader issue.

* Unit test for attachment class loading with kryo.
2017-03-17 12:43:11 +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
eb21458885 Some fixes to emoji/ANSI renderer 2017-03-17 10:54:25 +01:00
Shams Asari
f079c05e6a Merge pull request #361 from corda/shams-nms-reg-error-response
Clean up of network map service  and its tests, and added error msg t…
2017-03-16 17:03:42 +00:00
Konstantinos Chalkias
5966610a6e DEFAULT_MAX_BUCKETS based on max heap size
MAX_DEFAULT_BUCKETS is linearly correlated to max heap size with a minimum of 256 buckets.
2017-03-16 16:40:34 +00:00
Shams Asari
5e3e7f6c1c Clean up of network map service and its tests, and added error msg to registration response 2017-03-16 16:37:21 +00:00
josecoll
391270ed71 RequeryConfiguration setting for table creation is now CREATE_NOT_EXISTS (was DROP_CREATE) (#374) 2017-03-16 16:23:37 +00:00
Rick Parker
f3a5f8e659 Pool Kryo instances for efficiency. (#352)
Pooled Kryo
2017-03-16 08:24:06 +00:00
Shams Asari
f581844f3f Flow registration takes in a Class object rather than a KClass 2017-03-15 16:32:13 +00:00
Andras Slemmer
6a6698b598 Merge pull request #339 from corda/aslemmer-fix-rpc-close-deliver-deadlock
rpc: Fix deadlock caused by deliver() and close()
2017-03-15 16:20:11 +00:00
Konstantinos Chalkias
195d69d0dc Print to screen and log basic info (#356)
Adding an extra logger to printBasicNodeInfo in both console and log file, respectively. Also, node's legal name is now printed to console as well.
2017-03-15 16:18:24 +00:00
Clinton
3b027345b0 Merge pull request #362 from corda/clint-webcapsulefix
Webserver capsule now contains the correct caplet
2017-03-14 16:39:16 +00:00
Clinton Alexander
e0773ff737 Webserver capsule now contains the correct caplet which was missing due to an incorrect path. 2017-03-14 16:02:33 +00:00
josecoll
18e4620928 ArrayDeque FlowLogic references were not being removed on flow termination. (#353) 2017-03-14 15:25:34 +00:00
Clinton
81dcec579e Merge pull request #346 from corda/rnicoll-capsule-web-server
Add webserver Capsule configuration
2017-03-14 15:22:41 +00:00
Andras Slemmer
389685a31e PR 339 Address comments 2017-03-14 15:17:15 +00:00
Andras Slemmer
60520412c8 rpc: Fix deadlock caused by deliver() and close() 2017-03-14 15:17:15 +00:00
Clinton Alexander
20282b5d53 Renamed webserver capsule to webcapsule module to avoid clashes with the node capsule 2017-03-14 12:00:36 +00:00
Shams Asari
bbbc4d9eaa Fix in reading non-present manifest values in single tests 2017-03-13 18:37:16 +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
Ross Nicoll
3e83093987 Add webserver Capsule configuration
Add Capsule configuration for the webserver JAR, so that the classes-only `webserver.jar` is published as well
as the full fat `corda-webserver.jar`. This is required for running the tutorial/template from IntelliJ.
2017-03-13 15:01:11 +00:00
Konstantinos Chalkias
afd5521b00 Lazy NodeVaultService.states (#349)
Convert NodeVaultService states to return Iterable (backed by Sequence) Vs the old way using a List. Worth noting this relieves memory pressure as the number of vault states grows.

* remove toList in ContractUpgradeFlowTest
2017-03-13 14:06:47 +00:00
Mike Hearn
21f5f6d9d0 ANSIProgressRenderer: allow progressTracker to be set to null 2017-03-10 17:26:18 +01:00
Mike Hearn
5e19bad4b5 Minor: don't use a separate thread to start Metrics-to-JMX export.
This should hopefully resolve a shutdown hang due to the misnamed "WebServer" thread not being a daemon thread.
2017-03-10 17:23:43 +01:00
Chris Rankin
42f2536dec Ensure Node uses only a single version of Netty. (#343)
* Ensure Node uses only a single version of Netty.

* Use string version of Gradle dependency.
2017-03-10 15:57:31 +00:00
Shams Asari
1adc9e65ec Logging the PID and version info 2017-03-10 10:29:41 +00:00
Shams Asari
e9d63b2662 Added bits of versioning info to the node 2017-03-09 16:36:21 +00:00
Konstantinos Chalkias
4a9ff84fc7 Allowing multiple signature algorithms (#250)
Basic crypto API to support 5 signature schemes and MetaData-ed signatures.
Supported schemes: (1) RSA_SHA256, (2) ECDSA_SECP256K1_SHA256, (3) ECDSA_SECP256R1_SHA256, (4) EDDSA_ED25519_SHA512, (5) SPHINCS-256_SHA512.

To sign a transaction, a signer should create a MetaData wrapper that contains transaction's merkle root and some extra information, such as signer's public key, timestamp and visibleInputs. Actually, MetaData is utilised to support a practical partial, blind and extra-data attached signature model.
When a MetaData object is signed, the signer sends a TransactionSignature object that contains the signed output and the corresponding MetaData object.

Remarks: 
This is an temporary solution for signature algorithmic agility. Further development is required for a robust and extensible Crypto Manager/Provider PKI that will support certificate creation, key generation, signing/verifying, deterministic key derivation, encoding formats, SGX/HSM support, identity and key management, versioning, revocation, asynchronicity, metadata, partial sig. policies etc.
2017-03-08 17:45:23 +00:00
Rick Parker
dc8c6747d3 Allow escaped unsubscribed RPC Observables to be GC'd (#334)
* QueuedObservable could not leak due to hard references.  Have made it weak referenced but also had to reference count a hard reference to prevent early GC.  Explained in comments.

* Improved comments.

* Fixed typo

* Fixed another typo
2017-03-08 14:09:38 +00:00
Mike Hearn
ca70ca051c Merge branch 'mike-json-support-module' 2017-03-08 15:06:50 +01:00
Mike Hearn
35836d9926 Add a registeredFlows() RPC that lists the RPCs the node knows about. 2017-03-08 15:01:13 +01:00
Mike Hearn
c626f8b306 Make the corda.jar executable on UNIX. When run in this way, it eliminates the overhead of a second JVM. 2017-03-08 14:56:47 +01:00
Katarzyna Streich
561ac60b95 Correctly publish corda-webserver.jar to maven local repository. 2017-03-08 13:54:14 +00:00