generated from hashblock/solana-cli-program-template
-
Notifications
You must be signed in to change notification settings - Fork 3
[WIP] create one command deploy to all svm networks #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2235e40
Initial plan for issue
Copilot 2613498
Implement deploy command for eBPF binaries across SVM networks
Copilot 79cbea1
Add documentation for eBPF deploy command
Copilot e59d969
Enhance eBPF deploy command with actual functionality
Copilot 888e78a
Fix deploy command network parsing logic for "all" networks
Copilot 0c7223a
fix: resolve clippy warnings and code quality issues
devloai[bot] 8f9dcbf
Enhance deploy command with improved error handling, validation, and …
Copilot fc44e91
Fix code formatting and improve code quality
Copilot 3f56f4d
fix: improve code quality and formatting across repository
devloai[bot] dde96c1
Fix failing test and apply code formatting
devloai[bot] 4d4d052
Fix Rust formatting and resolve merge conflicts
Copilot 204c000
Fix variable naming collision and improve deployment realism
Copilot 95967b3
Implement real deployment logic and improve error handling
Copilot d2d778d
Implement actual BPF loader instructions for real program deployment
Copilot 641377b
Fix deployment issues: use provided program ID, improve error handlin…
Copilot 819265c
Implement IDL publishing and dynamic fee calculation for eBPF deployment
Copilot 0dbaed2
Fix formatting issues in ebpf_deploy.rs
Copilot 14dd764
Fix CLI and deployment validation: program ID keypair validation, boo…
Copilot a970853
Enhance IDL publishing: add support for custom Anchor IDL files, impr…
Copilot 3b64d6d
Final formatting fixes for code quality
Copilot 5d13b25
Enhance eBPF deployment: improve error handling, add retries, structu…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,9 @@ osvm rpc sonic [email protected] --network mainnet | |
|
|
||
| # Deploy multiple SVMs to a single server | ||
| osvm user@host --svm sonic,solana,eclipse,soon --node-type validator --network devnet | ||
|
|
||
| # Deploy an eBPF binary to all available SVM networks | ||
| osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl | ||
| ``` | ||
|
|
||
| ### RPC Node Deployment | ||
|
|
@@ -183,6 +186,50 @@ The `rpc` command provides a streamlined way to deploy specific RPC nodes: | |
| - **Network Selection**: Choose between mainnet, testnet, or devnet environments | ||
| - **Automatic Configuration**: Handles all dependencies and configuration automatically | ||
|
|
||
| ### eBPF Program Deployment | ||
|
|
||
| ```bash | ||
| # Deploy an eBPF binary to all available SVM networks | ||
| osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl | ||
|
|
||
| # Deploy with custom Anchor IDL file | ||
| osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl --idl-file ./path/to/program.json | ||
|
|
||
| # Deploy to a specific network only | ||
| osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --network mainnet | ||
| ``` | ||
|
|
||
| The `deploy` command provides a streamlined way to deploy eBPF programs: | ||
|
|
||
| - **Multi-network Deployment**: Deploy to all SVM networks with one command | ||
| - **Network Selection**: Choose between mainnet, testnet, devnet, or all networks | ||
| - **IDL Publishing**: Option to publish the IDL along with the program | ||
| - Auto-generated basic IDL (default) | ||
| - Custom Anchor IDL JSON file support via `--idl-file` option | ||
| - **Required Files**: | ||
| - eBPF binary (.so file) | ||
| - **Program ID file**: | ||
| - For **new deployments**: Must be a keypair JSON file (contains private key) | ||
| - For **upgrades**: Can be either a keypair file or pubkey-only JSON file | ||
| - **Program owner keypair**: JSON file containing private key (required for all deployments) | ||
| - **Fee payer keypair**: JSON file containing private key (pays for deployment transaction) | ||
|
|
||
| ### File Format Requirements | ||
|
|
||
| **Keypair files** (generated with `solana-keygen new`): | ||
| ```json | ||
| [123,45,67,89,...,234] // Array of 64 bytes containing private key | ||
| ``` | ||
|
|
||
| **Pubkey-only files** (for upgrades only): | ||
| ```json | ||
| {"programId": "HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS"} | ||
| ``` | ||
| or plain string: | ||
| ``` | ||
| HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS | ||
| ``` | ||
|
|
||
| ## 🔧 Detailed Installation | ||
|
|
||
| ### Prerequisites | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
verbosefield previously cast the count tou8; dropping that cast may cause a type mismatch ifverboseremainsu8. Ensure the field type matches or restore the cast.