Commit Graph

81 Commits

Author SHA1 Message Date
Chris Rankin
8e507d0b88
CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
Michele Sollecito
fae0dc0276
[CORDA-1216]: Moved dependency on Jackson Databind from core to finance. (#2802) 2018-03-13 14:51:55 +00:00
cburlinchon
311475a81c Switch to using our own quasar fork with thread leak fix (#2443)
* Switch to using our own quasar fork with thread leak fix

* Update quasar.jar in lib

* Review changes

* Bump to 3.0.7
2018-02-14 17:32:00 +00:00
Andrzej Cichocki
1902a4f11e
CORDA-973 Refactoring for serialization compression support (#2466)
* Use constant for empty byte array
* Less byte array copying
* Fix InputStreamSerializer trailing garbage
* More OO kryo streams
* Introduce SerializationMagic
* Introduce non-copying slice on ByteSequence
2018-02-09 11:54:07 +00:00
Shams Asari
5c53a91785 Overhaul of the Bank of Corda demo to fix two problems it had:
1. The runRPCCashIssue and runWebCashIssue gradle tasks didn't work because they were using the wrong ports
2. Notary lookup was failing because the lookup name didn't include the correct CN for the notary name (this slipped through when reverting the network parameters)

The ports change occurred in #1922 which was attempting the fix the runIssuer gradle task. This is actually a misleading and redundant task as all it does is start up the nodes, which is what the documented deployNodes already does. The ports runIssuer allocated to the nodes were different to the ones specified in deployNodes.

To make sure we have integration tests which closely match deployNodes, the BoC demo has been updated to make use of CordformDefinition. This keeps the node definitions in one place, removing the need to have disparate files in sync. runIssuer has been removed.
2017-11-29 14:48:05 +00:00
josecoll
f5c9fd8f44
Cross provider Issuer Reference database storage (#2032)
* consistent storage of Issuer Reference using `ByteArray` Kotlin type in Schema definition and a custom Hibernate Type to map this to a VARBINARY database type.
Creation of a new Issued type now also validates maximum size permissible (512).
2017-11-17 14:18:16 +00:00
Shams Asari
837e8800e8 Checking that the smoke tests don't have the node on their classpath. 2017-11-02 20:58:03 +00:00
Chris Rankin
1e12aebe0a Gradle API Scanner plugin (#1669)
* Skeleton plugin.
* Implement Gradle api-scanner plugin, and apply it.
* Generate API documentation for any jar without a classifier.
* Fix usage of smokeTests classifier.
* Tweak Gradle API usage.
* Upgrade to fast-classpath-scanner 2.7.0
* Include interfaces and more modifiers in the class description.
* Allow system classes to be supertypes and implemented interfaces.
* Make API Scanner plugin configuration tweakable via build.gradle.
* Add a miserable amount of unit testing.
* Sort methods and fields using their natural comparators. Way easier!
* Add README for api-scanner plugin.
* Add @OutputFiles to ScanApiTask.
* Rename ScanApiTask to ScanApi.
* Allow the ScanApi task to be disabled.
* WIP: Create a top-level GenerateApi task to collate the ScanApi output.
* Exclude package-private classes, as well as bridge/synthetic methods.
* Replace "End of Class" delimiter with '##'.
* Don't scan modules whose API is still "in flux".
* Include constructors in the API definitions.
* Finish implementation of GenerateApi task.
* Update README to include GenerateApi task.
* Filter out Kotlin's "internal" methods.
* Assign "fatjar" classifier to the fat jar artifact.
* Enhance README for GenerateApi.
* Explain effect of api-scanner plugin, and link to Corda's API strategy.
* Tweak README
* Exclude synthetic Kotlin classes by analysing @Metadata.
* Allow us to exclude some classes explicitly from the API.
2017-09-29 16:55:26 +01:00
Andrzej Cichocki
15f741f315 Spinoff driver into own project with demorun (#1401) 2017-09-05 09:50:51 +01:00
mkit
30687592c2 Making Quasar Jar to be copied from dependencies after the gradle build (#1388)
* Making Quasar Jar to be copied from dependencies after the gradle build

* Addressing review comments
2017-09-05 07:47:35 +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
Andrzej Cichocki
cd0ab40b2e Core doesn't need a compile dep on guava (#1283) 2017-08-29 09:56:26 +01:00
josecoll
a2ede0fc73 Requery removal (#1276)
* Removed Requery object relational mapping usage (and associated schemas including node-schemas module)

* Fixed issues with NodeAttachmentService tests.
Cannot use JPA custom converters with Primary Key fields.
Hibernate entities require explicit call to flush() to persist to disk.

* Removed redundant requery converters (equivalents not even required in Hibernate).

* Removed remaining gradle requery dependency definitions.

* Fixed broken tests.

* Fixes for failing NodeVaultService tests:
- Dynamic SQL updates (in soft locking code)
- Explicit request by session to participate in transaction (causing "TransactionRequiredException" Executing an update/delete query)
- Explicit flush() required to persist to disk

* Updated changelog.
Fixed compiler warning.

* Fixed WHERE clause AND/OR condition.
Enforced immediate data visibility through transaction commit.

* Final fixes to address failing tests.

* Deferred all hibernate session/txn management to DatabaseTransactionManager.

* Fixed transaction boundaries in failing Cash tests.

* Fixes to address failing tests (transaction boundaries, merge detached object, config clean-up).

* Final adjustment to transaction boundaries in JUnit tests.

* Refactored AttachmentSchemaV1 into NodeAttachmentService itself and referenced from NodeServicesV1.

* Refactored HSQL UPDATE statements to use CriteriaUpdate API.

* Updated all criteria API getters to reference attribute names by type.

* Remove redundant VaultSchema entity name (required when previously using HSQL UPDATE syntax)

* Fix compiler warnings.

* Minor changes following rebase from master.

* Fixed suppress warning type.
2017-08-21 10:42:59 +01:00
Viktor Kolomeyko
5864a22d05 Move dependency on "proton-j" library from "core" sub-project to "node-api" 2017-08-18 09:49:46 +01:00
Andrius Dagys
43adbfd66c Remove junit-quickcheck and redundant generators 2017-08-15 11:12:02 +01:00
Rick Parker
28610868c4 Remove Kryo from core module completely, including gradle dependencies (#1161) 2017-08-09 14:53:46 +01:00
Clinton
32ee332d16 Fixed publishing to artifactory for core (#1183)
Test common needs to be published by artifactory.
2017-08-09 11:06:25 +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
josecoll
f8ad5c9d10 Vault Query Service JPA implementation (#840)
* Vault Query Service API implementation using JPA Hibernate

Added queryBy(QueryCriteria) Vault API and Junit tests.

Minor cosmetic API changes following rebase.

Fixes following rebase from master

Upgraded to requery 1.3.1

WIP - removed 'latestOnly' from LinearStateQueryCriteria

WIP - CommercialSchemas V2, V3, V4 testing

WIP - sort out generics handling.

WIP - most general queries completed.

WIP - join queries, contractStateType derivation

WIP - refactoring Requery

WIP - refactored VaultService to extract a VaultQueryService interface (and associated Requery implementation).

WIP - HibernateVaultQuery implementation

WIP - Re-structured all Schema definitions (requery/jpa) and make Hibernate Config reusable.

WIP - Multi-version schema testing, hibernate query testing.

WIP - Custom Criteria and Fungible Criteria impl & testing.

WIP - Kotlin Comparable Generics error

WIP - Party queries all working now

WIP - All VaultQueryTests now working (refactored for AND / OR composition)

WIP - added schema registration in CordaPluginRegistry to enable custom vault queries on arbitrary schemas.

WIP - added new default Sort NULL order to be NONE + added lots more tests for Logical Operator testing.

Mostly identity fixes following rebase from master.

Exception handling and public API cleanup in prep for PR.

Additional tests for Logical Operators; additional tests for NULLS sort ordering; additional logging;

Additional parser to handle Nullable attribute values; added Unary and Collection logical expression handlers

Lots of cleanup: participants; trackBy interfaces; additional fungible tests; parser cleanup and improved support for Java

Removed all traces of Requery implementation.

Further minor cleanup and Junit test fix.

Final identity and schema related identity clean-up.

Revert unrelated changes.

PR review updates: blank lines, isRelevant.

Fixed wiring of updatesPublisher for dynamic trackBy queries.

PR review changes: multi-versioned schema samples and associated dummy contracts moved to test packages.

Fixed problem with sorted queries (not specifying any filterable criteria).

PR review: minor updates to address RP comments.

Typesafe custom query criteria

Cleanup: remove redundant tests.

Further clean-up and make all Java test work successfully.

Remove debugging print statements.

Rebased from master - changes required due to DealState module change.

fixed broken assertion caused by DealState ordering change (different package)

Fixed transaction demarcation issue causing "java.lang.IllegalStateException: Was not expecting to find existing database transaction on current strand"

trackBy() now filters on ContractType and StateStatus (CONSUMED, UNCONSUMED, ALL)

Added tests to exercise RPCOps trackBy and queryBy (RPC smoke test and CordaRPCOps)

Added additional @CordaSerializable annotations.

Updated documentation and referenced sample code.

Added deprecation annotations.

Re-added missing deprecation annotation.

Hibernate debug logging is now configurable and disabled by default.

Introduced common Sort attributes based on the node schemas.

Completely removed NULL_HANDLING sort parameter as this is not supported in JPA.

Revisited and fixed usage of @CordaSerializable.

* Minor fix following rebase from master.

* Remove blank line as per RP PR feedback request.

* Minor Java documentation and example clean-up.

* Disable BFT Notary Service tests.
2017-06-22 10:35:49 +01:00
Clinton
08cbcac40c Corda publications and JARs now have cord or corda at the start. (#749)
Core corda publications and JARs now have cord or corda at the start (excluding gradle plugins). Removed an unnecessary dependency on test-utils in node-schemas to prevent an evaluation order bug in gradle.
2017-06-06 15:05:47 +01:00
Rick Parker
d3f027cea8 Custom serialiser support for AMQP (#741) 2017-05-31 18:33:57 +01:00
Andrzej Cichocki
c8d71a96f5 One demo definition for both IntelliJ and gradle (#697)
* Raft notary demo now defined in one place that both IntelliJ/driver and gradle/runnodes can run
* New module cordform-common for code common to cordformation and corda
* Add single notary demo
2017-05-18 15:58:35 +01:00
Rick Parker
18a0df4239 AMQP serialisation: Part 1 (#581)
Also turns on `-parameters` for java compiler
2017-05-05 12:14:02 +01:00
Matthew Nesbit
7e3b9a8934 Fix duplicate content root problems in IntelliJ 2017-04-26 10:37:16 +02:00
Konstantinos Chalkias
2ff8d14491 add EdDSA Provider and update i2p dependency to 0.2.0 2017-04-25 18:19:28 +01: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
Chris Rankin
b3936a2159 Exclude commons-logging for all projects at top level. (#473) 2017-03-30 20:59:50 +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
Rick Parker
8ef1d767c9 Consolidate maven repositories (#445)
* Consolidate repositories into root build.gradle
2017-03-28 17:17:40 +01:00
Chris Rankin
19ee4f2d7b Create testArtifacts configuration for 'core' module. (#425) 2017-03-24 13:33:54 +00:00
Chris Rankin
eaf9dad7c9 Remove junit-quickcheck from Corda because it is only used for testing. (#416) 2017-03-23 17:32:14 +00:00
Chris Rankin
98266da41c Refactor CordaRPCClient into new :client:rpc Gradle module. (#405)
* CORDA-305: Refactor CordaRPCClient into :client:rpc module

* CORDA-305: Remove the Kotlin test framework from the artifacts.

* CORDA-305: Migrate serialisation whitelist into node-api module.

* CORDA-305: Clean up unused RPC observables.

* CORDA-305: Add :client:rpc module to documentation tasks.

* CORDA-305: Include :finance into :client:rpc for its serialisable classes.

* CORDA-305: Move test classes into the correct directory.

* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.

* CORDA-305: Update wording of TODO about handling Observables.
2017-03-22 15:52:54 +00:00
Chris Rankin
d415865efe Explicit dependency on SLF4J API, to help IntelliJ. (#393) 2017-03-20 17:04:39 +00:00
Clinton Alexander
f091659b7c Updated JAX RS to the actual version that is downloaded to avoid mismatches with the dependencies zip. 2017-03-14 16:08:30 +00:00
Chris Rankin
ba4cce36ab Use SLF4J's version of the commons-logging bindings. Only include SLF4J's Log4J back-end for actual applications, e.g. Node. (#350) 2017-03-13 15:57:17 +00:00
Chris Rankin
0a5080a4e4 Exclude old version of Javassist in favour of Hibernate's version from Node. (#320)
* Exclude old version of Javassist in favour of Hibernate's version.

* Comment why we are excluding javassist:javassist, and add TODO for when junit-quickcheck 0.8 is released.
2017-03-07 11:43:06 +00:00
josecoll
fa33336d38 Initial implementation of Vault Persistence using Requery (#191)
* Initial prototyping with Requery as a persistence replacement for Exposed/Hibernate

Applied changes following PR review by RP

Updated timestamp naming (removed committedTimestamp) and StateStatus (removed AWAITING_CONSENSUS) after discussion with RP.

Removed FungibleState and LinearState schemas (and associated tests) - awaiting Requery uni-directional relationship fix.

Added Transaction propagation such that requery re-uses any existing transaction context.

Made requery default logging configurable (disabled by default)

Nullable fields are now truly nullable (in the Kotlin and DDL sense)

Fix for SimmValuation integration test.

Workarounds applied to resolve Requery issues when sharing Transactional context.

Addressed PR review comments from MH.

Further updates following re-review by RP/MH

Further updates following additional PR review comments by RP

Minor update following additional PR review comments by RP

Optimised makeUpdate state processing code.

Resolved conflicts after rebase.

Additional Unit tests and bug fix for correct spending of multiple contract state types within a single transaction.
Required interface change to states() API to take a setOf (ContractStateClassTypes)

Minor code clean-up.

Re-write NodeVaultService consumed state makeUpdate function using SQL.

* Resolve conflict after rebase from master
2017-02-16 11:02:36 +00:00
Rick Parker
592ac07af0 Upgrade reactivex.rxjava version to latest 1.x (#111)
Update rxjava version and fix thread safety of database transaction boundary subject.
2017-01-06 10:26:44 +00:00
Mike Hearn
119d00c384 Upgrade dependencies and centralise some more version numbers in the root gradle file 2017-01-04 15:44:56 +01:00
Clinton Alexander
b24c628e34 Publications now publish JARs again. Install task now publishes again. 2016-12-06 16:06:16 +00:00
Clinton Alexander
bf49dda731 Corda now publishes with updated publish utils. 2016-12-06 16:06:16 +00:00
Clinton Alexander
6ecbe1f1fd Added finance publishing. 2016-12-06 16:06:16 +00:00
Clinton Alexander
57f2be51b8 Added core publishing. 2016-12-06 16:06:16 +00:00
rick.parker
8ec21eedb3 quasarScan removal. 2016-11-24 16:27:51 +00:00
Clinton Alexander
bf70091172 Now depending on the plugins in jcenter and not buildsrc. 2016-11-18 14:41:06 +00:00
Clinton Alexander
14ca7847d0 Publishing to jcenter possible via bintrayUpload (with the correct credentials) and corda now has a dependency on the published gradle plugin to allow the split. 2016-11-18 13:02:04 +00:00
Shams Asari
bd89da458b Added nice extension methods for Path, which are more readable than the static methods from Files 2016-11-04 15:36:14 +00:00
Clinton Alexander
7d08c0b068 Removed attachment demo.
Added ApiUtils - a library for managing api lifecycles with less boilerplate.

Added default values to http api and improved the api utils.

Fixed spacing and comments.

Removed withName and added a bad request response to handle error cases.

Replaced use of 400 error with a 404 and error message as per HTTP spec.
2016-11-01 11:53:49 +00:00
Clinton Alexander
d85c82d505 Replaced maven plugin with the newer, simpler, maven-publish plugin and added an alias. 2016-10-11 13:05:46 +01:00
Clinton Alexander
38ba8c8759 Merge branch 'clint-cordamaven' 2016-10-05 11:44:11 +01:00