I tried using the R scanner from the following link https://github.com/ca333/rng-scanner/blob/master/rscan.py, then I got results like this

Bitcoin Address : 3EZ5yV5FARDqEZTXzwWNt33XLVhv7hqAS2
R: 09a8bcef1c9f806b7ba1f6f07d2ac45469a0e860fb14e3e151ce1e710483
TxId : 9ae7ce79fa8501dd92ade347fae7c1737ccefa6db204a2fae485634c265d5494

then I open the transaction link and see the sigscript and witness of the transaction


What does sigscript and witness mean of the transaction? Why are the sigscript and witness forms different from the transactions below?


2 Answers 2


The scriptSig is a script that is used to satisfy the conditions of a scriptPubKey. Usually, the scriptSig pushes values such as a signature and public key onto the stack which are popped by opcodes such as OP_CHECKSIG in the scriptPublicKey that return a boolean.

The witness data is found in Segwit inputs and has the same information in the scriptSig, except it is interpreted as a stack rather than a script, because the scriptSig is supposed to only push values onto the stack in the first place. The rationale is that the scriptSig can be modified after the transaction has been signed, presenting malleability issues. It is actually changed just once by walle software, after replacing the dummy scriptPubKey script stored in that location with the real scriptSig after the transaction is signed, but there is a potential for it to be misued.

For Segwit inputs, the scriptSig is supposed to be empty (or a push of the redeemscript if it is nested inside a P2SH script) as specified in BIP 141. This is part of the reason why old wallet software can't receive bitcoins from Segwit addresses.


See: https://en.wikipedia.org/wiki/SegWit#Segregated_Witnesses_as_a_solution

The first transaction you linked is a Segwit transaction the second is a standard/legacy p2pkh. You can notice that the p2pkh is more expensive in sat/B fees.

As explained in the above link, witness means signature data. It is further explained here: What is "Witness"?

Basically Segwit or p2wpkh inputs require a field called witness which can be used to derive public key spending conditions that are just locked to the pubkey hash in p2pkh txs.

scriptSig is the name for the signature data of the tx for a p2pkh script in this case. This gives info about the scriptSig in p2wpkh txs: What is the size and weight of a P2WPKH input?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.