Skip to content

Releases: Concordium/concordium-base

concordium_base 5.0.0

25 Mar 09:16
Compare
Choose a tag to compare

Summary

This release adds a number of convenience features and bumps MSRV to 1.73.

While this is a major version release, the breaking changes are very small. In particular the From implementations for SlotDuration and DurationSeconds were removed since they would sometimes panic. They have been replace with TryFrom implementations that return an Err instead.

Changes

  • Set minimum supported Rust version to 1.73.
  • Make fields of CIS4 events public.
  • Remove the From<SlotDuration> and From<DurationSeconds> implementations
    for chrono::Duration and replace them with fallible TryFrom
    implementations that fail when durations overflow.
  • ContractAddress::new
  • ContractName, ReceiveName, EntrypointName, and Parameter
    new_unchecked constructors are made const so they can be used when
    defining constants. Similarly Parameter::empty is const now.

concordium-smart-contract-engine 5.0.0

Summary

Support for P7 host calls and revision of the TestHost to better support running tests for contracts that use state in their unit tests.

Changes

  • TestHost no longer implements the ValidateImportExport trait, instead use NoDuplicateImport struct.
  • TestHost::new now takes an instance state, allowing for support of host functions related to the smart contract key-value state.
  • The function utils::run_module_tests now provides an empty in-memory instance state for each test case, allowing module tests to use host functions related to the smart contract key-value state.
  • Support for querying the module reference and contract name of an instance via
    invoke (for protocol version 7). These are enabled by a new
    support_contract_inspection_queries parameter in ReceiveParams and
    call_receive_v1. When enabled, invoke can generate the new interrupt
    types QueryContractModuleReference and QueryContractName.

concordium-contracts-common 9.1.0

Summary

Minor release adding a number of convenience features.

Changes

  • Add get_alias_unchecked for AccountAddress that neglects the bounds check
    assuming the caller has ensured it.
  • Implement serde::Serialize and serde::Deserialize for AccountSignature, CredentialSignature, Signature, SignatureEcdsaSecp256k1 and SignatureEd25519 when feature derive-serde is enabled.
  • Set minimum supported Rust version to 1.73.
  • Change HashBytes::new to a const function.

concordium-contracts-common-derive 4.1.0

Summary

Minor release expanding the set of contexts where generated code is applicable.

Changes

  • Attribute macro #[concordium_quickcheck] generates code referencing concordium_std rather than ::concordium_std allowing for user-provided concordium_std.
  • Set minimum supported Rust version to 1.73.
  • Support returning types that reference host or state from init or receive
    entrypoints. The generated code extends lifetimes of the host and ctx
    sufficiently for it to compile.

concordium_base 4.0.0

22 Jan 11:52
Compare
Choose a tag to compare

Summary

This is a major release that updates the major core dependencies to more recent versions, as well as replacing the core BLS curve implementation with a more up to date one.

Users of this library are most likely to be affected by the updates of

  • rand from 0.7 to 0.8
  • ed25519-dalek from version 1 to version 2

since these appear in types exposed by concordium-base.

Changes

  • Add MultiExp trait that allows to have different multiexp algorithm implementations for different curves.
  • Improve performance of the generic multiexp algorithm.
  • Add an instance of MultiExp that is specific to curve25519.
  • Add traits Field and PrimeField with implementations for the underlying field of the BLS12-381 curve.
  • Add integration with the arkworks library interfaces for fields and elliptic curves (wrapper types and blanket trait implementations).
  • Add the BLS12-381implementation from the arkworks ecosystem.
  • The public types id::constants::ArCurve, id::constants::IpPairing are defined in terms of the arkworks BLS12-381 implementation.
  • Add a type alias id::constants::BlsG2 for the G2 group of arkworks BLS12-381.
  • Upgrade ed25519-dalek to v2.0.
  • Bump the rand version to v0.8
  • Add implementations of Field, PrimeField and Curve for the Ristretto representation of curve25519.
  • Remove Curve::bytes_to_curve_unchecked().
  • Rename Cipher::from_bytes_unchecked() to Cipher::from_bytes(); the method uses deserial() instead of Curve::bytes_to_curve_unchecked().
  • Support P7 protocol version.
  • The Debug implementation for ContractEvent displays the value in hex.
    The alternate formatter (using #) displays it as a list of bytes.
  • Add FromStr and Display instances to dodis_yampolskiy_prf::SecretKey.
  • Change Debug instance of dodis_yampolskiy_prf::SecretKey to hide the value.
  • Remove Timestamp to instead reexport the similar type from concordium_contracts_common.
    This adds several new methods, but results in a breaking change in the serde::Serialize implementation, which is now using string containing RFC3393 representation instead the underlying milliseconds.
  • Remove smart_contracts::WasmVersion to instead reexport a similar type from concordium_contracts_common.
    This adds a FromStr implementation and changes the associated type TryFrom<u8>::Error from anyhow::Error to concordium_contracts_common::U8WasmVersionConvertError.

concordium-wasm 4.0.0

22 Jan 11:47
Compare
Choose a tag to compare

Summary

This is a maintenance release updating dependencies.

Changes

  • Update contracts-common dependency to version 9.

concordium-smart-contract-engine 4.0.0

Summary

This is a major release that brings support for debugging when running smart contract locally.

Both inserting logging as well as inspecting energy usage is supported.

Changes

  • Add a branch_statistics function to get insight into smart contract state
    tree structure.
  • Remove utils::WasmVersion to instead reexport a similar type from concordium_contracts_common.
    This adds Display, Default, TryFrom<u8>, serde::Serialize and serde::Deserialize for WasmVersion and From<WasmVersion> for u8.
    The associated type FromStr::Err changes from anyhow::Error to concordium_contracts_common::WasmVersionParseError.
    The method WasmVersin::read is removed.

concordium-contracts-common 9.0.0

Summary

This is a minor release that focuses on ergonomics.

Changes

  • Add SchemaType implementation for &str.
  • Add missing functionality from Timestamp in concordium-base to Timestamp in this crate, i.e. make internal field millis public, implement From<u64> and add a now method.
  • The Debug implementations of Parameter and OwnedParameter now output the
    parameter as hex unless the alternate formatting (#) is specified.

concordium_base 3.2.0

23 Nov 07:43
4e13159
Compare
Choose a tag to compare

Summary

This is a maintenance release to improve the ergonomics of using different types of account keys.

Changes

  • Add From trait to convert AccountKeys into AccountPublicKeys.
  • Add singleton and new function to AccountAccessStructure.
  • Export PublicKey, SecretKey, and Signature type from ed25519_dalek crate.
  • Add sign_message function to sign a message with all AccountKeys. The return type is AccountSignatures.
  • Support using validatorId instead of bakerId when parsing
    BakerCredentials from JSON.

concordium-contracts-common 8.1.1

02 Nov 14:40
cfe43b7
Compare
Choose a tag to compare

Summary

This is a bugfix release that applies to off-chain use of the contracts-common library.

Changes

  • Fix Display implementation on Timestamp such that it does not return an error if the timestamp is not representable in RFC3339 format, but instead it falls back to formatting as the number of milliseconds since the unix epoch.
  • Change FromStr for Timestamp such that it also supports parsing from a number of milliseconds since the unix epoch.