Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps and prepare release of cargo-concordium and vscode ext #185

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 9 additions & 4 deletions cargo-concordium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

## Unreleased changes

- Added a `tag` option to `cargo concordium init`
## 4.0.0

- Use smart contract v1 cost configuration when simulating locally (the reduce execution cost introduced as part of Concordium Protocol Version 7)
- Added a `--tag <RELEASE-TAG>` option to `cargo concordium init` to allow specifying the release tag of the templates.
Defaults to `releases/templates/latest`.
- When running integration tests the module output path is now exposed to the
tests via the `CARGO_CONCORDIUM_TEST_MODULE_OUTPUT_PATH` environment variable.
- Change the default build output path to `concordium-out/module.wasm.v1`.
- Remove requirement for `--out` flag when using the `--verifiable` flag.
- Embed the schema in the Wasm module by default. Therefore, the `--schema-embed` flag is now deprecated. This behavior can be disabled with the `--no-schema-embed` flag.
- Introduce a default build output (`--out <PATH>`) path to `concordium-out/module.wasm.v1`.
limemloh marked this conversation as resolved.
Show resolved Hide resolved
- Remove requirement for `--out` flag when using the `--verifiable` flag, now using the default output path.
limemloh marked this conversation as resolved.
Show resolved Hide resolved
- Embed the schema in the Wasm module by default and can be disabled using the `--no-schema-embed` flag.
The `--schema-embed` flag (short `-e`) is now deprecated.
- Fixed long error message when the `wasm32-unknown-unknown` target is not installed.

## 3.3.0
Expand Down
10 changes: 5 additions & 5 deletions cargo-concordium/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions cargo-concordium/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-concordium"
version = "3.3.0"
version = "4.0.0"
authors = ["Concordium <[email protected]>"]
edition = "2021"
license-file = "../LICENSE"
Expand Down Expand Up @@ -38,13 +38,13 @@ flate2 = "1.0"

[dependencies.concordium-wasm]
path = "../concordium-base/smart-contracts/wasm-transform"
version = "4.0"
version = "5.0"

[dependencies.concordium-smart-contract-engine]
version = "5.0"
version = "6.0"
path = "../concordium-base/smart-contracts/wasm-chain-integration/"
features = ["display-state"]

[dependencies.concordium_base]
version = "5.0"
version = "6.0"
path = "../concordium-base/rust-src/concordium_base"
5 changes: 5 additions & 0 deletions cargo-concordium/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use concordium_wasm::{
output::{write_custom_section, Output},
parse::parse_skeleton,
validate::ValidationConfig,
CostConfigurationV1,
};
use ptree::{print_tree_with, PrintConfig, TreeBuilder};
use sha2::Digest;
Expand Down Expand Up @@ -1434,6 +1435,7 @@ fn handle_run_v0(run_cmd: RunCommand, module: &[u8]) -> anyhow::Result<()> {
&name,
parameter.as_parameter(),
false, // Whether number of logs should be limited. Limit removed in PV5.
CostConfigurationV1,
runner.energy,
)
.context("Initialization failed due to a runtime error.")?;
Expand Down Expand Up @@ -1533,6 +1535,7 @@ fn handle_run_v0(run_cmd: RunCommand, module: &[u8]) -> anyhow::Result<()> {
&init_state,
u16::MAX as usize, // Max parameter size in PV5.
false, // Whether to limit number of logs. Limit removed in PV5.
CostConfigurationV1,
)
.context("Calling receive failed.")?;
match res {
Expand Down Expand Up @@ -1875,6 +1878,7 @@ fn handle_run_v1(run_cmd: RunCommand, module: &[u8]) -> anyhow::Result<()> {
&name,
loader,
ValidationConfig::V1,
CostConfigurationV1,
false, /* Whether number of logs and size of return values should be limited.
* Limits removed in PV5. */
)
Expand Down Expand Up @@ -1983,6 +1987,7 @@ fn handle_run_v1(run_cmd: RunCommand, module: &[u8]) -> anyhow::Result<()> {

let artifact = concordium_wasm::utils::instantiate_with_metering(
ValidationConfig::V1,
CostConfigurationV1,
&v1::ConcordiumAllowedImports {
support_upgrade: true,
enable_debug: true, /* we always allow the debug statements in the
Expand Down
2 changes: 1 addition & 1 deletion concordium-base
Submodule concordium-base updated 96 files
+2 −2 .github/workflows/build-test-contracts-common.yaml
+2 −2 .github/workflows/build-test-smart-contracts.yaml
+2 −2 .github/workflows/build-test-sources.yaml
+2 −0 .gitignore
+2 −2 README.md
+21 −2 Setup.hs
+1 −0 concordium-base.cabal
+1 −1 concordium-grpc-api
+23 −6 haskell-src/Concordium/Cost.hs
+17 −0 haskell-src/Concordium/Crypto/EncryptedTransfers.hs
+43 −14 haskell-src/Concordium/GRPC2.hs
+13 −1 haskell-src/Concordium/ID/Types.hs
+1 −1 haskell-src/Concordium/Types.hs
+111 −68 haskell-src/Concordium/Types/Accounts.hs
+278 −15 haskell-src/Concordium/Types/Execution.hs
+1 −1 haskell-src/Concordium/Types/Migration.hs
+8 −0 haskell-src/Concordium/Types/Parameters.hs
+63 −33 haskell-src/Concordium/Types/ProtocolVersion.hs
+99 −36 haskell-src/Concordium/Types/Queries.hs
+2 −4 haskell-src/Concordium/Types/Transactions.hs
+72 −0 haskell-src/Concordium/Wasm.hs
+60 −2 haskell-tests/Generators.hs
+2 −0 haskell-tests/Spec.hs
+113 −14 haskell-tests/Types/PayloadSerializationSpec.hs
+99 −0 haskell-tests/Types/PayloadSpec.hs
+13 −4 idiss-csharp/CHANGELOG.md
+1 −1 idiss-csharp/IdissExample/IdissExample.csproj
+12 −10 idiss-csharp/IdissLib/Idiss.cs
+33 −2 idiss-csharp/IdissLib/IdissLib.csproj
+3 −3 idiss-csharp/IdissLib/Types.cs
+1 −1 idiss-csharp/IdissLibTest/IdissLibTest.csproj
+29 −38 idiss-csharp/README.md
+1 −1 idiss/README.md
+5 −1 mobile_wallet/CHANGELOG.md
+5 −5 mobile_wallet/Cargo.lock
+1 −1 mobile_wallet/Cargo.toml
+4 −4 mobile_wallet/android/build-android.sh
+6 −0 mobile_wallet/src/lib.rs
+3 −3 rust-src/Cargo.lock
+9 −0 rust-src/concordium_base/CHANGELOG.md
+1 −1 rust-src/concordium_base/Cargo.toml
+115 −0 rust-src/concordium_base/src/cis3_types.rs
+3 −0 rust-src/concordium_base/src/encrypted_transfers/ffi.rs
+22 −0 rust-src/concordium_base/src/encrypted_transfers/mod.rs
+5 −1 rust-src/concordium_base/src/id/types.rs
+5 −3 rust-src/concordium_base/src/lib.rs
+93 −6 rust-src/concordium_base/src/transactions.rs
+119 −41 rust-src/concordium_base/src/web3id/mod.rs
+6 −0 rust-src/wallet_library/CHANGELOG.md
+1 −1 rust-src/wallet_library/Cargo.toml
+3 −2 rust-src/wallet_library/src/default_wallet_config.rs
+8 −0 smart-contracts/contracts-common/concordium-contracts-common/CHANGELOG.md
+1 −1 smart-contracts/contracts-common/concordium-contracts-common/Cargo.toml
+35 −5 smart-contracts/contracts-common/concordium-contracts-common/src/types.rs
+ smart-contracts/testdata/validation-time-consume.wasm
+459,862 −0 smart-contracts/testdata/validation-time-consume.wat
+ smart-contracts/testdata/validation-time-preserve.wasm
+439,015 −0 smart-contracts/testdata/validation-time-preserve.wat
+0 −121 smart-contracts/testdata/wasm-spec-test-suite/core/call.wast
+93 −223 smart-contracts/testdata/wasm-spec-test-suite/core/call_indirect.wast
+0 −42 smart-contracts/testdata/wasm-spec-test-suite/core/endianness.wast
+0 −18 smart-contracts/testdata/wasm-spec-test-suite/core/fac.wast
+0 −122 smart-contracts/testdata/wasm-spec-test-suite/core/local_set.wast
+0 −162 smart-contracts/testdata/wasm-spec-test-suite/core/local_tee.wast
+0 −48 smart-contracts/testdata/wasm-spec-test-suite/core/return.wast
+6 −39 smart-contracts/testdata/wasm-spec-test-suite/core/select.wast
+0 −32 smart-contracts/testdata/wasm-spec-test-suite/core/unreachable.wast
+20 −20 smart-contracts/testdata/wasm-spec-test-suite/core/unwind.wast
+7 −0 smart-contracts/wasm-chain-integration/CHANGELOG.md
+3 −3 smart-contracts/wasm-chain-integration/Cargo.lock
+4 −4 smart-contracts/wasm-chain-integration/Cargo.toml
+3 −2 smart-contracts/wasm-chain-integration/benches/v1-host-functions.rs
+34 −8 smart-contracts/wasm-chain-integration/benches/wasm.rs
+12 −0 smart-contracts/wasm-chain-integration/src/utils.rs
+20 −5 smart-contracts/wasm-chain-integration/src/v0/ffi.rs
+32 −6 smart-contracts/wasm-chain-integration/src/v0/mod.rs
+0 −15 smart-contracts/wasm-chain-integration/src/v0/types.rs
+8 −3 smart-contracts/wasm-chain-integration/src/v1/crypto_primitives_tests.rs
+44 −11 smart-contracts/wasm-chain-integration/src/v1/ffi.rs
+31 −11 smart-contracts/wasm-chain-integration/src/v1/mod.rs
+0 −15 smart-contracts/wasm-chain-integration/src/v1/types.rs
+26 −13 smart-contracts/wasm-test/src/main.rs
+10 −0 smart-contracts/wasm-transform/CHANGELOG.md
+9 −2 smart-contracts/wasm-transform/Cargo.toml
+60 −0 smart-contracts/wasm-transform/benches/validation-time.rs
+881 −237 smart-contracts/wasm-transform/src/artifact.rs
+38 −14 smart-contracts/wasm-transform/src/artifact_input.rs
+22 −1 smart-contracts/wasm-transform/src/artifact_output.rs
+1 −0 smart-contracts/wasm-transform/src/lib.rs
+556 −434 smart-contracts/wasm-transform/src/machine.rs
+389 −118 smart-contracts/wasm-transform/src/metering_transformation.rs
+8 −21 smart-contracts/wasm-transform/src/metering_transformation_test.rs
+14 −0 smart-contracts/wasm-transform/src/tests.rs
+9 −0 smart-contracts/wasm-transform/src/types.rs
+12 −4 smart-contracts/wasm-transform/src/utils.rs
+79 −18 smart-contracts/wasm-transform/src/validate.rs
5 changes: 5 additions & 0 deletions vscode-smart-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

## 3.0.0

- Contains `cargo-concordium` version 4.0.0
- Contains `@concordium/ccd-js-gen` version 1.2.0

## 2.2.0

- Contains `cargo-concordium` version 3.2.0
Expand Down
5 changes: 5 additions & 0 deletions vscode-smart-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ This extension contributes the following settings:

## Release Notes

## 3.0.0

- Contains `cargo-concordium` version 4.0.0
- Contains `@concordium/ccd-js-gen` version 1.2.0

## 2.2.0

- Contains `cargo-concordium` version 3.2.0
Expand Down
2 changes: 1 addition & 1 deletion vscode-smart-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Concordium Smart Contracts",
"icon": "icon.png",
"description": "Develop and build smart contracts on Concordium",
"version": "2.2.0",
"version": "3.0.0",
"repository": {
"type": "git",
"url": "https://github.com/Concordium/concordium-smart-contract-tools.git",
Expand Down
5 changes: 2 additions & 3 deletions vscode-smart-contracts/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,15 @@ async function buildTask(

const schemaArgs =
schemaSettings === "skip"
? []
? ["--no-schema-embed"]
: schemaSettings === "embed-and-outDir"
? [
"--schema-embed",
"--schema-json-out",
outDir,
"--schema-base64-out",
path.join(outDir, "module-schema.bs64"),
]
: ["--schema-json-out", outDir];
: ["--no-schema-embed", "--schema-json-out", outDir];
const additionalArgs = config.getAdditionalBuildArgs();
const moduleOut = path.join(outDir, "module.wasm.v1");
const args = ["--out", moduleOut].concat(schemaArgs, additionalArgs);
Expand Down
1 change: 0 additions & 1 deletion vscode-smart-contracts/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const taskProvider: vscode.TaskProvider = {
defaultOutDir,
"--schema-base64-out",
path.join(defaultOutDir, "module-schema.bs64"),
"--schema-embed",
];
const defaultJsGenArgs = [
"--module",
Expand Down
Loading