This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Add compute node deregistration and stake reclamation #255
Merged
JannikSt merged 5 commits intoApr 22, 2025
Conversation
Contributor
|
appreciate the PR marco! @JannikSt wondering if it'd be a good idea to also add this to the worker setup/init process? i.e. if a user is booting up a new worker and they have old nodes that they haven't de-registered and reclaimed stake for, we can prompt them if they want to automatically do that before joining with their new node? since i'd imagine that some users just aren't aware of the fact that they have zombie nodes with reclaimable stake. |
- Added `remove_compute_node` method to `PrimeNetworkContract` for deregistering a node on-chain - Added `reclaim_stake` method to allow providers to withdraw their stake - Introduced `Deregister` CLI command to remove a compute node from a pool and reclaim stake - Extended `ComputeNodeOperations` and `ProviderOperations` with corresponding async methods
JannikSt
approved these changes
Apr 22, 2025
Member
JannikSt
left a comment
There was a problem hiding this comment.
@marcogiglio Thank you for your contribution - I've made some minor adjustments but your code already works like a charme!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR introduces full support for deregistering compute nodes from the Prime Network and reclaiming associated stakes. Changes include:
Motivation:
I've been experimenting with the protocol and running some compute nodes over the past few weeks. I realized it could be useful for providers to have a command that allows them to remove a node from an active pool and reclaim the associated stake. This can be helpful for scenarios like rotating private credentials or freeing up staked tokens for liquidity needs.
I implemented the necessary changes to support this functionality and tested it locally.
Let me know if you think this addition would be valuable, and if there's anything I can do to improve the PR.
Best,
Marco