* chore: release master
* chore: Bump air-interpreter version to 0.40.0
* feat(aquavm-air): Set minimal supported version to 0.40.0
---------
Co-authored-by: Ivan Boldyrev <ivan@fluence.one>
* 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>
* feat(air-interpreter-signatures): use (de)serialize_with
Wrapper types do not hold strings anymore, but use `(de)serialize_with`
serde attributes to parse keys and signatures during parse time.
`PublicKey` and `Signature` traits implement `Deref` trait that returns
the inner value.
A peer signs the multiset of call results and canon results it has produced.
New field signatures, a map from peer public key to signature, is added to the interpreter data.
Signatures verification is yet to be done.
* `ValueAggregate` refactoring
0. Service results, canon results and literals are constructed as
separate types that are further wrapped with `ValueAggregate`.
1. `ValueAggregate` is enum that contains all the provenance info.
2. Construction methods get provenance information as well.
* Rename CID state field
Prepare to adding a canon CID field: rename `canon_tracker`/`canon_store`
to `canon_element_tracker`/`canon_element_store`.
* Add canon result store/tracker
* Rename some structs that have CIDs inside
Reflect explicitly that they contain CIDs inside:
`CanonResultAggregate` -> `CanonResultCidAggregate`
`ServiceResultAggregate` -> `ServiceResultCidAggregate`
---------
Co-authored-by: Mike Voronov <michail.vms@gmail.com>
BREAKING CHANGE:
1. Call values in the trace have CID references to structures that have call arguments' hash and CID references to values and tetraplets.
2. If call value is unused, it is serialized with `Unused` variant, and CID references are not stored.
Previous data scheme was (Scalar as an example, other cases are similar):
```
Scalar(CID<JValue>) ---<value_store>----> JValue
```
New data scheme is much more sophisticated:
```
Scalar(CID<ServiceResultAggregate>) ---+
|
+----<service_result_store>----------+
|
+-------> ServiceResultAggregate:
value_cid ------------<value_store>----> JValue
tetraplet_cid --------<tetraplet_store>----> SecurityTetraplet
argument_hash: String
```
`Stream` variant is similar, however, `Unused` is different: it has value CID only, but the value is not stored into the `value_store`:
```
Unused(Rc<CID<JValue>>) ---> X
```
Co-authored-by: Mike Voronov <michail.vms@gmail.com>
* feat(tools): merge some tools into the `air` CLI tool
`air-beautify` and `air-trace` are merged into a single `air` tool. Its
crate name is `fluence-air-cli` as otherwise it confilicts with `air`
interpreter crate. The tool has subcommands `beautify`, `run`
and `stats`.
* Add one-letter aliases to `air` CLI subcommands
+ `air beautify` => `air b`
+ `air run` => `air r`
+ `air stats` => `air s`
---------
Co-authored-by: Mike Voronov <michail.vms@gmail.com>
* Revert "chore: release master (#484)"
This reverts commit 4ae3afc0daf5f791f08742c1d250bb5b191852f6.
* Revert "fix(air-trace): set correct air verison (#486)"
This reverts commit c10f89b5e5856ed155da1dcb4784e73d63cc1bea.
* Disable link version
* Fix air