Skip to content

Commit 9d91e10

Browse files
committed
checkpoint
1 parent 369c2fd commit 9d91e10

File tree

35 files changed

+1449
-3246
lines changed

35 files changed

+1449
-3246
lines changed

svm/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@ target
44
**/*.rs.bk
55
node_modules
66
test-ledger
7+
test-keys
78
.yarn
9+
10+
# Keypair files (sensitive)
11+
*-keypair.json
12+
*_keypair.json
13+
keypair.json
14+
keypairs/

svm/Cargo.lock

Lines changed: 19 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svm/programs/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SVM Programs
2+
3+
This directory contains Solana programs for the executor quoter system.
4+
5+
## Directory Structure
6+
7+
- `executor/` - Main executor program (Anchor-based)
8+
- `executor-quoter/` - Quoter program for price quotes (pinocchio-based)
9+
- `executor-quoter-router/` - Router program for quoter registration and execution routing (pinocchio-based)
10+
- `executor-quoter-tests/` - Integration tests for executor-quoter
11+
- `executor-quoter-router-tests/` - Integration tests for executor-quoter-router
12+
13+
## Building
14+
15+
The pinocchio-based programs (`executor-quoter` and `executor-quoter-router`) must be built using `cargo build-sbf` before running tests.
16+
17+
### Build Programs
18+
19+
```bash
20+
# Build executor-quoter
21+
cd svm/programs/executor-quoter
22+
cargo build-sbf
23+
24+
# Build executor-quoter-router
25+
cd svm/programs/executor-quoter-router
26+
cargo build-sbf
27+
```
28+
29+
### Run Tests
30+
31+
After building the `.so` files, run tests from the test crates:
32+
33+
```bash
34+
# Run executor-quoter tests
35+
cd svm/programs/executor-quoter-tests
36+
cargo test
37+
38+
# Run executor-quoter-router tests
39+
cd svm/programs/executor-quoter-router-tests
40+
cargo test
41+
```
42+
43+
### Run Benchmarks
44+
45+
```bash
46+
# Benchmark executor-quoter
47+
cd svm/programs/executor-quoter-tests
48+
cargo bench
49+
50+
# Benchmark executor-quoter-router
51+
cd svm/programs/executor-quoter-router-tests
52+
cargo bench
53+
```
54+
55+
## Notes
56+
57+
- The test crates use [mollusk-svm](https://github.com/buffalojoec/mollusk) to load and execute the compiled `.so` files in a simulated SVM environment.
58+
- Tests will fail if the `.so` files are not built first.
59+
- The main `executor` program uses Anchor and follows standard Anchor build/test workflows (see parent README).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[package]
2+
name = "executor-quoter-router-tests"
3+
version = "0.1.0"
4+
description = "Integration tests and benchmarks for executor-quoter-router"
5+
edition = "2021"
6+
7+
[lib]
8+
name = "executor_quoter_router_tests"
9+
10+
[features]
11+
default = []
12+
13+
[dev-dependencies]
14+
solana-program-test = "1.18"
15+
solana-sdk = "1.18"
16+
libsecp256k1 = "0.7"
17+
rand = "0.8"
18+
mollusk-svm = "0.0.9-solana-1.18"
19+
mollusk-svm-bencher = "0.0.9-solana-1.18"
20+
21+
[[bench]]
22+
name = "compute_units"
23+
harness = false

0 commit comments

Comments
 (0)