Commit Graph

3839 Commits

Author SHA1 Message Date
Matthew Nesbit
0fdd4ae6c6 Remove TransactionForContract and just use LedgerTransaction
Fix minor doc error

Get rid of @deprecated method that was only present for technical reasons.

Minor fix and include in changelog
2017-07-20 09:16:07 +01:00
Patrick Kuo
0e0b99eaf0 * Remove Kryo from ServiceIdentityGenerator (#1083)
* Store encoded private, public and composite key to file instead of Party and Key using Kryo.
2017-07-19 16:34:56 +01:00
Ross Nicoll
9d3ad5fe06 Remove dummy cash issuer from two party trade flows
Switch to using a dedicated bank node in two party trade flows so that when KYC checks are enforced, all nodes on the network know who the issuer is.
2017-07-19 16:00:14 +01:00
Shams Asari
070f0c040e Moved a bunch of stuff which shouldn't be public out of core.utilities and into core.internal 2017-07-19 14:09:03 +01:00
Ross Nicoll
c4c551dbd2 Confidential identities API improvements
* Registering anonymous identities now takes in AnonymisedIdentity
* AnonymousParty.toString() now uses toStringShort() to match other toString() functions
* Add verifyAnonymousIdentity() function to verify without storing an identity
* Replace pathForAnonymous() with anonymousFromKey() which matches actual use-cases better
* Add unit test for fetching the anonymous identity from a key
* Update verifyAnonymousIdentity() function signature to match registerAnonymousIdentity()
* Rename AnonymisedIdentity to AnonymousPartyAndPath
* Remove certificate from AnonymousPartyAndPath as it's not actually used.
* Rename registerAnonymousIdentity() to verifyAndRegisterAnonymousIdentity()
2017-07-19 14:03:34 +01:00
Ross Nicoll
298287fe28 Expand documentation on obligation contract
Expand documentation on obligation contract and add an example issuance function for cash obligations.
2017-07-19 13:34:28 +01:00
Patrick Kuo
264b9316e3 Store notaries's identity composite key in keystore (#1036)
* * Store composite key in keystore from file for notaries's identity.
* Some refactoring.

* * Addressed PR issues

* * Remove unintended format changes

* * Fixed failing test due to getting keys from wrong keystore
2017-07-19 11:14:48 +01:00
Konstantinos Chalkias
8a2074eeee Remove tolerance from TimeWindowChecker (#1047) 2017-07-19 12:33:57 +03:00
Andrius Dagys
cb306a22fe Modify NodeVaultServiceTest to not access makeUpdate() directly 2017-07-18 17:38:45 +01:00
Andrius Dagys
5501d74d29 Remove NotaryChangeTxBuilder from examples - it's being deprecated 2017-07-18 17:38:18 +01:00
Ross Nicoll
f571aeb6a7 Remove createTwoNodes()
Remove `createTwoNodes()` from mock network as its behaviour is inconsistent with creating a set of nodes. `createSomeNodes()` is generally a better fit and creates a network map and notary, and registers all nodes. Where that's not the intention, it's acceptable to manually create each node.
2017-07-18 16:54:32 +01:00
Shams Asari
2778e294f3 FiberBox and RetryableException removed as they're not used 2017-07-18 15:14:35 +01:00
Shams Asari
b0c299707b Moved DeclaredField utility to internal and expanded its use 2017-07-18 14:33:09 +01:00
Clinton
0ccfae252f POMs generated by publishing are now correct. (#1055)
* POMs generated by publishing are now correct. The publish extension now requires an explicit call to configure the publishing instead of waiting until after evaluation. This prevents evaluation order issues with the artifact renaming code that causes the POM to have the original, incorrect, artifact names.

* Fixed new test compile issues caused by removal of some dependencies in test utils that caused webserver code to be automatically included in any project also compiling test utils.
2017-07-18 12:34:56 +01:00
Shams Asari
561a329064 Moved the various extension methods for creating Durations from Utils.kt to KotlinUtils.kt 2017-07-18 10:26:53 +01:00
josecoll
65ce5fec4b Fixed Vault Query over RPC using custom attributes. (#1066)
* Implemented Kryo custom serializers for Field and KProperty types.

* Adjusted KPropertySerializer to use kotlin member properties upon read() due to failing RPC tests.
Added additional Kotlin and Java tests (CordaRPCClient, StandaaloneCordaRPCClient)
Annotated schemas to be CordaSerializable (required when referencing as KProperty in custom queries).
Cleanup some outstanding compiler warnings.

* Added client RPC Java integration and smoke tests to build.

* Clean up compiler warnings in Java tests.

* Fixed incorrect assertion expectation.

* Backed out Field and KProperty custom serializers.

* Backed out Field and KProperty custom serializers.

* Store VaultQueryCustom custom column references as name and class (from Java Field and Kotlin KProperty1 types respectively).
Custom serialization of Field and KProperty type no longer required.

* Removed blank lines as per RP review comments.
2017-07-17 18:20:02 +01:00
Matthew Nesbit
8596f1cc17 AttachmentClassLoader isn't directly exposed on the api, so move together with serialisation. (#1060) 2017-07-17 17:56:02 +01:00
Shams Asari
c62387f3f6 Fixed TransientProperty so that it actually works during (de)serialisation 2017-07-17 16:27:54 +01:00
Shams Asari
195189070a Moved the Path extension methods that were in Utils.kt into the internal package 2017-07-17 16:01:19 +01:00
Joel Dudley
b37c73827f Splits verifySigs into verifySigsExcept and verifyRequiredSigs to clarify usage. 2017-07-17 15:42:08 +01:00
Matthew Nesbit
7d1d5cc0f8 Merge pull request #1050 from corda/mnesbit-services-in-separate-files
Put Services.kt in separate files
2017-07-17 14:29:01 +01:00
Katelyn Baker
eeb66b68b8 Merge pull request #1005 from corda/kat-serialization
Integrate class synthesis with the serialisation framework
2017-07-17 12:58:53 +01:00
Joel Dudley
5df0de8ff7 Adds a tutorial showing multi-party communication. 2017-07-17 12:23:14 +01:00
Ross Nicoll
b7ee7d42a5 Enable anonymisation in integration testing tutorial
Enable anonymisation in integration testing tutorial, and as a requirement fix a bug where the counterparty anonymous
identity was not registered by `TransactionKeyFlow`.
2017-07-17 10:24:20 +01:00
Ross Nicoll
dfbf06a66d Flow cleanup
* Change "for who" to "for whom"
* Don't pass parties to FinalityFlow, it can derive them automatically
* Create a basket of nodes instead of individually assembling nodes
* Switch two party trade flow tests to generate a full anonymous identity
2017-07-17 10:24:20 +01:00
Matthew Nesbit
7a06d941c4 Put Services.kt in clear files, so that at a glance people can see what public services there are.
Fix include

Correct doc links after code movement
2017-07-17 09:34:07 +01:00
Andrius Dagys
7aafcf8c57 Prevent exception causes showing up as null in logs (#1018)
* Passing exception messages via constructor instead of overriding toString
2017-07-14 20:40:21 +01:00
Mike Hearn
a56540a3d6 Fix support for large attachments by de-batching tx/attachment fetch. This is a workaround until the upstream Artemis large message streaming bugs are fixed. 2017-07-14 18:21:33 +01:00
Mike Hearn
e83deb78ec Some small extensions to TestConstants to make setting up a driver-based test with them easier and less boilerplatey. 2017-07-14 18:21:33 +01:00
Mike Hearn
2fb187ec75 Docs: Add a note to the troubleshooting page about the -javaagent flag. 2017-07-14 18:21:33 +01:00
Mike Hearn
2cbdb719c6 Minor: move some test functions for making zips out of the global namespace. 2017-07-14 18:21:33 +01:00
Shams Asari
6ba3ae870c Merge pull request #1046 from corda/shams-flow-session-exception-rename
Renamed FlowSessionException to UnexpectedFlowEndException
2017-07-14 17:10:08 +01:00
Ross Nicoll
42f217f212 Add extension hooks to FinalityFlow
Add extension hooks to FinalityFlow to support different behaviours depending on whether the node knows who all of the parties in a transaction are.
2017-07-14 16:54:39 +01:00
Katelyn Baker
0bfe1de3ba Review comments
* Rename some functions to more descriptive names
 * Remove some egregious whitespace
 * Revert some changes that were a dangling holdover from an aborted
   refactoring - put it back how it was
2017-07-14 15:21:46 +01:00
Shams Asari
ae01d658b6 Renamed FlowSessionException to UnexpectedFlowEndException 2017-07-14 15:14:54 +01:00
Chris Rankin
729eaed362 Update DemoBench packager scripts to fail when packaging fails. (#1023) 2017-07-14 14:53:09 +01:00
szymonsztuka
05327f3826 decouple Exposed (#1028)
Exposed library decoupled from transaction management and JDBC connection creation for Hibernate and ReQuery
2017-07-14 14:39:59 +01:00
Andrzej Cichocki
1996c39b9a Disable the BFT tests. (#1051) 2017-07-14 14:06:59 +01:00
Matthew Nesbit
968cb08d9d Merge pull request #1039 from corda/mnesbit-fix-trader-demo
Fix a couple of tests
2017-07-14 10:58:51 +01:00
Katelyn Baker
f19ec4e3ba Review comments
* Move all alterations on the amqp schema object out of the actual
  amqp/Schema file and have them live in the carpenter as extension
  functions
* Move carpenter exceptions to their own file
* Rename the schema name corrupter to the name mangler
* reduce whitespace
* alter comment style
2017-07-14 10:41:05 +01:00
Katelyn Baker
86902e6356 Review comments
* Move all alterations on the amqp schema object out of the actual
  amqp/Schema file and have them live in the carpenter as extension
  functions
* Move carpenter exceptions to their own file
* Rename the schema name corrupter to the name mangler
* reduce whitespace
* alter comment style
2017-07-14 10:40:48 +01:00
Katelyn Baker
5ab26dd275 Update to account for nullability awareness in the carpenter 2017-07-14 10:38:29 +01:00
Katelyn Baker
c29673a4a4 Tidy up 2017-07-14 10:35:33 +01:00
Katelyn Baker
4dd37f009e Integrate with the carpenter now it's in core 2017-07-14 10:35:33 +01:00
Katelyn Baker
9ab6a72ea8 Carpenter bug fixes
Squashed commit messages:
	* Nested schema creation now works with dependencies recursvly created in
	  the carpenter

	* Remove spurious prints from tests

	* Remove warnings

	* Don't add cladd member dep by name

	  Since that's the name of the field, not the type we depend on. If we do
	  we'll never actually be able to craft the type as the dependency chain
	  will be horribly broken

	  Various bug fixes

	* Fix merge issue where types weren't being seen as Prims

	* IntelliJ auto code cleanup / reformat

	* Whitespace changes

	* Add comment blocking as I like seeing it in files
2017-07-14 10:35:33 +01:00
Katelyn Baker
d76c1e75a4 Carpenter / amqp syntesis tidyup
- squashes a lot of WIP / rebase / code reformat commits
2017-07-14 10:35:33 +01:00
Katelyn Baker
b4a62722fc Add recursive dependency resolution to schema generation
A complete amqp schema can now be used to generate a set of carpetner
schemas representing all of the classes not found on the deserialzing
end.

A dependency and depdendent chain is setup such that all classes are
created in the order required

Squashed commit messages:
	* IntelliJ reformat of the code

	* Merge the interface synthesis changes and rebase onto the tip of master

	  Somethign is very broken in the AMQP -> Carpenter schema code but want a
	  commit so I at least know the actual carpenter is merged

	* Nested schema creation now works with dependencies recursvly created in
	  the carpenter

	* Unit test fixes

	* Remove spurious prints from tests

	* Remove warnings

	* Don't add cladd member dep by name

	  Since that's the name of the field, not the type we depend on. If we do
	  we'll never actually be able to craft the type as the dependency chain
	  will be horribly broken

	  Various bug fixes
2017-07-14 10:35:33 +01:00
Katelyn Baker
ce172887d0 Unit Tests for the amqp -> carpenter schema
Squahed commit mesages:
	* Better tests
	* WIP
	* WIP
2017-07-14 10:35:00 +01:00
Katelyn Baker
4cbf31681b Initial work towards integrating the serializer with the carpenter
Unit tests that pull out the envelope from a deserialsed object (which
we have already serialised) then using the AMQP schema contained within
convert that to a carpenter schema and build an object

Currently testing only simple classes with a single type member

Squashed merge commits:
	* Fix for the type issue in the SerializerFactory

  	  Needs to pull in the actual Java types otherwise we use the Kotlin types
	  as the map keys which will never correspond to the java types that the
	  wrapper wraps around the primitive before doing a map lookup

	  Boolean just doesn't seem to work as pulling that in starts breaking
	  Kotlin and Character also seems broken. There is a fix for this also on
	  Rick's branch so pushing this in for now and can use his actual changes
	  when they're available on Master

	* Better tests

	* Add support for sub classes known to the JVM

	* Initial work towards integrating serializer with the carpenter

	  Unit tests that pull out the envelope from a deserialsed object (which
	  we have already serialized) then using the AMQP schema contained within
	  convert that to a carpenter schema and build an object

	  Currently testing only simple classes with a single type member
2017-07-14 10:28:36 +01:00
Matthew Nesbit
e919d23d1f Fix a couple of tests that fail after the broadcast phase of finality flow has returned.
Remove redundant namespace on symbol
2017-07-14 10:15:28 +01:00