Skip to content

Commit

Permalink
Trident SVM support (#234)
Browse files Browse the repository at this point in the history
* ✨ WIP: Trident SVM

* 🔥 Cleanup + migrate trident svm

* Simplify and update Trident config (#230)

* ✨ Update config + update initial programs and accounts for Trident SVM

* ✨ Resolve some additional issues with workspace / cargo paths + simplify config

* ✨ Update metaplex cpi example

* ✨ Code quality

* ⚡️ Pipeline update

* ✨ Update example

* ⚡️ Initialize Trident SVM with syscall stubs + add mazes

* ✨ Update handling with Clock Sysvar

* 🧪 Update simple-cpi-6 and workflow

* 🎨 If ix discriminator is not present derive it

* ⚡️ Update Fuzz Client implementation for TridentSVM

* ✨ Separate fuzz test template generator, update generator logic and update tests

* 🔥 Remove necessity to have anchor as dep in trident tests

* ✨ Add fuzzingError with custom string message

* ✨ Convert instruction name from IDL into snake case

* 📝 Add changelog
  • Loading branch information
lukacan authored Jan 11, 2025
1 parent 38a731f commit 01e560e
Show file tree
Hide file tree
Showing 371 changed files with 48,814 additions and 22,554 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
steps:
# Install essential system packages required for building Rust projects
- name: Install system packages
run: sudo apt-get update && sudo apt-get install -y build-essential libudev-dev # Installs essential packages like GCC and libudev development headers
run: sudo apt-get update && sudo apt-get install -y build-essential libudev-dev protobuf-compiler libprotobuf-dev # Installs essential packages like GCC and libudev development headers
shell: bash

# Install Rust nightly toolchain and additional components
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ jobs:
- name: Cache Target Folder
uses: actions/cache@v3
with:
path: examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
path: examples/cpi/simple-cpi-6/trident-tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
key: target-${{ runner.os }}-simple-cpi-6 # Unique key for caching based on OS and test

# Run the fuzzing test using Trident in the simple-cpi-6 directory
- name: Test Fuzz
working-directory: examples/fuzz-tests/simple-cpi-6 # Set the working directory for the fuzzing test
working-directory: examples/cpi/simple-cpi-6/trident-tests # Set the working directory for the fuzzing test
run: trident fuzz run-hfuzz fuzz_0 # Run the fuzz test with trident

arbitrary-limit-inputs-5:
Expand Down Expand Up @@ -98,12 +98,12 @@ jobs:
- name: Cache Target Folder
uses: actions/cache@v3
with:
path: examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
path: examples/common_issues/arbitrary-limit-inputs-5/trident-tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
key: target-${{ runner.os }}-arbitrary-limit-inputs-5 # Unique key for caching based on OS and test

# Run the fuzzing test using Trident in the arbitrary-limit-inputs-5 directory
- name: Test Fuzz
working-directory: examples/fuzz-tests/arbitrary-limit-inputs-5 # Set the working directory for the fuzzing test
working-directory: examples/common_issues/arbitrary-limit-inputs-5/trident-tests # Set the working directory for the fuzzing test
run: trident fuzz run-hfuzz fuzz_0 # Run the fuzz test with trident

cpi-metaplex-7:
Expand Down Expand Up @@ -143,12 +143,12 @@ jobs:
- name: Cache Target Folder
uses: actions/cache@v3
with:
path: examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
path: examples/cpi/cpi-metaplex-7/trident-tests/fuzzing/honggfuzz/hfuzz_target # Cache the folder where build artifacts are stored
key: target-${{ runner.os }}-cpi-metaplex-7 # Unique key for caching based on OS and test

# Run the fuzzing test using Trident in the cpi-metaplex-7 directory
- name: Test Fuzz
working-directory: examples/fuzz-tests/cpi-metaplex-7 # Set the working directory for the fuzzing test
working-directory: examples/cpi/cpi-metaplex-7/trident-tests # Set the working directory for the fuzzing test
run: trident fuzz run-hfuzz fuzz_0 # Run the fuzz test with trident

checks:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ incremented upon a breaking change and the patch version will be incremented for

## [dev] - Unreleased

**Added**

- Trident SVM + AFL (see the PR for more details) ([234](https://github.com/Ackee-Blockchain/trident/pull/234))

## [0.8.1] - 2024-11-14

**Removed**
Expand Down
Loading

0 comments on commit 01e560e

Please sign in to comment.