Skip to content

fix(scenarios): follow Pump's deployed programs - IDLs from pump-public-docs and the mayhem fee recipient - #60

Open
92Infinitus92 wants to merge 2 commits into
feat/scenarios/override/pump-idl-refresh-supportfrom
fix/scenarios/pump-idl-refresh
Open

92Infinitus92 wants to merge 2 commits into
feat/scenarios/override/pump-idl-refresh-supportfrom
fix/scenarios/pump-idl-refresh

Conversation

@92Infinitus92

Copy link
Copy Markdown
Collaborator

Pump upgrades its programs without writing their on-chain IDLs again, so those copies lag the deployed programs, and the Pump graduation test fails on main. This PR fixes the test and bundles the latest IDLs Pump publishes in pump-public-docs, which the monitoring run now compares Pump with. It is the Pump half of #55, which is split in two, and it carries the Pump fix from #54.

  • Graduation. test_pump_token2022_graduation_lifecycle creates its own Token-2022 coin with create_v2 and takes the fee recipient from Global, so a mayhem coin pays the reserved recipient. A second test runs the same lifecycle for a mayhem coin.
  • IDLs. pump/v1/idl.json is idl/pump.json at pump-public-docs 639b87fb45c3 (2026-10-13), sha256 7616681ea557975f9f623ac211080f22a93060781eaf4765b0a488d980997207. pump-amm/v1/idl.json is idl/pump_amm.json at 8cda1fa30ea6 (2026-10-07), sha256 b7d8c57a4d9c4dd0109a9ab893052352333252d4eedced10ac091d4d66cab89b. Both are byte for byte; the READMEs record the commits and hashes.
  • Templates. All 28 property paths resolve in the new IDLs with the same offsets and types. virtual_quote_reserves stays on pump-amm-pool-state and pump-amm-canonical-pool. Its description now says the value is signed and not 0 on every pool (about 130 thousand pools hold a non-zero value), and the price-shock recipe accounts for it: to scale the effective quote reserves by k, write k * (Q + V) - Q.
  • Older accounts. The new types are longer: BondingCurve is 166 bytes (115 on main) and Pool 287 (261 on main). The engine does not write an account shorter than its IDL type; the override is skipped with a log warning and the scenario still plays. On mainnet today about 2.6 million curves (166 and 256 bytes) and 1.33 million pools (287 bytes and more) can be written. Compared with main, at least 11.3 million older curves and 23 thousand pools no longer can. live_accounts_shorter_than_their_idl_type_are_left_unchanged documents this on 150-byte curves and on 245 and 271-byte pools.

Tests: cargo +nightly fmt --all -- --check and cargo clippy -p surfpool-core --all-targets pass. cargo test -p surfpool-core --features ignore_tests_ci gives 900 passed, 0 failed. The Pump tests against mainnet (--features integration-tests pump) give 16 passed, 0 failed, and cargo test -p surfpool-mcp the_pump_templates_appear passes.

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.

1 participant