ChanServ changed the topic of #bitcoin-core-dev to: Bitcoin Core development discussion and commit log | Feel free to watch, but please take commentary and usage questions to #bitcoin | Channel logs: http://www.erisian.com.au/bitcoin-core-dev/, http://gnusha.org/bitcoin-core-dev/ | Weekly Meeting Thursday @ 14:00 UTC | Meeting topics http://gnusha.org/bitcoin-core-dev/proposedmeetingtopics.txt
adil has joined #bitcoin-core-dev
adil has quit [Quit: adil]
jon_atack has quit [Ping timeout: 265 seconds]
SpellChecker has quit [Ping timeout: 260 seconds]
SpellChecker has joined #bitcoin-core-dev
jonatack has joined #bitcoin-core-dev
cmirror has joined #bitcoin-core-dev
SpellChecker has quit [Quit: bye]
SpellChecker has joined #bitcoin-core-dev
mcey_ has joined #bitcoin-core-dev
mcey has quit [Ping timeout: 252 seconds]
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 248 seconds]
Guest12 has joined #bitcoin-core-dev
Guest12 has quit [Client Quit]
mcey has joined #bitcoin-core-dev
mcey_ has quit [Ping timeout: 252 seconds]
SpellChecker has quit [Ping timeout: 260 seconds]
SpellChecker has joined #bitcoin-core-dev
willcl-ark has quit [Quit: left]
willcl-ark has joined #bitcoin-core-dev
willcl-ark has joined #bitcoin-core-dev
willcl-ark has quit [Quit: left]
willcl-ark has joined #bitcoin-core-dev
willcl-ark has joined #bitcoin-core-dev
abubakarsadiq has joined #bitcoin-core-dev
Guyver2 has joined #bitcoin-core-dev
SpellChecker has quit [Ping timeout: 260 seconds]
adil has joined #bitcoin-core-dev
aleggg has quit [Ping timeout: 258 seconds]
aleggg has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 272 seconds]
gribble has quit [Remote host closed the connection]
<bitcoin-git> [qa-assets] dergoegge merged pull request #195: Revert "Revert utxo_snapshot additions temporarily" (main...main) https://github.com/bitcoin-core/qa-assets/pull/195
<bitcoin-git> [qa-assets] dergoegge pushed 2 commits to main: https://github.com/bitcoin-core/qa-assets/compare/b68b27809741...5114c2d828d9
<bitcoin-git> qa-assets/main ffb414e MarcoFalke: Revert "Revert utxo_snapshot additions temporarily"
<bitcoin-git> qa-assets/main 5114c2d Niklas Gögge: Merge pull request #195 from maflcko/main
gribble has joined #bitcoin-core-dev
adil has quit [Quit: adil]
jonatack has quit [Ping timeout: 252 seconds]
jonatack has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 258 seconds]
kevkevin has joined #bitcoin-core-dev
bugs_ has joined #bitcoin-core-dev
gribble has quit [Remote host closed the connection]
kevkevin has quit [Ping timeout: 248 seconds]
bitdex has quit [Ping timeout: 260 seconds]
bitdex has joined #bitcoin-core-dev
gribble has joined #bitcoin-core-dev
_flood has quit [Ping timeout: 245 seconds]
abubakarsadiq has quit [Quit: Connection closed for inactivity]
SpellChecker has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 252 seconds]
mailman123 has joined #bitcoin-core-dev
mailman123 has quit [K-Lined]
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Client Quit]
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Quit: Client closed]
kiwiirc has joined #bitcoin-core-dev
<bitcoin-git> [bitcoin] hebasto opened pull request #30630: doc: Update ccache website link (master...240811-ccache-docs) https://github.com/bitcoin/bitcoin/pull/30630
kiwiirc has quit [Client Quit]
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Client Quit]
furszy has quit [Changing host]
furszy has joined #bitcoin-core-dev
Guyver2 has left #bitcoin-core-dev [Closing Window]
kevkevin has joined #bitcoin-core-dev
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Quit: Client closed]
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Client Quit]
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Ping timeout: 256 seconds]
Talkless has joined #bitcoin-core-dev
portlandhodl has joined #bitcoin-core-dev
portlandhodl has quit [Quit: portlandhodl]
achow101 has quit [Remote host closed the connection]
portlandhodl has joined #bitcoin-core-dev
<portlandhodl> Hey, I work for MARA and created their Slipstream product. With that we received and mined a nonstandard transaction (maybe standard) but violated the non-mandatory-script-verify flag for OP_SUCCESSx
<portlandhodl> My question is does this have an impact on dev hooks for future softfork upgrades? Other than loss of funds and being insecure are there problems with allowing these TXs to be mined? I am asking primarily to determine if Slipstream policy needs to change.
<portlandhodl> TX in question.
<gmaxwell> portlandhodl: they shouldn't be mined, if they are actively created and mined it makes it impossible to use them for softforks without risking forking the network when the softfork activates.
<gmaxwell> portlandhodl: mining any at all also means that future softfork rules can't be retroactively enforced prior to the inclusion after after the feature is activated. Which means carrying around more conditional complexity than otherwise. If, after a feature is long since activated if there are no conflicts with it in the chain, the enforcement will just get retroactively set to the start (or to
<gmaxwell> the point some other feature activated), in order to avoid having more conditional logic. Though this point is pretty insignificant to the prior one.
<gmaxwell> And because they only have an effect of making outputs totally insecure, there shouldn't be any benefit for allowing them.
<portlandhodl> Not to sound completely ignorant, how? Does activation logic not cover TXNs from the past being marked as OP_SUCCESSx and being spendable by all?
<portlandhodl> This would mean that a portion of the network, with legacy clients would say that this TX is spendable by all, which is has been spent and validated. The activating nodes would just have a subset of those rules. Assuming this activated with consensus, the longest chain would just be a subset of the rules of the looser OP_SUCCESSx policy.
<gmaxwell> portlandhodl: If there isn't 100% hashpower enforcing the new rule and someone mines a violation of the new rule (no longer spendable by all but spendable only according to the new rules), then the network will split among the more permissive nodes that accept the violation and and a portion that don't. If there are no violations entering the chain, then even though some hashpower may not
<gmaxwell> enforce the risk of the consensus splitting is low (it'll only happen if someone intentionally makes an invalid block to disrupt the network).
<gmaxwell> If the new rule miners have a majority hashpower they will eventually overtake the other chain, and the older nodes will move to the less permissive chain.
<gmaxwell> but even if the enforcing parties have a large majority hashpower the fork can be pretty long. And because reorgs are relatively rare on bitcoin, that creates a big double spending oppturnity against users.
<gmaxwell> so the whole reason opcodes like OP_NOP, OP_SUCCESS etc. exist but aren't normally allowed for mining is so that the network is free of them when they go to get put to some real use, so they don't expose latent disagreements about consensus rules around that transition.
<gmaxwell> portlandhodl: Make sense?
<gmaxwell> Now you could say, "well we could stop ahead of them being used", and that's true. But (1) the comment I made about not being able to backdate the rules would still apply. (2) it's really hard to be confident that any behavior has _stopped_ vs just not being active at the moment, (3) there is always a risk that you fall over to a backup node that still has the behavior. (IIRC that actually
<gmaxwell> caused a brief fork and reorg around the activation of OP_CSV-- miner had "upgraded" but had a failover to a non-upgraded node around activation time)
<portlandhodl> Yeah, and thanks for going over this in such a concise manner. This was a part of my model as well.
<portlandhodl> So overall this particular transaction isn't a threat to fork the network because we are not activating a softfork and the risk of a reorg 100s of blocks deep isn't likely.
<gmaxwell> yeah it's not a threat to the network, only at worse a nussance after upgrading that a rule that uses that code can't be retroactively enforced past that point, to simplify the codebase and avoid a lot of "if past here do x, if past there do y".
<gmaxwell> Though continuing to do so would be pretty unfortunate, -- if you have users that actually need an OP_SUCCESS opcode for some reason (like one that will never get turned into a useful thing), then I wouldn't see any problem in specifying one for that purpose.
<portlandhodl> Thank you, revised policy will be implemented around OP_SUCCESSx. I had spent a lot of time creating logic around the ScriptPubKey and rules around hooks, but didn't enforce it in Tapscript because of BIP342.
bugs_ has quit [Quit: Leaving]
<portlandhodl> Again thank you for this discussion and your time.
<gmaxwell> doh. No problem. The code really should be setup to make it easier to disable standardness rules that aren't important for consensus consistency.
<gmaxwell> portlandhodl: you do stil prevent ECDSA malleated signature, I hope? otherwise that opens up malleation against against non-segwit txn.
* gmaxwell looks up the flag name.
<portlandhodl> Correct! Let me get you a list of non-madatory-flags we are not enforcing.
<portlandhodl> SCRIPT_ERR_PUSH_SIZE, SCRIPT_ERR_OP_RETURN, SCRIPT_ERR_UNBALANCED_CONDITIONAL, SCRIPT_ERR_SIG_DER, SCRIPT_ERR_SIG_NULLDUMMY, SCRIPT_ERR_DISCOURAGE_OP_SUCCESS, SCRIPT_ERR_CLEANSTACK, SCRIPT_ERR_SCHNORR_SIG_SIZE
<gmaxwell> Those are the ones you're not enforcing?
<portlandhodl> Currently.
<portlandhodl> Just added SCRIPT_ERR_DISCOURAGE_OP_SUCCESS back into policy.
<gmaxwell> So several of thse are needed to prevent malleation attacks against non segwit txn.
<portlandhodl> I assume SCRIPT_ERR_SIG_DER
<gmaxwell> particular, SCRIPT_ERR_SIG_DER, SCRIPT_ERR_CLEANSTACK, SCRIPT_ERR_SIG_NULLDUMMY,
<gmaxwell> though the latter two don't apply as broadly. (like nulldummy only applies to multisig)
kiwiirc has joined #bitcoin-core-dev
<gmaxwell> SCRIPT_ERR_SCHNORR_SIG_SIZE is another future upgrade thing (e.g. allow exiting checksig to be used for other key sizes) though I think not as important as the success rules.
<portlandhodl> SCRIPT_ERR_SIG_DER, this could be used to modify a TXID by encoding the same signature in a different way, keeping this TX as valid but not having the same hash?
<gmaxwell> portlandhodl: exactly.
kiwiirc has quit [Killed (ozone (No Spam))]
<portlandhodl> Nobody has utilized this yet, but removing out of caution.
<gmaxwell> the cleanstack rule is because otherwise you can stuff extra pushes into signatures that don't get consumed.
<portlandhodl> SCRIPT_ERR_SIG_NULLDUMMY -> Is this becuase you could put a 1,2,3 etc as the dropped element and still have this ScriptSig be valid?
<gmaxwell> Yes.
<gmaxwell> Are you familar with BIP 62? https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki it was abandoned as a consensus rule in favor of segwit, but it's rule were implemented as standardness rules to protect pre-segwit txn.
kiwiirc has joined #bitcoin-core-dev
<gmaxwell> (part of the issue was that we kept finding more and more ways to attack txn, so enumerating all of them wasn't working, which drove deploying a more general fix... though those rules are enough to protect the most common transaction types.)
<portlandhodl> SCRIPT_ERR_CLEANSTACK, would be that I add an extra element to the ScriptSig that would not be consumed keeping the TX valid, but also having a different TXID
<gmaxwell> portlandhodl: Exactly.
<gmaxwell> It also creates another kind of attack where if someone pays too much fees, you can shove your child porn into it or whatever, and they'll pay to get it mined. :(
<gmaxwell> (because you just expanded their txn without invalidating it)
<portlandhodl> Okay, because there has been 0 demand for these I will reintroduce them into mempool acceptance policy.
<portlandhodl> I had never read BIP62 due to the withdrawn status.
<portlandhodl> Not that it's a good reason to not read it. Reviewing now.
<gmaxwell> Yeah, the withdrawn status is misleading.
<portlandhodl> I can't thank you enough for your time and discussion about these topics. I don't have much support at MARA around the super deep nuances of topics like these.
<gmaxwell> It's withdrawn as a consensus rule, but it's the rational behind the standardness rules we've been discussing. Normally BIPs aren't written for standardness rules, though they probably should be for ones that aren't just subjective, e.g. ones that prevent attacks.
<gmaxwell> Well you can basically always show up here, or directly ask regular contributors. (esp people who wrote functionality you're curious about).
<gmaxwell> also the stack overflow has been a good place to get more technical answers.
<gmaxwell> (bitcoin.stackexchange.com)
<portlandhodl> I will add that into my toolkit, typically I have only looked though there for answers to questions, not ask.
<gmaxwell> Certantly any kind of "I'm thinking of changing this consensus touching thing, what consequences should I be aware of" is a welcome sort of question. Not everything is well documented.
<gmaxwell> There have also been some standardness rules in the past that were papering over non-published more serious vulnerablities. I don't believe there are any right now, but I wouldn't know. SCRIPT_ERR_SIG_DER, is one such example: a bug in openssl could have been exploited to split the network between 64 and 32 bit hosts (which there were many of both at the time). OpenSSL isn't used anymore
<gmaxwell> by any version anyone cares about running, so the issue is now gone, but for a period removing that would have exposed a consensus split.
kiwiirc has quit [Quit: Client closed]
<gmaxwell> There were a number of opcodes that had very very bad performance and could have been abused to result in blocks taking minutes to validate, but were blocked out by Satoshi's standardness rules (that blocked almost everything). ... the broad relaxation of standardness rules didn't happen until most of those were fixed.
<gmaxwell> etc. so if you do come here and ask questions you might also get warned about things like that, should any apply.
<portlandhodl> Very well aware of those per discussions around the GCC. OP_CODESEPARATOR, OP_CHECKSIG
kiwiirc has joined #bitcoin-core-dev
kiwiirc has quit [Killed (ozone (No Spam))]
kiwiirc has joined #bitcoin-core-dev
kiwiirc15 has joined #bitcoin-core-dev
kiwiirc has quit [Quit: Client closed]
kiwiirc15 has quit [K-Lined]
kevkevin has quit [Remote host closed the connection]
bugs_ has joined #bitcoin-core-dev
Moonstruck has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 272 seconds]
Talkless has quit [Remote host closed the connection]
Moonstruck has quit [Quit: Client closed]
Moonstruck has joined #bitcoin-core-dev
<portlandhodl> Okay follow up, what happens to anyone who has used OP_SUCCESSx behind a hash mined into a block before a softfork. Then wants to spend that path after the softfork? Does core still apply the rules as OP_SUCCESSx or does it force the validation of the softfork rules?
Moonstruck has quit [Quit: Client closed]
kevkevin has joined #bitcoin-core-dev
bugs_ has quit [Quit: Leaving]
Moonstruck has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 248 seconds]
noonien808310429 has joined #bitcoin-core-dev
Moonstruck has quit [Quit: Client closed]
Moonstruck has joined #bitcoin-core-dev
kevkevin has joined #bitcoin-core-dev
<fjahr> It would be up for discussion how we handle it. The one thing that is certain is that the easiest path would be if we wouldn't have to deal with such a case at all ^^ If you are not aware of the pre-taproot taproot tx, maybe this will be an interesting read for you: https://b10c.me/blog/007-spending-p2tr-pre-activation/ and I'm not sure there is another write-up of how it was handle but there is an exception here:
kevkevin has quit [Ping timeout: 252 seconds]
<portlandhodl> "The one thing that is certain is that the easiest path would be if we wouldn't have to deal with such a case at all" how would we be certain that we don't have to deal with it, that's my question. Because the script is buried in a MAST devs could not know ahead of time if an OP_SUCCESSx was used.
<fjahr> Absent of any other evidence the preferred way would be to enforce the new rules from genesis because that's the cleanest option. And if you are not spending that script hidden in a MAST there is no issue, right? And if you spend it after activation of course the new rules apply either way.
kevkevin has joined #bitcoin-core-dev
kevkevin has quit [Ping timeout: 272 seconds]
portlandhodl1 has joined #bitcoin-core-dev
portlandhodl has quit [Ping timeout: 248 seconds]
portlandhodl1 is now known as portlandhodl
Guest35 has joined #bitcoin-core-dev
Guest35 has quit [Client Quit]
Moonstruck has quit [Quit: Client closed]
Guest86 has joined #bitcoin-core-dev
Guest86 has quit [Client Quit]
kevkevin has joined #bitcoin-core-dev
<gmaxwell> portlandhodl: the prefered way is for the current meaning to apply, -- because that results in simpler, more consistent consensus rules. (as fjahr, says it's prefered to eventually retcon rules). It is possible to scope rules to the height of the mined height of the output being spent however: thats the worst for implementation complexity, and the mined height may not be that related to the
<gmaxwell> time the scriptpubkey was authored (other than it was clearly authored by the point of time). Sometimes there has been some discussion about bug fixes that can't be deployed without potentially breaking some coins doing a height-gate (like blocking codesep). However, since there may exist unconfirmed chains that doesn't solve the prolbem.
<gmaxwell> portlandhodl: people have observed that hidden opsuccesses could be a way to use features 'in advance' but without any guarentee the *exact* rule you expected would ever be enforced it seems pretty useless.
<gmaxwell> portlandhodl: if it wasn't clear from the above, nothing about the scriptpubkey is really evaluated at creation time (except the size limit and the broken pre-segwit sigops rule)-- so it's at *spend* time that the consensus rules really matter.