2616 Commits

Author SHA1 Message Date
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
Dominic Fox
f5b86d32f8
Eliminate StartedNode (#3690)
* Shrink StartedNode

* Eliminate StartedNode
2018-07-25 13:49:34 +01:00
Chris Rankin
1f74d957ff Merge commit '0b0ad71b3c38c176f85501882de0d4f4c884bfc6' into chrisr3-os-merge 2018-07-25 10:43:57 +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
Chris Rankin
0b0ad71b3c
CORDA-1832: Configure Quasar dependency using quasar-utils plugin. (#3685) 2018-07-24 20:19:12 +01:00
Shams Asari
d040945b0e Merge fixes 2018-07-24 18:37:04 +01:00
Shams Asari
02fae5f385 Merge remote-tracking branch 'open/master' into os-merge-757181e
# Conflicts:
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/CordaPersistence.kt
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.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/messaging/P2PMessagingClient.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
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalMockNetwork.kt
2018-07-24 17:04:51 +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
Anthony Keenan
f4b778667d Fix AbstractNode imports 2018-07-24 11:43:07 +01:00
Anthony Keenan
4708c62de4 Merge remote-tracking branch 'open/master' into os-merge-20180724
# Conflicts:
#	CONTRIBUTORS.md
#	docs/source/contributing.rst
#	docs/source/corda-configuration-file.rst
#	docs/source/index.rst
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	settings.gradle
2018-07-24 11:33:21 +01:00
Michele Sollecito
824651d677 Fixed a compilation error. 2018-07-23 19:35:13 +01:00
Michele Sollecito
f142e491cc Fixed a compilation error. 2018-07-23 16:58:12 +01:00
Michele Sollecito
32299a0811 Fixed a compilation error. 2018-07-23 16:48:34 +01:00
Michele Sollecito
a4d65dae22 Merge remote-tracking branch 'remotes/open/master' into merges/july-23-11-26
# Conflicts:
#	confidential-identities/src/test/kotlin/net/corda/confidential/IdentitySyncFlowTests.kt
#	docs/source/changelog.rst
#	node/src/integration-test/kotlin/net/corda/node/NodePerformanceTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/BFTNotaryServiceTests.kt
#	node/src/integration-test/kotlin/net/corda/node/services/BFTSMaRtTests.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/ManifestUtils.kt
#	node/src/test/kotlin/net/corda/node/CordaRPCOpsImplTest.kt
#	node/src/test/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoaderTest.kt
#	node/src/test/kotlin/net/corda/node/messaging/TwoPartyTradeFlowTests.kt
#	node/src/test/kotlin/net/corda/node/services/TimedFlowTests.kt
#	settings.gradle
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/NodeBasedTest.kt
2018-07-23 15:22:39 +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
szymonsztuka
5db90af332
Fix integration test to run in database mode (#1289)
Ensure ArtemisMessagingTest and  RaftTransactionCommitLogTests use H2 when running in remote database mode.
2018-07-23 10:34:59 +01:00
Anthony Keenan
168664f7a8 Merge remote-tracking branch 'open/master' into os-merge-20180722
# Conflicts:
#	CONTRIBUTORS.md
#	constants.properties
#	docs/source/aws-vm-explore.rst
#	docs/source/azure-vm-explore.rst
#	docs/source/corda-networks-index.rst
#	docs/source/gcp-vm.rst
#	docs/source/getting-set-up.rst
#	docs/source/node-database.rst
#	finance/src/main/kotlin/net/corda/finance/contracts/asset/cash/selection/CashSelectionSQLServerImpl.kt
#	finance/src/main/resources/META-INF/services/net.corda.finance.contracts.asset.cash.selection.AbstractCashSelection
#	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
2018-07-22 23:06:43 +01:00
Anthony Keenan
7853cfe003
[CORDA-1482] Make boolean config variables case insensitive (#3622)
* Make boolean config variables case insensitive

* Address review comments
2018-07-21 11:54:02 +01:00
cxyzhang0
d2446be69e MSSQL support (#3382)
* MSSQL support

* changes per reviewer's comments; doc

* clean up

* CONTRIBUTORS.md

* minor change in comment

* another minor change in comment

* minor formatting

* Comments formatting per recommend style; contributors in alphabet order

* more comment formatting per coding style

* Change MSSQL to SQLServer in codes and comments

* Change MSSQL to SQLServer in doc

* Use generateSequence to build repeats of ?,?,...?
2018-07-20 16:25:15 +01:00
Shams Asari
365c1e6ad2 Revert "Remove non-compiling tests"
This reverts commit 935c4d2. To make the test compile two internal fields in node where made public. It seems that the "internal" modifier does not see integration tests as part of the same module.
2018-07-20 14:34:09 +01:00
Michele Sollecito
fae30c8703
Merge pull request #1285 from corda/2018-07-19
OS merge 2018-07-19
2018-07-20 14:12:57 +01:00
szymonsztuka
6e91fcbb32
Enable new test to run in remote database mode - add SQL setup, add finance packages to create tables by Liquidate. (#1284) 2018-07-20 14:09:58 +01:00
Dominic Fox
7217a27b28 Allocate ports in a non-deprecated way 2018-07-20 11:38:33 +01:00
Dominic Fox
935c4d2863 Remove non-compiling tests 2018-07-20 11:04:02 +01:00
Dominic Fox
62c2e1c892 OS merge 2018-07-19 2018-07-19 16:43:46 +01:00
Florian Friemel
7466463b89
[CORDA-1572] Create marker file to track initial registration status. (#3621)
[CORDA-1572] Create marker file to track initial registration status.
2018-07-19 16:20:04 +01:00
bpaunescu
53b398a460
ENT-2116: handle amqp client remote error, added test (#3636)
* ENT-2116: handle amqp client remote error, added test

* ENT: 2116 rename test, added logging

* ENT-2116: rename test to indicate its purpose
2018-07-18 16:07:42 +01:00
Chris Rankin
1b05ccd397
Merge pull request #1280 from corda/chrisr3-os-merge
Merge up to e879de70f306af30a80ecbd125dab799aeeaf268.
2018-07-18 15:35:54 +01:00