Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ jobs:
exit 1;
fi

fd_conformance:
name: Builtin-BPF Conformance Test
conformance:
name: Conformance Test
runs-on: ubuntu-latest
needs: build_programs
steps:
Expand All @@ -160,16 +160,17 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev pkg-config
cargo install mollusk-svm-cli

- name: Restore Program Builds
uses: actions/cache/restore@v4
with:
path: ./**/*.so
key: ${{ runner.os }}-builds-${{ github.sha }}

- name: Builtin-BPF Conformance Test
- name: Conformance Test
shell: bash
run: pnpm zx ./scripts/ci/fd-conformance.mjs
run: pnpm zx ./scripts/ci/conformance.mjs

## SKIP: IDL is hand-cranked here for now.
##
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[workspace]
resolver = "2"
members = ["clients/rust", "program"]
# Required for CI
exclude = ["solana-conformance/impl/solfuzz-agave"]

[workspace.package]
authors = ["Anza Technology Maintainers <[email protected]>"]
Expand Down
29 changes: 29 additions & 0 deletions scripts/ci/conformance.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env zx

// Mollusk conformance testing of this Core BPF Config program against the
// version running on mainnet-beta.

import 'zx/globals';
import { getProgramId, getProgramSharedObjectPath, workingDirectory } from '../utils.mjs';

const programId = getProgramId('program');
const programBinaryPath = getProgramSharedObjectPath('program');
const baseBinaryDirPath = path.join(workingDirectory, 'target', 'dump-solana');
const baseBinaryPath = path.join(baseBinaryDirPath, 'base.so');
const molluskFixturesPath = path.join(workingDirectory, 'program', 'fuzz', 'blob');

// Clone the program from mainnet-beta.
await $`mkdir -p ${baseBinaryDirPath}`;
await $`solana program dump -um ${programId} ${baseBinaryPath}`;

// Test this program against the cloned program for conformance with Mollusk.
let output = await $`mollusk run-test \
--proto firedancer \
${baseBinaryPath} ${programBinaryPath} \
${molluskFixturesPath} ${programId}`;

// The last line of output should exactly match the following:
// [DONE][TEST RESULT]: 0 failures
if (!output.stdout.includes("[DONE][TEST RESULT]: 0 failures")) {
throw new Error(`Error: mismatches detected.`);
}
83 changes: 0 additions & 83 deletions scripts/ci/fd-conformance.mjs

This file was deleted.