Panic: OP_EQUALVERIFY failed
eabz opened this issue · 4 comments
Hello, is me again.
I have been testing for a while, and everything works, except for when running redeem function.
I run polisatomicswap -rpcuser test -rpcpass test -s localhost:24127 participate PRZ5CR6cEwgMj7nGYKVyNdbaUsFR7fRJc6 0.333 e725d18c2ddecae6838f6b33b503c9d794fafcc0603eb61261ed623a014e25bf
And receive a err: Panic: OP_EQUALVERIFY failed
.
Any idea on what is this issue related? I think it might be on hashing algorithm or BIP141 implementation.
It could be a variety of things. The script execution is done as a sanity check to make sure the tx validates before publishing it.
If you set the txscript logger you can see the script execute step by step with the trace output: https://github.com/decred/dcrd/blob/4e01f768cb28a138b1b51dc17f0de284703b5f7a/txscript/engine.go#L372-L384
Thanks, so it seems that the script is not being validated somewhere.
I got this output:
panic: OP_EQUALVERIFY failed
goroutine 1 [running]:
main.(*redeemCmd).runCommand(0xc4200aa300, 0xc4200bce60, 0xc4200bce60, 0x0) /Users/eabz/go-workspace/src/github.com/polissuite/atomicswap/cmd/polisatomicswap/main.go:926 +0x1171 main.run(0x0, 0x0, 0x4006b00)
/Users/eabz/go-workspace/src/github.com/polissuite/atomicswap/cmd/polisatomicswap/main.go:360 +0xaed main.main()
/Users/eabz/go-workspace/src/github.com/polissuite/atomicswap/cmd/polisatomicswap/main.go:133 +0x26
How can I trace the debug?
https://github.com/btcsuite/btclog/
log := btclog.NewBackend(os.Stdout).Logger("txscript")
log.SetLevel(btclog.LevelTrace)
txscript.UseLogger(log)
I am a bit ashamed, I was using the secret hash, not secret.