Skip to content

Commit ccd8b79

Browse files
committed
Merge branch 'copilot/implement-minimal-node-v0-1' into claude/address-pr-feedback-01GKYw8UuUjuFBWeMXUqJHgU
2 parents 5012d67 + 814405d commit ccd8b79

80 files changed

Lines changed: 12347 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/benchmarks.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Benchmarks
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
benchmark:
11+
name: Run Benchmarks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Install criterion
19+
run: cargo install cargo-criterion
20+
21+
- name: Run benchmarks
22+
run: cargo bench --all
23+
24+
- name: Store benchmark result
25+
uses: benchmark-action/github-action-benchmark@v1
26+
with:
27+
name: Rust Benchmark
28+
tool: 'cargo'
29+
output-file-path: target/criterion/report/index.html
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
auto-push: true

.github/workflows/ci.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop, "copilot/**" ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
test:
15+
name: Test Suite
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
rust: [stable]
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Install Rust
25+
uses: dtolnay/rust-toolchain@master
26+
with:
27+
toolchain: ${{ matrix.rust }}
28+
components: rustfmt, clippy
29+
30+
- name: Cache cargo registry
31+
uses: actions/cache@v4
32+
with:
33+
path: ~/.cargo/registry
34+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
35+
36+
- name: Cache cargo index
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.cargo/git
40+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
41+
42+
- name: Cache cargo build
43+
uses: actions/cache@v4
44+
with:
45+
path: target
46+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
47+
48+
- name: Run tests
49+
run: cargo test --all --verbose
50+
51+
- name: Run doc tests
52+
run: cargo test --doc --all --verbose
53+
54+
fmt:
55+
name: Rustfmt
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: dtolnay/rust-toolchain@stable
60+
with:
61+
components: rustfmt
62+
- run: cargo fmt --all -- --check
63+
64+
clippy:
65+
name: Clippy
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: dtolnay/rust-toolchain@stable
70+
with:
71+
components: clippy
72+
- run: cargo clippy --all-targets --all-features -- -D warnings
73+
74+
build:
75+
name: Build
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: dtolnay/rust-toolchain@stable
80+
81+
- name: Build all crates
82+
run: cargo build --all --verbose
83+
84+
- name: Build release
85+
run: cargo build --all --release --verbose
86+
87+
security:
88+
name: Security Audit
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: actions/checkout@v4
92+
- uses: dtolnay/rust-toolchain@stable
93+
94+
- name: Install cargo-audit
95+
run: cargo install cargo-audit
96+
97+
- name: Run security audit
98+
run: cargo audit
99+
100+
coverage:
101+
name: Code Coverage
102+
runs-on: ubuntu-latest
103+
steps:
104+
- uses: actions/checkout@v4
105+
- uses: dtolnay/rust-toolchain@stable
106+
107+
- name: Install tarpaulin
108+
run: cargo install cargo-tarpaulin
109+
110+
- name: Generate coverage
111+
run: cargo tarpaulin --all --out Xml --timeout 600
112+
113+
- name: Upload coverage to Codecov
114+
uses: codecov/codecov-action@v4
115+
with:
116+
file: ./cobertura.xml
117+
fail_ci_if_error: false

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Rust
2+
target/
3+
Cargo.lock
4+
**/*.rs.bk
5+
*.pdb
6+
7+
# IDE
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
*~
13+
.DS_Store
14+
15+
# Testing
16+
*.profraw
17+
*.profdata
18+
19+
# Documentation
20+
docs/book/
21+
22+
# Temporary files
23+
/tmp/
24+
*.tmp
25+
*.log
26+
27+
# Keys and secrets
28+
*.key
29+
*.pem
30+
secrets/
31+
32+
# Benchmarks
33+
criterion/

Cargo.toml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[workspace]
2+
members = [
3+
"crates/bitcell-crypto",
4+
"crates/bitcell-zkp",
5+
"crates/bitcell-ca",
6+
"crates/bitcell-ebsl",
7+
"crates/bitcell-consensus",
8+
"crates/bitcell-state",
9+
"crates/bitcell-zkvm",
10+
"crates/bitcell-economics",
11+
"crates/bitcell-network",
12+
"crates/bitcell-node",
13+
]
14+
resolver = "2"
15+
16+
[workspace.package]
17+
version = "0.1.0"
18+
authors = ["Oliver Hirst"]
19+
edition = "2021"
20+
rust-version = "1.82"
21+
license = "MIT OR Apache-2.0"
22+
repository = "https://github.com/Steake/BitCell"
23+
24+
[workspace.dependencies]
25+
# Arkworks ecosystem for ZK-SNARKs
26+
ark-ff = "0.4"
27+
ark-ec = "0.4"
28+
ark-std = "0.4"
29+
ark-serialize = "0.4"
30+
ark-relations = "0.4"
31+
ark-r1cs-std = "0.4"
32+
ark-groth16 = "0.4"
33+
ark-bn254 = "0.4"
34+
ark-bls12-381 = "0.4"
35+
ark-crypto-primitives = "0.4"
36+
37+
# Cryptography
38+
sha2 = "0.10"
39+
blake3 = "1.5"
40+
curve25519-dalek = "4.1"
41+
ed25519-dalek = "2.1"
42+
k256 = { version = "0.13.3", features = ["ecdsa", "sha256"] }
43+
rand = "0.8"
44+
rand_core = "0.6"
45+
hex = "0.4"
46+
47+
# Serialization
48+
serde = { version = "1.0", features = ["derive"] }
49+
serde_json = "1.0"
50+
bincode = "1.3"
51+
52+
# Networking
53+
tokio = { version = "1.35", features = ["full"] }
54+
libp2p = { version = "0.53", features = ["tcp", "noise", "yamux", "gossipsub", "mdns", "kad"] }
55+
async-trait = "0.1"
56+
57+
# Error handling
58+
thiserror = "1.0"
59+
anyhow = "1.0"
60+
61+
# Logging
62+
tracing = "0.1"
63+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
64+
65+
# Testing
66+
proptest = "1.4"
67+
criterion = { version = "0.5", features = ["html_reports"] }
68+
quickcheck = "1.0"
69+
70+
# Utilities
71+
once_cell = "1.19"
72+
parking_lot = "0.12"
73+
rayon = "1.8"
74+
dashmap = "5.5"
75+
bytes = "1.5"
76+
77+
[profile.release]
78+
opt-level = 3
79+
lto = "fat"
80+
codegen-units = 1
81+
panic = "abort"
82+
strip = true
83+
84+
[profile.bench]
85+
inherits = "release"
86+
debug = true
87+
88+
[profile.dev]
89+
opt-level = 1
90+
91+
[profile.test]
92+
opt-level = 1

0 commit comments

Comments
 (0)