1931 Commits

Author SHA1 Message Date
szymonsztuka
353c96375d Merge remote-tracking branch 'remotes/open/master' into merges/os-mere-2018-10-31
# Conflicts:
#	README.md
#	docs/source/api-persistence.rst
#	docs/source/node-database.rst
2018-10-31 18:08:59 +00:00
Anthony Keenan
8ddd8d383d
Remove unused test class (#4139) 2018-10-31 12:58:57 +00:00
Anthony Keenan
a74da313b6 Compilation error 2018-10-25 12:14:27 +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
8dc394b117 Merge fixes
Fix bug

Fix bug

Fix tests

Fix tests
2018-10-24 13:37:37 +01:00
szymonsztuka
7e3aa7f30c
CORDA-1915 node rejects CorDapps signed by our dev keys in prod mode (#4041)
Related to CORDA-1915 Signing CorDapp JARs - Corda node rejects CorDapps signed by our development keys when running in production mode. This prevents Cordapps signed by our dev key (by default) running in production (node devMode=false).
2018-10-24 10:53:39 +01:00
Stefano Franz
0919b01271
ENT-2509 - Make @InitiatedBy flows overridable via node config (#3960)
* first attempt at a flowManager

fix test breakages

add testing around registering subclasses

make flowManager a param of MockNode

extract interface
rename methods

more work around overriding flows

more test fixes

add sample project showing how to use flowOverrides

rebase

* make smallest possible changes to AttachmentSerializationTest and ReceiveAllFlowTests

* add some comments about how flow manager weights flows

* address review comments
add documentation

* address more review comments
2018-10-23 16:45:07 +01:00
tudor.malene@gmail.com
3233d1d91f Merge branch 'master_partial' into tudor_os_merge_23_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/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/AbstractNode.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
2018-10-23 10:36:06 +01:00
tudor.malene@gmail.com
7b86c2c3a3 Merge remote-tracking branch 'private/master' into tudor_os_merge_23_10
# Conflicts:
#	core/src/main/kotlin/net/corda/core/contracts/BelongsToContract.kt
#	core/src/main/kotlin/net/corda/core/contracts/TransactionState.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/internal/JarSignatureCollectorTest.kt
#	node/src/main/kotlin/net/corda/node/internal/AbstractNode.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/TransactionDSLInterpreter.kt
2018-10-23 10:29:43 +01:00
Tudor Malene
391c6bf66f
Feature/corda 1947/add package ownership (#4097)
* Upgrade hibernate and fix tests

CORDA-1947 Address code review changes

CORDA-1947 Address code review changes

(cherry picked from commit ab98c03d1ab15479c106b89f8b85bec185a7f9fa)

* ENT-2506 Changes signers field type

ENT-2506 Clean up some docs

ENT-2506 Fix tests and api

ENT-2506 Fix compilation error

ENT-2506 Fix compilation error

(cherry picked from commit 32f279a24372e31b07cfddac53edf805175fc971)

* CORDA-1947 added packageOwnership parameter

CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add tests

CORDA-1947 fix comment

CORDA-1947 Fix test

CORDA-1947 fix serialiser

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 fix serialiser

CORDA-1947 Address code review changes

CORDA-1947 Address code review changes

CORDA-1947 Revert test fixes

CORDA-1947 address code review comments

CORDA-1947 move verification logic to LedgerTransaction.verify

CORDA-1947 fix test

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 address code review comments

CORDA-1947 address code review comments

(cherry picked from commit 86bc0d9606922d48a30d395af2a21d6ce7dfc03b)

CORDA-1947 fix merge
2018-10-22 15:00:08 +01:00
Viktor Kolomeyko
b05a985d99 OS->Ent merge 2018-10-22 12:57:37 +01:00
Viktor Kolomeyko
88f368134f
ENT-2610: Separate passwords for store and for private keys in Corda OS. (#4090)
* ENT-2610: Separate passwords for store and for private keys in Corda OS.

When it comes to KeyStores there are *2* passwords: 1 for the keyStore as a whole and separately there is one private keys within this keyStore.
Unfortunately, those 2 passwords have to be the same due to Artemis limitation, for more details please see:
`org.apache.activemq.artemis.core.remoting.impl.ssl.SSLSupport.loadKeyManagerFactory`
where it is calling `KeyManagerFactory.init()` with store password.

Before change in this PR, throughout our codebase there are multiple places where we assume that storePassword is the same as keyPassword, even in the classes that have nothing to do with Artemis.
This is of course less than ideal as TLS communication may be used not only for Artemis connectivity (e.g. Bridge/Float interaction in Ent) and it is unfair to impose same passwords constraint on that communication channel.
Therefore this PR is removing this limitation and properly separating storePassword from keyPassword.

Linked Jira(https://r3-cev.atlassian.net/browse/ENT-2610) has for more background info.

Suggest to start review from `net.corda.core.crypto.X509NameConstraintsTest` to get an idea about the nature of the changes made.

* ENT-2610: Address PR input from @kchalkias

* ENT-2610: Address PR input from @kchalkias, s/privateKeyPassword/entryPassword/

* ENT-2610: Address PR input from @kchalkias, s/keyPassword/entryPassword/

In the implementation of `CertificateStoreSupplier`
2018-10-22 07:11:27 +01:00
szymonsztuka
fd19338f62 Merge OS -> ENT:
NodeStartup - added back Enterprise only serialization case for Oracle database in NodeStartup,
added deduplicationId to execute method in classes overriding FlowAsyncOperation
2018-10-21 22:05:12 +01:00
szymonsztuka
e56d84fd5d Merge OS -> ENT 2018-10-21 21:57:37 +01:00
Roger Willis
dd60ae27f2
FungibleState and design document for tokens (#4049) 2018-10-20 10:52:24 +01:00
Konstantinos Chalkias
72cab90577
[CORDA-738] Ensure encumbrances are bi-directional (#4089) 2018-10-19 18:34:32 +01:00
Tudor Malene
86bc0d9606 CORDA-1947 added packageOwnership parameter
CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add signers field to DbAttachment. Add check when importing attachments

CORDA-1947 add tests

CORDA-1947 fix comment

CORDA-1947 Fix test

CORDA-1947 fix serialiser

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 fix serialiser

CORDA-1947 Address code review changes

CORDA-1947 Address code review changes

CORDA-1947 Revert test fixes

CORDA-1947 address code review comments

CORDA-1947 move verification logic to LedgerTransaction.verify

CORDA-1947 fix test

CORDA-1947 fix tests

CORDA-1947 fix tests

CORDA-1947 address code review comments

CORDA-1947 address code review comments
2018-10-19 12:12:34 +01:00
Thomas Schroeter
f685df46b5
[ENT-1774] FlowAsyncOperation deduplication ID (#4068) 2018-10-19 11:40:59 +01:00
rick.parker
b571e16d0d Merge remote-tracking branch 'remotes/open/master' into parkri-os-merge-20181018-1 2018-10-19 08:02:59 +01:00
Rick Parker
55731ef816
ENT-2431 Tidy up buildNamed and CacheFactory 2018-10-18 10:38:43 +01:00
Stefano Franz
5ca26b1345 Merge remote-tracking branch 'open/master' into stefano-merge-201810171215
# Conflicts:
#	docs/source/node-database.rst
2018-10-17 13:49:00 +01:00
Stefano Franz
456c9a85e1
remove requirement to override default progress tracker for interacti… (#3985)
* remove requirement to override default progress tracker for interactive shell - this is no longer needed

* fix failing tests
2018-10-17 11:27:14 +01:00
Andrius Dagys
715c38766d CORDA-2109: Fix a bug that prevents consecutive multiparty contract upgrades
The contract upgrade handler assumes that the state to be upgraded is
created by a WireTransaction. This breaks the upgrade process if it was
in fact issued by a ContractUpgradeWireTransactions or a NotaryChangeWireTransaction.
2018-10-17 10:20:27 +01:00
Konstantinos Chalkias
68d736dd81
Doorman can sign TLS certs directly. (#4078) 2018-10-16 11:16:28 +01:00
Shams Asari
958f5dd65f Merge remote-tracking branch 'open/master' into os-merge-6d4bdb8
# Conflicts:
#	docs/source/changelog.rst
#	node-api/build.gradle
#	node/src/integration-test/kotlin/net/corda/node/flows/AsymmetricCorDappsTests.kt
#	node/src/integration-test/kotlin/net/corda/node/flows/FlowCheckpointVersionNodeStartupCheckTest.kt
#	node/src/integration-test/kotlin/net/corda/node/modes/draining/FlowsDrainingModeContentionTest.kt
#	node/src/integration-test/kotlin/net/corda/node/services/AttachmentLoadingTests.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/TestCordappDirectories.kt
2018-10-15 12:34:29 +01:00
Shams Asari
6d4bdb84b9
Code cleanup, mostly shortening long lines (#4070) 2018-10-15 12:01:15 +01:00
Andrius Dagys
3981a88301 Merge branch 'open/master' into andrius/merge-10-15 2018-10-15 10:50:12 +01:00
szymonsztuka
b769ad80bd
CORDA-195 When collecting JAR Signatures allow META-INF/*.EC block signature to follow jarsinger tool capabilities (#4065)
jarsigner can produce META-INF/*.EC block signature for EC algorithm (https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jarsigner.html) even if this is contrary to JAR File spec (https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html). Allow block signature be also in *.EC file.
2018-10-12 16:54:39 +01:00
Thomas Schroeter
70e24b79fb
Thomas/ent 2510 single column index (#1431) 2018-10-12 15:11:10 +01:00
Andrius Dagys
9b5b4b62b1
Merge pull request #1473 from corda/andrius/merge-10-10
Andrius/merge 10 10
2018-10-10 17:35:16 +01:00
Anthony Keenan
09c1e6c079
Align ByteArrays.kt file with O/S to reduce merge conflicts (#1472) 2018-10-10 12:52:09 +02:00
Andrius Dagys
b7d59785e7 Merge remote-tracking branch 'open/master' into andrius/merge-10-10 2018-10-10 10:45:21 +01:00
Konstantinos Chalkias
554b1fa371
[CORDA-2084] EdDSA, SPHINCS-256 and RSA PKCS#1 are deterministic, no RNG required. (#4051) 2018-10-10 10:35:18 +01:00
Andrius Dagys
9ebeac1ad8
CORDA-535: Extract notary implementations into CorDapps (#3978)
* Move Raft and BFT notaries into separate modules

* Move schemas

* Fix tests & demos

* Modified logic for creating notary services:

Added a new field 'className' to the notary configuration. The node now
loads the specified implementation via reflection. The default className
value points to the simple notary implementation for backwards compatibility.
Relevant schemas are loaded in a similar fashion.

For backwards compatibility purposes the default SimpleNotaryService will
remain built-in to node, but its cordapp will be generated on startup – so
the loading of notary services is streamlined.

* Move test namedcache factory to test utils
2018-10-10 10:04:22 +01:00
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
Konstantinos Chalkias
5d84640d1f
Add missing validation in the OpaqueBytesSubSequence.init (#4047) 2018-10-09 09:48:54 +01:00
Dominic Fox
d9ea19855f
CORDA-2006: Simplify checkpoint serialization (#4042)
* CORDA-2006: Simplify checkpoint serialization

* Supply rule to KryoTest
2018-10-08 13:39:28 +01:00
Chris Rankin
c88d3d8c1b
CORDA-2030: Resolve build warnings about kotlin-stdlib-jre8 in unit tests too. (#4043) 2018-10-08 12:49:05 +01:00
Chris Rankin
4cb31f4c8b Merge commit '39434dcbecdd2cd656e40622530e84d02443b8e2' into chrisr3-os-merge 2018-10-08 10:42:55 +01:00
Shams Asari
39434dcbec
Assorted set of clean ups (#4039) 2018-10-05 18:05:10 +01:00
Konstantinos Chalkias
0621efe7c6
Do not remove entropyToKeyPair from DJVM (it is deterministic anyway and we might use it in tests) (#4036) 2018-10-05 14:11:56 +01:00
Konstantinos Chalkias
fa4c54a080
[CORDA-2063] Ensure signatures and BC operations always use newSecureRandom (#4020)
* special handling for Sphincs due a BC implementation issue

* delete all sign operations from DJVM and stub out BC's default RNG

* copy Crypto signing functions to deterministic.crypto.CryptoSignUtils as they are required for testing transaction signatures.
2018-10-05 12:01:16 +01:00
Shams Asari
bffac331a3
Moved the PLATFORM_VERSION constant to core and added some missing usages (#4026) 2018-10-05 09:28:00 +01:00
Shams Asari
85d2a85e85
Safe parsing of min platform version and target version from CorDapp MANIFEST files (#4031)
Also includes some cleanup
2018-10-04 16:00:07 +01:00
josecoll
ec084cf8ef Merge remote-tracking branch 'open/master' into colljos-merge-031018 2018-10-03 15:07:48 +01:00
josecoll
7edc18f85d
CORDA-1997 Added constraint type information to vault states table. (#3975)
* Added constraint type information to vault states table.

* Added Vault Query criteria support for constraint data.

* Added documentation and changelog entry.

* Added missing @CordaSerializable.

* Fix minor bug in test setup and parsing code.

* Use binary encoding data types instead of serialize/deserialize.

* Optimized storage of constraints data.
Additional assertions on Vault Query constraint data contents (to validate encoding/decoding).
Tested with CompositeKey containing 10 keys.

* Addressing PR review feedback.

* Query by constraints type and data.

* Revert back accidentally removed code for contractStateType filtering.

* Incorporating final PR review feedback. Use @JvmOverloads on constructor.

* Make sure constraintInfo is class evolution friendly.
2018-10-03 13:41:25 +01:00
Michele Sollecito
a26e20a130 Merge remote-tracking branch 'remotes/open/master' into merges/sollecitom-03-10-2018-10-22
# Conflicts:
#	docs/source/index.rst
2018-10-03 10:25:51 +01:00
tudor.malene@gmail.com
40825fef99 Merge branch 'tudor_merge_os_master' into feature/ENT-2222/constraints_propagation_private
# Conflicts:
#	node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt
#	testing/test-utils/src/main/kotlin/net/corda/testing/internal/MockCordappProvider.kt
2018-10-02 16:10:19 +01:00
tudor.malene@gmail.com
063efe0c6d Merge branch 'master' into tudor_merge_os_master 2018-10-02 15:50:20 +01:00