Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concordium-rust-sdk
4 changes: 3 additions & 1 deletion concordium-std/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
- The crate feature `p7` has been removed. The functionality it guarded (related to protocol P7) is unconditionally compiled.
- The crate feature `crypto-primitives` has been removed. It had no effect anymore (was previously used by the now deprecated test infrastructure).
- The types `StateMap` and `StateSet` and related types no longer requires the low-level state type to be specified.
The type parameter `S` for the low-level state type now has default `StateApi`.
The type parameter `S` for the low-level state type now has default `StateApi`.
- The feature flag `concordium-quickcheck` has been removed. Property based tests using `quickcheck` and run in WASM are no longer supported.
The function `TestEnv::get_random` has been made available for those who want to implement their own property based framework suited for running in WASM.

## concordium-std 10.1.0 (2024-04-04)

Expand Down
4 changes: 0 additions & 4 deletions concordium-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ readme = "./README.md"

[dependencies]
dlmalloc = { version = "0.2.14", features = ["global"], optional = true }
quickcheck = {version = "1", optional = true }
getrandom = { version = "0.2", features = ["custom"], optional = true }

[dependencies.concordium-contracts-common]
path = "../concordium-rust-sdk/concordium-base/smart-contracts/contracts-common/concordium-contracts-common"
Expand All @@ -28,10 +26,8 @@ wasm-test = ["concordium-contracts-common/wasm-test"]
# Own internal wasm-tests leak out to the smart contracts using this library,
# so a separate feature 'internal-wasm-test' is introduced for these.
internal-wasm-test = []
#internal-wasm-test = ["wasm-test", "concordium-quickcheck"] # todo reenable property based tests as part of https://linear.app/concordium/issue/COR-2474/property-based-tests-on-wasm32-target
# Make smart contract macros generate function in the smart contract that allows inspecting the schema of the contract functions.
build-schema = ["concordium-contracts-common/build-schema"]
concordium-quickcheck = ["getrandom", "quickcheck", "concordium-contracts-common/concordium-quickcheck"] # // decide what to do with this feature flag as part of https://linear.app/concordium/issue/COR-2474/property-based-tests-on-wasm32-target
# Enabling debug feature changes the #[concoridum_dbg] macro to log messages via the WASM interpreter
debug = []
# Use the dlmalloc allocator
Expand Down
27 changes: 3 additions & 24 deletions concordium-std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,6 @@
//! contracts. The structure of these are, at present, a bit odd without the
//! historic context, which is explained below.
//!
//! Prior to version 8.1, a number of traits and generics were used when writing
//! smart contracts, e.g. [`HasHost`], to support the usage of
//! [`crate::test_infrastructure`] for testing, where two primary
//! implementations of each trait existed. The first one is supported by
//! **host** functions, and this is the implementation that is used when
//! contracts are executed by notes. The second set of implementations supports
//! testing contracts with [`crate::test_infrastructure`], but since the
//! deprecation of this module, the preferred way of writing contracts is to use
//! the concrete types.
//!
//! The essential concrete types are:
//! - [`StateApi`] for operations possible on the contract state
//! - [`Host`] for invoking operations on the host and accessing the state
Expand Down Expand Up @@ -282,14 +272,14 @@
//!
//! ## Version 8.1
//!
//! Version 8.1 of `concordium-std` deprecates the module [`test_infrastructure`] in favor of the
//! Version 8.1 of `concordium-std` deprecates the module `test_infrastructure` in favor of the
//! library [concordium_smart_contract_testing], which should be used instead.
//!
//! ### Migration guide for `concordium_smart_contract_testing`
//!
//! The module [test_infrastructure] is deprecated and a number of traits are
//! The module `test_infrastructure` is deprecated and a number of traits are
//! deprecated at the same time since they only exist to support the
//! [test_infrastructure] and are not needed in the new testing library.
//! `test_infrastructure` and are not needed in the new testing library.
//! The primary of these traits are [`HasHost`], [`HasStateApi`],
//! [`HasInitContext`], and [`HasReceiveContext`].
//!
Expand Down Expand Up @@ -360,12 +350,7 @@
//! init/receive calls)
//! - Integration tests that call the init and receive methods
//!
//! If you do not want to migrate your contract and tests yet, then you can add
//! the `#[allow(deprecated)]` attribute to your test modules to avoid the
//! deprecation warnings.
//!
//! [1]: https://doc.rust-lang.org/std/primitive.unit.html
//! [test_infrastructure]: ./test_infrastructure/index.html
//! [concordium_smart_contract_testing]: https://docs.rs/concordium-smart-contract-testing
//!
//! ## Version 3
Expand Down Expand Up @@ -452,12 +437,6 @@ pub use state_btree::*;
pub use traits::*;
pub use types::*;

#[deprecated(
since = "8.1.0",
note = "Deprecated in favor of [concordium-smart-contract-testing](https://docs.rs/concordium-smart-contract-testing)."
)]
pub mod test_infrastructure;

#[macro_export]
#[cfg(feature = "debug")]
/// When the `debug` feature of `concordium-std` is enabled this will use the
Expand Down
2 changes: 0 additions & 2 deletions concordium-std/src/prims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ unsafe extern "C" {

/// Generating random numbers for randomised testing.
/// Not available for contracts deployed on the chain.
#[cfg(feature = "concordium-quickcheck")]
#[cfg(target_arch = "wasm32")]
pub(crate) fn get_random(dest: *mut u8, size: u32);
}

Expand Down
Loading
Loading