Commit Graph

4309 Commits

Author SHA1 Message Date
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
Viktor Kolomeyko
abac314b31 CORDA-540: Correctly mark AttachmentConstraint to be CordaSerializable (#1496)
Or else many core/contract unit tests failing in AMQP mode
2017-09-14 09:28:17 +01:00
Rick Parker
988e3e5007 Some additional serializers to fill in the blanks vs. our default whitelist (#1490) 2017-09-14 09:14:09 +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
Ross Nicoll
eeb51527a1 Correct ordering of parameters in CordaX500Name (#1501)
Correct ordering of parameters in CordaX500Name and change to named parameters so they can't get incorrect. A constructor with identical types is at high risk of incorrect ordering of values, and therefore it's worth ensuring this can't happen again.
2017-09-13 18:31:22 +01:00
Andrzej Cichocki
cfd6739d23 Introduce StartedNode (#1491) 2017-09-13 17:34:52 +01:00
Ross Nicoll
c8b1eb5a1e CORDA-499: Further Dokka cleanup (#1437)
* Add JvmName annotation to ConfigUtilities
* Merge Kryo.addToWhitelist into KryoSerializationCustomization
2017-09-13 17:06:39 +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
Andrzej Cichocki
93101f7c7d Restore ContractState and TransactionState to docs. (#1495) 2017-09-13 11:49:05 +01:00
Michele Sollecito
15aa4036b6 CORDA-599: Fix IRS demo (#1460)
* [CORDA-559]: Fixed incorrectly referenced deal notional amounts in views.

* [CORDA-559]: Fixed missing parties in IRS demo deal view.

* [CORDA-559]: Fixed failing creation of deals in IRS demo.

* [CORDA-559]: Added to changelog.

* [CORDA-559]: Fixed the broken integration test in IRS demo.
2017-09-13 09:42:16 +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
Shams Asari
0a41a0fd8c Moved CountryCode into internal and cleanup of CordaX500Name validation 2017-09-12 13:26:59 +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
Shams Asari
9d76c66e5e Cleanup of FinalityFlow 2017-09-11 20:34:36 +01:00
Viktor Kolomeyko
64963d587c CORDA-540: Expose and fix AMQP serialization problem with UniquenessException (#1470) 2017-09-11 18:43:26 +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
Maksymilian Pawlak
67642d1b22 Merge pull request #1482 from corda/m4ksio_raft_notary_fix
Raft Notary Demo fix
2017-09-11 17:47:02 +01:00
Maksymilian Pawlak
ffc00e1f81 Raft Notary Demo fix 2017-09-11 17:15:01 +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
cburlinchon
10c4d46b97 Add delay to macos script startup (#1462) 2017-09-11 15:23:03 +01:00
cburlinchon
cd0d2f370e Simm demo fixes (#1475)
* Fix country code, needs to be 2 letters (#1468)

* Fix x500 name in simm (#1468)
2017-09-11 14:43:55 +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
c269642fcf Minor: Legal name validator checks org name length is less than 128, not 127 2017-09-11 12:11:26 +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
Shams Asari
4c3ac89d6b Try.Failure is no longer parameterised on Nothing, to avoid any issues with Java 2017-09-10 14:54:32 +01:00
Ross Nicoll
f76ce0f0ce CORDA-499: Move JavaFX Models functions into Models (#1430)
* Move JavaFX Models functions into Models so that there isn't an empty ModelsKt class generated
for Java interop.
* Move Models functions into their own file as pushing them into the Models class requires significant changes to the Explorer.
2017-09-08 17:30:06 +01:00
Ross Nicoll
4e18937326 CORDA-499: Restructure TransactionGraphSearch to be Dokka-friendly (#1409)
* Remove internal state of TransactionGraphSearch from being publicly visible.
* Add Dokka comments for TransactionGraphSearch.Query values.
* Move query into TransactionGraphSearch constructor as it should always be set except for test cases.
* Move TransactionGraphSearch into trader demo
2017-09-08 17:27:01 +01:00
Viktor Kolomeyko
0edaea81d2 CORDA-540: Add a property to make sending stacktraces optional in AMQP mode (#1458) 2017-09-08 17:25:42 +01:00
josecoll
628d94c070 Redefine VaultSchema attribute of serialized Contract state to LOB (unconstrained size) (#1459) 2017-09-08 16:14:31 +01:00
Maksymilian Pawlak
069e31d006 Don't start Corda webserver if no webAddress has been defined for a node (#1434)
Don't start Corda webserver if no webAddress has been defined for a node
2017-09-08 15:25:20 +01:00
Ross Nicoll
8aaac437c0 Remove unneeded identity registration (#1428)
Remove unneeded identity registrations from tests, which sometimes cause duplicated entries in the database
2017-09-08 14:41:52 +01:00
Ross Nicoll
df87731043 CORDA-499: Dokka 'Kt' class cleanup (#1433)
* Remove unneeded identity registrations from tests, which sometimes cause duplicated entries in the database
* Add JvmName annotations to ObservableFold and ObservableUtilities
* Move createMapChange() into ReadOnlyBackedObservableMapBase as the only place it's used, to
improve Java interop.
* Clean up Generator by moving extension functions into the class/companion class.
* Add documentation to the actual functions rather than being only on the top level class. 
* Add JvmName to Generators
* Move extension functions into the classes they're used in to try supressing generation of empty RPCClientProxyHandlerKt class.
* Add JvmName to ConcurrencyUtils
* Move Iterable<ServiceInfo>.containsType() into Simulation, as it's only useful when verifying
setup of a simulated case. Resolves ServiceInfoKt class being generated.
* Move FlowHandle.notUsed() into the one place it's actually called, so Kotlin stops creating a FlowHandleKt class.
2017-09-08 14:37:18 +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
Rick Parker
691d9ea0bc Correctly unwrap MissingAttachmentException. (#1454) 2017-09-08 13:41:53 +01:00
Joel Dudley
88a6002246 Allows flow exceptions in CheckTransaction. 2017-09-08 13:21:48 +01:00
Rick Parker
41a94d1624 Fix IrsDemoTest for days that have a fixing. (#1456) 2017-09-08 13:15:04 +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
Rick Parker
79f1e1ae7f Introduce current context concept for serialization in preparation for WireTransaction changes (#1448) 2017-09-08 08:16:38 +01:00
Rick Parker
6bf2871819 Change descriptor name from string to symbol on the wire to adhere to section 1.5 of the AMQP 1.0 spec (#1423) 2017-09-07 17:05:39 +01:00
Andrzej Cichocki
879b1a6393 Tutorial runExampleClientRPC is now runExampleClientRPCKotlin. (#1446) 2017-09-07 15:00:03 +01:00