interlay / interbtc-clients

interBTC Clients | Vault, Oracle, Faucet
Apache License 2.0
49 stars 30 forks source link

Submit coinbase proofs for issue, redeem and replace #501

Closed gregdhill closed 1 year ago

gregdhill commented 1 year ago

To accompany this fix we need to relay two transactions (and merkle proofs) for each issue, redeem and replace request. We can do this via Bitcoin Core using the getblock RPC or the Esplora /block/:hash/txids endpoint and fetching the transaction for the first txid listed. The coinbase transaction is always the first transaction in each block but to verify this we can check that there is only one input and the previous output is null - see rust-bitcoin or our parsing code here.