I'm a newbie and trying to grasp some concepts that are challenging.

In the case of a p2sh transaction - when is the transaction executed? I grasp that these transactions give the receiver control of the terms of sending - but what I want to know is if the sender - when initiating the transaction - submits this data to the block and if so does that mean that p2sh transactions are mined twice? Initially from sender to '3' prefaced address and then once again from '3' prefaced address to the receiver..? Any info is appreciated. Regards,

  • I also grasp that p2sh transactions consolidate input data so it is more efficeient - but I am still confused about the chain of activity.
    – Peter
    Dec 22, 2017 at 22:02

1 Answer 1


Not sure why this question was down voted, some explanation would have helped...

In general: A p2sh tx sends data to a hash. The hash is a one way function, so we cannot know, what content is behind the hash... also there is no double mining or similar. There is a funding tx, and a spending tx. Like with any other tx, you mine a first tx from someone else to my account, and if I spend the tx, another tx is created and mined. Same applies to p2sh transactions.

The funding tx is created, defining a condition for spending the funds (e.g. multisig, with a “type3” address), and post this tx to the network. Everyone can see the tx, but nobody knows, what’s inside (privacy gain). If then one day these funds get spent, the content of the hash is made visible, and only then one can see, what the original funding tx was about.

Advantage beside privacy: the funding of the tx is fairly cheap on fees, cause you have a short tx with several bytes. The spending tx however, reveals the hash contents, and if multisig, can be very long (increasing tx size and thus fee costs).

I found the best explanation for this in Andreas book “Mastering Bitcoin”, which is also available online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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