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

stBTC liquid staking token and Babylon integration #295

Merged
merged 60 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ff29609
Add Bitcoin signet support
mappum Mar 27, 2024
bebf220
Add babylon module
mappum Mar 27, 2024
de3fc45
Move Babylon params into Params struct
mappum Mar 28, 2024
478d09c
Create babylon module
mappum Apr 3, 2024
850a2f3
Add Babylon to InnerApp
mappum Apr 3, 2024
5d969cb
Orgafy Babylon and Delegation types
mappum Apr 3, 2024
dceec07
Add babylon proto definitions
mappum Apr 3, 2024
3016583
Upgrade orga dependency
mappum Apr 4, 2024
fc8c55c
Start implementing Babylon signer
mappum Apr 4, 2024
ee4a88c
Update max_target for signet
mappum Apr 4, 2024
587833e
Add wait_to_collect_fees to bitcoin::checkpoint::Config
mappum Apr 5, 2024
b59d123
Start implementing Babylon relayer
mappum Apr 5, 2024
fab4458
Start imeplementing babylon-relayer, babylon-signer, and stake-nbtc C…
mappum Apr 5, 2024
2037835
Point orga to branch with subclient fixes
mappum Apr 5, 2024
a3f9170
Add swap-based stake/unstake
mappum Apr 5, 2024
ac55aad
Add Frost module
keppel Apr 5, 2024
4df1ba7
Add Frost field to Babylon
keppel Apr 5, 2024
3df615d
Add staking/unstaking queue test
mappum Apr 6, 2024
4ce14d0
Split Delegation signing phases into one for bbn signature, and one f…
mappum Apr 6, 2024
1bc2393
Add Frost signing in Babylon
keppel Apr 6, 2024
3f70abc
Add sigs to delegation
keppel Apr 6, 2024
412cbb1
Create initial frost group
keppel Apr 6, 2024
f158817
Advance frost signing with timeout
keppel Apr 6, 2024
7b23217
Readd babylon key as argument to Delegation and make Frost usage opti…
mappum Apr 6, 2024
d6d41a9
Omit absent validators from frost DKG
keppel Apr 6, 2024
04a72de
Fix proof generation and move into relayer module
mappum Apr 6, 2024
2fc1827
Start delegation walkthrough test
mappum Apr 6, 2024
5a1e8e2
Add frost signer cmd
keppel Apr 6, 2024
95a7927
Merge branch 'babylon' of https://github.com/mappum/nomic into babylon
keppel Apr 6, 2024
afbe59c
Add frost signer cmd
keppel Apr 6, 2024
5ce6690
Change frost interval
keppel Apr 6, 2024
3500018
Add frost group creation check
keppel Apr 6, 2024
9e20ef5
Use simple wallet in frost signer
keppel Apr 8, 2024
4044aee
Add user-facing calls and queries for babylon
mappum Apr 8, 2024
7fbf6dc
Add SDK call conversions for babylon calls
mappum Apr 8, 2024
8997e4c
Add secret store for frost signer
keppel Apr 8, 2024
fab6157
Remove unnecessary fee exemption
keppel Apr 8, 2024
ad2872e
Exempt babylon sign call from fee
mappum Apr 8, 2024
56060a4
Fix sig action required index
keppel Apr 8, 2024
47eced7
Remove in-progress signing package at frost sig iteration advance
keppel Apr 8, 2024
f69902d
Improve frost participation requirement checking
keppel Apr 8, 2024
19d7d97
Fix DKG action requirement checking
keppel Apr 8, 2024
d93616b
Adjust frost params
keppel Apr 8, 2024
0ea6e43
Adjust babylon staking period to 3 weeks
mappum Apr 8, 2024
76afad0
Feature-flag babylon and frost components which don't need to be buil…
mappum Apr 8, 2024
698f887
Fix WebClient for added bounds in client system
mappum Apr 8, 2024
4357145
Update network config
mappum Apr 9, 2024
7916cfc
Update for UI
cwlittle Apr 9, 2024
b097779
Merge branch 'ui' into babylon
keppel Apr 9, 2024
f9b3f7c
Pay nBTC fees for babylon calls
mappum Apr 9, 2024
8d72e63
Only push a maximum of 1 delegation output per checkpoint
mappum Apr 9, 2024
17c4ab1
Add frost signer logging
keppel Apr 9, 2024
f45a0e2
Remove amount field from withdraw_unstaked_nbtc call and exempt from fee
mappum Apr 9, 2024
ab9820f
Add pay_stbtc_fee call and use in MsgUnstakeNbtc conversion
mappum Apr 9, 2024
4a2a56a
Fix warnings
mappum Apr 10, 2024
11bebfe
Update slashing rate
mappum Apr 16, 2024
df4825c
Update wasm
cwlittle Apr 9, 2024
288ff99
Remove frost sig expiration step
keppel Apr 16, 2024
8d62de4
Update babylon params for testnet 4
mappum May 28, 2024
0562a84
Clear babylon delegation and frost states at given height
mappum May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,447 changes: 816 additions & 631 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default-run = "nomic"

[dependencies]
bitcoin = { version = "0.29.2", features = ["serde", "rand"] }
orga = { git = "https://github.com/nomic-io/orga.git", rev = "8e180ff2a839de81152d8f65be98d18264fbfa14", features = [
orga = { git = "https://github.com/nomic-io/orga.git", rev = "acf1b9af60af7e522a47abc6b260ae61e57c2829", features = [
"merk-verify",
] }
thiserror = "1.0.30"
Expand Down Expand Up @@ -47,6 +47,10 @@ ics23 = "0.10.2"
cosmos-sdk-proto = {version = "0.19.0", optional = true }
prometheus_exporter = "0.8.5"
lazy_static = "1.4.0"
prost = "0.11.9"
cosmrs = "0.14.0"
ripemd = "0.1.3"
frost-secp256k1-tr = {git = "https://github.com/ZcashFoundation/frost", rev = "20c2c98a931c564655e2a03719e19ba916e11545", features = ["nightly"] }

[dev-dependencies]
bitcoind = { version = "0.27.0", features = ["22_0"] }
Expand All @@ -64,9 +68,10 @@ tempfile = "3.6.0"
[build-dependencies]
toml = { version = "0.7.2", features = ["parse"] }
semver = "1.0.18"
glob = "0.3.1"

[features]
default = ["full", "feat-ibc"]
default = ["full", "feat-ibc", "testnet", "signet"]
full = [
"bitcoincore-rpc-async",
"clap",
Expand All @@ -86,6 +91,7 @@ feat-ibc = ["orga/feat-ibc"]
testnet = []
devnet = []
legacy-bin = []
signet = []

[profile.release]
overflow-checks = true
Expand Down
16 changes: 8 additions & 8 deletions networks/testnet.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
state_sync_rpc = [
"http://147.182.171.216:26667",
"http://147.182.171.216:26677",
"http://161.35.131.10:26657",
"http://161.35.131.10:26657",
]
tendermint_flags = ["--p2p.seeds", """
[email protected]:26656,\
[email protected]:26656,\
"""]
btc_relayer = ["https://relayer.nomic-testnet.mappum.io:8443"]
btc_relayer = ["https://relayer.stbtc-testnet.mappum.io:8443"]

genesis = """
{
"app_hash": "",
"chain_id": "nomic-testnet-5",
"chain_id": "stbtc-testnet-0",
"consensus_params": {
"block": {
"max_bytes": "22020096",
Expand All @@ -29,16 +29,16 @@ genesis = """
},
"version": {}
},
"genesis_time": "2024-02-14T19:53:11.939148Z",
"genesis_time": "2024-04-09T00:10:43.327809373Z",
"initial_height": "0",
"validators": [
{
"address": "044AD55B10017D73B72269396305A71B82CD1216",
"address": "733FD15403CC8EFED0CE886F0F21366164DAF3A2",
"name": "",
"power": "10",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "orlC75T55Qe9hgqGZzkPMIOeTn7kvsA2+/d2gZWHL2g="
"value": "ngphveLsJZ2GHtr2D42SA4zyapDWXA/ZomXr6ECMmEk="
}
}
]
Expand Down
Loading
Loading