You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 28ac8af
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/operate/protocol-bonds/bond-troubleshooting.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ The bond has not been set up yet. `setup-bond` runs once per bond, within the tw
24
24
25
25
### ERR\_STAKE\_IN\_PREPARE\_PHASE (u47)
26
26
27
-
`register-for-bond` is rejected during the prepare phase, the last 100 Bitcoin blocks of every reward cycle. The prepare phase immediately before the bond starts is where most late registrations fail: in practice, registration closes when that prepare phase begins. Earlier prepare phases inside the registration window also block it; send once the next cycle has started.
27
+
`register-for-bond` is rejected during the prepare phase, the last 100 Bitcoin blocks of every reward cycle. Registration closes when the prepare phase immediately before the bond starts begins. Earlier prepare phases inside the registration window also block it; send once the next cycle has started.
28
28
29
29
### ERR\_BOND\_ALREADY\_STARTED (u43)
30
30
@@ -82,10 +82,7 @@ The signer-manager's own `validate-stake!` runs during registration and can reje
82
82
The unlock height committed in a lock output is not acceptable:
83
83
84
84
* It is below the bond's minimum unlock height (`get-bond-l1-unlock-height`), or
85
-
* it is 500,000,000 or higher, which Bitcoin would read as a Unix timestamp rather than a block height, or
86
-
* it is 2³⁹ or higher, beyond what the lock script can encode.
87
-
88
-
`buildLockScript` and `fetchConstructLockupOutputScript` reject the last case before you fund the address.
85
+
* it is 500,000,000 or higher, which Bitcoin would read as a Unix timestamp rather than a block height.
89
86
90
87
### ERR\_INVALID\_LOCKUP\_SCRIPT (u42)
91
88
@@ -99,13 +96,17 @@ The amount in your proof does not equal the value of the output on Bitcoin.
99
96
100
97
The same output (transaction ID and output index) appears twice in your registration. A registration takes at most 10 lock outputs, each listed once.
101
98
99
+
### ERR\_READ\_TX\_OUT\_OF\_BOUNDS (u39)
100
+
101
+
The block header in your proof is shorter than 80 bytes, so the contract cannot parse it. Despite the constant's name, this is about the header, not the transaction. Pass the full 80-byte header of the block that contains the transaction, for example from Esplora's `/block/{hash}/header`.
102
+
102
103
### ERR\_INVALID\_BTC\_HEADER (u40) or ERR\_INVALID\_MERKLE\_PROOF (u41)
103
104
104
105
The proof does not match Bitcoin: u40 means the block header does not match the canonical header at that height, u41 means the transaction is not in that block according to the merkle path. Rebuild the proof with `buildLockProof` (Esplora-shaped indexer responses) or `buildLockProofFromBlock` (`bitcoind`-shaped), which handle witness stripping and byte order. To isolate the failing part, `fetchVerifyBlockHeader`, `fetchParseBlockHeader`, `fetchReversedTxid` and `fetchBurnBlockHeaderHash` run the contract's own helpers read-only.
105
106
106
107
### (err u1), (err u2) or (err u3) while reading the transaction
107
108
108
-
These come from Clarity's `get-bitcoin-tx-output?`, not from pox-5, even though pox-5 uses the same numbers for unrelated errors: u1 means the transaction bytes did not decode, u2 means the output index is out of range, and u3 means the output's script is over 1,024 bytes. The usual cause is passing the segwit serialization instead of the legacy one; `buildLockProof` strips the witness for you.
109
+
These come from Clarity's `get-bitcoin-tx-output?`, not from pox-5, even though pox-5 uses the same numbers for unrelated errors: u1 means the transaction bytes did not decode, u2 means the output index is out of range, and u3 means the output's script is over 1,024 bytes.
0 commit comments