Skip to content

Conversation

@tracy-codes
Copy link
Contributor

@tracy-codes tracy-codes commented Aug 19, 2025

This PR implements support for the --arch flag that was recently added to cargo build-sbf, resolving issue #195.

Changes Made

  • Added --arch flag to CLI commands:

    • solana-verify build --arch <v0|v1|v2|v3>
    • solana-verify verify-from-repo --arch <v0|v1|v2|v3>
    • solana-verify export-pda-tx --arch <v0|v1|v2|v3>
  • Updated function signatures to pass the arch parameter through the entire build pipeline

  • Integrated with Docker builds to pass --arch flag to cargo build-sbf when specified

  • Added remote verification support to include arch parameter in API calls

  • Added proper help text indicating the default value is v0

Usage Examples

# Build with specific architecture
solana-verify build --arch v2 /path/to/program

# Verify from repo with architecture  
solana-verify verify-from-repo --arch v1 https://github.com/user/repo --program-id ABC123...

# Export PDA with architecture
solana-verify export-pda-tx --arch v1 --uploader DEF456... --program-id ABC123... https://github.com/user/repo

Implementation Details

The --arch flag accepts values v0, v1, v2, v3 (matching cargo build-sbf options) with v0 as the default. When specified, the flag is passed to the underlying cargo build-sbf command during Docker-based builds.

Closes #195

Add --arch flag to build, verify-from-repo, export-pda-tx, and remote  submit-job commands to support targeting specific virtual machine  architectures (v0-v3). The flag is passed through to cargo build-sbf  during builds and to remote verification services.  Closes Ellipsis-Labs#195
@tracy-codes tracy-codes marked this pull request as ready for review August 19, 2025 21:55
@swaroop-osec
Copy link
Collaborator

@tracy-codes Can you bump the version please?

});

// Add arch parameter if provided
if let Some(arch_value) = arch {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we’ll be retrieving the arch value from the program’s PDA, could you remove the extra argument here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swaroop-osec resolved with 999e177

src/main.rs Outdated
.required(true)
.takes_value(true)
.help("This is the address that uploaded verified build information for the program-id")))
.help("This is the address that uploaded verified build information for the program-id"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same applies here; the extra argument can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swaroop-osec resolved with 999e177

@swaroop-osec
Copy link
Collaborator

@ngundotra lgtm

@ngundotra ngundotra merged commit 8c93c38 into Ellipsis-Labs:master Aug 21, 2025
8 checks passed
@ngundotra ngundotra mentioned this pull request Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No cargo buld-sbf --arch support

3 participants