2595 Commits

Author SHA1 Message Date
rick.parker
237c133804 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180814-1
# Conflicts:
#	CONTRIBUTORS.md
#	constants.properties
#	docs/source/index.rst
#	docs/source/upgrading-cordapps.rst
#	node/build.gradle
2018-08-14 11:26:52 +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
Michele Sollecito
3b63723934
[CORDA-1822]: Improved error message when too many results are asked with default pagination. (#3776) 2018-08-13 16:50:29 +01:00
Rick Parker
0a18979307
CORDA-1894 Remove if condition from service hub that prevents vault logic executing. (#3773) 2018-08-13 14:17:03 +01:00
Andrius Dagys
0746b1f927
CORDA-1850: Minor: improve flow timeout error message (#3764) 2018-08-13 10:05:55 +01:00
Mike Hearn
68bfb7ff66 New jokes. 2018-08-10 14:32:16 +02:00
Roger Willis
b0d36b6617
* Minor formatting changes. (#3758)
* NotaryServiceFlow now takes references into account when comparing number of inputs vs maxAllowedInputs.
* Added reference state support for BFTSMaRt notary.

* Fixes broken BFT notary tests.
2018-08-10 08:51:56 +01:00
Tommy Lillehagen
66739c138c NOTICK - Fix version reference for New Relic dependency (#3765) 2018-08-09 18:17:20 +01:00
szymonsztuka
43def2a352 Fix test in database mode - ensure remote database is initialized before test object are created. 2018-08-09 14:16:15 +01:00
szymonsztuka
3b0ddd30bf Added SQL setup for integration test in database mode. 2018-08-09 10:59:07 +01:00
rick.parker
e508033201 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180809-1 2018-08-09 09:33:38 +01:00
evh69
5f17fc1b07 Jmx Reporter Addition to allow for New Relic over Jolokia alternative (#3739)
* gradle.build - Added metrics-new-relic dependency
Node.kt - Refactored start(): NodeInfo function extracting the code that was creating the Jolokia JMX reporter configuration and placing it into its own registerJolokiaReporter private function, added a registerJmxReporter function that is now called from start(), the registerJxmReporter function checks the NodeConfiguration's JmxReporterType value for either JOLOKIA or NEW_RELIC to derive whether to execute the registerJolokiaReporter vs. registerNewRelic reporter.
NodeConfiguration - enhanced to encapsulate a JmxReporterType (JOLOKIA is the default config) configuration options for Jolokia or NewRelic reporters.
Enhanced NodeTest.kt, NodeConfigurationImpleTest.kt and added test-working-config-newrelic.conf to ensure that tests still work as expected.

* Added configuration details concerning JmxReporterType ...

* Updated files with style suggestions made by @tlil

* Updated markdown of the external url

* Changed grammer on "See `Introduction to New Relic for Java`_ for details on getting started and how to install the New Relic Java Agent."
to "See `Introduction to New Relic for Java`_ for details on how to get started and how to install the New Relic Java agent."
2018-08-09 08:11:17 +01:00
Florian Friemel
ba198f7efb
[ENT-2048] Remove unused table from database deployment. (#1316) 2018-08-08 16:28:51 +01:00
Michele Sollecito
59dd39b069
[CORDA-1809]: Some improvements in logging context information. (#3755) 2018-08-08 15:20:50 +01:00
Rick Parker
ba3695a333
ENT-2376 Reduce database queries during publishing of consumed states (#1317) 2018-08-07 17:46:12 +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
Thomas Schroeter
44a4742c1b Merge remote-tracking branch 'open-source/master' into thomas/os-merge-2018-08-07 2018-08-07 13:26:06 +01:00
Thomas Schroeter
dd4923e80e
Add jitter to retries (#3749)
* Add jitter to retries

* Address comments
2018-08-07 13:24:22 +01:00
Michele Sollecito
6255459ce7
[CORDA-1880]: Exception if timeout during initial registration (fixed). (#3748) 2018-08-07 11:31:10 +01:00
Viktor Kolomeyko
f5989013f2 OS->Ent merge 2018-08-06 14:43:51 +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
Viktor Kolomeyko
c24d916f5a
RPC changes (#3697)
* Eliminate un-necessary reference to Kryo in the comment

* RPC documentation update.

* Rename RpcClientObservableSerializer into RpcClientObservableDeSerializer
2018-08-06 09:11:15 +01:00
Rick Parker
87f03c50b5
ENT-2371 Automatic soft locking of FungibleAssets causes lots of deadlocks (#1315)
* Stop using softLockReserve for newly created FungibleAssets, and just create pre-locked.

* Forgot to set flag to release soft locks
2018-08-03 15:14:28 +01:00
rick.parker
49d99f00fc Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180802-1 2018-08-02 10:34:34 +01:00
Rick Parker
ff298e17e1
CORDA-1866 Avoid circular flushing in our hibernate column converters. (#3737) 2018-08-02 10:08:12 +01:00
szymonsztuka
a63c9526ca Merge OS 2018-08-01 14:13:39 +01:00
szymonsztuka
c23167f08e
ENT-2188 fix H2 insecure default configuration (#3692)
Set the "h2.allowedClasses" system property, require database password when exposing H2 server on non-localhost address, samples start H2 server by default (reintroduces the behaviour before h2Settings.address configuration option was added)
2018-08-01 11:50:42 +01:00
Dan Newton
0762a61aca In AbstractNode check if an initiating flow already has a flow registered to it and throw exception if one has been (#3713)
* In AbstractNode check if an initiating flow already has a flow registered to it and throw exception if one has been

In AbstractNode.internalRegisterFlowFactory check if a flow factory already exists for a initiating flow
If a factory does exist, throw an exception
A few tests needed to be fixed due to this change

* Reorder test setup to prevent flows from being registered multiple times

* Use check instead of if and throws statement in AbstractNode when checking for initiating flow having multiple flows mapped to it

Use check instead of if throws statement
Change names of methods in tests
Improve FlowRegistrationTest to better check if flow has been registered properly

* tidy up FlowFrameworkTests and FlowRegistrationTest
2018-08-01 07:58:00 +01:00
Tudor Malene
a9bbf1b0e8 fix os merge 2018-07-31 18:02:20 +01:00
tudor.malene@gmail.com
159a3d25a5 Merge remote-tracking branch 'open/master' into tudor-os-merge-31-07
# Conflicts:
#	finance/src/test/kotlin/net/corda/finance/contracts/CommercialPaperTests.kt
#	finance/src/test/kotlin/net/corda/finance/contracts/asset/CashTests.kt
#	finance/src/test/kotlin/net/corda/finance/flows/CashIssueFlowTests.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/HibernateConfigurationTest.kt
#	node/src/test/kotlin/net/corda/node/services/schema/PersistentStateServiceTests.kt
#	node/src/test/kotlin/net/corda/node/services/vault/VaultWithCashTest.kt
2018-07-31 17:53:43 +01:00
Shams Asari
52c1ed274d
Merge pull request #1309 from corda/os-merge-93bb24e
O/S merge from 93bb24e
2018-07-31 17:42:12 +01:00
Thomas Schroeter
fd06adddad
Add jitter to flow retries (#1037)
* Add jitter to flow retries

See https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

* Add two seconds timeout to `timed flow is retried` test

* Minimum jittered delay is one second

* Adjust default retry config

Make sure the last retry fires after more than 20 minutes, which
is twice the default network map update. This way the notary should
have the latest network map when the last retry kicks in.
2018-07-31 17:24:03 +01:00
josecoll
8b501b1b80
CORDA-1858 - Vault query fails to find a state if it extends from class (#3722)
* Included Contract State parent classes in list of queryable types.

* Added changelog entry.
2018-07-31 17:16:27 +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
Shams Asari
994fe0dbdc
CORDA-1845: Check for min plaform version of 4 when building transactions with reference states (#3705)
Also includes some minor cleanup brought up in a previous PR.
2018-07-31 16:07:35 +01:00
Shams Asari
f04e73352d Merge branch 'os-merge-point' into os-merge-93bb24e
# Conflicts:
#	CONTRIBUTORS.md
#	node/build.gradle
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/test/kotlin/net/corda/node/messaging/InMemoryMessagingTests.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalTestUtils.kt
2018-07-31 14:52:53 +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
Katelyn Baker
1fda42c2de Fixing post merge issues with reference states 2018-07-30 11:37:58 +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
Katarzyna Streich
df4833d448 Some base picocli classes used in network services (#3706)
* Some base picocli classes used in network services

* Fix broken logger init

* Small fix
2018-07-27 18:25:22 +01:00
Katelyn Baker
bb7d33380f Merge remote-tracking branch 'open/master' into kat-merge-27072018
Conflicts:
	core/src/main/kotlin/net/corda/core/internal/notary/NotaryServiceFlow.kt
	core/src/main/kotlin/net/corda/core/internal/notary/TrustedAuthorityNotaryService.kt
	docs/source/blob-inspector.rst
	docs/source/release-notes.rst
	docs/source/upgrade-notes.rst
	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
2018-07-27 16:09:26 +01:00
Dominic Fox
72fc43931d Fix compile error in EnterpriseNode 2018-07-27 11:08:56 +01:00
Dominic Fox
f9990ffc4c Resolve merge conflicts 2018-07-27 10:56:41 +01:00
szymonsztuka
ec7b69c700
Fix integration tests to run in the remote database mode (#1301) 2018-07-26 16:42:24 +01:00
Dominic Fox
8dbb9eb07f Fix compile errors post merge 2018-07-25 18:37:30 +01:00
Dominic Fox
e8eb4c9bf6 Fix merge conflicts 2018-07-25 18:19:07 +01:00
Christian Sailer
53b2b86d89
CORDA-1840 Smarter checkpoint writing (#3677)
* Explicitly add/update checkpoints rather than calling `addOrUpdate` which will run a `select` statement and then a add or update statement.

* Use `currentState.isAnyCheckpointPersisted()` to check for previous checkpoints
2018-07-25 18:08:49 +01:00
Dominic Fox
9c89e3babd Merge commit '121dbec87700856679baab3995352448e8214b4e' into df-merge-2018-07-25 2018-07-25 18:00:24 +01:00
Tudor Malene
3259c4b64a
Tudor merge os 25 jul (#1299)
* 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

* CORDA-1813 fix merge
2018-07-25 15:21:51 +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