699 Commits

Author SHA1 Message Date
raftedproc
5afd5cb3a1
feat(execution-engine): aquavm args limits (#811)
* feat(preparation,memory):  AquaVM preparation step now checks input arguments sizes [fixes VM-425]
2024-02-15 19:55:25 +03:00
Ivan Boldyrev
0d53f2bab1
feat(execution-engine): Rc-based JSON value (#813)
Use custom JSON value type with Rc inside.  It cannot be edited, but producing new values based on child element is very cheap.

This new type is used exclusively in AquaVM internals.  Interface APIs use serde_json's Value or JSON strings, as before.
---------

Co-authored-by: raftedproc <71657594+raftedproc@users.noreply.github.com>
2024-02-13 19:11:21 +07:00
raftedproc
f887ddddbc
chore(performance,test): periodic bench results sync (#812) 2024-02-05 10:58:02 +03:00
Ivan Boldyrev
9d4094dc99
chore(performance): use fluence-blake3 with wasm32 SIMD support (#806)
* chore(preformance): use fluence-blake3

Enable wasm32 SIMD on the appropriate target.  It gives a noticeable performance improvement.

The smaller memory size on benchmarks is due to unrelated stack size reduction.
2024-02-04 21:27:49 +07:00
Ivan Boldyrev
47420723bc
feat(cli): use eyre in air-cli (#808)
Instead of `anyhow`, use `eyre` to reduce number of deps.  The `eyre`
crate is already used in `avm-server` and `fluence-keypair`.
2024-01-31 00:43:47 +07:00
raftedproc
9bad40b3d7
feat(performance): reduced stack size (#799) 2024-01-28 16:24:12 +03:00
renovate[bot]
de562b0488
chore(deps): update rust crate eyre to 0.6.11 (#803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 00:49:42 +07:00
Anatolios Laskaris
5c91bb86c4
chore: Remove redundant input (#807)
Fix
2024-01-25 17:22:15 +02:00
fluencebot
d0ca93c231
chore: release master (#797)
* chore: release master

* chore: Bump air-interpreter and air-near-contract version to 0.59.0
avm-client-v0.59.0 air-testing-framework-v0.8.4 avm-server-v0.35.0 air-interpreter-interface-v0.17.2 avm-interface-v0.31.2 air-interpreter-v0.59.0 aquavm-air-cli-v0.6.3 air-v0.59.0 avm-data-store-v0.7.7 air-test-utils-v0.15.1
2024-01-24 20:41:11 +07:00
Valery Antopol
3375c7a3b6
feat(deps)!: update to marine runtime with memory limits and wasmtime (#768) 2024-01-24 17:16:33 +04:00
raftedproc
6c1cb289cc
fix(performance): avoiding particle data printout in errors 2024-01-23 11:50:00 +03:00
raftedproc
755456871a
chore(performance,tests): hybrid workload memory intensive test (#800) 2024-01-22 15:12:34 +03:00
Ivan Boldyrev
44407d2e7a
chore(bench): re-run on MacOS arm64 and Linux x64 (#798) 2024-01-15 21:56:01 +07:00
renovate[bot]
a33e853812
fix(deps): update rust crate marine-rs-sdk to 0.10.3 (#782)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 20:14:57 +07:00
raftedproc
1888de130c
chore(benches): this is a set of RAM intensive benchmarks to understand memory consumption patterns in AquaVM 2024-01-15 15:10:01 +03:00
fluencebot
d7d33ddb7f
chore: release master (#793)
* chore: release master

* chore: Bump air-interpreter and air-near-contract version to 0.58.0

* Set minimal interpreter version to 0.58.0

---------

Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
avm-data-store-v0.7.6 avm-client-v0.58.0 avm-interface-v0.31.1 polyplets-v0.6.0 air-interpreter-interface-v0.17.1 air-interpreter-v0.58.0 aquavm-air-cli-v0.6.2 avm-server-v0.34.2 air-interpreter-data-v0.17.0 air-trace-handler-v0.5.10 air-v0.58.0 air-interpreter-cid-v0.9.0 air-testing-framework-v0.8.3 air-test-utils-v0.15.0
2024-01-11 18:56:03 +07:00
Ivan Boldyrev
d6b1da9bdc
feat(air,air-cli): pretty-printing binary interpreter data (#794)
Add new interpreter method `to_human_readable_data` and `air data` subcommand to convert binary data to JSON with indentation.
2024-01-11 17:46:16 +07:00
Ivan Boldyrev
0a680f8d2e chore(build): break circular dependency
With a legacy syntax hack.
2024-01-09 21:12:21 +01:00
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
renovate[bot]
1def8fc03c
chore(deps): update rust crate anyhow to 1.0.79 (#788)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-09 23:27:35 +07:00
fluencebot
38677832f6
chore: release master (#789)
* chore: release master

* chore: Bump air-interpreter and air-near-contract version to 0.57.0
avm-data-store-v0.7.5 air-test-utils-v0.14.1 avm-server-v0.34.1 air-interpreter-interface-v0.17.0 air-interpreter-v0.57.0 avm-interface-v0.31.0 avm-client-v0.57.0 aquavm-air-cli-v0.6.1 air-v0.57.0 air-testing-framework-v0.8.2
2024-01-09 22:40:00 +07:00
Ivan Boldyrev
17482f078c
chore(build): remove risc-0 from workspace (#791)
It seems that release-please doesn't handle these crates, not updating
dependency versions in the release pull request.

---------

Co-authored-by: Anatoly Laskaris <github_me@nahsi.dev>
2024-01-09 21:14:34 +07:00
Ivan Boldyrev
325eea7e91
feat(interface)!: Use MessagePack for calls (#780)
Top-level structs use multicodec-prefixed MessagePack, the nested
structures (arguments, tetraplets) use just ordinary MessagePack.

* JS-compatible `CallResults`

Binary format implementations like `rmp-serde` do not bother converting keys from strings, unlike `serde_json`.
So, we use `CallResults` with string keys, as JS client cannot produce anything else.

---------

Co-authored-by: Mike Voronov <michail.vms@gmail.com>
2024-01-08 18:01:58 +07:00
Ivan Boldyrev
ccb8f025b7 fix(chore): syntax release-please/manifest.json 2024-01-08 11:35:47 +01:00
fluencebot
0d3ce3bcd9
chore: release master (#771)
* chore: release master

* chore: Bump air-interpreter and air-near-contract version to 0.56.0

* temporary disable risc-0

* remove the risc-0 part from the release-please at all

---------

Co-authored-by: Mike Voronov <michail.vms@gmail.com>
air-interpreter-data-v0.16.0 avm-interface-v0.30.0 air-v0.56.0 air-execution-info-collector-v0.7.12 aquavm-air-cli-v0.6.0 avm-data-store-v0.7.4 air-parser-v0.11.1 avm-client-v0.56.0 air-interpreter-interface-v0.16.0 air-test-utils-v0.14.0 air-interpreter-cid-v0.8.0 air-beautify-wasm-v0.3.7 polyplets-v0.5.2 avm-server-v0.34.0 air-interpreter-v0.56.0 air-testing-framework-v0.8.1 air-trace-handler-v0.5.9 air-beautifier-v0.4.1
2024-01-08 17:32:49 +07:00
raftedproc
ab8a0e032d
chore(docs): an additional doc on fold (#750) 2024-01-04 00:44:44 +03:00
renovate[bot]
ecfabaa02d
chore(deps): update rust crate criterion to 0.5.1 (#746)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 19:13:01 +07:00
raftedproc
c6f157a6e3
feat(air-parser): VM-347 After next validator fold check (#774) 2023-12-28 20:48:16 +03:00
renovate[bot]
518bb95a17
fix(deps): update rust crate marine-call-parameters to 0.10.3 (#781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 20:40:29 +07:00
Ivan Boldyrev
f1c7b43a1e
feat(data)!: values are binary blobs (#775)
* Store deserialize values as raw JSON values

Values are parsed on-demand.
---------

Co-authored-by: Mike Voronov <michail.vms@gmail.com>
2023-12-26 18:42:40 +07:00
raftedproc
b331fa4351
chore(perf): database data update (#779) 2023-12-26 09:35:25 +03:00
renovate[bot]
763bbcb663
fix(deps): update rust crate marine-call-parameters to 0.10.2 (#732)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-26 06:17:42 +07:00
renovate[bot]
b2da9afbdc
fix(deps): update rust crate marine-rs-sdk to 0.10.2 (#770)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-26 04:56:28 +07:00
renovate[bot]
c9a0b87a4c
fix(deps): update rust crate fluence-keypair to 0.10.4 (#752)
* Update ed25519-dalek and rand_chacha to compatible versions
* Make clippy happier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
2023-12-26 04:13:57 +07:00
Ivan Boldyrev
eaa40778c7
feat(avm-client): implement pluggable formats in JS (#776)
For parsing and producing call requests and call results in
AquaVM-compatible way with JSON and MessagePack.

Multicodec representation is also supported, both JSON and MessagePack
can be used as input.
---------

Co-authored-by: Akim <59872966+akim-bow@users.noreply.github.com>
2023-12-25 21:54:26 +07:00
Anatolios Laskaris
674108506b
chore: Fix typos risc0 release please (#778)
* Fixes

* Remove from workspace
2023-12-22 14:39:20 +02:00
Anatolios Laskaris
3577b0fcb1
chore: Add risc0 to release-please (#777)
Add risc0 to release-please
2023-12-22 14:13:39 +02:00
Mike Voronov
26429eaca2
feat(air-cli)!: introduce risc-0 extension (#681) 2023-12-21 16:51:15 +03:00
Mike Voronov
f90e7d48a2
chore(deps): update near-sdk (#772) 2023-12-18 19:45:07 +03:00
Mike Voronov
0a8827bb3c
chore: use resolver 2 and 2021 edition (#769) 2023-12-18 18:48:46 +03: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
fluencebot
17d7ef6c5a
chore: release master (#751)
* chore: release master

* chore: Bump air-interpreter and air-near-contract version to 0.55.0
air-beautifier-v0.4.0 avm-data-store-v0.7.3 air-trace-handler-v0.5.8 air-interpreter-v0.55.0 avm-interface-v0.29.3 air-interpreter-interface-v0.15.2 air-beautify-wasm-v0.3.6 avm-server-v0.33.4 air-parser-v0.11.0 aquavm-air-cli-v0.5.4 air-interpreter-data-v0.15.0 avm-client-v0.55.0 air-test-utils-v0.13.0 air-execution-info-collector-v0.7.11 air-interpreter-cid-v0.7.0 air-testing-framework-v0.8.0 air-v0.55.0
2023-12-13 00:15:36 +07:00
renovate[bot]
05fda3ee16
fix(deps): update rust crate marine-rs-sdk to 0.10.2 (#733)
---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
2023-12-12 23:24:11 +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
renovate[bot]
f1b6c48987
chore(deps): update rust crate multihash to 0.19.1 (#748)
* chore(deps): update rust crate multihash to 0.19.1
* Coordinated update of `cid` and `multihash` crates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
2023-12-08 00:32:16 +07:00
Ivan Boldyrev
2c78fd5f7a
fix(avm-server): make avm_server::RunnerError a public type (#764)
* fix(avm-server): make avm_server::RunnerError a public type
* Make RunnerResult public too
* Remove stale submodule dir
* gitkeep `benches/performance_metering`
2023-12-07 18:29:26 +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
Anatolios Laskaris
97be08e900
chore: Add benchmark workflow (#758)
* Add benchmark workflow

* Do not check for marine artifact

* Cache rust things

* Fix check

* Run on ubuntu latest

* fix

* Fix?

* No timeout

* Run bench on release of air

* Fix

---------

Co-authored-by: raftedproc <71657594+raftedproc@users.noreply.github.com>
2023-11-25 13:38:02 +02:00