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

Slashing tx change address and slashing address can't be the same #74

Open
filippos47 opened this issue Dec 6, 2023 · 1 comment
Open

Comments

@filippos47
Copy link
Contributor

filippos47 commented Dec 6, 2023

+ stakercli dn stake --staker-address tb1q4fhzedvswnpakn8a33glx9r56v6w4vxu0xhsp5 --staking-amount 8700 --validator-pks Y --staking-time 34800 --daemon-address http://btc-staker2.btc-staker:15812
...
time="2023-12-06T21:16:38Z" level=fatal msg="Failed to build delegation data for already confirmed staking transaction" btcTxHash=a1d933afa2e9cd45d5db5e5fc288a696cfa36f7e195924254fa4b08f4d74ede7 err="buidling slashing transaction failed: slashing and change addresses cannot be the same" stakerAddress=tb1q4fhzedvswnpakn8a33glx9r56v6w4vxu0xhsp5

My slashing address is indeed the same with the change address:
https://github.com/babylonchain/devnet-k8s/blob/a66b1d6df92fe37c873e7cb941bcbbcb9cb46995/flux/genesis-validators/helmrelease.yaml#L32

@KonradStaniec
Copy link
Collaborator

It seems the issue is this line:
https://github.com/babylonchain/babylon-private/blob/dev/btcstaking/staking.go#L51

It seems the case is that stakerAddress and slashing address on babylon is the same when you hit that bug, so we hit this check when building transactions.

The fix is to remove this check, especially as we do not validate this property when receiving delegation request, and then bump babylon version.

@filippos47 filippos47 changed the title Delegation won't work with default slashing tx change address Slashing tx change address and slashing address can't be the same Dec 7, 2023
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

2 participants