Firaenix / bsv-wasm

BSV stdlib written in Rust and runs in WASM environments
MIT License
70 stars 19 forks source link

Error parsing some coinbase transactions #51

Closed utxo-detective closed 2 years ago

utxo-detective commented 2 years ago

Getting errors when running Transaction.fromHex() on some some coinbase transactions, depending on the value of the input scripts. The majority of the coinbase transactions i've tested work, however there are some outliers.

The following testnet transactions are failing failing:

RuntimeError: unreachable
    at wasm://wasm/0031f49e:wasm-function[1366]:0xb6f35
    at wasm://wasm/0031f49e:wasm-function[960]:0xb1030
    at wasm://wasm/0031f49e:wasm-function[126]:0x53616
    at wasm://wasm/0031f49e:wasm-function[142]:0x59a21
    at wasm://wasm/0031f49e:wasm-function[105]:0x49a6e
    at wasm://wasm/0031f49e:wasm-function[451]:0x90a41
    at wasm://wasm/0031f49e:wasm-function[678]:0xa30d8
    at Function.fromHex (/node_modules/bsv-wasm/bsv_wasm.js:3524:24)

Additionally, the following testnet transactions are failing with a different error

Error when deserialising Script: OP_IF statement requires an OP_ELSE code
utxo-detective commented 2 years ago

this is fixed in bsv-wasm@1.3.0-beta.5 or 6 by @deanmlittle