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
.