Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: runtime error: slice bounds out of range | github.com/btcsuite/btcd/txscript.GetWitnessSigOpCount #1508

Open
acoutts opened this issue Dec 31, 2019 · 1 comment

Comments

@acoutts
Copy link

acoutts commented Dec 31, 2019

Running v0.20.1-beta, had 20 days of uptime without any issues. Just experienced this crash. Here is the stack trace:

panic: runtime error: slice bounds out of range [1:0]

goroutine 49 [running]:
github.com/btcsuite/btcd/txscript.GetWitnessSigOpCount(0x401823b5c0, 0x0, 0x0, 0x4014110ce8, 0x17, 0x17, 0x0, 0x0, 0x0, 0x51e00b324258a92a)
        /media/ext/bitcoinhome/btcd/source/txscript/script.go:812 +0x208
github.com/btcsuite/btcd/blockchain.GetSigOpCost(0x401564ef60, 0x401564f000, 0x401564f020, 0x101, 0xa78, 0x0, 0x0)
        /media/ext/bitcoinhome/btcd/source/blockchain/weight.go:111 +0xcc
github.com/btcsuite/btcd/mempool.(*TxPool).maybeAcceptTransaction(0x4009ba41e0, 0x401564ef60, 0x10101, 0x400a47aa00, 0x1, 0x1, 0x4014bd3d08, 0x44d640, 0x4014bd3cf8)
        /media/ext/bitcoinhome/btcd/source/mempool/mempool.go:1118 +0x8c8
github.com/btcsuite/btcd/mempool.(*TxPool).ProcessTransaction(0x4009ba41e0, 0x401564ef60, 0x4018230101, 0x3d114, 0x0, 0x0, 0x0, 0x0, 0x0)
        /media/ext/bitcoinhome/btcd/source/mempool/mempool.go:1375 +0x134
github.com/btcsuite/btcd/netsync.(*SyncManager).handleTxMsg(0x4006f88180, 0x400fc02180)
        /media/ext/bitcoinhome/btcd/source/netsync/manager.go:569 +0x1ac
github.com/btcsuite/btcd/netsync.(*SyncManager).blockHandler(0x4006f88180)
        /media/ext/bitcoinhome/btcd/source/netsync/manager.go:1285 +0x44c
created by github.com/btcsuite/btcd/netsync.(*SyncManager).Start
        /media/ext/bitcoinhome/btcd/source/netsync/manager.go:1514 +0xf8
@prabal-banerjee
Copy link

Any known solution to this?

I'm trying to spend from a multisig account. When I sign the transactions with redeem script given to SignRawTransaction3, I get native witness program cannot also have a signature script error.

When I use empty string in place of the redeem script, I encounter this panic error and btcd crashes. Workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants