github onflow/cadence v0.20.0

This release culminates a half-year effort to improve the Cadence storage layer, i.e. how Cadence values are stored in accounts, in particular arrays, dictionaries, and composite values. @fxamacker and @ramtinms designed and implemented completely new array and ordered map data structures, resulting in atree. These data structures are fast and scalable: they allow efficient access and allow efficient modifications to arrays and dictionaries with very large number of elements. @turbolent and @SupunS integrated this new library into Cadence. This new storage layer also fixed a bug in the resource owner field. Please see the breaking changes section for more details.

In addition, this release saw several feature and documentation contributions by new community members. Thank you!

💥 Breaking Changes

  • With the storage layer update, the owner field of resources is now implemented correctly, as originally designed:
    The field is only non-nil if the resource is currently in storage, and is always nil if the resource is on the stack.
    This breaking change is actually a bug fix, as the owner field was previously implemented incorrectly: After a resource was moved out of storage onto the stack, the owner field was still referring to the account the resource was stored in.

    Please ensure your Cadence programs do not rely on the broken behaviour and update them if needed.

    For example, in a function that is passed a resource as an argument, the resource's owner field will always be nil:

    pub fun deposit(token: @NonFungibleToken.NFT) {
        // token.owner is always nil!
        // ...
    }
  • Add limit on call stack depth (#1138) @SupunS

⭐ Features

🛠 Improvements

🐞 Bug Fixes

📖 Documentation

🙌 New Contributors

Thank you to all new contributors:

Changelog

v0.19.1...v0.20.0

Don't miss a new cadence release

NewReleases is sending notifications on new releases.