-
Notifications
You must be signed in to change notification settings - Fork 3
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
Implement pre-approval flow in btc-staker #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! Nice work
@@ -126,6 +126,10 @@ var stakeCmd = cli.Command{ | |||
Usage: "Staking time in BTC blocks", | |||
Required: true, | |||
}, | |||
cli.BoolFlag{ | |||
Name: helpers.SendToBabylonFirstFlag, | |||
Usage: "Wheter staking transaction should be first to Babylon or BTC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage: "Wheter staking transaction should be first to Babylon or BTC", | |
Usage: "Whether staking transaction should be first to Babylon or BTC", |
itest/e2e_test.go
Outdated
@@ -1451,7 +1535,7 @@ func TestStakingUnbonding(t *testing.T) { | |||
tm.waitForStakingTxState(t, txHash, proto.TransactionState_SPENT_ON_BTC) | |||
} | |||
|
|||
func TestUnbondingRestartWaitingForSignatures(t *testing.T) { | |||
func AestUnbondingRestartWaitingForSignatures(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func AestUnbondingRestartWaitingForSignatures(t *testing.T) { | |
func TestUnbondingRestartWaitingForSignatures(t *testing.T) { |
staker/babylontypes.go
Outdated
// - delegation is on babylon | ||
// - delegation has received enough covenant signatures | ||
func (app *StakerApp) activateVerifiedDelegation( | ||
stakerAddress btcutil.Address, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stakerAddress seems to be unused
staker/babylontypes.go
Outdated
@@ -133,7 +138,7 @@ func (app *StakerApp) buildDelegation( | |||
stakerAddress btcutil.Address, | |||
storedTx *stakerdb.StoredTransaction) (*cl.DelegationData, error) { | |||
|
|||
stakingTxInclusionProof := app.mustBuildInclusionProof(req) | |||
// stakingTxInclusionProof := app.mustBuildInclusionProof(req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Implements pre-approval flow in btc staker.
There is new config option
CheckActiveInterval
(cc: @filippos47 )In general this is basic support which assumes there is vigiliante in the network that wil provide the proof on inclusion at some point in time.
At this time two flows are supported, to use pre-approval flow staker must provide flag:
--send-to-babylon-first=true
At least two follow up tasks (which is not blocking for devnet2):