Commit Graph

1673 Commits

Author SHA1 Message Date
Tudor Malene
11d59cf86a CORDA-1847 - Backport hibernate observer fix (#3726)
* CORDA-1847 Backport hibernate observer fix

* CORDA-1847 Fix tests
2018-08-06 11:51:01 +01:00
Katelyn Baker
f44cec5321
CORDA-1789 - Split Doorman / NM config - fix for CORDA-1510 (#3605) 2018-07-17 15:11:31 +01:00
Katelyn Baker
729d1b29a6
CORDA-1790 - Roll back flow transaction on exception (#3597) (#3616)
* CORDA-1790 Roll back flow transaction on exception

* CORDA-1790 Roll back flow transaction on exception

* CORDA-1790 Roll back flow transaction on exception
2018-07-16 17:44:34 +01:00
Michele Sollecito
3da07a1105
Merge pull request #3613 from corda/kat/bakport/corda-1804
CORDA-1499, CORDA-1804  (#3607)
2018-07-16 10:39:30 +01:00
szymonsztuka
fad90eee8b CORDA-1499, CORDA-1804 (#3607)
* Fix a typo in node_attchments_contracts table name. (#3202)

(cherry picked from commit 57d379597b)

* CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)

Database table NODE_ATTACHMENTS_CONTRACT_CLASS_NAME in v3.0 was changed to NODE_ATTCHMENTS_CONTRACTS in v3.1 and then finally NODE_ATTACHMENTS_CONTRACTS on current master. Users may omit the upgrade note and run into errors. After the change the node will not start if the new table name is not found and any other older ones is found.

(cherry picked from commit 208ac49da0)

* Fixes after cherry-pick of 208ac49da0.
2018-07-16 10:06:34 +01:00
Katelyn Baker
c73647b4fe
CORDA-1628 - Increase max restart count for notary client flows. (#3357) (#3603)
This will ensure that the notary client flow will retry over a sufficient
period of time for the notary to update its network map.

With a backoff base of 1.8 and 5 retries the last retry will fire after
about 20 min 8 sec of the initial flow start:

0	30
1	54
2	97.2
3	174.96
4	314.928
5	566.8704

Total 1207.9584	= 20.13264 min
2018-07-13 18:13:41 +01:00
Shams Asari
9fc108aa1e CORDA-1709 - The MVP blob inspector, able to inspect network service blobs (#3503)
* Cleanup and improvements to the serialisation format of JacksonSupport (needed for CORDA-1238) (#3102)

Also deprecated all the public members that shouldn't have leaked into the public API.

(cherry picked from commit 3bb95c3)

* CORDA-1238: Updated JacksonSupport to support SerializedBytes, CertPath, X509Certificate and the signature classes (#3145)

SerializedBytes are first converted to the object it represents before being serialised as a pojo.

These changes will be needed to support the the blob inspector when it will output to YAML/JSON.

(cherry picked from commit b031e66)

* Cherry picked part of commit 824adca to port over *only* the JackSupport refactoring.

* CORDA-1238: Moved the blob inspector out of experimental and wired it to JackonSupport (#3224)

The existing output format was not complete and so was deleted to avoid it becoming a tech debt. We can always resurrect it at a later point.

(cherry picked from commit 4e0378d)

* Added back support for parsing OpaqueBytes as UTF-8 strings in JacksonSupport (#3240)

(cherry picked from commit d772bc8)

* Cleaned up blob inspector doc (#3284)

(cherry picked from commit b7fbebb)

* Blobinspector: trace level logging with --verbose (#3313)

(cherry picked from commit 6a2e50b)

* Cherry picked part of commit 3046843 to fix issue with --version

* Fixes to the api file
2018-07-03 19:58:13 +01:00
Katelyn Baker
f86aaa2866
CORDA-1510 - Allow Doorman and NetworkMap to be configured independently (#3494)
* CORDA-1510 - Allow Doorman and NetworkMap to be configured independently  (#3485)

Currently only one compatabilityZoneURL can be specified, however the
two services can be run on as separate servers. Allow nodes to be
configured in this manner

* Fix cherry-pick
2018-07-03 12:57:03 +01:00
Michele Sollecito
b6339a7fc6 CORDA-1575, CORDA-1341 - Fix logfiles for out of process nodes, Ensure API can be called concurrently wrt transactions.(#3312)
* [CORDA-1575]: Out of process nodes started by the driver do not log to file (fix).

* [CORDA-1341]: Ensure API can be called concurrently wrt transactions.

* [CORDA-1575]: Fixed unstable test.
2018-06-07 11:26:19 +01:00
szymonsztuka
588c480bcd CORDA-1499 - Fix a typo in node_attchments_contracts table name. (#3310)
(cherry picked from commit fc54263)
2018-06-06 16:03:25 +01:00
szymonsztuka
cdce596acd CORDA-1266 - When a cash output is identical only the fist output is saved. (#3244) (#3311)
(cherry picked from commit 0a4d981)
2018-06-06 16:02:50 +01:00
Maksymilian Pawlak
33e45eef4a CORDA-1297 - Columns nullability (#3112) -> V3 (#3303)
* [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).

(cherry picked from commit 7d69bc6)

* Compilation fix
2018-06-05 15:55:20 +01:00
Katarzyna Streich
f132923b86 CORDA-866, ENT-1933 - Remove stale nodes from Network, Fix NetParam serialization (#3255) (#3128)
*  CORDA-866: Implement removal of stale nodes from network - backport (#3128)

* CORDA-866: Implement removal of stale nodes from network

Backported

* Implement removal of stale nodes from network

Add eventHorizon to NetworkParameters structure. Add republishing of
node info on 1 day intervals - it is treated by network map as heartbeat from node indicating if it's alive or not. Add removal of old node infos on network map signing.

* Add copy method to NetworkParameters data class

Add JvmOverloads annotation to the constructor, because it's data class
exposed in API

* Fix test

* ENT-1933: make NetworkParameters serialization compatible (#3234)

* ENT-1933: make NetworkParameters serialization compatible

* Fixes after cherry-pick
2018-05-31 10:03:51 +01:00
Michele Sollecito
76eaff6d88 Corda-1338 | Corda-1394 (#3205)
* [CORDA-1394]: Node can fail to fully start when a port conflict occurs, without a useful error message (fix).

* [CORDA-1338]: Error with VaultQuery for entity inheriting from CommonSchemaV1.FungibleState (fix).

* [CORDA-1338]: Error with VaultQuery for entity inheriting from CommonSchemaV1.FungibleState (fix).

* Attempting to fix weird recursive types problem.

* Attempting to fix weird recursive types problem.

* Attempting to fix weird recursive types problem.
2018-05-23 17:52:02 +01:00
Shams Asari
2729ada251 CORDA-1405 - Integration test for network parameter updates and improved logging (#2865)
(cherry picked from commit 620ba1e)

Also updated the toString() of NetworkParameters and NetworkMap to be better formatted.
2018-05-22 13:57:15 +01:00
Katelyn Baker
f9e0742d69
CORDA-1455 - Error in process-id deletion process allows multiple instances of same node to be run (fix). (#3118) (#3195) 2018-05-19 12:35:32 +01:00
Katelyn Baker
2d1ceb6cb0
CORDA-1342 - The shell doesn't print the return value of a started flow - fixed. (#3007) (#3197) 2018-05-19 12:35:12 +01:00
Katelyn Baker
35246460e2
Merge pull request #3189 from corda/cherrypick-corda-1397
CORDA-1397 - Fixed incorrect exception handling in `NodeVaultService…
2018-05-18 14:29:02 +01:00
Katelyn Baker
839cd04fdc
Merge pull request #3114 from corda/cherrypick-corda-1317
CORDA-1317 - Add cert role to CSR and doorman issue cert according to the cert role
2018-05-18 14:28:41 +01:00
Michele Sollecito
1700d30bc7 [CORDA-1397]: Fixed incorrect exception handling in NodeVaultService._query(). (#3043) 2018-05-18 12:14:47 +01:00
Katelyn Baker
d63ee71564
CORDA-1344 Fix query paging in scheduled flow tests (#2970) (#3096)
* Fix paging tests, move out of scheduled flow tests and provide java example

* Fix a few issues with docs
2018-05-15 15:57:27 +01:00
Katelyn Baker
c2b733d64c merge failure fix 2018-05-11 18:08:33 +01:00
Patrick Kuo
77a138a04e CORDA-1317 - Add cert role to CSR and doorman issue cert according to the cert role (#2620)
Cherrypick from master

* ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#431)

* Doorman and HSM create certificate base on requested cert role specified in the certificate signing request.

(cherry picked from commit 94f7392)

* remove R3 corda code
2018-05-10 17:48:48 +01:00
Katelyn Baker
92048efaa4
CORDA-1414 - node should continue with parameters from file when network map not available (#3061) (#3098)
Fix CORDA-1414

If network map is not available or returns exception on network
parameters reading, node should continue with parameters from file.
2018-05-10 10:59:15 +01:00
Shams Asari
05671af82a CORDA-1385 - Ignore duplicate packages and sub-packages in driver extraCordappPackagesToScan (#3068)
Otherwise duplicate test CorDapps are loaded into the node

(cherry picked from commit 9ffb43f)
2018-05-09 11:57:48 +01:00
Katelyn Baker
9063e24c69
Update jolokia to 1.5.0 (#2617) (#3034)
* Update jolokia to 1.5.0

* adding jolokia update to changelog
2018-05-01 15:29:52 +01:00
Katelyn Baker
ddec72674c
REVERT - CORDA-1264 - Needs more thought prior to release (#2952)
* REVERT - CORDA-1264 - Needs more thought prior to release

This reverts commit 33af80ac55.

Since this causes regressions in the way errors are propogated to
clients it seems best to not break or hold up 3.1 but revert this commit
and move on

* fix revert
2018-04-10 18:18:57 +01:00
Andras Slemmer
7501e87a54 CORDA-1295: Clean up client->observable association on observable finish (#2915) 2018-04-04 12:40:32 +01:00
Shams Asari
6ae0142bc8 CORDA-1276: Cleaned up creation of node-info object on node start and when using --just-generate-node-info (#2912)
(cherry picked from commit 65ff214)
2018-04-04 09:26:03 +01:00
Michele Sollecito
33af80ac55
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2902) 2018-03-29 14:40:40 +01:00
Katarzyna Streich
becfcf8b6c ENT-1668 - Don't crash on node startup when network map is not available (#2897)
* ENT-1668: Don't crash on node startup when network map is not available (#2887)

Fix ENT-1668

Don't crash on node startup when network map is not available

* Add changelog entry
2018-03-29 12:45:24 +01:00
Michele Sollecito
5ac4c7eda7 CORDA-1267 - Make JPA entities non-final and Serializable. (#2899) 2018-03-29 12:43:42 +01:00
Katarzyna Streich
2f0f737c3f ENT-1686 - Improve error message on parameters mismatch (#2891) (#2896)
Improve error message on parameters mismatch
2018-03-29 11:41:39 +01:00
Andrius Dagys
c367df0e83 CORDA-1171 - When a double-spend occurs, do not send the consuming transaction id and requesting party back to the client - this might lead to privacy leak. Only the transaction id hash is now returned. (#2746) 2018-03-08 20:44:13 +00:00
Andrius Dagys
da74263f42 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
* CORDA-696: Ensure deterministic transaction id calculation for contract upgrade and notary change transactions.

The problem with the previous implementation is that the transaction would be deserialized with the schema specified
in the serialized form, but the calculation of the id would involve re-serializing properties using a local serialization context
which might produce a different result.

* Support forwards compatibility for new hidden or visible properties

* Some refactoring and updating api docs

* Fix tests & add custom serializer in case the transaction is captured in a checkpoint

* Update id calculation for notary change transactions as well - no filtering is involved

* Use computeNonce

* More refactoring

* Use helper for computing component hashes

* Optimise id calculation
2018-03-08 17:59:25 +00:00
Andrzej Grzesik
0d4e99d4f1 Corda-1155 - Jolokia logging via slf4j (#2753)
* Jolokia logging through slf4j

* review remarks
2018-03-07 13:12:15 +00:00
Tudor Malene
5bd1ba0f39 ENT-1575 - Shorten table name (#2751)
(cherry picked from commit 4ad0d4f)
2018-03-06 18:25:45 +00:00
Konstantinos Chalkias
cbc07b791c CORDA-1175 - counterparty docs homogenisation (#2747) 2018-03-06 16:10:48 +00:00
Michele Sollecito
194a690ef4 CORDA-1156 - Fixed displayed nodeInfo and stateMachineSnapshot in InteractiveShell. (#2732) 2018-03-05 17:32:34 +00:00
Shams Asari
d2dc80e4f8 CORDA-1160 - Only read node-info files if their last modified time has changed. (#2717) (#2718)
(cherry picked from commit 4a73a80)
2018-03-05 14:57:03 +00:00
Thomas Schroeter
2168d42154 CORDA-1136 - Update startup message of P2P address and port (#2699) 2018-03-04 14:59:06 +00:00
Mike Hearn
f714c3001c
Fix another non-serializable exception, add docs, fix a possible security issue. (#2707) (#2710)
* Fix another non-serializable exception, add docs, fix a possible security issue.

* Update API definition to reflect methods added to make more exceptions serializable
2018-03-02 16:15:09 +01:00
Joel Dudley
67697906d0
1076 - Filters out structural steps when tracking a flow via RPC. 2018-03-02 10:44:52 +00:00
Shams Asari
bf712a893e CORDA-1048 - Making it simpler to move an existing local deployment of nodes to across different machines (#2697)
* Various cleanup of the network map code (#2604)

(cherry picked from commit 2af0fee)

* CORDA-1048: Making it simpler to move an existing local deployment of nodes to across different machines. (#2672)

This was achieved by having the hash in the node-info file to be just of the node's X.500 name. This also solves existing duplicate node-info file issues that we've been having.

Also updated the docsite.

(cherry picked from commit 8616f24)
2018-03-02 08:22:25 +00:00
Anthony Keenan
d77290831c CORDA-1035 - Testing api KDoc Updates (#2670)
* [CORDA-1035] Testing api KDoc Updates (#2584)

* Testing api KDoc Updates

* Update after code review

* Update api-current

* Revert changes to compiler.xml

* Made comment changes from review

* Fixing merge conflict

* Don't expose net.corda.node through test API (first pass)

* Fixing merge conflicts

* Update api-current

* Addressing review commits

* Fix exposure of internal implementation of MessageHandlerRegistration

* Make InProcess expose ServiceHub instead of internal StartedNodeServices

* Move InternalMockMessaginService interface to internal namespace

* Move MOCK_VERSION_INFO to internal namespace to avoid exposing VersionInfo

* Don't expose WritableTransactionStorage via testing api

* Create public VerifierType enum

* Update api-current and modify check-api-changes to check for net.corda.node exposures

* Fix merge conflicts

* Fixing another merge conflict

* Fix accidentally broken unit tests

* Make getInternalServices a property

* Fix failing unit tests

* Add todo to check-api-changes

* Fix rpc sender thread busy looping

* Fix tests

* Fixing tests

* Address mike's comments

* Fixing tests

* Make random port allocation internal

* Update api

* Update api
2018-02-28 15:59:56 +00:00
bpaunescu
f03ce2b645 GITHUB-2630 - missing rpc info at node startup (#2656) 2018-02-27 12:15:23 +00:00
Andras Slemmer
aafd8401ad Fix rpc sender thread busy looping (#2655) 2018-02-27 12:14:57 +00:00
Thomas Schroeter
b625dc7417 CORDA-1119 - Sign in DB transaction (#2651) 2018-02-27 12:14:47 +00:00
Michele Sollecito
a4f67602dd CORDA-1098 - Fixed Artemis filters for flows draining mode. (#2612) 2018-02-22 17:55:50 +00:00
Andrius Dagys
659d6c03ef CORDA-696 - Create separate transaction types for contract upgrade transactions (#2589)
* CORDA-986 and CORDA-985 CompositeKey and Signature verification performance fixes (#2467)

* CORDA-696: Create separate transaction types for contract upgrade transactions.

Add rationale around upgrade transactions

Move contract upgrade transaction resolution logic into internal until it's stabilised.

Throw a better exception when contract attachment not found

Default legacy contract constraint to always accepting - needs to be changed to whitelist constraint before merging

Introduce a new upgraded contract interface that allows specifying the legacy constraint.

Remove StateLoader, make all tx resolution functions take in ServicesForResolution

Contract upgrade transactions can handle whitelist by zone constraints

When creating a contract upgrade transaction, make sure the attachment of the old cordapp gets attached when using hash constraints.
Attachment lookup for a given contract class name only scans currently loaded cordapps, and we don't load old versions of cordapps.
2018-02-22 17:51:41 +00:00