elements
elements copied to clipboard
Given claim_script does not match the given Bitcoin transaction.
Describe the issue
I can't find a way to claim the peg-in on the liquid network and give the following error:
Given claim_script does not match the given Bitcoin transaction.
If any more information is necessary, ask me. Thanks for your help.
What version of bitcoin-core and elements-core are you using?
Bitcoin Core v26 Elements Core v22.1.1
Contents of elements.conf
server=1
listen=1
txindex=1
validatepegin=1
mainchainrpccookiefile=/media/data/.cookie
nrpccookiefile=/media/elements/data/liquidv1/.cookie
maxconnections=20
Reproduction of the issue
The funds were sent from an electrum wallet to the address generated by getpeginaddress
. At this time blockstream indicates that the transaction has 107 confirmations.
I put "raw" and "proof" with the result from getrawtransaction
and gettxoutproof
"yourTXID"
elements-cli claimpegin <raw> <proof> <claim_script>
error code: -8
error message:
Given claim_script does not match the given Bitcoin transaction.
elements-cli createrawpegin "<raw>" "proof" "claim_script"
error code: -8
error message:
Given claim_script does not match the given Bitcoin transaction.
Update
Subsequent actions
getpeginaddress
generated the "mainchain_address": "3PAoFxiMsa8tgv6dDvYVqRSyweMyTpVxcZ"
probably because the node was not completely synchronized. I imported an electrum wallet into Bitcoin Core, synchronized the node again and now it gives me the following error.
without claim_script
elements-cli claimpegin <raw> <proof>
error code: -8
error message:
Failed to find output in bitcoinTx to the mainchain_address from getpeginaddress
"mainchain_address": "3PAoFxiMsa8tgv6dDvYVqRSyweMyTpVxcZ" txid 712ebc922cc4ba2054519afb00f0c9742fd86f546425ad78aaba33392223dc07
I have gone over all the points of the process, both peg-in and claim, and I don't see where I am making the mistake.