* support call_parameters v2
* remove old comment
* use released marine
* fix test wasm
* update sdk marine use lens
* fix test module
* WIP fixing the tests to use lens
* WIP tetraplet field renaming test fixes
* rename more lambda to lens
* fix build
* Fix gen-bench-data compilation
* Update gen-bench-data Cargo.lock
* Fix signature tests
---------
Co-authored-by: drrtuy <roman@fluence.one>
Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
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>
* 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.
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.
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).
* 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.