diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt index a4f1f9212c..db478b849e 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/ReconnectingCordaRPCOps.kt @@ -11,14 +11,12 @@ import net.corda.core.messaging.ClientRpcSslOptions import net.corda.core.messaging.CordaRPCOps import net.corda.core.messaging.DataFeed import net.corda.core.messaging.FlowHandle -import net.corda.core.utilities.NetworkHostAndPort -import net.corda.core.utilities.contextLogger -import net.corda.core.utilities.debug -import net.corda.core.utilities.seconds +import net.corda.core.utilities.* import net.corda.nodeapi.exceptions.RejectedCommandException import org.apache.activemq.artemis.api.core.ActiveMQConnectionTimedOutException import org.apache.activemq.artemis.api.core.ActiveMQSecurityException import org.apache.activemq.artemis.api.core.ActiveMQUnBlockedException +import rx.Observable import java.lang.reflect.InvocationHandler import java.lang.reflect.InvocationTargetException import java.lang.reflect.Method @@ -49,7 +47,6 @@ class ReconnectingCordaRPCOps private constructor( private val observersPool: ExecutorService, private val userPool: Boolean ) : AutoCloseable, InternalCordaRPCOps by proxy(reconnectingRPCConnection, observersPool) { - // Constructors that mirror CordaRPCClient. constructor( nodeHostAndPort: NetworkHostAndPort, @@ -62,7 +59,6 @@ class ReconnectingCordaRPCOps private constructor( ReconnectingRPCConnection(listOf(nodeHostAndPort), username, password, sslConfiguration, classLoader), observersPool ?: Executors.newCachedThreadPool(), observersPool != null) - constructor( nodeHostAndPorts: List, username: String, @@ -74,12 +70,10 @@ class ReconnectingCordaRPCOps private constructor( ReconnectingRPCConnection(nodeHostAndPorts, username, password, sslConfiguration, classLoader), observersPool ?: Executors.newCachedThreadPool(), observersPool != null) - private companion object { // See https://r3-cev.atlassian.net/browse/CORDA-2890. // TODO Once the bug is fixed, this retry logic should be removed. const val MAX_RETRY_ATTEMPTS_ON_AUTH_ERROR = 3 - private val log = contextLogger() private fun proxy(reconnectingRPCConnection: ReconnectingRPCConnection, observersPool: ExecutorService): InternalCordaRPCOps { return Proxy.newProxyInstance( @@ -88,9 +82,7 @@ class ReconnectingCordaRPCOps private constructor( ErrorInterceptingHandler(reconnectingRPCConnection, observersPool)) as InternalCordaRPCOps } } - private val retryFlowsPool = Executors.newScheduledThreadPool(1) - /** * This function runs a flow and retries until it completes successfully. * @@ -120,7 +112,6 @@ class ReconnectingCordaRPCOps private constructor( ) } } - /** * Helper class useful for reconnecting to a Node. */ @@ -132,17 +123,13 @@ class ReconnectingCordaRPCOps private constructor( val classLoader: ClassLoader? ) : RPCConnection { private var currentRPCConnection: CordaRPCConnection? = null - enum class CurrentState { UNCONNECTED, CONNECTED, CONNECTING, CLOSED, DIED } - private var currentState = CurrentState.UNCONNECTED - init { current } - private val current: CordaRPCConnection @Synchronized get() = when (currentState) { CurrentState.UNCONNECTED -> connect() @@ -150,7 +137,6 @@ class ReconnectingCordaRPCOps private constructor( CurrentState.CLOSED -> throw IllegalArgumentException("The ReconnectingRPCConnection has been closed.") CurrentState.CONNECTING, CurrentState.DIED -> throw IllegalArgumentException("Illegal state: $currentState ") } - /** * Called on external error. * Will block until the connection is established again. @@ -163,7 +149,6 @@ class ReconnectingCordaRPCOps private constructor( log.debug("", e) connect() } - @Synchronized private fun connect(): CordaRPCConnection { currentState = CurrentState.CONNECTING @@ -171,7 +156,6 @@ class ReconnectingCordaRPCOps private constructor( currentState = CurrentState.CONNECTED return currentRPCConnection!! } - private tailrec fun establishConnectionWithRetry(retryInterval: Duration = 1.seconds, currentAuthenticationRetries: Int = 0): CordaRPCConnection { var _currentAuthenticationRetries = currentAuthenticationRetries log.info("Connecting to: $nodeHostAndPorts") @@ -212,41 +196,33 @@ class ReconnectingCordaRPCOps private constructor( } } } - // Could not connect this time round - pause before giving another try. Thread.sleep(retryInterval.toMillis()) // TODO - make the exponential retry factor configurable. return establishConnectionWithRetry((retryInterval * 10) / 9, _currentAuthenticationRetries) } - override val proxy: CordaRPCOps get() = current.proxy - override val serverProtocolVersion get() = current.serverProtocolVersion - @Synchronized override fun notifyServerAndClose() { currentState = CurrentState.CLOSED currentRPCConnection?.notifyServerAndClose() } - @Synchronized override fun forceClose() { currentState = CurrentState.CLOSED currentRPCConnection?.forceClose() } - @Synchronized override fun close() { currentState = CurrentState.CLOSED currentRPCConnection?.close() } } - private class ErrorInterceptingHandler(val reconnectingRPCConnection: ReconnectingRPCConnection, val observersPool: ExecutorService) : InvocationHandler { private fun Method.isStartFlow() = name.startsWith("startFlow") || name.startsWith("startTrackedFlow") - override fun invoke(proxy: Any, method: Method, args: Array?): Any? { val result: Any? = try { log.debug { "Invoking RPC $method..." } @@ -260,7 +236,6 @@ class ReconnectingCordaRPCOps private constructor( } else { this.invoke(proxy, method, args) } - when (e.targetException) { is RejectedCommandException -> { log.error("Node is being shutdown. Operation ${method.name} rejected. Retrying when node is up...", e) @@ -285,7 +260,6 @@ class ReconnectingCordaRPCOps private constructor( } } } - return when (method.returnType) { DataFeed::class.java -> { // Intercept the data feed methods and returned a ReconnectingObservable instance @@ -301,7 +275,6 @@ class ReconnectingCordaRPCOps private constructor( } } } - override fun close() { if (!userPool) observersPool.shutdown() retryFlowsPool.shutdown() diff --git a/docs/source/_static/versions b/docs/source/_static/versions index 775f9cb83f..13e98ab34b 100644 --- a/docs/source/_static/versions +++ b/docs/source/_static/versions @@ -15,5 +15,6 @@ "https://docs.corda.net/releases/release-V3.2": "V3.2", "https://docs.corda.net/releases/release-V3.3": "V3.3", "https://docs.corda.net/releases/release-V4.0": "V4.0", + "https://docs.corda.net/releases/release-V4.1": "V4.1", "https://docs.corda.net/head/": "Master" } diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 69c0f86abe..e16cf00be0 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -4,10 +4,8 @@ Changelog Here's a summary of what's changed in each Corda release. For guidance on how to upgrade code from the previous release, see :doc:`app-upgrade-notes`. -.. _changelog_v5.0: - -Version 5.0 ------------ +Unreleased +---------- * Introduced a new low level flow diagnostics tool: checkpoint agent (that can be used standalone or in conjunction with the ``dumpCheckpoints`` shell command). See :doc:`checkpoint-tooling` for more information. @@ -42,11 +40,6 @@ Version 5.0 .. note:: This is only best-effort and there are no guarantees of reliability. -.. _changelog_v4.2: - -Version 4.2 ------------ - * Contract attachments are now automatically whitelisted by the node if another contract attachment is present with the same contract classes, signed by the same public keys, and uploaded by a trusted uploader. This allows the node to resolve transactions that use earlier versions of a contract without having to manually install that version, provided a newer version is installed. Similarly, non-contract attachments @@ -55,6 +48,13 @@ Version 4.2 * :doc:`design/data-model-upgrades/package-namespace-ownership` configurations can be now be set as described in :ref:`node_package_namespace_ownership`, when using the Cordformation plugin version 4.0.43. +.. _changelog_v4.1: + +Version 4.1 +----------- + +* Fix a bug in Corda 4.0 that combined commands in ``TransactionBuilder`` if they only differed by the signers list. The behaviour is now consistent with prior Corda releases. + * Disabled the default loading of ``hibernate-validator`` as a plugin by hibernate when a CorDapp depends on it. This change will in turn fix the (https://github.com/corda/corda/issues/4444) issue, because nodes will no longer need to add ``hibernate-validator`` to the ``\libs`` folder. For nodes that already did that, it can be safely removed when the latest Corda is installed. diff --git a/docs/source/corda-network/UAT.md b/docs/source/corda-network/UAT.md index 1e3c48bc2e..deff5dd389 100644 --- a/docs/source/corda-network/UAT.md +++ b/docs/source/corda-network/UAT.md @@ -35,6 +35,6 @@ Corda Network UAT is governed by an [independent Foundation](https://corda.netwo Steps to join UAT environment ----------------------------- -Steps to join are outlined on this website: https://corda.network/participation/index.html +Steps to join are outlined on the [Corda Network UAT microsite](http://uat.network.r3.com/pages/joining/joining.html) For further questions on this process, please contact us - preferably on the mailing list: https://groups.io/g/corda-network diff --git a/docs/source/generating-a-node.rst b/docs/source/generating-a-node.rst index d784bb126b..e09fbf80ea 100644 --- a/docs/source/generating-a-node.rst +++ b/docs/source/generating-a-node.rst @@ -19,7 +19,7 @@ A node can be created manually by creating a folder that contains the following * **Optional:** A webserver JAR entitled ``corda-webserver.jar`` that will connect to the node via RPC - * The (deprecated) default webserver can be downloaded from http://r3.bintray.com/corda/net/corda/corda-webserver/ (under /|corda_version|/corda-webserver-|corda_version|.jar) + * The (deprecated) default webserver can be downloaded from http://r3.bintray.com/corda/net/corda/corda-webserver/ (under /|corda_version|/corda-|corda_version|.jar) * A Spring Boot alternative can be found here: https://github.com/corda/spring-webserver The remaining files and folders described in :doc:`node-structure` will be generated at runtime. diff --git a/docs/source/getting-set-up.rst b/docs/source/getting-set-up.rst index 2394a6a4b7..9f4142e08b 100644 --- a/docs/source/getting-set-up.rst +++ b/docs/source/getting-set-up.rst @@ -67,6 +67,16 @@ The set-up instructions are available for the following platforms: .. _windows-label: +.. note:: These setup instructions will guide you on how to install the Oracle JDK. Each JDK can be found on their respective sites: + + * `Oracle `_ + + * `Amazon Corretto `_ + + * `Red Hat OpenJDK `_ + + * `Zulu OpenJDK `_ + Windows ------- diff --git a/docs/source/network-bootstrapper.rst b/docs/source/network-bootstrapper.rst index facea406dd..1831481576 100644 --- a/docs/source/network-bootstrapper.rst +++ b/docs/source/network-bootstrapper.rst @@ -29,9 +29,7 @@ The Corda Network Bootstrapper can be downloaded from `here +``java -jar network-bootstrapper-|corda_version|.jar --dir `` For example running the command on a directory containing these files: @@ -155,9 +153,7 @@ can use the Network Bootstrapper on the following network structure: Then run the Network Bootstrapper again from the root dir: -.. sourcecode:: bash - - java -jar corda-tools-network-bootstrapper-|corda_version|.jar --dir +``java -jar network-bootstrapper-|corda_version|.jar --dir `` Which will give the following: @@ -228,9 +224,7 @@ For example, with the following pre-generated network: Then run the Network Bootstrapper again from the root dir: -.. sourcecode:: bash - - java -jar corda-tools-network-bootstrapper-|corda_version|.jar --dir +``java -jar network-bootstrapper-|corda_version|.jar --dir `` To give the following: @@ -277,15 +271,11 @@ Overriding network parameters via a file You can provide a network parameters overrides file using the following syntax: -.. sourcecode:: bash - - java -jar corda-tools-network-bootstrapper-|corda_version|.jar --network-parameter-overrides= +``java -jar network-bootstrapper-|corda_version|.jar --network-parameter-overrides=`` Or alternatively, by using the short form version: -.. sourcecode:: bash - - java -jar corda-tools-network-bootstrapper-|corda_version|.jar -n= +``java -jar network-bootstrapper-|corda_version|.jar -n=`` The network parameter overrides file is a HOCON file with the following fields, all of which are optional. Any field that is not provided will be ignored. If a field is not provided and you are bootstrapping a new network, a sensible default value will be used. If a field is not provided and you diff --git a/docs/source/network-builder.rst b/docs/source/network-builder.rst index 552cba1a17..df8e4d175e 100644 --- a/docs/source/network-builder.rst +++ b/docs/source/network-builder.rst @@ -10,7 +10,7 @@ containers to abstract the complexity of managing a distributed network away fro The network you build will either be made up of local ``Docker`` nodes *or* of nodes spread across Azure containers. -For each node a separate Docker image is built based on `corda/corda-zulu-4.0 `_. +For each node a separate Docker image is built based on `corda/corda-zulu-|corda_version| `_. Unlike the official image, a `node.conf` file and CorDapps are embedded into the image (they are not externally provided to the running container via volumes/mount points). More backends may be added in future. The tool is open source, so contributions to add more diff --git a/docs/source/release-notes.rst b/docs/source/release-notes.rst index aa03d07779..bac307d80a 100644 --- a/docs/source/release-notes.rst +++ b/docs/source/release-notes.rst @@ -1,8 +1,173 @@ -Release notes for Corda 4 -========================= +Release notes +------------- + +.. contents:: + :depth: 2 + +.. _release_notes_v4_1: + +Corda 4.1 +========= + +It's been a little under 3 1/2 months since the release of Corda 4.0 and all of the brand new features that added to the powerful suite +of tools Corda offers. Now, following the release of Corda Enterprise 4.0, we are proud to release Corda 4.1, bringing over 150 fixes +and documentation updates to bring additional stability and quality of life improvements to those developing on the Corda platform. + +Information on Corda Enterprise 4.0 can be found `here `_ and +`here `_. (It's worth noting that normally this document would have started with a comment +about whether or not you'd been recently domiciled under some solidified mineral material regarding the release of Corda Enterprise 4.0. Alas, we made +that joke when we shipped the first release of Corda after Enterprise 3.0 shipped, so the thunder has been stolen and repeating ourselves would be terribly gauche.) + +Corda 4.1 brings the lessons and bug fixes discovered during the process of building and shipping Enterprise 4.0 back to the open source community. As mentioned above +there are over 150 fixes and tweaks here. With this release the core feature sets of both entities are far closer aligned than past major +releases of the Corda that should make testing your CorDapps in mixed type environments much easier. + +As such, we recommend you upgrade from Corda 4.0 to Corda 4.1 as soon possible. + +Issues Fixed +~~~~~~~~~~~~ + +* Docker images do not support passing a prepared config with initial registration [`CORDA-2888 `_] +* Different hashes for container Corda and normal Corda jars [`CORDA-2884 `_] +* Auto attachment of dependencies fails to find class [`CORDA-2863 `_] +* Artemis session can't be used in more than one thread [`CORDA-2861 `_] +* Property type checking is overly strict [`CORDA-2860 `_] +* Serialisation bug (or not) when trying to run SWIFT Corda Settler tests [`CORDA-2848 `_] +* Custom serialisers not found when running mock network tests [`CORDA-2847 `_] +* Base directory error message where directory does not exist is slightly misleading [`CORDA-2834 `_] +* Progress tracker not reloadable in checkpoints written in Java [`CORDA-2825 `_] +* Missing quasar error points to non-existent page [`CORDA-2821 `_] +* ``TransactionBuilder`` can build unverifiable transactions in V5 if more than one CorDapp loaded [`CORDA-2817 `_] +* The node hangs when there is a dis-connection of Oracle database [`CORDA-2813 `_] +* Docs: fix the latex warnings in the build [`CORDA-2809 `_] +* Docs: build the docs page needs updating [`CORDA-2808 `_] +* Don't retry database transaction in abstract node start [`CORDA-2807 `_] +* Upgrade Corda Core to use Java Persistence API 2.2 [`CORDA-2804 `_] +* Network map stopped updating on Testnet staging notary [`CORDA-2803 `_] +* Improve test reliability by eliminating fixed-duration Thread.sleeps [`CORDA-2802 `_] +* Not handled exception when certificates directory is missing [`CORDA-2786 `_] +* Unable to run FinalityFlow if the initiating app has ``targetPlatformVersion=4`` and the recipient is using the old version [`CORDA-2784 `_] +* Performing a registration with an incorrect Config gives error without appropriate info [`CORDA-2783 `_] +* Regression: ``java.lang.Comparable`` is not on the default whitelist but never has been [`CORDA-2782 `_] +* Docs: replace version string with things that get substituted [`CORDA-2781 `_] +* Inconsistent docs between internal and external website [`CORDA-2779 `_] +* Change the doc substitution so that it works in code blocks as well as in other places [`CORDA-2777 `_] +* ``net.corda.core.internal.LazyStickyPool#toIndex`` can create a negative index [`CORDA-2772 `_] +* ``NetworkMapUpdater#fileWatcherSubscription`` is never assigned and hence the subscription is never cleaned up [`CORDA-2770 `_] +* Infinite recursive call in ``NetworkParameters.copy`` [`CORDA-2769 `_] +* Unexpected exception de-serializing throwable for ``OverlappingAttachmentsException`` [`CORDA-2765 `_] +* Always log config to log file [`CORDA-2763 `_] +* ``ReceiveTransactionFlow`` states to record flag gets quietly ignored if ``checkSufficientSignatures = false`` [`CORDA-2762 `_] +* Fix Driver's ``PortAllocation`` class, and then use it for Node's integration tests. [`CORDA-2759 `_] +* State machine logs an error prior to deciding to escalate to an error [`CORDA-2757 `_] +* Migrate DJVM into a separate module [`CORDA-2750 `_] +* Error in ``HikariPool`` in the performance cluster [`CORDA-2748 `_] +* Package DJVM CLI for standalone distribution [`CORDA-2747 `_] +* Unable to insert state into vault if notary not on network map [`CORDA-2745 `_] +* Create sample code and integration tests to showcase rpc operations that support reconnection [`CORDA-2743 `_] +* RPC v4 client unable to subscribe to progress tracker events from Corda 3.3 node [`CORDA-2742 `_] +* Doc Fix: Rpc client connection management section not fully working in Corda 4 [`CORDA-2741 `_] +* ``AnsiProgressRenderer`` may start reporting incorrect progress if tree contains identical steps [`CORDA-2738 `_] +* The ``FlowProgressHandle`` does not always return expected results [`CORDA-2737 `_] +* Doc fix: integration testing tutorial could do with some gradle instructions [`CORDA-2729 `_] +* Release upgrade to Corda 4 notes: include upgrading quasar.jar explicitly in the Corda Kotlin template [`CORDA-2728 `_] +* DJVM CLI log file is always empty [`CORDA-2725 `_] +* DJVM documentation incorrect around `djvm check` [`CORDA-2721 `_] +* Doc fix: reflect the CorDapp template doc changes re quasar/test running the official docs [`CORDA-2715 `_] +* Upgrade to Corda 4 test docs only have Kotlin examples [`CORDA-2710 `_] +* Log message "Cannot find flow corresponding to session" should not be a warning [`CORDA-2706 `_] +* Flow failing due to "Flow sessions were not provided" for its own identity [`CORDA-2705 `_] +* RPC user security using ``Shiro`` docs have errant commas in example config [`CORDA-2703 `_] +* The ``crlCheckSoftFail`` option is not respected, allowing transactions even if strict checking is enabled [`CORDA-2701 `_] +* Vault paging fails if setting max page size to `Int.MAX_VALUE` [`CORDA-2698 `_] +* Upgrade to Corda Gradle Plugins 4.0.41 [`CORDA-2697 `_] +* Corda complaining of duplicate classes upon start-up when it doesn't need to [`CORDA-2696 `_] +* Launching node explorer for node creates error and explorer closes [`CORDA-2694 `_] +* Transactions created in V3 cannot be verified in V4 if any of the state types were included in "depended upon" CorDapps which were not attached to the transaction [`CORDA-2692 `_] +* Reduce CorDapp scanning logging [`CORDA-2690 `_] +* Clean up verbose warning: `ProgressTracker has not been started` [`CORDA-2689 `_] +* Add a no-carpenter context [`CORDA-2688 `_] +* Improve CorDapp upgrade guidelines for migrating existing states on ledger (pre-V4) [`CORDA-2684 `_] +* ``SessionRejectException.UnknownClass`` trapped by flow hospital but no way to call dropSessionInit() [`CORDA-2683 `_] +* Repeated ``CordFormations`` can fail with ClassLoader exception. [`CORDA-2676 `_] +* Backwards compatibility break in serialisation engine when deserialising nullable fields [`CORDA-2674 `_] +* Simplify sample CorDapp projects. [`CORDA-2672 `_] +* Remove ``ExplorerSimulator`` from Node Explorer [`CORDA-2671 `_] +* Reintroduce ``pendingFlowsCount`` to the public API [`CORDA-2669 `_] +* Trader demo integration tests fails with jar not found exception [`CORDA-2668 `_] +* Fix Source ClassLoader for DJVM [`CORDA-2667 `_] +* Issue with simple transfer of ownable asset [`CORDA-2665 `_] +* Fix references to Docker images in docs [`CORDA-2664 `_] +* Add something to docsite the need for a common contracts Jar between OS/ENT and how it should be compiled against OS [`CORDA-2656 `_] +* Create document outlining CorDapp Upgrade guarantees [`CORDA-2655 `_] +* Fix DJVM CLI tool [`CORDA-2654 `_] +* Corda Service needs Thread Context ClassLoader [`CORDA-2653 `_] +* Useless migration error when finance workflow jar is not installed [`CORDA-2651 `_] +* Database connection pools leaking memory on every checkpoint [`CORDA-2646 `_] +* Exception swallowed when querying vault via RPC with bad page spec [`CORDA-2645 `_] +* Applying CordFormation and Cordapp Gradle plugins together includes Jolokia into the Cordapp. [`CORDA-2642 `_] +* Wrong folder ownership while trying to connect to Testnet using RC* docker image [`CORDA-2641 `_] +* Provide a better error message on an incompatible implicit contract upgrade [`CORDA-2633 `_] +* ``uploadAttachment`` via shell can fail with unhelpful message if the result of the command is unsuccessful [`CORDA-2632 `_] +* Provide a better error msg when the notary type is misconfigured on the net params [`CORDA-2629 `_] +* Maybe tone down the level of panic when somebody types their SSH password in incorrectly... [`CORDA-2621 `_] +* Cannot complete transaction that has unknown states in the transaction history [`CORDA-2615 `_] +* Switch off the codepaths that disable the FinalityHandler [`CORDA-2613 `_] +* is our API documentation (what is stable and what isn't) correct? [`CORDA-2610 `_] +* Getting set up guide needs to be updated to reflect Java 8 fun and games [`CORDA-2602 `_] +* Not handle exception when Explorer tries to connect to inaccessible server [`CORDA-2586 `_] +* Errors received from peers can't be distinguished from local errors [`CORDA-2572 `_] +* Add `flow kill` command, deprecate `run killFlow` [`CORDA-2569 `_] +* Hash to signature constraints migration: add a config option that makes hash constraints breakable. [`CORDA-2568 `_] +* Deadlock between database and AppendOnlyPersistentMap [`CORDA-2566 `_] +* Docfix: Document custom cordapp configuration [`CORDA-2560 `_] +* Bootstrapper - option to include contracts to whitelist from signed jars [`CORDA-2554 `_] +* Explicit contract upgrade sample fails upon initiation (ClassNotFoundException) [`CORDA-2550 `_] +* IRS demo app missing demodate endpoint [`CORDA-2535 `_] +* Doc fix: Contract testing tutorial errors [`CORDA-2528 `_] +* Unclear error message when receiving state from node on higher version of signed cordapp [`CORDA-2522 `_] +* Terminating ssh connection to node results in stack trace being thrown to the console [`CORDA-2519 `_] +* Error propagating hash to signature constraints [`CORDA-2515 `_] +* Unable to import trusted attachment [`CORDA-2512 `_] +* Invalid node command line options not always gracefully handled [`CORDA-2506 `_] +* node.conf with rogue line results non-comprehensive error [`CORDA-2505 `_] +* Fix v4's inability to migrate V3 vault data [`CORDA-2487 `_] +* Vault Query fails to process states upon CorDapp Contract upgrade [`CORDA-2486 `_] +* Signature Constraints end-user documentation is limited [`CORDA-2477 `_] +* Docs update: document transition from the whitelist constraint to the sig constraint [`CORDA-2465 `_] +* The ``ContractUpgradeWireTransaction`` does not support the Signature Constraint [`CORDA-2456 `_] +* Intermittent `relation "hibernate_sequence" does not exist` error when using Postgres [`CORDA-2393 `_] +* Implement package namespace ownership [`CORDA-1947 `_] +* Show explicit error message when new version of OS CorDapp contains schema changes [`CORDA-1596 `_] +* Dockerfile improvements and image size reduction [`CORDA-2929 `_] +* Update QPID Proton-J library to latest [`CORDA-2856 `_] +* Not handled excpetion when certificates directory is missing [`CORDA-2786 `_] +* The DJVM cannot sandbox instances of Contract.verify(LedgerTransaction) when testing CorDapps. [`CORDA-2775 `_] +* State machine logs an error prior to deciding to escalate to an error [`CORDA-2757 `_] +* Should Jolokia be included in the built jar files? [`CORDA-2699 `_] +* Transactions created in V3 cannot be verified in V4 if any of the state types were included in "depended upon" CorDapps which were not attached to the transaction [`CORDA-2692 `_] +* Prevent a node re-registering with the doorman if it did already and the node "state" has not been erased [`CORDA-2647 `_] +* The cert hierarchy diagram for C4 is the same as C3.0 but I thought we changed it between C3.1 and 3.2? [`CORDA-2604 `_] +* Windows build fails with `FileSystemException` in `TwoPartyTradeFlowTests` [`CORDA-2363 `_] +* `Cash.generateSpend` cannot be used twice to generate two cash moves in the same tx [`CORDA-2162 `_] +* FlowException thrown by session.receive is not propagated back to a counterparty +* invalid command line args for corda result in 0 exit code +* Windows build fails on TwoPartyTradeFlowTests +* C4 performance below C3, bring it back into parity +* Deserialisation of ContractVerificationException blows up trying to put null into non-null field +* Reference state test (R3T-1918) failing probably due to unconsumed linear state that was referenced. +* Signature constraint: Jarsigner verification allows removal of files from the archive. +* Node explorer bug revealed from within Demobench: serialisation failed error is shown +* Security: Fix vulnerability where an attacker can use CustomSerializers to alter the meaning of serialized data +* Node/RPC is broken after CorDapp upgrade +* RPC client disconnects shouldn't be a warning +* Hibernate logs warning and errors for some conditions we handle .. _release_notes_v4_0: +Corda 4 +======= + Welcome to the Corda 4 release notes. Please read these carefully to understand what's new in this release and how the changes can help you. Just as prior releases have brought with them commitments to wire and API stability, Corda 4 comes with those same guarantees. States and apps valid in @@ -24,8 +189,6 @@ account for your own schedule planning. by Corda 4. There will shortly be a followup Corda 3.4 release that corrects this error. Interop between Corda 3 and Corda 4 will require that Corda 3 users are on the latest patchlevel release. -.. contents:: - Changes for developers in Corda 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/testnet-explorer-corda.rst b/docs/source/testnet-explorer-corda.rst index a539a40a06..ac1b4bb486 100644 --- a/docs/source/testnet-explorer-corda.rst +++ b/docs/source/testnet-explorer-corda.rst @@ -34,21 +34,21 @@ couple of resources. .. code-block:: bash - wget https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-finance-contracts/|corda_version|/corda-finance-contracts-|corda_version|.jar - wget https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-finance-workflows/|corda_version|/corda-finance-workflows-|corda_version|.jar + wget https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-finance-contracts-|corda_version|-corda/corda-finance-contracts-|corda_version|-corda.jar + wget https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-finance-workflows-|corda_version|-corda/corda-finance-workflows-|corda_version|-corda.jar This is required to run some flows to check your connections, and to issue/transfer cash to counterparties. Copy it to the Corda installation location: .. code-block:: bash - sudo cp /home//corda-finance-*-|corda_version|.jar /opt/corda/cordapps/ + sudo cp /home//corda-finance-|corda_version|-corda.jar /opt/corda/cordapps/ #. Run the following to create a config file for the finance CorDapp: .. code-block:: bash - echo "issuableCurrencies = [ USD ]" > /opt/corda/cordapps/config/corda-finance-|corda_version|.conf + echo "issuableCurrencies = [ USD ]" > /opt/corda/cordapps/config/corda-finance-|corda_version|-corda.conf #. Restart the Corda node: @@ -70,7 +70,7 @@ couple of resources. .. code:: bash - http://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-tools-explorer/|corda_version|/corda-tools-explorer-|corda_version|.jar + http://ci-artifactory.corda.r3cev.com/artifactory/corda-releases/net/corda/corda-tools-explorer/|corda_version|-corda/corda-tools-explorer-|corda_version|-corda.jar .. warning:: This Node Explorer is incompatible with the Corda Enterprise distribution and vice versa as they currently use different serialisation schemes (Kryo vs AMQP). @@ -79,7 +79,7 @@ couple of resources. .. code:: bash - java -jar corda-tools-explorer-|corda_version|.jar + java -jar corda-tools-explorer-|corda_version|-corda.jar .. image:: resources/explorer-login.png diff --git a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt index 8bfbc676f3..05baf48cbf 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/rpc/RpcReconnectTests.kt @@ -73,7 +73,6 @@ class RpcReconnectTests { // When this reaches 0 - the test will end. val flowsCountdownLatch = CountDownLatch(NUMBER_OF_FLOWS_TO_RUN) - // These are the expected progress steps for the CashIssueAndPayFlow. val expectedProgress = listOf( "Starting", @@ -150,7 +149,6 @@ class RpcReconnectTests { } if (flowsCountdownLatch.count == 0L) break - when (Random().nextInt().rem(7).absoluteValue) { 0 -> { log.info("Forcefully killing node and proxy.") @@ -300,7 +298,6 @@ class RpcReconnectTests { // Stop the observers. vaultSubscription.unsubscribe() stateMachineSubscription.unsubscribe() - bankAReconnectingRpc.close() } @@ -311,7 +308,6 @@ class RpcReconnectTests { fun MutableMap>.addEvent(id: StateMachineRunId, progress: String?): Boolean { return getOrPut(id) { mutableListOf() }.let { if (progress != null) it.add(progress) else false } } - private fun getRandomAddressPair() = AddressPair(getRandomAddress(), getRandomAddress()) private fun getRandomAddress() = NetworkHostAndPort("localhost", portAllocator.nextPort()) diff --git a/samples/irs-demo/cordapp/workflows-irs/build.gradle b/samples/irs-demo/cordapp/workflows-irs/build.gradle index 43bf705f0b..d34d6a9dda 100644 --- a/samples/irs-demo/cordapp/workflows-irs/build.gradle +++ b/samples/irs-demo/cordapp/workflows-irs/build.gradle @@ -14,6 +14,7 @@ dependencies { // Corda integration dependencies cordaCompile project(':core') + compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") diff --git a/samples/trader-demo/workflows-trader/build.gradle b/samples/trader-demo/workflows-trader/build.gradle index 668a69ee8c..af65fecbaf 100644 --- a/samples/trader-demo/workflows-trader/build.gradle +++ b/samples/trader-demo/workflows-trader/build.gradle @@ -9,7 +9,7 @@ dependencies { // The trader demo CorDapp depends upon Cash CorDapp features cordapp project(':finance:contracts') cordapp project(':finance:workflows') - + testCompile project(':node-driver') testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" diff --git a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt index 94dcf72281..7aaa47737b 100644 --- a/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt +++ b/serialization/src/main/kotlin/net/corda/serialization/internal/amqp/PropertyDescriptor.kt @@ -4,6 +4,7 @@ import com.google.common.reflect.TypeToken import net.corda.core.KeepForDJVM import net.corda.core.internal.isPublic import net.corda.core.serialization.SerializableCalculatedProperty +import net.corda.core.utilities.contextLogger import net.corda.serialization.internal.amqp.MethodClassifier.* import java.lang.reflect.Field import java.lang.reflect.Method diff --git a/tools/network-builder/src/main/resources/node-Dockerfile b/tools/network-builder/src/main/resources/node-Dockerfile index 86f55cbe7f..4387f29054 100644 --- a/tools/network-builder/src/main/resources/node-Dockerfile +++ b/tools/network-builder/src/main/resources/node-Dockerfile @@ -1,4 +1,4 @@ -FROM corda/corda-zulu-4.0 +FROM corda/corda-zulu-4.1 # Copy corda files ADD --chown=corda:corda node.conf /opt/corda/node.conf diff --git a/tools/network-builder/src/main/resources/notary-Dockerfile b/tools/network-builder/src/main/resources/notary-Dockerfile index 110f6e2865..ab290f1fe1 100644 --- a/tools/network-builder/src/main/resources/notary-Dockerfile +++ b/tools/network-builder/src/main/resources/notary-Dockerfile @@ -1,4 +1,4 @@ -FROM corda/corda-zulu-4.0 +FROM corda/corda-zulu-4.1 # Copy corda files ADD --chown=corda:corda node.conf /opt/corda/node.conf