Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.74.0 - 2021-02-18¶
Added¶
- New types for working with calendars and time:
Period
,Year
,Month
,YearMonth
,Date
,Time
,DateTime
,ZonedDateTime
andZoneOffset
. - Added support for terminating contracts on Corda.
- Added support for the 1/1 day count convention.
Fixed¶
- New implementation of the Actual/Actual ICMA day count convention
- Fixed bug in
ExecuteOperationsFlow
in Corda that allowed event applications on behalf of an agent who is not the proposer of the transaction when combined with contract instantiations. - Fixed bug in
RestContractOperations.execute
where exceptions were not serialized correctly. - Type checking in atomic operations.
Changed¶
- The
DateTime
type has been renamed toInstant
. There is still aDateTime
type, but it is different from the old one. - Simplified core representation of template definitions.
- Make use of explicit functions to construct a runtime representation from an entrypoint and a list of values instead of relying on building up a contract AST.
- Don’t store contract AST in DbLedger in the
Contracts
table. - Made sidebar in the demo webapp scroll independently of the CSL editor.
- Changed instantiation arguments to be a single value instead of list
EntryPoint
,instantationArgument
andinstantationTime
have been moved toinstantationDetails
in theContract
object ofDeonAPI
.
0.73.1 - 2021-02-15¶
Fixed¶
- Fixed a bug that prevented applications to upload attachments to Corda nodes twice.
- Made the artifact produced by the Gradle
sic
plugin byte-for-byte reproducible.
Changed¶
- Use compiled declarations for named reports instead of recompiling.
0.73.0 - 2021-01-20¶
Added¶
- A CorDapp example showing integration between a CSL contract and the Corda Token SDK.
- Added support for terminating contracts on DBLedger, which disallows applying further events on the contract.
- Entrypoints must no longer be specified as a template. The form
contract entrypoint main = ...
is now accepted.
Fixed¶
- Type checking of contract instantiations has been fixed on Corda. Templates with missing
entrypoint
were previously accepted but are now rejected. Entrypoints using the new contract lambdas for taking instantiation parameters were previously rejected, but are now accepted.
Changed¶
- The Gradle
sic
plugin now has the plugin idcom.deondigital.gradle-sic-plugin
. This is the name that should be used in anapply plugin:
section in a Gradle build script. - The Gradle
sic
plugin no longer builds a fat jar that includescsl-cordapp
andcsl-contracts-states
. Instead, only the generated code and AST are included in the built jar. - The demo webapp now has a drop-down with all entrypoints in a CSL declaration. Each entrypoint has a set of input forms derived from its parameter types for setting instantiation arguments.
- All internal serialization has been changed from JSON to the binary MessagePack format. This improves serialization and deserialization of contract state by an order of magnitude.
- QueryMonitor now responds to contract authorization requests from the query service (e.g., instantiation) in a non-blocking fashion and using its own threadpool to prevent concurrency issues.
0.72.0 - 2020-11-24¶
Added¶
- Added the functions
Math::ceiling
,Math::floor
, andMath::round
to the standard library. - Added support for atomic execution to DbLedger.
- Added the conversion
Float::toInt
to the standard library. - Templates can now specify contract parameters that are contract functions.
Changed¶
- Guarded recursive contract definitions are now allowed.
- Template application now requires the contract-parameter list to be given. Previously, given
template T x = ...
you could applyT
withT 42
, omitting the empty list of contract arguments. Now, you have to writeT[] 42
. - Integers are now 64 bits, extending their range to the interval [-9223372036854775808, 9223372036854775807].
- Subdivided the com.deondigital.cordapp package namespace into states, flows, services, resources, client subpackages.
- Optimized execution of Corda flow (
ExecuteOperationsFlow
) to minimize overhead of copying ledger state and parsing non-essential declarations.
0.71.0 - 2020-11-05¶
Added¶
- Added a QueryMonitor class for handling contract instantiation requests in sic-generated Corda applications.
- The
deon-project
file format now allows single-line comments starting with#
. - You can now write contract-lambdas with pattern matching.
Fixed¶
- Fixed a bug in the
gradle-sic-plugin
which made it impossible to fetch dependencies that it injected into projects.
Changed¶
- Template expression parameter syntax changed from
(a, b, c)
toa b c
. The current syntax is still valid but denotes a tuple parameter instead.
0.70.0 - 2020-10-16¶
Added¶
- CordaLedger now supports specification of groups of operations (contract instantiations and event applications) atomically iff the operations span the same participants and notary.
- CordaLedger now supports both anonymous and non-anonymous participants in contracts.
- All contract instantiations in CordaLedger now require authorization by the client and are not automatically accepted as before.
- The
sic
gradle plugin now tracks changes to CSL files. sic
can now open the “file”-
which causes it to read from stdin.- Added support for instantiating
Sum
andRecord
types to the webapp. - Added support for empty tuples.
- Added the Unit type as an alias to the empty tuple.
- The DbLedger can now distribute events and contracts to other read-only “subscriber instances” of DbLedger.
- Added a new Maven package
com.deondigital.sic
which wraps the sic binary for easier use in JVM based projects.
Fixed¶
- Improved performance of the internal cache representation of events in DbLedger.
- Corrected an issue with CSL project files not having trailing whitespace.
- Fixed a bug in
sic
/Kotlin that made it impossible to instantiate entrypoints inside amodule
. - Fixed a bug in the automatically generated equality functions for types involving a
typealias
parameter. - Fixed a bug in
sic
/Kotlin that caused the generated code to crash the Kotlin compiler when a sufficiently long CSL source text was embedded.
Changed¶
- Renamed the built-in type
Contract
toContractInstance
. - Going forward, .jar artifacts are no longer published with a prefixed
v
or-SNAPSHOT
modifier. - Published .jar artifacts have been moved from nexus.deondigital.com to the Gitlab package registry. This requires an update to all build credentials.
0.69.0 - 2020-09-18¶
Added¶
- The DbLedger now maintains a hash-chain on all events it stores to make it less easy to tamper with the underlying database.
Fixed¶
- Fixed a bug that caused the DbLedger to not persist participant IDs correctly.
0.68.0 - 2020-09-10¶
Added¶
- The standard library now has
String::isEmpty
function. - Built-in
Set
data type with accompanying standard library functions. - A new API end point
/contracts/{id}/residual
has been added which can be used to examine the current state of a contract. EventPredicate
now contain aresidualContract
and corresponding environment, describing the state of the contract after the event is applied.- The Corda contract manager now supports changing the set of participants in a running contract. A flow for this purpose can be instantiated from the API.
- The type checker will now emit warnings on unused local
val
,contract
, andtemplate
definitions.
Fixed¶
- Fixed a bug where
CordaLedger.contractId
was not initialized with contracts that had one or more events applied. - Fixed a bug in the runtime value type checker that made it not check
Map
values. - Removed the
tagOrNull
override in thejsonCodec
forContractUpdate
as it was dead code, after an update to thewebapp
which fixed an issue with needing a refresh after instantiating a contract.
0.67.0 - 2020-08-10¶
Added¶
- Added methods for subscribing to contracts and events added on Corda.
Changed¶
- Corda flows to collect signatures and generate new identities have been optimized to improve performance of contract instantiation and event application.
- ContractOperations.getInstance now returns
null
when no instance is found instead of throwingContractInstanceNotFound
and throwsContractInstanceWrongType
when trying to get contract as typeA
when the instance is actually of some other typeB
.
0.66.0 - 2020-06-26¶
Added¶
sic
-generated Kotlin classes for CSL datatypes now contain customtoString()
methods.
Changed¶
- DbLedger now supplies the triggering event in the
contractUpdated
callback. CordaLedger
now caches contract ids so it will not fetch all initial states on each report.- Corda contract manager: Corda was upgraded from 4.4 to 4.5.
Fixed¶
- Fixed a bug where pagination errors appeared during contract event application when the number of contract instances in the ledger exceeded the default page size (200).
0.65.0 - 2020-06-19¶
Fixed¶
- Fixed bug where the exception
CannotApplyEvent
only contained the messagenull
instead of the list of errors. This makes log messages more useful.
Changed¶
- Corda contract manager: Agents returned from reports are now identified by their well-known keys instead of their confidential (randomized, pseudonoymous) keys.
- Corda contract manager: Applications can now run reports in a mode where agents are compared by their well-known identities instead of their confidential keys.
0.64.0 - 2020-05-28¶
Fixed¶
- Fixed bug where
sic
generated TypeScript would generate differentCordaAgent
type than used inapi-client
.
Changed¶
- DBLedger no longer checks for visibility/existence of contract-id values in inputs to reports. This is consistent with the behaviour on Corda.
- The demo webapp now has UI components for creating CSL
Map
s. The UI components for CSLList
andBool
have been improved.
0.63.0 - 2020-05-20¶
Changed¶
- Contracts and events on the DBLedger are now only visible to peers that are participants of the contract.
- The REST API has been split up into an anonymous API with endpoints that do not need the identity of the caller, and an identified API that does need it.
Fixed¶
- Fixed a bug where
sic
generated TypeScript would crash at runtime due to circular imports. - Fixed a bug where
SecureHash
inCordaEntity
was not serialized correctly. This broke contract validation for contracts containing contract ids.
0.62.0 - 2020-05-07¶
Added¶
sic
generated TypeScript now includes aCordaAgent
variant ofAgent
.
Removed¶
- The “AST view” in the demonstration webapp has been removed.
- The
/contracts/{id}/tree
API endpoint has been removed.
Changed¶
sic
now generates a structuredAgent
object for TypeScript instead of astring
for CSLAgent
.
Fixed¶
- Fixed a bug related to Kryo serialization where a Corda node would crash while suspending a flow trying to persist the stack frame.
0.61.0 - 2020-04-29¶
Added¶
- Support for fully validating contract manager on Corda that keeps the full contract state on the ledger and checks for event validity on every event application.
- Support for batched application of CSL commands (instantiation and event application). Currently only batched event application are exposed by flows.
- Support for versioning, indexing and querying on contract state fields.
- Internal integration tests in
cordapps
that test contract verification, flows, vault storage and querying. - It is now possible to publish generated CorDapps locally to make the development process simpler.
Removed¶
- Unused resources model.
Changed¶
cordapp-examples
do not use relocation any more.- Simplified the implementation of the caches, flows, vault storage and retrieval functionality.
Fixed¶
- Corrected a bug in the
gradle-sic-plugin
that caused it to fail when project files lacked a trailing newline. - Corrected a bug in the
gradle-sic-plugin
that caused it to deadlock sometimes on MacOS.
0.60.0 - 2020-04-15¶
Changed¶
- Upgraded Corda target platform from 4.0 to 4.4.
- TypeScript code generated by
sic
no longer addsequals
/hashCode
methods onObject.prototype
. - Significant performance improvements to the evaluator and contract executor. Tail-recursive contracts no longer get slower over time.
Fixed¶
- Fixed a bug related to Kryo deserialization where a Corda node would crash if resuming a flow from a persisted snapshot.
- Fixed a bug in the derivation of derived equality functions that caused runtime exceptions when one derived an equality function for a constructor with fixed type parameters.
0.59.0 - 2020-03-27¶
Changed¶
- The TypeScript code generated by
sic
now has better support for theimmutable-js
data structures, in particular theimmutable.Map
that CSL maps are represented as. sic
generated contract operations for DbLedger now returns tags when applying events.- Event agents are now validated against contract participants on DbLedger.
Fixed¶
- The automatically generated equality functions do not depend on the standard library anymore.
0.58.0 - 2020-03-09¶
Added¶
sic
now generates TypeScript classes for template entrypoints, including a staticinstantiate
method.
Changed¶
- CSL reports that are called externally (with, e.g.,
sic
) must be marked with the newreport
keyword. - Contract templates that are used as entrypoints (from, e.g.,
sic
) must be marked with the newentrypoint
keyword. - Event application on the DbLedger through the API now always return a tag. Previously it was only when a tag was included in the input.
Fixed¶
- Corrected a substitution bug the in report query language that caused wrong results whenever a variable unified with a term which itself contained variables.
- Corrected an issue in DbLedger that caused wrong external symbols to be used in event application.
0.57.0 - 2020-02-21¶
Added¶
- The
deondigital/vitznauerstock
Docker image now includes drivers for PostgreSQL. sic
now exposes a fieldinstantiationTime
onContractInstance
objects.- The TypeScript code generated by
sic
now contains copy methods with named parameters for classes which represent CSL records. - Built-in
Map
data type with accompanying standard library functions. sic
now generates Kotlin classes for template entrypoints, including a staticinstantiate
method.
Changed¶
- The performance and disk usage of the DbLedger backend has been improved.
0.56.0 - 2020-02-10¶
Added¶
- The Deon webservice now has the endpoint
/declaration/{id}/namedReport
for invoking a report in a declaration by its qualified name and a list of value arguments.
Changed¶
sic
now reports aContractInstanceNotFound
instead of a general exception if a non-existing contract id is used ingetContractInstance
.- the
sic
typeContractInstance
now includes a function for retrievingnextEvents
for a contract. nextEvents
now include the event predicate and agent as anExp
type.
Fixed¶
- Corrected a bug in the type checker that caused it to fail to reject
=
on records that contained fields for which we cannot use=
. - Corrected a bug that caused lists that are returned from queries to be wrongly encoded, thereby causing runtime errors.
0.55.0 - 2020-01-28¶
Added¶
- Signature backend to
sic
that emits as JSON the types of all top-level declarations.
Changed¶
- The API endpoints for running reports have been moved from
/contracts/{id}/report
(/contracts/report
) to/declarations/{id}/report
(/declarations/report
), reflecting the fact that running a report requires just the declaration, not an instantiated contract. - The object that represents an instantiated contract now includes the peers that were specified on instantiation.
Fixed¶
- Fixed a bug that caused the surface-to-core translation to crash if one used
=
on a type alias for a built-in type.
0.54.0 - 2020-01-15¶
Added¶
sic
and thegradle-sic-plugin
now supportdeon-project
for Corda and Kotlin.
Changed¶
- The equality operator
=
now works on any closed type that does not contain function orSigned
types.
Removed¶
- The standard library functions
Int::equals
,Float::equals
,String::equals
, andDateTime::equals
have all been removed.
0.53.0 - 2020-01-09¶
Added¶
- New asynchronous API client.
Changed¶
- Update the
RESTContractOperations
generated bysic
to use the asynchronous API client. - Reports and contract entrypoints that can be called from the outside must have monomorphic types.
Fixed¶
- It is now possible to pass record values that are subtypes of the expected argument value to reports and template instantiations.
0.52.0 - 2019-12-03¶
Added¶
- CSL now supports type annotations on top-level
val
declarations:val x : Int = 42
.
Changed¶
- The
sic
emitters for Kotlin and Corda now generate wrapper classes for the ledger-specific representations ofAgent
andContractId
to make it possible to use the same code on top of both DBLedger and Corda. - The API type
Contract
now contains the fieldsentryPoint
andinstantiationArguments
. - The
sic
emitters for Kotlin and Corda generate theContractOperations
interface andRESTContractOperations
/CordaContractOperations
implementations which can be used to interact with thesic
-generated contract API in a ledger-agnostic way.
0.51.0 - 2019-11-22¶
Added¶
- The TypeScript code generated by
sic
now contain factory methods for creating objects with named parameters. - The Kotlin code generated by
sic
now contains copy methods with named parameters for classes which represent CSL records. - CSL now supports type aliases:
typealias MyType a = Tuple a Int
.
Changed¶
- Ontology backend to
sic
was changed to output only type definitions instead of the internal contract descriptors ofsic
. - Code generated by
sic
now inspects API values for their actual types when deserializing, instead of statically deserializing values to their indicated type. This means that a recordMyEvent
can be correctly deserialized from a value that is statically typed asEvent
but dynamically tagged asMyEvent
. - The
gradle-sic-plugin
has been updated to better handle multiproject builds.
0.50.0 - 2019-11-08¶
Changed¶
- The
csl-plugin
has been removed. It is superseded by the new gradle plugingradle-sic-plugin
. sic
output is now available when using--info
with the gradle plugin.
Fixed¶
sic
no longer generates optional parameters for the TypeScript target which caused problems when mixing optional and required parameters.
0.49.0 - 2019-10-29¶
Added¶
- New record extension syntax for carrying over some of the fields of an existing record into a new one:
R { use x with a = 1, b = 2 }
.
Fixed¶
- Corrected a bug that prevented instantiation of contracts with
sic
generated code on Corda nodes.
0.48.0 - 2019-10-24¶
Added¶
DateTime::dayCountFraction
can now handle theAct/Act ICMA
convention.
Fixed¶
- Corrected a bug in
toContractAST
that caused a crash when working with nullableor
branches.
Changed¶
- The concept of “pseudo value” has been removed in favor of “external objects”. Bound names are no longer to be specified for agents, contracts, etc. represented as CSL values.
- The
DateTime::dayCountFraction
function now only takes one parameter. The usualfrom
andto
parameters should now be applied to the convention constructor. I.e.DateTime::dayCountFraction (DateTime::ActActISDA #2007-12-28# #2008-12-28#)
.
0.47.0 - 2019-10-10¶
Fixed¶
- Corrected a bug in
DayCountFraction
calculations that occurred when start and end dates are in the same year. - Fixed a bug in
sic
that caused it to not generate code for reports and entry points that use one of the built-in types as input or output types:Ordering
,DateTime::DayOfWeek
,DateTime::Components
,DateTime::DayCountFraction
,Event
,Duration::Components
,RuntimeError
.
0.46.0 - 2019-09-27¶
Removed¶
- The
sic-maven-plugin
has been removed. It is superseded by the gradle plugincsl-plugin
. - The standard library function
getEvents
has been removed.
0.45.0 - 2019-09-03¶
Fixed¶
- Corrected a bug in
DateTime::dayCountFraction
.
Changed¶
- Renamed
DateTime::dayCountFraction
conventionThirty360ISMA
toThirty360ICMA
.
Added¶
- A list of past events was added to the contract view in the webapp.
0.44.0 - 2019-09-03¶
Added¶
- Added the standard library function
DateTime::dayCountFraction
that calculates Day Count Fraction for a number of conventions.
Changed¶
- The
sic
“JSON” emitter has been renamed to “CoreAST”.
Fixed¶
- Corrected a bug in the publication settings for one of the JAR dependencies which caused the generated CorDapps to break.
0.43.0 - 2019-08-19¶
Added¶
- Ontology backend to
sic
that emits as JSON the intermediate contract descriptor used by thesic
emitters.
Changed¶
- The
sic
-generated Kotlin code does not generate aninterface
with*Impl
class implementations, but just the class implementations directly without the*Impl
suffix. - The structure in multi-file
deon-project
s is now more closely reflected insic
-generated TypeScript/Kotlin code. - Both the TypeScript and Kotlin code generated by
sic
introduces anaddDeclaration
function for putting a CSL declaration on the ledger. The instantiation classes now require a declaration id in their constructors. - When
sic
outputs the JSON-representation of an AST to standard out it does not include the separator strings that are invalid JSON.
Fixed¶
- Corrected a bug in the build setup that rendered the Maven-published JAR of
deon-api-client
unusable.
0.42.0 - 2019-08-05¶
Added¶
- The LSP server now supports go to definition.
- Added an endpoint
contracts/<contractID>/events
to get the event that have been applied to a contract.
Changed¶
sic
now writes multiple files instead of merging everything into one file. Dependencies onsic
generated files will have to be updated accordingly: For TypeScript, the files are renamed; and for Kotlin projects, the generated namespace has changed.- The helper functions for serialisation/deserialisation generated by TypeScript backend in
sic
have been refactored, sosic
users will need to make a few changes to their TypeScript code. Instead ofmkXValue
andgetX
there are now methodsX.toValue
andX.fromValue
. AlsogetAgent
has been replaced byAgent.fromValue
.
Fixed¶
- Corrected the code that converts
StateTree
based residual contracts to their abstract syntax form.
0.41.0 - 2019-07-10¶
Added¶
- The Visual Studio Code plugin now shows type information on mouse hover.
Fixed¶
- Made sure the Gradle plugin for generating CorDapps includes everything needed to generate them correctly.
- Fixed a bug in the TypeScript emitter of
sic
where records using TypeScript keywords as field names would not function properly.
0.40.0 - 2019-06-28¶
Added¶
- Initial version of the new Datalog-inspired query language.
- Gradle plugin to generate self-contained CorDapps directly from CSL code.
- A new backend to
sic
that emits parsed and compiled CSL syntax as a JSON-file.
Changed¶
- Upgraded Corda to 4.0.
- Upgraded Kotlin runtime to 1.2.
Removed¶
- The generic Corda ledger backend has been removed.
- The Hyperledger Fabric ledger backend has been removed.
- The special treatment of
Evidence
records has been removed from the Corda backend. - The example oracle implementations have been deleted.
- The
InMemory
backend has been removed. It’s superseded by theDbLedger
backend.
Fixed¶
- Fixed an issue where the service would fail in an unexpected way when fed with certain invalid
DateTime
s. - Fixed an issue where in some cases the type checker would not report error messages in expressions involving records.
0.39.0 - 2019-04-26¶
Changed¶
- Added support for simple simplifications of contracts. The simplifications are used for the contracts presented in the webapp in the “Actions” and “Viewer” tab.
Fixed¶
- Fixed an issue where lists in events (records) constructed from the webapp would not be handled correctly.
- Fixed an issue where the type checker would allow complex patterns at top-level. This is no longer allowed as it was in the old type checker.
0.38.0 - 2019-04-11¶
Fixed¶
- Fixed an issue with floating point equality where numbers were not normalized.
- Functions can now be serialized which makes it possible to call templates with functions as arguments.
Changed¶
- Contracts are now represented more efficiently on the ledger.
- The evaluator uses a new approach with a global environment instead of closures.
0.37.0 - 2019-04-10¶
Fixed¶
- Fixed an issue with floating point arithmetic operations where they would not use decimal128 rounding.
0.36.0 - 2019-04-09¶
Fixed¶
- Fixed an issue where the type checker would crash instead of reporting an error when a constructor pattern missed an argument.
- Fixed an issue where the language server would report errors in the wrong file.
Changed¶
- The underlying representation of floating point numbers was changed to decimal128 from binary64, allowing more exact financial calculations.
0.35.0 - 2019-04-05¶
Fixed¶
- Fixed an issue where a unary minus was not pretty printed correctly.
- Fixed an issue with applying events to contracts with inner lets
Changed¶
sic
for TypeScript now generates classes instead of type aliases for records.
Removed¶
- Removed the
corda-light
ledger backend. It was not being used and was obstructing further developments and randomly failing CI.
0.34.0 - 2019-03-21¶
Fixed¶
- Fixed an issue in the new type checker where record projection, upcast and type case did not work as expected in certain cases.
0.33.0 - 2019-03-21¶
Changed¶
- The type checker was replaced. It reports multiple error messages and returns an AST annotated with types.
0.32.0 - 2019-03-15¶
Changed¶
- The
sic
tool now shows warnings on the console when it cannot generate entrypoints. - We now disallow shadowing of names in CSL. Shadowing is only disallowed within each name kind. That means value expression names cannot shadow other value expression names but contracts and values can still use the same name.
0.31.0 - 2019-03-12¶
Fixed¶
- Fixed a bug that caused a significant slowdown when evaluating some reports.
Changed¶
- Record types in
sic
-generated code implements the subtyping hierarchy of the CSL source with native target language constructs.
0.30.0 - 2019-03-07¶
Fixed¶
- Fixed an issue that caused the project structure of
deon-project
files to not be respected in some scenarios. - Fixed a bug in the webapp where it would crash when adding a boolean argument to a report.
- Fixed an issue in the webapp where the wrong declarations were used for instantiating contracts in certain cases.
Changed¶
- The contract composer in the webapp has a new layout.
0.29.0 - 2019-02-26¶
Added¶
- Added
sic
-support fordeon-project
files.
Fixed¶
- Fixed a bug that caused type errors in
sic
-generated TypeScript code with tuples. - Fixed a bug that caused
/simplify
to crash on certain combinations of contract-parameters and pseudo-syntactic values. - Fixed a bug in the agent matching algorithm that made it problematic to have agents with numbers in their name, such as
agent1
andagent2
. - Fixed a bug in the webapp that prevented instantiation of contracts with multiple contract ID parameters.
- Fixed a bug in the webapp that made it crash when attempting to provide a
DateTime
argument to a report. - Fixed a bug in the webapp where the contents of AST nodes could overflow if it was too large - now the full content will only be visible when the mouse is hovering over the node.
Changed¶
- Declarations are identified by content hashes (SHA-256) instead of UUIDs.
- Upgraded Fabric to version 1.4.
- The data model for check errors (type errors, parse errors, etc.) has changed. See OpenAPI specification for the new model.
0.28.0 - 2019-01-15¶
Added¶
- Add support for heterogeneous tuple values in CSL.
- Added support for event tags in
sic
. Kotlinsic
users will need small adjustments to their code.
Fixed¶
- Fixed an issue with serialization of websocket values.
- Fixed a performance issue in the
/contracts
endpoint that caused it to compute a lot of unnecessary data.
Changed¶
- Updated the cache policy for static resources such as documentation and examples to prevent browsers from showing outdated versions.
- Updated webapp to react 16.7.0
- Changed default database backend from H2 to SQLite for the DBLedger.
0.27.0 - 2018-12-13¶
Fixed¶
- Fixed duplications of agents on agent list on Fabric.
- Fixed too liberal type checking of signed data.
Changed¶
- Upgraded Corda to version 3.3.
- Removed dependency on Jackson and improved performance of JSON serialization.
0.26.0 - 2018-12-03¶
Added¶
- Added support for signing of structured data.
Fixed¶
- Fixed an issue with instantiation with pseudo-syntactic values in records or lists.
Changed¶
- Updated API specification to OpenAPI 3 format. The specification endpoint is changed from
/v2/api-docs
to/openapi.json
.
0.25.0 - 2018-11-22¶
Added¶
- Added the power and square root functions;
Math::pow
andMath::sqrt
to the standard library.
Fixed¶
sic
: Fixed a bug in the conversion of values in the TypeScript backend.- Fixed broken link to PDF language guide in the HTML language guide.
- Corrected an error in the UI Actions tab.
0.24.0 - 2018-11-19¶
Changed¶
sic
: It is no longer necessary to wrap contract ids in the Kotlin interface for reports and event application.- Changed layout of instantiation screen to handle templates with many arguments in the UI.
Fixed¶
- Fixed a bug that caused the Kotlin API client to break when it was initialized with a request timeout.
- Fixed a bug when serializing durations with jackson.
0.23.0 - 2018-11-07¶
Changed¶
sic
: Event application functions in Kotlin and TypeScript are no longer lower-cased but follow the capitalization of their CSL types.
Fixed¶
- Fixed a bug in the TypeScript backend to
sic
that caused reports that returnPair
orMaybe
values to fail at runtime. - Fixed a bug with event application that would sometimes cause a “variable not found in environment” error.
- Fixed a bug in the Kotlin backend to
sic
where the result would not compile when agents were compared.
Removed¶
- The “Apply Event as Text” button has been removed from the webapp because it is no longer possible to construct an event value within the syntax of the language.
0.22.0 - 2018-10-10¶
Added¶
- A new instantiation argument which resolves to the id of the instantiated contract has been added.
- The Visual Studio Code extension now supports projects spanning multiple CSL files (see the plugin’s README for more information).
- Tutorial section about the tool
sic
to the language guide.
Fixed¶
- Fixed a bug that caused Corda nodes to fail when using lists in events.
Changed¶
- Agents in contracts are no longer strings, but are abstract values issued by the ledger. Use the new
/agents
API to retrieve the available agent values. - It is no longer possible to use the special variable
events
to refer to the events of the contract instance; usegetEvents
instead. Contracts::getEvents
has been renamed togetEvents
.- It is no longer possible to redeclare top-level value bindings.
- Contract ids are no longer strings but instead abstract values of the type
ContractId
that cannot be constructed in syntax.
0.21.0 - 2018-09-21¶
Added¶
- Web UI: Contract ID selector in “Reports” tab.
- It is now possible to specify a separate
peers
list for each contract instantiation in the code generated bysic
.
Fixed¶
- Fixed a bug where the webapp could not apply events containing data with qualified sum types.
- Fixed a bug in
sic
that caused empty CSL records to be handled wrong.
0.20.0 - 2018-09-14¶
Added¶
- Lightweight implementation of Corda adapter where the notary is only used to ensure consensus on the ordering of events for contracts and not validity of the sequence of events.
- Added ISO 8601 compliant syntax for duration literals.
- Added built-ins and standard library functions for working with durations.
Fixed¶
- Cucumber: ContractIDs are replaced in the expected results of Report tests.
- Fixed a bug in the scoping of event bindings in prefix expressions.
0.19.0 - 2018-08-31¶
Added¶
- TypeScript backend to
sic
. - Upgraded Corda to version 3.2.
- Upgraded Fabric to version 1.2.
- Added support for Fabric in deployment-tool.
- Support for batching in Kotlin-client.
Changed¶
- It is now only possible to query
Contracts::getEvents
on contracts that are instantiated from the same declaration ID as the caller. - Updated the formatting and structure of the CSL language guide and reference.
Fixed¶
- Fixed a bug where agents represented by variables could be shadowed by bound event names.
- Fixed a bug in the serialization of contracts.
- Fixed a bug in
sic
that caused Kotlin code generated from CSL that usedFloat
s to break. - Fixed a bug in
sic
that caused it to generate invalid code due to keyword name clashes. - Fixed a bug in the corda-adapter that could break the client-to-node communication under high load
0.18.0 - 2018-08-13¶
Added¶
- Deployment tool.
- The code generation tool
sic
for automatically generating a Kotlin interface for a CSL contract.
Changed¶
- Upgraded Corda to version 3.1.
Fixed¶
- Fixed a bug that crashed the UI if the residual contract could not be computed.
- Fixed a bug where lists of events could not be converted from the internal to the external representation in some cases (like
List::append events events
). - Fixed a bug in the web UI where events could not be applied as raw text.
0.17.0 - 2018-06-25¶
Added¶
- The API methods
/contracts
and/contracts/{id}
now return the instantiation time of the contract. - The standard library now has a
Maybe::bind
function. See the documentation for details. - A built-in function
error : RuntimeError -> a
has been added.
Changed¶
- The API methods
/contracts/report
and/contracts/{id}/report
now accept an optional list ofValue
s that can be used as arguments for reports that take parameters.
Fixed¶
- A bug which caused the type checker to refuse references to previously declared templates from locally defined templates has been fixed.
- A bug where the simplifier would cause run-time errors to disappear has been fixed.
- Corrected a bug where server side errors could break the UI.
0.16.0 - 2018-06-05¶
Changed¶
- The syntax for declaring contracts, templates and values has been changed. Recursive contract templates now have to be explicitly marked as so, and mutually recursive templates must be declared together. See the language guide for more information.
- The
Add event
button has been removed from theViewer
menu as it duplicates the functionality onActions
. Events can be added as raw text fromActions
now. - Removed the API method
/parse-value
that was equivalent to/report
in taking an expression as string and returning aValue
. - Renamed the
/contract/{id}/simplified
endpoint to/contract/{id}/src
endpoint and added an optional parametersimplified
such that/contract/{id}/src?simplified=true
returns the simplified residual contract and/contract/{id}/src
returns the non-simplified residual contract.
Fixed¶
- Fixed an issue in the (Kotlin) implementation of
apply
that could result in a crash from a stack overflow.
0.15.0 - 2018-05-28¶
Added¶
- The UI now displays the current version number.
Changed¶
- Performance of the CSL parser has been improved.
- Performance of report and expression evaluation has been improved.
- The endpoints
/check
,/check-expression
, and/parse-value
will now run type check on successfully parsed declaration parts even if there is a parse error later.
Fixed¶
- Fixed a bug where the Visual Studio Code plugin was not in contact with the parser and type checker.
0.14.0 - 2018-05-17¶
Added¶
- The standard library now has
List::isEmpty
function.
Fixed¶
- The in-memory ledger and database-backed ledger backend now correctly handle tagged event application.
Changed¶
- The Node.JS and web REST clients now support optional tags for
applyEvent
. - Performance of the
/checkEvent
endpoint has been improved.
0.13.0 - 2018-05-14¶
Added¶
- Events are now type checked before being applied to contracts.
- The web editor now supports comment toggling with
Cmd-/
orCtrl-/
. - Standard library function
DateTime::dayOfWeek
that gives the day of week (DateTime::DayOfWeek
) for aDateTime
.
0.12.0 - 2018-05-07¶
Added¶
- The ontology for a CSL program now includes sum types in addition to record types.
- New event input form in “Actions” tab.
- New database-backed ledger backend with support for H2 and SQLite.
- Node.js REST client.
- Added new endpoints to submit contracts and events in batches for faster execution
- Convenience function to JavaScript SDK for handling
Value
objects as JSON data.
Fixed¶
- Fixed a bug where applying many events to a contract could cause an exception.
- Fixed some bugs where a couple of endpoints in the API client NPM package did not work.
- Fixed bug where contract instantiation would result in an illegal contract due to a bug in the implementation of scoping.
Changed¶
- Moved endpoint to simulate events, and added the possibility to simulate events across multiple contracts.
- When running reports, the optional parameter for declaration id is now an optional path parameter. The client SDK has been updated to reflect this.
0.11.0 - 2018-04-24¶
Added¶
- Shorthand syntax for
DateTime
literals in CSL. The following all denote the same point in time:#2018#
,#2018-01#
,#2018-01-01#
,#2018-01-01T00#
,#2018-01-01T00:00#
,#2018-01-01T00:00:00#
, and#2018-01-01T00:00:00Z#
. - Added “guardedness check” to ensure that contracts do not contain infinite recursion.
- Support for unary minus.
Fixed¶
- Fixed a bug where the UI’s pretty printing of
DateTime
values were not syntactically valid. - Fixed bug where contract instances in the web app AST view were not simplified.
- Fixed bug where the order of arguments to constructors were reversed when converting from value to expression.
0.10.0 - 2018-04-18¶
Added¶
- Contract abbreviations can now be defined in
let
blocks and top-level definitions. - Contract templates with no contract parameters can now also be defined using the
template
keyword. - CSL extension to Visual Studio Code.
- Node.js package with an API client.
- Contract examples are now available in the UI.
- Report examples in the language guide.
- Added type checking to contract instantiation, preventing you from passing illegal arguments to contracts.
- Added the possibility to run a simulation of event application without modifying a contract on the ledger.
Fixed¶
- Fixed an issue where contract names and module names could be in conflict, thus causing bugs when applying events to those contracts.
- Changed the parser such that ranges of tokens don’t include trailing whitespace.
Changed¶
- It is no longer possible to do comparison of strings like
"a" > "b"
. - Locations in error messages have been improved to be more specific.
0.9.0 - 2018-03-21¶
Added¶
- Standard library extended with
Int::toString
function.
Changed¶
- The
/contracts/{id}/next-events
and/contracts/{id}/tree
endpoints will no longer surround agent matcher with<
and>
.
Fixed¶
- Fixed an issue where result values from report evaluation were not rendered correctly.
- Fixed an issue where cross origin resource sharing (CORS) headers were not included in the webservice HTTP responses.
- Local contract and template declarations would not overwrite global ones in the type checker.
0.8.0 - 2018-03-13¶
Added¶
- The UI now has a link to the OpenAPI (Swagger) documentation for the webservice API.
- Added GET
/declarations/{id}
endpoint to the webservice API. - Reports and values are now type checked.
- Evaluation of reports independently of specific contract instances:
- Added POST
/contracts/report
endpoint to the webservice API for evaluating reports. - “Reports” tab in UI has been updated with option to evaluate reports independently.
- Added POST
- The standard library now has
String::append
function.
Changed¶
- The webservice API has been refactored and documented:
- Input/output models have new names, e.g.
Declaration
andContract
instead ofNamedCSL
andNamedContract
. - Contracts can only be instantiated with a declaration ID - not with a CSL string.
- Contract AST are now retrieved through
/contracts/{id}/tree
. - Next events for contracts are now retrieved through
/contracts/{id}/next-events
. - Endpoints now return HTTP codes 4XX when the input is invalid, e.g., 404 for invalid ID’s, 400 for failed type checking, etc.
- Input bodies are always objects with named fields.
/templates
endpoints are now/declarations
endpoints./peers
and/ledgerInfo
have been merged to/node-info
./csl
is now/csl/check
./parseReport
is now/csl/check-expression
./value
is now/csl/parse-value
./{id}/ontology
is now/declarations/{id}/ontology
./contract/{id}/report
is now/contracts/{id}/report
.- OpenAPI (Swagger) documentation has been updated with examples and data models.
- Qualified named for
Records
,Lists
,types
are now sent as structured objects instead of strings, e.g.A::a
is now{qualifier: ["A"], name: "a"}
.
- Input/output models have new names, e.g.
- The UI now refers to “declarations” instead of “templates”.
Removed¶
- The DELETE endpoints
/contracts/{id}
and/templates/{id}
have been removed from the webservice API.
Fixed¶
- Fixed an issue where a contract could not be instantiated if a type with the same name is present.
- Fixed an encoding issue where some characters could not be used in CSL.
- Fixed a bug in the type checker where sum type constructors inside modules where globally scoped.
0.7.0 - 2018-03-06¶
Added¶
- Structural equality relations for lists of base types added to standard library.
- List shorthand:
[1,2,3]
is shorthand forCons 1 (Cons 2 (Cons 3 Nil))
. - Upcast annotation (
:>
) for records, telling the type checker to consider a record expression as a super record, e.g.DeliveryEvent {...} :> Event
.
Fixed¶
- Fixed issues in relation to expansion of templates.
template[c] Foo() = (<*> E then success) then c
would not work as expected. - Fixed issue where
((<*> E then success) or success) then C
would acceptC
and become((<*> E then success) or success) then success
but it should have become simplysuccess
.
0.6.0 - 2018-02-23¶
Added¶
- The UI now has a link to the language guide.
- The UI now has a link to the change log (this document).
- The language guide now contains a grammar for CSL.
Changed¶
- Upgraded Corda to v2.0.0.
- Changed keyword
fail
tofailure
for consistency withsuccess
. Bothsuccess
andfailure
are nouns. - Prefix contracts do not include the
then
keyword. Therefore, the following two are now equivalent<*> E
and<*> E then success
.
Fixed¶
- Fix a serialization issue between
FabricLedgerService
andchaincode
. - Removed argument field names at instantiation.
0.5.0 - 2018-02-13¶
Added¶
- Support for the submission of event subtypes from the web UI if the contract’s ontology specifies them.
- Added new ledger service
FabricLedgerService
that supports CSL runtime on Hyperledger Fabric. - Serve language-guide with webservice (http://webservice:8080/docs/guide.html).
- Parse and type errors are now highlighted in the web UI.
Changed¶
- The
Order
type in the standard library has been renamed toOrdering
.
Fixed¶
- Significantly improve the speed with which contract source code is printed (roughly ~100x). This should improve the performance of cucumber tests.
- Fix a bug that made it impossible to instantiate contracts with
DateTime
parameters in the web UI.
0.4.0 - 2018-02-06¶
Changed¶
- Updated the CSL standard library to version 0.2, with the following changes:
- Renamed module
Time
toDateTime
, andTime::TimeComponents
toDateTime::Components
. - Added
DateTime::addDays
. - Added general combinators:
id
,const
,flip
. - Added
Pair
, and projection functionsfst
,snd
. - Added
Maybe
with functionsmaybe
,fromMaybe
,Maybe::map
,Maybe::isDefined
,Maybe::any
,Maybe::all
. - Added
compareInt
,compareFloat
, andcompareDateTime
. - Added the following functions to
List
module:head
,headOrDefault
,tail
,length
,map
,mapMaybe
,filter
,zipWith
,any
,all
,first
,last
,append
,concat
,reverse
,take
,drop
. - Added documentation.
- Indentation and formatting.
- Renamed module
- The value parser now uses CSL2 syntax. This means events should be entered in CSL2 syntax with uppercase constructors e.g.
True
False
Nil
andCons
.
Removed¶
- The CSL1 language level.
Fixed¶
- Fix a bug that caused the ontology viewer to not be shown when a record type explicitly specified
Record
as its parent.
0.3.0 - 2018-02-05¶
Added¶
- In
com.deondigital.api
aConstructorValue
is now available to create and read CSL-constructors applied to argument values. - Record subtyping, so that a record subtype can match the type pattern of its supertype, and an event subtype can be applied to a contract accepting its supertype.
Fixed¶
- The reports tab would report an error when the result of a report contained any constructor which was not
True
,False
,Nil
orCons
.