Skip to content

Marlowe Runtime v0.0.6

Latest
Compare
Choose a tag to compare
@jhbertra jhbertra released this 12 Dec 18:37
· 286 commits to main since this release
db25114

Highlights

Runtime 0.0.6 introduces several new features and addresses some performance issues.

Open Roles

The most significant addition to this release is support for open roles, which allow anyone to participate in a contract after it has been created. Roles secure contracts by requiring an NFT to be spent to perform actions. Only individuals capable of spending the role token can perform these actions. In a regular "closed" role, this token is sent to the wallet intended to fill the role. In an open role, the token is sent to a script output that can be spent by anyone under the following conditions:

  • The contract has the correct role token minting policy ID in the datum
  • The contract holds a thread token that matches the token name in the datum of the script output holding the open role.
  • The contract action does not send any payments (this is to prevent a double satisfaction attack).
  • The contract is awaiting input for an action authorized to the open role (i.e. a deposit or a choice).

The Runtime will send the role token to the wallet that created the transaction, converting it to a closed role owned by that wallet afterwards.

Role Token Minting Improvements

Role token minting is more flexible:

  • Multiple tokens can be minted per role
  • Tokens for a given role can be sent to multiple recipients
  • CIP-25 is fully implemented, allowing for arbitrary additional properties in the token metadata and file metadata objects.

Bulk Sync Protocol

Another significant new feature is the new bulk sync protocol. This protocol combines the capabilities of the existing header sync and Marlowe sync protocols: header sync streams all on-chain contract creation events; Marlowe sync streams all Marlowe contract events (creation, input application, and withdrawal) for a single contract; and bulk sync streams all Marlowe contract events for all contracts.

Before bulk sync, obtaining a stream of all events was extremely difficult and costly: doing so involved running a header sync client to detect all contract creations and running parallel Marlowe sync clients for each contract to stream their events.

This functionality is particularly useful to agent processes which monitor Marlowe traffic. For example, an oracle might watch for contracts which require its input in the form of a choice action, or a janitor service might watch for contracts that have timed out and which can be closed.

Marlowe Runtime 0.0.6 — 2023-12-06

Added

  • New bulk sync protocol which allows clients to subscribe to all events from
    all marlowe contracts.

  • Garbage collection added to marlowe-contract

  • More documentation in --help text

  • Added support for creating and applying input to "open role" contracts.

  • Safety analysis support for open-role contracts.

  • marlowe-chain-copy executable for efficiently seeding a new chain database.

  • Support for advanced role token distribution.

    • Mint multiple tokens per role
    • Send tokens to multiple recipients.
  • Arbitrary extra properties can be added to role token metadata.

  • Published Marlowe validators compiled under plutus-1.15.0.0.

Changed

  • Min lovelace deposit is optional, and a default will be computed if omitted.

  • Improve signal-to-noise ratio of chain sync protocol logging.

  • Dropped asset table from chain schema, inlining fields into assetOut
    and assetMint.

  • Improved sync performance of marlowe-chain-indexer by switching from
    INSERT to COPY.

  • Internal: consolidated database row extraction logic for cardano blocks into
    reusable modules.

  • Improved sync performance of marlowe-indexer.

  • marlowe-indexer now indexes contracts by parties in the accounts as well as
    the contract.

Fixed

  • Building a transaction for a contract that uses ADA role tokens fails.

  • The TransactionInput definition in the generated OpenApi schema for Marlowe Runtime Web is now explicitly typed as an object.

  • Safety checks fail when open roles and default thread token name are used.

  • The generated OpenApi schema represented tuples as heterogenous arrays which was not allowed with OpenApi specification 3.0.0. The schema was set to target OpenApi specification 3.1.0.

Marlowe Runtime Web 0.0.6 — 2023-12-06

Added

  • Added support for creating and applying input to "open role" contracts.

Changed

  • Fixed errors and added clarification to Open API documentation.

Fixed

  • 5xx responses do not include CORS headers.