830 Commits

Author SHA1 Message Date
szymonsztuka
d3b8497362 CORDA-2150 testing infrastructure for non downgrade contract version rule - TestDSL creates Jar with manifest file (#4274)
This is preliminary addition to test "Implementation-Version" entry from META-INF/MANIFEST.MF in TestDSL.kt. MockCordappProvider was creating JAR without manifest file. Added the manifest file with the obligatory (by JAR spec) attribute "Manifest-Version", other attributes can be added.
2018-11-23 14:27:28 +00:00
Thomas Schroeter
08ae58529a [CORDA-2243] Notary client should sign over NotarisationRequest serialised with object referencing turned off (#4264)
* Sign later to make sure the notary service constructs the same serialized bytes

* Add non validating notary tests

* Revert "Sign later to make sure the notary service constructs the same serialized bytes"

This reverts commit cefba5c350622df44227e89feacb12a7f12e1f7e.

* Dereference SecureHashes before creating the notarisation request signature

* Update comment

* Address comments

* Undo accidental renaming
2018-11-23 14:27:27 +00:00
Viktor Kolomeyko
035656bd89 ENT-2653: Introducing CommonCliConstants (#4265) 2018-11-23 14:26:01 +00:00
Florian Friemel
b411ad6665
[ENT-2539] Implement support for holding node Legal Identity keys in Ultimaco HSM (#1571)
* Add dependencies for Utimaco HSM.

  The CryptoServerJCE.jar was added in node/lib.
  The node/capsule/build.gradle excludes this jar from
  the final corda.jar.

* Copy the HSM Simulator utility from Network Services.

  HsmSimulator.kt uses the spotify docker client to pull an
  image with a pre-configured hsm simulator from our docker
  registry and run it in integration tests.

* Implementation of the CryptoService interface for Utimaco HSM.

* Integration test for Utimaco CryptoService.

* Unit tests for UtimacoCryptoService (only config parsing).

* Integrate Utimaco CryptoService in AbstractNode and NodeConfiguration.

* Respond to Feedback: Remove copyright notice.

* Respond to PR Feedback: Improve integration test.

* Use custom overrides in DriverDSLImpl.startNodeRegistration

* Make Utimaco dependencies compileOnly and testCompile.

* Add integration test for registering a node that is backed by utimaco HSM.

* Respond to feedback: move HsmSimulator to different package.

* Make NodeConfiguration.cryptoServiceConf a Path instead of String.

* Add Keyfile-based login.

* Respond to feedback -- default signing algorithm.

* Respond to feedback: naming.

* UtimacoNodeRegistrationTest: explicitly verify that tx signature is valid.

* Respond to feedback: Static import assertThat.

* Rename key file for test login so it's not ignored.
2018-11-22 13:40:50 +00:00
szymonsztuka
58056d4ea9
Improve integration tests to run in database mode - Sql setup for new test, cleanup of new test table. (#1582) 2018-11-21 09:47:29 +00:00
Oliver Knowles
b1982e5b55 Merge remote-tracking branch 'open/master' into oknowles-os-merge-20-11 2018-11-20 14:46:30 +00:00
Oliver Knowles
373d99435c
CORDA-1965 Auto-accept network parameter changes (#4222)
* add auto acceptance of certain network parameters

* Remove incorrect nullification of newNetworkParameters object within NetworkMapUpdater

* Automatically update network parameters if update accepted and flag day occured

* Comment cleanup

* Add node configuration for auto accepting network parameter changes

* Remove hot swapping of network parameters

* Add docs for auto accept config flag

* Minor change to log line

* Remove unrelated fix that was corrected on master

* Minor name change within NetworkParameters class

* Minor doc rewording

* Fix typo in docs

* Address PR comments

* Add node config option to turn off network param auto-accept on a per param basis

* Address PR comments

* Fix failing Network Map update integration test
2018-11-20 09:50:42 +00:00
Tudor Malene
12b79fc40b Fix merge 2018-11-19 18:13:07 +00:00
Michele Sollecito
2762c34ebe
[CORDA-1877]: Ensured Driver fails to start when Notary tried to bind an already bound port. (#4246) 2018-11-19 18:06:27 +00:00
tudor.malene@gmail.com
06e74c4442 Merge remote-tracking branch 'open/master' into tudor-os-merge-19-11
# Conflicts:
#	docs/source/cli-ux-guidelines.rst
#	node/src/integration-test/kotlin/net/corda/node/services/network/NetworkMapTest.kt
#	node/src/main/java/CordaCaplet.java
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/serialization/kryo/Kryo.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/core/TestUtils.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/InternalTestUtils.kt
2018-11-19 17:40:34 +00:00
Tudor Malene
2d043828a0
CORDA-2083 verify transaction in AttachmentsClassloader (#4188)
CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 fix tests

CORDA-2083 add support for explicit upgrade transactions

CORDA-2083 cleanup

CORDA-2083 cleanup

CORDA-2083 More cleanup

CORDA-2083 More cleanup

CORDA-2083 Clean up tests

CORDA-2083 Address code review comments

CORDA-2083 Fix merge

CORDA-2083 Fix merge

CORDA-2083 Address code review comments

revert file

CORDA-2083 Fix test

CORDA-2083 Add test

CORDA-2083 cleanup

CORDA-2083 Fix test

CORDA-2083 Address code review comments.

CORDA-2083 Remove unused functions.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.

CORDA-2083 Address code review comments.
2018-11-19 13:42:12 +00:00
Stefano Franz
8f463c46a9 Add message to uses of require(...) (#4192) 2018-11-16 17:13:55 +00:00
Mike Hearn
9594aea9f7 Merge remote-tracking branch 'open/master' into mike-merge-4d2d9b83 2018-11-16 16:43:20 +00:00
Shams Asari
d138914640
Using epoch for the entries in the test CorDapp jars to remove that non-determinism (#4243) 2018-11-16 12:19:29 +00:00
Shams Asari
ac1d3d1fc7 Merge branch 'merge-point-e8b6f5f' into os-merge-e8b6f5f
# Conflicts:
#	docs/source/api-persistence.rst
#	docs/source/example-code/src/main/java/net/corda/docs/java/FlowCookbook.java
#	docs/source/upgrade-notes.rst
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt
2018-11-15 13:09:06 +00:00
Shams Asari
7696a570d1 Merge fixes 2018-11-14 18:50:29 +00:00
Shams Asari
4984e92e31 Merge branch 'os-merge-point' into os-merge-shams
# Conflicts:
#	build.gradle
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	docs/source/api-persistence.rst
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/bridging/BridgeControlListener.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/test/kotlin/net/corda/node/services/vault/VaultQueryTests.kt
#	settings.gradle
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TransactionDSLInterpreter.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-11-14 18:13:01 +00:00
Shams Asari
e8b6f5f2f2
CORDA-2005: FinalityFlow has been made into an inlined flow to resolve issue with FinalityHandler (#4050)
FinalityHandler is insecure in that it is open to receive any transaction from any party.

Any CorDapp targeting platform version 4 or above is required use the new c'tors which take in FlowSession objects to the counterpart flow. This flow must subcall ReceiveFinalityFlow to receive and record the finalised transaction.

Old CorDapps (with target platform version < 4) will continue to work as previously. However if there are no old CorDapps loaded then the node will disable FinalityHandler.
2018-11-14 14:16:22 +00:00
tudor.malene@gmail.com
1e27f0cbe0 Merge remote-tracking branch 'private/master' into feature/tudor_constraints
# Conflicts:
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
2018-11-14 11:50:19 +00:00
Michele Sollecito
8aaf120881
[CORDA-2224]: Removed field value from Validated. Renamed function orThrow() to value(). (#4231) 2018-11-14 11:19:38 +00:00
Michele Sollecito
dc62b20c5d
[CORDA-1879]: Ensure Node dies on unrecoverable errors. (#4213) 2018-11-12 15:56:04 +00:00
Roger Willis
4684259970
Expose JPA to flows (#4140)
* First pass
* Update test.
* Address review comments.
* Added docs and kdocs.
* Clean-up.
* Add extra test.
* Changes to docsite.
* Added try/catch block as recommended by Andras.
* Removed try catch block. It's not required as the checkpoint serialiser deals with this.
* Re-used existing DB session instead of creating a new session.
* Entity manager auto flushes.
* Added java friendly api.
* Addressed review comments.
2018-11-09 17:47:36 +00:00
Michele Sollecito
11c7c879eb Merge remote-tracking branch 'remotes/open/master' into merges/08_11_2018_16_05
# Conflicts:
#	docs/source/corda-configuration-file.rst
#	node-api/src/main/kotlin/net/corda/nodeapi/internal/persistence/CordaPersistence.kt
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt
#	node/src/test/kotlin/net/corda/node/services/config/NodeConfigurationImplTest.kt
2018-11-08 16:39:09 +00:00
Michele Sollecito
6c749889d0
[CORDA-1993]: Replace reflection-based NodeConfiguration parsing with versioned property-based parsing mechanism. (#4132) 2018-11-08 15:56:00 +00:00
Rick Parker
9277042db8
ENT-2695 Restore async logging (#4195)
* Replace error code generation technique with custom event re-writer.
Switch to RandomAccessFile appenders because they supposedly give higher throughput.

* Review feedback
2018-11-08 14:33:45 +00:00
szymonsztuka
19510315b4 Merge remote-tracking branch 'remotes/open/master' into merges/os-merge-to-6f00560
# Conflicts:
#	core/src/test/kotlin/net/corda/core/crypto/CryptoUtilsTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt
#	node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt
#	testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/InternalMockNetwork.kt
2018-11-07 09:49:23 +00:00
Michal Kit
6f005605aa
CORDA-2187 & CORDA-2038: reverting maxTransactionSize <= maxMessageSize (#4166)
* CORDA-2187 reverting maxTransactionSize <= maxMessageSize

* Addressing review comments

* Increasing the maxTransactionSize for the Bootstrapper

* Updating the testNetworkParameters
2018-11-07 09:28:27 +00:00
josecoll
b692c59553
Merge pull request #1543 from corda/colljos-merge-to-015a36dad
OS -> ENT merge
2018-11-06 22:16:13 +00:00
szymonsztuka
d33aeb9881
Disable integration test with timing to run in database mode. (#1541)
Disable TimedFlowMultiThreadedSMMTests running in database mode.
Added new logins for Azure SQL reference setup.
2018-11-06 18:09:31 +00:00
josecoll
356941a733 Merge commit '015a36dad67998236eda7e45309e66e5d58b6374' 2018-11-06 16:29:24 +00:00
szymonsztuka
9efb4121d5
Don't check signers of META-INF/LIST.INDEX file (workaround for CORDA-2116) (#4148)
Temporally treating META-INF/INDEX.LIST as unsignable entry because java.util.jar.JarVerifier doesn't load its signers. https://r3-cev.atlassian.net/browse/CORDA-2177 for further investigation.
2018-11-06 14:34:03 +00:00
Konstantinos Chalkias
106eb9df4a
[CORDA-2011] [CORDA-2057] CryptoService interface and BC HSM simulation (#4099) 2018-11-06 12:57:13 +00:00
Christian Sailer
bbb26bc6ba Merge commit '3260d9f2c419463fb68178ce70633dd34079bd1e' into christians/merge_3260d9f 2018-11-06 11:20:55 +00:00
josecoll
015a36dad6
CORDA 2131 - Extend Network Bootstrapper to enable registration of Java Package Namespaces. (#4116)
* Package Ownership Network Parameters: add register / unregister CLI options to network bootstrapper.

* Fix 2 failing unit tests.

* Fix failing unit tests.

* Added changelog, documentation and cosmetic changes.

* Fixed exception message.

* Address PR review feedback.

* Fix typo.

* Resolve conflicts.

* Rebase, resolve conflicts and remove PackageOwner class.

* Address latest PR review feedback.

* Fix incorrect imports.

* Fix broken JUnit

* Add support for key store passwords including delimiter characters.

* Updated and improved documentation.

* Minor doc update.

* Documentation changes following PR review feedback

* Replace Bank Of Corda with Example CorDapp.
Remove references to locally built network bootstrapper.
2018-11-06 09:28:55 +00:00
Christian Sailer
3260d9f2c4
CORDA-1489 Exposure of node internals in mock network (#4130)
* Introduce public subset of config to tweak config via mock net work without exposing internal node config.

* Removal of functions exposing (internal) NodeConfiguration from the public test API

* Code review fixes

* Blank lines removed

* Documented mock network API change in upgrade notes.

* Updated documentation and API doc.

* More documentation/API doc
2018-11-05 09:29:05 +00:00
Viktor Kolomeyko
f6ac49aba3 Merge remote-tracking branch 'open/master' into feature/vkolomeyko/OS-Ent-merge 2018-11-02 16:29:21 +00:00
Venelin Stoykov
094eb266a8 [CORDA-2174] Fix demo node startup (#4151)
- Make issuableCurrencies config optional

- Allow additionalCordapps to override cordappsForAllNodes

In driver DSL when passing additionalCordapps to startNode and
one of the CordApps is also in cordappsForAllNodes will lead to confilc.
This commit is resolving the conflict by using the CordApp provided
by additionalCordapps
2018-11-02 11:44:18 +00:00
Andrius Dagys
539fac0d57 Merge remote-tracking branch 'open/master' into andrius/merge-11-02 2018-11-02 09:08:03 +00:00
Andrius Dagys
66116e8d20
ENT-1858: Notary cleanup (#4134)
* Migrated all non-BFT notary implementations to use async commits.

* Mock network: await for async operation completion. When calling runNetwork()
it keeps "pumping" messages between participants until no more messages are generated.
The problem comes in when a flow suspends on an async operation: the mock network
thinks the flow finished the work for the current step, and since no more messages
are generated, completes the runNetwork() function. The message that the flow
generates once it resumes after async operation completion never gets processed.
This change makes runNetwork() wait until all flow async operations finish,
and only then check whether no more messages can be transferred.
2018-11-01 19:03:43 +00:00
Patrick Kuo
5d1362bca6
[ENT-2624] Disable switch for SNI functionality (#1487)
* [ENT-2624] Disable switch for SNI functionality

* * Add SNI switch to driver
* Make BridgeRestartTest test for both enableSNI = true and false
2018-11-01 11:15:24 +00:00
Michele Sollecito
db36709eab Merge remote-tracking branch 'remotes/open/master' into merges/29_10_2018_13_40
# Conflicts:
#	.idea/compiler.xml
#	node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt
2018-10-29 13:45:47 +00:00
Michele Sollecito
6022cecca5
[CORDA-1763]: Add node CLI option for validating configuration. (#4121) 2018-10-29 13:33:43 +00:00
Anthony Keenan
2ef1f1c7c4
Merge pull request #1505 from corda/anthony-os-merge-2018-10-24
O/S Merge 24/10/2018
2018-10-28 21:43:52 +00:00
Anthony Keenan
235498086f Fix more merge issues 2018-10-26 13:46:03 +01:00
Stefano Franz
4818c77669 fix merge conflict with additionalCordapps in DriverDSLImpl 2018-10-26 12:02:52 +01:00
szymonsztuka
b1a787e649
Unnecessary Liquibase script for issuer_ref column, fix integration tests in database mode (#1506)
Column vault_fungible_states.issuer_ref were never set to non-nullable so no need to drop this constraint - this will be also removed from OS as separated PR. The issue detected against Oracle db which doesn't allow set column constraint to NULLABLE if it's already NULLABLE.
Added new table to test setup/cleanup.
2018-10-25 17:12:25 +01:00
Stefano Franz
9112ca88ab fix merge issue with flowmanager in NodeBasedTest.kt 2018-10-25 17:04:33 +01:00
Anthony Keenan
08f32a9329 Merge remote-tracking branch 'open/master' into anthony-os-merge-2018-10-24
# Conflicts:
#	build.gradle
#	core/src/main/kotlin/net/corda/core/internal/JarSignatureCollector.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	docs/source/cli-ux-guidelines.rst
#	docs/source/testnet-explorer-corda.rst
#	finance/src/integration-test/kotlin/net/corda/finance/flows/test/CashConfigDataFlowTest.kt
#	finance/src/main/kotlin/net/corda/finance/flows/CashConfigDataFlow.kt
#	node/src/integration-test/kotlin/net/corda/node/services/statemachine/FlowVersioningTest.kt
#	node/src/main/kotlin/net/corda/node/Corda.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/services/config/NodeConfiguration.kt
#	node/src/test/kotlin/net/corda/node/internal/NodeTest.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
#	tools/explorer/src/main/kotlin/net/corda/explorer/ExplorerSimulation.kt
2018-10-25 11:30:52 +01:00
Tudor Malene
469ffe473f Fix merge
Fix merge

Fix merge
2018-10-25 10:44:10 +01:00
tudor.malene@gmail.com
29a8c153ed Merge branch 'master' into tudor_merge_os_24_10
# Conflicts:
#	core/src/main/kotlin/net/corda/core/internal/JarSignatureCollector.kt
#	core/src/main/kotlin/net/corda/core/transactions/LedgerTransaction.kt
#	core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt
#	core/src/main/kotlin/net/corda/core/utilities/KotlinUtils.kt
#	core/src/test/kotlin/net/corda/core/contracts/PackageOwnershipVerificationTests.kt
#	core/src/test/kotlin/net/corda/core/internal/JarSignatureCollectorTest.kt
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	node/src/test/kotlin/net/corda/node/services/persistence/NodeAttachmentServiceTest.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TestDSL.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/dsl/TransactionDSLInterpreter.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-24 17:09:30 +01:00