Commit Graph

1224 Commits

Author SHA1 Message Date
Ross Nicoll
3d577e5eed CORDA-499: Remove further Kt classes (#1489)
* Change how NetworkHostAndPort is parsed

Change from using a global extension function to parse
NetworkHostAndPort strings, into using a function on the companion
object. This is a lot easier for Java interop and matches the common
style used elsewhere both in Corda and in Java libraries.

* Move JAR extraction into new utils file

* Move path verification function to ArtemisUtils

Move path verification function "requireOnDefaultFileSystem()" to new
ArtemisUtils.kt file, as this makes more sense from a Java interop
perspective.

* Add JvmName to AMQPSchemaExtensions

* Add JvmName to AMQPSerializationScheme

* Revert "Move JAR extraction into new utils file"

This reverts commit 1f0f41909b68ff21cc24b5efd6a1a360393a0a14.

* Reformat code

* Run formatter on ArtemisUtils
2017-09-14 17:34:01 +01:00
Patrick Kuo
6fbff2de5e SSL cert wrong X500Name fix (#1478)
* fix a bug where network registration helper creates a SSL cert with wrong X500 name

* rebase and fix up

* fixup after rebase
2017-09-14 16:49:13 +01:00
Shams Asari
573987d929 Removed X509CertificateHolder from public API, using java.security.X509Certificate instead (#1510) 2017-09-14 15:48:33 +01:00
Ross Nicoll
ae2183c8a1 Reduce use of X500Name bridges (#1483)
* Change to using strings in CordformContext; X500Name is an external API dependency we're trying to avoid, X500Principal rearranges the order of the elements in a way we don't want, and trying to put CordaX500Name into Groovy in the time available is impractical. As such having pre-formatted strings used in the Cordform plugin makes most sense right now.
* Remove uses of CordaX500Name.x500
* Remove old X.500 parsing tools
* Move CordaX500Name.x500 into X500NameUtils
* Move X500NameUtils into internal
2017-09-14 11:56:14 +01:00
Shams Asari
8f0c0c784b Removed PluginServiceHub 2017-09-14 09:30:37 +01:00
Clinton
b102900c90 Automatically load contract attachments into the attachment store (#1500)
Attachments for contracts are now loaded into the attachment store by the cordapp provider.
2017-09-13 18:43:37 +01:00
Andrzej Cichocki
cfd6739d23 Introduce StartedNode (#1491) 2017-09-13 17:34:52 +01:00
Shams Asari
ed0aede1f1 In preparation for the removal of advertised services, @CordaService no longer expects a static "type" field for the ServiceType.
Instead @CordaServices will use the main identity of the node.
2017-09-13 15:53:50 +01:00
Michele Sollecito
ea61e6e9d5 [CORDA-461] Remove deprecated APIs. (#1480)
https://r3-cev.atlassian.net/browse/CORDA-461
2017-09-13 15:39:39 +01:00
Ross Nicoll
024285b007 Rename TransactionKeyFlow to SwapIdentitiesFlow (#1499) 2017-09-13 15:01:42 +01:00
Clinton
1ef4cec0cd Add Cordapp class to define CorDapps inside Corda and encapsulate Cordapp loading (#1494)
Introduced a Cordapp class which contains all relevant information about a Cordapp. The Cordapp loader now produces Cordapps instead of lists of classes and services without any relation to the original Cordapp. 

Added new static constructor to CordappLoader to be able to take arbitrary paths to load cordapps from in dev mode. 

Moved the CordappLoader into the cordapp package.
2017-09-13 14:07:50 +01:00
josecoll
5504493c8d Improved support for testing custom schemas using a MockNetwork. (#1450)
* Improved support for testing custom schemas using a MockNetwork.

* Removed `requiredSchemas` from CordaPluginREgistry configuration
Custom schema registration now uses classpath scanning (CorDapps) and explicit registration (tests) following same mechanisms as flow registration.

* Updated following PR review feedback.

* Helper function to return Kotlin object instance fixed and moved to core InternalUtils class.

* Fixed auto-scanning Unit test to assert correct registration of custom schema.

* cleanup comment.

* Changes following rebase from master.
2017-09-13 12:06:24 +01:00
Clinton
8415a01a47 Cordform common is now a part of the gradle plugin suite (#1474)
Cordform common is now a full gradle plugin and all related gradle hacks are removed.
2017-09-12 19:18:09 +01:00
Clinton
c20623184e Refactor CorDapp loading into a separate module (#1493)
CordappLoader - Added a new cordapp loader class to encapsulate loading of cordapp classes. Added a utils for classloading. Moved a lot of code out of abstract node into the new loader.
2017-09-12 19:02:36 +01:00
Ross Nicoll
c18b0ecdc3 Clean up CordaX500Name (#1487)
* Remove unused imports
* Move X500 name generation into test code as it's no longer used in the main code
2017-09-12 13:08:43 +01:00
Ross Nicoll
de3468f8a7 Replace X500Name with CordaX500Name (#1447)
Replace X500Name with CordaX500Name, which enforces the specific constraints Corda expects on legal/service identity names.
2017-09-12 01:03:10 +01:00
Andrzej Cichocki
1565b395b6 Introduce AttachmentConstraint (#1370)
Introduced attachment constraint interface to TransactionState as a base for extension.
2017-09-11 17:51:03 +01:00
Clinton
bc6628a072 ContractState now references contract by class name (#1407)
* ContractState's contract type has been moved to TransactionState and is now a string representing the class name of the contract class to allow classloading of arbitrary contracts from custom classloaders.

* Upgraded isolated JAR to new version.
2017-09-11 16:44:18 +01:00
Ross Nicoll
65dcfe4abe Enable anonymisation (#1073)
* Enabled confidential identities in:
** IssuerFlow
** Trader demo
** Two party deal flows
** Two party trade flows
** Corda RPC tests
** Cash flows
** Integration testing tutorial
** Node monitor model tests
** CollectSignatureFlow
* Relay local node's confidential identities to counterparties when requesting transaction
signatures, so counterparties know where the inputs come from.
* Require all identities are known in finality flow
* Ensure all identities in FxTransactionBuildTutorial are known to each other

* Add flow for syncing identities to a number of counterparties

* Address PR comments

* Disable anonymisation in example code

* Revert unnecessary changes remaining from earlier rebases

* Corrections after rebase

* Remove unneeded identity registration

Remove unneeded identity registrations from tests, which sometimes cause duplicated entries in the database

* Revert accidental change in examples

* Revert unneeded imports

* Revert changes to CoreFlowHandlers.kt
2017-09-11 14:29:37 +01:00
Michele Sollecito
330db73c5d [CORDA-460]: Removed usages of IdentityService.registerIdentity(party: PartyAndCertificate) (#1472) 2017-09-11 13:47:11 +01:00
Shams Asari
763539b5f0 Moved stuff out of X500NameUtils.kt not related to X500Name 2017-09-10 20:01:18 +01:00
Shams Asari
40f791a5d0 Moved X500Name hiberate converter out of core 2017-09-10 16:17:46 +01:00
josecoll
628d94c070 Redefine VaultSchema attribute of serialized Contract state to LOB (unconstrained size) (#1459) 2017-09-08 16:14:31 +01:00
Shams Asari
9a77e63cf8 Added missing app name on session-init messages 2017-09-08 13:54:36 +01:00
Viktor Kolomeyko
8710090887 CORDA-540: Fixes to make "node" tests pass in AMQP mode, part 1 (#1455) 2017-09-08 13:46:22 +01:00
Michele Sollecito
df31e52665 [CORDA-303]: Add some tests that stop and start a node and check state is persistent. (#1449)
* [CORDA-303]: Add some tests that stop and start a node and check state is persistent.

* [CORDA-303]: Updated change log and added Javadocs.

* [CORDA-303]: Cleaned up test.

* [CORDA-303]: Removed blank lines after class or function declarations.

* [CORDA-303]: Wrapped multiple invocations in `with` construct.
2017-09-08 09:24:22 +01:00
Patrick Kuo
57412d4498 Enforce X500Name format defined in design doc (#1427)
* Standardise X500Name format - WIP

* address PR issues

* failing test fix and replace X500Name with getX500Name

* gradle plugin fix

* Added country code validation
2017-09-07 14:47:42 +01:00
Shams Asari
c293d6b18a Added check to receive and sendAndReceive to make sure the primitive classes aren't used (#1400) 2017-09-07 11:46:35 +01:00
Matthew Nesbit
291a55d2d2 Remove some trivial syntax related warning messages.
Fix whitespace

Address PR comment
2017-09-06 17:10:01 +01:00
Matthew Nesbit
e27e18a9ec Merge pull request #1438 from corda/mnesbit-remove-dead-code
Remove dead and expensive call to key management service
2017-09-06 15:51:17 +01:00
Matthew Nesbit
810e6a230e Remove dead and expensive call to key management service 2017-09-06 15:07:26 +01:00
Matthew Nesbit
dc0b56432b Change PersistentIdentityService to use AppendOnlyPersistentMap as this has bounded memory and works correctly for the use case of repeated duplicate inserts. 2017-09-06 13:58:25 +01:00
Ross Nicoll
fe17d26bb0 Reshuffle docs on NetworkRegistrationHelper (#1429)
Reshuffle docs on NetworkRegistrationHelper, and in particular note that it can cause the whole
process to exit.
2017-09-06 09:25:45 +01:00
josecoll
ebc9cacb53 Contract Upgrade API improvements + persistence (#1392)
* All Contract Upgrade functionality performed within a corresponding flow.
Removed RPC API calls for contract upgrade authorisation / de-authorisation.
Added persistence using AppendOnlyPersistentMap.

* Changed to using a PersistentMap to ensure entries can be removed (was causing failing de-authorisation tests).
Fixed all warnings.

* Added mandatory @Suspendable annotations to flows.

* Do not instantiate object unless overridden.

* Updated changelog and CordaDocs.

* Persistence simplification: only store upgrade contract class name (not serialized object)

* Remove nullability from contract_class_name DB column.
2017-09-05 13:23:19 +01:00
Matthew Nesbit
5bb9556380 Merge pull request #1414 from corda/mnesbit-persistent-identityservice
Create Persistent Identity Service
2017-09-05 11:54:23 +01:00
Roman Plášil
b6e8b05dea Raft JMX reporting: initialize after server is created 2017-09-05 12:30:28 +02:00
Roman Plášil
0831fdfd4f Add basic Raft cluster status metrics 2017-09-05 12:30:28 +02:00
Matthew Nesbit
8ef29d4736 Persistent Identity
Fixup tests after rebase

Add unit tests of Persistent Identity. Fix bugs in PersistentMap.

Wrap identity and network map RPC calls in database transaction

Address PR comments
2017-09-05 11:19:54 +01:00
mkit
cbf89ba98b Deprecating verifiedTransactions from the public API (#1418) 2017-09-05 10:07:55 +01:00
Andrzej Cichocki
0e250e9279 Add support for signed attachments (#1369) 2017-09-04 16:19:12 +01:00
Joel Dudley
b990fedd80 Adds a builder for configuring nodes in the driver for Java interop. 2017-09-04 15:51:46 +01:00
Viktor Kolomeyko
0bbee4a92b CORDA-540: Prevent "node" unit tests hanging in AMQP mode (#1402) 2017-09-04 10:41:01 +01:00
Katarzyna Streich
e1363c91cc PersistentNetworkMapCache close database connection (#1398) 2017-09-04 09:41:00 +01:00
joeldudleyr3
83d0095142 Adds a builder for configuring nodes in the driver for Java interop. 2017-09-01 16:45:00 +01:00
josecoll
a286f7553b Enable RPC start of Flows that return nothing (eg. Void). (#1374)
* Enable RPC start of Flows that return nothing (eg. Void).

* Fix blocking test (caused by not running mockNetwork).
Improve execution times by moving redundant setup() initialisation to only tests that use it.
2017-09-01 15:44:53 +01:00
Joel Dudley
1528813d5b Don't fail silently when running flow with no progress tracker from shell. 2017-09-01 11:24:16 +01:00
Chris Rankin
66c35bbffa Demote quasar-core to a runtime dependency, and capsule to "compileOnly". (#1381) 2017-09-01 11:12:04 +01:00
Ross Nicoll
7e3dd4c12c Restructure net.corda.core.crypto package
* Rename KeyFactory to CompositeKeyFactory
* Move expandedCompositeKeys into TestDSL as the only place that uses it
* Move NullKeys out of their own package
* Move remaining crypto classes into superpackage
* Move utility classes out of crypto and into utilities package
2017-09-01 10:55:58 +01:00
Andras Slemmer
17a9f8a7ea Merge pull request #1355 from corda/aslemmer-fix-flaky-retry-test
Fix flaky distributed retry test
2017-09-01 10:55:42 +01:00
joeldudleyr3
83dc1d020d Fixes tests. 2017-09-01 10:50:13 +01:00