Repository navigation
fix: get CI green after the SphereNet rebrand - #10
Closed
samuelvanderwaal wants to merge 8 commits into
Closed
samuelvanderwaal wants to merge 8 commits into
samuelvanderwaal wants to merge 8 commits into
Conversation
The crate rename to spherenet-stake-program changed the SBF output to target/deploy/spherenet_stake_program.so, but the validator script still pointed at solana_stake_program.so, so the JS tests could not start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spherenet-validator-whitelist-interface (via solana-program) and solana-keypair pull getrandom 0.2 into the interface and program crates. On wasm32-unknown-unknown it needs the `js` feature, so the WASM builds failed. Add a target-specific getrandom dependency with `js` enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The committed IDL still carried the upstream program name and version (solanaStakeInterface 2.0.2). Regenerate it (spherenetStakeInterface 0.2.2) and map the new name to `stake` in the client generator, so the generated JS and Rust clients are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo-spellcheck flagged "validator", "whitelist" and "PDA" in the doc comments of program/src/instruction_builders.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run `make format-rust` (nightly-2025-02-16, as in CI) over the code added for the SphereNet mod so the Format & Lint jobs pass. No functional change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The remaining cargo-audit advisories (rustls 0.21, rustls-webpki 0.101, webpki-roots 0.24/0.25 via tungstenite 0.20, plus quinn-proto, tar, time, crossbeam-epoch and rustls 0.23) all came from the agave 3.0 test stack. - program dev-deps: mollusk-svm 0.7 -> 0.12, solana-program-test 3.0 -> 3.1.12 (with `agave-unstable-api`), agave-feature-set 3.0 -> 3.1, and solana-program-binaries for the loader-v3 account helper. - Cargo.lock: targeted updates for the advisory crates, and imbl 7.0.2 (pulls the patched imbl-sized-chunks 0.2). - program_test: ProgramTest 3.1 stores its bundled core BPF stake program at the stake program ID after genesis, which replaced our build when it was added with add_upgradeable_program_to_genesis. Register the build with add_account instead, which is applied after that step. - agave 3.1 needs rustc 1.89, so the fmt/lint/test nightly moves from nightly-2025-02-16 to nightly-2025-09-18. - WASM: solana-frozen-abi (interface `frozen-abi` feature) now pulls in getrandom 0.3; enable its wasm_js backend and set the matching cfg in `make build-wasm-%`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- WritableAccount::create is deprecated in solana-account 3.3: build Account values directly in the tests. - Rent::lamports_per_byte_year is deprecated in solana-rent 3.1 with no 3.x replacement accessor: allow it where it is read or set. - Use u64::abs_diff (clippy::manual_abs_diff) and std::slice::from_ref (clippy::cloned_ref_to_slice_refs). No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agave 3.1 test dependencies share the lockfile with the program and move its on-chain dependencies forward (e.g. solana-address 2.9, solana-instruction 4.0), which need rustc 1.89. The Solana 3.0.0 platform-tools (v1.51) can't parse those manifests, so Build Programs failed. Solana 3.1.14 ships platform-tools v1.52 (rustc 1.89) and matches the agave 3.1 test stack. Verified locally with cargo-build-sbf 3.1.x (platform-tools v1.52): make build-sbf-program, make test-program (357 pass), make test-js-clients-js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Closing: this repo is retired and will be archived. Changes for spherenet-stake will follow the program@v5.1.0 rebase. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
These fix every CI job that broke when the crates were renamed for SphereNet, so
mainCI should pass in full.scripts/restart-test-validator.shnow loadstarget/deploy/spherenet_stake_program.so, which is what the renamed program crate builds.getrandomdependency forwasm32-unknown-unknownonly. Version 0.2 gets thejsfeature. The interface also gets 0.3 withwasm_js, plus the matching--cfginmake build-wasm-%, because itsfrozen-abifeature now pulls that version in.interface/idl.jsonis regenerated (spherenetStakeInterface0.2.2). The client generator maps the new program name tostake, so the generated JS and Rust clients come out unchanged.validator,whitelistandPDAare added toscripts/solana.dic.mollusk-svm0.12,solana-program-test3.1.12,agave-feature-set3.1), andCargo.lockgets targeted updates, includingimbl7.0.2.ProgramTest3.1 writes its bundled core BPF stake program to the stake program ID after genesis. That replaced the SphereNet build the tests added withadd_upgradeable_program_to_genesis.program_test()now registers the build withadd_account, which is applied after that step, so the tests exercise the SphereNet program.nightly-2025-09-18. This brings small lint and deprecation fixes in the tests and ininterface/src/helpers/genesis.rs, with no behavior change.solana-address1.0 → 2.9,solana-instruction3.0 → 4.0,solana-define-syscall4 → 5.3). This changes the program binary, so review this PR as a program change, not just a CI fix.Test plan
make audit(exit 0)make build-sbf-programwith cargo-build-sbf 3.1.x (platform-tools v1.52),make test-program(357 pass),make test-interface,make test-clients-rustmake build-wasm-interface,make build-wasm-programmake clippy-{program,interface,clients-rust},make format-check-{program,interface,clients-rust}make build-doc-*,make test-doc-*make generate-idl-interfacepluspnpm generate:clients: clean treemake spellcheckmake test-js-clients-js,make lint-js-clients-js,make format-check-js-clients-jscargo metadata --locked🤖 Generated with Claude Code