Commit Graph

764 Commits

Author SHA1 Message Date
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
Mike Hearn
3f7f05a0d9 DemoBench: better autocomplete and flags for city list 2017-04-24 15:52:22 +02:00
Mike Hearn
dec2c82693 Switch to using Antony's list of country coordinates, and load country code of each city. 2017-04-24 15:52:22 +02:00
Antony Lewis
1a2fe41330 Update cities.txt to go with CORDA-367
Assuming that Autocomplete will be added, according to JIRA https://r3-cev.atlassian.net/browse/CORDA-367
Note that there are still a few duplicates in the source with slightly different coordinates.  I assume the autocomplete will be able to cope, or these can be removed.
2017-04-24 15:52:22 +02:00
Mike Hearn
a90b2ba839 DemoBench: UI improvements, part uno 2017-04-24 15:52:22 +02:00
Patrick Kuo
87dd99d968 legal name validator for doorman node registration (#532) 2017-04-24 21:16:00 +08: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
Konstantinos Chalkias
c692a39e62 generateKeyPair() calls Crypto.kt implementation
generateKeyPair() calls Crypto.kt implementation Vs the EdDSA specific.
2017-04-20 14:18:41 +01:00
josecoll
d24f0ea0ba Fix incorrectly referenced public key. (#559) 2017-04-20 11:11:36 +01: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
Shams Asari
37a94237c8 Moved tests in net.corda.node.services to correct packages 2017-04-19 12:11:59 +01:00
Konstantinos Chalkias
66890d845a Extract methods and classes from CryptoUtilities. Keep one utils file. 2017-04-18 12:36:57 +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
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
gary-rowe
108f171e03 Replace 'by' with 'using' to avoid overloading Kotlin keyword in contracts DSL. Deprecates 'by' with offered replacement. 2017-04-12 12:27:02 +02: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
4853e41a58 Minor: inspector fixes 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
d9391b3d29 Minor: auto-format of module: core 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
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
Shams Asari
faef877a8d Converted sealed data types to be data classes 2017-04-04 11:37:56 +01:00
Konstantinos Chalkias
dbd82705aa Artemis - allow attachments to a maximum of 10MiB including any headers. (#452)
Allow attachments to a maximum of 10MiB including any headers.
2017-04-03 18:42:21 +01:00
josecoll
413e39903d Fixed bug whereby Cash Exit was not taking into account the issuer reference (#492)
* Fixed bug whereby Cash Exit was not taking into account the issuer reference.
Added additional JUnit tests for coin selection by issuer.
Added some trace logging in AbstractConserveAmount.

* PR review: added additional state with 3rd issuer reference in test.
2017-04-03 17:51:56 +01:00
Patrick Kuo
3327517d61 [M10 Fixes] - fixes enum - json conversion problem in kotlin 1.1.1 (#495) 2017-04-03 17:30:56 +01:00
Patrick Kuo
bf90b140c1 [M10 Fixes] - remote debug flag fix (#494) 2017-04-03 16:16:31 +01:00
Shams Asari
e0c548d4fa Cleaned up code causing build warnings 2017-04-03 13:52:51 +01:00
Ross Nicoll
30dd29752c Clarify exceptions thrown from loading a key store
Clarify exceptions thrown from loading a key store as a general cleanup. Also tightens the
exceptions caught when loading key stores from AbstractNode, so in case of an unexpected error
we don't silently drop the exception.
2017-04-03 13:41:40 +01:00
Matthew Nesbit
51c7f6ca30 Merge pull request #453 from corda/mnesbit-amount-improvements
Modify the Amount concept to allow conversion to from displayable formats
2017-03-31 14:37:32 +01:00
josecoll
73c0fdc118 CashExitFlow now uses coin selection with soft locking. (#481) 2017-03-31 11:47:59 +01:00
Konstantinos Chalkias
d72b75caa4 Observable.subscribe().unsubscribe() and ListenableFuture.cancel() (#397)
Observable.subscribe().unsubscribe() dance to free up the MQ resources server-side.

* remove an unused import

* implement a FlowHandle<Transaction>.finalize method

* Rename finalize() to discard() - remove the collection and run discard individually

* Remove unused imports

* Observable.notUsed helper function

* Tweaks to comments

* FlowHandle implements AutoClosable

* Resolving conflicts and move notUsed to RPC module

* Copy Observable.notUsed in core module.

* delete discard method
2017-03-31 10:08:12 +01:00
Chris Rankin
b3936a2159 Exclude commons-logging for all projects at top level. (#473) 2017-03-30 20:59:50 +01:00
Patrick Kuo
c7e5cf5079 Fixed : Message value in NotaryException is always null (#470) 2017-03-30 16:59:23 +01:00
Chris Rankin
f15a22d828 Replace kotlinx-support-jdk8 with kotlin-stdlib-jre8. (#463)
* Replace kotlinx-support-jdk8 with kotlin-stdlib-jre8.
* Add kotlinVersion to constants.properties.

* Remove unused variable.
2017-03-30 16:27:01 +01:00
Matthew Nesbit
cedfc4e1ad Add a concept of token size to Amount<T> so that conversion to/from indicative and displayable BigDecimal works sensibly
Add an AmountTransfer type to express the concept of asset flows.

Unify the currency amount creators and fix a few old style display conversions in teh explorer cash dialogs.

Modifications according to PR comments.

Change TransferAmount display string as it may not always be a payment.

Update docs
2017-03-30 16:16:11 +01:00
Patrick Kuo
78a0024e00 Fix various deprecated warnings
* Changed deprecated kotlin.reflect.primaryConstructor to kotlin.reflect.full.primaryConstructor
* Changed deprecated kotlin.reflect.memberProperties to kotlin.reflect.full.memberProperties
* Changed deprecated kotlin.reflect.declaredMemberProperties to kotlin.reflect.full.declaredMemberProperties
* Changed deprecated AllComposition to AllOf
* Changed deprecated AnyComposition to AnyOf
* Changed deprecated kotlin.reflect.KotlinReflectionInternalError to kotlin.reflect.jvm.internal.KotlinReflectionInternalError
* Changed deprecated HostAndPort.hostText to HostAndPort.host
* Removed duplicated method net.corda.core.node.recordTransactions
2017-03-30 10:00:46 +01:00
Matthew Nesbit
062dc67ab6 Add Any constraint to Amount token
Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
2017-03-29 17:11:30 +01:00
Matthew Nesbit
e0a2c76f39 Remove unnecessary parameters to copy()
Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
2017-03-29 17:11:30 +01:00
Patrick Kuo
9a7d0a0fb5 Replace unused variables with _ after kotlin 1.1.1 upgrade (#456)
* Replace unused variables with _ after kotlin 1.1.1 upgrade
2017-03-29 13:54:40 +01:00
josecoll
7eada1408e Reduce warning and info messages in node log files (Artemis) (#449)
* Reduce warning and info messages in node log files (Artemis)
Add an additional lof message for conflicting states identified by the Notary.

* Upgraded severity of user login message from trace to debug.

* Suppress Artemis log4j WARNING's for core.server.checkDeadLetterAddressAndExpiryAddress
2017-03-29 11:40:19 +01:00
josecoll
3497e42f7c Upgrade to Requery 1.2.1 with Composite Key support (#443)
* Test SELECT WHERE IN composite key using requery 1.2.0

Upgraded Vault Service code to use Requery 1.2.0 SELECT .. WHERE IN

Updated generated schema code with Requery 1.2.0

Upgrade to Requery 1.2.1

Upgrade to Requery 1.2.1 - converted to use update DSL with composite key
Removed redundant JDBC SQL test cases.

Minor updates following PR review comments from RP.

* Streamline companion object initialisation.
2017-03-29 10:51:02 +01:00
Matthew Nesbit
b75913c24a Merge pull request #451 from corda/mnesbit-fix-flaky-tests
Fixes some charset encoding and timing tests problems on windows
2017-03-28 18:21:29 +01:00