Commit Graph

885 Commits

Author SHA1 Message Date
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
f445590cff Address #665, add more leak tests 2017-05-15 15:20:00 +01:00
Andras Slemmer
b192a86a30 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
Andrius Dagys
885f951dc3 Node IP auto-detection (#666)
* If the p2pAddress provided by the configuration is not public, the node tries to discover the public IP:
- First by checking the network interfaces
- If not found, sends a request to the network map service

* Enable initial connection retry

* Improve error handling

* Update docs
2017-05-12 14:09:02 +01:00
Andrzej Cichocki
e981632184 RAFT notary demo refactoring (#629)
Specifically, make the IDE/driver and gradle/NodeRunner methods of launching the demo behave more similarly, with a view to configuring them the same way.
* Add option to driver to nominate a node as network map, so that the driver-based demo doesn't run an additional node
* Change gradle ports to match those chosen by driver
2017-05-12 11:33:26 +01:00
Shams Asari
47c6b9c135 Making use of latest FastClasspathScanner version and cleanup of CollectSignaturesFlow.kt 2017-05-12 10:33:43 +01:00
Andrzej Cichocki
1df29ab06f Make webserver reconnect to rebooted node. (#662) 2017-05-12 10:27:27 +01:00
Shams Asari
8cb7c5eab1 Fix node crash when the plugins dir is empty 2017-05-11 21:34:31 +01:00
Ross Nicoll
edfc4dd7d9 Add certificate path storage to identity service
Add functionality for generating certificate paths from identity
certificates to transaction certificates, validating, storing and
retrieving those certificate paths.
2017-05-11 16:55:23 +01:00
Patrick Kuo
af7ba082a4 Store identity key to keystore with self sign cert (#645)
* Support signing and storing EdDSA key and certificate in java keystore.
2017-05-11 16:53:44 +01:00
Andras Slemmer
1ecce79913 Merge pull request #669 from corda/aslemmer-quasar-hook
Add quasar-hook agent for inspecting quasar instrumentation
2017-05-11 15:34:46 +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
4cd1f1677f Add quasar-hook agent for inspecting quasar instrumentation 2017-05-10 19:11:34 +01:00
Matthew Nesbit
8aa341dc7b Merge pull request #620 from corda/mnesbit-audit-interface
Create header files for discussion of possible flow audit api.
2017-05-10 16:42:49 +01:00
Matthew Nesbit
540fd746bb Create header files for discussion of possible flow audit api.
Fix compile error

Address PR comments

Change from a general interface to a restricted set of audit event types.

Fixup after rebase
2017-05-10 14:49:11 +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
f4354d25dd Merge pull request #644 from corda/aslemmer-fix-issue-55
Fix issue #55
2017-05-10 10:53:11 +01:00
Chris Rankin
d3075928b2 Move FlowHandle implementations back into core so that RPC clients can use them. (#653) 2017-05-09 18:25:43 +01:00
Chris Rankin
bb0ac3253d Move FlowSessionException into core so that it can be serialised. (#654) 2017-05-09 18:09:34 +01:00
Shams Asari
60b1f9b0b2 Merge pull request #639 from corda/shams-initiating-flow-annotation
Introducing InitiatingFlow annotation which has to be annotated by in…
2017-05-09 12:24:33 +01:00
Mike Hearn
670f1256e9 Address review comments from Richard 2017-05-09 11:59:51 +02:00
Andras Slemmer
f153e9a347 #55, #644 Address comments 2017-05-09 10:38:50 +01:00
Ross Nicoll
546d96934a Expand X509Utilities
Mark several functions in X509Utilities as @JvmStatic so they're readily accessible from Java.

Add functions for modifying common name of an X.500 name, either direct replacement or adding a postfix.
2017-05-09 10:27:01 +01:00
Shams Asari
221bb81f84 Introducing InitiatingFlow annotation which has to be annotated by initiating flows.
This removes the need for the shareParentSessions parameter of FlowLogic.subFlow. It also has the flow's version number so FlowVersion is now no longer needed.
2017-05-08 20:19:45 +01:00
Patrick Kuo
1f4535bc2e Support signing and storing EdDSA key and certificate in java keystore. (#601) 2017-05-08 17:38:59 +01:00
Andras Slemmer
5db4e4723d Fix issue #55 2017-05-08 15:33:45 +01:00
Matthew Nesbit
c3557e0a68 Merge pull request #640 from corda/mnesbit-flowlogicfactory-internal
Move the implementation of the FlowLogicRefFactory internal
2017-05-08 15:24:41 +01:00
Mike Hearn
8016bc5fcd Detect broken macOS localhost resolution and tell the user how to fix it. 2017-05-08 14:16:20 +02:00
Matthew Nesbit
bfa7d50d37 Move the implementation of the FlowLogicRefFactory internal to the node as it is an implementation detail, not an API. 2017-05-08 11:32:32 +01:00
Andras Slemmer
489661a289 Merge pull request #592 from corda/aslemmer-rpc-manual-demux
RPC muxing, multithreading, RPC driver, performance tests
2017-05-08 11:18:21 +01:00
Chris Rankin
0ed009dfa0 Set java.io.tmpdir to Gradle's build directory for unit and integration tests. (#638) 2017-05-05 17:30:51 +01:00
Andras Slemmer
3a2afcdbb2 #592: Address more comments 2017-05-05 17:10:52 +01:00
Andras Slemmer
652cbb0d9f #592: RPCServer lifecycle 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
josecoll
8c3b9ac589 Vault Query API design (#522)
* Added queryBy(QueryCriteria) Vault API and Junit tests.

* Minor fix following rebase.

* Spit out Vault Query tests into separate source file.

* WIP

* Enable composition of QueryCriteria specifications.
Additional JUnit test cases to validate API.

* Added Deprecating annotations.
Added QueryCriteria for set of contractStateTypes

* Minor tweaks and additional JUnit test cases (chain of linear id)

* Added Java Junit tests and QueryCriteria builder support.

* Added API documentation (including coding snippets and examples).

* Added @JvmOverloads to QueryCriteria classes for easy of use from Java.

* Refactored QueryCriteria API to use composition via sealed data classes.

* Enable infix notation.

* Fixed typo.

* Clarified future work to enforce DB level permissioning.

* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.

* Moved PageSpec and Order from QueryCriteria to become parameters of Query itself.

* TokenType now specified as set of <Class> (was non extensible enum).

* Exposed new Vault Query API functions via RPC.

* Fixed compiler error in java test.

* Addressed a couple of minor PR review scomments from MH.

* Major updates following PR discussion and recommendations.

* All pagination and sorting arguments are optional (and constructed with sensible defaults).
Added Java helper functions for queryBy and trackBy interfaces.
Added Java trackBy unit tests.
Miscellaneous cleanup.

* Added Generic Index schema mapping and query support.

* Query criteria referencing Party now references a String (until Identity framework built out).
Added participants attribute to general query criteria.

* Fleshed our IndexCriteria including PR recommendation to define column aliases for index mappings.

* Removed all directly exposed API dependencies on requery.

* Updated documentation.

* Provide sensible defaults for all Query arguments.
Add RPC Java helpers and increase range of Vault Service helpers.

* Further improvements (upgrading notes) and updates to documentation.

* RST documentation updates.

* Updates to address RP latest set of review comments.

* Updates to address MH latest set of review comments.

* Updated to highlight use of VaultIndexQueryCriteria to directly reference a JPA-annotated entity (versus the indirect, explicitly mapped attribute to GenericIndexSchema approach)

* Aesthetic updates requested by MH

* Reverted Indexing approach: removed all references to VaultIndexedQueryCriteria and GenericVaultIndexSchemaV1 scheme.

* Final clean-up and minor updates prior to merge.

* Fixed compiler warnings (except deprecation warnings)

* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)

* Reverted all changes to Vault Schemas (except simple illustrative VaultLinearState used in VaultQueryTests)

* Commented out @Deprecated annotations (as a hedge against us releasing M12 with the work half-done)

* Renamed RPC JavaHelper functions as RPCDispatcher does not allow more than one method with same name.
2017-05-05 15:14:43 +01:00
Chris Rankin
0309426cb9 Include log4j2.xml into application jars only. This allows applications to use their own log4j2.xml files, if required. (#635) 2017-05-05 13:12:36 +01:00
Shams Asari
de83866ebe Removed createHandle from the FlowStateMachine interface as it doesn't need to be publicly exposed 2017-05-05 12:21:34 +01:00
Andrius Dagys
9a0653128c Add support for re-sending session messages. This is useful when talking to a distributed service, e.g. notary – if one of the nodes go down in the middle of a session, the session will be re-established with a different node (round-robin order). 2017-05-05 10:08:53 +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
fe7d893de2 Merge pull request #627 from corda/mnesbit-servicehub-cleanup2
Remove scheduler service from ServiceHub
2017-05-04 14:34:41 +01:00
Matthew Nesbit
b3b4457b4e Remove scheduler service from ServiceHub 2017-05-04 10:00:49 +01:00
Shams Asari
eba753ddfe Moved the initiated-side of core flows in net.corda.flows to net.corda.node.services. They are not meant to be visible to end-users. 2017-05-03 17:42:51 +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
a1fd215863 Extract common name from legal name to determine path in Driver (#613)
Rewrote node name to extract common name to use as the node path for samples, to work around characters being incorrectly treated as separators.
2017-05-03 16:58:48 +01:00
Matthew Nesbit
7e8aa1d706 Remove Messaging service from service hub
Remove mention of MessagingService as being on ServiceHub.
2017-05-03 15:19:27 +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