Commit Graph

370 Commits

Author SHA1 Message Date
szymonsztuka
7cb9e174a9
Documentation for CORDA-1915 Build system for jarsigner (#4006)
Documenting new cordapp and conformation plugins capabilities to sign CorDapp JAR, enabled by corda-gradle-plugins releases 4.0.32 and 4.0.33.
2018-10-31 16:20:11 +00:00
Shams Asari
d3c5479826
CORDA-1621: The finance CorDapp uses the app config feature rather than the node's config (#4100) 2018-10-22 18:56:30 +01:00
Florian Friemel
47068e6b7a [CORDA-2077] Use latest gradle plugin version (4.0.32), set target version in core and sample CorDapps (#4038)
* Upgrade gradle plugin; add target version attribute to finance and sample cordapps.
* Remove '-SNAPSHOT' from gradlePluginsVersion.
* Fix naming.
* Update docs.
* Respond to feedback.
* Fix irs demo
* Fix more samples
* Fix more samples
* Fix deployNodes
* Fix deployNodes
* more fixes
* fix simm valuation
* more fixes
* more fixes
* more fixes
* more fixes
* Publication should have *nothing* to do with cordformation and deployNodes.
Remove it! And if this exposes a bug then "so be it".
* Disable CorDapp signing for Cordapp Configuration and Network Verifier.
* Disable CorDapp signing for SIMM Valuation Demo.
* Remove remaining publishing nonsense from samples.
* Workarounds fpr cordapp-configuration, network-verifier and simm-valuation-demo:
JarSigner rejects jars with duplicates inside, so remove them.
* Upgrade to Gradle plugin 4.0.32 and reenable CorDapp signing for samples.
2018-10-15 21:11:52 +01:00
Chris Rankin
2248f54f9f
CORDA-2096: Migrate finance test classes into .test sub-packages. (#4079) 2018-10-15 19:51:28 +01:00
Dominic Fox
b6f2532ce6
Corda 1922 serialize states with calculated values (#3938)
* Introduce SerializeForCarpenter annotation

* Apply SerializableComputedProperty annotation to Cash.exitKeys, fix bugs

* info -> trace

* Remove annotation from FungibleAsset, as we do not know whether all implementing classes will provide the property as a calculated value

* Remove redundant import

* Explicit lambda params

* Restore explicit import for Enum valueOf

* Moving and rescoping

* More meaningful error message

* Add java test and documentation

* Fix accidentally broken unit test

* Ignore superclass annotation if property not calculated in implementing class

* Exclude calculated properties from Jackson serialisation

* Fix broken test
2018-10-09 14:54:31 +01:00
Roger Willis
c4d86b1b26
CORDA-1999 Changed isRelevant to relevancyStatus. (#3966)
* Changed isRelevant to relevancyStatus.

* Fix cash selection from breaking.

* Fixed non-backwards compatible API change.

* Updated schema migration changelog.

* Updated comment.
2018-09-19 15:50:39 +01:00
Shams Asari
ca5d88e65a
Minor changes made in ENT which should have been ported over (#3932) 2018-09-12 11:26:37 +01:00
Shams Asari
83e66d542d
Syncing Cordapp info code from ENT so that ENT-1731 is fully ported (#3914)
Also, Cordapp.Info has been made internal as it's not used in the public API
2018-09-10 10:43:00 +01:00
josecoll
36bfe268af
Revert back to using "relevancy" as "modifiable" states are not permissible by definition on an immutable ledger. (#3847) 2018-08-28 11:04:40 +02:00
szymonsztuka
487cad7d06
CORDA-1471 Database schema setup for internal tables via Liquibase (#3815)
Internal tables (the tables from node and finance modules) are now tracked /created by Liquibase script.
Tables backing MappedSchemma in Cordapps are created by Hibernate (as before). 
The PR scope added Liquibase library, setup code SchemaMigration and XML scripts and from Enterprise.
For existing database installation - the node will auto-upgrade to use Liquibase.
Method migrateOlderDatabaseToUseLiquibase checks for any 3.X existing Corda database to upgrade database to use Liquibase. When the existing database without Liquibase integral tables is detected, the node (at startup) will create Liquibase tracking tables and fill them with all migration scripts (marked as done), this ensure the database will look as it would use Liquibase from the beginning.
The database changes gradually introduced by the subsequent 3.X releases (3.1, 3.2) are conditionally run by Liquibase.
2018-08-23 16:30:02 +01:00
szymonsztuka
32a4a8712a Fix "isRelevant" functionality - fix is_modifiable column condition in cash selection. 2018-08-22 13:38:17 +01:00
Roger Willis
b7867c3bcb
* Added "isRelevant" functionality to the vault. (#3789)
* * Added "isRelevant" functionality to the vault.

* * Changed "isRelevant" to "isParticipant" as this makes more sense in the context of Corda.
* Minor tweak to "isParticipant" method in NodeVaultService.
* Fixed API break and broken JAva tests.

* * Addressed PR comments from Jose.
* Changed all mentions of "relevant" and "participant" to "modifiable".
* Made the default behaviour of vault queries to return ALL states instead of just MODIFIABLE states as this is what always previously happened.
* Updated cash balance queries to only return MODIFIABLE states.

* * Updated cash selection and tryLockFungfibleStatesForSpending.
2018-08-17 13:39:05 +01:00
josecoll
166554a558
Fix duplicate index declaration. (#3779) 2018-08-13 17:31:35 +01:00
Tudor Malene
85caa9ee9d
Feature/corda 1847/remove hibernate observers (#3696)
* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests
2018-07-31 13:52:13 +01:00
cxyzhang0
2a5b7371d0 h2 cash selection query to support multiple onlyFromIssuerParties and… (#3659)
* h2 cash selection query to support multiple onlyFromIssuerParties and withIssuerRefs

* Rid of the compilation warnings
2018-07-24 10:09:37 +01:00
Michele Sollecito
abc1d99eaa
[CORDA-1799]: Avoid generating test CorDapp JARs from each out of process node started by the driver (#3641) 2018-07-23 11:18:11 +01:00
cxyzhang0
d2446be69e MSSQL support (#3382)
* MSSQL support

* changes per reviewer's comments; doc

* clean up

* CONTRIBUTORS.md

* minor change in comment

* another minor change in comment

* minor formatting

* Comments formatting per recommend style; contributors in alphabet order

* more comment formatting per coding style

* Change MSSQL to SQLServer in codes and comments

* Change MSSQL to SQLServer in doc

* Use generateSequence to build repeats of ?,?,...?
2018-07-20 16:25:15 +01:00
Shams Asari
1d91272698
Moved a bunch of tests that were in the integration bucket into unit (#3576) 2018-07-13 14:17:56 +01:00
Shams Asari
dc3bd8de7a Retired BankOfCordaRPCClientTest as it's mostly duplicated by BankOfCordaCordformTest (#3565) 2018-07-13 10:37:51 +01:00
Shams Asari
f4a248f81f
Made CashSelectionTest a unit test by using mock network. (#3570)
Also includes adding a default value of emptyList() to InternalMockNetwork.cordappPackages
2018-07-12 11:55:51 +01:00
Shams Asari
2833ec2a88
Avoiding starting notaries in driver-based integration tests to speed them up (#3544) 2018-07-11 11:36:36 +01:00
Tommy Lillehagen
d683df5753
CORDA-1711 - Remove dependency on PathUtilsKt in net.corda.core.internal (#3493) 2018-07-02 18:32:38 +01:00
Thomas Schroeter
ad2890193d
Specify Notary in CashIssueAndPaymentFlow and PaymentRequest (#3443)
* Specify notary in CashIssueAndPaymentFlow

* Specify notary in PaymentRequest

* Address comments

* Default to the first notary in the `CashPaymentFlow`
2018-06-26 16:45:18 +01:00
Viktor Kolomeyko
d4b982b9fb
ENT-2054: Logging improvements (#3397) 2018-06-19 15:29:35 +01:00
Maksymilian Pawlak
c009cbd91a
[CORDA-1468] Properly handle entites where NULLs can be inserted into DB (#3324)
* Allow proper null values on entities which fields can get NULL values.
2018-06-11 13:12:19 +01:00
Michele Sollecito
e44b6c6f4a
[CORDA-1356]: CashException is unable to derisalize with AMQP through RPC. (fix). (#3274) 2018-05-30 17:15:50 +01:00
szymonsztuka
ed70fea3a7
CORDA-1548 Hibernate session not flushed before handing over raw JDBC session to user code (e.g. coin selection) (#3266)
* Hibernate session flushed before handing over raw JDBC session to user code + test - inserting and selecting cash in the same transaction
* Additional two tests copied from Enterprise repo
2018-05-30 16:19:06 +01:00
Rick Parker
accb9eb5b3
Remove mutex and stop catching deadlock / SQLExceptions. (#3242)
SQL Exceptions thrown with Cash Selection are now retried via Flow Hospital
2018-05-29 12:15:06 +01:00
Chris Rankin
78c759e2e6
Resolve compiler warnings for Kotlin >= 1.2.40. (#3245) 2018-05-28 18:06:33 +01:00
Maksymilian Pawlak
7d69bc664a [CORDA-1297] Columns nullability (#3112)
JPA/Hibernate entities need to impose the correct NULL/NOT NULL constraints on the database - whatever these correct values actually are.
API change: net.corda.core.schemas.PersistentStateRef fields (index and txId) are now non-nullable. Rationale: The fields were always effectively non-nullable - values were set from non-nullable fields of other objects. The class is used in context of database table Primary Key of for other entities and a database already imposes those columns as non-nullable (even if JPA annotation nullable=false was absent).
2018-05-25 19:03:24 +02:00
Michele Sollecito
f0db76d854
Re-enabled commented out test and fixed warnings in Finance. (#3206) 2018-05-21 17:00:30 +01:00
Ivan Schasny
8990e9f783
Merge pull request #3170 from corda/CORDA-1459
Corda 1459
2018-05-21 10:45:29 +01:00
Viktor Kolomeyko
fa090eb865
CORDA-1506: Cash selection logic fails when selection with a change from more that 2 different issuer groups (#3187)
* Expose a flaw in cash selection logic

* Minimal test exposing the bug.

* Remaining unspent cash overwrites the cash of the first issuer, not the current issuer - the problem emerged when at least three different groups were selected, for 2 different issuers the last one in selection process was always the first remaining one.

* Addressing PR comments + more precise test name

* Addressing PR comments.
2018-05-18 17:16:41 +01:00
Ivan Schasny
1c49043b36 [CORDA-1459] Typo fix 2018-05-16 17:19:41 +01:00
Ivan Schasny
dc5d89367d Merge branch 'master' into CORDA-1459 2018-05-16 17:11:23 +01:00
Ivan Schasny
c4be0ad959 [CORDA-1459] Removed CommodityContract 2018-05-16 17:11:12 +01:00
Andrzej Cichocki
65b782c206
ENT-933 Add spectator and participant profiles of rigorousMock (#3157) 2018-05-16 13:56:41 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Michele Sollecito
ea81548d60
[CORDA-1269]: Changed usages of arrayOf() in Entities to use Kotlin 1.2 style. (#3122) 2018-05-11 21:07:53 +07:00
Michele Sollecito
b5e8dc5bd1
[CORDA-1338]: Error with VaultQuery for entity inheriting from CommonSchemaV1.FungibleState - FIX (#3025) 2018-05-04 22:37:56 +07:00
Chris Rankin
a6b7257491
CORDA-1441: Upgrade to Kotlin 1.2.41 (#3063) 2018-05-03 12:12:54 +01:00
Viktor Kolomeyko
884928c956
CORDA-1416: Upgrade version of Proton-J library (#3050)
* CORDA-1416: Upgrade version of Proton-J library

* CORDA-1416: Compilation fixes following Proton-J upgrade

Reflects:
https://issues.apache.org/jira/browse/PROTON-1712
and
https://issues.apache.org/jira/browse/PROTON-1672

* CORDA-1416: Add an integration test to prove that data saved by from previous version can be read.

* CORDA-1416: Add additional check validate serialized form.
2018-05-02 15:14:45 +01:00
szymonsztuka
6e7787bd64
Better login missing cash selection implementation. (#3026)
* When a cash selection implementation cannot be found for a driver name, print the driver name  and also driver names with implementation (available).
* Remove MySQL stub class as it would be misleading in error logs (MySQL would appear as implemented).
2018-04-27 16:06:56 +01:00
Shams Asari
f88542faa2
CORDA-1095: Fixed rare race where the startNode future completes before the default notary is visible (#2947) 2018-04-11 15:33:55 +01:00
szymonsztuka
2dc2a8dc19
ENT-1727 Fix cash selection with PostgreSQL. (#2949)
Change conversion to toStringShort() instead of toBase58String() - as done for H2 Cash Selection.
Fix withIssuerRefs case - iterate via list of IssuerRefs and setBytes instead of setArray of BYTEA.
Add test for Cash Selection with issuerRef.
2018-04-11 13:36:29 +01:00
Michele Sollecito
36d403dd7d
[CORDA-1262]: Added integration test for Cash Selection. (#2874) 2018-03-26 14:07:17 +01:00
Michele Sollecito
5677179504
Fixed incorrect reference to column "issuer_key" in cash selection SQL for Postgres. (#2870) 2018-03-23 18:04:40 +00:00
igor nitto
2cff495553
Remove CordApps JARs from node classpath [CORDA-1135] (#2691) 2018-03-14 16:42:23 +00:00
Michele Sollecito
fae0dc0276
[CORDA-1216]: Moved dependency on Jackson Databind from core to finance. (#2802) 2018-03-13 14:51:55 +00:00
Michele Sollecito
b580a2ac30
[CORDA-926]: Parsing NodeConfiguration will now fail if unknown properties are present. (#2484) 2018-03-01 14:57:36 +00:00