Commit Graph

1664 Commits

Author SHA1 Message Date
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
Christian Sailer
ce4735da20 CORDA-1096 - Performance when loading multiple states from the vault (#2609)
* Provide efficient `loadStates()` implementation

* Replace loops using `loadState` with calls to `loadStates`
2018-02-22 16:12:07 +00:00
Andrzej Grzesik
a3abc1d2a5 CORDA-1075 - Add "bye" and "help" to crash shell menu(#2600)
* shell: list commands alphabetically

* increased crash shell version

* crash shell with help and bye
2018-02-22 11:15:28 +00:00
szymonsztuka
3ac2de0ede CORDA-1085 0 Alter column names to be consistent with R3.Corda. (#2601) 2018-02-22 10:18:16 +00:00
Michele Sollecito
d97a579a2e [CORDA-1089]: Correctly display an error message on node startup if RPC settings are invalid (#2592)
* [CORDA-1089]: Correctly produce an error message on node startup if rpc options are invalid.

* [CORDA-1089]: Made RPC settings validation only trigger if address is specified.

* [CORDA-1089]: Fixed outdated deployNodes task in build.gradle.

* [CORDA-1089]: Fixed outdated deployNodes task in build.gradle.
2018-02-21 17:09:13 +00:00
Andras Slemmer
adf9d50940 CORDA-984 - Add RPC deduplication to client and server (#2582) 2018-02-21 16:43:07 +00:00
Andrius Dagys
f6c82dc99e CORDA-1010 - Send a request signature in addition to a transaction to the notary (#2573)
* Make NotaryFlow.Client more modular and easier to customise

* CORDA-1010: Send a request signature in addition to a transaction to the notary (#2527)

CORDA-1010: Notary flow - clients now send a signature over a notarisation
request in addition to the transaction. This will be logged by the notary
to be able to prove that a particular party has requested the consumption
of a particular state.
2018-02-20 12:09:51 +00:00
Tudor Malene
60a4bcba5b CORDA-941 - Add Network Parameters contract implementation Whitelist (#2539)
* CORDA-941 Add Network Parameters contract implementation Whitelist

* CORDA-941 fix merge

* CORDA-941 added uploader support to Attachments and added check into the AttachmentClassloader to only allow loading attachments that were uploaded from the local cordapps folder

* CORDA-941 update api spec

* CORDA-941 address some code review changes and fix and add classloader test

* CORDA-941 fix test

* CORDA-941 address code review comments

* CORDA-941 address code review comments - use and update existing whitelist

* CORDA-941 address code review comments

* CORDA-941 fix compile error

* CORDA-941 address code review comments

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 removed: whitelistAllContractsForTest

* CORDA-941 add comment

* CORDA-941 remove toLedgerTransaction

* CORDA-941 add warning when node not using latest CorDapp

* CORDA-941 remove the stubbing approach for cleaning LedgerTransaction

* CORDA-941 Code review changes

* CORDA-941 Fix merge

* CORDA-941 workaround for api scanner bug

* Fixed JacksonSupportTest.
2018-02-20 11:09:23 +00:00
sollecitom
22f6827131 CORDA-961 - Revert the introduction of GlobalProperties.
* Changes to LargeTransactionTests.
 * Code review changes.
 * Code review changes.
 * Code review changes.
 * Reverted to MAX_FILE_SIZE for Artemis.
 * reverted max message size for BridgeControlListener inside Node.kt
 * reverted max message size for BridgeControlListener inside Node.kt
 * Renamed setNetworkParameters to withNetworkParameters in MockNetwork.kt
 * Updated to reflect latest state.
2018-02-19 15:57:21 +00:00
Mike Hearn
c0448a0e3c Minor: reduce the size of the MockNetwork API a bit, add some better documentation 2018-02-16 18:40:43 +01:00