cluster-tool: drive the folded liqsol_core OPP outpost + real yield flush#25
Open
valthon wants to merge 2 commits into
Open
cluster-tool: drive the folded liqsol_core OPP outpost + real yield flush#25valthon wants to merge 2 commits into
valthon wants to merge 2 commits into
Conversation
valthon
force-pushed
the
feat/opp-liqsol-integrated-support
branch
from
July 10, 2026 03:08
e84708b to
8701bc7
Compare
valthon
force-pushed
the
feat/opp-liqsol-integrated-support
branch
3 times, most recently
from
July 21, 2026 20:08
4f83d04 to
0038098
Compare
The OPP Solana outpost was folded into the full liqsol_core program,
which gates every admin op (initialize_outpost, set_token_*, the reserve
creators) behind a global_config PDA whose admin is the program's on-chain
upgrade authority. Standing that up needs an upgradeable deploy (so a
ProgramData account exists) and a one-time initialize_global_config before
the outpost — neither of which the standalone bootstrap did.
Teach the harness to drive it:
- OppSolProgram: the integrated-outpost constants (global_config seed,
BPF upgradeable-loader id, per-cluster deployer keypair, epoch-warp
validator args).
- SolanaValidatorProcess[Steps]: deploy the program upgradeable with the
per-cluster deployer as its upgrade authority (== global_config.admin).
- SolanaOutpostBootstrapper: initialize global_config, then pass
admin + global_config (and adminAta on SPL reserve creation) on every
OPP admin instruction.
Also add a per-cluster ClusterConfig.solanaEpochWarp option (resolved
through ClusterBuildOptions -> ClusterConfigProvider, exposed as a CLI
flag): when set, the validator launches warped past Solana epoch 3 for a
flow that cranks flush_staking_yield (Clock.epoch >= 3). Off by default —
the warp advances the Solana clock past the depot's sysio.authex 10-minute
nonce window, so only a flow with no cross-chain SOL deposit may opt in.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015CbgvM8EhrPL1VjX8RhNze
The flow hand-injected a STAKING_REWARD attestation through a bespoke Borsh-encoded add_attestation call. Drive the program's genuine yield pipeline instead: SolanaYieldEmitterTool seeds a staker's on-chain yield state via the dev-only dev_seed_staker_yield (built under --features development), then cranks flush_staking_yield so liqsol_core itself packs the StakingReward into the outbound buffer — the exact path a production yield-aware Solana contract exercises. flush_staking_yield requires Clock.epoch >= 3, so the scenario opts its own cluster into the epoch warp via its ClusterBuildOptions defaults (solanaEpochWarp: true) — no other flow warps, keeping the shared-env e2e contract intact. The chainCode/tokenCode/externalEpochRef inputs the old hand-injection needed are gone: the program forces the token code and derives the epoch ref. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CbgvM8EhrPL1VjX8RhNze
valthon
force-pushed
the
feat/opp-liqsol-integrated-support
branch
from
July 21, 2026 22:35
0038098 to
328dee2
Compare
valthon
marked this pull request as ready for review
July 22, 2026 00:35
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
Teaches the OPP harness to drive the folded
liqsol_coreintegrated outpost — deployed upgradeable, every admin op gated by aglobal_configPDA — and reworksflow-yield-distributionto exercise the program's real staking-yield path. The integrated outpost is the harness's only Solana OPP mode; the epoch warp the yield flow needs is a per-cluster config option a flow opts into, not a shared env var, so the e2e gate's "no per-flow env" contract holds with zero workflow plumbing.Changes (2 commits)
1.
cluster-tool: drive folded liqsol_core outpost— the harness capability:SolanaValidatorProcessgains an optionalupgradeAuthority; when set, the program loads via--upgradeable-program(so aProgramDataaccount exists).SolanaValidatorProcessStepsdeploysliqsol_corewith the per-cluster SOL deployer as that authority — which is also theglobal_config.admin.global_configgating.SolanaOutpostBootstrapperrunsinitialize_global_configonce, then passesadmin+global_config(andadminAtaon SPL reserve creation) on every OPP admin instruction.OppSolProgramholds the supporting constants (global_config seed, BPF upgradeable-loader id, per-cluster deployer keypair, epoch-warp validator args).ClusterConfig.solanaEpochWarp— a new per-cluster option (resolved throughClusterBuildOptions→ClusterConfigProvider, exposed as a CLI flag, default off). When set, the validator launches warped past Solana epoch 3. Off by default: the warp advances the Solana clock past the depot'ssysio.authex10-minute nonce window, so only a flow with no cross-chain SOL deposit may enable it.2.
flow-yield-distribution: real flush emission— the flow drives the program's genuine yield pipeline:SolanaYieldEmitterToolseeds a staker via the dev-onlydev_seed_staker_yield, then cranksflush_staking_yieldsoliqsol_coreitself packs theStakingRewardinto the outbound buffer (retiring the prior bespokeadd_attestationhand-injection). The scenario opts its own cluster into the epoch warp via itsClusterBuildOptionsdefaults (solanaEpochWarp: true). Because the program derives its own reward ref, the verify matches the depot'sunmappedrow by the staker's native SOL address (not a fixed ref) and asserts the credited WIRE amount equals the emitted reward.flow-yield-distributioncalls the dev-onlydev_seed_staker_yield, so the deployed program must be the development build (anchor build -- --features development). This is wired into the e2e gate by wire-solananext-integ(BUILD.bazel); every other flow runs on either build.Verification
Green end-to-end against
next-integ+ companion branches, on this branch's exact commit:29875326396: everyflow-*scenario passed, includingyield-distribution, on the--features developmentbuild.SOL_OPP_*unset) —swap-variance-revert+yield-distributionboth pass, proving the code-driven path stands alone (the validator launches with--slots-per-epoch 4096 --warp-slot 12300purely from the scenario defaults).solanaEpochWarpflag + config resolution.Companion PRs
add_attestationbinding (so the folded IDL is consumed verbatim).next-integ, #385) — the folded outpost, thecustody_mint/custody_decimalsReserve fields, thedev_seed_staker_yieldhelper, and the--features developmentE2E build.🤖 Generated with Claude Code
https://claude.ai/code/session_015CbgvM8EhrPL1VjX8RhNze