Commit Graph

1946 Commits

Author SHA1 Message Date
Shams Asari
f6a23a0216
CORDA-1546: Updated the flow hospital to suspend FinalityHandler if it errors (#3304)
It will re-run automatically from last checkpoint on node restart, allowing the opportunity to resolve the issue, something required when dealing with contract constraint failures.
2018-06-07 16:18:00 +01:00
Tudor Malene
c474c04503
ENT-1837 better error message on db failure (#3318) 2018-06-07 14:05:28 +01:00
Rick Parker
aa01ef638b
CORDA-1589 Flow hospital reports incorrect number of patients and fix… (#3315)
* CORDA-1589 Flow hospital reports incorrect number of patients and fix flakey associated test.

* Compare before and after count, not against zero.  There's a leak in killFlow that will be easier to address in or after Shams PR.
2018-06-07 09:12:25 +01:00
Andrius Dagys
0978d041a3
CORDA-1494: Re-enable notarisation retries in the new state machine manager (#3295)
* Remove all notion of message level retry.

* Introduce randomness into de-duplication IDs based on the session rather than the flow, in support of idempotent flows.

* CORDA-1494: Re-enable notarisation retries in the new state machine manager.

The original message-based retry approach does not work well with the new
flow state machine due to the way sessions are handled. We decided to move
the retry logic to flow-level: introduce RetryableFlow that won't have
checkpoints persisted and will be restarted after a configurable timeout
if it does not complete in time.

The RetryableFlow functionality will be internal for now, as it's mainly
tailored for the notary client flow, and there are many subtle ways it can
fail when used with arbitrary flows.
2018-06-07 08:45:32 +01:00
Shams Asari
d620e71bb6
Replaced all uses of assert with require (#3309)
JVM assertions have to be enabled with the -ea flag so it's possible for these checks to be ignored.
2018-06-06 00:31:41 +01:00
Rick Parker
e2a2c2d20d
ENT-2023 Minimise code diff between OS and ENT for enterprise change since code diff during merge resulted in a bad merge relating to rpcThreadPoolSize. (#3306) 2018-06-05 17:38:55 +01:00
Matthew Nesbit
0812329aaf
The logic in my recent late start bridge PR was wrong. This doesn't affect embedded bridges, but for external bridges the state doesn't reset correctly on bridge restart. (#3301) 2018-06-05 13:30:20 +01:00
Tudor Malene
18a6e2fa2a
CORDA-1477 backport Ent test fixes (#3292) 2018-06-04 13:49:25 +01:00
Michele Sollecito
7350cd9d1e
[CORDA-1408]: Fixed some Demobench bugs. (#3288) 2018-06-04 09:35:38 +01:00
Michele Sollecito
fc020bca4b
[CORDA-1575]: Out of process nodes started by the driver do not log to file (fix). (#3286) 2018-06-01 16:16:23 +01:00
szymonsztuka
57d379597b
Fix a typo in node_attchments_contracts table name. (#3202) 2018-06-01 16:08:19 +01:00
Tudor Malene
9efb1ecfe0
CORDA-1477 add check for code version in checkpoints (#3256)
* CORDA-1477 add check for code version in checkpoints

* CORDA-1477 Comment style

* CORDA-1477 address code review comments

* CORDA-1477 add changelog entry

* CORDA-1477 attempt to fix tests

* CORDA-1477 attempt to fix tests and address code review comments

* CORDA-1477 attempt to fix tests
2018-06-01 13:37:39 +01:00
Rick Parker
51c359c48d
CORDA-1564 Clean up old sessions when retrying flows. (#3278) 2018-05-31 18:43:50 +01:00
Shams Asari
34a480d7e3
Move checkPayloadIs out of the public API (#3279) 2018-05-31 17:40:49 +01:00
Katarzyna Streich
3758dbea34
CORDA-1493: add --clear-network-map-cache command line option (#3272)
CORDA-1493: add --clear-network-map-cache command
2018-05-30 18:39:27 +01:00
Rick Parker
ef2772e328
CORDA-1540 Remove no-longer-used StateMachineConfiguration (#3270) 2018-05-30 17:06:36 +01:00
Shams Asari
7b09795795
CORDA-1383: Cleaned up the JSON format of WireTransaction and SignedTransaction (#3248)
In particular correctly outputs the custom state and command objects in the txs. Also fixed up deserialisation back into the transaction objects.
2018-05-30 16:37:41 +01:00
szymonsztuka
0a4d98161a CORDA-1266 When a cash output is identical only the fist output is saved. (#3244) 2018-05-30 10:49:44 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
Shams Asari
0f82e2df7f
Explicitly check the contractStateType param of the RPC vault queries is a ContractState class. (#3251)
We lose the compile-time checks of the Class type parameter when invoking from the shell.
2018-05-29 15:01:55 +01:00
Christian Sailer
6791ea800d CORDA-1524 Fix NodeSchedulerService (#3238)
* Simplify flow scheduler

* Fix mutex and count up on the unfinished flows latch

* Fix missing import

* Some code layout shifting

* Undo automated change

* minor format changes from code review.

* Fix up tests to work with changes to scheduler

* Formatting fixes

* Remove commented out line.

* Fix race condition.

* We were not waiting for the scheduler to stop, or indeed stopping it.
2018-05-29 12:20:30 +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
Katarzyna Streich
8504b65e7b
ENT-1933: make NetworkParameters serialization compatible (#3234)
* ENT-1933: make NetworkParameters serialization compatible
2018-05-25 17:14:00 +01:00
Rick Parker
5e14277770
Add back import. (#3237) 2018-05-25 15:47:01 +01:00
Rick Parker
59fdb3df67
CORDA-1475 CORDA-1465 Allow flows to retry from last checkpoint (#3204) 2018-05-25 13:26:00 +01:00
Katelyn Baker
a3d88f752d
CORDA-1510 - Allow Doorman and NetworkMap to be configured independently (#3220)
* CORDA-1510 - Allow Doorman and NetworkMap to be configured independently

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

* Partial review comments

* Review comments

* review comments
2018-05-25 11:37:20 +01:00
Shams Asari
4e0378de9c
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.
2018-05-24 18:26:55 +01:00
Thomas Schroeter
15b262f25f
Remove default value for myLegalName (#3230) 2018-05-24 17:37:43 +01:00
Matthew Nesbit
2e72f784f1
Late start bridges (unless configured otherwise) if the queue is empty. (#3227) 2018-05-24 16:54:09 +01:00
Michele Sollecito
61fedb5fd2
[CORDA-1528]: Node configuration not containing property "rpcSettings.address" fails with error "No configuration setting found for key 'address'" (fix). (#3229) 2018-05-24 13:20:04 +01:00
Shams Asari
3136e973a7
CORDA-1511: Kryo only used for node checkpoints and so moved out of serialization module and into node (#3228) 2018-05-24 12:18:07 +01:00
Katarzyna Streich
1083e28343
ENT-1882: Don't remove own node info - fix (#3219)
* ENT-1882: Don't remove own node info

Don't remove own node info from cache on network map update.
2018-05-23 16:33:08 +01:00
Michele Sollecito
1137a0cc8f
[CORDA-1458]: Prevent passwords from being logged as part of node's configuration. (#3223) 2018-05-23 13:51:40 +01:00
Siddhartha Sengupta
093be1b88c Using a List for the identity certs in InMemoryIdentityService and PersistentIdentityService (#3210) 2018-05-23 10:14:13 +01:00
Katelyn Baker
cba83aca13
Move RxNotification serializer into the serialization package (#3214) 2018-05-22 15:17:18 +01:00
Michele Sollecito
072cf0fa97
Enabling logging in ExceptionSerialisingRpcOpsProxy. (#3212) 2018-05-22 13:37:09 +01:00
Tudor Malene
c2c792eccf
Silence SASL exception (#3208) 2018-05-22 11:25:31 +01:00
bpaunescu
bff419e9af
Corda-1505 catch connection failure exception and re-throw as RPCException (#3203)
* CORDA-1505: catch connection failure exception and rethrow as RPCException

* CORDA-1443: remove incorrect import

* CORDA-1443: fix some failing tests

* CORDA-1505: fix broken CordaRPCClient test

* fix tests

* CORDA-1505: catch connection failure exception and rethrow as RPCException

* CORDA-1443: remove incorrect import

* CORDA-1443: fix some failing tests

* CORDA-1505: fix broken CordaRPCClient test

* fix tests

* CORDA-1505: changed exception handling to RPCException

* CORDA-1505: changed exception handling to RPCException
2018-05-21 18:01:31 +01:00
Michele Sollecito
f0db76d854
Re-enabled commented out test and fixed warnings in Finance. (#3206) 2018-05-21 17:00:30 +01:00
Michele Sollecito
5de2c2aa4b
[CORDA-1264}: Complete obfuscation of exceptions to client side. (#3155) 2018-05-21 13:34:37 +01:00
Tudor Malene
455221629b
CORDA-1343 Make the RPCClient ssl constructors public. Clean up broke… (#3039)
* CORDA-1343 Make the RPCClient ssl constructors public. Clean up broker authentication logic

* CORDA-1343 small fix

* CORDA-1343 cleanup

* CORDA-1343 fixed api changes script

* CORDA-1343 fixed merge

* CORDA-1343 removed unused property

* CORDA-1343 add separate p2p and rpc node users

* CORDA-1343 remove test configuration

* CORDA-1343 fix tests

* CORDA-1343 address core review comments

* CORDA-1343 some documentation and adding createWithSsl method for a haAddressPool

* CORDA-1343 clean up the CordaRPCClient interface

* CORDA-1343 add internal shell test

* CORDA-1343 address code review comments

* CORDA-1343 split the internalShell user from the System Rpc user

* CORDA-1343 fix test

* CORDA-1343 Add warning when certificateChainCheckPolicies is being configured

* CORDA-1343 Address code review changes

* CORDA-1343 fix merge

* CORDA-1343 added test, docs, clarify comments

* CORDA-1343 clean up docs

* CORDA-1343 fix api

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge
2018-05-21 13:05:08 +03:00
szymonsztuka
fc88cefbc8 CORDA-1288 Node properties can be set as system properties. (#3172) 2018-05-21 10:55:44 +01:00
Shams Asari
3cdd908714
Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api.

EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
2018-05-17 16:18:07 +01:00
Kat Baker
0c3a30edc8 Corda-847 - Remove Kryo for RPC
It's no longer used as we've switched over to AMQP for RPC calls so
remove it from everywhere and only use it for checkpointing

 * Wire up demo bench post Kryo removal
 * Test Fixes
 * rebase and fix tests
 * Test Fix
 * wip
 * revert changes to api now we don't need to add annotations
2018-05-17 12:55:45 +01:00
Kat Baker
f850daa582 CORDA-847 - AMQP RPC
* Client and server support for amqp
 * Observable (and supporting) serialisers
   Unit Tests
 * Fixing tests
 * Test fixes
 * CORDA-847 - Update api doc with additon of @CordaSerializable annotation
 * TestFixes
 * review comments
 * TestFixes
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * TestFix
 * Test Fix
 * Review Comments
2018-05-17 12:53:38 +01:00
Patrick Kuo
0b76a12637
CORDA-864 Wire up max message size (#3057)
* add checks on message size
* added size check in AMQP bridge
* passing maxMessageSize to AMQPClient and server
* added Interceptor to enforce maxMessageSize on incoming messages
2018-05-17 09:59:30 +01:00
Michal Kit
0ee116a1d9
CORDA-1476 Adding TLS certificate CRL extension point configs (#3140)
* Adding TLS certificate CRL extension point configs

* Addressing review comments

* Addressing review comments - round 3
2018-05-17 08:21:24 +01:00
Tudor Malene
8e934df217
Fix db transaction check (#3164) 2018-05-16 15:55:51 +01:00
Thomas Schroeter
3d50e73271 Add configuration notary.serviceLegalName for clustered notaries 2018-05-16 15:19:14 +01:00
Andrzej Cichocki
65b782c206
ENT-933 Add spectator and participant profiles of rigorousMock (#3157) 2018-05-16 13:56:41 +01:00
Andras Slemmer
3392c15c0b CORDA-1491: Use MessagingExecutor for deduplication ACK codepath 2018-05-16 12:21:29 +01:00
Katarzyna Streich
b06738b371
CORDA-1093 Deleting node info from directory (#3115)
* CORDA-1093 Deleting node info from directory

Deleting NodeInfo from additional-node-infos directory should remove it from cache.
2018-05-16 11:45:59 +01:00
Andras Slemmer
32aa1bf9d2
Merge pull request #2978 from corda/CORDA-1352/aslemmer-os-killflow
CORDA-1352: Add killFlow
2018-05-15 15:49:27 +01:00
Chris Rankin
d0d07287e7
Remove duplicate Netty classes from Node. (#3142)
* Remove duplicate Netty classes from Node.
* Force all Netty modules to our given version.
2018-05-15 12:35:00 +01:00
Katarzyna Streich
24fa695ca0
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
2018-05-15 12:10:04 +01:00
renlulu
b2e9a427a8 Extracted a tool class to reduce duplicated logic between InMemoryIdentityService and PersistentIdentityService (#3141) 2018-05-14 18:00:07 +01:00
Tudor Malene
759ed7c3d0
CORDA-1369 set co.paralleluniverse.fibers.verifyInstrumentation=true in devMode (#3137) 2018-05-14 17:26:08 +01:00
josecoll
9d822cdbe8
CORDA-861 Pagination failure with aggregate groupBy query (#3135)
* Pagination relies on a recursive call to count total results, this sub-query should NOT perform pagination checks.

* Fix using defaulted parameter.

* Make internal method private.
2018-05-14 15:34:21 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Matthew Nesbit
3c005789c0
ENT-1850: Improve reporting of connection problems (#3124)
* Add nicer logging for SSL handshake problems

* Just in case let people see the horrid netty exception traces at trace level
2018-05-14 09:14:09 +01:00
Tudor Malene
543491c7df
CORDA-1461 improve devMode (#3100)
* CORDA-1461 improve devMode

* CORDA-1461 set devMode=true for driver

* CORDA-1461 fix tests and improve UI

* CORDA-1461 Address code review changes

* CORDA-1461 Missing developer emoji

* CORDA-1461 use latest cordform that sets devMode=true

* CORDA-1461 fix test and add driver overrides for notary

* CORDA-1461 fix tests, fix api-scanner version

* CORDA-1461 fix api

* CORDA-1461 formatting

* CORDA-1461 comment style
2018-05-11 17:48:02 +01: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
bb62538d28
[CORDA-1394]: Node can fail to fully start when a port conflict occurs, without a useful error message (fix). (#3119)
* [CORDA-1394]: Meaningful message if required port is already in use.

* [CORDA-1394]: Meaningful message if required port is already in use.
2018-05-11 20:08:53 +07:00
Mike Hearn
af802bd8c5 Minor: fix a warning in VaultQueryTests 2018-05-11 13:02:40 +02:00
Mike Hearn
54e1a7aa7e Docs: fix some broken markup that caused rendering errors and warnings. 2018-05-11 13:02:40 +02:00
Michele Sollecito
3a218b228d
[CORDA-1455]: Error in process-id deletion process allows multiple instances of same node to be run (fix). (#3118) 2018-05-11 17:10:18 +07:00
Michele Sollecito
5e0b27cfae
[CORDA-1445]: Raise proper error when starting node in devMode with compatibilityZoneURL. (#3109) 2018-05-10 22:00:47 +07:00
Thomas Schroeter
1a6922afe0
Test notarisation of issue transactions with time-window (#3092) 2018-05-10 11:37:57 +01:00
bpaunescu
8419b24d80
CORDA-1443: re-wrote tests to ensure connection closes before node to avoid lengthy artemis timeouts (#3104) 2018-05-10 09:42:48 +01:00
Patrick Kuo
be11da76c8
CORDA-1363 Network registration helper should check public key in certificate before storing in keystore (#3071)
* check pub key in network registration helper before storing in DB
2018-05-09 12:56:10 +01:00
Michele Sollecito
d7ef385cc7
[CORDA-1395] [CORDA-1378]: Control the max number of transaction dependencies. (#3047) 2018-05-09 15:58:18 +07:00
Maksymilian Pawlak
91f013c127
Flow framework test optimisation (#3031)
* Flow framework test separation into classes, so the one which do not require nodes restart can execute faster.
2018-05-08 14:00:57 +01:00
Michele Sollecito
5318c395ee
[CORDA-860]: Retrieving state by recordTime.max() throws a cast exception (fixed) (#3090) 2018-05-08 19:16:19 +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
Anthony Keenan
100f680042
CORDA-1001 - Remove peristent map in NodeSchedulerService (#763) (#3076)
* CORDA-1001 - Remove peristent map in NodeSchedulerService (#763)

* Add scheduled flow test that uses multithreaded node

* Replace use of PersistentMap in NodeSchedulerService

* Correct class name and remove duplicate test

* Address initial PR comments

* Remove debugging code

* Remove acidentally added line

* Move Scheduled State contracts to internal module

* Put things in the right places

* Add changelog message

* Fix countdown issue

* Addressing PR comments

* Remove unused class
2018-05-04 15:04:52 +01:00
Katarzyna Streich
e564303869
CORDA-1414: node should continue with parameters from file when network map not available (#3061)
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-04 14:42:10 +01:00
Anthony Keenan
f8a4368310
Add node scheduler db tests inside use block (#3075) 2018-05-04 13:03:02 +01:00
Maksymilian Pawlak
2cec6b095c
Vault query refactor (#3065)
* Move test initialization logic to jUnit rules for better composition and reusability
2018-05-04 10:21:40 +01:00
cburlinchon
fe87f16d98
Register crypto providers after we init logging (#3067)
* Register crypto providers after we init logging
2018-05-03 16:24:54 +01:00
Shams Asari
9ffb43f3f7
CORDA-1385: Ignore duplicate packages and sub-packages in driver extraCordappPackagesToScan (#3066)
Otherwise duplicate test CorDapps are loaded into the node
2018-05-03 12:28:36 +01:00
Chris Rankin
a6b7257491
CORDA-1441: Upgrade to Kotlin 1.2.41 (#3063) 2018-05-03 12:12:54 +01:00
szymonsztuka
23c604b1db
Vault queries - change SQL generation for aggregate function in 'group by' clause. (#3016)
Vault queries: 'order by' function aggregation e.g. 'order by sum(col)' is replaced by the position of the selected column (e.g. 'order by 1'). 
Rationale: A database may be unable to support aggregation function in order by clause e.g. 'order by (sum col_x)' and Hibernate can't produce alias in this case e.g. ' select sum(col_x) as alias_x... order by also_x ...', the best universal solution is to use positional parameter e.g. 'select sum(col_x) as alias_x... order by 1 ...'

(cherry picked from commit 416d4ec)
2018-05-02 16:59:13 +01:00
Katelyn Baker
0d3c7e7762
CORDA-847 - RPC Server lib refactoring (#3056)
Just as we did for the RPC CLient, refactor kryo specific elements into
their own sub module. Also move kryo specific components out of generic
RPC files.

Thus, adding AMQP support will be a much smoother operation
2018-05-02 15:48:41 +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
Patrick Kuo
bb76c5bcde
Merge pull request #3054 from corda/pat/registration-tool-bugfix
Bug fix: registration tool doesn't register for service identity if keystore already contains node cert
2018-05-02 13:50:58 +01:00
Andrius Dagys
3bf1e803d9
Move notary service related classes and interfaces in core to interna… (#2827)
* Move notary service related classes and interfaces in core to internal, since we won't be able to stabilise the APIs for writing custom notary services any time soon (the docs already mention it). I left out the wire protocol related classes so we don't accidentally break it.
2018-05-02 12:21:38 +01:00
Patrick Kuo
2750017b8e Bug fix: registration tool doesn't register for service identity if keystore already contains node cert (#756)
* fix a bug where registration tool will refuse to register for a service identity if the keystore contain NODE_CA key already.
some refactoring

(cherry picked from commit 5ed60ab)
2018-05-02 09:59:12 +01:00
Katelyn Baker
e338414cd4
CORDA-847 - RPC Clent lib refactoring (#3052)
Move Kryo into it's own sub module
2018-05-01 20:52:19 +01:00
Michele Sollecito
92922b874c
[CORDA-1397]: Fixed incorrect exception handling in NodeVaultService._query(). (#3043) 2018-05-01 19:33:13 +07:00
Konstantinos Chalkias
5bbfde3d35
Run filterMyKeys only when required (in NodeVaultService) (#3014) 2018-05-01 13:24:06 +01:00
Shams Asari
adef57f127
Including FlowException in the RPC exception whitelist (CORDA-1264) (#3037)
These exceptions are designed to be propagated in P2P and so makes sense to keep them visible if the recipient is an RPC user.
2018-05-01 07:48:50 +01:00
Shams Asari
42edf58b92
Introducing AbstractArgsParser which removes the boilerplate of printing help and exiting the process on cmd line errors. (#3040) 2018-04-30 22:22:51 +01:00
jamesbr3
32b57feaa0 Update jolokia to 1.5.0 (#2617)
* Update jolokia to 1.5.0

* adding jolokia update to changelog
2018-04-30 10:24:08 +01:00
Michal Kit
ab80df342a
CORDA-1319 Adding CRL checking for nodes (#2987)
* Adding CRL support for nodes

* Addressing review comments
2018-04-30 09:26:26 +01:00
bpaunescu
c3e6b39e59
artemis upgrade to 2.5.0 (#3029) 2018-04-27 19:54:08 +01:00
Viktor Kolomeyko
0cbfab9214
CORDA-1335: Move DistributedServiceTests into a separate package to reduce size of attachments produced. (#3021) 2018-04-27 16:47:01 +01:00
Andrius Dagys
efd203e5f3
ENT-1540: Make sure transactions with "expired" time windows get re-notarised correctly (#3004)
* ENT-1540: Make sure transactions with "expired" time windows get re-notarised correctly.

Currently the time window is checked before states are being passed to a uniqueness provider. If the time window is
invalid, the transaction will be rejected even if it has already been notarised, which violated idempotency.

For this reason the time window verification was moved alongside state conflict checks.

* Update API - this only affects custom notary interfaces
2018-04-27 15:02:09 +01:00
Maksymilian Pawlak
b210f7ab0b
DB test using transaction with rollback rather then recreating whole DB (#2994)
VaultQuery tests wrapped inside transaction which gets rolled back rather then recreating DB from scratch for each test
Moved Missing schema test to separate class, as it modifies global test class state
2018-04-27 09:52:25 +01:00
Michele Sollecito
235df69efe
[CORDA-1379]: Allow soft trapping of unknown config keys. (#3011) 2018-04-27 15:33:13 +07:00
Anthony Keenan
aecde00365
CORDA-1001 Remove unused bits of PersistentMap (#3001)
* Remove unused bits of PersistentMap

* Add persistent map tests

* Reivew comments
2018-04-26 21:58:01 +01:00
Thomas Schroeter
2ff3939e2e
Add exponential backoff to P2P messaging retry (#2975) 2018-04-26 13:58:41 +01:00
Andrius Dagys
7ad19af93f
CORDA-1353: Notaries should reject transactions that contain too… (#2986)
CORDA-1353: Notaries should reject transactions that contain too many inputs. Otherwise, it may cause a slowdown or make the service hang.
2018-04-25 17:29:19 +01:00
Shams Asari
e09fc60294
Improved error message on net parameters mismatch during node startup (#3003) 2018-04-25 14:33:07 +01:00
Andras Slemmer
29dbe6ab53 Add flow-id to MDC 2018-04-25 10:36:50 +01:00
Andras Slemmer
f1da044c86 Remove double wrap 2018-04-25 10:36:40 +01:00
Konstantinos Chalkias
03fb9d4be2
CORDA-1354 Check for jars in nested folders (to add in classpath) (#2981)
+ edge cases (logging if we don't have permission to jar folders)
2018-04-24 18:43:07 +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
Chris Burlinchon
b0d2a258c0 cherry-pick 7759fdbb71ea9b2021afd8af0ac05447c5305b3a 2018-04-24 09:36:57 +01:00
Andras Slemmer
a276a2555e Add killFlow tests 2018-04-23 15:36:35 +01:00
Andras Slemmer
5e0202acd0 Add killFlow 2018-04-23 15:36:35 +01:00
Andras Slemmer
6bf34ed5c7 Fix bugs 2018-04-23 15:36:16 +01:00
Andras Slemmer
5b4fd6fe64 Address comments 2018-04-23 15:36:16 +01:00
Rick Parker
57caf9af28 Cherry pick 34f8719363 2018-04-23 15:36:16 +01:00
Andras Slemmer
19dad6da96 Add back deprecated functions 2018-04-23 15:36:16 +01:00
Andras Slemmer
ce5fb66260 StateMachine rewrite 2018-04-23 15:36:16 +01:00
Shams Asari
d3446e213c
Introduced a few more extension methods to Path, which are clearer than the static methods in Files. (#2985)
Also migrated code away from the old File API.
2018-04-23 14:31:49 +01:00
Viktor Kolomeyko
bf4d8ba08c
CORDA-1335: Scan attachment Jar only to speed-up the process. (#2982)
* CORDA-1335: Scan attachment Jar only to speed-up the process.

* CORDA-1335: Explicitly mention other types of contracts to scan.

* CORDA-1335: Refactor to eliminate listing different subclasses of Contract in two separate places.
2018-04-23 09:17:43 +01:00
Anthony Keenan
7db48de2b8
CORDA-1344 Fix query paging in scheduled flow tests (#2970)
* Fix paging tests, move out of scheduled flow tests and provide java example

* Fix a few issues with docs
2018-04-18 11:10:21 +01:00
Shams Asari
1288f63998
Fixed the CorDapp configuration demo (#2967) 2018-04-16 17:23:11 +01:00
Konstantinos Chalkias
6f69f0252d
CORDA-1337 Crypto.registerProviders (#2962)
CORDA-1337 Crypto.registerProviders + add BCPQC as well
2018-04-13 12:40:15 +01:00
Katarzyna Streich
91c52af5ac
ENT-1584: Subscribe to private network maps using UUIDs (#2922)
Client private network map implementation

Add private network maps UUIDs to config as extraNetworkMapKeys. Adjust NetworkMapServer implementation accordingly.
Change NetworkMapUpdaterTest to use NetworkMapServer instead of mock
2018-04-13 10:52:45 +01:00
Patrick Kuo
b5f304a104 ENT-1323 Network map service to check all identities in submitted node info (#499)
* ENT-1323 Network map service to check all identities in submitted node info

* fixup after rebase

* address PR issues, refactored createValidNodeInfo

* address PR issues

(cherry picked from commit f9ed55b)
2018-04-12 13:11:30 +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
b46c3b89bd
CORDA-1326 Add default shell user only when local shell is started. (#2953)
In productionMode ssh could login to a node using "shell/shell" which is supposed to be available only in dev mode (to enable embedded shell).
2018-04-11 14:06:13 +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
Matthew Nesbit
70beffac48
Add support for different internal p2p artemis bind address/port (#2951)
* Add support for different internal p2p artemis bind address/port and externally advertised p2pAddress and port.

* Fix formatting
2018-04-11 10:33:17 +01:00
Shams Asari
ecce64ba03
HttpUrlConnection.getErrorStream() can be null, which if not handled can obscure the reporting of an HTTP error response, like in ENT-1744 (#2948) 2018-04-11 09:39:58 +01:00
Viktor Kolomeyko
e48cd808b0
Try to improve stability of NodeRegistrationTest (#2942)
Since we are running web-server and different handling methods will be called from
different threads, it is more appropriate to use concurrent data structures
for exchanging information between threads.

Prior to this change I observed the following exception which is likely to be due `certPaths` not synchronized between threads:
```
Caused by: kotlin.KotlinNullPointerException
    at net.corda.node.utilities.registration.RegistrationHandler$reply$1.invoke(NodeRegistrationTest.kt:151) ~[integrationTest/:?]
    at net.corda.node.utilities.registration.RegistrationHandler$reply$1.invoke(NodeRegistrationTest.kt:122) ~[integrationTest/:?]
    at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:221) ~[corda-core-corda-4.0-snapshot.jar:?]
    at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:213) ~[corda-core-corda-4.0-snapshot.jar:?]
    at net.corda.node.utilities.registration.RegistrationHandler.reply(NodeRegistrationTest.kt:149) ~[integrationTest/:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
 ```
2018-04-06 17:11:03 +01:00
Rick Parker
130b1d9325
CORDA-1303 Regression: Recording a duplicate transaction attempts sec… (#2935)
* CORDA-1303 Regression: Recording a duplicate transaction attempts second insert to vault.

Added unit test, and merged mock and real logic.
2018-04-06 10:28:51 +01:00
Shams Asari
1b37cef822
Minor: use of ByteArray.inputStream() and introduced PublicKey.hash (#2931) 2018-04-05 17:18:27 +01:00
Michal Kit
c8b58a601f
Adding CRL support in the generated certificates. (#2932) 2018-04-05 16:39:41 +01:00
Shams Asari
53a0aae489
Introduced a few helper methods around InputStream.readBytes (#2928) 2018-04-05 14:27:42 +01:00
Viktor Kolomeyko
9a1c27e3e0
Improve performance of NodeStatePersistenceTests (#2921)
Packages re-jig was meant to reduce the size of the jars that are being produced by the
node driver. E.g. previously `MessageState` was in package `net.corda` which resulted in jar file
of around 2MB to be created. Same for `NodeStatePersistenceTests` which was in `net.corda.node`
2018-04-05 09:33:03 +01:00
szymonsztuka
c998968e58
Update RpcExceptionHandlingTest tests introduced by CORDA-1264 (#2916) 2018-04-04 14:35:51 +01:00
szymonsztuka
7ec65901b6 Corda-1286 Fix embedded shell when rpc users from remoted database (#2910) 2018-04-03 19:13:41 +01:00
Viktor Kolomeyko
1f5559e3c4
Speed-up NodeRegistrationTest (#2873)
* Improve logging for NetworkMap requests

* Allow interrupt in polling if the process started successfully

* Put `advertiseNewParameters` back

* Additional log line to indicate when all the nodes are started

* Improve logging and use concurrent map since it is updated from multiple threads

* Change NetworkMap response validity duration and rename parameter accordingly

* Changes following code review from @shamsasari
2018-04-03 17:33:42 +01:00
Shams Asari
65ff214130
CORDA-1276: Cleaned up creation of node-info object on node start and when using --just-generate-node-info (#2909) 2018-04-03 17:30:53 +01:00
Andras Slemmer
ef723b1b68 CORDA-1295: Use ConcurrentHashMap instead of synchronised multimap 2018-04-03 12:06:59 +01:00
Andras Slemmer
6d5e08b44e CORDA-1295: Clean up client->observable association on observable finish 2018-04-03 11:43:17 +01:00
Michele Sollecito
0d1d7daedc
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2892) 2018-03-29 13:01:41 +01:00
Andrzej Grzesik
2863f8403b
CORDA-1277 Remove double quotes from keys in reference.conf
CORDA-1277 Remove double quotes from keys in reference.conf
2018-03-29 09:15:30 +01:00
Katarzyna Streich
d2b7f8b91f
ENT-1686: Improve error message on parameters mismatch (#2891)
Improve error message on parameters mismatch
2018-03-28 16:48:56 +01:00
ags
43ead64240
updating docs 2018-03-28 15:54:58 +01:00
Katarzyna Streich
2e4b223bd8
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
2018-03-28 15:42:39 +01:00
ags
51567e944d
detect quotes in config keys 2018-03-28 15:23:12 +01:00
Shams Asari
768dd32417
ENT-1663 - Inclusion of the cert path and root cert in the exception message when cert path validation fails. (#2890)
Also, added check to node startup that --initial-registration cannot occur in devMode
2018-03-28 15:18:50 +01:00
ags
e60b816b19
double quotes in reference conf confuse people 2018-03-28 14:28:55 +01:00
Michele Sollecito
36f02ff4b4 [CORDA-1267]: Making Corda's JPA classes non-final and Serializable. (#2882)
* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.

* Making Corda's JPA classes non-final and Serializable.
2018-03-28 08:40:28 +01:00
szymonsztuka
4269e4a02e
DrainingMode integration tests - explicit node names, changed column names of a test table. (#2879)
Align DrainingMode integration tests (related to CORDA-1243) with Enterprise repo.
2018-03-27 14:00:28 +01:00
Anthony Keenan
329fa94a09
CORDA-1002 Add node scheduler persistence tests (#2860)
* Add node scheduler persistence tests

* Kill the scheduler threads after node scheduler tests

* Address review comments
2018-03-26 14:48:58 +01:00