Skip to content

Conversation

@2501babe
Copy link
Member

@2501babe 2501babe commented Aug 28, 2025

we can do the stake history thing a bit cleaner this is just a demo... decrease.rs and withdraw_with_fee.rs still fail for reasons i havent identified yet (possibly others, the full stake pool test gauntlet is heavy for my laptop so i get meaningless failures when trying to run all the files even with --test-threads 1)

@2501babe
Copy link
Member Author

2501babe commented Feb 4, 2026

alright this is now required work for solana-program/stake#240. it might be easier to get it working on a 1sol bpf program first though, and work backwards for some 1lamp coverage, since i assume the test breakage is because we were only testing 1sol min

@2501babe
Copy link
Member Author

2501babe commented Feb 5, 2026

cc @joncinque, this isnt ready to merge since:

  • we want a golden bpf stake binary, not this random one
  • we have three tests to triage that are affected by the native -> bpf change. this is probably unrelated to 1sol minimum since all tests in master run with the feature on already. i would guess the stricter split or withdraw conditions, but it could also be the realloc to zero

but it is encouraging confirmation that stake pool handles the 1sol minimum in bpf stake correctly as-is

@joncinque
Copy link
Contributor

Ok that's great! Let me know if you need me to take anything over on this side

@2501babe
Copy link
Member Author

2501babe commented Feb 9, 2026

ok with dev machine, and compiled binaries so i can prefer_bpf(true) and dont need test-sbf so i can get --no-fail-fast, i have a complete picture

with my binary, which is latest commit to stake program latest including 1 sol minimum delegation (importantly meaning we also test stake pool against all the previous big commits like split rewrite, realloc to zero, and new interface) the only failures are the hijack tests. ill pare one down to a "hijack isnt possible" test and delete the rest

with a release stake program binary, we also have these failures:

failures:
    fail_with_small_lamport_amount::additional
    fail_with_small_lamport_amount::deprecated
    fail_with_small_lamport_amount::reserve
    twice::success_all_additional
    twice::success_with_additional

test result: FAILED. 21 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.73s

error: test failed, to rerun pass `--test decrease`
failures:
    fail_with_transient

test result: FAILED. 15 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.95s

error: test failed, to rerun pass `--test withdraw_edge_cases`
failures:
    success_empty_out_stake_with_fee  

test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.55s

error: test failed, to rerun pass `--test withdraw_with_fee`

meaning there are assumptions in these stake pool tests that depend on a 1sol minimum delegation, since tests in master only run with the feature on. i havent fully diagnosed yet but it might be setup issues confusing stake_get_minimum_delegation() (gets the stake program minimum) with stake_pool_get_minimum_delegation() (ceils its input and 1_000_000 using the stake pool minimum_delegation()). it could also just be that the test helpers dont handle small numbers well

@2501babe
Copy link
Member Author

2501babe commented Feb 9, 2026

the committed binary was from my branch but shasums identical to one built off stake program master (5f54c11ba)

@2501babe 2501babe marked this pull request as ready for review February 9, 2026 18:33
@2501babe 2501babe requested a review from joncinque February 9, 2026 18:33
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for handling this! Thanks also for outlining all the failing tests, I tested them against the old and new programs, and #557 should fix everything

@2501babe 2501babe merged commit 26ebba3 into solana-program:main Feb 10, 2026
18 checks passed
@2501babe 2501babe deleted the bpf-stake branch February 10, 2026 01:18
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.

2 participants