Commit Graph

837 Commits

Author SHA1 Message Date
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
Shams Asari
cfe5786d2d Introducing versioning of flows using the FlowVersion annotation.
Core flows, which are baked into the platform, are also versioned using the platform version of the node. Several core flows, such as the data vending ones, which were provided via plugins are now instead baked into the node.
2017-05-02 15:12:07 +01:00
josecoll
3d401d1dcb Apply @Suspendable on all flow methods that call vault generateSpend (#612) 2017-05-02 09:38:44 +01:00
Chris Rankin
3208daf507 Customise the error message according to why Corda cannot boot. (#610)
* Customise the error message according to why Corda cannot boot.
* Reset system property programmatically for the sake of developers.
2017-04-28 16:01:19 +01:00
Andrzej Cichocki
f2d138cdab Replace code only used in 1 test with existing general mechanism. (#600) 2017-04-28 15:50:24 +01:00
Andrzej Cichocki
cb3522588f In checkpoints, serialize hash of attachment instead of its data (#543) 2017-04-28 13:50:47 +01:00
Chris Rankin
9f3fae1914 Set the "no deserialisation" property in the Capsule and Driver. (#603) 2017-04-28 10:14:15 +01:00
Andrzej Cichocki
b3894fa38a Fix race in IntegrationTestingTutorial. (#594) 2017-04-27 09:15:12 +01:00
Shams Asari
c5a9312e07 Merge pull request #582 from corda/shams-flow-counterpartymarker-cleanup
Deprecated FlowLogic.getCounterpartyMarker as it's complicated and probably not used
2017-04-26 09:40:48 +01:00
Matthew Nesbit
7e3b9a8934 Fix duplicate content root problems in IntelliJ 2017-04-26 10:37:16 +02:00
Shams Asari
913487cb32 Deprecated FlowLogic.getCounterpartyMarker as it's complicated and probably not used (replacement is to use sub-flows).
Also made flow registration require the client flow class rather than any old class.
2017-04-25 18:53:33 +01: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
Mike Hearn
aed9495b37 Shell: add 'start' as an alias for 'flow start'. 2017-04-25 19:43:26 +02:00
Andrius Dagys
4e86443cac Fix Raft notary demo post name refactoring 2017-04-25 17:11:21 +01:00
Ross Nicoll
c8af48ebd9 Clean up BFTNotaryServiceTests
BFTNotaryServiceTests generates a master node independently of the cluster nodes, so it can put it
at the end of the list of nodes. The calling function however treats the first node in the list as
the master, not the last node. This simplifies the code while maintaining the same behaviour.
2017-04-25 15:12:37 +01:00
Katarzyna Streich
f92949d3b5 Add information on why state machine was removed from StateMachineManager (#570)
* Add information on why state machine was removed from StateMachineManager.
There are two cases: normal end of flow or error.

Return flow result as part of state machine remove data.

Make Change a sealed class with Add and Remove.

fiber.actionOnEnd takes ErrorOr<R> parameter.

* Remove unnecessary fields from StateMachineManager.Change.
2017-04-25 14:34:45 +01: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
Shams Asari
b5e022f350 Introducing Platform Version and its use by the NMS for min version requirements for the network 2017-04-24 15:31:10 +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
Ross Nicoll
6c6ed3a758 Move transaction generation to OnLedgerAsset
Move functions for generating transactions into OnLedgerAsset from various locations in
the code (VaultService, AbstractConserveAmount, etc.) to unify the code paths and reduce
duplication.
2017-04-24 13:29:52 +01:00
Andrzej Cichocki
160d13b6f7 Prohibit Java deserialisation in the Corda process (#566) 2017-04-21 16:26:35 +01:00
josecoll
2b1a71955c Always remove any soft locks associated with a completed flow. (#561)
Fix issue whereby soft locks associated with a flow were not being released because they were not initially registered properly.
2017-04-21 13:38:03 +01:00
Andrius Dagys
a2de90a6da Test if address is reachable before choosing 2017-04-20 19:36:41 +02:00
Andrius Dagys
a01c466beb Ignore utunX interfaces when detecting public IP 2017-04-20 19:36:41 +02: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
Andras Slemmer
0d90082482 Merge pull request #555 from corda/aslemmer-fix-h2-and-copycat-server-leak
Shutdown copycat server and h2 database on Node shutdown
2017-04-19 14:15:33 +01:00
Andras Slemmer
201c558245 Shutdown copycat server and h2 database on Node shutdown 2017-04-19 12:24:38 +01:00
Shams Asari
37a94237c8 Moved tests in net.corda.node.services to correct packages 2017-04-19 12:11:59 +01:00
Shams Asari
8e0a0ba8fb Provide useful error message if db iterator is left on stack during checkpointing
AutoCloseables in general are also forbidden as restoring them across node restarts is not supported.
2017-04-19 09:39:41 +01:00
Ross Nicoll
6d48667d91 Add infrastructure for X.500 name support (#534)
This introduces new functions for fetching parties by their X.500 name, Kryo serialization support for X500Name objects, an X500Name generator and some X509 utility support in preparation for full X.500 name support.
2017-04-13 15:32:34 +01:00
Ross Nicoll
1a88ca4bee Add composite signature engine (#446)
Add CompositeSignature and CompositeSignatureWithKeys classes as part of preliminary work to make CompositeKey signature validation compatible with java.security classes, so that these keys and signatures can be used readily in X.509 certificates.
2017-04-13 13:25:12 +01:00
Andrzej Cichocki
88b5e32ab2 Convert databaseTransaction to extension function on Database. (#537) 2017-04-12 17:15:29 +01:00
Andrzej Cichocki
3e007c02f4 Fix potential file handle leak in Attachment (#539)
* Make mockito available everywhere (core in particular).
* Also set the not-found path as FNFE message.
2017-04-12 15:30:28 +01:00
Mike Hearn
ac337240a6 Minor: more cleanups 2017-04-12 14:42:30 +02:00
Mike Hearn
bea799c60d Minor: node: fix inspector warnings and delete dead code. 2017-04-12 14:42:30 +02:00
Mike Hearn
1a86ac481f Minor: core: fix static analysis warnings.
One actual bug was found this way, albeit a harmless one.
2017-04-12 14:42:29 +02: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
Mike Hearn
0c0c5521c0 Minor: address more formatting issues spotted by Shams 2017-04-11 15:53:05 +02:00
Mike Hearn
c097229935 Minor: run code cleanup inspections 2017-04-11 15:53:05 +02:00
Mike Hearn
d6af727751 Minor: auto-format of module: node 2017-04-11 15:53:05 +02:00
Clinton
35fa9d2e59 Version number parser can now handle patch versions. (#516) 2017-04-11 12:08:42 +01:00
Rick Parker
d31a6fae85 Fix up HibernateObserver to allow cascading persistence after bug report (#524) 2017-04-10 11:33:03 +01:00
Shams Asari
c17fe29a62 Converted FullNodeConfiguration into a data class and added ability to parse Configs into data classes 2017-04-07 17:54:03 +01:00
Konstantinos Chalkias
f7dd2733f2 Kryo register FileInputStream and addDefaultSerializer for InputStream (#471)
HashCheckingStream CordaSerializable and FileInputStream Kryo register
2017-04-06 11:25:49 +01:00
Ross Nicoll
48b121d145 Add Cash*Flow tests
Add tests for CashIssueFlow, CashPaymentFlow and CashExitFlow. While these were mostly covered by other tests
already, CashExistFlow was not, and any bugs would be harder to identify because they are mixed in with other
functionality (i.e. vault tests)
2017-04-04 13:44:10 +01:00
Shams Asari
848988bf1c Merge pull request #487 from corda/shams-sealed-data-classes
Converted sealed data types to be data classes
2017-04-04 13:04:38 +01:00
Clinton
09e7d89e4e Merge pull request #500 from corda/clint-driverdebugportfix
Readded the debug port to the driver
2017-04-04 11:57:27 +01:00
Shams Asari
faef877a8d Converted sealed data types to be data classes 2017-04-04 11:37:56 +01:00