zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
164 stars 105 forks source link

Implement `verifyInTxBody` for Bitcoin transactions #1993

Open lumtis opened 6 months ago

lumtis commented 6 months ago

Describe the Issue The function verifyInTxBody used to verify the body of the tx when adding a in tracker in a permissionless way is only implemented for EVM chain.

The implementation needs to be added for Bitcoin, it is already implemented for VerifyOutTxBody

jacksoom commented 2 months ago

Hi teams .I want to contribute this issue. pls help me review these verification conditions

verification conditions 1: first output must be addressed to the TSS Bitcoin address. 2:The second output must be a memo output, i.e. OP_RETURN PUSH_x [DATA]. This output must be less than 80 bytes. 3:rawtx.hash == msg.TxHash

  1. tx come from valid chain network(mainnet/testnet/regtest)

cond 1/2 come from zetachain docs.
Q: Does the BTC inbound transaction contain multiple cointypes? btc/gas

@lumtis