-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ADR-23 Update staking parameters structure (#45)
ref: babylonlabs-io/pm#19 Implement ADR-23 to make babylon chain parameters compatible with [phase-1](https://github.com/babylonlabs-io/pm/blob/main/adr/adr-023-update-btcstaking-params.md)
- Loading branch information
1 parent
1d2155e
commit b1e255a
Showing
30 changed files
with
1,604 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package signetlaunch | ||
|
||
// TODO Some default parameters. Consider how to switch those depending on network: | ||
// mainnet, testnet, devnet etc. | ||
const BtcStakingParamStr = ` | ||
{ | ||
"covenant_pks": [ | ||
"43311589af63c2adda04fcd7792c038a05c12a4fe40351b3eb1612ff6b2e5a0e", | ||
"d415b187c6e7ce9da46ac888d20df20737d6f16a41639e68ea055311e1535dd9", | ||
"d27cd27dbff481bc6fc4aa39dd19405eb6010237784ecba13bab130a4a62df5d", | ||
"a3e107fee8879f5cf901161dbf4ff61c252ba5fec6f6407fe81b9453d244c02c", | ||
"c45753e856ad0abb06f68947604f11476c157d13b7efd54499eaa0f6918cf716" | ||
], | ||
"covenant_quorum": 3, | ||
"min_staking_value_sat": "1000", | ||
"max_staking_value_sat": "10000000000", | ||
"min_staking_time_blocks": 10, | ||
"max_staking_time_blocks": 65535, | ||
"slashing_pk_script": "dqkUAQEBAQEBAQEBAQEBAQEBAQEBAQGIrA==", | ||
"min_slashing_tx_fee_sat": "1000", | ||
"slashing_rate": "0.100000000000000000", | ||
"min_unbonding_time_blocks": 0, | ||
"unbonding_fee_sat": "1000", | ||
"min_commission_rate": "0.03", | ||
"max_active_finality_providers": 100 | ||
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package signetlaunch_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/babylonlabs-io/babylon/app" | ||
v1 "github.com/babylonlabs-io/babylon/app/upgrades/signetlaunch" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestHardCodedParamsAreValid(t *testing.T) { | ||
bbnApp := app.NewTmpBabylonApp() | ||
loadedParamas, err := v1.LoadBtcStakingParamsFromData(bbnApp.AppCodec()) | ||
require.NoError(t, err) | ||
require.NoError(t, loadedParamas.Validate()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.