463 Commits

Author SHA1 Message Date
Anthony Keenan
a6fd2ba903 Merge remote-tracking branch 'open/master' into anthonyk-os-merge-20181009
# Conflicts:
#	core/src/main/kotlin/net/corda/core/utilities/ByteArrays.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/KryoCheckpointSerializer.kt
2018-10-09 16:15:59 +01:00
Dominic Fox
b6f2532ce6
Corda 1922 serialize states with calculated values (#3938)
* Introduce SerializeForCarpenter annotation

* Apply SerializableComputedProperty annotation to Cash.exitKeys, fix bugs

* info -> trace

* Remove annotation from FungibleAsset, as we do not know whether all implementing classes will provide the property as a calculated value

* Remove redundant import

* Explicit lambda params

* Restore explicit import for Enum valueOf

* Moving and rescoping

* More meaningful error message

* Add java test and documentation

* Fix accidentally broken unit test

* Ignore superclass annotation if property not calculated in implementing class

* Exclude calculated properties from Jackson serialisation

* Fix broken test
2018-10-09 14:54:31 +01:00
szymonsztuka
1c681ad29a Oracle cash selection, follow change filed name (is_modifiable -> relevancy_status) 2018-09-20 16:45:18 +01:00
szymonsztuka
dc25fc28b7 Merge remote-tracking branch 'remotes/open/master' into corda/os-merge-20-09-2018
# Conflicts:
#	core-deterministic/build.gradle
#	core/src/test/kotlin/net/corda/core/utilities/KotlinUtilsTest.kt
#	node/src/integration-test/kotlin/net/corda/node/BootTests.kt
#	node/src/integration-test/kotlin/net/corda/node/flows/AsymmetricCorDappsTests.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt
#	node/src/main/kotlin/net/corda/node/internal/CordaRPCOpsImpl.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/Kryo.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/KryoSerializationScheme.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalTestUtils.kt
2018-09-20 16:39:34 +01:00
Roger Willis
c4d86b1b26
CORDA-1999 Changed isRelevant to relevancyStatus. (#3966)
* Changed isRelevant to relevancyStatus.

* Fix cash selection from breaking.

* Fixed non-backwards compatible API change.

* Updated schema migration changelog.

* Updated comment.
2018-09-19 15:50:39 +01:00
Shams Asari
725441b39c
Minor changes to bring in-sync with OS (#1390) 2018-09-13 12:53:06 +01:00
Shams Asari
445ffc8404 Merge remote-tracking branch 'open/master' into os-merge-90a7dd2
# Conflicts:
#	core/src/main/kotlin/net/corda/core/crypto/internal/ProviderMap.kt
#	core/src/main/kotlin/net/corda/core/messaging/CordaRPCOps.kt
#	core/src/main/kotlin/net/corda/core/utilities/ByteArrays.kt
#	finance/src/main/resources/migration/cash.changelog-master.xml
#	finance/src/main/resources/migration/commercial-paper.changelog-master.xml
#	finance/src/test/kotlin/net/corda/finance/flows/CashIssueFlowTests.kt
#	node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/P2PFlowsDrainingModeTest.kt
#	node/src/integration-test/kotlin/net/corda/node/services/statemachine/HardRestartTest.kt
#	node/src/integration-test/kotlin/net/corda/services/messaging/P2PMessagingTest.kt
#	node/src/main/kotlin/net/corda/node/Corda.kt
#	node/src/main/kotlin/net/corda/node/services/keys/PersistentKeyManagementService.kt
#	node/src/main/kotlin/net/corda/node/services/persistence/DBCheckpointStorage.kt
2018-09-12 11:37:11 +01:00
Shams Asari
ca5d88e65a
Minor changes made in ENT which should have been ported over (#3932) 2018-09-12 11:26:37 +01:00
Shams Asari
8e4547c811 Merge remote-tracking branch 'open/master' into os-merge-d56a80d
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/cordapp/CordappImpl.kt
#	finance/build.gradle
#	node/src/integration-test/kotlin/net/corda/node/services/messaging/ArtemisMessagingTest.kt
#	node/src/integration-test/kotlin/net/corda/node/services/network/PersistentNetworkMapCacheTest.kt
#	node/src/main/kotlin/net/corda/node/VersionInfo.kt
#	node/src/main/kotlin/net/corda/node/internal/Node.kt
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
2018-09-10 11:03: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
Shams Asari
11e2bef240
ENT-2473: Removed copyright headers (#1364) 2018-09-03 16:38:52 +01:00
Dominic Fox
f061235cc8 Resolve merge conflict 2018-08-30 10:47:56 +01:00
Dominic Fox
6cb4310f92
ENT-2320 Introduce annotation to link state classes and contract classes (#1336)
* Introduce and check @BelongsToContract annotation

* Fix broken ObligationTests

* TransactionContractConflictException inherits from TransactionVerificationException

* Really fix broken ObligationTests

* Convert fun to val

* Update kdoc on BelongsToContract, simplify contract checking

* Warn in TransactionBuilder if ContractState has no owning contract

* Fix failing tests

* Unseal TransactionVerificationException

* Make contract parameter of TransactionState optional

* Replace exception with a warning for now

* Update api-current to permit @BelongsToContract annotation to be added

* cosmetic tweaks

* Throw IllegalArgumentException, not NPE

* Throw IllegalArgumentException, not NPE
2018-08-28 11:38:33 +01:00
josecoll
36bfe268af
Revert back to using "relevancy" as "modifiable" states are not permissible by definition on an immutable ledger. (#3847) 2018-08-28 11:04:40 +02: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
79909a5ea9
ENT-2430 Swap over output_index and transaction_id in database indexes (#1354)
(cherry picked from commit 2d33ba3)
2018-08-23 16:24:56 +01:00
szymonsztuka
32a4a8712a Fix "isRelevant" functionality - fix is_modifiable column condition in cash selection. 2018-08-22 13:38:17 +01:00
szymonsztuka
8b336d99a3
Fix "isRelevant" functionality - addes/fixed is_modifiable column in cash selection. (#1348) 2018-08-22 13:10:15 +01:00
Chris Rankin
a287673432 Merge commit 'ff62df8d5a0ab9eabfe919b65a8c73baa3dca7f3' into chrisr3-os-merge
Conflicts:
	finance/src/main/kotlin/net/corda/finance/contracts/asset/cash/selection/CashSelectionSQLServerImpl.kt
	node/src/main/kotlin/net/corda/node/NodeArgsParser.kt
	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
	node/src/main/kotlin/net/corda/node/services/vault/NodeVaultService.kt
2018-08-20 15:46:20 +01:00
Roger Willis
b7867c3bcb
* Added "isRelevant" functionality to the vault. (#3789)
* * Added "isRelevant" functionality to the vault.

* * Changed "isRelevant" to "isParticipant" as this makes more sense in the context of Corda.
* Minor tweak to "isParticipant" method in NodeVaultService.
* Fixed API break and broken JAva tests.

* * Addressed PR comments from Jose.
* Changed all mentions of "relevant" and "participant" to "modifiable".
* Made the default behaviour of vault queries to return ALL states instead of just MODIFIABLE states as this is what always previously happened.
* Updated cash balance queries to only return MODIFIABLE states.

* * Updated cash selection and tryLockFungfibleStatesForSpending.
2018-08-17 13:39:05 +01:00
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
166554a558
Fix duplicate index declaration. (#3779) 2018-08-13 17:31:35 +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
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
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
cxyzhang0
2a5b7371d0 h2 cash selection query to support multiple onlyFromIssuerParties and… (#3659)
* h2 cash selection query to support multiple onlyFromIssuerParties and withIssuerRefs

* Rid of the compilation warnings
2018-07-24 10:09:37 +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
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
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
bpaunescu
33ce848e0c OS-ENT merge 2018-07-16 10:00:16 +01:00
Shams Asari
1d91272698
Moved a bunch of tests that were in the integration bucket into unit (#3576) 2018-07-13 14:17:56 +01:00
rick.parker
4e81d26985 Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20180713-1 2018-07-13 13:15:53 +01:00
Shams Asari
dc3bd8de7a Retired BankOfCordaRPCClientTest as it's mostly duplicated by BankOfCordaCordformTest (#3565) 2018-07-13 10:37:51 +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
Thomas Schroeter
baabf8ceb9 Merge remote-tracking branch 'open-source/master' into thomas/os-merge-2018-07-11
Conflicts:
	finance/src/integration-test/kotlin/net/corda/finance/flows/CashConfigDataFlowTest.kt
	node/src/integration-test/kotlin/net/corda/node/BootTests.kt
	node/src/integration-test/kotlin/net/corda/node/NodeUnloadHandlerTests.kt
	node/src/integration-test/kotlin/net/corda/node/flows/FlowRetryTest.kt
	tools/shell/src/integration-test/kotlin/net/corda/tools/shell/InteractiveShellIntegrationTest.kt
	tools/shell/src/integration-test/kotlin/net/corda/tools/shell/SSHServerTest.kt
	webserver/src/integration-test/kotlin/net/corda/webserver/WebserverDriverTests.kt
2018-07-11 14:56:03 +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
szymonsztuka
852e12a971 Load only packages with schemas neede for this test - fixes issue with unrelated Hibernate entity (org.hibernate.MappingException: Could not determine type for: net.corda.core.schemas.GoodSchemaJavaV1$State, at table: TrickySchemaJavaV1$State ... ) 2018-07-06 10:38:59 +01:00
Shams Asari
0c8c914882 Removing warnings 2018-07-05 15:45:28 +01:00
Tommy Lillehagen
d683df5753
CORDA-1711 - Remove dependency on PathUtilsKt in net.corda.core.internal (#3493) 2018-07-02 18:32:38 +01:00
Tommy Lillehagen
374b3d0a41 ENT-2040 - Remove dependency on PathUtilsKt in net.corda.core.internal (#1141) 2018-06-29 09:58:46 +01:00
Andrius Dagys
4281061c47 Merge remote-tracking branch 'open/master' into andrius/os-merge-06-27 2018-06-27 10:41:28 +01:00
Thomas Schroeter
ad2890193d
Specify Notary in CashIssueAndPaymentFlow and PaymentRequest (#3443)
* Specify notary in CashIssueAndPaymentFlow

* Specify notary in PaymentRequest

* Address comments

* Default to the first notary in the `CashPaymentFlow`
2018-06-26 16:45:18 +01:00
sollecitom
bf1b3a37ce Merge remote-tracking branch 'remotes/open/master' into merges/june-19-16-47 2018-06-19 16:48:12 +01:00
Viktor Kolomeyko
d4b982b9fb
ENT-2054: Logging improvements (#3397) 2018-06-19 15:29:35 +01:00
Christian Sailer
b09a57d768
ENT-1943 non clustered primary keys (#880)
* ENT-1943 Add liquibase change sets to remove clustered indices from primary  keys

* ENT-1943 Add liquibase change sets to remove clustered indices from primary  keys

* Don't apply non-clustered PK change when using H2

* Move primary key changesets to separate file for core migration files
Use `onValidationFail` rather than precondition to exclude these changes from H2

* Remove/readd foreign key constraint to make SQL server less unhappy

* Fix linear states schema migration

* Fix notary states changelog issues

* Remove v3-GA from master changelog
2018-06-12 15:40:25 +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
szymonsztuka
98e58b282c Resolved merge conflicts. 2018-06-11 13:40:38 +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
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
szymonsztuka
63f11d0b54
Upgrade integration test for CORDA-1356 to run in database mode (#899)
Add SQL setup to run integration test in database mode, add ordering in test because original assumption that rows are returned as inserted doesn't work in Oracle db, ensure distinct names when starting nodes (they can't clash in database mode, as the schema name is taken from node name).
2018-06-04 10:31:56 +01:00