Skip to content

Commit

Permalink
base implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Nov 14, 2024
1 parent 2b26392 commit f0feec8
Show file tree
Hide file tree
Showing 20 changed files with 925 additions and 233 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- master
tags:
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.*'
pull_request:
branches:
- master
- develop
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.?*'

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- master
tags:
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.*'
pull_request:
branches:
- master
- develop
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.?*'

env:
CARGO_TERM_COLOR: always
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
- develop
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.?*'

env:
CARGO_TERM_COLOR: always
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- master
tags:
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.*'
pull_request:
branches:
- master
- develop
- 'v[0-9]+[.0-9]*'
- 'v[0-9]+.?*'

env:
CARGO_TERM_COLOR: always
Expand Down
10 changes: 5 additions & 5 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
edition = "2021"
style_edition = "2021"

max_width = 120
array_width = 120
attr_fn_like_width = 120
max_width = 100
array_width = 100
attr_fn_like_width = 100
comment_width = 100
chain_width = 60
fn_call_width = 120
single_line_if_else_max_width = 120
fn_call_width = 100
single_line_if_else_max_width = 100
struct_lit_width = 60

fn_single_line = true
Expand Down
63 changes: 31 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ categories = ["algorithms", "cryptography", "science"]
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.77.0" # Due to `rustfix`
rust-version = "1.77.0"
exclude = [".github"]

[lib]
Expand All @@ -19,12 +19,10 @@ crate-type = ["cdylib", "rlib"] # We need this for WASM

[dependencies]
amplify = "~4.8.0"
baid64 = "~0.3.0"
strict_encoding = "~2.8.0"
strict_types = "~2.8.0" # TODO: Make strict types optional, used only in STL
aluvm = { version = "~0.12.0-beta.1", features = ["zk-aluvm"] }
zk-aluvm = "~0.12.0-beta.1"
commit_verify = { version = "~0.12.0-alpha.2", features = ["derive"] }
single_use_seals = "~0.12.0-alpha.2"
serde = { version = "1", features = ["derive"], optional = true }

[features]
Expand All @@ -33,13 +31,13 @@ all = ["stl", "serde", "chf-sha256"]

chf-sha256 = []

stl = ["commit_verify/stl", "aluvm/stl", "strict_types/armor"]
stl = ["commit_verify/stl", "strict_types/armor"]
serde = [
"dep:serde",
"amplify/serde",
"strict_types/serde",
"commit_verify/serde",
"aluvm/serde",
"zk-aluvm/serde",
]

[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand All @@ -52,3 +50,7 @@ wasm-bindgen-test = "0.3"

[package.metadata.docs.rs]
features = ["all"]

[patch.crates-io]
aluvm = { git = "https://github.com/AluVM/rust-aluvm", branch = "v0.12" }
zk-aluvm = { git = "https://github.com/AluVM/zk-aluvm" }
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ global memory. This had opened a door for the all the vulnerabilities and hacks
computer systems across the world for the past decades... CAM model instead, divides all memory into
parts (called *words*) addressable only with some access token (called *capability*). You may think
of this as of a memory where each part is "owned" by certain party, and can be accessed or modified
only given a proof of ownership (that is what single-use seals are for).
only given a proof of ownership.

**UltraSONIC** leverages zk-AluVM, so it is (1) zk-STARK-compatible and (2) exception-less, made
with category theory in mind.

## Ecosystem

SONARE is a part of a larger ecosystem used to build safe distributed software, which includes:

- [Strict types]: strong type system made with [generalized algebraic data types][GADT] (*GADT*) and
[dependent types];
- [AluVM]: a functional register-based virtual machine with a reduced instruction set (RISC);
Expand Down Expand Up @@ -57,10 +58,13 @@ or implied. See the License for the specific language governing permissions and
the License.

[Strict types]: https://strict-types.org

[AluVM]: https://aluvm.org
[SONARE]: https://github.com/AluVM/SONARE
[Cation]: https://cation-lang.org

[Contractum]: https://contractum.org

[GADT]: https://en.wikipedia.org/wiki/Generalized_algebraic_data_type

[dependent types]: https://en.wikipedia.org/wiki/Dependent_type
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Atack = "Atack"
[default]
extend-ignore-re = [
# Don't correct URIs
"([a-z]+:)*[$!0-9A-Za-z-]+",
"([a-z]+:)*[.~0-9A-Za-z-]+",
]
Loading

0 comments on commit f0feec8

Please sign in to comment.