Help with transaction

0

Can someone explain how this transaction was validated, broadcasted and mined?

When i looked at the scriptsig it only had the hex value for OP_True.

https://blockchain.info/tx/91c8b08f305d895d6bc8f43bbdd36dcbc7f1d998e3df5e8f13dd9cdeebf15cb5?show_adv=true Also how can i create a transaction like this and have it broadcasted and mined?

John

Posted 2018-03-19T17:27:45.587

Reputation: 133

Answers

0

Normally, non standard transactions would be rejected by P2P nodes (but would still be mineable by miners directly since this is just a policy rule).

P2SH addresses do not disclose the script they hash until they are first spent from. So you can send BTC to any script (valid or not) using P2SH addresses. Standardness rules are not imposed on P2SH input scripts, they just have to respect the protocol rules (size, use enabled opcodes, etc...).

To create your own scripts, you can use this question as a starting point.

alcio

Posted 2018-03-19T17:27:45.587

Reputation: 1 164

But wouldn't miners reject it without a siganture or is the redeem script hash a hash of OP_TRUE in the scriptsig allowing it to be mined?John 2018-03-19T19:55:27.887

The script hashed by the address was OP_TRUE, which is valid by itself. Miners won't reject non standard scripts in P2SH spends (but would normally if used outside of P2SH).alcio 2018-03-19T20:55:21.667

So if the transaction is p2sh and i put the scriptsig as OP_True it will be valid but non standard?John 2018-03-20T01:47:39.147

It will be valid, the script will be non standard but the transaction will still be relayed.alcio 2018-03-20T09:53:06.667