22 Commits

Author SHA1 Message Date
Ivan Boldyrev
2e0b54c2d4
feat(data)!: Rkyv for InterprerterData (#783)
* Refactor out the `InterpreterDataEnvelope`

It is an envelope for the data that makes `version` info accessible in
standard non-changing way.  Inner data in `InterpreterDataEnv` is a binary blob.

* Use `rkyv` for `InterpreterData`
* `InterpreterDataEnvelope` uses MsgPack directly

It will be changed when `interpreter-sede` will support types with serde borrows.
2024-01-10 00:22:11 +07:00
Ivan Boldyrev
771d42dec4
feat(data)!: flexible serialization formats (#757)
New crate air_interpreter_sede introduces a flexible serialization and deserialization infrastructure.

Low level API: the Format trait and related. It includes simple and universal mechanisms for serializing any possible (e.g. implementing the Serde traits) value.

High level API: Representation trait and related. It allows declaring representation types that can serialize and deserialize only certain types (for example, InterpreterDataRepr can serialize only the InterpreterData, but deserialize InterpreterData and Versions` types), producing newtype values as serialization results.

The serialized representation of CallResults now contains byte arrays, not strings, because the new infrastructure serializes to byte arrays only.

Also, the basic support for multicodecs is added.
2023-12-15 21:23:09 +07:00
Ivan Boldyrev
1673cdf06c
feat(air-parser)!: optimize Instruction type layout (#767)
Instead of being boxed for each node, the `Instruction` type contains a boxed variable-size elements.  Thus `Instruction` is quite lean, and the allocator deals with variable-sized elements.

Total number of allocations is more or less same, but less space is wasted for unused memory: previously the Instruction's size was 112 bytes in WASM, now it is 16.

It reduces memory consumption on large AIR scripts (heap size decreased from 7.7MiB to 4.625MiB in parser-10000-100, and for the new parser-calls-10000-100 benchmark, it decreased from 5.115MiB to 4.375MiB).

This is a breaking change as the API changes (though the code that navigates the parsed tree generally should work as is).
2023-12-12 19:50:41 +07:00
Ivan Boldyrev
a5b520d6fe
chore(benchmark): clear stale benchmark data (#763)
* chore(benchmark): clear stale benchmark data

Originally, benchmark util merge benchmark data, i.e. only inserted new
data in the benchmark store.  However, sometimes benches disappear, and
incorrect information is stored for them (i.e. AquaVM version which is
per-machine).

However, sometimes this functionality is useful, when you want to add a
new benchmark without running all the others.  For such case,
`aquavm_performance_metergin run --unsafe-merge-results` option is
added.

* Restore the `null` benchmark

* Do text report generation exactly one time

It was regenerated from 0 to N times before, and it is wrong.
2023-12-04 20:26:22 +07:00
Ivan Boldyrev
7428cb39b3
chore(benchmark): restore parser-10000-100 bench (#762)
A benchmark with empty datas that has long AIR code with lot of variable (re-)assignments.
2023-11-30 20:33:41 +07:00
Ivan Boldyrev
2b83ad1755
chore(benchmarks): call-requests and call-results benchmarks (#759) 2023-11-28 00:01:14 +07:00
raftedproc
a8965e04ec
chore(benchmarking): data generators for a set of map-related benchmarks [fixes VM-345] (#735) 2023-11-08 16:22:17 +03:00
Ivan Boldyrev
5b6533bef1
chore(benches): update benchmarks after 1024 stream limit (#728) 2023-10-20 21:00:19 +07:00
Ivan Boldyrev
8a07613027
feat(aquavm-air)!: signature checking (#607) 2023-10-13 22:19:02 +03:00
Anatolios Laskaris
bc4cc68b64
chore: Fix typo in Cargo.toml (#693)
Fix typo in Cargo.toml
2023-09-05 11:23:26 +03:00
Valery Antopol
4b4e3bde83
feat: updating marine-rs-sdk minor version (#667)
* 1st polyplets update: minor marine-rs-sdk-main bump

* renovate manifest update

* update marine-rs-sdk

* update marine runtime

* bump minor versions
2023-08-09 22:11:45 +03:00
Mike Voronov
d5a3f768af
chore: remove fstrings dep (#627)
* remove fstrings dep

---------

Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
2023-07-14 20:02:19 +07:00
Ivan Boldyrev
8ce8af3823
feat(avm-server,air-interpreter,aquavm-air)!: secret key and particle ID arguments (#593)
* feat(avm-server)!: keypair and particle ID arguments

Add `&fluence_keypair::KeyPair` argument to `AVM::call` and
`AVMRunner::call`.  This value is further forwarded in a deconstructed
form to WASM Air interpreter, but is not used there yet. Also,
`AVMRunner::call` gets `particle_id: String` argument.

feat(air-interpreter)!: `invoke` methods have three new arguments:
`key_format: u8`, `secret_key_bytes: Vec<u8>` and `paritcle_id: String`.

feat(aquavm-air): `air::execute_air` has two three arguments:
`key_format: u8`, `secret_key_bytes: Vec<u8>` and `paritcle_id: String`.

feat(aquavm-air-cli)!: add `--random-key`/`--ed25519-key file` options to AIR CLI.

* feat(avm-server)!: Add `RunnerError::KeypairError`

* chore(bench): Add signature performance benchmarks

These benchmarks contain valid signature, so they should work with
verification out of the box.

---------

Co-authored-by: Artsiom Shamsutdzinau <shamsartem@gmail.com>
Co-authored-by: folex <0xdxdy@gmail.com>
2023-06-23 03:12:37 +07:00
Ivan Boldyrev
d155bc7610
chore(benches): update benchmark data to new format (#559)
* feat(aquavm-air-cli): `run` fails if AquaVM fails
Unless `run --no-fail` is provided.  It will make benchmarks fail
on errors, unless you provide `--no-fail` to specific benchmark.

* Fix dashboard and network_explore benches
* Convert benchmark data to new format
* `performance_metering`: use dirs only

Ordinary files like README.md are not considered to be a benchmark.

* Update `benches/performance_metering/README.md`

* Fix performance report

Looks like performance reports was merged in wrong order: data is not
sorted by machine ID.  The sorting is needed for stable diffs.

* Run benchmarks on Macbook Air M1
2023-04-11 02:27:32 +07:00
renovate[bot]
2c8d02d271
chore(deps): update rust crate serde to 1.0.158 (#536)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-21 00:28:18 +07:00
Ivan Boldyrev
a96a52db27
chore: fix some Cargo.tomls (#521)
* chore: fix some Cargo.tomls

* chore: publish `air-testing-framework`

As it is a dev dependency to `aquavm-air` crate.
2023-03-15 21:28:10 +07:00
renovate[bot]
eb1425de25
chore(deps): update rust crate serde to 1.0.155 (#508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-12 14:35:50 +07:00
renovate[bot]
16265f97b0
chore(deps): update rust crate serde to 1.0.154 (#506)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-11 13:28:15 +03:00
renovate[bot]
c985e39824
chore(deps): update rust crate serde_json to 1.0.94 (#499)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-07 11:04:55 +03:00
renovate[bot]
91189a1d9d
chore(deps): update rust crate serde_json to 1.0.93 (#462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-13 12:17:52 +03:00
renovate[bot]
84af9c6185
chore(deps): update rust crate serde_json to 1.0.92 (#448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-06 16:44:20 +03:00
Ivan Boldyrev
5fdc8e68ac
feat(tools): VM-194 performance metering (#440)
* Experimental performance metering
* Average on repeated runs with `--repeat` option
* Add "version" field to the report
The version is got from `air/Cargo.toml`.

* Allow disabling preparing binaries
with the `--no-prepare-binaries` option.

* Human-readable execution time in the report

* Add dashboard benchmark
* Human-readable text report
2023-02-03 23:26:06 +07:00