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

[FR] - Include the amount of actionDeposit in the query stake-address-info #592

Open
gitmachtl opened this issue Jan 28, 2024 · 16 comments
Open
Assignees

Comments

@gitmachtl
Copy link
Contributor

gitmachtl commented Jan 28, 2024

Because of this behavior (IntersectMBO/cardano-ledger#4017), is it possible to add current governance action deposits as an extra value to the stake-address-info query?

It would avoid falling into the pit to retire a stakeaddress while an active governance proposal deposit is running.

Would it be possible to have a sum of all governance action deposits in the query output like:

[
    {
        "address": "stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p",
        "registrationDeposit": 2000000,
        "rewardAccountBalance": 4271752087,
        "stakeDelegation": "pool1rdaxrw3722f0x3nx4uam9u9c6dh9qqd2g83r2uyllf53qmmj5uu",
        "voteDelegation": "keyHash-8f4fefcf28017a57b41517a67d56ef4c0dc04181a11d35178dd53f4c",
        "actionDeposit": 1000000000,
        "poolRegistrationDeposit": 500000000
    }
]

Otherwise tools would need to always query twice to do a check if the stake-address hash is involved in any ongoing governance action deposits.

So similar with remaining rewards on a stake account, it would make it - at least via the used tools - impossible to retire a stakeaddress until also actions deposits were returned. To avoid loosing the deposit funds.

EDIT: try to include Stake Pool Registration deposits. CarlosLopezDeLara

@smelc
Copy link
Contributor

smelc commented Jan 29, 2024

cc @CarlosLopezDeLara

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Feb 29, 2024
@gitmachtl
Copy link
Contributor Author

refresh

@github-actions github-actions bot removed the Stale label Jun 12, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Jul 12, 2024
@smelc smelc self-assigned this Jul 15, 2024
@smelc smelc removed the Stale label Jul 15, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@smelc
Copy link
Contributor

smelc commented Sep 3, 2024

@CarlosLopezDeLara> how one would obtain the value to put in actionDeposit? For example in terms of other existing queries/other commands?

@CarlosLopezDeLara
Copy link
Contributor

@CarlosLopezDeLara> how one would obtain the value to put in actionDeposit? For example in terms of other existing queries/other commands?

@smelc it is:

cardano-cli query protocol-parameters | jq .govActionDeposit

@smelc
Copy link
Contributor

smelc commented Sep 4, 2024

@CarlosLopezDeLara> are you sure? If I understood @gitmachtl right, he wants the sum of deposits of governance actions done by the stake address being considered. It's not a static value.

@gitmachtl
Copy link
Contributor Author

gitmachtl commented Sep 4, 2024

the idea was, that if you do a stake-address info query, you now get the information about a vote delegation. thats nice. but, in case of a stake-address deregistration and an open running action proposal linked to that stake address, it would be good to have those amounts summed up also in an entry of the stakeaddress-info. so you can easily check if there are still things "open", before you deregister/shutdown such a stake account.

otherwise, if you forget about an action and you deregister it, the 100kAda are going where? to the treasury?

we have mechanism on the chain that prevents us from shutting down a stake address if there is this a value in the rewards account. but if funds are locked up in a governance action, we don't have this safety mechanism.

same goes for an action proposal that is a treasury withdrawal to such a stake address. i guess it will not be a common thing that people forget about there used stake address in proposals, but still a bit strange that there is currently no safety guard.
its one thing to loose 500ADA from a pool-deregistration if you retire the rewards address too fast, but loosing 100kAda or more via a treasury withdrawal is a whole different story imo.

so together with such a query, it would be nice to think about such a safety feature in the ledger itself. disabling a stakeaddress retirement if the address has rewards on it (like now), but in addition block the retirement if its used in an action proposal.

@CarlosLopezDeLara
Copy link
Contributor

Apologies @smelc, I misunderstood the question.

To get the amount locked in action deposits one would need to query the gov-state and parse the active proposals.

Every proposal contains the fields: deposit return address and deposit

@gitmachtl
Copy link
Contributor Author

gitmachtl commented Sep 4, 2024

Apologies @smelc, I misunderstood the question.

To get the amount locked in action deposits one would need to query the gov-state and parse the active proposals.

Every proposal contains the fields: deposit return address and deposit

i know, the question is, can we make it more convenient for people to do a global stake address info check also with that info.

and, can we introduce safety guards in the ledger?

@smelc
Copy link
Contributor

smelc commented Sep 4, 2024

and, can be introduce saftly guards in the ledger?

cc @lehins

Copy link

github-actions bot commented Oct 6, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Oct 6, 2024
@smelc smelc removed the Stale label Oct 7, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Nov 16, 2024
@smelc smelc removed the Stale label Nov 18, 2024
@gitmachtl
Copy link
Contributor Author

gitmachtl commented Nov 18, 2024

anti stale

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Dec 19, 2024
@smelc smelc removed the Stale label Jan 2, 2025
@smelc smelc assigned CarlosLopezDeLara and unassigned smelc Jan 14, 2025
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

No branches or pull requests

3 participants