Commit Graph

6521 Commits

Author SHA1 Message Date
Michal Kit
d7b85b4928
CORDA-1934 Renaming INTERMEDIATE_CA certificate role to DOORMAN_CA certificate role (#3844) 2018-08-31 09:35:06 +01:00
Michal Kit
f22d9ad411
CORDA-1938 Adding version info to the node info submission request (#3854) 2018-08-31 09:34:42 +01:00
szymonsztuka
dbc1088417
CORDA-1939 Regression: Liquibase fails to migrate existing pre-liquibase database (#3855)
* Bugfix for corda.jar manually deployed without coping the matching corda-finance-VERSION.jar.
If the older finance cordapp version is detected (which doesn't have Liquibase migration scripts) fail node at startup and print message: "Could not create the DataSource: Detected incompatible corda-finance cordapp without database migration scripts, replace the existing corda-finance-VERSION.jar with the latest one."
Since coda-finance is an optional cordapp,the presence of Liquibase scripts is only checked if corda-finance-VERSION.jar is present in cordapps folder.
*  Allow to start using Liquibase from any point of 4.0-SNAPSHOT before Liquibase was introduced (not only from 3.0/3.X versions) - 2 database changes introduced after 3.2 but before Liquibase are now conditional database changes.
2018-08-30 13:40:02 +01:00
Dominic Fox
0f36e22314
Corda-1869 serialisation refactor (#3780)
* Pull out and tidy type parameter inference

* Contain null proliferation

* Extract fingerprinter state

* SerializerFingerPrinter is always initialised with a SerializerFactory

* Move non-recursive state transition functions into state

* Move all state transition functions into state

* Simplify and optimise with mutable state

* Move TypeParameterUtils back into internal.amqp

* Clarify behaviour of constructorForDeserialisation

* constructorForDeserialization no longer returns null

* Capture field properties

* Narrow PropertyDescriptor

* Use map rather than apply on a mutable list

* Remove printStackTrace added for debugging

* CORDA-1869 minor tweaks

* Use groupingBy to avoid creating an intermediate map

* Convert some functional origami to plain old for-loops

* Eliminate nested lambda to unbreak pre-serialisation

* Use EnumMap for map of Enums
2018-08-30 10:18:02 +01:00
Dominic Fox
4337537791
CORDA-1945: properly support double-width interp stack slots in superclasses when synthesising (#3859)
* Fix for CORDA-1945

* Revert irrelevant style change
2018-08-29 17:43:17 +01:00
PokeyBot
60d28b412f
Merge pull request #3861 from corda/mike-small-fixes-1
Minor: fix changelog markup errors.
2018-08-29 16:25:23 +01:00
Mike Hearn
12707c8df0 Signature constraints design doc: address review comments from Jose. 2018-08-29 16:32:06 +02:00
PokeyBot
7a4faceb2d
Merge pull request #3860 from corda/mike-small-fixes
Update RxJava to the last 1.x release so we get JavaDocs back.
2018-08-29 15:24:28 +01:00
Mike Hearn
c68134ad60 Minor: fix changelog markup errors. 2018-08-29 15:05:18 +02:00
Mike Hearn
2e943d089b Update RxJava to the last 1.x release so we get JavaDocs back. 2018-08-29 15:02:23 +02:00
PokeyBot
9259f6c05e
Merge pull request #3858 from corda/bugs/CORDA-1940-remove-logback-dependency
CORDA-1940 Liquibase imports logback which is redundant and conflicts with log4j2
2018-08-29 11:51:32 +01:00
Clinton Alexander
e87b33d1e8 Added extra logging to build.gradle when maxParallelForks system property is set 2018-08-29 12:38:24 +02:00
Mike Hearn
2d39b39e31 Improve the error messages printed by the shell when a flow c'tor doesn't match. 2018-08-29 12:34:55 +02:00
szymonsztuka
040c4a0fe3 CORDA-1940 remove any transitive dependency on Logabck (brougth by Liquibase 3.X)
Change to older Liquibase 3.5.5 version to align with Enterprise repo - Liquibase 3.6.X changed schema case sensitivity behaviour and it's brakes in Corda for one database vendor.
2018-08-28 18:40:10 +01:00
Dominic Fox
63ebc394bf
Update docs to reflect constraint implementation (#3852) 2018-08-28 12:05:54 +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
Dominic Fox
f81428eb53
Corda 1916: signature attachment constraints (#3839)
* Create constraint, extract Jar signature collection

* Extract JarSignatureCollector into its own file

* Jar signature collection throws exception if signatures are inconsistent

* Focus testing in Jar signature collection

* Extract some helper functions in test

* Patch tests with mock attachment storage

* Assert that generated constraint is satisfied by signed attachment

* Clarify constraint selection logic

* Explicit return types on extension methods

* Link to docsite Signature Contrainsts documentation

* Fix issue with shared JAR reading buffer
2018-08-24 17:21:54 +01:00
Christian Sailer
bc330bd989
ENT-2414 Named caches (#3848)
* Add named caches and apply to NonInvalidingUnboundCache and all usages.

* Add named caches and apply to NonInvalidingCache and all usages.

* Add named caches and apply to NonInvalidingWeightBasedCache and all usages.

* Move NamedCache to core/internal

* Remove type `NamedCache` and `NamedLoadingCache`

* Suppressed 'name not used' warning, added comment, and fixed generic parameters on the buildNamed functions.

* Use `buildNamed` in all caffeine instances in production code. Not using it for caches that are created in test code.

* Add checks for the cache name

* Formatting

* Minor code review revisions
2018-08-24 17:17:22 +01:00
PokeyBot
042b91814a
Merge pull request #3834 from corda/mike-rpc-propagate-deser-errors
Propagate RPC deserialisation faults back to the caller
2018-08-24 16:52:23 +01:00
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +01:00
Chris Rankin
329c9da0a9
CID-251: Integrate DJVM with Corda's existing deterministic-rt. (#3846)
* Integrate DJVM with Corda's existing deterministic-rt.
* Remove generated whitelists from DJVM.
* Fix Manifest attributes, disable jar tasks and attach shadowJar to assemble task.
2018-08-24 15:51:40 +01:00
Mike Hearn
8fd4d0d218 RPC: propagate failures when they occur during deserialization.
Before this change, a failure to deserialize an RPC reply would leave
the caller hanging because we'd never set the future.
2018-08-24 15:16:55 +02:00
PokeyBot
8b0fc8f29c
Merge pull request #3845 from corda/feature/ent-2253-rename-colun-name
Database column rename required by ENT-2253
2018-08-24 10:15:25 +01:00
szymonsztuka
c4f33ef533 Rename column HOST to HOST_NAME in table NODE_INFO_HOSTS - required by ENT-2253 2018-08-23 17:08:05 +01: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
Mike Hearn
fd8c2e4dab Provide the exception class name and not just the message when there's an internal deserialisation fault. 2018-08-23 13:30:03 +02:00
Mike Hearn
409b4e2a42 Minor: make the trace logging for the RPC server a bit more helpful. 2018-08-23 13:12:18 +02:00
Mike Hearn
785bae9e48 Minor: add a missing kdoc for InsufficientBalanceException 2018-08-23 13:12:18 +02:00
Mike Hearn
626b3e6bd3 Minor: make the :node:capsule:build task depend on buildCordaJAR 2018-08-23 13:12:18 +02:00
Mike Hearn
8ed600a2c3 Minor: fix visual regression during startup. 2018-08-23 13:12:18 +02:00
Mike Hearn
b3433c2a46 Minor: reformat SerializerFactory.kt 2018-08-23 13:12:18 +02:00
Chris Rankin
040de41e27
CORDA-1925: Include Requirements object in core-deterministic. (#3841) 2018-08-23 10:08:20 +01:00
Michele Sollecito
57e188a5a8
Disabled allWarningsAsErrors for compilation and failFast for tests locally, after TC was updated to override them to enabled. (#3838) 2018-08-23 09:57:05 +01:00
Anthony Keenan
bcfadfeebf
CORDA-1833: Create a picocli base class (#3826)
* Add shell extensions to CLI utils class and move into its own module

* Fix issue with completion script generation and slight refactor

* Fix autocompletion for logging level

* Delete uneeded comment

* More tidying up

* Make run function final

* Fixed an issue with the program being run twice.

* Address review comments
2018-08-22 21:51:25 +01:00
PokeyBot
98eef2f960
Merge pull request #3840 from corda/feature/vkolomeyko/CORDA-1878
CORDA-1878: Improve exception handling when base directory is not readable or writable by the application user.
2018-08-22 17:31:52 +01:00
PokeyBot
d9ab141c47
Merge pull request #3837 from corda/feature/fix-is-relevant-in-cash-selection
Fix "isRelevant" functionality - fix is_modifiable column condition in cash selection.
2018-08-22 16:30:50 +01:00
Tommy Lillehagen
d2ef16cbfd
Deterministic JVM (#3386)
* CID-251 - Deterministic JVM

* CID-251 - Add DJVM documentation

* CID-251 - Address review comments from @chrisr3

* CID-251 - Address further review comments from @chrisr3

* CID-251 - Use shadowJar to generate fat JAR

* CID-251 - Address review comments from @exFalso

* CID-251 - Improve naming in ReferenceMap

* CID-251 - Add test for Kotlin meta-class behaviour

* CID-251 - Address review comments from @shamsasari

* CID-251 - Add description of high-level flow

* CID-251 - Refactoring

* CID-251 - Rename package to net.corda.djvm

* CID-251 - Include deterministic-rt.jar as runtime dependency

* CID-251 - Add Gradle task for generating whitelist from deterministic rt.jar

* CID-251 - Error messages for StackOverflow/OutOfMemory, update whitelist

* CID-251 - Reduce set definition of pinned classes

* CID-251 - Tidy up logic around pinned classes

* CID-251 - Shade ASM dependency and split out CLI tool

* CID-251 - Address review comments from @mikehearn (part 1)

* CID-251 - Address review comments from @mikehearn (part 2)

* CID-251 - Address review comments from @mikehearn (part 3)

* CID-251 - Address review comments from @exFalso

* CID-251 - Address review comments from @mikehearn (part 4)

* CID-251 - Address review comments from @exFalso and @mikehearn

* CID-251 - Address review comments from @mikehearn (part 5)
2018-08-22 16:01:39 +01:00
Viktor Kolomeyko
feaf6aa03c CORDA-1878: Improve exception handling when base directory is not readable or writable by the application user. 2018-08-22 15:55:52 +01:00
Rick Parker
30d07bc998
ENT-2202 Fold transaction mapping column into transactions table (#3836)
* ENT-2202 Fold transaction mapping column into transactions table

* Remove from node schema.

* Fix bug.
2018-08-22 14:14:55 +01:00
szymonsztuka
32a4a8712a Fix "isRelevant" functionality - fix is_modifiable column condition in cash selection. 2018-08-22 13:38:17 +01:00
Florian Friemel
2fae95c58f
[CORDA-1917] Fix smoke test (#3823) 2018-08-22 13:16:07 +01:00
Chris Rankin
004ea45a05
Ensure that every CheatingSecurityProvider has a unique name. (#3835) 2018-08-22 11:09:52 +01:00
Rick Parker
1d05c16942
ENT-2439 Fix compression in serialization (#3825)
* ENT-2439 Fix compression in serialization
2018-08-22 10:37:18 +01:00
Matthew Layton
96d645c316 series0ne/corda-demobench-node-config-fix
Fixes an issue where profiles don't load because the node.conf format has changed between V1 and V3
2018-08-22 11:03:45 +02:00
Michele Sollecito
f94abf726b
Fixing exception messages not showing up in the console because of log4j2.xml setup. (#3830) 2018-08-21 21:28:13 +01:00
Florian Friemel
41fc8d6c55
Remove BFTSMaRtTests. (#3822) 2018-08-21 13:02:18 +01:00
PokeyBot
f299305e8d
Merge pull request #3809 from corda/mike-sig-constraints-dd
Add a design doc for signature constraints.
2018-08-20 17:13:17 +01:00
PokeyBot
c8a9395426
Merge pull request #3814 from corda/thomas/fix-jib-build
Cleanup Jib build task
2018-08-20 16:33:34 +01:00
Thomas Schroeter
7082e68409 Cleanup the Jib build task 2018-08-20 15:13:55 +01:00
Rick Parker
2f76651d00
ENT-2378 ENT-2377 Minimise database access during transaction creation and recording for public key handling (#3812)
* ENT-2378 ENT-2377 minimise database access by making more use of caches for filterMyKeys, and don't make a redundant database check for existence of new random keys.

* ENT-2378 Unit test for new method in PersistentIdentityService.
2018-08-20 15:01:51 +01:00