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

docs: transition stake to Phase-2 #105

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

samricotta
Copy link

No description provided.

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few suggestions

### Babylon Configuration
```toml
[babylon]
Key = "btc-staker" # Your Babylon key name

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to instruct user how to create this key?

Copy link

@maiquanghiep maiquanghiep Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the instructions can be found here: https://github.com/babylonlabs-io/btc-staker/blob/6d25cf181be58531fff2ed32d2b0625887b9ff6a/README.md#create-a-babylon-keyring-keyring-backend-test-with-funds. Can we somehow tell users that they need to use the key created in this step?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/babylonlabs-io/btc-staker?tab=readme-ov-file#3-btc-staker-installation - we link to this at the beginning, which specifies the account within the guide. Maybe I should mention the babylon account in the prerequisites as its seemingly not clear enough

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general lgtm. Some high-level comments:

  1. We should be consistent with babylonlabs-io/babylon@f1ae78e where we use registration other than transition. So we need to change the tone a bit.
  2. We should stick with Phase-1 or Phase-2 other than phase-1 or phase-2

@samricotta samricotta marked this pull request as ready for review December 18, 2024 09:40
Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

docs/register-phase-1-stake.md Show resolved Hide resolved
## Understanding the registration process

The registration of Phase-1 stakes to Phase-2 is a manual process that requires
the staker to register their stake to Phase-2 of the Babylon network.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid overly using the "Phase-1" and "Phase-2" concepts as they might be hard to understand. If you see the document I wrote on the registration eligibility, I note about the "registration of stakes that are confirmed on the Bitcoin ledger (such as those created during phase-1) to the Babylon blockchain".

Essentially, I refer to "phase-2" as the Babylon blockchain and I explain that phase-1 stakes are a subset of stakes already created on bitcoin

This registration is executed through the `stakercli` binary
and this guide will show you how to do it through the `stakercli` binary. For
detailed information about stake eligibility criteria, registration requirements,
and how to gain voting power and earn rewards in phase-2, please refer to the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document linked only details registration eligibility and nothing about rewards and how to register. Actually, the purpose of this guide is how to register and get voting power based on the CLI


## Prerequisites

To register your stake to Phase-2, you need to have the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To register your stake to Phase-2, you need to have the
To register your stake to the Babylon blockchain, you need to have the


To register your stake to Phase-2, you need to have the
following:
- Access to your existing Bitcoin wallet from Phase-1 (needed to sign transactions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Access to your existing Bitcoin wallet from Phase-1 (needed to sign transactions
- Access to the Bitcoin wallet you have used to create your stake on Bitcoin (needed to sign transactions

WalletPass = "your-wallet-password" # Your wallet password

[walletrpcconfig]
Host = "127.0.0.1:19001" # Your Bitcoin node RPC endpoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the endpoint for the wallet RPC

KeyringBackend = "test" # Keyring backend type
GasPrices = "0.01ubbn" # Minimum gas price
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have more explanation on the commands?

This is also inclusive of creating a Babylon keyring with funds step as the
`stakerd` daemon requires a funded keyring to pay for the transactions.

## Setup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does someone need to perform a setup if a pre-requisite is having the stakerd daemon set up and operating? Isn't it supposedly already running?

I suppose you want to mention that the stakerd contains to the Bitcoind wallet hosting the key to which the transaction belongs to.

```

parameters:
- `global-parameters-file`: The path to the global parameters file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to explain why the global params file is needed. Some highlights

  • It will be used to retrieve the covenant keys and quorum from the parameters version you staked in.
  • It will also be useful in parsing your phase-1 staking transaction to extract important material from the OP_RETURN such as the staking period you chose and the finality provider. Note that OP_RETURN is only available on valid phase-1 staking transactions, but it is not required for phase-2 registration. So this guide can't be used for transactions with a malformed op_return (see my registration eligibility guide)
  • While this material can be passed manually by the user, we decided to use the parameters to provide an easier UX.

Network = "signet" # Bitcoin network (signet for testnet)
```

### Babylon Configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the reader have this already set up?

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

Successfully merging this pull request may close these issues.

5 participants