Commit Graph

132 Commits

Author SHA1 Message Date
Joel Dudley
ff8471341f
Removes Log4J from Core. Readds to shell where required. (#3257)
* Removes Log4J dependency from `core`.

* Adds dependency on Log4J directly to shell. Missing colons.
2018-06-04 23:24:36 +01:00
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
rick.parker
ec975b0426 Hibernate ORM implementation for states. 2016-10-05 11:40:27 +01:00
Clinton Alexander
3612bee6f7 Fixed a syntax error in gradle file. 2016-09-30 10:57:20 +01:00
Clinton Alexander
6a669b6aad Added a line that was accidentally removed. 2016-09-30 10:57:20 +01:00
Clinton Alexander
9a4cc04eb5 Moved source and javadoc publish tasks into a default publish tasks plugin. 2016-09-30 10:57:20 +01:00
Clinton Alexander
f13a21cc6c Can now publish corda to local repo with gradle publishToMavenLocal 2016-09-30 10:57:20 +01:00
Andras Slemmer
89a5448c39 node, core: Add quickcheck generators for basic types, transactions 2016-09-06 13:54:58 +01:00
Ross Nicoll
232db9a1fd Move test utilities into their own package
This moves a lot of the test support code into its own package which is only imported for tests,
so it's not shipped as a part of core Corda. The node currently depends on this support code to
compile, although future work could try to separate this out. This change highlights that parts
of production code is dependent on test elements (i.e. dummy keys), and makes it harder for
such accidental crosses to occur later.

An integration test category is also added as part of this work, to contribute towards COR-345.
2016-08-31 15:40:54 +01:00
Mike Hearn
3d391ec8c2 Add unit tests for the resolve transactions protocol 2016-08-12 17:14:54 +02:00
Clinton Alexander
188fc29436 Cleaned up build.gradle files. 2016-07-28 09:17:49 +01:00
Matthew Nesbit
e3aef96b09 Merge remote-tracking branch 'remotes/origin/master' into mnesbit-cor-261-artemis-over-ssl
# Conflicts:
#	build.gradle
2016-07-27 15:43:01 +01:00
Matthew Nesbit
00f897d58d Add X509 creation and manipulation utilities to core and enable SSL in ArtemisMQ 2016-07-26 10:35:54 +01:00
Andrius Dagys
e7ff5b8f6f Typo fix 2016-07-22 17:31:03 +01:00
Andrius Dagys
2142bd1d8a Added Log4j bindings for SLF4J. Test log output is redirected to the console, and demo output is now additionally stored in a rolling log file. 2016-07-22 16:15:00 +01:00
Mike Hearn
ad3e9be1c8 Add a version number to gradle and allow "gradle install" to install the core module to the local Maven repository. 2016-07-07 13:59:55 +01:00
Mike Hearn
6fb7e59b91 Upgrade dependencies, July edition. 2016-07-06 13:56:22 +01:00
Andras Slemmer
dc5da8e1ad build: use QuasarPlugin instead of copypasta 2016-06-17 10:16:46 +01:00
Andras Slemmer
9930e8d5c7 core: add net.i2p.crypto:eddsa dependency 2016-06-16 17:03:44 +01:00
Ross Nicoll
4744740913 Add NonEmptySet
Add a new set-like collection which is constrained to ensure it's never
empty.
2016-05-24 15:39:24 +01:00
Matthew Nesbit
69cba98ddc Push unit tests that needed some contract functionality into core by embedding the minimal contract support needed. 2016-05-20 16:43:02 +01:00
Matthew Nesbit
f6f56797ce Refactor code into clear core, contracts and node namespaces. Move services into clear implementation and api sides. Push unit tests down to lowest level of dependency hierarchy possible. 2016-05-20 16:42:59 +01:00
rick.parker
041aab5af0 Serialization tokenization support for large objects (e.g. entries in ServiceHub) 2016-05-18 10:25:50 +01:00
Mike Hearn
e91c46f045 Rewrite the AttachmentsClassLoader to avoid temporary file copies and fix the overlap check.
Throw a specialised exception that lists missing exceptions during deserialisation, so the dependency resolution code can access it (coming up).
2016-04-14 17:55:49 +02:00
rick.parker
e122a57bf2 First working commit
First working commit

Formatting clean up

Revert All_tests.xml

Remove extra space

Feedback from code review
2016-03-30 15:04:08 +01:00
Mike Hearn
2754546942 Don't report errors when dependency version conflicts are found, as Gradle's default behaviour of picking the newest version is normally the right one and in practice what we've been doing anyway.
Remove RxKotlin. It doesn't add enough value over just using the RxJava API directly.
2016-03-11 11:49:50 +01:00
Mike Hearn
779e5d8af8 Minor: remove dokka stuff from build.gradle, it's now invoked via an external script 2016-03-08 18:30:17 +01:00
Mike Hearn
1123c28f02 Make the trader demo attach a PDF to the commercial paper self-issuance and then scan for it on the buyer side, print out the path on the filesystem where the PDF can be found. 2016-03-02 15:08:55 +01:00
Mike Hearn
105f9e1069 Add Apache JEXL as a dependency, as part of an exploration of on-the-fly contract specialisation (this solution may not be taken forward but suffices to unblock other work) 2016-02-29 18:56:03 +01:00
Mike Hearn
8f27c35f18 Minor: compile->testCompile dependency in core/build.gradle 2016-02-24 14:50:21 +01:00
Mike Hearn
c3f86f6557 Integrate a simple progress tracking system into the protocol framework.
The progress tracker API lets you model a tree of steps, along the same structure as protocols and subprotocols. Each step has an (optionally changing) label, and thus progress trackers can be arranged in a tree. Updates to the progress at each level flow up the tree via an RxJava observable (I guess we will use this more in future).

A simple console renderer is provided that uses ANSI escapes and Emoji to show animated progress through a protocol.

The trader demo is enhanced to use this framework, when run outside of Gradle.
2016-02-24 12:58:37 +01:00
Mike Hearn
f6167cbe12 Minor: tweak build file to describe how to activate Dokka API docs 2016-02-18 13:43:15 +01:00
Sofus Mortensen
994abb3edb Added new project core.
Project Contracts depends only on core.
2016-02-16 17:14:17 +01:00