Show sighash flags #3166

Closed
gmaxwell opened this Issue Oct 27, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@gmaxwell
Member

gmaxwell commented Oct 27, 2013

We should be showing sighash flags on signatures in transaction decodes.

@jgarzik

This comment has been minimized.

Show comment
Hide comment
@jgarzik

jgarzik Oct 27, 2013

Contributor

+1

Contributor

jgarzik commented Oct 27, 2013

+1

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 11, 2013

Member

To be clear: the sighash flags are the nHashType byte (enumeration SIGHASH_*), which is stored in the last byte of vchSig?

As this value is pushed to the stack in a prior op, this would require a non-trivial change to transaction decodes (which I suppose means those in Script::ToString https://github.com/bitcoin/bitcoin/blob/master/src/script.h#L580) that 'reasons backwards'? Or do I miss something?

Member

laanwj commented Nov 11, 2013

To be clear: the sighash flags are the nHashType byte (enumeration SIGHASH_*), which is stored in the last byte of vchSig?

As this value is pushed to the stack in a prior op, this would require a non-trivial change to transaction decodes (which I suppose means those in Script::ToString https://github.com/bitcoin/bitcoin/blob/master/src/script.h#L580) that 'reasons backwards'? Or do I miss something?

@makerofthings7

This comment has been minimized.

Show comment
Hide comment
@makerofthings7

makerofthings7 Mar 3, 2014

+1 to fix the missing SIGHASH in JSON output... I would like this feature.

+1 to fix the missing SIGHASH in JSON output... I would like this feature.

@laanwj laanwj closed this in #5264 Sep 25, 2015

str4d added a commit to str4d/zcash that referenced this issue Apr 17, 2018

Resolve issue bitcoin/bitcoin#3166.
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment