Commit Graph

493 Commits

Author SHA1 Message Date
Anatoly Laskaris
e6443df591
ci: Use new version format in E2E workflow (#345)
* Use new version format

* Test

* Lock version

* Cleanup
2022-09-29 17:14:40 +03:00
renovate[bot]
35a4fe4451
fix(deps): update rust crate clap to v4 (#344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-29 03:45:06 +03:00
Ivan Boldyrev
4a2e8be178
refactor(parser): use AirPos type for AIR script position (#341)
Use a dedicated wrapper type for better type safety and self-documented code.
2022-09-29 00:16:37 +03:00
Mike Voronov
c85b2e2fbf
feat(execution-engine): change behaviour of fold over streams (#340)
feat(execution-engine): change behaviour of fold over streams

Change behaviour of fold over streams to make it more similar to pi-calculus channels/names (for more info see #333).

Closes #333.

BREAKING CHANGE:

The new stream behaviour is not compatible with old one, such as
```
(fold $stream iterator
   (seq
       (call ...)
       (next iterator)))
```
will never end after this change (for more info again see #333).
2022-09-28 22:03:54 +03:00
renovate[bot]
493b469257
chore(deps): update dependency typescript to v4.8.4 (#343)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-28 02:04:28 +03:00
Anatoly Laskaris
61cc3ffc2c
ci: Add Aquavm E2E (#324) 2022-09-20 18:25:55 +03:00
Ivan Boldyrev
b929614b4c
wasm-air-beautify WASM module (#325)
It provides a `beautify` method to output a "beautified"
(python-style formatted) AIR script.

The method returns a string or raises an exception.
2022-09-19 19:31:12 +07:00
Mike Voronov
20bb230a3a
Introduce never instruction (#335) 2022-09-19 14:36:46 +03:00
renovate[bot]
250b316682
Update dependency typescript to v4.8.3 (#322)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-19 14:20:03 +03:00
renovate[bot]
ad504bce8b
Update all non-major Rust dependencies (#330)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-19 14:07:34 +03:00
Mike Voronov
84e36747d8
fix(execution-engine): change position mappings in ap with canon streams (#332)
Fix sheme of mapping variables produced by applying `ap` to canonicalized streams.

Fixes #331.
2022-09-14 19:33:21 +03:00
Anatoly Laskaris
ca62bd6066
chore: release (#329) 2022-09-13 19:08:47 +03:00
renovate[bot]
40bb3c843f
Update all non-major Rust dependencies (#323)
* Update all non-major Rust dependencies

* bump fluence-app-service version

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valery Antopol <valery.antopol@gmail.com>
2022-09-13 19:03:18 +03:00
Ivan Boldyrev
89355d9da3
style: Misc clippy fixes (#327)
* Add warn(rust_2018_idioms) to remaining crates
 air-beautifier, air-beautify and air-trace now have this lint too.

* Fix more warnings
2022-09-13 20:54:57 +07:00
Valery Antopol
204b2be44d
Bump avm-server version to 0.26.0 (#317) 2022-09-09 16:56:03 +03:00
Pavel
698dbbb263
AVM client: Replace any with generic JSON types (#320) 2022-09-09 16:41:30 +03:00
Anatoly Laskaris
7a146501a5
Use rust-toolchain to setup rust (#318) 2022-09-09 16:34:19 +03:00
renovate[bot]
a77fb3395c
Update all non-major Rust dependencies (#321) 2022-09-09 13:36:19 +03:00
Mike Voronov
a4011ef038
Introduce length functor (#314) 2022-09-08 16:58:04 +03:00
Mike Voronov
626796b299
fix clippy warnings (#319) 2022-09-08 16:32:28 +03:00
Pavel
a2f996dde2
Fix issue when undefined data in AVM client caused FJS to fail (#313) 2022-09-07 12:55:23 +03:00
renovate[bot]
b4195175db
Update all non-major Rust dependencies (#309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Anatoly Laskaris <github_me@nahsi.dev>
2022-09-07 12:10:07 +03:00
Mike Voronov
2784d8a51f
bump wasm-bindgen (#316) 2022-09-07 11:38:49 +03:00
renovate[bot]
6a2d591721
Update dependency typescript to v4.8.2 (#312)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-07 11:32:46 +03:00
Anatoly Laskaris
f32f23b610
Temporarily ignore wasm-bindgen dependency bump (#311) 2022-09-06 11:01:41 +03:00
Mike Voronov
e5d9681beb
Fix fold over canon streams (#307) 2022-09-06 10:53:33 +03:00
Ivan Boldyrev
0ddcfb94ea
Bug: join behavior on CanonStream (#305)
The AquaVM returned an error instead of joining.

Resolves #304
2022-09-06 14:32:15 +07:00
renovate[bot]
66711c40f5
Configure Renovate (#288)
* Add renovate.json

* Update renovate config

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Anatoly Laskaris <github_me@nahsi.dev>
2022-09-06 09:38:45 +03:00
Ivan Boldyrev
619e8829a9
Get rid of unsafe code in the interpreter (#303)
* Get rid of unsafe code unless really necessary

* Add lint levels where appropriate

Some crates (air-beautifier, air-testing-framework) have lot of
rust_2018_idioms violations, that will be resolved later.
2022-09-06 00:03:30 +07:00
Mike Voronov
1cb6901caa
Populate restricted streams generations from data (#301) 2022-09-05 17:57:26 +03:00
Anatoly Laskaris
2d400b4028
Bump marine-runtime to 0.20.0 (#299) 2022-09-02 14:32:04 +03:00
Ivan Boldyrev
513eb0e126
Testing framework, chapter I (#293)
Testing framework for AquaVM

Its primary features are:
1. It generates services declaratively by annotation in the comments inserted just after calls.
2. Ephemeral network keeps each node's data and incoming data queue.  The network can be also generated based on peer IDs featured in the script.
3. One can explicitly add additional peers and services.

The example of the script annotations:
```
(seq
  (call "peer_1" ("service" "func") [] var) ; ok=42
  (call "peer_2" ("service" "func") [var]) ; err={"ret_code": 1, "result":"no towel"}
)
```

Passing this script to `air_test_framework::TestExecutor::new(...)` will create a virtual network with peers "peer_1" and "peer_2" (and any peer you provide in the `TestRunParameters`), and the particular calls will return respective values.

Please note that autogenerated services use modified service name as a side channel for finding a correct value: "..{N}" is added to each service name (two dots and serial number).  Be careful with service names taken from a variable.
2022-09-01 18:12:55 +07:00
Mike Voronov
5072fba9d6
Introduce canon instruction (#292) 2022-08-26 00:43:43 +03:00
Ivan Boldyrev
5c7e88e0f2
Refactor avm-server interface mod to new crate (#294)
* Refactor `avm-server` interface mod to new crate (#294)

The new crate name is `avm-interface`.

It allows to build fully native air-trace, including pure WASM build.

* Make fully native air-trace build

Unless `wasm` feature is enabled (default), fully native build is
produced.  You may build WASM air-trace binary with

`cargo build --target wasm32-wasi --no-default-features --release -p air-trace`

* Fix tracing output on native air-trace build

Wrong option was used.
2022-08-19 16:29:21 +07:00
Mike Voronov
dcab0023d8
fix bug with ap merger #295 (#296) 2022-08-18 22:31:29 +03:00
Mike Voronov
0d9390d333
make clippy happy (#291) 2022-08-10 12:27:06 +03:00
Mike Voronov
e884210d35
remove jsonpath filter option (#290) 2022-08-09 00:30:33 +03:00
Ivan Boldyrev
0c387f7415
Adjust air-trace options (#289)
1. Introduce --runner-tracing-params for enable and disable tracing of runner.
2. Adjust some function's tracing levels to make default traces less noisy.
2022-08-04 20:51:54 +07:00
Valery Antopol
52f0390eb8
Update marine-rs-sdk to 0.7.0 to fix memory leak (#287) 2022-07-27 16:40:27 +03:00
Ivan Boldyrev
7d46ae914d
Introduce tracing_benches.sh script (#285)
It accepts two arguments: `big`/`long` test type and `merge`/`nomerge`
test subtype.  Any of arguments can be replaced with `--all` value.
2022-07-15 22:14:08 +07:00
Ivan Boldyrev
5ec72d54c6
air-trace readme and refinements (#284)
1. change names to use kebab naming:
`--call_results` -> `--call-results`
`--prev_data` -> `--prev-data`
2. rename `--runtime` option to `--interpreter`, and the associated env variable to `AIR_INTERPRETER_WASM_PATH`.
3. print trace into to stderr

Refs: VM-113.

Co-authored-by: ValeryAntopol
2022-07-14 19:35:24 +07:00
Valery Antopol
8bd4aa5783
Add a workaround for wasm memory leak (#282)
* Add a workaround for wasm memory leak

* fmt
2022-07-08 17:29:26 +03:00
Ivan Boldyrev
0eb37800b6
AquaVM benchmarks (#283)
* Fix stale benchmarks
* Data (de)serialization and execution benchmarks:

Two kind of benchmark: relatively short, but with huge call results, and
long trace of small call results.  Moreover, there are two case for each:
with same data to be merged with comparison, and data from different
par branches merged w/o comparison.
2022-07-08 21:07:04 +07:00
Ivan Boldyrev
c3cea695c8
air-trace util for measuring AquaVM performance with tracing crate.
`air-trace run` subcommand allows to run AquaVM on any data, it allows to define most AquaVM inputs, providing defaults for most of them, and sets up either human-readable or JSON tracing output, the latter can be later processed by `air-trace stats`.

Anomaly data input is also supported, that is useful for slow data investigation.

Native execution mode can be used for native profiling.  Please note, however, that current version cannot be built natively on Apple Sillicon processor yet, as invariably depends on the `avm-server` because of leaking types that should be refactored or hidden.  The `--repeat` option can repeat the execution several times for the execution to dominate on input data reading and output.

High-level or rare calls have "info" trace level, instructions are "debug", and sub-instruction calls are "tracing".  Over-detailed tracing can induce overhead that spoils timing data.
2022-07-07 18:44:58 +07:00
Anatoly Laskaris
4201ecce6b
Migrate air workflow to github-actions (#281) 2022-07-01 16:48:39 +03:00
Ivan Boldyrev
4acfb19e08
Add AIR script to the AquaVM's anomaly data (#280)
Save AIR script to AnomlalyData struct.

Increments versions of `avm-data-store` to 0.3.0 and `avm-server` to 0.22.0.
2022-06-30 16:26:37 +07:00
Mike Voronov
cc4fba4455
Document import scheme and doc comment style (#268) 2022-06-29 22:23:33 +03:00
Mike Voronov
0bdd573de7
Enable derive serde feature for data-store crate (#278) 2022-06-23 15:57:57 +03:00
Mike Voronov
3a84ceb863
Add API to save anomaly data (#277)
This PR adds two new methods in DataStore to determine anomaly and collect necessary data. Additionally
    - a generic parameter of DataStore turned to be associative
    - AVMOutcome contains additionally memory_delta and execution_time
2022-06-23 15:24:00 +03:00
Ivan Boldyrev
090eceef85
Get rid of unconditional logging code (#276)
The `log_instruction` macro unconditionally pre-formatted some string to
be logged, even if logging is disabled, making whole AquaVM very slow.

After getting it fixed, native execution time dropped from 5sec to
thousands of milliseconds.
2022-06-22 16:25:22 +07:00