From ae35775cb13c64b91523465f1d1fbe4f4a47831a Mon Sep 17 00:00:00 2001 From: KonradStaniec Date: Tue, 30 Jul 2024 10:35:53 +0200 Subject: [PATCH] Migrate to labs --- CHANGELOG.md | 196 +++++++++--------- Dockerfile | 12 +- LICENSE | 6 +- Makefile | 4 +- README.md | 10 +- babylonclient/babyloncontroller.go | 18 +- babylonclient/interface.go | 4 +- babylonclient/msgsender.go | 2 +- babylonclient/pop.go | 6 +- babylonclient/utils.go | 6 +- cmd/stakercli/admin/admin.go | 4 +- cmd/stakercli/daemon/daemoncommands.go | 6 +- cmd/stakercli/main.go | 6 +- cmd/stakercli/transaction/parsers.go | 2 +- cmd/stakercli/transaction/transactions.go | 10 +- .../transaction/transactions_test.go | 16 +- cmd/stakerd/main.go | 8 +- docs/create-phase1-staking.md | 8 +- go.mod | 13 +- go.sum | 22 +- itest/babylon_node_handler.go | 2 +- itest/bitcoind_node_setup.go | 2 +- itest/e2e_test.go | 38 ++-- itest/log.go | 2 +- proto/transaction.proto | 2 +- staker/babylontypes.go | 6 +- staker/events.go | 2 +- staker/feeestimator.go | 4 +- staker/nodebackend.go | 4 +- staker/stakerapp.go | 18 +- staker/stakercontroller.go | 6 +- staker/types.go | 12 +- stakercfg/babylon.go | 2 +- stakercfg/config.go | 2 +- stakerdb/trackedtranactionstore.go | 4 +- stakerdb/trackedtransactionstore_test.go | 8 +- stakerservice/client/rpcclient.go | 2 +- stakerservice/service.go | 8 +- tools/go.mod | 6 +- tools/go.sum | 4 +- tools/tools.go | 2 +- walletcontroller/client.go | 10 +- 42 files changed, 253 insertions(+), 252 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2c16e..d740d19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,126 +1,126 @@ # Changelog -## [Unreleased](https://github.com/babylonchain/btc-staker/tree/HEAD) +## [Unreleased](https://github.com/babylonlabs-io/btc-staker/tree/HEAD) -[Full Changelog](https://github.com/babylonchain/btc-staker/compare/v0.1.0...HEAD) +[Full Changelog](https://github.com/babylonlabs-io/btc-staker/compare/v0.1.0...HEAD) **Closed issues:** -- Stakerd init fails if directory doesn't exist [\#108](https://github.com/babylonchain/btc-staker/issues/108) +- Stakerd init fails if directory doesn't exist [\#108](https://github.com/babylonlabs-io/btc-staker/issues/108) **Merged pull requests:** -- Bitcoind tests [\#110](https://github.com/babylonchain/btc-staker/pull/110) ([KonradStaniec](https://github.com/KonradStaniec)) -- docs: Incorporate validator feedback [\#109](https://github.com/babylonchain/btc-staker/pull/109) ([gusin13](https://github.com/gusin13)) -- Bump staker to stable babylon version [\#106](https://github.com/babylonchain/btc-staker/pull/106) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bumps babylon to latest version [\#105](https://github.com/babylonchain/btc-staker/pull/105) ([KonradStaniec](https://github.com/KonradStaniec)) -- bump babylon version [\#104](https://github.com/babylonchain/btc-staker/pull/104) ([KonradStaniec](https://github.com/KonradStaniec)) -- docs: Add instructions to setup bitcoind signet node [\#103](https://github.com/babylonchain/btc-staker/pull/103) ([gusin13](https://github.com/gusin13)) -- CI: Remove redundant SSH key logic [\#102](https://github.com/babylonchain/btc-staker/pull/102) ([filippos47](https://github.com/filippos47)) -- docs: Remove btcd refs [\#101](https://github.com/babylonchain/btc-staker/pull/101) ([gusin13](https://github.com/gusin13)) -- docs: Mention legacy wallet requirement [\#96](https://github.com/babylonchain/btc-staker/pull/96) ([filippos47](https://github.com/filippos47)) -- docs: Include ZMQ endpoint config [\#94](https://github.com/babylonchain/btc-staker/pull/94) ([filippos47](https://github.com/filippos47)) +- Bitcoind tests [\#110](https://github.com/babylonlabs-io/btc-staker/pull/110) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Incorporate validator feedback [\#109](https://github.com/babylonlabs-io/btc-staker/pull/109) ([gusin13](https://github.com/gusin13)) +- Bump staker to stable babylon version [\#106](https://github.com/babylonlabs-io/btc-staker/pull/106) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bumps babylon to latest version [\#105](https://github.com/babylonlabs-io/btc-staker/pull/105) ([KonradStaniec](https://github.com/KonradStaniec)) +- bump babylon version [\#104](https://github.com/babylonlabs-io/btc-staker/pull/104) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Add instructions to setup bitcoind signet node [\#103](https://github.com/babylonlabs-io/btc-staker/pull/103) ([gusin13](https://github.com/gusin13)) +- CI: Remove redundant SSH key logic [\#102](https://github.com/babylonlabs-io/btc-staker/pull/102) ([filippos47](https://github.com/filippos47)) +- docs: Remove btcd refs [\#101](https://github.com/babylonlabs-io/btc-staker/pull/101) ([gusin13](https://github.com/gusin13)) +- docs: Mention legacy wallet requirement [\#96](https://github.com/babylonlabs-io/btc-staker/pull/96) ([filippos47](https://github.com/filippos47)) +- docs: Include ZMQ endpoint config [\#94](https://github.com/babylonlabs-io/btc-staker/pull/94) ([filippos47](https://github.com/filippos47)) -## [v0.1.0](https://github.com/babylonchain/btc-staker/tree/v0.1.0) (2024-02-08) +## [v0.1.0](https://github.com/babylonlabs-io/btc-staker/tree/v0.1.0) (2024-02-08) -[Full Changelog](https://github.com/babylonchain/btc-staker/compare/v0.1.0-rc.0...v0.1.0) +[Full Changelog](https://github.com/babylonlabs-io/btc-staker/compare/v0.1.0-rc.0...v0.1.0) **Closed issues:** -- Improper handling of pending delegations upon restart [\#58](https://github.com/babylonchain/btc-staker/issues/58) +- Improper handling of pending delegations upon restart [\#58](https://github.com/babylonlabs-io/btc-staker/issues/58) -## [v0.1.0-rc.0](https://github.com/babylonchain/btc-staker/tree/v0.1.0-rc.0) (2024-01-22) +## [v0.1.0-rc.0](https://github.com/babylonlabs-io/btc-staker/tree/v0.1.0-rc.0) (2024-01-22) -[Full Changelog](https://github.com/babylonchain/btc-staker/compare/263d857429d555e0772d104dbeee70ab4e4d8c89...v0.1.0-rc.0) +[Full Changelog](https://github.com/babylonlabs-io/btc-staker/compare/263d857429d555e0772d104dbeee70ab4e4d8c89...v0.1.0-rc.0) **Breaking changes:** -- Adjust data model to store confirmed block info [\#53](https://github.com/babylonchain/btc-staker/pull/53) ([KonradStaniec](https://github.com/KonradStaniec)) -- Adapt spend stake endpoint to unbonding tx [\#48](https://github.com/babylonchain/btc-staker/pull/48) ([KonradStaniec](https://github.com/KonradStaniec)) -- Introduce watched transactions to enable staker to act as queuing service. [\#45](https://github.com/babylonchain/btc-staker/pull/45) ([KonradStaniec](https://github.com/KonradStaniec)) -- use prod hint cache [\#40](https://github.com/babylonchain/btc-staker/pull/40) ([KonradStaniec](https://github.com/KonradStaniec)) -- List all tracked transaction query [\#33](https://github.com/babylonchain/btc-staker/pull/33) ([KonradStaniec](https://github.com/KonradStaniec)) -- Improve data model [\#32](https://github.com/babylonchain/btc-staker/pull/32) ([KonradStaniec](https://github.com/KonradStaniec)) +- Adjust data model to store confirmed block info [\#53](https://github.com/babylonlabs-io/btc-staker/pull/53) ([KonradStaniec](https://github.com/KonradStaniec)) +- Adapt spend stake endpoint to unbonding tx [\#48](https://github.com/babylonlabs-io/btc-staker/pull/48) ([KonradStaniec](https://github.com/KonradStaniec)) +- Introduce watched transactions to enable staker to act as queuing service. [\#45](https://github.com/babylonlabs-io/btc-staker/pull/45) ([KonradStaniec](https://github.com/KonradStaniec)) +- use prod hint cache [\#40](https://github.com/babylonlabs-io/btc-staker/pull/40) ([KonradStaniec](https://github.com/KonradStaniec)) +- List all tracked transaction query [\#33](https://github.com/babylonlabs-io/btc-staker/pull/33) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve data model [\#32](https://github.com/babylonlabs-io/btc-staker/pull/32) ([KonradStaniec](https://github.com/KonradStaniec)) **Closed issues:** -- Unable to dump configuration if parent directory doesn't exist [\#88](https://github.com/babylonchain/btc-staker/issues/88) -- Cannot withdraw expired delegation [\#81](https://github.com/babylonchain/btc-staker/issues/81) -- Unbonding request tx can't be sent to BTC [\#76](https://github.com/babylonchain/btc-staker/issues/76) -- Support for multiple validators when re-staking [\#68](https://github.com/babylonchain/btc-staker/issues/68) -- Add additional field `unbodningTime` to `BTCUndelegationInfo` in query `BTCDelegation` and use it in staker app [\#67](https://github.com/babylonchain/btc-staker/issues/67) -- Proper handling of restarts [\#27](https://github.com/babylonchain/btc-staker/issues/27) -- `StakeFunds` should check whether the btc validator exists [\#20](https://github.com/babylonchain/btc-staker/issues/20) +- Unable to dump configuration if parent directory doesn't exist [\#88](https://github.com/babylonlabs-io/btc-staker/issues/88) +- Cannot withdraw expired delegation [\#81](https://github.com/babylonlabs-io/btc-staker/issues/81) +- Unbonding request tx can't be sent to BTC [\#76](https://github.com/babylonlabs-io/btc-staker/issues/76) +- Support for multiple validators when re-staking [\#68](https://github.com/babylonlabs-io/btc-staker/issues/68) +- Add additional field `unbodningTime` to `BTCUndelegationInfo` in query `BTCDelegation` and use it in staker app [\#67](https://github.com/babylonlabs-io/btc-staker/issues/67) +- Proper handling of restarts [\#27](https://github.com/babylonlabs-io/btc-staker/issues/27) +- `StakeFunds` should check whether the btc validator exists [\#20](https://github.com/babylonlabs-io/btc-staker/issues/20) **Merged pull requests:** -- chore: Upgrade bbn to 0.8.0-rc.0 [\#93](https://github.com/babylonchain/btc-staker/pull/93) ([vitsalis](https://github.com/vitsalis)) -- license and public deps [\#92](https://github.com/babylonchain/btc-staker/pull/92) ([KonradStaniec](https://github.com/KonradStaniec)) -- fix: Add BLS flags in make [\#91](https://github.com/babylonchain/btc-staker/pull/91) ([gusin13](https://github.com/gusin13)) -- chore: restructure and improve docs [\#90](https://github.com/babylonchain/btc-staker/pull/90) ([gusin13](https://github.com/gusin13)) -- create dir if not exists [\#89](https://github.com/babylonchain/btc-staker/pull/89) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix signet support [\#87](https://github.com/babylonchain/btc-staker/pull/87) ([KonradStaniec](https://github.com/KonradStaniec)) -- Handle lock time change output [\#86](https://github.com/babylonchain/btc-staker/pull/86) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix dynamic fee estimation [\#85](https://github.com/babylonchain/btc-staker/pull/85) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bump babylon [\#84](https://github.com/babylonchain/btc-staker/pull/84) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix withdrawing [\#83](https://github.com/babylonchain/btc-staker/pull/83) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bump babylon. Use min unbonding time [\#82](https://github.com/babylonchain/btc-staker/pull/82) ([KonradStaniec](https://github.com/KonradStaniec)) -- Rename validator to finality provider [\#79](https://github.com/babylonchain/btc-staker/pull/79) ([KonradStaniec](https://github.com/KonradStaniec)) -- Pre signed unbonding [\#78](https://github.com/babylonchain/btc-staker/pull/78) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix unbonding witness building [\#77](https://github.com/babylonchain/btc-staker/pull/77) ([KonradStaniec](https://github.com/KonradStaniec)) -- docs: Setup docs [\#75](https://github.com/babylonchain/btc-staker/pull/75) ([gusin13](https://github.com/gusin13)) -- fix: Use the slashing change address flag [\#72](https://github.com/babylonchain/btc-staker/pull/72) ([vitsalis](https://github.com/vitsalis)) -- Handle multiple validators [\#71](https://github.com/babylonchain/btc-staker/pull/71) ([KonradStaniec](https://github.com/KonradStaniec)) -- Use unbonding time from bayblon [\#70](https://github.com/babylonchain/btc-staker/pull/70) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bump babylon and use new staking tx and unbonding tx [\#66](https://github.com/babylonchain/btc-staker/pull/66) ([KonradStaniec](https://github.com/KonradStaniec)) -- feat: Utilize new slashing tx format [\#64](https://github.com/babylonchain/btc-staker/pull/64) ([gusin13](https://github.com/gusin13)) -- Add support for ecdsa sig type [\#63](https://github.com/babylonchain/btc-staker/pull/63) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add criticial error channel and simplify unbodning send [\#62](https://github.com/babylonchain/btc-staker/pull/62) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bump babylon version [\#61](https://github.com/babylonchain/btc-staker/pull/61) ([KonradStaniec](https://github.com/KonradStaniec)) -- Extract modules [\#60](https://github.com/babylonchain/btc-staker/pull/60) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix restart bug [\#59](https://github.com/babylonchain/btc-staker/pull/59) ([KonradStaniec](https://github.com/KonradStaniec)) -- Code cleanup [\#56](https://github.com/babylonchain/btc-staker/pull/56) ([KonradStaniec](https://github.com/KonradStaniec)) -- Get withdrawable transactions endpoint [\#55](https://github.com/babylonchain/btc-staker/pull/55) ([KonradStaniec](https://github.com/KonradStaniec)) -- Extend restart to unbonding tx [\#52](https://github.com/babylonchain/btc-staker/pull/52) ([KonradStaniec](https://github.com/KonradStaniec)) -- fix restart [\#51](https://github.com/babylonchain/btc-staker/pull/51) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add handling of new pop type [\#47](https://github.com/babylonchain/btc-staker/pull/47) ([KonradStaniec](https://github.com/KonradStaniec)) -- Unbonding flow [\#46](https://github.com/babylonchain/btc-staker/pull/46) ([KonradStaniec](https://github.com/KonradStaniec)) -- chore: Update bbn version [\#44](https://github.com/babylonchain/btc-staker/pull/44) ([vitsalis](https://github.com/vitsalis)) -- Force larger staking time [\#43](https://github.com/babylonchain/btc-staker/pull/43) ([KonradStaniec](https://github.com/KonradStaniec)) -- chore: Update dn unstake operation help msg [\#42](https://github.com/babylonchain/btc-staker/pull/42) ([filippos47](https://github.com/filippos47)) -- Imporve checking for best block [\#41](https://github.com/babylonchain/btc-staker/pull/41) ([KonradStaniec](https://github.com/KonradStaniec)) -- Recovery after restart [\#39](https://github.com/babylonchain/btc-staker/pull/39) ([KonradStaniec](https://github.com/KonradStaniec)) -- Fix bug in list\_transactions [\#36](https://github.com/babylonchain/btc-staker/pull/36) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add some missing daemon commands [\#35](https://github.com/babylonchain/btc-staker/pull/35) ([KonradStaniec](https://github.com/KonradStaniec)) -- Improve e2e test [\#34](https://github.com/babylonchain/btc-staker/pull/34) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add check that validator exists before allowing for staking [\#31](https://github.com/babylonchain/btc-staker/pull/31) ([KonradStaniec](https://github.com/KonradStaniec)) -- Improve slashing fee handling [\#30](https://github.com/babylonchain/btc-staker/pull/30) ([KonradStaniec](https://github.com/KonradStaniec)) -- Only show active validators [\#29](https://github.com/babylonchain/btc-staker/pull/29) ([vitsalis](https://github.com/vitsalis)) -- Stall when babylon node is not ready [\#26](https://github.com/babylonchain/btc-staker/pull/26) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add babylon to e2e test [\#25](https://github.com/babylonchain/btc-staker/pull/25) ([KonradStaniec](https://github.com/KonradStaniec)) -- nit: Update Block Cache Size default and fix usage [\#24](https://github.com/babylonchain/btc-staker/pull/24) ([vitsalis](https://github.com/vitsalis)) -- Fix delegation bug [\#23](https://github.com/babylonchain/btc-staker/pull/23) ([KonradStaniec](https://github.com/KonradStaniec)) -- nit: Add default values for ZMQ messages [\#22](https://github.com/babylonchain/btc-staker/pull/22) ([vitsalis](https://github.com/vitsalis)) -- nit: default to btcwallet for wallet backend type [\#21](https://github.com/babylonchain/btc-staker/pull/21) ([vitsalis](https://github.com/vitsalis)) -- fix: Replace deprecated SignRawTransaction [\#19](https://github.com/babylonchain/btc-staker/pull/19) ([vitsalis](https://github.com/vitsalis)) -- cli for staking BTC to Babylon [\#18](https://github.com/babylonchain/btc-staker/pull/18) ([SebastianElvis](https://github.com/SebastianElvis)) -- fix: offset and limit params out of order [\#17](https://github.com/babylonchain/btc-staker/pull/17) ([vitsalis](https://github.com/vitsalis)) -- Fix signers field in message [\#16](https://github.com/babylonchain/btc-staker/pull/16) ([KonradStaniec](https://github.com/KonradStaniec)) -- makefile: Add build-docker command [\#15](https://github.com/babylonchain/btc-staker/pull/15) ([vitsalis](https://github.com/vitsalis)) -- chore: Minor cleanup and nitpicks [\#14](https://github.com/babylonchain/btc-staker/pull/14) ([vitsalis](https://github.com/vitsalis)) -- Add query for current babylon validators [\#13](https://github.com/babylonchain/btc-staker/pull/13) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add api to spend staking transaction after time lock [\#12](https://github.com/babylonchain/btc-staker/pull/12) ([KonradStaniec](https://github.com/KonradStaniec)) -- Command to check wallets outputs [\#11](https://github.com/babylonchain/btc-staker/pull/11) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add fee estimation [\#10](https://github.com/babylonchain/btc-staker/pull/10) ([KonradStaniec](https://github.com/KonradStaniec)) -- Improve handling of sending delegation to babylon [\#9](https://github.com/babylonchain/btc-staker/pull/9) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add dockerfile and push images to ECR [\#8](https://github.com/babylonchain/btc-staker/pull/8) ([KonradStaniec](https://github.com/KonradStaniec)) -- Bump babylon to latest version [\#7](https://github.com/babylonchain/btc-staker/pull/7) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add admin commands [\#6](https://github.com/babylonchain/btc-staker/pull/6) ([KonradStaniec](https://github.com/KonradStaniec)) -- Babylon communication and persistence [\#5](https://github.com/babylonchain/btc-staker/pull/5) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add initial stake command [\#4](https://github.com/babylonchain/btc-staker/pull/4) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add server and daemon mode [\#3](https://github.com/babylonchain/btc-staker/pull/3) ([KonradStaniec](https://github.com/KonradStaniec)) -- Add core logic for funding, building, signing, sending staking transaciton [\#2](https://github.com/babylonchain/btc-staker/pull/2) ([KonradStaniec](https://github.com/KonradStaniec)) -- Project skeleton with initial cli command [\#1](https://github.com/babylonchain/btc-staker/pull/1) ([KonradStaniec](https://github.com/KonradStaniec)) +- chore: Upgrade bbn to 0.8.0-rc.0 [\#93](https://github.com/babylonlabs-io/btc-staker/pull/93) ([vitsalis](https://github.com/vitsalis)) +- license and public deps [\#92](https://github.com/babylonlabs-io/btc-staker/pull/92) ([KonradStaniec](https://github.com/KonradStaniec)) +- fix: Add BLS flags in make [\#91](https://github.com/babylonlabs-io/btc-staker/pull/91) ([gusin13](https://github.com/gusin13)) +- chore: restructure and improve docs [\#90](https://github.com/babylonlabs-io/btc-staker/pull/90) ([gusin13](https://github.com/gusin13)) +- create dir if not exists [\#89](https://github.com/babylonlabs-io/btc-staker/pull/89) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix signet support [\#87](https://github.com/babylonlabs-io/btc-staker/pull/87) ([KonradStaniec](https://github.com/KonradStaniec)) +- Handle lock time change output [\#86](https://github.com/babylonlabs-io/btc-staker/pull/86) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix dynamic fee estimation [\#85](https://github.com/babylonlabs-io/btc-staker/pull/85) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon [\#84](https://github.com/babylonlabs-io/btc-staker/pull/84) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix withdrawing [\#83](https://github.com/babylonlabs-io/btc-staker/pull/83) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon. Use min unbonding time [\#82](https://github.com/babylonlabs-io/btc-staker/pull/82) ([KonradStaniec](https://github.com/KonradStaniec)) +- Rename validator to finality provider [\#79](https://github.com/babylonlabs-io/btc-staker/pull/79) ([KonradStaniec](https://github.com/KonradStaniec)) +- Pre signed unbonding [\#78](https://github.com/babylonlabs-io/btc-staker/pull/78) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix unbonding witness building [\#77](https://github.com/babylonlabs-io/btc-staker/pull/77) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Setup docs [\#75](https://github.com/babylonlabs-io/btc-staker/pull/75) ([gusin13](https://github.com/gusin13)) +- fix: Use the slashing change address flag [\#72](https://github.com/babylonlabs-io/btc-staker/pull/72) ([vitsalis](https://github.com/vitsalis)) +- Handle multiple validators [\#71](https://github.com/babylonlabs-io/btc-staker/pull/71) ([KonradStaniec](https://github.com/KonradStaniec)) +- Use unbonding time from bayblon [\#70](https://github.com/babylonlabs-io/btc-staker/pull/70) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon and use new staking tx and unbonding tx [\#66](https://github.com/babylonlabs-io/btc-staker/pull/66) ([KonradStaniec](https://github.com/KonradStaniec)) +- feat: Utilize new slashing tx format [\#64](https://github.com/babylonlabs-io/btc-staker/pull/64) ([gusin13](https://github.com/gusin13)) +- Add support for ecdsa sig type [\#63](https://github.com/babylonlabs-io/btc-staker/pull/63) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add criticial error channel and simplify unbodning send [\#62](https://github.com/babylonlabs-io/btc-staker/pull/62) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon version [\#61](https://github.com/babylonlabs-io/btc-staker/pull/61) ([KonradStaniec](https://github.com/KonradStaniec)) +- Extract modules [\#60](https://github.com/babylonlabs-io/btc-staker/pull/60) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix restart bug [\#59](https://github.com/babylonlabs-io/btc-staker/pull/59) ([KonradStaniec](https://github.com/KonradStaniec)) +- Code cleanup [\#56](https://github.com/babylonlabs-io/btc-staker/pull/56) ([KonradStaniec](https://github.com/KonradStaniec)) +- Get withdrawable transactions endpoint [\#55](https://github.com/babylonlabs-io/btc-staker/pull/55) ([KonradStaniec](https://github.com/KonradStaniec)) +- Extend restart to unbonding tx [\#52](https://github.com/babylonlabs-io/btc-staker/pull/52) ([KonradStaniec](https://github.com/KonradStaniec)) +- fix restart [\#51](https://github.com/babylonlabs-io/btc-staker/pull/51) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add handling of new pop type [\#47](https://github.com/babylonlabs-io/btc-staker/pull/47) ([KonradStaniec](https://github.com/KonradStaniec)) +- Unbonding flow [\#46](https://github.com/babylonlabs-io/btc-staker/pull/46) ([KonradStaniec](https://github.com/KonradStaniec)) +- chore: Update bbn version [\#44](https://github.com/babylonlabs-io/btc-staker/pull/44) ([vitsalis](https://github.com/vitsalis)) +- Force larger staking time [\#43](https://github.com/babylonlabs-io/btc-staker/pull/43) ([KonradStaniec](https://github.com/KonradStaniec)) +- chore: Update dn unstake operation help msg [\#42](https://github.com/babylonlabs-io/btc-staker/pull/42) ([filippos47](https://github.com/filippos47)) +- Imporve checking for best block [\#41](https://github.com/babylonlabs-io/btc-staker/pull/41) ([KonradStaniec](https://github.com/KonradStaniec)) +- Recovery after restart [\#39](https://github.com/babylonlabs-io/btc-staker/pull/39) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix bug in list\_transactions [\#36](https://github.com/babylonlabs-io/btc-staker/pull/36) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add some missing daemon commands [\#35](https://github.com/babylonlabs-io/btc-staker/pull/35) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve e2e test [\#34](https://github.com/babylonlabs-io/btc-staker/pull/34) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add check that validator exists before allowing for staking [\#31](https://github.com/babylonlabs-io/btc-staker/pull/31) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve slashing fee handling [\#30](https://github.com/babylonlabs-io/btc-staker/pull/30) ([KonradStaniec](https://github.com/KonradStaniec)) +- Only show active validators [\#29](https://github.com/babylonlabs-io/btc-staker/pull/29) ([vitsalis](https://github.com/vitsalis)) +- Stall when babylon node is not ready [\#26](https://github.com/babylonlabs-io/btc-staker/pull/26) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add babylon to e2e test [\#25](https://github.com/babylonlabs-io/btc-staker/pull/25) ([KonradStaniec](https://github.com/KonradStaniec)) +- nit: Update Block Cache Size default and fix usage [\#24](https://github.com/babylonlabs-io/btc-staker/pull/24) ([vitsalis](https://github.com/vitsalis)) +- Fix delegation bug [\#23](https://github.com/babylonlabs-io/btc-staker/pull/23) ([KonradStaniec](https://github.com/KonradStaniec)) +- nit: Add default values for ZMQ messages [\#22](https://github.com/babylonlabs-io/btc-staker/pull/22) ([vitsalis](https://github.com/vitsalis)) +- nit: default to btcwallet for wallet backend type [\#21](https://github.com/babylonlabs-io/btc-staker/pull/21) ([vitsalis](https://github.com/vitsalis)) +- fix: Replace deprecated SignRawTransaction [\#19](https://github.com/babylonlabs-io/btc-staker/pull/19) ([vitsalis](https://github.com/vitsalis)) +- cli for staking BTC to Babylon [\#18](https://github.com/babylonlabs-io/btc-staker/pull/18) ([SebastianElvis](https://github.com/SebastianElvis)) +- fix: offset and limit params out of order [\#17](https://github.com/babylonlabs-io/btc-staker/pull/17) ([vitsalis](https://github.com/vitsalis)) +- Fix signers field in message [\#16](https://github.com/babylonlabs-io/btc-staker/pull/16) ([KonradStaniec](https://github.com/KonradStaniec)) +- makefile: Add build-docker command [\#15](https://github.com/babylonlabs-io/btc-staker/pull/15) ([vitsalis](https://github.com/vitsalis)) +- chore: Minor cleanup and nitpicks [\#14](https://github.com/babylonlabs-io/btc-staker/pull/14) ([vitsalis](https://github.com/vitsalis)) +- Add query for current babylon validators [\#13](https://github.com/babylonlabs-io/btc-staker/pull/13) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add api to spend staking transaction after time lock [\#12](https://github.com/babylonlabs-io/btc-staker/pull/12) ([KonradStaniec](https://github.com/KonradStaniec)) +- Command to check wallets outputs [\#11](https://github.com/babylonlabs-io/btc-staker/pull/11) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add fee estimation [\#10](https://github.com/babylonlabs-io/btc-staker/pull/10) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve handling of sending delegation to babylon [\#9](https://github.com/babylonlabs-io/btc-staker/pull/9) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add dockerfile and push images to ECR [\#8](https://github.com/babylonlabs-io/btc-staker/pull/8) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon to latest version [\#7](https://github.com/babylonlabs-io/btc-staker/pull/7) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add admin commands [\#6](https://github.com/babylonlabs-io/btc-staker/pull/6) ([KonradStaniec](https://github.com/KonradStaniec)) +- Babylon communication and persistence [\#5](https://github.com/babylonlabs-io/btc-staker/pull/5) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add initial stake command [\#4](https://github.com/babylonlabs-io/btc-staker/pull/4) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add server and daemon mode [\#3](https://github.com/babylonlabs-io/btc-staker/pull/3) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add core logic for funding, building, signing, sending staking transaciton [\#2](https://github.com/babylonlabs-io/btc-staker/pull/2) ([KonradStaniec](https://github.com/KonradStaniec)) +- Project skeleton with initial cli command [\#1](https://github.com/babylonlabs-io/btc-staker/pull/1) ([KonradStaniec](https://github.com/KonradStaniec)) diff --git a/Dockerfile b/Dockerfile index b3e17d6..066a09d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,13 +4,13 @@ FROM golang:1.22.3 as builder RUN apt-get update && apt-get install -y make git bash gcc curl jq # Build -WORKDIR /go/src/github.com/babylonchain/btc-staker +WORKDIR /go/src/github.com/babylonlabs-io/btc-staker # Cache dependencies -COPY go.mod go.sum /go/src/github.com/babylonchain/btc-staker/ +COPY go.mod go.sum /go/src/github.com/babylonlabs-io/btc-staker/ RUN go mod download # Copy the rest of the files -COPY ./ /go/src/github.com/babylonchain/btc-staker/ +COPY ./ /go/src/github.com/babylonlabs-io/btc-staker/ RUN BUILD_TAGS=netgo \ LDFLAGS="-w -s" \ @@ -22,7 +22,7 @@ FROM debian:bookworm-slim AS run RUN addgroup --gid 1138 --system btcstaker && adduser --uid 1138 --system --home /home/btcstaker btcstaker RUN apt-get update && apt-get install -y bash curl jq wget -COPY --from=builder /go/src/github.com/babylonchain/btc-staker/go.mod /tmp +COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/go.mod /tmp RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm /tmp/go.mod | cut -d' ' -f2) && \ wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$(uname -m).so \ -O /lib/libwasmvm.$(uname -m).so && \ @@ -31,8 +31,8 @@ RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm /tmp/go.mod | cut -d' ' -f2 sha256sum /lib/libwasmvm.$(uname -m).so | grep $(cat /tmp/checksums.txt | grep libwasmvm.$(uname -m) | cut -d ' ' -f 1) RUN rm -f /tmp/go.mod -COPY --from=builder /go/src/github.com/babylonchain/btc-staker/build/stakerd /bin/stakerd -COPY --from=builder /go/src/github.com/babylonchain/btc-staker/build/stakercli /bin/stakercli +COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/build/stakerd /bin/stakerd +COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/build/stakercli /bin/stakercli WORKDIR /home/btcstaker RUN chown -R btcstaker /home/btcstaker diff --git a/LICENSE b/LICENSE index 9a31bf4..086b5ee 100644 --- a/LICENSE +++ b/LICENSE @@ -8,14 +8,14 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. Parameters -Licensor: Babylonchain, Inc. +Licensor: Babylon Labs, Ltd. Licensed Work: btc-staker - The Licensed Work is (c) 2023 Babylonchain, Inc. + The Licensed Work is (c) 2023 Babylon Labs, Ltd. Additional Use Grant: None. -Change Date: 2027-01-20 (January 20th, 2027] +Change Date: 2027-01-20 (January 20th, 2027) Change License: Apache 2.0 diff --git a/Makefile b/Makefile index dd044fb..54a77cb 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ DOCKER = $(shell which docker) BUILDDIR ?= $(CURDIR)/build TOOLS_DIR := tools -BABYLON_PKG := github.com/babylonchain/babylon/cmd/babylond +BABYLON_PKG := github.com/babylonlabs-io/babylon/cmd/babylond GO_BIN := ${GOPATH}/bin @@ -42,7 +42,7 @@ $(BUILDDIR)/: mkdir -p $(BUILDDIR)/ build-docker: - $(DOCKER) build --tag babylonchain/btc-staker -f Dockerfile \ + $(DOCKER) build --tag babylonlabs-io/btc-staker -f Dockerfile \ $(shell git rev-parse --show-toplevel) .PHONY: build build-docker diff --git a/README.md b/README.md index b25132d..5dc9fc0 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ Please update the following configurations in the provided file: and this [link](https://github.com/bitcoin/bitcoin/pull/28597). 4. If you want to enable remote connections to the node, you can add `rpcallowip=0.0.0.0/0` and `rpcbind=0.0.0.0` to the bitcoind command. -5. Start the `bitcoind` with `-txindex` option to make sure btc-staker can get +5. Start the `bitcoind` with `-txindex` option to make sure btc-staker can get all needed bitcoin transaction data. -```bash +```bash # Create the service file sudo tee /etc/systemd/system/bitcoind.service >/dev/null < github.com/babylonchain/ibc-go/v7 v7.0.0-20230324085744-4d6a0d2c0fcf - // Downgraded to stable version see: https://github.com/cosmos/cosmos-sdk/pull/14952 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/tools/go.sum b/tools/go.sum index f6f54ec..eab5529 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -270,8 +270,8 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/babylonchain/babylon v0.9.0-rc.3 h1:Coaf37uqVvNBMpR0VR8nRcJsCx9FpAU4psRc5BGK1K8= -github.com/babylonchain/babylon v0.9.0-rc.3/go.mod h1:QTjpnEAEReQofIpZikCQXUZxSkdK0TrWAUbgxOSF9yA= +github.com/babylonlabs-io/babylon v0.9.0-rc.3 h1:Coaf37uqVvNBMpR0VR8nRcJsCx9FpAU4psRc5BGK1K8= +github.com/babylonlabs-io/babylon v0.9.0-rc.3/go.mod h1:QTjpnEAEReQofIpZikCQXUZxSkdK0TrWAUbgxOSF9yA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= diff --git a/tools/tools.go b/tools/tools.go index 477dd3d..3582fe0 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -4,5 +4,5 @@ package btcstaker import ( - _ "github.com/babylonchain/babylon/cmd/babylond" + _ "github.com/babylonlabs-io/babylon/cmd/babylond" ) diff --git a/walletcontroller/client.go b/walletcontroller/client.go index 54f3c40..13ee9ba 100644 --- a/walletcontroller/client.go +++ b/walletcontroller/client.go @@ -5,11 +5,11 @@ import ( "fmt" "sort" - staking "github.com/babylonchain/babylon/btcstaking" - "github.com/babylonchain/babylon/crypto/bip322" - "github.com/babylonchain/btc-staker/stakercfg" - scfg "github.com/babylonchain/btc-staker/stakercfg" - "github.com/babylonchain/btc-staker/types" + staking "github.com/babylonlabs-io/babylon/btcstaking" + "github.com/babylonlabs-io/babylon/crypto/bip322" + "github.com/babylonlabs-io/btc-staker/stakercfg" + scfg "github.com/babylonlabs-io/btc-staker/stakercfg" + "github.com/babylonlabs-io/btc-staker/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/btcd/btcutil"