Author

Topic: Can I/Miners spend an output with anyone-can-spend public script? (Read 200 times)

legendary
Activity: 3150
Merit: 2185
Top-tier crypto casino and sportsbook
Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?

SegWit-enabled nodes (ie. non-legacy nodes) will deem the transaction invalid and ignore it.

Legacy nodes (ie. ones that can't validate SegWit transactions as emphasized by nc50lc) will deem the transaction valid and fork off the main chain (assuming there's enough legacy nodes left to propagate this transaction amongst each other). Unless the majority of miners decide to follow this fork it will be orphaned rather quickly though.
legendary
Activity: 2646
Merit: 6681
Self-proclaimed Genius
As I am reading BIP 141, there is a sentence saying "Wallets should always be wary of anyone-can-spend scripts and treat them with suspicion."
Based from what I understand, it's still on-topic about the paragraph's title "backward compatibility" and talking about "wallets of/connected to non-upgraded nodes".
It used "wallets", so not just Bitcoin Core but including other clients that might misread witness data because:

Quote from:  bip-0141
Non-upgraded nodes, however, will not see nor validate the witness data and will consider all witness programs as anyone-can-spend scripts
-snip-
What a non-upgraded wallet cannot do:
Validating segregated witness transaction. It assumes such a transaction is always valid
'think this quote is enough?
newbie
Activity: 8
Merit: 3
Does this mean that by default anyone-can-spend scripts are disabled and cannot be used?

AFAIK it's the opposite.

Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?

Most Bitcoin full nodes (whether it's run by miner, exchange or regular user) would reject such block because there's no valid redeem script or the UTXO is invalid.

Then I don't quite get the point of "Wallets should be wary of any-one-can-spend scripts"
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
Does this mean that by default anyone-can-spend scripts are disabled and cannot be used?

AFAIK it's the opposite.

Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?

Most Bitcoin full nodes (whether it's run by miner, exchange or regular user) would reject such block because there's no valid redeem script or the UTXO is invalid.
newbie
Activity: 8
Merit: 3
As I am reading BIP 141, there is a sentence saying "Wallets should always be wary of anyone-can-spend scripts and treat them with suspicion."

Does this mean that by default anyone-can-spend scripts are disabled and cannot be used?

Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?
Jump to: