You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first send staking transaction to BTC and wait for it to be confirmed
then send delegation to BTC
This flow is currently discouraged.
Currently staker supports both flows: pre-approval and post-approval, due to the fact that it was easier and quicker to add additional flow rather than do fully fledged refactoring. Difference in handling both flows can be tracked from handling staking cmd.
Removal of post-approval flow, should result in simplifications in btc-staker logic. It should also result in possibility of dropping most of the state from btc-staker database.
Reduce amount of state held in Database
Currently btc-staker, holds a lot of state in its database which leads to complex logic when restarting the program.
After removing post-approval flow and watch-staking endpoint it should be possible to remove most of the state from btc-staker database and relay mostly only Babylon blockchain as some sort of storage for all the data related to staking. In theory, the only thing that btc-staker could store in its local db are staking transactions hashes for initiated staked requests.
Track status of each sent staking transaction with each new BTC block
Currently btc-staker tracks the state changes of the sent staking transactions based on the operations initiated from btc-staker. i.e if user would unbond his staker from other place (lets say front end ui) the btc staker would be left with invalid db state. This is less than ideal.
This epic describes possible improvements to BTC staker based on most recent developments.
Delete
watch-staking
endpointThe exsiting endpoint watch-staking endpoint was only introduced as hack for the past testnet. It can be deleted. It should simplify database and logic in stakerapp as there are different code paths to handle this request (example: https://github.com/babylonlabs-io/btc-staker/blob/v0.13.0/staker/stakerapp.go#L1502)
Remove
post-approval flow
In the past the only way to stake was:
This flow is currently discouraged.
Currently staker supports both flows: pre-approval and post-approval, due to the fact that it was easier and quicker to add additional flow rather than do fully fledged refactoring. Difference in handling both flows can be tracked from handling staking cmd.
Removal of post-approval flow, should result in simplifications in btc-staker logic. It should also result in possibility of dropping most of the state from btc-staker database.
Reduce amount of state held in Database
Currently btc-staker, holds a lot of state in its database which leads to complex logic when restarting the program.
After removing
post-approval
flow andwatch-staking
endpoint it should be possible to remove most of the state from btc-staker database and relay mostly only Babylon blockchain as some sort of storage for all the data related to staking. In theory, the only thing that btc-staker could store in its local db are staking transactions hashes for initiated staked requests.Track status of each sent staking transaction with each new BTC block
Currently btc-staker tracks the state changes of the sent staking transactions based on the operations initiated from btc-staker. i.e if user would unbond his staker from other place (lets say front end ui) the btc staker would be left with invalid db state. This is less than ideal.
The most comprehensive solution would be:
The text was updated successfully, but these errors were encountered: