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>
* fix(air): Fold-over-scalar values had wrong lambda
Previously, iterator values in fold over scalar inherited tetraplet from
the scalar. But for security guarantees, they should have `.[N]` lambda
added, where N is an element index.
When fold iterates over canon or stream, elements keep their original
tetraplet; tests for that is added.
* 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
* Test
* Fix
* Fix
* Use new workflows
* No cache
* Typo
* Rename Run tests to ci
* Some renaming?
* Renaming
* Add nextest config
* Test e2e on label
* Test
* Fix
* Fixes
* Update
* Fix
* Fix
* Fix name
* Fix
* Rename report
* Fix aquavm-air-cli release-please config
* Print a prompt when AIR is read from stdin
* Make `run --plain --data` arg optional
* Rename `... --data` to `... --current-data`
* Update AIR cli README
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>