Go to file
renovate[bot] db96111c37
chore(deps): update rust crate ed25519-dalek to v2.1.1 (#855)
chore(deps): update rust crate ed25519-dalek to v2.1.1

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 22:53:11 +07:00
.cargo feat(performance): reduced stack size (#799) 2024-01-28 16:24:12 +03:00
.config chore: Update E2E [fixes FLU-297 and FLU-252 and FLU-298] (#557) 2023-03-31 13:03:23 +03:00
.github chore: release master (#849) 2024-07-23 02:43:42 +07:00
air chore: release master (#846) 2024-07-22 20:07:07 +07:00
air-interpreter chore: release master (#846) 2024-07-22 20:07:07 +07:00
avm chore: release master (#849) 2024-07-23 02:43:42 +07:00
benches feat(air)!: change fold over canon map iterator contents [fixes VM-620] (#843) 2024-06-25 13:39:16 +01:00
crates chore: release master (#849) 2024-07-23 02:43:42 +07:00
docs chore(docs): an additional doc on fold (#750) 2024-01-04 00:44:44 +03:00
images Update readme (#260) 2022-05-14 17:12:48 +03:00
junk chore: change license to AGPL-3 (#844) 2024-06-26 12:34:36 +03:00
tools chore: release master (#849) 2024-07-23 02:43:42 +07:00
.gitignore chore(benchmarking): data generators for a set of map-related benchmarks [fixes VM-345] (#735) 2023-11-08 16:22:17 +03:00
Cargo.lock chore(deps): update rust crate ed25519-dalek to v2.1.1 (#855) 2024-08-08 22:53:11 +07:00
Cargo.toml feat(runtime)!: switch to async marine (#815) 2024-04-15 19:17:17 +04:00
CHANGELOG.md feature(execution-engine): Canon data with CID (#419) 2023-01-09 13:22:57 +07:00
Config.toml Rename Aqua to AIR, move AVM from FCE (#99) 2021-05-10 14:25:34 +03:00
CONTRIBUTING.md chore: change license to AGPL-3 (#844) 2024-06-26 12:34:36 +03:00
FluenceCLA.md chore: change license to AGPL-3 (#844) 2024-06-26 12:34:36 +03:00
LICENSE chore: change license to AGPL-3 (#844) 2024-06-26 12:34:36 +03:00
next-hardfork-changes.md chore(docs): add more upcoming data changes (#450) 2023-02-07 21:09:22 +03:00
README.md chore: change license to AGPL-3 (#844) 2024-06-26 12:34:36 +03:00
rust-toolchain.toml chore: Rust channel update dedicated to panamerican Engineer's Day (#847) 2024-07-22 22:16:34 +07:00

AquaVM

crates.io version npm version Coverage Status

AquaVM executes compiled Aqua, i.e., Aqua Intermediate Representation (AIR) scripts, and plays an integral role in the implementation of the Fluence peer-to-peer compute protocol. Specifically, AquaVM allows expressing network choreography in scripts and composing distributed, peer-to-peer hosted services. Moreover, AquaVM plays a significant role in facilitating function addressability in the Fluence network, see Figure 1.

AquaVM & AIR model

Figure 1: Stylized AquaVM And AIR Model

Since AquaVM compiles to Wasm, it can run in both client, such as browsers and Node.js apps, and server environments.

AquaVM: Interpreter Execution Model

AquaVM's execution model facilitates Fluence protocol's data push model implemented as a particle, i.e., a smart packet comprised of data, AIR, and some metadata. In this context, AquaVM can be viewed as a pure state transition function that facilitates particle updates, which includes state management of particle data by taking previous and current state to produce a new state and an updated list of peers and call requests in the remaining AIR workflow. In addition to local service call execution, AquaVM handles requests from remote peers, e.g., as a part of a parallel execution block, to call local services and handle the future response, see Figure 2.

interpreter execution model

Figure 2: AquaVM Interpreter Execution Model

In summary, the AquaVM execution model handles the topological hops for simple and advanced composition patterns, such as (async) parallel service execution on one or multiple peers.

Aquamarine Intermediate Representation (AIR): IR for P2P Systems

AIR is an S-expression-based low-level language with binary form to come. It currently consists of fourteen instructions with more instructions to come. Semantics of AIR is inspired by π-calculus, λ-calculus, and category theory. Its syntax is inspired by Wasm Text Format (WAT) and Lisp. AIR scripts control the Fluence peer-to-peer network, its peers and even resources on other (p2p) networks, such as IPFS and Filecoin, e.g., Fluence IPFS library through Marine adapter services.

A description of AIR values and a list of AIR instructions together with examples of their usage can be found here. The main properties of AIR and its interface are discussed here.

A complete list of AIR instructions with examples of their usage can be found here. The fundamental contracts of the AquaVM interface, along with a more detailed interaction scheme can be found here.

Repository Structure

  • air is the core of AquaVM
  • air-interpreter is a crate to support different compilation targets (Marine and wasm-bindgen)
  • avm
    • client is an AquaVM launcher for browser and Node.js targets
    • server is an AquaVM launcher for server-side targets
  • crates
    • air-lib contains all main crates for the core of AquaVM
    • beautifier is an implementation of AIR-beautifier
    • data-store defines a DataStore trait used by the Fluence node
    • interpreter-wasm is a crate for better integration of compiled Wasm code into the Fluence node
    • testing-framework is an implementation of the framework that improves test writing experience
  • tools contains AquaVM-related tools

Support

Please, file an issue if you find a bug. You can also contact us at Discord or Telegram. We will do our best to resolve the issue ASAP.

Contributing

Any interested person is welcome to contribute to the project. Please, make sure you read and follow some basic rules.

License

All software code is copyright (c) Fluence DAO under the AGPLv3 license.