Skip to content

Commit

Permalink
init with sync circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Aug 19, 2023
0 parents commit 6754019
Show file tree
Hide file tree
Showing 43 changed files with 8,380 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on:
pull_request:
branches:
- main
push:
branches:
- main

env:
CI: 1
CARGO_INCREMENTAL: 1

jobs:

test:
name: build-and-test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Install latest nightly-2022-10-28
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2022-10-28
override: true
components: rustfmt
- name: Check
run: cargo check --all
- name: Check
run: RUST_LOG="preprocessor,eth-types,gadgets,zkcasper-circuits=debug" cargo test --release test_super_circuit
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb


# Added by cargo

/target
node_modules

/zkcasper-circuits/build
/zkcasper-circuits/params
41 changes: 41 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[workspace]
members = ["zkaltair-circuits", "eth-types"]

# Definition of benchmarks profile to use.
[profile.bench]
opt-level = 3
debug = false
debug-assertions = false
overflow-checks = false
rpath = false
lto = "thin"
incremental = false
codegen-units = 1

[profile.release]
opt-level = 3
debug = false
debug-assertions = true
overflow-checks = true
rpath = false
lto = "thin"
incremental = true

[patch."https://github.com/privacy-scaling-explorations/halo2curves"]
halo2curves = { git = "https://github.com/timoftime/halo2curves", branch = "dev/bls12_381" }
# halo2curves = { path = "../halo2curves" }

[patch."https://github.com/axiom-crypto/halo2-lib"]
halo2-base = { git = "https://github.com/timoftime/halo2-lib", branch = "dev/bls12_381", default-features = false, features = [
"halo2-pse",
"display",
] }
halo2-ecc = { git = "https://github.com/timoftime/halo2-lib", branch = "dev/bls12_381", default-features = false }
# halo2-base = { path = "../halo2-lib/halo2-base", default-features = false, features = [
# "halo2-pse",
# "display",
# ] }
# halo2-ecc = { path = "../halo2-lib/halo2-ecc", default-features = false }

# [patch."https://github.com/timoftime/halo2curves"]
# halo2curves = { path = "../halo2curves" }
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2023 ChainSafe Systems

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# banshee
Banshee is a ZK-based block header oracle protocol for Casper-based
chains

## Development

To add the license to any new source code files, use
[`licensesnip`](https://crates.io/crates/licensesnip).
25 changes: 25 additions & 0 deletions eth-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "eth-types"
version = "0.1.0"
authors = ["The appliedzkp team", "timoftime <[email protected]>"]
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
hex = "0.4"
lazy_static = "1.4"
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_02_02" }
halo2-ecc = { git = "https://github.com/axiom-crypto/halo2-lib", branch = "community-edition", default-features = false }
regex = "1.5.4"
serde = {version = "1.0.130", features = ["derive"] }
serde_json = "1.0.66"
# serde_with = "1.12"
uint = "0.9.1"
itertools = "0.10"
subtle = "2.4"
num = "0.4"
num-bigint = { version = "0.4" }
strum_macros = "0.24"
strum = "0.24"
halo2curves = { git = "https://github.com/privacy-scaling-explorations/halo2curves", tag = "0.3.1" }
pasta_curves = "0.4.1"
Loading

0 comments on commit 6754019

Please sign in to comment.