Commit Graph

926 Commits

Author SHA1 Message Date
Andrzej Cichocki
51ea9fec1a IRS demo fixes (#782)
* Increase max network map request size so the notary can register
* Suppress oracle service installation errors in non-oracle nodes
* Make demos automatically build capsule jars
2017-06-02 16:23:05 +01:00
Andrzej Cichocki
c510e67ed5 Move ShutdownHook to node-api. (#770) 2017-06-02 15:32:20 +01:00
Ross Nicoll
e2214c95b4 Change PartyAndCertificate to an aggregate class (#778)
Change PartyAndCertificate to an aggregate class instead of a subclass of Party. This reduces the changes compared to M11, as well as avoiding risk of accidental serialization of a PartyAndCertificate (which may be very large) where a Party is expected.

Cleaned up initial nodes known to the identity service, in particular mock nodes now know about themselves; previously full nodes registered themselves but mock nodes did not.
2017-06-01 18:54:44 +01:00
Mike Hearn
73666dbc7d Minor: Modernise startup messages 2017-06-01 18:34:06 +02:00
Andrius Dagys
81d32fd6a7 Upgrade Artemis to 2.1.0 2017-06-01 11:10:15 +01:00
Joel Dudley
f646936ab8 Updates TwoPartyTradeFlow to use the CollectSignaturesFlow. 2017-06-01 11:08:39 +01:00
Clinton
f8e2766924 Merge pull request #774 from corda/clint-fixdocsbuild
Fix docs build
2017-05-31 21:50:44 +01:00
Clinton Alexander
53e8fe23d7 Fix docs build by replacing an expression which crashes Dokka with an older more verbose notation. 2017-05-31 21:05:41 +01:00
Rick Parker
d3f027cea8 Custom serialiser support for AMQP (#741) 2017-05-31 18:33:57 +01:00
Andrzej Cichocki
4bd38d381a Fix tests that check ports are bound/unbound (#756)
* Specifically, DriverTests and WebserverDriverTests
* RPCDriver.startRpcBroker now waits for port to be unbound, as was probably intended
* Explicitly drop network map future while ensuring the error is logged
2017-05-31 17:12:25 +01:00
Katarzyna Streich
39fdb353ad Remove nearestCity from node configuration. (#721)
* Fix bug in demobench. Explorer didn't show correctly location of a node.
There was no nearestCity override in config.

* Remove nearestCity from node configuration. Now information about the location is always taken from
node's legal name. If not present - exception on node startup.

* Add X500Name.locationOrNull that soft fails when location is not in X500 name. Address PR comments.

* Remove unused imports.
2017-05-31 16:07:13 +01:00
Andrius Dagys
f210370885 Pass ports instead of hostAndPorts to the message broker. Pass an address for the NodeMessagingClient to advertise to the network map service. 2017-05-31 15:41:40 +01:00
Ross Nicoll
34eb5a3b70 Store certificate and path with well known identity (#726)
* Construct standard flows using PartyAndCertificate, and add support for launching
flows that are constructed with PartyAndCertificate or just Party.
* Store PartyAndCertificate in network map service
* Expand identity service to store certificates along with all identities.
2017-05-31 14:45:58 +01:00
Ross Nicoll
08c91bd611 Add certificate to node identity (#769)
Add certificate and path to node identity via the `NodeInfo` class.
2017-05-31 11:52:50 +01:00
Ross Nicoll
f148765c57 Add RPC registration diagnostics
Add diagnostic information if attempting to use an RPC interface with duplicate
method names, rather than throwing a collection error.
2017-05-31 11:42:45 +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
Ross Nicoll
0e1e4042dc Add PartyAndCertificate class
Add PartyAndCertificate class for pairing proof of a party's identity with the party.
2017-05-31 09:45:40 +01:00
Ross Nicoll
c003ec0042 Replace X509Certificate with X509CertificateHolder
Replace X509Certificate with X509CertificateHolder for consistency in implementation of how X.509 certificates
are managed. Using the Java standard class entails the actual implementing class being one of several options
depending how a certificate is built, which makes serialization/deserialization with Kryo inconsistent as some
of these forms cannot be directly built from outside restricted classes.
2017-05-30 17:05:43 +01:00
Chris Rankin
bb0cc85295 Allow RPC for internal classes with special serialisers. (#751)
Also ensure that HashCheckingStream validates the hash afterwards.
2017-05-26 15:28:22 +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
Andrzej Cichocki
851cccbf7e Don't persist loaded keyPair to the keystore when owningKey is composite (#744) 2017-05-25 17:31:14 +01:00
Konstantinos Chalkias
9f2b44f8f7 Rename Timestamp to TimeWindow (#706)
Rename Timestamp to TimeWindow + refactoring
2017-05-25 13:18:49 +01:00
Andrzej Cichocki
ca36b4676d Unduplicate certificatesDirectory (#740) 2017-05-25 10:30:28 +01:00
Patrick Kuo
246de55433 Create client CA certificate with X509 name constraint (#731)
* The node will be issued a CA certificate with name constraint which will allow the node to create keys with a valid certificate chain.
2017-05-24 16:13:37 +01:00
Andrzej Cichocki
bbe4c170c2 BFT notary demo (#725)
* Rename raft-notary-demo project to notary-demo
* Refactor serialisation filtering to allow BFT SMaRt to work, it no longer relies on the jdk.serialFilter system property
* In NodeBasedTest remove whitespace in node directory names for consistency with cordform and driver
2017-05-24 12:25:06 +01:00
Chris Rankin
375392d32d Compile caplets against correct version of capsule. (#732) 2017-05-24 09:58:33 +01:00
Chris Rankin
179eccdd20 Modify how Gradle creates capsules: (#730)
- Better Gradle dependency management.
- Remove empty module jars from the capsules.
2017-05-23 18:04:20 +01:00
Ross Nicoll
36a091dd6a Add support for X509Certificate and CertPath serialization 2017-05-23 15:42:11 +01:00
Konstantinos Chalkias
53276c1f06 faster key encoding/decoding and generic converters between key implementations 2017-05-22 11:14:05 +01:00
Mike Hearn
207d3b0b8f Vault: any state that has us as a participant is relevant. 2017-05-19 16:45:22 +02:00
Mike Hearn
8dde7757f1 Minor: downgrade another spammy error to warning. 2017-05-19 16:45:22 +02:00
Mike Hearn
c79f369c83 Minor: degrade a log.error to a log.warn as errors get written to the console. 2017-05-19 16:45:22 +02:00
Mike Hearn
a5be12a81b Minor: print org name at startup instead of full X.500 name. 2017-05-19 16:45:22 +02:00
Ross Nicoll
794ce03958 Remove mock identity service
Remove mock identity service and merge it with the in memory identity service. The two services
provide extremely similar functionality, and having two different version for production/test
risks subtle implementation differences. On that note, this patch includes changes to a number
of tests which worked only with mock identity service.
2017-05-19 11:22:47 +01:00
Matthew Nesbit
05a97b11f3 First cut at removing PrivateKey leakage from KeyManagementService
Fixup after rebase

Restore original key property names

Fixup after rebase

Undo extra import that IntelliJ keeps erroneously adding.

Add comments and fix docs for transaction signing.

Fixes after rebase

More fixes after rebase

Address PR requests

Address PR requests
2017-05-18 17:34:04 +01:00
Andrzej Cichocki
c8d71a96f5 One demo definition for both IntelliJ and gradle (#697)
* Raft notary demo now defined in one place that both IntelliJ/driver and gradle/runnodes can run
* New module cordform-common for code common to cordformation and corda
* Add single notary demo
2017-05-18 15:58:35 +01:00
Mike Hearn
cca30ade1e Fix issue with automatic shutdown if the app is paused for longer than 30 seconds. This can happen on Mac laptops that put the node to sleep to save energy. 2017-05-17 09:45:37 +02:00
Chris Rankin
5cf304e8c4 Disable the DemoBench tab if the node exits abnormally. (#692)
* Log a message when the CRaSH shell exits.
* Disable the DemoBench tab if the node exits abnormally.
2017-05-17 00:19:48 +01:00
Rick Parker
68f0e5d683 Fix JPA annotations in test so that columns are correctly named. (#694) 2017-05-16 14:19:19 +01:00
Katarzyna Streich
81501150aa Add Cash flows to default RPC flow list, so they can be invoked by shell commands. (#690)
Add Cash flows to default RPC flow list, so they can be invoked by shell commands.
It should be removed once we separate cash flows into cordapp.
2017-05-16 13:29:57 +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
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