Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samricotta committed Jan 21, 2025
1 parent b3dad97 commit d7e2a67
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions docs/register-create-stake-phase-2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Registering a phase-1 stake or creating a new stake

## Table of contents

1. [Introduction](#1-introduction)
Expand All @@ -20,19 +19,20 @@ or create new ones. It is structured as follows:
Babylon chain message which is utilized to communicate
staking transactions to the Babylon chain. The section includes
details about how to fill in its different fields.
- [Section 2](#31-registering-a-phase-1-stake) outlines on how to register existing
Bitcoin stakes (e.g., stakes created during Phase-1) using the above structure.
- [Section 3](#32-creating-new-stakes) outlines on how to create new Bitcoin stakes
using the Expression of Interest (EOI) workflow.
- [Section 2](#31-registering-a-phase-1-stake) outlines on how to register
existing Bitcoin stakes (e.g., stakes created during Phase-1) using the
above structure.
- [Section 3](#32-creating-new-stakes) outlines on how to create new Bitcoin
stakes using the Expression of Interest (EOI) workflow.
- [Section 4](#4-monitoring-your-stake-transaction-status) outlines how to monitor
your stake transaction's status and gives a high-level overview of the unbonding
and withdrawing actions.

## 2. Babylon Messages

Babylon specifies a set of messages included in transactions for staking,
unbonding, and related actions. Below, we focus on the `MsgCreateBTCDelegation`
and other related messages.
unbonding, and related actions. Below, we go through the `MsgCreateBTCDelegation`
fields and explain how to generate and gather the required fields.

### 2.1. MsgCreateBTCDelegation

Expand Down Expand Up @@ -64,7 +64,9 @@ unbonding transaction can be found [here](./staking-script.md#unbonding-transact
`slashing_tx`:
The slashing transaction is in hex format. Generated during both staking and
unbonding phases, this transaction spends the staking or unbonding transaction
in cases of protocol violations such as double-signing.
in cases of protocol violations such as double-signing. To see exactly what
constitutes a valid slashing transaction, see the
[`Slashing Transaction` section](./staking-script.md#slashing-transaction).
A valid signature for this transaction must be included in the
`slashing_tx_sig` field.

Expand Down Expand Up @@ -111,13 +113,14 @@ this either manually through the Bitcoin network or using the staker library.
above and submit `MsgCreateBTCDelegation` to the Babylon network's btcstaking
module. You will then wait for the covenant committee to submit their signatures.

You can also use the cli to submit the message:

```shell
babylond tx btcstaking create-btc-delegation [btc_pk] [pop_hex] [staking_tx_info] [fp_pk1],[fp_pk2],... [staking_time] [staking_value] [slashing_tx] [delegator_slashing_sig] [unbonding_tx] [unbonding_slashing_tx] [unbonding_time] [unbonding_value] [delegator_unbonding_slashing_sig] [flags]
Alternatively, you can use the CLI to register phase-1 stake:

```bash
babylond tx btcstaking create-btc-delegation [btc_pk] [pop_hex] [staking_tx] [fp_pk] [staking_time] [staking_value] [slashing_tx] [delegator_slashing_sig] [unbonding_tx] [unbonding_slashing_tx] [unbonding_time] [unbonding_value] [delegator_unbonding_slashing_sig]
```

2. Next, to check the status of your delegation, you can query the babylon node
2. You can check the status of your delegation by querying the babylon node
like this.

```bash
Expand All @@ -142,11 +145,13 @@ empty inclusion proof to the Babylon network. The message should include:
Please note that this flow can also be referred to as the Expression of Interest
(EOI) workflow. More information can be found [here](./staking-script.md).

You can also use the cli to submit the message but now with the inclusion proof
field.

```shell
babylond tx btcstaking create-btc-delegation [btc_pk] [pop_hex] [staking_tx] [inclusion_proof] [fp_pk] [staking_time] [staking_value] [slashing_tx] [delegator_slashing_sig] [unbonding_tx] [unbonding_slashing_tx] [unbonding_time] [unbonding_value] [delegator_unbonding_slashing_sig]",
If you would like to create a new stake using the CLI, you can use the
following command. Please note that the `inclusion_proof` is optional and
can be left empty.

```bash
babylond tx btcstaking create-btc-delegation [btc_pk] [pop_hex] [staking_tx] [inclusion_proof] [fp_pk] [staking_time] [staking_value] [slashing_tx] [delegator_slashing_sig] [unbonding_tx] [unbonding_slashing_tx] [unbonding_time] [unbonding_value] [delegator_unbonding_slashing_sig]
```

2. Wait for covenant signatures to be collected. The covenant committee will
Expand Down Expand Up @@ -205,8 +210,8 @@ period has completed. Use the following command to initiate the withdrawal:
babylond tx incentive withdraw-reward [type] [flags]
```

Replace `[type]` with the appropriate category, such as `btc_delegation`, to
specify the type of reward you wish to withdraw.
Replace `[type]` with the appropriate category, such as `submitter`, `reporter`,
`finality_provider` or `btc_delegation`.

**Withdrawal After Slashing**

Expand Down

0 comments on commit d7e2a67

Please sign in to comment.