Release 0.84.0
In deon-value-check
, package com.deondigital.runtime
has been renamed to com.deondigital.runtime.valuecheck
Rename the relevant imports. For example:
import com.deondigital.runtime.checkValueType
is renamed to:
import com.deondigital.runtime.valuecheck.checkValueType
and similarly for other classes and top-level functions from deon-value-check
.
In deon-api-arbitrary
, package com.deondigital.api
has been renamed to com.deondigital.api.arbitrary
Rename the relevant imports. For example,
import com.deondigital.api.arbitraryString
is renamed to:
import com.deondigital.api.arbitrary.arbitraryString
and similarly for other classes and top-level functions from deon-api-arbitrary
.
In deon-language-runtime
, package com.deondigital.syntax.reified
is renamed to com.deondigital.syntax.reified.converters
Rename the relevant imports. For example,
import com.deondigital.syntax.reified.ContractConvertingReifier
is renamed to:
import com.deondigital.syntax.reified.converters.ContractConvertingReifier
and similarly for the other converter classes from deon-language-runtime
.
In deon-serialization
, package com.deondigital.test.assertions
is renamed to com.deondigital.test.assertions.messagepack
Rename the import of assertCodecIsExhaustive
:
import com.deondigital.test.assertions.assertCodecIsExhaustive
to:
import com.deondigital.test.assertions.messagepack.assertCodecIsExhaustive
gradle-sic-plugin
output file changed
gradle-sic-plugin
uses the CSL sic
utility to generate Kotlin code for type safe interaction with instantiated CSL contracts.
In addition to this, it also compiles the CSL code so that it can be read by the CSL runtime (and therefore by the CSL CorDapp).
The filename of the compiled CSL code has changed from <sicNamespace>.definitions.zip
to <sicNamespace>.declaration.cslpkg
.
This change should be transparent to application code, but in case you do have scripts or other code that refers to this file directly, you will need to update the filename.
sic
targets replaced by sub-commands
The CLI for sic
has been changed so it now supports two sub-commands: generate
and compile
.
The sic
targets Kotlin
and TypeScript
are available under the generate
sub-command.
The sic
targets CoreAST, Signature, Ontology
and MetaData
have been removed in favour of the compile
sub-command which produces a .cslpkg
which contains the output of all four of the above mentioned targets.
Unless you call sic
directly, you should not be affected by this change.
sic
JSON/MessagePack output support removed
Since sic
now only supports compiling to the cslpkg
format, the --msgpack
flag has been removed.
This flag used to control whether the low-level compilation targets such as CoreAST
outputted JSON or MessagePack.
Since these targets are removed, the flag no longer makes sense.
ClasspathCslCordaAttachment
constructor changed
Previously, ClasspathCslCordaAttachment
required you to give a class in the namespace of generated sic code as the constructor argument.
Instead, you must now directly give the resource path to the cslpkg
file on the classpath.
If you use gradle-sic-plugin
this path is available as a static property on the generated ContractDetails
class, e.g. PingpongModule.cslPkgLocation
.
com.deondigital.core.logging
has been moved
The package com.deondigital.core.logging
has been moved to a separate project.
To keep using it, add the following dependency:
implementation group: 'com.deondigital', name: 'slf4j-lazy', version: '1.0.0'
And rename the imports
import com.deondigital.core.logging.debug
to:
import com.deondigital.logging.debug
com.deondigital.benchmarkingutils
has been moved
The package com.deondigital.benchmarkingutils
has been moved to a separate project.
To keep using it, add the following dependency:
implementation group: 'com.deondigital', name: 'benchmarking-utils', version: '1.0.0'
com.deondigital.pretty
has been moved
The package com.deondigital.pretty
has been moved to a separate project.
To keep using it, add the following dependency:
implementation group: 'com.deondigital', name: 'pretty-print', version: '1.0.0'
com.deondigital.api.serialization
has been moved
The library for (de)serialization to and from JSON and MsgPack has been moved to a separate project. To keep using it, add the following dependency:
implementation group: 'com.deondigital', name: 'serialization', version: '1.0.0'
And rename the imports
import com.deondigital.api.serialization.*
to:
import com.deondigital.serialization.*
com.deondigital.core.WrappedByteArray
has been moved
WrappedByteArray
has been moved to the serialization project.
Update your imports
import com.deondigital.core.WrappedByteArray
to:
import com.deondigital.serialization.WrappedByteArray
CSL Corda anonymization behaviour changes
On Corda, it is recommended that the identities of participants in a state are anonymized, such that the state and its backchain can be verified by a third party without revealing the identities of the participants.
Previously, anonymization of CSL contract participants could be toggled per contract using boolean flags to e.g. InstantiateContractAnswer.Authorize(anonymize = true)
.
This is no longer possible, and participant anonymization is the only behaviour.
This change has made it possible to streamline the Corda CSL API by abstracting away the anonymization, thereby removing several complicated error paths.
Relatedly, the isConfidential
flag has been removed from CordaAgent
.
This flag used to control whether the CSL Corda layer would de-anonymize an agent’s public key before passing it to the CSL runtime.
However, this flag had complex interactions with different anonymization strategies, and complicated the API unneccesarily.
Now, you can no longer control (de)anonymization of individual agent values. Instead, the strategy is simple: All agent values referring to the participants of a contract are converted to their anonymous keys before they are passed to the runtime. When extracting agents from a contract through reports or other means, participants’ agents are always deanonymized. All other agents are not touched by the CSL Corda layer.
As a consequence, several properties and methods related to anonymized agents have been removed. See the changelog for the full list.