Compare commits

..

No commits in common. "master" and "air-testing-framework-v0.11.2" have entirely different histories.

15 changed files with 115 additions and 69 deletions

View File

@ -2,21 +2,21 @@
"air": "0.64.1", "air": "0.64.1",
"air-interpreter": "0.64.1", "air-interpreter": "0.64.1",
"avm/interface": "0.32.1", "avm/interface": "0.32.1",
"avm/server": "0.38.1", "avm/server": "0.38.0",
"avm/client": "0.64.1", "avm/client": "0.64.1",
"crates/air-lib/air-parser": "0.12.0", "crates/air-lib/air-parser": "0.12.0",
"crates/air-lib/execution-info-collector": "0.7.14", "crates/air-lib/execution-info-collector": "0.7.14",
"crates/air-lib/interpreter-cid": "0.9.0", "crates/air-lib/interpreter-cid": "0.9.0",
"crates/air-lib/interpreter-data": "0.17.2", "crates/air-lib/interpreter-data": "0.17.2",
"crates/air-lib/test-utils": "0.18.3", "crates/air-lib/test-utils": "0.18.2",
"crates/air-lib/trace-handler": "0.5.12", "crates/air-lib/trace-handler": "0.5.12",
"crates/air-lib/utils": "0.3.0", "crates/air-lib/utils": "0.3.0",
"crates/beautifier": "0.5.0", "crates/beautifier": "0.5.0",
"crates/data-store": "0.7.9", "crates/data-store": "0.7.9",
"crates/testing-framework": "0.11.3", "crates/testing-framework": "0.11.2",
"tools/cli/aquavm-air-cli": "0.2.6", "tools/cli/aquavm-air-cli": "0.2.6",
"tools/wasm/air-beautify-wasm": "0.4.0", "tools/wasm/air-beautify-wasm": "0.4.0",
"tools/cli/air": "0.9.2", "tools/cli/air": "0.9.1",
"crates/air-lib/lambda/ast": "0.1.0", "crates/air-lib/lambda/ast": "0.1.0",
"crates/air-lib/lambda/parser": "0.1.0", "crates/air-lib/lambda/parser": "0.1.0",
"crates/air-lib/log-targets": "0.1.0", "crates/air-lib/log-targets": "0.1.0",

40
Cargo.lock generated
View File

@ -214,7 +214,7 @@ version = "0.1.0"
[[package]] [[package]]
name = "air-test-utils" name = "air-test-utils"
version = "0.18.3" version = "0.18.2"
dependencies = [ dependencies = [
"air-interpreter-cid", "air-interpreter-cid",
"air-interpreter-data", "air-interpreter-data",
@ -225,7 +225,7 @@ dependencies = [
"aquavm-air", "aquavm-air",
"avm-interface", "avm-interface",
"avm-server", "avm-server",
"ed25519-dalek 2.1.1", "ed25519-dalek 2.1.0",
"fluence-keypair", "fluence-keypair",
"futures", "futures",
"maplit", "maplit",
@ -244,7 +244,7 @@ dependencies = [
[[package]] [[package]]
name = "air-testing-framework" name = "air-testing-framework"
version = "0.11.3" version = "0.11.2"
dependencies = [ dependencies = [
"air-interpreter-signatures", "air-interpreter-signatures",
"air-test-utils", "air-test-utils",
@ -398,7 +398,7 @@ dependencies = [
"concat-idents", "concat-idents",
"criterion 0.3.6", "criterion 0.3.6",
"csv", "csv",
"ed25519-dalek 2.1.1", "ed25519-dalek 2.1.0",
"env_logger", "env_logger",
"fluence-app-service", "fluence-app-service",
"fluence-keypair", "fluence-keypair",
@ -424,7 +424,7 @@ dependencies = [
[[package]] [[package]]
name = "aquavm-air-cli" name = "aquavm-air-cli"
version = "0.9.2" version = "0.9.1"
dependencies = [ dependencies = [
"air-beautifier", "air-beautifier",
"air-interpreter-data", "air-interpreter-data",
@ -721,7 +721,7 @@ dependencies = [
[[package]] [[package]]
name = "avm-server" name = "avm-server"
version = "0.38.1" version = "0.38.0"
dependencies = [ dependencies = [
"air-interpreter-interface", "air-interpreter-interface",
"air-interpreter-sede", "air-interpreter-sede",
@ -2060,9 +2060,9 @@ dependencies = [
[[package]] [[package]]
name = "ed25519-dalek" name = "ed25519-dalek"
version = "2.1.1" version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0"
dependencies = [ dependencies = [
"curve25519-dalek 4.1.2", "curve25519-dalek 4.1.2",
"ed25519 2.2.3", "ed25519 2.2.3",
@ -2330,7 +2330,7 @@ checksum = "273ecbe8b6757f46e9d2b61f56ac636f27defa88aebc17a4fd6a7b78bf84cca3"
dependencies = [ dependencies = [
"asn1_der 0.6.3", "asn1_der 0.6.3",
"bs58 0.5.0", "bs58 0.5.0",
"ed25519-dalek 2.1.1", "ed25519-dalek 2.1.0",
"eyre", "eyre",
"lazy_static", "lazy_static",
"libp2p-identity", "libp2p-identity",
@ -3122,7 +3122,7 @@ checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0"
dependencies = [ dependencies = [
"asn1_der 0.7.6", "asn1_der 0.7.6",
"bs58 0.5.0", "bs58 0.5.0",
"ed25519-dalek 2.1.1", "ed25519-dalek 2.1.0",
"hkdf", "hkdf",
"libsecp256k1", "libsecp256k1",
"multihash 0.19.1", "multihash 0.19.1",
@ -4166,12 +4166,6 @@ dependencies = [
"num-traits", "num-traits",
] ]
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.45" version = "0.1.45"
@ -5325,7 +5319,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"serde_with_macros", "serde_with_macros",
"time 0.3.36", "time 0.3.30",
] ]
[[package]] [[package]]
@ -5807,13 +5801,12 @@ dependencies = [
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.36" version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
dependencies = [ dependencies = [
"deranged", "deranged",
"itoa", "itoa",
"num-conv",
"powerfmt", "powerfmt",
"serde", "serde",
"time-core", "time-core",
@ -5828,11 +5821,10 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]] [[package]]
name = "time-macros" name = "time-macros"
version = "0.2.18" version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
dependencies = [ dependencies = [
"num-conv",
"time-core", "time-core",
] ]
@ -6035,7 +6027,7 @@ dependencies = [
"sharded-slab", "sharded-slab",
"smallvec", "smallvec",
"thread_local", "thread_local",
"time 0.3.36", "time 0.3.30",
"tracing", "tracing",
"tracing-core", "tracing-core",
"tracing-serde", "tracing-serde",

View File

@ -22,13 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* avm-data-store bumped from 0.7.4 to 0.7.5 * avm-data-store bumped from 0.7.4 to 0.7.5
* avm-interface bumped from 0.30.0 to 0.31.0 * avm-interface bumped from 0.30.0 to 0.31.0
## [0.38.1](https://github.com/fluencelabs/aquavm/compare/avm-server-v0.38.0...avm-server-v0.38.1) (2024-07-22)
### Bug Fixes
* **avm-server:** remove unused AVM code ([#848](https://github.com/fluencelabs/aquavm/issues/848)) ([50b23c6](https://github.com/fluencelabs/aquavm/commit/50b23c6d9f5746acbddbbe93e3d1c02d7582a56a))
## [0.38.0](https://github.com/fluencelabs/aquavm/compare/avm-server-v0.37.0...avm-server-v0.38.0) (2024-04-15) ## [0.38.0](https://github.com/fluencelabs/aquavm/compare/avm-server-v0.37.0...avm-server-v0.38.0) (2024-04-15)

View File

@ -1,7 +1,7 @@
[package] [package]
name = "avm-server" name = "avm-server"
description = "Fluence AIR VM" description = "Fluence AIR VM"
version = "0.38.1" version = "0.38.0"
authors = ["Fluence DAO", "Cloudless Labs"] authors = ["Fluence DAO", "Cloudless Labs"]
edition = "2021" edition = "2021"
license = "AGPL-3.0-only" license = "AGPL-3.0-only"

View File

@ -0,0 +1,68 @@
/*
* AquaVM Workflow Engine
*
* Copyright (C) 2024 Fluence DAO
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation version 3 of the
* License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pub struct AquaVMRuntimeLimits {
/// AIR script size limit.
pub air_size_limit: u64,
/// Particle data size limit.
pub particle_size_limit: u64,
/// Service call result size limit.
pub call_result_size_limit: u64,
/// Knob to enable/disable RAM consumption hard limits in AquaVM.
pub hard_limit_enabled: bool,
}
#[derive(Default)]
pub struct AVMRuntimeLimits {
pub air_size_limit: Option<u64>,
pub particle_size_limit: Option<u64>,
pub call_result_size_limit: Option<u64>,
pub hard_limit_enabled: bool,
}
impl AquaVMRuntimeLimits {
pub fn new(
air_size_limit: u64,
particle_size_limit: u64,
call_result_size_limit: u64,
hard_limit_enabled: bool,
) -> Self {
Self {
air_size_limit,
particle_size_limit,
call_result_size_limit,
hard_limit_enabled,
}
}
}
impl From<AVMRuntimeLimits> for AquaVMRuntimeLimits {
fn from(value: AVMRuntimeLimits) -> Self {
use air_interpreter_interface::MAX_AIR_SIZE;
use air_interpreter_interface::MAX_CALL_RESULT_SIZE;
use air_interpreter_interface::MAX_PARTICLE_SIZE;
AquaVMRuntimeLimits::new(
value.air_size_limit.unwrap_or(MAX_AIR_SIZE),
value.particle_size_limit.unwrap_or(MAX_PARTICLE_SIZE),
value.call_result_size_limit.unwrap_or(MAX_CALL_RESULT_SIZE),
value.hard_limit_enabled,
)
}
}

View File

@ -28,6 +28,7 @@
)] )]
mod avm; mod avm;
mod avm_runtime_limits;
mod config; mod config;
mod errors; mod errors;
mod runner; mod runner;

View File

@ -48,6 +48,7 @@
*/ */
use super::JValue; use super::JValue;
use core::fmt::{self, Display};
use core::ops; use core::ops;
use std::string::String; use std::string::String;
@ -112,6 +113,22 @@ mod private {
impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {} impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {}
} }
/// Used in panic messages.
struct Type<'a>(&'a JValue);
impl<'a> Display for Type<'a> {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match *self.0 {
JValue::Null => formatter.write_str("null"),
JValue::Bool(_) => formatter.write_str("boolean"),
JValue::Number(_) => formatter.write_str("number"),
JValue::String(_) => formatter.write_str("string"),
JValue::Array(_) => formatter.write_str("array"),
JValue::Object(_) => formatter.write_str("object"),
}
}
}
// The usual semantics of Index is to panic on invalid indexing. // The usual semantics of Index is to panic on invalid indexing.
// //
// That said, the usual semantics are for things like Vec and BTreeMap which // That said, the usual semantics are for things like Vec and BTreeMap which

View File

@ -83,10 +83,6 @@
* dependencies * dependencies
* aquavm-air bumped from 0.64.0 to 0.64.1 * aquavm-air bumped from 0.64.0 to 0.64.1
* The following workspace dependencies were updated
* dependencies
* avm-server bumped from 0.38.0 to 0.38.1
## [0.18.0](https://github.com/fluencelabs/aquavm/compare/air-test-utils-v0.17.1...air-test-utils-v0.18.0) (2024-04-15) ## [0.18.0](https://github.com/fluencelabs/aquavm/compare/air-test-utils-v0.17.1...air-test-utils-v0.18.0) (2024-04-15)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "air-test-utils" name = "air-test-utils"
version = "0.18.3" version = "0.18.2"
description = "Test utils for the AIR interpreter" description = "Test utils for the AIR interpreter"
authors = ["Fluence DAO", "Cloudless Labs"] authors = ["Fluence DAO", "Cloudless Labs"]
edition = "2021" edition = "2021"
@ -22,7 +22,7 @@ air-interpreter-interface = { version = "0.19.0", path = "../interpreter-interfa
air-interpreter-sede = { version = "0.1.0", path = "../interpreter-sede" } air-interpreter-sede = { version = "0.1.0", path = "../interpreter-sede" }
air-interpreter-signatures = { version = "0.1.7", path = "../interpreter-signatures" } air-interpreter-signatures = { version = "0.1.7", path = "../interpreter-signatures" }
avm-interface = { version = "0.32.1", path = "../../../avm/interface" } avm-interface = { version = "0.32.1", path = "../../../avm/interface" }
avm-server = { version = "0.38.1", path = "../../../avm/server" } avm-server = { version = "0.38.0", path = "../../../avm/server" }
marine-rs-sdk = "0.14.0" marine-rs-sdk = "0.14.0"
object-pool = "0.5.4" object-pool = "0.5.4"

View File

@ -87,10 +87,6 @@
* dependencies * dependencies
* air-test-utils bumped from 0.18.1 to 0.18.2 * air-test-utils bumped from 0.18.1 to 0.18.2
* The following workspace dependencies were updated
* dependencies
* air-test-utils bumped from 0.18.2 to 0.18.3
## [0.11.0](https://github.com/fluencelabs/aquavm/compare/air-testing-framework-v0.10.1...air-testing-framework-v0.11.0) (2024-04-15) ## [0.11.0](https://github.com/fluencelabs/aquavm/compare/air-testing-framework-v0.10.1...air-testing-framework-v0.11.0) (2024-04-15)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "air-testing-framework" name = "air-testing-framework"
version = "0.11.3" version = "0.11.2"
description = "AquaVM testing framework" description = "AquaVM testing framework"
authors = ["Fluence DAO", "Cloudless Labs"] authors = ["Fluence DAO", "Cloudless Labs"]
edition = "2021" edition = "2021"
@ -14,7 +14,7 @@ name = "air_test_framework"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
air-test-utils = { version = "0.18.3", path = "../air-lib/test-utils" } air-test-utils = { version = "0.18.2", path = "../air-lib/test-utils" }
aquavm-air-parser = { version = "0.12.0", path = "../air-lib/air-parser" } aquavm-air-parser = { version = "0.12.0", path = "../air-lib/air-parser" }
itertools = "0.10.5" itertools = "0.10.5"

View File

@ -1,6 +1,6 @@
[toolchain] [toolchain]
# AquaVM can be built with "stable", "nightly" required only to build Marine tests # AquaVM can be built with "stable", "nightly" required only to build Marine tests
channel = "nightly-2024-07-21" channel = "nightly-2024-02-15"
components = [ "rustfmt", "clippy", "rust-src", "llvm-tools-preview" ] components = [ "rustfmt", "clippy", "rust-src", "llvm-tools-preview" ]
targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "wasm32-wasi", "wasm32-unknown-unknown" ] targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "wasm32-wasi", "wasm32-unknown-unknown" ]
profile = "minimal" profile = "minimal"

View File

@ -148,21 +148,6 @@
* aquavm-air bumped from 0.64.0 to 0.64.1 * aquavm-air bumped from 0.64.0 to 0.64.1
* air-test-utils bumped from 0.18.1 to 0.18.2 * air-test-utils bumped from 0.18.1 to 0.18.2
## [0.9.2](https://github.com/fluencelabs/aquavm/compare/aquavm-air-cli-v0.9.1...aquavm-air-cli-v0.9.2) (2024-07-22)
### Bug Fixes
* **value:** remove unused code ([#850](https://github.com/fluencelabs/aquavm/issues/850)) ([58a5f30](https://github.com/fluencelabs/aquavm/commit/58a5f3046adfce9a8c0db6a04afee55318ab600a))
### Dependencies
* The following workspace dependencies were updated
* dependencies
* avm-server bumped from 0.38.0 to 0.38.1
* air-test-utils bumped from 0.18.2 to 0.18.3
## [0.9.0](https://github.com/fluencelabs/aquavm/compare/aquavm-air-cli-v0.8.0...aquavm-air-cli-v0.9.0) (2024-06-26) ## [0.9.0](https://github.com/fluencelabs/aquavm/compare/aquavm-air-cli-v0.8.0...aquavm-air-cli-v0.9.0) (2024-06-26)

View File

@ -1,6 +1,6 @@
[package] [package]
name = "aquavm-air-cli" name = "aquavm-air-cli"
version = "0.9.2" version = "0.9.1"
edition = "2021" edition = "2021"
description = "AIR execution and printing tool" description = "AIR execution and printing tool"
authors = ["Fluence DAO", "Cloudless Labs"] authors = ["Fluence DAO", "Cloudless Labs"]
@ -17,8 +17,8 @@ avm-interface = { version = "0.32.1", path = "../../../avm/interface" }
air-interpreter-interface = { version = "0.19.0", path = "../../../crates/air-lib/interpreter-interface", default-features = false } air-interpreter-interface = { version = "0.19.0", path = "../../../crates/air-lib/interpreter-interface", default-features = false }
air-interpreter-data = { version = "0.17.2", path = "../../../crates/air-lib/interpreter-data" } air-interpreter-data = { version = "0.17.2", path = "../../../crates/air-lib/interpreter-data" }
air-interpreter-sede = { version = "0.1.0", path = "../../../crates/air-lib/interpreter-sede", default-features = false } air-interpreter-sede = { version = "0.1.0", path = "../../../crates/air-lib/interpreter-sede", default-features = false }
avm-server = { version = "0.38.1", path = "../../../avm/server" } avm-server = { version = "0.38.0", path = "../../../avm/server" }
air-test-utils = { version = "0.18.3",path = "../../../crates/air-lib/test-utils", optional = true } air-test-utils = { version = "0.18.2",path = "../../../crates/air-lib/test-utils", optional = true }
clap = { version = "4.4.7", features = ["derive", "env"] } clap = { version = "4.4.7", features = ["derive", "env"] }
eyre = "0.6.11" eyre = "0.6.11"

View File

@ -28,8 +28,6 @@
unused_unsafe, unused_unsafe,
unreachable_patterns unreachable_patterns
)] )]
// risc0 feature flag is commented out, but the code remains for future experiments
#![allow(unexpected_cfgs)]
mod beautify; mod beautify;
mod data; mod data;