You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CORDA-966 - RELEASE - Upgrade notes for V3.0 (corda#2550)
* DOC: AMQP upgrade notes in brief
* moving test upgrade notes from release notes to upgrade note
* add cordapp/cordformation notes
* Added section for network map changes
* Updated upgrade notes to reflect changes for SSL (corda#2569)
* Updated upgrade notes to reflect changes for SSL
* Removed some blank lines.
* AMQP Constructor / property mismatch upgrade note
* wip
* Note about feasible (but not recommended) tables that can be migrated from Corda 2.0 to 3.0, basic recipe how to do it.
* Database schema changes - optional partial vault migration described at the end of the paragraph, focus on the overall changes to tables.
* Review Comments
* Database schema changes - split Vault and finance module changes, reformatting, improve migration note.
* Database schema changes - addressing PR comments.
* Database schema changes - move changes to change log, migration to JIRA ticket.
* Finalise versions
* review comments
* CORDA-1171: Add notes on the notary error change
* set release version
column ``"VAULTSCHEMAV1$VAULTFUNGIBLESTATES_OUTPUT_INDEX"`` renamed to ``OUTPUT_INDEX``,
59
+
column ``"VAULTSCHEMAV1$VAULTFUNGIBLESTATES_TRANSACTION_ID"`` renamed to ``TRANSACTION_ID``
60
+
* ``VAULT_LINEAR_STATES``:
61
+
type of column ``"UUID"`` changed from ``VARBINARY`` to ``VARCHAR(255)`` - select varbinary column as ``CAST("UUID" AS UUID)`` to get UUID in varchar format
column ``"VAULTSCHEMAV1$VAULTLINEARSTATES_OUTPUT_INDEX"`` renamed to ``OUTPUT_INDEX``,
65
+
column ``"VAULTSCHEMAV1$VAULTLINEARSTATES_TRANSACTION_ID"`` renamed to ``TRANSACTION_ID``
66
+
* ``contract_cash_states``:
67
+
columns storing Base58 representation of the serialised public key (e.g. ``issuer_key``) were changed to store Base58 representation of SHA-256 of public key prefixed with `DL`
68
+
* ``contract_cp_states``:
69
+
table renamed to ``cp_states``, column changes as for ``contract_cash_states``
70
+
39
71
* X.509 certificates now have an extension that specifies the Corda role the certificate is used for, and the role
40
72
hierarchy is now enforced in the validation code. See ``net.corda.core.internal.CertRole`` for the current implementation
41
73
until final documentation is prepared. Certificates at ``NODE_CA``, ``WELL_KNOWN_SERVICE_IDENTITY`` and above must
override var participants: MutableSet<AbstractParty>? = null,
56
112
113
+
AMQP
114
+
^^^^
115
+
116
+
Whilst the enablement of AMQP is a transparent change, as noted in the :doc:`serialization` documentation
117
+
the way classes, and states in particular, should be written to work with this new library may require some
118
+
alteration to your current implementation.
119
+
120
+
* With AMQP enabled Java classes must be compiled with the -parameter flag.
121
+
122
+
* If they aren't, then the error message will complain about ``arg<N>`` being an unknown parameter.
123
+
* If recompilation is not viable, a custom serializer can be written as per :doc:`cordapp-custom-serializers`
124
+
* It is important to bear in mind that with AMQP there must be an implicit mapping between constructor
125
+
parameters and properties you wish included in the serialized form of a class.
126
+
127
+
* See :doc:`serialization` for more information
128
+
129
+
* Error messages of the form
130
+
131
+
``Constructor parameter - "<some parameter of a constructor>" - doesn't refer to a property of "class <some.class.being.serialized>"``
132
+
133
+
indicate that a class, in the above example ``some.class.being.serialized``, has a parameter on its primary constructor that
134
+
doesn't correlate to a property of the class. This is a problem because the Corda AMQP serialization library uses a class's
135
+
constructor (default, primary, or annotated) as the means by which instances of the serialized form are reconstituted.
136
+
137
+
See the section "Mismatched Class Properties / Constructor Parameters" in the :doc:`serialization` documentation
138
+
139
+
Database schema changes
140
+
^^^^^^^^^^^^^^^^^^^^^^^
141
+
142
+
An H2 database instance (represented on the filesystem as a file called `persistence.mv.db`) used in Corda 1.0 or 2.0
143
+
cannot be directly reused with Corda 3.0 due to minor improvements and additions to stabilise the underlying schemas.
144
+
145
+
Configuration
146
+
^^^^^^^^^^^^^
147
+
148
+
Nodes that do not require SSL to be enabled for RPC clients now need an additional port to be specified as part of their configuration.
149
+
To do this, add a block as follows to the nodes configuraiton:
150
+
151
+
.. sourcecode:: script
152
+
153
+
rpcSettings {
154
+
adminAddress "localhost:10007"
155
+
}
156
+
157
+
to `node.conf` files.
158
+
159
+
Also, the property `rpcPort` is now deprecated, so it would be preferable to substitute properties specified that way e.g., `rpcPort=10006` with a block as follows:
160
+
161
+
.. sourcecode:: script
162
+
163
+
rpcSettings {
164
+
address "localhost:10006"
165
+
adminAddress "localhost:10007"
166
+
}
167
+
168
+
Equivalent changes should be performed on classes extending `CordformDefinition`.
169
+
57
170
Testing
58
-
~~~~~~~
171
+
^^^^^^^
59
172
60
173
* The registration mechanism for CorDapps in ``MockNetwork`` unit tests has changed:
61
174
@@ -65,6 +178,47 @@ Testing
65
178
66
179
* The ``unsetCordappPackages`` method is now redundant and has been removed
67
180
181
+
* Many classes have been moved between packages, so you will need to update your imports
182
+
183
+
.. tip:: We have provided a several scripts (depending upon your operating system of choice) to smooth the upgrade
184
+
process for existing projects. This can be found at ``tools\scripts\update-test-packages.sh`` for the Bash shell and
185
+
``tools/scripts/upgrade-test-packages.ps1`` for Windows Power Shell users in the source tree
186
+
187
+
* setCordappPackages and unsetCordappPackages have been removed from the ledger/transaction DSL and the flow test framework,
188
+
and are now set via a constructor parameter or automatically when constructing the MockServices or MockNetwork object
189
+
190
+
* Key constants e.g. ``ALICE_KEY`` have been removed; you can now use TestIdentity to make your own
191
+
192
+
* The ledger/transaction DSL must now be provided with MockServices as it no longer makes its own
193
+
* In transaction blocks, input and output take their arguments as ContractStates rather than lambdas
194
+
* Also in transaction blocks, command takes its arguments as CommandDatas rather than lambdas
195
+
196
+
* The MockServices API has changed; please refer to its API documentation
197
+
198
+
* TestDependencyInjectionBase has been retired in favour of a JUnit Rule called SerializationEnvironmentRule
199
+
* This replaces the initialiseSerialization parameter of ledger/transaction and verifierDriver
200
+
* The withTestSerialization method is obsoleted by SerializationEnvironmentRule and has been retired
201
+
202
+
* MockNetwork now takes a MockNetworkParameters builder to make it more Java-friendly, like driver's DriverParameters
203
+
* Similarly, the MockNetwork.createNode methods now take a MockNodeParameters builder
204
+
205
+
* MockNode constructor parameters are now aggregated in MockNodeArgs for easier subclassing
206
+
207
+
* MockNetwork.Factory has been retired as you can simply use a lambda
208
+
209
+
* testNodeConfiguration has been retired, please use a mock object framework of your choice instead
210
+
211
+
* MockNetwork.createSomeNodes and IntegrationTestCategory have been retired with no replacement
212
+
213
+
* Starting a flow can now be done directly from a node object. Change calls of the form ``node.getServices().startFlow(...)``
214
+
to ``node.startFlow(...)``
215
+
216
+
* Similarly a tranaction can be executed directly from a node object. Change calls of the form ``node.getDatabase().transaction({ it -> ... })``
217
+
to ``node.transaction({() -> ... })``
218
+
219
+
* ``startFlow`` now returns a ``CordaFuture``, there is no need to call ``startFlow(...).getResultantFuture()``
220
+
221
+
68
222
V1.0 to V2.0
69
223
------------
70
224
@@ -403,4 +557,4 @@ Finance
403
557
404
558
* Adjust imports of Cash flow references
405
559
* Adjust the ``StartFlow`` permission in ``gradle.build`` files
406
-
* Adjust imports of the associated flows (``Cash*Flow``, ``TwoPartyTradeFlow``, ``TwoPartyDealFlow``)
560
+
* Adjust imports of the associated flows (``Cash*Flow``, ``TwoPartyTradeFlow``, ``TwoPartyDealFlow``)
0 commit comments