Commit Graph

780 Commits

Author SHA1 Message Date
josecoll
9cdda3bd77
CORDA-2149 CorDapp Contract and Workflow version identifiers (#4363)
* Implementation of Contract and Workflow attribute identifiers.

* Fixes following rebase from master.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Fix broken JUnit test.

* Added missing constants.

* Further clean-up.

* Updated documentation.

* Added changelog entry.

* Updated all samples (using new Gradle Plugin 4.0.37 functionality)

* Temporarily resolve gradle plugins from latest published snapshot.

* Temporarily resolve gradle plugins from latest published snapshot.

* Updates following feedback from PR review.

* Move constants into CordappInfo companion object.

* Contract and Workflow attribute `version` to `versionId` (as version is a reserved gradle variable)

* Clarified warning message on incorrect version identifier.

* Align version identifier processing logic with gradle cordapp plugin.

* Updated comment.

* Minor fixes following rebase from master.

* Fixed broken unit test.

* Improved exception reporting.

* Update to use 4.0.37 of Gradle Plugins.

* Added support for combined Contract and Workflow CorDapp info.

* Updated following discussions with Shams + cleanup.

* Updated following Shams PR review.

* Minor API improvements.

* Added missing cordapp info causing deployNodes to fail.
2018-12-14 09:39:23 +00:00
Remo
eb4a33e438 Corda-3941: initialiseSchema property couples corda node and cordapp ddl handling (#4277)
New property database.initialiseAppSchema introduced that allows to turn-off Hibernate DDL generation while leaving Node-specific Liquibase handling enabled.
2018-12-13 14:34:58 +01:00
bpaunescu
749c207bad
ENT-2835: handle uncaught exception when bridge tries to send a message using a disconnected amqp client (#4399)
* ENT-2835: handle uncaught exception when bridge tries to send a message using a disconnected amqp client

* ENT-2835: remove emptyline

* ENT-2835: added comment explaining the exception handling
2018-12-11 16:51:35 +00:00
Florian Friemel
74a0a6116c
backport ENT-2844 (#4396) 2018-12-11 15:20:49 +00:00
szymonsztuka
4799df9b80
CORDA-2150 signature constraints non-downgrade rule (#4262)
Contract class version non-downgrade rule is check by LedgerTransaction.verify().
TransactionBuilder.toWireTransaction(services: ServicesForResolution) selects attachments for the transaction which obey non downgrade rule.
New ServiceHub method loadAttachmentConstraint(stateRef: StateRef, forContractClassName: ContractClassName? = null) retrieves the attachment contract related to transaction output states of given contract class name.
2018-12-11 10:23:07 +00:00
szymonsztuka
7172048735
CORDA-2291 enable Finance App 3.x on Corda 4.x - Liquibase script is not required(#4382)
Finance CorDapp v3.0 and core node 3.0 database tables doesn't have Liquibase migration scripts, now in Corda v4.0 the Liquibase has been introduced. Allow older  Finance Cordapp v3.0 which doesn't have Liquibase to run in node v4.0 and create Liquibase log entries for FinanceApp only if it has schema migration (so it’s of v4.0).

At implementation level: there is new case when database has already Liquibase control tables however it doesn’t contains entries related to tables created by FInnaceApp and if the FinaceApp has Liquibase scheme it means it needs to be added to Liquibase logs.
2018-12-10 15:54:30 +00:00
szymonsztuka
d2d13c1dfc
Attachment query with contract version, related to CORDA-2150, CORDA-2157 (#4357)
TransactionBuilder loads attachment using attachment storage instead of CordappLoader,
contract class version is now Integer (format and stored in db as Integer).
2018-12-06 11:28:53 +00:00
Viktor Kolomeyko
5ad992d01f
CORDA-2157: Close inputStream properly in withContractsInJar (#4365)
Or else the file remains open and test `VaultQueryJavaTests.testAttachmentQueryCriteria` fails on Windows as
open for reading files cannot be deleted.
2018-12-05 18:55:44 +00:00
Anthony Keenan
bdd893fb57
Don't print info messages when entry is via cordformation (#4360) 2018-12-05 10:09:08 +00:00
Florian Friemel
382e3b651f
[ENT-2821] Make the default schemes for TLS and identity available from the CryptoService interface (#4354)
* Make the default schemes for TLS and identity available from the CryptoService interface.

* Change CryptoService.generateKeyPair to accept SignatureScheme instead of Int.
2018-12-04 17:06:12 +00:00
Anthony Keenan
994afcfef7 [CORDA-2055] [CORDA-2236]: Bootstrapper cordapp copying (#4309) 2018-11-28 13:28:56 +00:00
Katarzyna Streich
5d2ad46553
CORDA-2089 - network parameters tags - part (#4228)
* CORDA-2089 - network parameters tags - part

Data structures changes, storage and notarisation.

Tag transactions with network parameters hash that was in force when tx
was created. Add component group on all core transactions and resolved
parameters on full transactions. The hash should be always visible on
the filtered versions of transactions. Add
notarisation check that the parameters are current.
Implement network parameters storage on services for resolution.

This is only part of the work, next PR will include changes to
ResolveTransactionsFlow to make sure that parameters in the transaction
graph are ordered (this is to prevent the downgrade attack, when the
malicious notary and participants sign transaction that shouldn't be
notarised otherwise).
Probably on network services side we need the default parameters
endpoint for the
transactions that were created before this change - for now it's default
to the current ones.

* Make parameters storage agnostic to cert hierarchy

Test fixes

* Address most PR comments

* Fixes after rebase

* Fixes. Add epoch column to parameters storage.

* Address part of review comments

* Some more comments

* Hopefully fixing what I broke doing rebse

* Address Kostas comments

* Further fixes

* Save all parameters from updates to storage

* Fix integration test

* Address comments

* Fixes after rebase

* Fix test

* Fixes

* Add wrapper for filtering around parameters hash

* API stability fixes

* Add NetworkParametersStorageInternal

* Rename
2018-11-27 15:48:32 +00:00
Anthony Keenan
b7d04b1c6e
[CORDA-2235]: Add overrides for network parameters via command line and file (#4279)
* Temp commit

* Print the error message first by default, makes error output more natural.

* Polishing

* Further modifications after testing

* Documentation updates

* Couple of fixes after review

* Removing unnecessary tests

* Fix broken test

* Add interface to bootstrapper for testign

* Added unit tests

* Remove unused class

* Fix up bootstrapper unit tests and add a couple more

* Refactor the tests slightly

* Review comments

* Couple of minor tweaks
2018-11-26 17:11:05 +00:00
Michele Sollecito
a5fb1a82f1
[CORDA-2244]: Allow map and mapValid on entire lists wrt configuration parsing (#4280) 2018-11-23 15:11:59 +00:00
Tudor Malene
4c8dabc288
ENT-2506 restore the attachment party signers (#4255)
* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2506 restore the attachment party signers

* ENT-2675 Address code review changes.

* ENT-2675 Address code review changes.
2018-11-22 18:35:30 +00:00
James Brown
98a495fa84
CORDA-2199 NetworkParameters certificate role (#4278) 2018-11-22 10:49:18 +00:00
Tudor Malene
504f650022
ENT-2763 - Change packageOwnership type (#4273)
* ENT-2763 - Change packageOwnership type

* ENT-2763 - Address code review comment.

* ENT-2673 Address code review comments.

* ENT-2673 Address code review comments.

* ENT-2673 Fix test

* ENT-2673 Address code review comments.
2018-11-21 20:41:56 +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
828892a3d9
write nodeInfo to additional-node-info folder as well as baseDirectory (#4247)
* write nodeInfo to additional-node-info folder as well as baseDirectory

* fix broken network map tests
2018-11-19 11:26:42 +00:00
Stefano Franz
8f463c46a9 Add message to uses of require(...) (#4192) 2018-11-16 17:13:55 +00:00
Andrius Dagys
e1e5d13941
CORDA-2221: Fix clustered notary identity generation (#4230)
- Don't generate a composite key certificate for CFT notaries
- Don't require a composite key certificate for CFT notaries on startup
2018-11-14 18:15:05 +00:00
Hristo Gatsinski
eb9bd10da0 [CORDA-2219] Show message if CorDapp already exists (#4236)
* [CORDA-2219] Show message if CorDapp already exists

* Update definition of `net.corda.core.node.services.Vault$StateMetadata` in `api-current.txt` or else diff tool gets very confused.
2018-11-14 17:50:55 +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
dc62b20c5d
[CORDA-1879]: Ensure Node dies on unrecoverable errors. (#4213) 2018-11-12 15:56:04 +00:00
Konstantinos Chalkias
81418ca7e7
[CORDA-2200][CORDA-2202] More tests for BCCryptoService and CryptoServiceException (#4190) 2018-11-12 09:38:06 +00:00
Matthew Nesbit
2caa082746
Some code paths for bridge control are now being acknowledged (#4206) 2018-11-09 17:54:51 +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
6c749889d0
[CORDA-1993]: Replace reflection-based NodeConfiguration parsing with versioned property-based parsing mechanism. (#4132) 2018-11-08 15:56:00 +00:00
Stefano Franz
ecbf23ab73
CORDA-2106: Print node info gen log on bootstrap failure (#4184)
* print node-gen log when nodeInfo generation fails during bootstrapping

* add logic to print out the legal name of the node which failed to generate nodeInfo
2018-11-07 19:05:50 +01: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
Konstantinos Chalkias
106eb9df4a
[CORDA-2011] [CORDA-2057] CryptoService interface and BC HSM simulation (#4099) 2018-11-06 12:57:13 +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
szymonsztuka
1de56550b0
Optionally allow the node in production mode to accept Cordapps signed by dev Key (CORDA-1915) (#4133)
By default Cordaps build by corda-gradle-plugins are signed by Corda development key.
In dev mode any key can be used to sign Cordapp JAR .
In production node Corda dev keys were forbidden. This code change allows to opt-out by setting node option cordappSignerKeyFingerprintBlacklist=[] or specify more public keys to blacklist.
The option is used in production only mode.
2018-10-30 13:53:01 +00:00
Michele Sollecito
28dd3ac873
[CORDA-1778, CORDA-1835]: Decoupled configuration parsing mechanism (#4093) 2018-10-25 16:45:14 +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
Anthony Keenan
0ab644783e CORDA-1838: Add subcommands to node (#4091)
* Tidy up

* Add install-shell-extensions command

* Make cli tests use same version of picocli as everything else

* Remove initLogging from NodeStartup, it is ran earlier by CordaCLIWrapper

* Use picocli snapshot for testing

* Use RunLast() parser to invoke correct subcommands

* Deprecate old clear-network-map-cache parameter

* Restructure NodeStartup for commands

* Get rid of -c option since the flag method has been deprecated and that didn't exist in last release

* Update documentation

* Update backwards compatibility test

* Get all subcommands working

* Refactor sub commands into seperate classes

* Update docs and fix some tests

* Docs changes

* Fix merge conflicts with master

* Fix renamed parameters

* Fix test failure

* Fix compatibility tests

* Add missing compatibility test for blob inspector

* Remove blob inspector compatibility test as there are import conflicts

* Assorted doc fixes

* Addressing review comments

* More review comments

* Couple more bits

* Fix broken tests

* Fix compilation error

* More merge conflicts

* Make startup logging function a bit more sensible

* Fix broken shell extensions

* Make shell extensions work with subcommands

* Make sure parameters for deprecated options are carried through

* More review comments

* Adding some s's

* One last go

* Fix compilation error on Windows

* Revert logging changes

* Revert docs back to their original imperatively moody state
2018-10-24 13:58:19 +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
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 ab98c03d1a)

* 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 32f279a243)

* 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 86bc0d9606)

CORDA-1947 fix merge
2018-10-22 15:00:08 +01:00
Andrius Dagys
e0d8ea8a58
CORDA-535: Move implementation specific configuration values out of n… (#4058)
The configuration objects for specific notary implementations have been replaced
by a single untyped "extraConfig" Config object that is left to the notary service
itself to parse.

* Remove the raft bootstrapping command from node, we'll need a different
mechanism for that.

* Remove pre-generated identity config value.

* Split up obtainIdentity() in AbstractNode to make it easier to read.

* A temporary workaround for the bootstrapper tool to support BFT notaries.

* Update docs

* Add upgrade notes

* Fix rebase issue

* Add a config diff for the bft notary as well
2018-10-22 10:26:10 +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
Rick Parker
55731ef816
ENT-2431 Tidy up buildNamed and CacheFactory 2018-10-18 10:38:43 +01:00
Shams Asari
2c9a942e1a
CORDA-2088: Simplified the TestCordapp public API (#4064)
The entry point to the API has been simplified to just requireing a list of packages to scan, with sensible defaults provided for the metadata. Because of the wither methods, having parameters for the metadata (with default values) seems unnecessary. Also the ability to scan just individual classes has been made internal, as it seems unlikely app developers would need that level of control when testing their apps.

TestCordappImpl is a data class and thus acts as a natural key for the Jar caching, where previously the key was the package names. This fixes an issue where it was not possible to create two CorDapp Jars of the same package but different metadata.
2018-10-15 10:11:18 +01:00
Shams Asari
aced03df54
CORDA-1274: Migrated usage of FastClasspathScanner to ClassGraph (#4060)
FastClasspathScanner was renamed to ClassGraph for the version 4 release
2018-10-11 19:50:26 +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
Shams Asari
bffac331a3
Moved the PLATFORM_VERSION constant to core and added some missing usages (#4026) 2018-10-05 09:28:00 +01:00
josecoll
3110c75847
Network bootstrapper tool: optional configuration setting to specify the minimum plat… (#4005)
* Provide an optional configuration setting to specify the minimum platform version to use in the network params file.

* Leave Cordform signature intact.

* Leave previous Gradle Plugin called signature intact.

* Incorporating feedback from PR review.

* Added minimum platform version validation check.

* Removed final 2 references to "default"

* Added changelog entry.
2018-10-03 13:41:52 +01:00
Patrick Kuo
149b6034e1
CORDA-2016 Add unit tests to ensure SNI header generation will not be changed by accident (#4014)
* Add test for SNI header to prevent changing it accidentally.

* added hardcoded values test to ensure hashing function and corda x500 name format can't be changed
2018-10-03 08:59:31 +01:00
szymonsztuka
1e72298a46
CORDA-1915 Update to Network Bootstrapper for signed JARs (#4008)
The cordapp and cordformation plugins (from v4.0.30) are going to have ability to sign JARs (in cordformation signing will be by default), to enable signature constraints to work out of box Network Bootstrapper will not whitelist contracts form signed JARs.
For unsigned JARs the Network Bootstrapper behaviour is unchanged.
2018-10-02 20:45:50 +01:00
szymonsztuka
bc6ef74c6a
CordaPersistence class minor refactoring to align with Enterprise repo. (#4012) 2018-10-02 16:49:31 +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
Viktor Kolomeyko
5a79f439db
ENT-2500: Introduce optional BridgeMetricsService in nodeApi module (#4001)
* ENT-2500: Introduce optional BridgeAuditService in `nodeApi` module

* ENT-2500: Rename audit to metrics service and add more traps to capture stats.
2018-10-01 14:27:01 +01:00
Tudor Malene
f96a59932c ENT-2222 Constraints propagation
ENT-2222 Fix tests

ENT-2222 Fix tests

ENT-2222 Add ledger transaction verification logic

ENT-2222 Fixed IRS test

ENT-2222 Fixed IRS test

ENT-2222 Fixed unit test

ENT-2222 Better kdocs

ENT-2222 Support for reference states

ENT-2222 Fix support for reference states

ENT-2222 Revert wrong change

ENT-2222 Fix Kdoc

ENT-2222 Fix Kdoc

ENT-2222 Better docs

ENT-2222 Address code review comments

ENT-2222 Fix test

ENT-2222 Fix rebase

ENT-2222 Add documentation around constraint propagation

ENT-2222 Add tests for contract propagation

ENT-2222 Add Signature Constraints propagation - first draft

ENT-2222 fix tests

ENT-2222 more tests

ENT-2222 unseal the TransactionVerificationException

ENT-2222 unseal the TransactionVerificationException

ENT-2222 more docs

ENT-2222 address code review comments

ENT-2222 address code review comments

ENT-2222 re-implement transition logic

ENT-2222 better comments and checks

ENT-2222 Fix tests

ENT-2222 merge fixes
2018-09-28 13:38:35 +01:00
Tudor Malene
ab98c03d1a Upgrade hibernate and fix tests
CORDA-1947 Address code review changes

CORDA-1947 Address code review changes
2018-09-28 11:58:44 +01:00
Florian Friemel
842eac5c43
[CORDA-1926] Implement target version and min platform version (#3899)
https://r3-cev.atlassian.net/browse/CORDA-1926
2018-09-28 09:46:06 +01:00
Christian Sailer
878bd4da8c Remove TLS_DHE_RSA cipher family (#3987) 2018-09-25 22:58:47 +01:00
bpaunescu
5139ac3d01
CORDA-2001: added SNI header to TLS connections based on hashed CordaX500 (#3968)
* CORDA-2001: added SNI header to TLS connections based on hashed CordaX500

* CORDA-2001: added newline

* CORDA-2001: truncate hashed x500 to pass IDN validations

* CORDA-2001: convert hostname to lower case

* CORDA-2001: to lower after truncating, use of better suited method

* CORDA-2001: to lower after truncating, use of better suited method

* CORDA-2001: correctly set ssl parameters in the engine
2018-09-20 16:22:27 +01:00
Konstantinos Chalkias
38c85d1711
CORDA-2009 update to BC 1.60 (security fixes) (#3974)
* update to BC 1.60 (security fixes)

* adding key combination keystore/cert tests
2018-09-20 13:11:32 +01:00
Clinton
ae4dfc93da
CORDA-2002: Adding new Cordform bootstrap endpoint to move Cordapp JA… (#3963)
* CORDA-2002: Adding new Cordform bootstrap endpoint to move Cordapp JAR copying back into Cordform
2018-09-19 16:23:09 +01:00
Michal Kit
492c25fedd
CORDA-1995 removing DigitalSignatureWithCertPath (#3953)
* CORDA-1995 removing DigitalSignatureWithCertPath

* Fixing unit tests

* Addressing review comments
2018-09-19 14:30:21 +01:00
Michele Sollecito
5113f4c8c1
[CORDA-1941]: Server-side draining node shutdown. (#3909) 2018-09-18 13:04:26 +02:00
Konstantinos Chalkias
137f7664c1
CORDA-1986 Ensure key alias format is supported by the major HSM vendors (#3950) 2018-09-17 10:19:34 +01:00
Viktor Kolomeyko
0c1910722b
ENT-2489: Gracefully handle session that might have already been closed. (#3933) 2018-09-13 09:16:24 +01:00
Konstantinos Chalkias
8ad540d1c7
Move identity alias prefixes from DevIdentityGenerator to X509Utilities (#3902) 2018-09-06 15:48:59 +01:00
bpaunescu
793ee3e1ee
Store default platform version in a constant (#3900)
* use constant for default platform version value when tests with out of process nodes are run from Intellij.

* node will use constant for platform version instead of manifest file(RPC already uses the constant, no sense in having 2 sources for it)

* fix issues caused by merge
2018-09-06 14:32:23 +01:00
Matthew Nesbit
304dba704e
Support HA without load balancer (#3889)
Allow configuration in node for additional advertised addresses.

fix logic error

Use empty list as default config not null

Allow multiple addresses in NodeInfo

Describe new additionalP2PAddresses property in docs.

Add integration test of additionalP2PAddress feature

Fixup after rebase

Address PR comment

Address PR comments by removing unused element of NodeAddress
2018-09-05 17:46:46 +01:00
Michele Sollecito
2fbeab1365
Fixed compilation error for case-insensitive operating systems. (#3896) 2018-09-05 13:06:05 +01:00
Michele Sollecito
d01dd22419
[CORDA-1937]: Refactor NodeConfiguration hierarchy. (#3856) 2018-09-04 10:26:10 +01:00
Michal Kit
8e6a9818b7
CORDA-1932 Fixing network map certificate path verification (#3843)
* CORDA-1932 Fixing network map certificate path verification to be certificate hierarchy agnostic

* Addressing review comments
2018-08-31 09:35:36 +01:00
Michal Kit
d7b85b4928
CORDA-1934 Renaming INTERMEDIATE_CA certificate role to DOORMAN_CA certificate role (#3844) 2018-08-31 09:35:06 +01:00
szymonsztuka
dbc1088417
CORDA-1939 Regression: Liquibase fails to migrate existing pre-liquibase database (#3855)
* Bugfix for corda.jar manually deployed without coping the matching corda-finance-VERSION.jar.
If the older finance cordapp version is detected (which doesn't have Liquibase migration scripts) fail node at startup and print message: "Could not create the DataSource: Detected incompatible corda-finance cordapp without database migration scripts, replace the existing corda-finance-VERSION.jar with the latest one."
Since coda-finance is an optional cordapp,the presence of Liquibase scripts is only checked if corda-finance-VERSION.jar is present in cordapps folder.
*  Allow to start using Liquibase from any point of 4.0-SNAPSHOT before Liquibase was introduced (not only from 3.0/3.X versions) - 2 database changes introduced after 3.2 but before Liquibase are now conditional database changes.
2018-08-30 13:40:02 +01:00
Dominic Fox
f81428eb53
Corda 1916: signature attachment constraints (#3839)
* Create constraint, extract Jar signature collection

* Extract JarSignatureCollector into its own file

* Jar signature collection throws exception if signatures are inconsistent

* Focus testing in Jar signature collection

* Extract some helper functions in test

* Patch tests with mock attachment storage

* Assert that generated constraint is satisfied by signed attachment

* Clarify constraint selection logic

* Explicit return types on extension methods

* Link to docsite Signature Contrainsts documentation

* Fix issue with shared JAR reading buffer
2018-08-24 17:21:54 +01:00
Christian Sailer
bc330bd989
ENT-2414 Named caches (#3848)
* Add named caches and apply to NonInvalidingUnboundCache and all usages.

* Add named caches and apply to NonInvalidingCache and all usages.

* Add named caches and apply to NonInvalidingWeightBasedCache and all usages.

* Move NamedCache to core/internal

* Remove type `NamedCache` and `NamedLoadingCache`

* Suppressed 'name not used' warning, added comment, and fixed generic parameters on the buildNamed functions.

* Use `buildNamed` in all caffeine instances in production code. Not using it for caches that are created in test code.

* Add checks for the cache name

* Formatting

* Minor code review revisions
2018-08-24 17:17:22 +01:00
PokeyBot
042b91814a
Merge pull request #3834 from corda/mike-rpc-propagate-deser-errors
Propagate RPC deserialisation faults back to the caller
2018-08-24 16:52:23 +01:00
Clinton
3594ccd89b
CORDA-1924: Remove references to Cordform definition and cordform-common (#3842) 2018-08-24 16:29:14 +01:00
Mike Hearn
8fd4d0d218 RPC: propagate failures when they occur during deserialization.
Before this change, a failure to deserialize an RPC reply would leave
the caller hanging because we'd never set the future.
2018-08-24 15:16:55 +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
Roger Willis
0c7e0f6dbb
Bumped minimum platform version for the bootstrapper from 1 to 4 to unlock reference states. (#3753) 2018-08-08 12:09:47 +01:00
Rick Parker
ff298e17e1
CORDA-1866 Avoid circular flushing in our hibernate column converters. (#3737) 2018-08-02 10:08:12 +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
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
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
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
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
Michal Kit
c0207b2219
CORDA-1815 adding maxTransactionSize validation (#3635)
* CORDA-1815 adding maxTransactionSize validation

* Fixing failing tests

* Fixing failing test
2018-07-18 10:34:41 +01:00
Konstantinos Chalkias
bf4f30fd39
Use newSecureRandom instead of SecureRandom (#3606) 2018-07-14 05:21:02 +01:00
szymonsztuka
208ac49da0
CORDA-1804 Corda node stops when detecting not migrated node_attachments_contracts table name (#3593)
Database table NODE_ATTACHMENTS_CONTRACT_CLASS_NAME in v3.0 was changed to NODE_ATTCHMENTS_CONTRACTS in v3.1 and then finally NODE_ATTACHMENTS_CONTRACTS on current master. Users may omit the upgrade note and run into errors. After the change the node will not start if the new table name is not found and any other older ones is found.
2018-07-13 16:23:20 +01:00
Katarzyna Streich
4fb7f7d3d0
CORDA-1733 X500Principal configuration parsing (#3580)
CORDA-1733 X500Principal configuration parsing

Change the NodeConfiguration.tlsCertCrlIssuer type from String to X500Principal
2018-07-13 13:44:29 +01:00
Michal Kit
5dd85e08bf
CORDA-1805 Fixing the NPE with path parent (#3591) 2018-07-13 12:46:50 +01:00
Rick Parker
ed25d8f1be
ENT-1565 Upgrade Artemis version to latest. (#3557)
* ENT-1565 Upgrade Artemis version to latest.

* Fix compiler errors.

* Add to changelog

* Additional commentary on Proton-J version
2018-07-13 10:10:26 +01:00
Patrick Kuo
26d44eedf5
remove CRL url from dev doorman cert (#3555) 2018-07-10 19:07:29 +01:00
Michal Kit
408cc68c65
CORDA-1715 Ordering the X500 name for the CRL extension of the TLS certificates (#3515)
* CORDA-1715 Ordering the X500 name for the CRL extension of the TLS certificate

* Addressing review comments

* Addressing review comments - round 2

* Throwing an exception on incorrect TLS CRL issuer configuration

* Changes after the redesign decisions

* Small refactoring
2018-07-09 13:45:38 +01:00
Patrick Kuo
68d0826563
Custom config parser for more complex config structure (#3513)
* custom config parser for more complex config structure

* address PR issues
2018-07-04 16:51:54 +01:00
Matthew Nesbit
d0568121b7
Some code tidy up ahead of post-GA development. (#3500)
Handle SSL Handshake timeouts properly
2018-07-03 14:16:31 +01:00
Thomas Schroeter
66cb0e389b
Warning timer thread should run as a daemon (#3450) 2018-06-27 12:57:37 +01:00
Michal Kit
e00c7706c3
CORDA-1661 Reverting DEV certificates (#3422)
* CORDA-1661 Reverting DEV certificates

* Addressing review comments

* Removed the intermediate certificate from the trust store and added some test cases for the revocation check
2018-06-25 16:40:51 +01:00
Tudor Malene
9be4c5dca4
CORDA-1567 Remove all traces of the out-of-process verifier (#3424) 2018-06-25 13:01:33 +01:00
Shams Asari
3046843d40
CORDA-1602: Added cmd line flags to the network bootstrapper (#3419)
The list of CorDapps jars is no longer passed in via the cmd line but is now expected to be placed in the bootstrapped directory.

Ended up being a bit of a refactor to cater for unit testing, and also tidied up the bootstrapper docs.
2018-06-23 11:36:10 +01:00
Tudor Malene
381aadc78f
ENT-1796 RPC SSL (#3401)
* ENT-1796 add just-generate-rpc-ssl-settings command line flag. Fix ssl configuration and documentation

* ENT-1796 small fix. change alias

* ENT-1796 address code review changes

* ENT-1796 revert file

* ENT-1796 Added check to display better error message

* ENT-1796 Doc fixes
2018-06-21 16:46:05 +01:00
gaugfather
2f34b16b07 Fix to allow equality of hostname (#3381)
* Fix to allow equality of hostname

* Remove unreliable require test per pull 3381

* Remove unreliable require test per pull 3381
2018-06-21 09:03:32 +01:00
Matthew Nesbit
4ff5aa34b6 Change to use MDC logic in bridge/AMQP protocol logging (#3398) 2018-06-20 11:55:59 +01:00
Rick Parker
999ee49804
ENT-2053 Fix messaging TTL related settings causing disconnects (#3384)
* ENT-2053 Revert RPC TTL due to hanging RPC clients.

* ENT-2053 Set TTL correctly.
2018-06-15 16:57:49 +01:00
Michal Kit
377d980c99
Fixing filename typo (#3358) 2018-06-14 16:35:42 +01:00
Michal Kit
d97f4f58be
CORDA-1624 updating the DEV certificate with CRL distribution point (#3353)
* CORDA-1624 updating DEV certificates with CRL distribution points implying R3 owned endpoints

* Keeping old keys but updating certificates
2018-06-13 12:01:15 +01:00
Matthew Nesbit
4bf5d809a5
If the Artemis connectionTTL configuration is not set then some of the cleanup actions do not happen on client kill. This prevents durable messages being replayed (#3351)
and may prevent cleanup of other resources.

Undo spurious code
2018-06-13 10:32:29 +01:00
Michal Kit
02884e6c81
CORDA-1593 Extracting the whitelist logic and making it public (#3317)
* CORDA-1539 Extracting the whitelist logic and making it public

* Addressing review comments
2018-06-12 09:31:06 +01:00
Tudor Malene
c474c04503
ENT-1837 better error message on db failure (#3318) 2018-06-07 14:05:28 +01:00
Tudor Malene
5f2c3d175d
ENT-2036 Handle ClosedChannelException during SSL handshake (#3314) 2018-06-06 13:08:33 +01:00
Mike Hearn
468c0c7404
CORDA-1349: Docs: improve docs on permissioning, doorman and network map. (#3277)
* Docs: improve docs on permissioning, doorman and network map.

* Add a convenience serialization API for Java users, marked as
internal for now with a TODO to make it public after we start work on
Corda 4.0. Otherwise serializing arbitrary objects to AMQP is awkward.
2018-06-06 13:57:25 +02:00
Matthew Nesbit
d86ae5fc0b
I set the max retry time for AMQP at 5 minutes. This is just too long for any kind of sensible testing, so drop back to 1 minute. (#3294) 2018-06-05 10:30:35 +01:00
Thomas Schroeter
4bc9151d5d
Limit concurrency of the bootstrapper (#3271) 2018-06-01 11:55:46 +01:00
Shams Asari
7b09795795
CORDA-1383: Cleaned up the JSON format of WireTransaction and SignedTransaction (#3248)
In particular correctly outputs the custom state and command objects in the txs. Also fixed up deserialisation back into the transaction objects.
2018-05-30 16:37:41 +01:00
szymonsztuka
ed70fea3a7
CORDA-1548 Hibernate session not flushed before handing over raw JDBC session to user code (e.g. coin selection) (#3266)
* Hibernate session flushed before handing over raw JDBC session to user code + test - inserting and selecting cash in the same transaction
* Additional two tests copied from Enterprise repo
2018-05-30 16:19:06 +01:00
Matthew Nesbit
202bd6603b
Simplify the toString, so that printing ConnectionChange events into the log output only gives a summary and reduce logging. (#3247) 2018-05-29 18:18:31 +01:00
Michele Sollecito
f68cf6f712
[CORDA-1341]: Ensure API can be called concurrently wrt transactions. (#3235) 2018-05-29 15:25:34 +01:00
Rick Parker
59fdb3df67
CORDA-1475 CORDA-1465 Allow flows to retry from last checkpoint (#3204) 2018-05-25 13:26:00 +01:00
Matthew Nesbit
7ff008d4e3
Prevent bridge reconnection attempts on targets that present invalid/misconfigured/different certificates to protect nodes from dead identities. (#3225) 2018-05-24 16:53:09 +01:00
Michele Sollecito
61fedb5fd2
[CORDA-1528]: Node configuration not containing property "rpcSettings.address" fails with error "No configuration setting found for key 'address'" (fix). (#3229) 2018-05-24 13:20:04 +01:00
Shams Asari
3136e973a7
CORDA-1511: Kryo only used for node checkpoints and so moved out of serialization module and into node (#3228) 2018-05-24 12:18:07 +01:00
Katelyn Baker
cba83aca13
Move RxNotification serializer into the serialization package (#3214) 2018-05-22 15:17:18 +01:00
Michele Sollecito
48b126321b
Reverting API breaking change in PermissionException. (#3209) 2018-05-22 09:48:29 +01:00
Michele Sollecito
5de2c2aa4b
[CORDA-1264}: Complete obfuscation of exceptions to client side. (#3155) 2018-05-21 13:34:37 +01:00
Tudor Malene
455221629b
CORDA-1343 Make the RPCClient ssl constructors public. Clean up broke… (#3039)
* CORDA-1343 Make the RPCClient ssl constructors public. Clean up broker authentication logic

* CORDA-1343 small fix

* CORDA-1343 cleanup

* CORDA-1343 fixed api changes script

* CORDA-1343 fixed merge

* CORDA-1343 removed unused property

* CORDA-1343 add separate p2p and rpc node users

* CORDA-1343 remove test configuration

* CORDA-1343 fix tests

* CORDA-1343 address core review comments

* CORDA-1343 some documentation and adding createWithSsl method for a haAddressPool

* CORDA-1343 clean up the CordaRPCClient interface

* CORDA-1343 add internal shell test

* CORDA-1343 address code review comments

* CORDA-1343 split the internalShell user from the System Rpc user

* CORDA-1343 fix test

* CORDA-1343 Add warning when certificateChainCheckPolicies is being configured

* CORDA-1343 Address code review changes

* CORDA-1343 fix merge

* CORDA-1343 added test, docs, clarify comments

* CORDA-1343 clean up docs

* CORDA-1343 fix api

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge

* CORDA-1343 fix merge
2018-05-21 13:05:08 +03:00
Thomas Schroeter
acefe4261c Bootstrap HA and BFT notaries 2018-05-18 18:33:49 +01:00
Stanly Johnson
ae5bacb4b4 Network bootstrapper check for duplicate node names (#3182) 2018-05-18 10:31:24 +01:00
Shams Asari
3cdd908714
Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api.

EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
2018-05-17 16:18:07 +01:00
Kat Baker
0c3a30edc8 Corda-847 - Remove Kryo for RPC
It's no longer used as we've switched over to AMQP for RPC calls so
remove it from everywhere and only use it for checkpointing

 * Wire up demo bench post Kryo removal
 * Test Fixes
 * rebase and fix tests
 * Test Fix
 * wip
 * revert changes to api now we don't need to add annotations
2018-05-17 12:55:45 +01:00
Kat Baker
f850daa582 CORDA-847 - AMQP RPC
* Client and server support for amqp
 * Observable (and supporting) serialisers
   Unit Tests
 * Fixing tests
 * Test fixes
 * CORDA-847 - Update api doc with additon of @CordaSerializable annotation
 * TestFixes
 * review comments
 * TestFixes
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * Test Fix
 * TestFix
 * Test Fix
 * Review Comments
2018-05-17 12:53:38 +01:00
Patrick Kuo
0b76a12637
CORDA-864 Wire up max message size (#3057)
* add checks on message size
* added size check in AMQP bridge
* passing maxMessageSize to AMQPClient and server
* added Interceptor to enforce maxMessageSize on incoming messages
2018-05-17 09:59:30 +01:00
Chris Rankin
d0d07287e7
Remove duplicate Netty classes from Node. (#3142)
* Remove duplicate Netty classes from Node.
* Force all Netty modules to our given version.
2018-05-15 12:35:00 +01:00
Katarzyna Streich
24fa695ca0
CORDA-866: Implement removal of stale nodes from network - backport (#3128)
* CORDA-866: Implement removal of stale nodes from network

Backported

* Implement removal of stale nodes from network

Add eventHorizon to NetworkParameters structure. Add republishing of
node info on 1 day intervals - it is treated by network map as heartbeat from node indicating if it's alive or not. Add removal of old node infos on network map signing.

* Add copy method to NetworkParameters data class

Add JvmOverloads annotation to the constructor, because it's data class
exposed in API

* Fix test
2018-05-15 12:10:04 +01:00
Chris Rankin
84d94d44ad
ENT-1463: Hide more AMQP ConcurrentHashMaps behind interfaces. (#3147) 2018-05-15 12:03:33 +01:00
Chris Rankin
4f9bbc8820
ENT-1463: Isolate more non-deterministic code from AMQP serialisation. (#3138) 2018-05-14 16:50:43 +01:00
Michele Sollecito
d027b5b8f2
[CORDA-1472]: Crackdown on warnings. (#3136) 2018-05-14 21:15:52 +07:00
Matthew Nesbit
3c005789c0
ENT-1850: Improve reporting of connection problems (#3124)
* Add nicer logging for SSL handshake problems

* Just in case let people see the horrid netty exception traces at trace level
2018-05-14 09:14:09 +01:00
Chris Rankin
a2de18b63c
ENT1463: Turn ClassCarpenter and SerializerFactoryFactory into interfaces. (#3121) 2018-05-11 15:42:12 +01:00
Chris Rankin
36d13124d5
ENT-1463: Refactor serialisation slightly for determinisation. (#3110) 2018-05-10 12:42:01 +01:00
Chris Rankin
3f21c47f39
Remove lingering Kryo reference from AMQP. (#3107) 2018-05-09 20:20:43 +01:00
Chris Rankin
fe88e9907c
ENT-1463: Replace getStackTraceAsString() with Throwable.initCause(). (#3101) 2018-05-09 16:36:17 +01:00
szymonsztuka
bb95156262
ENT-1447 Database transaction optional ability to retry on nested SQLException. (#3046)
Database transaction can be set to retry failure due to any exception with a cause or a nested cause of SQLException type.
Rationale: By the default transaction is retried only for SQLException. It may happen that SQL Exception is wrapped by Hibernate exception, allow to retry such cases if requested  e.g. database.transaction(recoverableFailureTolerance = 3, recoverAnyNestedSQLException = true) { .... }
2018-05-09 15:45:31 +01:00
Chris Rankin
781b50642a
ENT-1463: Prepare node-api for determination. (#3080)
* Prepare node-api for determination.
* Disentangle Kryo and AMQP classes.
* Add version properties for fast-classpath-scanner, proton-j and snappy.
* Remove String.jvm extension function.
* Refactor Cordapp reference out of AMQP serialisers' primary constructors.
2018-05-09 13:37:04 +01:00
Katelyn Baker
a61aa5d645
CORDA-847 - Pass serialization context down serialization call stack (#3062)
* CORDA-847 - Pass serialization context down serialization call stack

Needed for later work on AMQP RPC where we need to set per-thread
elements on a context. Could use some magic thread local but I'd rather
it was explicit on the stack and thus easier to reason about.

Additionally, now we're passing this around we can make better use of it
in the future

* Test Fix

* Test fixes

* REVIEW COMMENTS / CODE FORMAT

* Fix build issues
2018-05-03 16:09:03 +01:00
Matthew Nesbit
0494e45037
Remove debug logging left over from earlier AMQP development. (#2867) 2018-05-03 13:44:05 +01:00
Katelyn Baker
20570d72cf
CORDA-1238 - Move blob inspector initial work into experimental (#3058)
* CORDA-1238 - Initial blob inspector tool commit

Note this is WIP and not ready for prime time but it's time it moved off
of a personal branch and into the main code base, especially if I'm
passing the serialization code onto someone else's shoulders

* CORDA-1238 - Move blob inspector into experimental

It was developed locally in tools (as it's a tool), but it's no
where near production ready, so lets just ship it in experimental
for now

* CORDA-1238 - Tidyup and bug fixes
2018-05-03 13:25:29 +01:00
Katelyn Baker
0d3c7e7762
CORDA-847 - RPC Server lib refactoring (#3056)
Just as we did for the RPC CLient, refactor kryo specific elements into
their own sub module. Also move kryo specific components out of generic
RPC files.

Thus, adding AMQP support will be a much smoother operation
2018-05-02 15:48:41 +01:00
Viktor Kolomeyko
884928c956
CORDA-1416: Upgrade version of Proton-J library (#3050)
* CORDA-1416: Upgrade version of Proton-J library

* CORDA-1416: Compilation fixes following Proton-J upgrade

Reflects:
https://issues.apache.org/jira/browse/PROTON-1712
and
https://issues.apache.org/jira/browse/PROTON-1672

* CORDA-1416: Add an integration test to prove that data saved by from previous version can be read.

* CORDA-1416: Add additional check validate serialized form.
2018-05-02 15:14:45 +01:00
Katelyn Baker
0c680ae530
CORDA-1403 - Generics serialization issue (#3030)
When implementing a generic interface subtype check fails, need
to compare to the actual raw type
2018-05-01 16:27:54 +01:00
Michele Sollecito
5565b3e80d
[CORDA-1411]: Prevent MappedSchema caching from leaking memory. (#3042) 2018-05-01 19:32:29 +07:00
Shams Asari
adef57f127
Including FlowException in the RPC exception whitelist (CORDA-1264) (#3037)
These exceptions are designed to be propagated in P2P and so makes sense to keep them visible if the recipient is an RPC user.
2018-05-01 07:48:50 +01:00
Michal Kit
ab80df342a
CORDA-1319 Adding CRL checking for nodes (#2987)
* Adding CRL support for nodes

* Addressing review comments
2018-04-30 09:26:26 +01:00
bpaunescu
c3e6b39e59
artemis upgrade to 2.5.0 (#3029) 2018-04-27 19:54:08 +01:00
Michele Sollecito
235df69efe
[CORDA-1379]: Allow soft trapping of unknown config keys. (#3011) 2018-04-27 15:33:13 +07:00
Joel Dudley
efa69ce959
Whitelists Triple. 2018-04-27 08:57:28 +01:00
Thomas Schroeter
2ff3939e2e
Add exponential backoff to P2P messaging retry (#2975) 2018-04-26 13:58:41 +01:00
Chris Rankin
8e507d0b88
CORDA-1263: Replace deprecated kotlin-stdlib-jre8 with kotlin-stdlib-jdk8. (#2992) 2018-04-24 14:03:41 +01:00
Shams Asari
65525d74e7
CORDA-1325: Bootstrapper unable to whitelist two versions of the same contract simultaneously (#2980)
Also added unit tests
2018-04-24 10:51:24 +01:00
bpaunescu
c4ceca3787
Merge pull request #2989 from corda/ENT-1775-PR759
ENT-1775: reworked client to handle failover in HA mode instead of Artemis
2018-04-23 17:15:00 +01:00
Shams Asari
d3446e213c
Introduced a few more extension methods to Path, which are clearer than the static methods in Files. (#2985)
Also migrated code away from the old File API.
2018-04-23 14:31:49 +01:00
Viktor Kolomeyko
3aaa176dd4
CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning (#2977)
* CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning

* CORDA-1355: Update change log

* CORDA-1355: Minor change to improve readability.

* CORDA-1355: Custom serializers documentation update to mention new system property.
2018-04-23 13:55:40 +01:00
Viktor Kolomeyko
bf4d8ba08c
CORDA-1335: Scan attachment Jar only to speed-up the process. (#2982)
* CORDA-1335: Scan attachment Jar only to speed-up the process.

* CORDA-1335: Explicitly mention other types of contracts to scan.

* CORDA-1335: Refactor to eliminate listing different subclasses of Contract in two separate places.
2018-04-23 09:17:43 +01:00
bpaunescu
be083d6763 Added helper method for creating tcp transports from a list of host:port 2018-04-22 15:04:19 +01:00
Shams Asari
a684507553
Better cert path validation exception message for PartyAndCertificate.verify (#2976) 2018-04-18 17:27:03 +01:00
Shams Asari
60323cca15
CORDA-1312: Network bootstrapper copies any CorDapp jars into each nodes' cordapps dir (#2974) 2018-04-17 15:38:25 +01:00
Tudor Malene
9d2b7f0b7b
CORDA-1313 RPC whitelist TransactionVerificationException (#2965) 2018-04-16 13:29:36 +01:00
Christian Sailer
d8bf1019b6
CORDA-1336: Turn off direct delivery in Artemis via config (#2961)
* CORDA-1336: Turn off direct delivery in Artemis via config - this can
deadlock when the server gets busy and switches back and forth between
direct and async delivery if it can't keep up.

* CORDA-1336: put in a comment explaining the config setting.
2018-04-13 16:17:24 +01:00
Katarzyna Streich
91c52af5ac
ENT-1584: Subscribe to private network maps using UUIDs (#2922)
Client private network map implementation

Add private network maps UUIDs to config as extraNetworkMapKeys. Adjust NetworkMapServer implementation accordingly.
Change NetworkMapUpdaterTest to use NetworkMapServer instead of mock
2018-04-13 10:52:45 +01:00
Shams Asari
02913b284e
CORDA-1312: Removed the need to have whitelist.txt for updating the contracts whitelist using the bootstrapper. (#2954)
Instead the current whitelist is read in from the existing network parameters file.
2018-04-12 17:03:06 +01:00
Patrick Kuo
80c075b19e
Merge pull request #2958 from corda/pat/ent-1323-cherrypick
ENT-1323 Network map service to check all identities in submitted node info
2018-04-12 14:04:47 +01:00
Patrick Kuo
b5f304a104 ENT-1323 Network map service to check all identities in submitted node info (#499)
* ENT-1323 Network map service to check all identities in submitted node info

* fixup after rebase

* address PR issues, refactored createValidNodeInfo

* address PR issues

(cherry picked from commit f9ed55b)
2018-04-12 13:11:30 +01:00
Kat Baker
e6d352e446 Review comments 2018-04-12 12:09:17 +01:00
Kat Baker
03850dabc2 Review comments 2018-04-12 11:58:56 +01:00
Kat Baker
c783c431b1 Fix broken comment 2018-04-12 11:23:13 +01:00
Kat Baker
84914aa5c8 Remove commented out code 2018-04-12 11:18:39 +01:00
Katelyn Baker
f19bcea82f CORDA-1229 - Setter serialization fails with lists
Looks like the super / sub type inference of setter param vs
getter param is the wrong way around. Also, Setter Type should
be the generic type, not just the type

the property must be a supertype of the setter parameter

the getter must be a supertype of the setter parameter
2018-04-12 11:17:26 +01:00
Shams Asari
1b37cef822
Minor: use of ByteArray.inputStream() and introduced PublicKey.hash (#2931) 2018-04-05 17:18:27 +01:00
Michal Kit
c8b58a601f
Adding CRL support in the generated certificates. (#2932) 2018-04-05 16:39:41 +01:00
Shams Asari
53a0aae489
Introduced a few helper methods around InputStream.readBytes (#2928) 2018-04-05 14:27:42 +01:00
Michal Kit
71fa61020e
Adding a unit test for SignedNodeInfo verification (#2925) 2018-04-05 11:25:41 +01:00
Matthew Nesbit
0af42bda44
Fix a bug in the AMQP protocol wrapper code which gives incorrect reply address information on received packets. (#2914) 2018-04-04 11:23:09 +01:00
Michal Kit
2f1b8ff23e
Fixing SignedNodeInfoe security issue (#2908) 2018-04-03 15:49:06 +01:00
Michele Sollecito
0d1d7daedc
[CORDA-1264]: Ensure correct serialisation and masking for throwables raised by a node and propagated through RPC. (#2892) 2018-03-29 13:01:41 +01:00
Shams Asari
768dd32417
ENT-1663 - Inclusion of the cert path and root cert in the exception message when cert path validation fails. (#2890)
Also, added check to node startup that --initial-registration cannot occur in devMode
2018-03-28 15:18:50 +01:00
Katelyn Baker
6c9a39ae44
DOCS: Serialization roundtrip removes mutability explanation (#2888) 2018-03-28 09:40:21 +01:00
Katelyn Baker
e43b12c203
CORDA-1236 - Don't let Carpenter exceptions escape the serializer (#2852)
* CORDA-1236 - Don't let Carpenter exceptions escape the serializer

* Review comments

* Merge branch 'kat/bug/master/nestedCArpenterException' of https://github.com/corda/corda into kat/bug/master/nestedCArpenterException
2018-03-27 10:11:39 +01:00
Katelyn Baker
0f99efa768
CORDA-1213 - Explicitly disallow serialization of non static nested classes (#2824)
* CORDA-1213 - Explicitly disallow serialization of non static nested classes

WIP

* Review comments
2018-03-27 10:06:46 +01:00
Katelyn Baker
91cdcc6752
CORDA-1258 - Only register custom serializers once (#2862)
* CORDA-1258 - Only register custom serializers once

* Review comments

* Fix test
2018-03-26 19:09:03 +01:00
Katelyn Baker
c3031b182b
ENT-1665 - Update fast-classpath-scanner version to 2.12.3 (was 2.0.21) (#2877)
Problem manifests now that the classpath scanner is used by the
serialisation framework in factory initialization to locate pluggable
serializers. The actual thrown error is

    java.lang.RuntimeException: Unknown constant pool tag

Given this is a known issue and a fixed bug it makes sense to move the
version forward. Unfortunately at this time we cannot move beyond
2.12.3 as 2.12.4 and later versions (up to the latest 2.18.1) exhibit
some other error that needs investigating. Thus, move to the latest
version that is stable for our current set of use cases.

More information on the nature of the problem exhibited by moving beyond
2.12.3 can be found on the linked Jira (ENT-1665) as well as details on
reproducing the issue moving forward to 2.12.3 fixes.
2018-03-26 14:24:43 +01:00
Shams Asari
620ba1e8a2
Integration test for network parameter updates and improved logging (#2863) 2018-03-22 14:08:07 +00:00
bpaunescu
ac9cb59a6e
Fix RPC flaky test (#2849)
* fix rpc reconnect flaky test; remove obsolete rpcproxy log message

* rpc client proxy: replace lock with atomic variable

* rpc client proxy: removed volatile property

* RPCStabilityTests: used eventually() method to test async response

* RPCStabilityTests: remove unused import
2018-03-20 16:23:29 +00:00
Michal Kit
144632818c
Adding the X509CRL custom serializer. (#2844)
CORDA-1233

* Adding the X509CRL custom serializer.

* Addressing review comments
2018-03-20 15:42:25 +00:00
Tudor Malene
1a1cd94161
ENT-1564 - add additional uploader check to the HashConstraint (#2845) 2018-03-20 10:17:44 +00:00
igor nitto
8591ae2dc9
CordApps back in node classpath (#2843) [CORDA-1232] 2018-03-19 14:34:02 +00:00
Shams Asari
327d7d8acf
Added sign helper method to CertificateAndKeyPair for producing SignedDataWithCert objects (#2841) 2018-03-19 12:47:23 +00:00
Michal Kit
15e4449b38
Adding BigInteger serialization support (#2804)
* Adding BigInteger serialization support

* Addressing review comments
2018-03-15 10:11:01 +00:00
Michal Kit
27e45bc865
Adding public key verification to the X509Utilities.createCertificateSigningRequest (#2784) 2018-03-15 08:42:36 +00:00
igor nitto
2cff495553
Remove CordApps JARs from node classpath [CORDA-1135] (#2691) 2018-03-14 16:42:23 +00:00
Rick Parker
a24a2105b1
CORDA-1217 Replace Guava caches with Caffeine (#2818) 2018-03-14 16:07:31 +00:00
Michal Kit
1a6f7bc2c0
Whitelisting CRLReason class (#2803) 2018-03-14 08:05:00 +00:00
Shams Asari
9afcbb16a2
Unwrapping InvocationTargetException during config parsing (#2811) 2018-03-14 07:04:25 +00:00
Katelyn Baker
6fbc6a55cf
CORDA-1186 - Actually move annotation into core module, not just core namespace (#2789) 2018-03-12 11:47:58 +00:00
Andrius Dagys
a3bf4577f3 CORDA-696 - Ensure deterministic transaction id calculation for contra… (#2676)
The problem with the previous implementation is that the transaction would be deserialized with the schema specified
in the serialized form, but the calculation of the id would involve re-serializing properties using a local serialization context
which might produce a different result.
2018-03-09 14:39:31 +00:00
Katelyn Baker
198fb4f264
CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type (#2767)
* CORDA-1192 - Quieten message when reflecting on a builtin Kotlin type

* review comments
2018-03-08 23:07:41 +00:00
Matthew Nesbit
b3203c9f3e
Remove a mistakenly duplicated constant defined on ArtemisMessagingComponent (#2765) 2018-03-08 12:44:05 +00:00
Konstantinos Chalkias
d70cd26a7c
Kdoc/comment updates (#2626) 2018-03-08 10:52:07 +00:00
Katelyn Baker
e6ed91df8b
CORDA-1186 - Move ConstructorForDeserialization out of internal (#2759)
Since it's a user facing object it shouldn't exist in an internal
package. Move to core to exist with the other serialization annotations
2018-03-07 16:02:01 +00:00
Matthew Nesbit
519644ce0d
CORDA-1170: Define and whitelist the Artemis/AMQP application headers that are accepted by Corda (#2728)
* Whitelist headers copied across bridges

* Address PR comments
2018-03-07 08:56:58 +00:00
Matthew Nesbit
81f4bbcaf3
Fix flaky bridge test and an associated deadlock during rollback in the BridgeManager code. (#2739) 2018-03-06 10:49:29 +00:00
Tudor Malene
5efea22a9b
Network Bootstrap changes to master (#2736)
* Added exclude whitelist to Network Bootstrapper to enable fine grained testing (#2666)

* Added exclude whitelist to Network Bootstrapper to enable fine grained testing.

* code review change

(cherry picked from commit d4f9b10)

* CORDA-1150 - better log messages (#2721)

* CORDA-1150 better log messages

* CORDA-1150 better log messages

* CORDA-1150 better log messages

(cherry picked from commit 87c5ad8)

* fixed merge

* remove unused function
2018-03-05 19:10:48 +00:00
Katelyn Baker
d116b5e9f4
CORDA-1140 - FOR RPC Client P2P context use AMQP (#2716)
* CORDA-1140 - FOR RPC Client P2P context use AMQP

* Review comments

* Review comments

* review comments

* review comments
2018-03-05 18:05:32 +00:00
Andrzej Cichocki
26fe90c8e9
CORDA-973 Allow deserialization of any checkpoint/storage encoding. (#2693) 2018-03-05 10:11:26 +00:00
Katelyn Baker
799d90b350
CORDA-1134 - Don't use private serializes for all caps public properties (#2692)
* CORDA-1134 - Don't use private serializes for all caps public properties

* Small fix

* Review Comments
2018-03-02 13:21:27 +00:00
Katelyn Baker
06a6eace67
CORDA-1115 - Cannot serialize private nested objects (#2665)
* CORDA-1115 - Cannot serialize private nested objects

Shown up by the simm-valuation-demo the problem was where a private
object field of an object was being serialised within the outer objects
context (see tests added for example)

Fix is to switch from Kotlin reflection back to Java.

Additional fix to the test where it was comparing two lists of state
references in a flow and they weren't equal because they weren't in the
same order... This I assume is just an oversight (in that them being
in a different order but otherwise the same is actually fine) so
converting to set comparison

* Fix forward port issue where fingerprinting has moved

* Review Comments

* Review Comments

* Review Comments

* Gran -> Grab
2018-03-02 13:13:00 +00:00
Shams Asari
8616f24523
CORDA-1048: Making it simpler to move an existing local deployment of nodes to across different machines. (#2672)
This was achieved by having the hash in the node-info file to be just of the node's X.500 name. This also solves existing duplicate node-info file issues that we've been having.

Also updated the docsite.
2018-03-01 21:24:10 +00:00
Michele Sollecito
b580a2ac30
[CORDA-926]: Parsing NodeConfiguration will now fail if unknown properties are present. (#2484) 2018-03-01 14:57:36 +00:00
Christian Sailer
0ff37c0437
CORDA-1122 Switch AMQP bridge to use auto-commit sends and acks (#2661)
* CORDA-1122 Switch AMQP bridge to use auto-commit sends and acks

* CORDA-1122 Codereview: Add comment for extra commit to rollback and add better message sequence logging to tricky test
2018-02-27 15:25:58 +00:00
Maksymilian Pawlak
3066926f0f
Improved classloader closing (#2650)
* Better handling of classloader closing
2018-02-27 11:15:23 +00:00
Maksymilian Pawlak
cc84b34dca
Close classloader to release associated file (#2635)
[CORDA-1113] Close classloader to release associated file
2018-02-26 15:01:57 +00:00
Andrius Dagys
0edfef2409 CORDA-696 - Create separate transaction types for contract upgrade transactions (#2589)
* CORDA-986 and CORDA-985 CompositeKey and Signature verification performance fixes (#2467)

* CORDA-696: Create separate transaction types for contract upgrade transactions.

Add rationale around upgrade transactions

Move contract upgrade transaction resolution logic into internal until it's stabilised.

Throw a better exception when contract attachment not found

Default legacy contract constraint to always accepting - needs to be changed to whitelist constraint before merging

Introduce a new upgraded contract interface that allows specifying the legacy constraint.

Remove StateLoader, make all tx resolution functions take in ServicesForResolution

Contract upgrade transactions can handle whitelist by zone constraints

When creating a contract upgrade transaction, make sure the attachment of the old cordapp gets attached when using hash constraints.
Attachment lookup for a given contract class name only scans currently loaded cordapps, and we don't load old versions of cordapps.

CORDA-696: Update upgrade docs
2018-02-26 11:29:25 +00:00
Michele Sollecito
5be0e4b39e
[CORDA-941]: Add NetworkParameters contract implementation whitelist. (#2580) 2018-02-23 14:29:02 +00:00
Patrick Kuo
1552e992e7
ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#2620)
* ENT-1443 Add cert role to CSR and doorman issue cert according to the cert role (#431)

* Doorman and HSM create certificate base on requested cert role specified in the certificate signing request.

(cherry picked from commit 94f7392)

* remove R3 corda code
2018-02-23 13:38:09 +00:00
Andrzej Cichocki
c8672d373f
CORDA-973 Compression support for serialization (#2473)
* Serialization magic is now 7 bytes
* Introduce encoding property and whitelist
2018-02-23 13:07:51 +00:00
Shams Asari
2af0feee04
Various cleanup of the network map code (#2604) 2018-02-23 09:13:00 +00:00
Katelyn Baker
a223fdb8d3
DOCS - Separate parameter names in exceptions in a clear fashion (#2577) 2018-02-20 16:38:47 +00:00
Andras Slemmer
dc268ebe63
Merge pull request #2477 from corda/aslemmer-corda/issues/2300
Add RPC deduplication to client and server
2018-02-19 16:25:36 +00:00
Andras Slemmer
32bcf0a06c Address more comments 2018-02-19 15:16:12 +00:00
Andras Slemmer
7f1bfac8b0 Write better test for dupes 2018-02-19 14:53:28 +00:00
Matthew Nesbit
fee89c044f
Enhance the pluggability of the bridging and messaging code, so that more complex HA and out of process bridges can be written. (#2558) 2018-02-16 16:13:05 +00:00
Matthew Nesbit
cb7a0229a8
Fix a hang in AMQP protocol code that occurs when pausing in debugger causes protocol timeout, but wasn't driving event procesing to actuially kill the socket. (#2557) 2018-02-16 16:03:39 +00:00
Shams Asari
2864ce1384
ENT-1519: Ensure NodeInfo always has at least one address by checking in the c'tor (#2538)
Further, the look up of the node's own node-info from its database has been tightened to ensure there isn't more than one.

Also fixed some brittle code which was assuming exactly one address rather than at least one.
2018-02-15 14:06:41 +00:00
Andras Slemmer
6a4f783106 Hack around database-with-observables issue 2018-02-14 17:30:32 +00:00
Katelyn Baker
5de1ca7127
CORDA-1032 - unnamed ctor param serialization issue (#2532) 2018-02-14 17:22:08 +00:00
Anthony Keenan
3e8d76334e
CORDA-939 Modify Api Scanner to check api for internal exposures (#2510)
* Update check api changes to look for internals

* Update several more uses of internal

* Make check-api-changes script filter out internal class usages

* Make CordaClock part of API

* Update api-current.txt

* Remove exclusion of nodeapi.internal

* Remove access to CordaPersistence from public api

* Don't expose DB Connection from StartedMockNode and remove unnecessary transaction from CustomVaultQueryTest

* Make internal tests that use need db access use InternalMockNetwork

* Make test certificates internal

* Address further review comments

* Revert some accidental changes to api-current.txt

* Address Shams' review comments

* Update Api Scanner to filter out CordaInternal attribute

* Update api-current.txt

* Remove superfluous brackets

* Add transaction to StartedMockNode

* More leaky transaction fixes
2018-02-14 16:42:56 +00:00
Clinton
174ed3c64b
CORDA-556: Added Cordapp Config and a sample (#2469)
* Added per-cordapp configuration 
* Added new API for Cordformation cordapp declarations to support per-cordapp configuration
* Added a cordapp configuration sample
2018-02-14 14:49:59 +00:00
Andras Slemmer
7924a5a834 Add RPC deduplication to client and server 2018-02-13 18:51:59 +00:00
Joel Dudley
ad1be79900
Reorders params to put non-default args first. Creates simpler default constructors. 2018-02-12 17:02:34 +00:00
Michele Sollecito
da591363fd
CORDA-990: Flows Draining Mode (#2483)
[CORDA-990]: Flows draining mode.
2018-02-12 16:13:43 +00:00
Patrick Kuo
ddf0d34147
CORDA-1008 Samples fail to run due to wrongly configured max transaction size in the network bootstrapper (#2509)
* [CORDA-1008] - Samples fail to run due to wrongly configured max transaction size in the network bootstrapper

* address PR issues
2018-02-12 15:33:22 +00:00
Michal Kit
d1627fed5b Backporting introduction of constants for the dev certs from enterprise (#2502) 2018-02-12 12:12:16 +00:00
Katelyn Baker
3c4212a3d6
CORDA-992 - Make the finger printer pluggable for serialization factory (#2479)
Facilitates easier testing
2018-02-12 10:07:25 +00:00
Andras Slemmer
d01b2cbe97 Address comments, fix test 2018-02-09 16:03:36 +00:00
Andras Slemmer
0a88b76e46 r3corda wire compatibility 2018-02-09 14:50:20 +00:00
Andrzej Cichocki
1902a4f11e
CORDA-973 Refactoring for serialization compression support (#2466)
* Use constant for empty byte array
* Less byte array copying
* Fix InputStreamSerializer trailing garbage
* More OO kryo streams
* Introduce SerializationMagic
* Introduce non-copying slice on ByteSequence
2018-02-09 11:54:07 +00:00
Katarzyna Streich
6acff3a7df
First approach to network parameters updates (#2412)
* Network parameters updates

Add two RPC methods networkParametersFeed and
acceptNewNetworkParameters. Implementation of client handling of network
parameters update event. Partial implementation of accepting new
parameters and installing them on the node as well as node startup with
updated parameters.

Move reading of network parameters on startup to separate
NetworkParametersReader class. Add tests.

Move NetworkParameters and NotaryInfo classes to core.

* Ignore evolvability test - to be fixed later

* Add documentation on update process
2018-02-08 14:31:43 +00:00
Katelyn Baker
95f062e8ff
CORDA-904 - Fix evolver to work with setter instantiated classses (#2463)
* CORDA-904 - Make evolver work with classes that use setters

* review comments

* review comments

* small fixs

* don't include systemTest in compiler.xml
2018-02-06 12:55:49 +00:00
Katelyn Baker
69c989478a
CORDA-979 - Make public Java setter accessible within Kotlin (#2464)
* CORDA-979 - Make public Java setter accessible within Kotlin

* Review comments
2018-02-05 16:54:58 +00:00
Katelyn Baker
429da85650
CORDA-946 - Fixes to fingerprinting breaks backward compatibility (#2453)
* CORDA-946 - Fixes to fingerprinting breaks backward compatibility

Demonstrated using the network map parameters signed form as that's
where the problem was first seen

* Review Comments
2018-02-05 12:07:02 +00:00
Katelyn Baker
a08d333d5b
CORDA-978 - Only consider getters that accpet zero parameters (#2462)
* CORDA-978 - Only take getters with zero parameters

* tidy up
2018-02-05 09:48:41 +00:00
Katelyn Baker
57ba9cdf06
CORDA-915 - Replace BEANS introspector with standard reflection (#2400)
* CORDA-915 - Replace BEANS introspector with standard reflection

Removes lib dependency and puts something in place we can better
control

* CORDA-915 - Review comment corrections

* Review Comments
2018-02-02 16:58:43 +00:00
Mike Hearn
38ccd0572c
Use Java reflection for determining if a type is a Kotlin singleton. (#2446)
Kotlin's own reflection has a habit of throwing weird errors and does not work for private objects - thus the unit test which tests this feature has actually never worked properly, but somehow works by accident. An attempt to upgrade to the latest Kotlin revealed the issue so it must have always been unstable.
2018-02-02 17:17:23 +01:00
Katelyn Baker
00b90a98fb CORDA-943 - Cope with multiple generics at str->type conversion in AMQP
Also fixes an odd bug where the inferred type of a getter wasn't
matching the constructor parameter type because that was still unbounded
and seen as T, looking at the raw type allows us to inspect this
properly
2018-02-01 12:19:32 +00:00