Skip to content
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

added validator and slots avail handler #712

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

Mohsinsiddi
Copy link
Collaborator

Enhanced Staking Program Selection Flow

Changes

  • Added new get_staking_slots_count method to check available slots for staking programs
  • Improved staking program selection UI with better slot availability display
  • Added validation to ensure users can only select programs with available slots
  • Modified the selection flow to show available slots next to program names
  • Special handling for "no staking" option to show infinite availability

Technical Details

  • The new get_staking_slots_count method calculates available slots by:
    • Querying maxNumServices from the staking contract
    • Subtracting current services count from the maximum
    • Includes proper error handling for contract calls
  • Selection UI now maintains a map of available choices with slot information
  • Added input validation to prevent selection of programs with no available slots

Testing Notes

  • Test the staking slot count functionality with both active and inactive contracts
  • Verify "no staking" option shows infinite availability
  • Confirm error handling when contract calls fail
  • Test input validation for program selection

@OjusWiZard
Copy link
Member

also, can this branch be deleted? feat/staking_slots_avail

@Mohsinsiddi
Copy link
Collaborator Author

also, can this branch be deleted? feat/staking_slots_avail

deleted

operate/quickstart/choose_staking.py Outdated Show resolved Hide resolved
operate/quickstart/choose_staking.py Outdated Show resolved Hide resolved
operate/quickstart/choose_staking.py Outdated Show resolved Hide resolved
operate/quickstart/run_service.py Outdated Show resolved Hide resolved
operate/quickstart/run_service.py Outdated Show resolved Hide resolved
@OjusWiZard OjusWiZard merged commit 448edc9 into feat/multi-agent-middleware Jan 29, 2025
4 of 5 checks passed
@OjusWiZard OjusWiZard deleted the feat/avail_slots_check branch January 29, 2025 08:51
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