Commit Graph

155 Commits

Author SHA1 Message Date
Ivan Boldyrev
4acfb19e08
Add AIR script to the AquaVM's anomaly data (#280)
Save AIR script to AnomlalyData struct.

Increments versions of `avm-data-store` to 0.3.0 and `avm-server` to 0.22.0.
2022-06-30 16:26:37 +07:00
Mike Voronov
0bdd573de7
Enable derive serde feature for data-store crate (#278) 2022-06-23 15:57:57 +03:00
Mike Voronov
3a84ceb863
Add API to save anomaly data (#277)
This PR adds two new methods in DataStore to determine anomaly and collect necessary data. Additionally
    - a generic parameter of DataStore turned to be associative
    - AVMOutcome contains additionally memory_delta and execution_time
2022-06-23 15:24:00 +03:00
Ivan Boldyrev
6df2b9d084
Introduce TracePos type for trace positions (#273)
Many internal structures refer to trace positions; this is an important type of values. In the code, it is sometimes `u32`, sometimes `usize`. While such variables usually have "_pos" suffix, having a dedicated type does improve code with type guarantees.
2022-06-10 12:29:56 +07:00
Ivan Boldyrev
e0f6fa1b4d
Run tests with sanitizers (#274)
As `wasm32-wasi` target doesn't seem to support sanitizers, we are to
execute tests with native code.  The feature `test_with_native_code` is
introduced for that.

Closes #247.
2022-06-10 12:28:40 +07:00
Ivan Boldyrev
56609c276f
Set an empty subtrace on a fold lore absent in trace (#270)
In the `FoldFSM` and related functions.

Closes #222
2022-06-01 22:00:05 +07:00
Ivan Boldyrev
1c0ff2c979
air-beautifier lib and air-beautify binary (#266)
The `air-beautify` util takes an AIR script input with Lisp-like syntax
and transforms it into experimental indentation-based syntax.

Closing #184.
2022-05-20 21:07:22 +07:00
Ivan Boldyrev
3c23ab735c
Refactor call triplets (#269)
Older grammar allowed some variabilty in triple format.  Now, the only
format allowed is:

  `peer_id (service_id function_name)`

As less errors can happen during parsing of the triplet, the code was
simplified further .

Closes #267.
2022-05-19 19:59:08 +07:00
vms
99d7aa0d93 Fix Display impl for next 2022-05-19 09:53:32 +03:00
Mike Voronov
24f0d66bed
Rename subtree to subgraph (#265)
Intially, a fold instruction was designed based on idea that its iterable can't expand,
so AIR was considered as a subtree. But after introducing recursive streams in #225, it's
no more a subtree, but a subgraph.
2022-05-17 15:53:33 +03:00
Ivan Boldyrev
dbd42cdf3d Fix Display of Fail::Literal
The error message was displayed without quotes.
2022-05-17 15:35:37 +07:00
Ivan Boldyrev
ec3d3a4e6f Fix Display of Value::LastError with lambda
There was a small typo in the `fn display_last_error`.

Closes #263
2022-05-17 12:57:27 +07:00
Ivan Boldyrev
dcfa51c756 Use pooled AVMRunner for tests
Use pooled `avm::server::AVMRunner` instances of
air_iterpreter_server.wasm to reduce tests' running time.  It avoids
repeated WASM loading and compilation.

On my hardware, `cargo test --release` execution time (precompiled)
decreases from almost 6 minutes to 1.5 minutes.
2022-05-16 13:16:28 +07:00
Mike Voronov
7e0c87d72a
Introduce %ttl% (#253) 2022-04-21 11:44:18 +03:00
Mike Voronov
490791b177
introduce %timestamp% (#250) 2022-04-20 23:05:37 +03:00
Mike Voronov
69a42cf111
Introduce new for non iterable scalars (#248) 2022-04-20 11:43:46 +03:00
Mike Voronov
06d275ea16
Improve non iterable scalar scoping (#243) 2022-04-15 22:25:03 +03:00
Mike Voronov
b29883e990
Refactor tests (#231) 2022-03-10 16:06:43 +03:00
Mike Voronov
a64a4fc0a6
support empty array literal in fold (#230) 2022-03-07 13:50:08 +03:00
Mike Voronov
cc54e4c383
Introduce recursive streams (#225) 2022-02-25 23:55:40 +03:00
Mike Voronov
ac050abc8a
Fix ap trace handler behaviour (#224) 2022-02-25 10:24:28 +03:00
Mike Voronov
f994ce73c8
Check scalars in lamda were defined in script (#218) 2022-02-17 23:39:01 +03:00
Mike Voronov
58aef82b1e
Add API for returning interpreter memory size (#210) 2022-01-26 13:37:22 +03:00
Mike Voronov
e6193ea4de
Implement fail with scalars (#205) 2021-12-29 19:51:18 +03:00
Mike Voronov
63160dd0f0
Refactor last error (#202) 2021-12-28 16:59:55 +03:00
Mike Voronov
c1ff7c0688
Print instruction on trace errors (#201) 2021-12-26 22:52:00 +03:00
Mike Voronov
f69b5aa728
Refactor execution errors (#198) 2021-12-21 11:37:35 +03:00
vms
54e383cdaf introduce farewell step; reafactoring 2021-12-17 22:02:16 +03:00
Mike Voronov
8dbae91bda
Introduce fail instruction (#196) 2021-12-16 21:34:27 +03:00
Mike Voronov
1d8182d497
Support scalars in lambda (#192) 2021-12-15 12:46:09 +03:00
Mike Voronov
9f91d3161f
bump fluence-faas version (#193) 2021-12-14 14:01:57 +03:00
Mike Voronov
1141c8e42a
Fix empty array parsing in match/mismatch instructions (#190) 2021-12-13 15:54:10 +03:00
Mike Voronov
d300c8b2fc
Improve subtrace len compute algo (#186) 2021-12-03 14:29:03 +03:00
Mike Voronov
fbbe28c5b2
Cleanup fold iterable while exception (#185) 2021-12-02 14:44:10 +03:00
Mike Voronov
c5c9aefa37
Add test for issue 177 (#183) 2021-11-29 18:35:11 +03:00
Mike Voronov
e13377c5b0
Add test for par ap behaviour (#175) 2021-11-24 18:47:49 +03:00
Mike Voronov
5cd45385b4
Introduce restriction operator for streams (#172) 2021-11-24 17:57:14 +03:00
Mike Voronov
9f47eb9b83
Refactor AIR parser (#168) 2021-11-12 14:12:50 +03:00
Mike Voronov
d9f10cb26d
Deduplicate SecuityTetraplet with marine-rs-sdk (#164) 2021-11-04 16:59:05 +03:00
Mike Voronov
1c55d34981
Use custom logic for lambda instead of json path (#154) 2021-10-18 23:23:30 +03:00
Mike Voronov
4251a36842
decouple instruction tracker to a separate crate (#160) 2021-10-15 14:26:46 +03:00
Mike Voronov
f291c77d26
Update crate info; housekeeping (#153) 2021-10-05 20:08:10 +03:00
Mike Voronov
e99c352a95
Decouple log targets to a separate crate (#152) 2021-10-05 16:55:04 +03:00
Mike Voronov
adba9e8e65
Decouple trace handler (#150) 2021-10-05 14:07:38 +03:00
Mike Voronov
37ed77cb81
Bump versions, add description for data-store (#148) 2021-10-04 18:54:07 +03:00
Mike Voronov
4a4fc0889b
Make interpreter async (#130)
Co-authored-by: folex <0xdxdy@gmail.com>
Co-authored-by: Pavel Murygin <pavel.murygin@gmail.com>
2021-10-04 10:58:00 +03:00
Mike Voronov
d77278761f
Change subtrace_len computation algo in FoldFSM (#138) 2021-09-20 14:49:20 +03:00
Valery Antopol
bb90dd3693
Remove serde version lock on 1.0.118 and serde_json lock on 1.0.61 (#136) 2021-09-15 16:37:38 +03:00
Mike Voronov
3c86d36566
Introduce CRDT data (#74) 2021-08-24 16:14:15 +03:00
vms
e805a861e2 bump avm-server and air-interpreter-interface crates 2021-08-17 21:19:46 +03:00
Mike Voronov
7d98efedf8
move to app-service 0.9.0 (#126) 2021-08-05 22:24:09 +03:00
folex
03074be98f
Particle File Vault (#120) 2021-06-30 18:58:54 +03:00
Mike Voronov
998ee0294b
Improve error message for %last_error% (#119) 2021-06-10 17:08:20 +03:00
Mike Voronov
b2919b1509
Track current peer id in last error (#117) 2021-06-10 10:48:19 +03:00
Mike Voronov
93f71908e0
AIR 0.10.0 (#113)
Co-authored-by: Pavel Murygin <pavel.murygin@gmail.com>
2021-06-03 11:41:25 +03:00
Mike Voronov
3c5e485a5b
Make %last_error% object (#112) 2021-06-02 14:33:21 +03:00
Mike Voronov
6228fcc024
Improve stream validation; add tests (#108) 2021-06-01 18:32:22 +03:00
Mike Voronov
4db2342cff
Do not join on empty streams (#107) 2021-05-28 18:50:43 +03:00
folex
ccba158d81
Mark some crates as publish = false + add CI to publish crates (#105) 2021-05-19 12:43:49 +03:00
Mike Voronov
7cb636a02e
Refactor tests (#104) 2021-05-16 22:52:22 +03:00
Mike Voronov
f9a0b24a56
Move to sdk 0.6.5 (#102) 2021-05-13 12:00:56 +03:00
Mike Voronov
2ac0304d3e
Rename Aqua to AIR, move AVM from FCE (#99) 2021-05-10 14:25:34 +03:00
Pavel
0ddc44bf52
Npm package (#98)
This commit migrates wasm wrapper from JS SDK into the air interpreter package.

Changes include:

* Adding directory for npm package
* Setting up typescript build pipeline
* Renaming package to air-interpreter
* Fixing CI pipelines to support the new build process
* Fixing issue with memory access violation in wasm wrapper
2021-05-05 15:43:50 +03:00
vms
2a408d4ee4
make match work with init_peer_id (#96) 2021-04-29 18:26:13 +03:00
vms
45985bb993
Fix number to jvalue conversion (#94) 2021-04-28 16:05:35 +03:00
folex
fb787cf565 fluence-it-types = 0.3.0 2021-04-27 13:40:32 +03:00
folex
01cdb26c2c Use fluence-it-types from github 2021-04-27 13:37:06 +03:00
vms
7097b25533
Move to BWU (#93) 2021-04-26 14:44:23 +03:00
vms
45fc92ae3d
Use $ to identify streams instead of [] (#79) 2021-03-26 17:13:28 +03:00
vms
9bdd2e3501
Make match work with booleans and numbers (#80) 2021-03-25 16:11:32 +03:00
vms
0b2bfe1b84
Make match mismatch joinable (#77) 2021-03-24 10:00:07 +03:00
vms
52af952dfd
Basic validator for variables (#76) 2021-03-19 19:15:41 +03:00
vms
8a48212d7c
move to the original lalrpop parser (#73) 2021-03-05 16:59:35 +03:00
vms
2744d86c7f
Fix logger (#72) 2021-03-01 11:09:41 +03:00
vms
13f93a0f88
Improve flattening (#69) 2021-02-18 17:30:14 +03:00
vms
e5244db6a1
Rename stepper to interpreter (#67) 2021-02-17 23:36:36 +03:00
vms
271156b5fc
Fix last_error behaviour (#66) 2021-02-16 20:04:00 +03:00
vms
c6d8a458da
Support numbers and booleans (#64) 2021-02-16 09:45:33 +03:00
vms
05499a6bc1
Introduce %last_error% (#63) 2021-02-11 15:39:37 +03:00
vms
709b5e0a52
Introduce mismatch (#62) 2021-02-01 18:53:00 +03:00
vms
7cc248439e
Introduce the match instruction (#60) 2021-01-27 00:37:58 +03:00
vms
f523f27705
Introduce custom lexer (#59) 2021-01-22 18:54:05 +03:00
folex
459615e828
CI: fix release versions calculation (#58) 2021-01-16 21:55:34 +03:00
vms
dabadeb75b
Make xor catch more execution errors; fix joinable behaviour (#57) 2021-01-16 00:40:57 +03:00
folex
96b356a5c8
Fix typo in Cargo.lock (#56) 2021-01-14 20:58:49 +03:00
vms
69141577a8 fix serde version, update sdk and fce versions 2021-01-12 13:07:01 +03:00
vms
710700e0ba
Move to fluence_it_types from wasmer-wit (#53) 2020-12-29 14:11:18 +03:00
vms
f7bba6c8c9
getting rid of %current_peer_id% (#52) 2020-12-28 00:12:11 +03:00
vms
350574d0ec
Allow using ! to flatten inner arrays (#48)
Co-authored-by: folex <0xdxdy@gmail.com>
2020-12-23 19:26:03 +03:00
vms
7241175472
Introduce security tetraplets (#32) 2020-12-22 21:05:04 +03:00
vms
b967a63abc
bump wasmer-wit version (#46) 2020-12-21 19:49:35 +03:00
vms
0f9ec42b1a
New stepper outcome (#39) 2020-12-17 21:44:24 +03:00
folex
bf78530156
Automatically release to crates.io & NPM (#38) 2020-12-16 21:59:11 +03:00
folex
42d2b825e4
Add function to return AST as json (#35) 2020-12-02 18:47:14 +03:00
folex
dde12e2a40
Comments: ignore everything after a semicolon (#30) 2020-11-24 12:40:54 +03:00
vms
0d42ff7fc2
Add support for %init_peer_id% (#24) 2020-11-11 14:31:53 +03:00
folex
186eeb204c
Make iterator in fold resolvable (#23) 2020-11-10 17:30:49 +03:00
folex
f9924bcfb3
Optional call output (#20) 2020-11-09 14:44:04 +03:00
folex
cfd5aa7c40
Add benchmarks for parser cloning & rc cloning (#17) 2020-11-09 14:20:01 +03:00
folex
19ff54e66e
Parser benchmarks (#16) 2020-11-05 16:50:09 +03:00