Releases: Concordium/concordium-base
concordium_base 5.0.0
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>
andFrom<DurationSeconds>
implementations
forchrono::Duration
and replace them with fallibleTryFrom
implementations that fail when durations overflow. ContractAddress::new
ContractName
,ReceiveName
,EntrypointName
, andParameter
new_unchecked
constructors are madeconst
so they can be used when
defining constants. SimilarlyParameter::empty
isconst
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 theValidateImportExport
trait, instead useNoDuplicateImport
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 inReceiveParams
and
call_receive_v1
. When enabled,invoke
can generate the new interrupt
typesQueryContractModuleReference
andQueryContractName
.
concordium-contracts-common 9.1.0
Summary
Minor release adding a number of convenience features.
Changes
- Add
get_alias_unchecked
forAccountAddress
that neglects the bounds check
assuming the caller has ensured it. - Implement
serde::Serialize
andserde::Deserialize
forAccountSignature
,CredentialSignature
,Signature
,SignatureEcdsaSecp256k1
andSignatureEd25519
when featurederive-serde
is enabled. - Set minimum supported Rust version to 1.73.
- Change
HashBytes::new
to aconst
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 referencingconcordium_std
rather than::concordium_std
allowing for user-providedconcordium_std
. - Set minimum supported Rust version to 1.73.
- Support returning types that reference host or state from
init
orreceive
entrypoints. The generated code extends lifetimes of thehost
andctx
sufficiently for it to compile.
concordium_base 4.0.0
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
from0.7
to0.8
ed25519-dalek
from version1
to version2
since these appear in types exposed by concordium-base.
Changes
- Add
MultiExp
trait that allows to have differentmultiexp
algorithm implementations for different curves. - Improve performance of the generic
multiexp
algorithm. - Add an instance of
MultiExp
that is specific tocurve25519
. - Add traits
Field
andPrimeField
with implementations for the underlying field of theBLS12-381
curve. - Add integration with the
arkworks
library interfaces for fields and elliptic curves (wrapper types and blanket trait implementations). - Add the
BLS12-381
implementation from thearkworks
ecosystem. - The public types
id::constants::ArCurve
,id::constants::IpPairing
are defined in terms of thearkworks
BLS12-381 implementation. - Add a type alias
id::constants::BlsG2
for theG2
group ofarkworks
BLS12-381. - Upgrade
ed25519-dalek
tov2.0
. - Bump the
rand
version tov0.8
- Add implementations of
Field
,PrimeField
andCurve
for the Ristretto representation ofcurve25519
. - Remove
Curve::bytes_to_curve_unchecked()
. - Rename
Cipher::from_bytes_unchecked()
toCipher::from_bytes()
; the method usesdeserial()
instead ofCurve::bytes_to_curve_unchecked()
. - Support
P7
protocol version. - The
Debug
implementation forContractEvent
displays the value inhex
.
The alternate formatter (using#
) displays it as a list of bytes. - Add
FromStr
andDisplay
instances tododis_yampolskiy_prf::SecretKey
. - Change
Debug
instance ofdodis_yampolskiy_prf::SecretKey
to hide the value. - Remove
Timestamp
to instead reexport the similar type fromconcordium_contracts_common
.
This adds several new methods, but results in a breaking change in theserde::Serialize
implementation, which is now using string containing RFC3393 representation instead the underlying milliseconds. - Remove
smart_contracts::WasmVersion
to instead reexport a similar type fromconcordium_contracts_common
.
This adds aFromStr
implementation and changes the associated typeTryFrom<u8>::Error
fromanyhow::Error
toconcordium_contracts_common::U8WasmVersionConvertError
.
concordium-wasm 4.0.0
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 fromconcordium_contracts_common
.
This addsDisplay
,Default
,TryFrom<u8>
,serde::Serialize
andserde::Deserialize
forWasmVersion
andFrom<WasmVersion>
foru8
.
The associated typeFromStr::Err
changes fromanyhow::Error
toconcordium_contracts_common::WasmVersionParseError
.
The methodWasmVersin::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
inconcordium-base
toTimestamp
in this crate, i.e. make internal fieldmillis
public, implementFrom<u64>
and add anow
method. - The
Debug
implementations ofParameter
andOwnedParameter
now output the
parameter as hex unless the alternate formatting (#
) is specified.
concordium_base 3.2.0
Summary
This is a maintenance release to improve the ergonomics of using different types of account keys.
Changes
- Add
From
trait to convertAccountKeys
intoAccountPublicKeys
. - Add
singleton
andnew
function toAccountAccessStructure
. - Export
PublicKey
,SecretKey
, andSignature
type fromed25519_dalek
crate. - Add
sign_message
function to sign a message with allAccountKeys
. The return type isAccountSignatures
. - Support using
validatorId
instead ofbakerId
when parsing
BakerCredentials
from JSON.
concordium-contracts-common 8.1.1
Summary
This is a bugfix release that applies to off-chain use of the contracts-common library.
Changes
- Fix
Display
implementation onTimestamp
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
forTimestamp
such that it also supports parsing from a number of milliseconds since the unix epoch.