602 Commits

Author SHA1 Message Date
Rick Parker
2fe5bae8a7
ENT-1953 enterprise tuning config (#1057)
* ENT-1953 enterprise tuning config

* Keep flowThreadPoolSize at 1 for integration tests as some expect certain ordering it seems.

* Log thread count for SMM
2018-06-22 16:39:17 +01:00
tudor.malene@gmail.com
fb3e216318 Merge remote-tracking branch 'open/master' into tudor-merge-21-06
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt
#	tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt
2018-06-21 16:51:19 +01:00
Tudor Malene
381aadc78f
ENT-1796 RPC SSL (#3401)
* ENT-1796 add just-generate-rpc-ssl-settings command line flag. Fix ssl configuration and documentation

* ENT-1796 small fix. change alias

* ENT-1796 address code review changes

* ENT-1796 revert file

* ENT-1796 Added check to display better error message

* ENT-1796 Doc fixes
2018-06-21 16:46:05 +01:00
Chris Rankin
9b5a099302
ENT-2105: Remove unnecessary sourceSets from integration tests. (#1029)
The database scripts are already available from the test-utils JAR via the classpath and so don't need
to be included as additional source sets.
2018-06-20 15:38:48 +01:00
szymonsztuka
56e1f6c650 CORDA-1407 Node Explorer - fix total column 2018-06-19 12:21:40 +01:00
Florian Friemel
ad76b7821e
Merge remote-tracking branch 'open/master' into os-merge-2018-06-18-17_42 2018-06-18 17:51:41 +01:00
Florian Friemel
100008b139
[CORDA-1634] Destroy child processes when parent exits. (#3368)
* [CORDA-1634] Destroy child processes when parent exits.

* Add comment.

* Register Shutdownhook for processes regardless of whether the Driver was initialized with

* Add comment.

* Revert "Add comment."

This reverts commit a5e78c379fba4e132cb3287997e77e21a6600947.

* Add comment.

* Add shutdown hook in ShutdownManager.registerProcessShutdown.

* Initialize the ShutdownManager with a shutdown hook to ensure that  is called.

* Add comment.
2018-06-18 17:39:46 +01:00
Tommy Lillehagen
a612ca234a Merge remote-tracking branch 'open/master' into tlil-os-merge-20180613 2018-06-13 21:45:00 +01:00
Tommy Lillehagen
fe313951ea CORDA-1609 - Don't use reserved keyword as method name
As reported in [CORDA-1609](https://r3-cev.atlassian.net/browse/CORDA-1609),
`CordaRPCClientConfiguration.default` is not accessible from Java since
`default` is a reserved keyword.

As part of the refactor made in #2831, `CordaRPCClientConfiguration` went
from being a data class to an interface with a backing implementation of
type `CordaRPCClientConfigurationImpl`.

This resulted in Java users having to rewrite code that was on the form:

```java
final CordaRPCClient client = new CordaRPCClient(
    nodeAddress, CordaRPCClientConfiguration.DEFAULT
);
```

to something like this:

```java
final CordaRPCClient client = new CordaRPCClient(
    nodeAddress, CordaRPCClientConfiguration.Companion.default()
);
```

However, this does not work. The user would get a compilation error because
`default` is a reserved keyword in Java.

Since `CordaRPCClientConfiguration` has been made an interface, there is no
easy way of introducing a static final field on the interface from Kotlin.

Consequently, I've changed this back to using a `class` with a static field
named `DEFAULT` instead of the static method `default()`.

It should be noted that `default()` / `DEFAULT` is currently only used
internally to pass in default values in `CordaRPCClient.kt` and
`CordaRPCClientUtils.kt`. That said, it is exposed as part of our API
surface and consequently shouldn't be broken.

The latter means that in the above example, the user would actually not
have to provide the parameter at all:

```java
final CordaRPCClient client = new CordaRPCClient(nodeAddress);
```

As can be seen from the definition of `CordaRPCClient`:

```kotlin
class CordaRPCClient private constructor(...) {
    @JvmOverloads
    constructor(
        hostAndPort: NetworkHostAndPort,
        configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT
    ) : this(hostAndPort, configuration, null)
```

The mentioned [refactor](7a077e76f0 (diff-0948c125db93a22263eb81eaf3161c17R65))
did not make it into the 3.1 release, so from an API-stability perspective,
this change can be applied without affecting our commitment to a
backwards compatible API..
2018-06-13 15:39:03 +01:00
Chris Rankin
319953ba41 Merge commit '8087f3c5d3c823a5fbda9a728f129b0925c1fddb' into chrisr3-os-merge 2018-06-12 14:11:27 +01:00
Andras Slemmer
8038343065
Merge pull request #973 from corda/aslemmer-os-merge-11-jun
Aslemmer os merge 11 jun
2018-06-11 19:48:10 +01:00
szymonsztuka
c3ff42129c
Corda-1297 Column Nullability - dropping index before altering column (#932)
* Altering column for SQL Server requires dropping index in which it is a part of and the recreating it
(to avoid Liquibase error: The index 'xxx' is dependent on column 'yyy')
* Remove duplicated addNotNullConstraint causing error on Oracle dbs.
2018-06-11 19:21:33 +01:00
Dan Newton
5ceb61606a VaultTrack returns undesired states #3276 (#3336)
* filter by contract state in _trackBy

* write tests to check that _trackBy is filtering the states correct and tidy up filtering functions

* remove un needed function

* add change log message for filtering unrelated ContractStates from trackBy
2018-06-11 17:53:31 +01:00
Andras Slemmer
b0d86e04d7 Merge remote-tracking branch 'open/master' into aslemmer-os-merge-11-jun 2018-06-11 16:05:39 +01:00
Andrius Dagys
85fe0e4cb1
CORDA-1494: Rename p2pMessagingRetry configuration to flowTimeout configuration to reflect the change in how retries are implemented – it is now on flow rather than message level. (#3339) 2018-06-11 15:50:06 +01:00
szymonsztuka
98e58b282c Resolved merge conflicts. 2018-06-11 13:40:38 +01:00
Andrius Dagys
a590d5e0b3
CORDA-1494: Remove isTimed check from flow hospital when handling tim… (#3337)
* CORDA-1494: Remove isTimed check from flow hospital when handling timeout exceptions - the timeout might expire just after the TimeFlow has finished and the staff member would throw an exception.

Increase the default flow timeout value in mock network so retries don't happen – this has cause test flakiness.
2018-06-11 13:17:22 +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
Shams Asari
7886ef9450 Merge remote-tracking branch 'open/master' into os-merge-21280c0
# Conflicts:
#	node/src/main/kotlin/net/corda/node/services/statemachine/FlowHospital.kt
#	node/src/main/kotlin/net/corda/node/services/statemachine/PropagatingFlowHospital.kt
2018-06-07 18:08:37 +01:00
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
Andrius Dagys
d24299341c Merge remote-tracking branch 'open/master' into andrius/merge-06-07 2018-06-07 08:53:28 +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
Rick Parker
7e3e94cee9
OS -> ENT merge (#928)
* Revert back logging of tests (#3305)

* 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 19:53:07 +01:00
Maksymilian Pawlak
f4621d9a74
[CORDA-1297] Column nullability in migrations (#916)
* Migrations to proper nullability

* Removed node-core.changelog-v3-GA.xml file as indicated by PR comments, This change was already provided by nullability upgrade commits
2018-06-05 18:13:49 +01:00
Shams Asari
baa73ab141
Revert back logging of tests (#3305) 2018-06-05 15:58:38 +01:00
josecoll
c2f22e18a5
Corda Behave framework updates to decouple from Network Services (#914)
* Added new 'eventHorizonDays' configuration item.

* Added custom authenticator to provide ARTIFACTORY credentials upon resolving protected internal URL.

* Re-pointed functional test scenarios to point to Enterprise master.

* Enterprise corda network scenarios to use NetworkBootstrapper tool (instead of Doorman/NMS) since decision made by Product Management to split out Doorman/NMS from Enterprise.

* Configuration parameter changed to 'runMigration' since DP3.

* Fixed problem with logger upon startup.

* General improvements and additions to setup and execution scripts (eg. SIMM valuation demo now consists of 3 separate jars)

* Updates to decouple from Network Services.

* Download all JARs from artifactory for a given published distribution.

* Add TODOs for Doorman/NMS rework.

* Addressing TL PR review comments.

* Additional instructions for setting up the environment and running QA tests.

* Fixed repository URL references.
2018-06-05 15:02:07 +01:00
sollecitom
61127fe65f Merge remote-tracking branch 'remotes/open/master' into merges/june-05-09-57 2018-06-05 09:58:28 +01:00
Michele Sollecito
e34bce9f3f
[CORDA-1582]: Shell is back to logging only useful information. (#3296) 2018-06-05 09:25:47 +01:00
szymonsztuka
da22c2511d Table name node_attchments_contracts change in SQL setup scritps following fix for CORDA-1499 merged from OS. 2018-06-04 19:00:38 +01:00
szymonsztuka
f5c9a398ad Merge remote-tracking branch 'remotes/open/master' into merges/os-2018-06-04-szymon
# Conflicts:
#	docs/source/upgrade-notes.rst
#	node/src/integration-test/kotlin/net/corda/node/BootTests.kt
2018-06-04 17:35:19 +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
tudor.malene@gmail.com
eb801d40b8 Merge remote-tracking branch 'open/master' into tudor-merge-os-01_06
# Conflicts:
#	core/src/main/kotlin/net/corda/core/cordapp/Cordapp.kt
#	core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/CordappLoader.kt
2018-06-01 13:56:43 +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
Tudor Malene
fd2f2eb14a ENT-1871 Rebrand R3Corda to Corda Enterprise (#838)
* ENT-1871 Rebrand R3Corda to Corda Enterprise

* ENT-1871 Address code review comments

* ENT-1871 Address code review comments

* ENT-1871 Address code review comments

* ENT-1871 Address code review comments
2018-05-31 08:59:05 +01:00
sollecitom
de0c69a888 Merge remote-tracking branch 'remotes/open/master' into merges/may-29-16-48
# Conflicts:
#	node/src/integration-test/kotlin/net/corda/node/services/RaftNotaryServiceTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/network/PersistentNetworkMapCacheTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/services/identity/PersistentIdentityService.kt
#	node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionMappingStorage.kt
#	node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorage.kt
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
#	node/src/test/kotlin/net/corda/node/internal/NodeTest.kt
#	node/src/test/kotlin/net/corda/node/services/identity/PersistentIdentityServiceTests.kt
#	node/src/test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/DBCheckpointStorageTests.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/DBTransactionStorageTests.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/HibernateConfigurationTest.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentStorageTest.kt
#	node/src/test/kotlin/net/corda/node/services/schema/HibernateObserverTests.kt
#	node/src/test/kotlin/net/corda/node/services/transactions/PersistentUniquenessProviderTests.kt
#	node/src/test/kotlin/net/corda/node/services/transactions/RaftTransactionCommitLogTests.kt
#	node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt
#	node/src/test/kotlin/net/corda/node/utilities/ObservablesTests.kt
#	samples/irs-demo/cordapp/src/test/kotlin/net/corda/irs/api/NodeInterestRatesTest.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt
2018-05-29 17:17:08 +01:00
Michele Sollecito
7c87353bde
[CORDA-1547]: Make log4j2.xml files more resilient to regex escaping problems. (#3254) 2018-05-29 15:25:52 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
szymonsztuka
ab97ae252d
Merge pull request #883 from corda/merges/os-2017-05-29
OS merge up to 2017-05-28
2018-05-29 12:53:56 +01:00
szymonsztuka
99d4d92ae2
Added Liquibase migration schema file for DummyTestSchemaV1 introduced by ENT-1932 to fix integration tests in database mode. (#878)
Added Liquibase migration schema file for DummyTestSchemaV1 for IntegrationTest - when running integration tests against remote database schema migration is on and needs the missing file, a table renamed to avoid clash with another one from a dummy schema.
2018-05-29 12:10:11 +01:00
szymonsztuka
c6168cb4e6 Resloved merge conflicts. 2018-05-29 11:32:43 +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
rick.parker
033a5798a1 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180525-1
# Conflicts:
#	.idea/compiler.xml
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/config/ConfigUtilities.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/DatabaseTransaction.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPChannelHandler.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/AMQPClient.kt
#	node/src/integration-test/kotlin/net/corda/node/services/network/NetworkMapTest.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt
#	node/src/main/kotlin/net/corda/node/services/statemachine/transitions/DeliverSessionMessageTransition.kt
#	node/src/main/resources/reference.conf
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
#	node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt
#	settings.gradle
2018-05-25 14:19:15 +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
c40e080dcc Merge remote-tracking branch 'open/master' into os-merge-3136e97
# Conflicts:
#	.idea/compiler.xml
#	node/src/main/kotlin/net/corda/node/serialization/kryo/CordaClassResolver.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/CordaClosureSerializer.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/DefaultKryoCustomizer.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/Kryo.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/KryoSerializationScheme.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/SerializeAsTokenSerializer.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/test/kotlin/net/corda/node/serialization/kryo/KryoStreamsTest.kt
#	node/src/test/kotlin/net/corda/node/serialization/kryo/KryoTests.kt
#	serialization/src/main/kotlin/net/corda/serialization/internal/SharedContexts.kt
2018-05-24 13:20:16 +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
Michele Sollecito
48f89e9ff8
[CORDA-1526]: Ensure MDC is printed in logs only if not empty. (#3222) 2018-05-23 13:23:02 +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
Michele Sollecito
cafcecec2b
[CORDA-1264]: Mask internal errors if devMode is false. (#871) 2018-05-23 09:55:24 +01:00
tudor.malene@gmail.com
2ca11d7996 Merge remote-tracking branch 'open/master' into tudor-merge-21-05-18
# Conflicts:
#	.idea/compiler.xml
#	client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt
#	client/rpc/src/main/kotlin/net/corda/client/rpc/internal/CordaRPCClientUtils.kt
#	docs/source/generating-a-node.rst
#	finance/src/main/kotlin/net/corda/finance/contracts/asset/CommodityContract.kt
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisMessagingClient.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/AMQPBridgeTest.kt
#	node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcSslTest.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt
#	node/src/main/kotlin/net/corda/node/services/config/SslOptions.kt
#	node/src/main/kotlin/net/corda/node/services/messaging/RPCMessagingClient.kt
#	node/src/main/kotlin/net/corda/node/services/rpc/NodeLoginModule.kt
#	tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt
2018-05-21 13:49:59 +01:00