Skip to content

Releases: onflow/cadence

v0.17.0

09 Jun 01:27
Compare
Choose a tag to compare

⭐ Features

πŸ›  Improvements

  • Add deferred decoding support for dictionary values (#925) @SupunS
  • Improve type inference for binary expressions (#957) @turbolent
  • Update language server to Cadence v0.16.0 (#926) @turbolent
  • [Doc-Gen Tool] Add documentation generation support for event declarations (#985) @SupunS
  • [Doc-Gen Tool] Group declarations based on their kind (#984) @SupunS
  • Check 'importability' instead of 'storability' for transaction arguments (#983) @SupunS
  • Allow native composite types to be passed as script arguments (#973) @SupunS
  • Validate UTF-8 compatibility in string value constructor (#972) @SupunS
  • Cache type ID for composite types (#950) @SupunS
  • [Optimization] Make dynamic types singleton for simple types (#963) @SupunS
  • Include docstrings in value and type variables, improve hover markup (#945) @turbolent
  • Always check arguments and record the argument types in the elaboration (#951) @turbolent
  • Optimize qualified identifier creation (#948) @SupunS
  • Optimize Type function declaration (#949) @turbolent
  • [Optimization] Re-use converter functions across interpreters (#947) @SupunS
  • Update and extend the source compatibility suite (#977) @turbolent
  • Update to Go 1.16.3's libexec/misc/wasm/wasm_exec.js (#929) @turbolent

🐞 Bug Fixes

πŸ§ͺ Tests

πŸ“– Documentation

  • Update account docs to not to pass PublicKey as an argument (#967) @SupunS
  • Improve the crypto doc (#960) @tarakby

πŸ— Chore

v0.16.1

23 May 18:20
Compare
Choose a tag to compare

🐞 Bug Fixes

  • Only wrap a type in an optional if it is not nil (#936) @SupunS

v0.16.0

18 May 21:32
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

  • Add new crypto features (#852) @SupunS

    Renamed the ECDSA_Secp256k1 signature algorithm to ECDSA_secp256k1.

    Please update existing contracts, transactions, and scripts to use the new name.

  • Remove the high-level storage API (#877) @turbolent

    The internal interface's SetCadenceValue function was removed.

    This change does not affect Cadence programs (contracts, transactions, scripts).

⭐ Features

  • Add non-local type inference for expressions (#875) @SupunS

    The type of most declarations and expressions is now inferred in a uni-directional way, instead of only locally.

    For example, this allows the following declarations to type-check without having to add static casts:

    let numbers: [Int8] = [1, 2, 3]
    let nestedNumbers: [[Int8]] = [[1, 2], [3, 4]]
    let numberNames: {Int64: String} = {0: "zero", 1: "one"}
    let sum: Int8 = 1 + 2
  • Add new crypto features (#852) @SupunS

    Hash Algorithms

    Signature Algorithms

    PublicKey Type

    • Added the field let isValid: Bool. For example:

      let publicKey = PublicKey(publicKey: [], signatureAlgorithm: SignatureAlgorithm.ECDSA_P256)
      
      let valid = publicKey.isValid
    • Added the function verify, which allows validating signatures:

      pub fun verify(
          signature: [UInt8],
          signedData: [UInt8],
          domainSeparationTag: String,
          hashAlgorithm: HashAlgorithm
      ): Bool

      For example:

      let valid = publicKey.verify(
          signature: [],
          signedData: [],
          domainSeparationTag: "something",
          hashAlgorithm: HashAlgorithm.SHA2_256
      )
    • Added the function hashWithTag, which allows hashing with a tag:

      pub fun hashWithTag(
          _ data: [UInt8],
          tag: string,
          algorithm: HashAlgorithm
      ): [UInt8]
  • Direct contract function invoke (#878) @janezpodhostnik

    Cadence now supports an additional function to allow the host environment to call contract functions directly.

  • Language Server: Add support for access check mode (#868) @turbolent

  • Record variable declaration ranges (#880) @turbolent

⚑️ Performance

The performance of decoding and encoding values was significantly improved by @fxamacker and @SupunS:

  • Optimize encoding by using CBOR lib's StreamEncoder (#830) @fxamacker
  • Optimize decoding by using CBOR StreamDecoder (#885) @fxamacker
  • Add deferred decoding for array values (#871) @SupunS
  • Add deferred decoding support for composite values (#896) @SupunS
  • Pre-allocate and reuse value-path for encoding (#858) @fxamacker
  • Pre-allocate and reuse value-path for decoding (#869) @turbolent
  • Optimize Address.Bytes() to inline fast path (#848) @fxamacker
  • Remove call to Valid() during encoding to boost speed by about 13-18% (#857) @fxamacker
  • Directly create int subtype value at interpreter (#913) @SupunS

πŸ›  Improvements

πŸ”’ Security

This release contains major security fixes:

🐞 Bug Fixes

πŸ§ͺ Tests

πŸ“– Documentation

πŸ— Chores

v0.15.1

21 Apr 17:27
Compare
Choose a tag to compare

πŸ›  Improvements

  • Include wrapped error in InvalidEntryPointArgumentError message (#823) @mikeylemmon
  • Remove encoding and decoding support for storage references (#819) @turbolent

πŸ“– Documentation

v0.15.0

20 Apr 18:35
Compare
Choose a tag to compare

⭐ Features

πŸ›  Improvements

🐞 Bug Fixes

πŸ“– Documentation

v0.14.5

09 Apr 00:34
Compare
Choose a tag to compare

🐞 Bug Fixes

  • Fix borrowing (#785)

v0.14.4

25 Mar 21:03
Compare
Choose a tag to compare

⭐ Features

🐞 Bug Fixes

  • Fix runtime representation of native HashAlgorithm/SignAlgorithm enums (#725) @SupunS
  • Fix error range when reporting a type error for an indexing reference expression (#719) @turbolent

πŸ§ͺ Tests

v0.13.10

25 Mar 23:41
Compare
Choose a tag to compare

🐞 Bug Fixes

  • Add support for access(account) and multiple contracts per account (#730) @turbolent

v0.13.9

23 Mar 05:05
Compare
Choose a tag to compare

πŸ›  Improvements

v0.14.3

22 Mar 21:29
Compare
Choose a tag to compare

πŸ›  Improvements

🐞 Bug Fixes

  • Add support for access(account) and multiple contracts per account (#710) @turbolent