-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2249: ADP-478: Garbage collect delisted stake pools from SMASH r=KtorZ a=hasufell This is the first step for garbage collecting stake pools based on SMASH delisting. X-JIRA-Ticket: ADP-478 ---- ## Questions / Considerations 1. After looking at the logic, I believe we don't have to adjust any other functions of the DBLayer such as `listRegisteredPools` or `readPoolProduction`. These can still consider all pools. Only the API layer will consider delisted pools and adjust `ApiStakePool` accordingly. 2. There's still the open question whether we want to *really* delete GCed pools via `removePools` at some point. ---- ## TODO ### Feature - [x] Add `delisted` column to metadata table and populate Pool DBLayer with functions - [x] Create new `internal_state` table and have GC thread store last sync time - [x] Add garbage collection thread querying the SMASH server for delisted pools and calling `delistPools` from DBLayer - [x] have GC thread store last sync time - [x] return last GC sync time - [x] Add `POST '{ "maintenance_action": "gc_stake_pools" }' /stake-pools` endpoint ### QA - [x] database tests - [x] check json roundtripping works - [ ] Add integration tests? We don't have SMASH server integration tests yet. Co-authored-by: Julian Ospald <[email protected]> Co-authored-by: Jonathan Knowles <[email protected]> Co-authored-by: IOHK <[email protected]> Co-authored-by: KtorZ <[email protected]>
- Loading branch information
Showing
37 changed files
with
5,690 additions
and
298 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.