Commit Graph

499 Commits

Author SHA1 Message Date
Thomas Schroeter
ec55397335
Record Hikari metrics (#3912) 2018-09-10 13:13:58 +01:00
Shams Asari
83e66d542d
Syncing Cordapp info code from ENT so that ENT-1731 is fully ported (#3914)
Also, Cordapp.Info has been made internal as it's not used in the public API
2018-09-10 10:43:00 +01:00
Michele Sollecito
20cd4539d6
Fixed broken master. (#3906) 2018-09-06 15:07:03 +01:00
bpaunescu
793ee3e1ee
Store default platform version in a constant (#3900)
* use constant for default platform version value when tests with out of process nodes are run from Intellij.

* node will use constant for platform version instead of manifest file(RPC already uses the constant, no sense in having 2 sources for it)

* fix issues caused by merge
2018-09-06 14:32:23 +01:00
Michele Sollecito
584387d5ec
Fixed some problem I discovered while working on another story (#3901)
* - Fixed some problems with error handling for Observables.
- Eliminated incorrect double `stop()` call for RpcBroker.
- Added `Schedulers.shutdown()` call in `stop()` implementation for Node and Driver, to avoid stuck processes when observable pipelines go wrong.

* Fixed a missing import.

* Removed `Schedulers.shutdown()` for now.

* Fixed an issue with `pendingFlowsCount()` function.
2018-09-06 13:11:41 +01:00
Matthew Nesbit
304dba704e
Support HA without load balancer (#3889)
Allow configuration in node for additional advertised addresses.

fix logic error

Use empty list as default config not null

Allow multiple addresses in NodeInfo

Describe new additionalP2PAddresses property in docs.

Add integration test of additionalP2PAddress feature

Fixup after rebase

Address PR comment

Address PR comments by removing unused element of NodeAddress
2018-09-05 17:46:46 +01:00
Michele Sollecito
2fbeab1365
Fixed compilation error for case-insensitive operating systems. (#3896) 2018-09-05 13:06:05 +01:00
Michele Sollecito
a7f9320985
Fixedd a mistake in CertificateStoreStubs. (#3893) 2018-09-04 17:31:42 +01:00
Michele Sollecito
d01dd22419
[CORDA-1937]: Refactor NodeConfiguration hierarchy. (#3856) 2018-09-04 10:26:10 +01:00
Mike Hearn
33f5aa4190 RPC: make the client library require the platform version it is built for.
Remove an unnecessary override on the CordaRPCOps interface.
2018-09-03 19:05:47 +02:00
LankyDan
643ad31736 Add tests to confirm that if a Hibernate error occurs the transaction will fail and no states will be persisted
Add tests to NodeVaultServiceTest
Add VaultFlowTest
Add UniqueDummyFungibleContract and UniqueLinearContract to be used in the constraint tests
2018-09-03 18:58:16 +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
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +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
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
Joel Dudley
f3392e31d2
Documents waitQuiescent. Explains why it is important. (#3787)
* Update api-testing.rst

* Warning regarding using threadPerNode

* Corrects JavaDocs. Adds message to .
2018-08-16 17:34:50 +01:00
Stefano Franz
fffa063803
Cli backwards compatibility testing (#3733)
* first pass at infrastructure around cli compatibility

* add example unit test

* inspect enum types

* add a basic unit test to verify behaviour of the cli checker

* revert root build.gradle
2018-08-16 15:44:40 +01:00
josecoll
f684cb29bd
CORDA-1888 Fix Vault Query composite queries (#3775)
* Reproduce composite query failures.

* Fixes to OR querying and composite queries that use the same QueryCriteria (Linear, Fungible, Custom) more than once.

* Revert debug logging for Hibernate SQL.

* Cleanup and remove redundant joinPredicates global var.

* Fix failing Java Unit test.

* Fix Java compilation error in example-code section of docs.

* Include copy() function for original constructor to maintain backwards API compatibility.
2018-08-13 18:11:29 +01:00
Shams Asari
3f27e8e0be
ENT-2359: Complete the nodeReady future if there are already node-infos in the db on startup (#3745)
Otherwise PersistentNetworkMapCache only completed the future if a node-info was added, which may not occur after a node restart and thus prevented the SMM from registering its listener with the messaging layer.

Further, the future is only completed if the node-info is other than the node's own one.
2018-08-07 16:17:06 +01:00
Viktor Kolomeyko
76d87b67ce
CORDA-1844: Support for high throughput Observables shipped via RPC (#3698)
* CORDA-1844: Exposing a problem via Unit test.

* CORDA-1844: Unit test update following input from Andras.

* CORDA-1844: Add optional parameter to reduce the time it takes to shutdown RPCServer.

* CORDA-1844: Add optional parameter to reduce the time it takes to shutdown RPCServer and sensibly default it.

Minor changes.
2018-08-06 13:14:53 +01:00
Dan Newton
40b922c1f2 CORDA-1837: Reject nodes that have the same organisation name in driver tests (#3740)
* Reject nodes that have the same organisation name as a previously registered node rather than the same X500 name

DriverDSLImpl -> NetworkVisibilityController -> register check organisation name rather than X500 name and throw IllegalStateException if already exists
Added test to DriverTests to test multiple organisation names end exceptionally

* Remove redundant test and store the organisation names rather than X500 names for driver tests
2018-08-04 13:26:41 +01:00
Dominic Fox
7182542724
Matchers (#3716)
* Move common matches to testing, add some missing ones

* Clarify test logic

* Move common matches to testing, add some missing ones

* Clarify test logic

* Rename 'randomise'

* endregion

* Fix broken unit test
2018-08-01 10:18:54 +01:00
Chris Rankin
01d896394a
CORDA-1862: Allow MockNetwork to create StartedMockNode from UnstartedMockNode. (#3731)
* Allow MockNetwork to create StartedMockNode from UnstartedMockNode.
* Reimplement by adding a `started` property to UnstartedMockNode.
* Throw IllegalStateException instead of NoSuchElementException.
* Add an isStarted property to UnstartedMockNode.
2018-08-01 08:35:39 +01:00
Chris Rankin
b7f7dcc510
CORDA-1861: Remove default value to make createUnstartedNode() unambiguous. (#3729) 2018-07-31 17:10:07 +01:00
Shams Asari
dfafdbcb9f
Added checks against the use of the special uploader tokens (#3724)
"app", "rpc", "p2p" and "unknown" have security implications (see isUploaderTrusted method) and thus they are not allowed to be used in the uploader field when importing attachments via the public API.
2018-07-31 17:01:39 +01:00
Tudor Malene
85caa9ee9d
Feature/corda 1847/remove hibernate observers (#3696)
* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix hibernate observer issue

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests

* CORDA-1847 Fix tests
2018-07-31 13:52:13 +01:00
Dominic Fox
4542e0cd06
CORDA-916: Add registerFlowFactory method to public test API (#3720)
* Add registerFlowFactory method to public test API

* Return CordaFuture rather than a plain Future

* Rename method

* Improve KDoc

* Hide internal interface with public wrapper

* Modify API current to include ResponderFlowFactory interface

* Take API definition change from generated file

* Note API change in changelog
2018-07-31 13:33:18 +01:00
Shams Asari
93bb24ed17
Internal mock node clean up (#3715)
* InMemoryMessagingNetwork.InMemoryMessaging renamed to MockNodeMessagingService and moved to internal package
* start method added to MockNodeMessagingService which enables AbstractNode to call makeMessagingService in its c'tor
* Removed TopicStringValidator as it's no longer used
* Clean up of TestStartedNode
* Merged InMemoryMessagingTests into InternalMockNetworkTests as it's testing InternalMockNetwork
2018-07-30 10:35:03 +01:00
Viktor Kolomeyko
e1223e3145
CORDA-1799: Always use "/" as a path separator inside JARs (#3704)
Or else tests are going to fail on Windows, e.g.:
https://ci-master.corda.r3cev.com/viewLog.html?buildId=103027&tab=buildResultsDiv&buildTypeId=Corda_BuildWindowsTest

```
java.lang.IllegalArgumentException: Illegal character in path at index 95: file:/F:/buildAgent/work/f0cf2ea65c8f73ab/finance/build/libs/corda-finance-4.0-SNAPSHOT.jar/net\corda\finance\contracts\asset\BilateralNetState.class
    at java.net.URI.create(URI.java:852)
    at net.corda.testing.node.internal.JarEntryInfo$Companion.classFileURL(TestCordappsUtils.kt:209)
    at net.corda.testing.node.internal.JarEntryInfo$Companion.access$classFileURL(TestCordappsUtils.kt:199)
    at net.corda.testing.node.internal.JarEntryInfo$ClassJarEntryInfo.<init>(TestCordappsUtils.kt:178)
    at net.corda.testing.node.internal.TestCordappsUtilsKt.jarEntryInfo(TestCordappsUtils.kt:56)
    at net.corda.testing.node.internal.MutableTestCorDapp$Companion.jarEntriesFromClasses(MutableTestCorDapp.kt:42)
...
 ```
2018-07-27 12:55:39 +01:00
Roger Willis
8207ac3222
CORDA-1332 Reference input states (#3525)
* * First commit for reference input states feature.

* Added docs.
* Added additional test.

* Fixed whitespace.

* Rebased to master.
* Updated Raft and persistent notary implementations.

* Updated changelog.

* Updated topo sort to handle reference states.
* Stubbed out with referenced states flow.

* Added WithReferencedStatesFlow.
* Added Tests for WithReferencedStatesFlow.
* Added ReferenceState type.
* Rebased to latest version of master.

* Added better comments.
* Updated unit test.

* Added comment to explain a little hack.
* Fixed broken contract upgrade RPC test.

* Added minimum platform version check.
* Updated mock network so that notary nodes inherit the platform version set by the network's minimum platform version.
* References states can now only be used when minimum platform version >= 4.

* Created a new file to hold async operations as "WaitForStatesToUpdate" is broadly reusable.
* Refactored WithReferenceStatesFlow

* Updated javadoc for WaitForStatesToUpdate aysnc operation.

* Added network parameters property to InternalMockNetwork.

* Added min platform version capability to mock services.

* Removed erroneous chars from file.

* Made async operation internal and now call it from FlowLogic.
* Moved some transaction checking code around.

* Removed serializable annotation from referenced state and ref.
* Added reference states design doc.
* Added missing KDocs.
* Updated with reference states flow to handle consecutive update races.
* Made platform version info an inheritable thread local.
* Fixed various typos.
* Updated docs.

* Fixed race.

* Removed min platform version checks as API needs more thought.

* Added deprecation to method and supressed warnings.

* Renamed WaitForStatesToUpdate to WaitForStateConsumption.
* Fixed race in WaitForStateConsumption.

* Addressed PR comments and updated comments / KDocs.

* Reverse vault bugfixes.

* * Vault bug fixes.

* * Fixed broken test.
* Moved WaitForStateConsumption to internal package.
2018-07-25 14:06:56 +01:00
Dominic Fox
f5b86d32f8
Eliminate StartedNode (#3690)
* Shrink StartedNode

* Eliminate StartedNode
2018-07-25 13:49:34 +01:00
Dominic Fox
6b320026a1
CORDA-916 separate test startednode (#3675)
* Push start() implementation back into base

* Narrow access

* Optimise imports

* Fix tests

* Get Java test compiling
2018-07-25 10:05:50 +01:00
Tudor Malene
40fc56f2ea
Feature/corda 1813/change postgres column type (#3631)
* CORDA-1813 fix Postgres db bloat issue

* CORDA-1813 merge fixes

* CORDA-1813 change column type and size to a standard corda type

* CORDA-1813 docs

* CORDA-1813 create custom hibernate type for the checkpoint blob and align with enterprise

* CORDA-1813 Remove max col size

* CORDA-1813 Remove max col size

* CORDA-1813 Fix merge

* CORDA-1813 Remove buggy :serverNameTablePrefix: configuration
2018-07-25 09:52:57 +01:00
Shams Asari
d4f0e0f8e0
Ordered starting of node components and clear dependencies between them (#3664)
Moved start up logic of the various node components out of their c’tors and into “start” methods, which are called from Node.start(). The components themselves are created in the Node’s c’tor with minimal initialisation logic.

Certain things are not immediately available at construction time, which are instead given to the components at start time in an orderly fashion:

* Certs from the node’s key store and trust store
* The network parameters, and thus access to things like maxMessageSize and the contracts whitelist
* A running database - several components were doing database stuff their c’tors
* The node’s NodeInfo, and thus access to things like identities and addresses

The messaging service couldn’t be created in the Node’s c’tor due to initialisation issues with MockNode. This should be fixed in a later commit.
2018-07-24 16:13:21 +01:00
Shams Asari
a0183fbdfd
Removed PersistentNetworkMapCache.start() (#3661)
The loading of all node infos in the start method was unnecessary, both for the changePublisher and _loadDBSuccess, and the setting of _registrationFuture was incorrect.
2018-07-23 14:01:14 +01:00
Michele Sollecito
abc1d99eaa
[CORDA-1799]: Avoid generating test CorDapp JARs from each out of process node started by the driver (#3641) 2018-07-23 11:18:11 +01:00
Shams Asari
ff607e1bc1
Moved network services tests back as unit tests (#3639) 2018-07-18 11:03:45 +01:00
Shams Asari
921b132658
Deprecated freeLocalHostAndPort, freePort and getFreeLocalPorts of TestUtils (#3630)
They're prone to cause flaky tests due to the "allocated" ports already being taken by the system when eventually needed. Replaced usages with PortAllocation.Incremental.

Affected unit tests made into integration tests to avoid any issues in the future when unit tests are made to run in parallel.
2018-07-17 14:42:30 +01:00
Shams Asari
736d62ec1a
Retire RandomFree as it causes flaky tests (#3626) 2018-07-17 10:29:47 +01:00
Shams Asari
dc3bd8de7a Retired BankOfCordaRPCClientTest as it's mostly duplicated by BankOfCordaCordformTest (#3565) 2018-07-13 10:37:51 +01:00
Joel Dudley
2db5e0e158
Docs were missing final brace (#3551) 2018-07-12 17:48:09 +01:00
Shams Asari
f4a248f81f
Made CashSelectionTest a unit test by using mock network. (#3570)
Also includes adding a default value of emptyList() to InternalMockNetwork.cordappPackages
2018-07-12 11:55:51 +01:00
Shams Asari
2833ec2a88
Avoiding starting notaries in driver-based integration tests to speed them up (#3544) 2018-07-11 11:36:36 +01:00
Viktor Kolomeyko
d481c55b82
CORDA-1743: Remove isDebug = true from Node driver to speed-up integration tests execution. (#3535)
* CORDA-1743: Remove `isDebug = true` from Node driver to speed-up integration tests execution.

* CORDA-1743: Undo removal of "isDebug = true" from the test that specifically checks for this condition.

* CORDA-1743: Address input from @shamsasari
2018-07-09 16:37:01 +01:00
Shams Asari
aefd90f062
Minor: ProcessUtilities clean up (#3533) 2018-07-09 12:29:33 +01:00
Maksymilian Pawlak
f7dd4f7880
Use in-memory H2 for integration test (#2508)
* Default integration tests running with in-memory H2
2018-07-05 14:58:51 +01:00
Shams Asari
244167d3e9
Enabled warnings as errors (#3514) 2018-07-04 17:17:27 +01:00
Tudor Malene
95d1b1f84e
ENT-2001 use versionInfo when registering node with the doorman (#3435)
* ENT-2001 use versionInfo when registering node with the doorman

* ENT-2001 address code review changes
2018-07-03 09:16:48 +01:00
PokeyBot
2b6018f050
Merge pull request #3473 from corda/fix_flaky_test
[CORDA-1698] Fix flaky test
2018-06-29 16:26:24 +01:00
Florian Friemel
4c56188383
Cleanup. 2018-06-29 09:55:34 +01:00
Florian Friemel
941719ab8b
Use TestClock in MockServices. 2018-06-28 17:14:06 +01:00
Patrick Kuo
8df18e954f ENT-2014 Deletes of NodeInfo can fail to propagate leading to infinite retries (#1101)
* ENT-2014 Deletes of NodeInfo can fail to propagate leading to infinite retries
ENT-1880 Move identity key generation to network registration process

(cherry picked from commit c3ac203)
2018-06-28 15:20:22 +01:00
Shams Asari
84a86d32b7
Fixed broken smoke test caused by no notaries in the network parameters (#3461)
For now the workaround is to manually select the notary. The proper solution is to add notaries to the network parameters in smoke tests.
2018-06-28 09:43:29 +01:00
Shams Asari
eee2563bfa
CORDA-1660: Wiring up the CordaRPCClient class loader to the p2p serialisation context. (#3454)
This is to allow the standalone shell to be able to receive WireTransactions containing Cash.State objects.
2018-06-27 17:02:35 +01:00
Tudor Malene
9be4c5dca4
CORDA-1567 Remove all traces of the out-of-process verifier (#3424) 2018-06-25 13:01:33 +01:00
Tudor Malene
687ed95994
CORDA-1407 Fix explorer rpc access rights (#3413) 2018-06-22 09:48:13 +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
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 a5e78c379f.

* 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
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
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
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
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
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
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
baa73ab141
Revert back logging of tests (#3305) 2018-06-05 15:58:38 +01:00
Michele Sollecito
e34bce9f3f
[CORDA-1582]: Shell is back to logging only useful information. (#3296) 2018-06-05 09:25:47 +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
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
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
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
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
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
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
Ivan Schasny
8990e9f783
Merge pull request #3170 from corda/CORDA-1459
Corda 1459
2018-05-21 10:45:29 +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
josecoll
27803cdc9e
ENT-1887 Make sure open and enterprise API are identical (#3158)
* Sync public API's (and associated internal helpers) between Enterprise and OS.

* Add previous default constructor explicitly.

* Keep the API checker happy!

* Revert addition of ENT makeTestDataSourceProperties() function.
2018-05-16 18:01:53 +01:00
Ivan Schasny
dc5d89367d Merge branch 'master' into CORDA-1459 2018-05-16 17:11:23 +01:00
Ivan Schasny
c4be0ad959 [CORDA-1459] Removed CommodityContract 2018-05-16 17:11:12 +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
Tudor Malene
26c6ba6118
CORDA-1461 Fix smoke tests (#3150) 2018-05-15 13:25:28 +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
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07: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
Shams Asari
3bb95c3ed1
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.
2018-05-09 21:42:55 +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
Shams Asari
a772884d48
CORDA-1030 - allow nodes to be waited for in-process (#2678) (#3070)
(cherry picked from commit 53bb986)
2018-05-03 17:48:49 +01:00
Roger Willis
db22c5259d
Feature to exclude CorDapps from specific MockNodes in a MockNetwork. (#3028)
* Feature to exclude CorDapps from specific MockNode's in a MockNetwork.

* Fixed API stability issue.

* * Added docs.
* Changed approach for the new parameter to be additive as opposed to exclusive.

* * Updated incorrect comments.
2018-05-03 15:39:52 +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
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
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