Commit Graph

225 Commits

Author SHA1 Message Date
Andrius Dagys
aaf7de0d02 RPC server: buffer response messages until the client queue is fully set up.
The issue arises when the server restarts, and the client is sometimes
not able to recreate its queue in time, so the server is unable to send
back a response message and just drops it, causing the client to hang.
2017-06-22 11:26:04 +01:00
josecoll
f8ad5c9d10 Vault Query Service JPA implementation (#840)
* Vault Query Service API implementation using JPA Hibernate

Added queryBy(QueryCriteria) Vault API and Junit tests.

Minor cosmetic API changes following rebase.

Fixes following rebase from master

Upgraded to requery 1.3.1

WIP - removed 'latestOnly' from LinearStateQueryCriteria

WIP - CommercialSchemas V2, V3, V4 testing

WIP - sort out generics handling.

WIP - most general queries completed.

WIP - join queries, contractStateType derivation

WIP - refactoring Requery

WIP - refactored VaultService to extract a VaultQueryService interface (and associated Requery implementation).

WIP - HibernateVaultQuery implementation

WIP - Re-structured all Schema definitions (requery/jpa) and make Hibernate Config reusable.

WIP - Multi-version schema testing, hibernate query testing.

WIP - Custom Criteria and Fungible Criteria impl & testing.

WIP - Kotlin Comparable Generics error

WIP - Party queries all working now

WIP - All VaultQueryTests now working (refactored for AND / OR composition)

WIP - added schema registration in CordaPluginRegistry to enable custom vault queries on arbitrary schemas.

WIP - added new default Sort NULL order to be NONE + added lots more tests for Logical Operator testing.

Mostly identity fixes following rebase from master.

Exception handling and public API cleanup in prep for PR.

Additional tests for Logical Operators; additional tests for NULLS sort ordering; additional logging;

Additional parser to handle Nullable attribute values; added Unary and Collection logical expression handlers

Lots of cleanup: participants; trackBy interfaces; additional fungible tests; parser cleanup and improved support for Java

Removed all traces of Requery implementation.

Further minor cleanup and Junit test fix.

Final identity and schema related identity clean-up.

Revert unrelated changes.

PR review updates: blank lines, isRelevant.

Fixed wiring of updatesPublisher for dynamic trackBy queries.

PR review changes: multi-versioned schema samples and associated dummy contracts moved to test packages.

Fixed problem with sorted queries (not specifying any filterable criteria).

PR review: minor updates to address RP comments.

Typesafe custom query criteria

Cleanup: remove redundant tests.

Further clean-up and make all Java test work successfully.

Remove debugging print statements.

Rebased from master - changes required due to DealState module change.

fixed broken assertion caused by DealState ordering change (different package)

Fixed transaction demarcation issue causing "java.lang.IllegalStateException: Was not expecting to find existing database transaction on current strand"

trackBy() now filters on ContractType and StateStatus (CONSUMED, UNCONSUMED, ALL)

Added tests to exercise RPCOps trackBy and queryBy (RPC smoke test and CordaRPCOps)

Added additional @CordaSerializable annotations.

Updated documentation and referenced sample code.

Added deprecation annotations.

Re-added missing deprecation annotation.

Hibernate debug logging is now configurable and disabled by default.

Introduced common Sort attributes based on the node schemas.

Completely removed NULL_HANDLING sort parameter as this is not supported in JPA.

Revisited and fixed usage of @CordaSerializable.

* Minor fix following rebase from master.

* Remove blank line as per RP PR feedback request.

* Minor Java documentation and example clean-up.

* Disable BFT Notary Service tests.
2017-06-22 10:35:49 +01:00
Katarzyna Streich
ab1b7eb551 Move all changes unrelated to flow view in explorer to open source. 2017-06-20 18:01:49 +02:00
Andras Slemmer
4dc06ed25b Merge pull request #703 from corda/aslemmer-in-process-driver-nodes-performance-tests
driver, node: Allow in-process starting of nodes, add a couple of node performance tests
2017-06-20 14:57:54 +01:00
Katarzyna Streich
20403d806a Cleanup of the explorer code related to internal flow view work. (#832)
Cleanup of the explorer code related to internal flow view work.
Changes in simulation, widgets, minor visual.
2017-06-20 10:45:42 +01:00
Andras Slemmer
70717cf33f driver, node: Allow in-process starting of nodes, add a couple of node performance tests 2017-06-19 13:45:48 +01:00
Matthew Nesbit
6933c8fda3 Move all advanced finance types into finance module.
Fixup after rebase

Also pull in the interpolator code, which is used for financial calculations.

Fix up rebase
2017-06-16 11:19:24 +01:00
Clinton
a6853be035 Merge pull request #834 from corda/clint-irswebfix
IRS web demo now shows fixings + general IRS fixes
2017-06-15 17:49:43 +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
Mike Hearn
475044597d Address review comments. 2017-06-13 16:19:55 +02:00
Mike Hearn
ccf43a8e17 Support fuzzy matching for identities.
Matching can be done with case insensitive substrings in the identity service, RPC and shell. In future cleverer matching should be possible, e.g. using Lucene or RDBMS free text search features.
2017-06-13 16:19:55 +02:00
Clinton Alexander
fffcfff269 Added correct json support fields to allow deserialisation of IRS data via Jackson. 2017-06-12 20:56:07 +01:00
Clinton Alexander
5fdd57ec48 WIP - squash me. 2017-06-08 18:29:26 +01:00
Andrzej Cichocki
bc4aed92dc Retry occasionally-failing test until we upgrade Artemis (#816) 2017-06-08 17:08:56 +01:00
Andrzej Cichocki
65fe7d6b81 Test that reliably fails with Artemis 2.1.0 (#797) 2017-06-07 16:49:57 +01:00
Shams Asari
afa3efb308 Fixes relating to testing flows and services.
Fixed issue where Corda services installed in unit tests were not being marked as serialise as singleton. Also the driver now automatically picks up the scanning annotations. This required moving the NodeFactory used in smoke tests into a separate module.
2017-06-06 15:22:43 +01:00
Clinton
08cbcac40c Corda publications and JARs now have cord or corda at the start. (#749)
Core corda publications and JARs now have cord or corda at the start (excluding gradle plugins). Removed an unnecessary dependency on test-utils in node-schemas to prevent an evaluation order bug in gradle.
2017-06-06 15:05:47 +01:00
Chris Rankin
20b806cb62 Make RPC client reaper threads into daemons so that they don't block JVM shutdown. (#781) 2017-06-01 17:57:38 +01:00
Chris Rankin
0fd897527a Extend smoke test to cover opening attachments. (#760) 2017-05-30 14:55:58 +01:00
Ross Nicoll
a8d4dccea4 Infrastructure for confidential identities
* De-anonymise parties in AbstractStateReplacementFlow flows
* Convert transaction key negotiation to a subflow instead of utility functions
* Add serialization support for CertPath
* Restructure cash flows so that a counterparty flow can be added later
2017-05-26 10:00:57 +01:00
Mike Hearn
e141fc1549 Minor: suppress some warnings and wrap an exception in the Jackson code. 2017-05-19 16:45:22 +02:00
Mike Hearn
3636f137b0 Minor: add a unit test for the StringToMethodParser code as used with c'tors. 2017-05-19 16:45:22 +02:00
Chris Rankin
edf269dbe5 Wrap any checked exception inside an unchecked RPCException. (#700) 2017-05-18 14:11:22 +01:00
Ross Nicoll
c13a99a2f9 Replaces keys and parties in states with AbstractParty
Switch to using AbstractParty as the standard identifier for parties in
states, so that full parties can be used during construction of
transactions and anonymised parties when the transaction is being added
to the ledger.
2017-05-16 12:07:14 +01:00
Andrzej Cichocki
d3bb040355 Refactoring related to BFT notary demo (#680)
* Fix: Add missing @StartableByRPC to fix the Raft notary demo
* Make loadConfig take a Config object, for cordformation Node
* Unduplicate User.toMap
* Unduplicate WHITESPACE regex, choose possessive form
* Use slash to make a Path
* Remove Companion where redundant
* Remove unused code
2017-05-16 11:30:50 +01:00
Andras Slemmer
63d5aa03e9 Merge pull request #665 from corda/aslemmer-cleanup-rpc-resources-on-startup-failure
RPC: call close() on startup failure, add thread leak tests
2017-05-15 19:18:37 +01:00
Andras Slemmer
f445590cff Address #665, add more leak tests 2017-05-15 15:20:00 +01:00
Chris Rankin
e995eac5d0 Update smoke tests to run correctly on Windows. (#684) 2017-05-15 13:48:40 +01:00
Andras Slemmer
b192a86a30 Address comments #665 2017-05-15 13:18:45 +01:00
Andras Slemmer
8a17406246 Address comments #665 2017-05-15 13:18:45 +01:00
Andras Slemmer
7c3a566197 RPC: call close() on startup failure, add thread leak tests 2017-05-15 13:18:45 +01:00
Andras Slemmer
abe568a7c8 Merge pull request #672 from corda/aslemmer-fix-rpc-docs
Fix RPC documentation
2017-05-12 13:09:33 +01:00
Chris Rankin
1c87d4f9c5 Add simple smoke tests for CordaRPCClient. (#667) 2017-05-12 10:27:41 +01:00
Andrzej Cichocki
1df29ab06f Make webserver reconnect to rebooted node. (#662) 2017-05-12 10:27:27 +01:00
Andras Slemmer
ee121473d1 Fix RPC documentation 2017-05-11 17:44:45 +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
Shams Asari
e75732af91 Making sure non-serialisable objects in FlowException do not interfere with the flow session (#651)
Also TransactionVerificationException no longer has reference to non-serialisable LedgerTransaction
2017-05-10 11:07:28 +01:00
Andras Slemmer
3a2afcdbb2 #592: Address more comments 2017-05-05 17:10:52 +01:00
Andras Slemmer
34517f653a #592: Address more comments 2017-05-05 17:10:52 +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
Ross Nicoll
b64e7f51f6 Enforce X.500 distinguished names in configuration 2017-05-05 16:13:29 +01:00
Konstantinos Chalkias
d8fa75654f Support for multi-sig schemes. ECC (K1/R1) and EdDSA are fully supported. (#599)
Support for multi-sig scheme. ECC (K1/R1) and EdDSA are fully supported.
2017-05-04 18:19:00 +01:00
Matthew Nesbit
7e3b9a8934 Fix duplicate content root problems in IntelliJ 2017-04-26 10:37:16 +02:00
Mike Hearn
922a760a09 Shell: more aggressive catch/rethrow of errors during command line parse. Avoids stack traces being dumped to the console when an unknown party name is provided. 2017-04-25 19:43:26 +02:00
Katarzyna Streich
c1b7b1cb75 Add information on who started flow on a node. (#549)
* Add information on who started flow on a node with name where possible.
Add sealed class holding information on different ways of starting a flow: RPC, peer, shell, scheduled.

* Remove invokeFlowAsync from ServiceHub, move it to ServiceHubInternal.
We shouldn't be able to start new state machines from inside flows.
2017-04-24 17:05:51 +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
Chris Rankin
d2d7cbc9ec CORDA-299: Remove progress Observable from FlowHandle, unless explicitly requested. (#513)
* Remove progress Observable from FlowHandle, unless explicitly requested.
* Refactor FlowHandle creation into FlowStateMachine.
* Prevent server-side queue subscription for dummy Observable.
* Refactor so that RPC client does not receive any unused progress Observables. This is the simplest way of ensuring we have no dangling "hot" Observables when the RPC client closes.
* Test flow has correct handle.
* Resolve some compiler warnings.
* Document how starting a flow does not involve progress tracking by default.
* Update changelog and release notes for RPC API.
* Rename new RPC API to startTrackedFlow().
* Remove optimisation because of its affect on the client-side.
* Update documentation.
2017-04-19 20:11:51 +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
kasiastreich
36d5d0d7b2 Refactor of CompositeKeys to implement PublicKey interface. (#433)
* Make CompositeKey implement PublicKey

The initial implementation of composite keys as their own distinct class separate from PublicKey
means that the keys cannot be used on standard classes such as Certificate. This work is a beginning
to modifying CompositeKey to being a PublicKey implementation, although significant further work
is required to integrate this properly with the standard Java APIs, especially around verifying
signatures using the new key type.

* First stage of making CompositeKey implement PublicKey interface. Revert to using PublicKey everywhere we expect a key.

* Move algorithm and format into companion object (#432)

Move algorithm and format into companion object so that they can be referenced from other
classes (i.e. the upcoming signature class).

* Add simple invariants to construction of CompositeKey.
Builder emits CompositeKeys in simplified normalised form. Forbid keys with single child node, force ordering on children and forbid duplicates on the same level. It's not full semantical normalisation.

* Make constructor of CompositeKey private, move NodeWeight inside the class.
Add utility function for Kryo deserialization to read list with length constraints.
2017-04-12 11:13:20 +01:00