or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Polkadot corrupted ledgers recovery
We outline the i) current state of the corrupted ledgers; 2) steps to recover all corrupted and double bonded ledgers; 3) the state after the recovery (i.e. executing the recovery referendum).
TL;DR: The solution to restore the corrupted ledgers and bonds in Polkadot consists of caling the following extrinsics:
Staking.restore_ledger(138fZsNu67JFtiiWc1eWK2Ev5jCYT6ZirZM288tf99CUHk8K, None, None, None)
Staking.restore_ledger(14kwUJW6rtjTVW3RusMecvTfDqjEMAt8W159jAGBJqPrwwvC, None, None, None)
Staking.restore_ledger(13SvkXXNbFJ74pHDrkEnUw6AE8TVkLRRkUm2CMXsQtd4ibwq, None, None, None)
Staking.restore_ledger(12YcbjN5cvqM63oK7WMhNtpTQhtCrrUr4ntzqqrJ4EijvDE8, None, None, None)
Current state
Instructions to re-run the report in github/polkadot-js-report.
Explanation
There are 2 bonded ledgers that have been wiped out due to double bonding (associated with stashes
14k
and138
). In addition, there is a double-bonding corruption (associated with stashes12Y
and13S
) that affected the stashes locks.In sum, the stashes/ledgers needing to recover in Polkadot are:
138fZsNu67JFtiiWc1eWK2Ev5jCYT6ZirZM288tf99CUHk8K
14kwUJW6rtjTVW3RusMecvTfDqjEMAt8W159jAGBJqPrwwvC
13SvkXXNbFJ74pHDrkEnUw6AE8TVkLRRkUm2CMXsQtd4ibwq
For the different corruption cases and how to recover them, check the Ledger recovery walkthrough doc.
1. None ledger
138
Current state:
Bonded(138) = 138fZsNu67JFtiiWc1eWK2Ev5jCYT6ZirZM288tf99CUHk8K
(itself)Ledger(138) = None
Balances.locks.staking(138) = 85,560,353,029,324
The stash
138
is bonded but its ledger was wiped out due to double bonding (see X) and the staking locks previous to the wiep out were left behind. We can recover the ledger by calling the extrinsicStaking.restore_ledger
:Solution:
✅ State after recovering
Bonded(138) = 138fZsNu67JFtiiWc1eWK2Ev5jCYT6ZirZM288tf99CUHk8K
(itself)Ledger(138) = Ledger {stash: 138.., total: 85,560,353,029,324}
Balances.locks.staking(138) = 85,560,353,029,324
The ledger has been recovered as expected, with the new
ledger.total
being the equivalent of the staking locks.2. None ledger
14k
Current state:
Bonded(14k) = 15bt67qghz8hJxCUPgAXmzVxUBHLpPN41RVm2nwMFyLWByVE
Ledger(14k) = None
Balances.locks.staking(14k) = 42,606,076,773,049
Note that although
14k
is bonded to15bt
, the stash, bond and locks of15bt
are all None. The solution is to recover the ledger associated with14k
:Solution:
✅ State after recovery:
Bonded(14k) = 14kwUJW6rtjTVW3RusMecvTfDqjEMAt8W159jAGBJqPrwwvC
Ledger(14k) = Ledger {stash: 14k.., total: 42,606,076,773,049}
Balances.locks.staking(14k) = 42,606,076,773,049
The ledger has been recovered as expected, with the new ledger.total being the equivalent of the staking locks.
3. Corrupted ledger
13S
Current state:
Bonded(13S) = 12gmcL9eej9jRBFT26vZLF4b7aAe4P9aEYHGHFzJdmf5arPi
Ledger(13S) = None
Balances.locks.staking(14k) = 201,151,395,706,325
Solution:
✅ State after recovery:
Bonded(13S) = 13SvkXXNbFJ74pHDrkEnUw6AE8TVkLRRkUm2CMXsQtd4ibwq
Ledger(13S) = Ledger {stash: 13S.., total: 201,151,395,706,325}
Balances.locks.staking(13S) = 201,151,395,706,325
3. Corrupted ledger
12YcbjN5cvqM63oK7WMhNtpTQhtCrrUr4ntzqqrJ4EijvDE8
Current state
Bounded(12Y) = 12YcbjN5cvqM63oK7WMhNtpTQhtCrrUr4ntzqqrJ4EijvDE8
Ledger(12Y) = Ledger {stash: 138.., total: 85,560,353,029,324}
Balances.locks.staking(12Y) = 84,985,052,242,831
Solution:
✅ State after recovery:
Bonded(12Y) = 12YcbjN5cvqM63oK7WMhNtpTQhtCrrUr4ntzqqrJ4EijvDE8
Ledger(12Y) = Ledger {stash: 12Y , total: 84,985,052,242,831}
Balances.locks.staking(12Y) = 84,985,052,242,831
Overall state after recovery
Instructions to re-run the report in github/polkadot-js-report.
Note: the overall number of bonded/ledgers/payee items may differ at the time of running the report script, but the important factor is that they are all in sync after the ledger recovery.