{"type":"rich","version":"1.0","author_name":"npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h","author_url":"https://nostr.ae/npub17rld56k4365lfphyd8u8kwuejey5xcazdxptserx03wc4jc9g24stx9l2h","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2022-07-13\n📝 Original message:On Mon, Jul 11, 2022 at 08:21:40PM -0400, Russell O'Connor via bitcoin-dev wrote:\n\u003e Oops, you are right.  We need the bribe to be the output of the coinbase,\n\u003e but due to the maturity rule, it isn't really a bribe.\n\u003e Too bad coinbases cannot take other coinbase outputs as inputs to bypass\n\u003e the maturity rule.\n\nSufficiently advanced tx introspection could be used for this; spend the\nfees in the coinbase to address A, but also create a 0sat output via a\nregular tx to the scriptPubKey \"1 CSV\". Note that tx's txid as B. The\nnext miner claims the bribe B, by spending the 0sat output to itself\nwith a 1-in, 1-out tx, with scriptPubKey C.\n\n  nVersion = 1\n  inputs = [txid=B, vout=0, scriptSig=\"\", nSeq=1]\n  outputs = [value=0, scriptPubKey=C]\n  nLocktime = 0\n\nNow we get back to A, and say that it's scriptPubKey uses a script that\ntakes \"C\" as input, has \"B\" hardcoded, calculates the txid of the tx\nabove, call it D, and then uses tx introspection to check that one of\nthe inputs of the tx has D as the txid.\n\n\u003e I guess that means the bribe has to be by leaving transactions in the\n\u003e mempool.\n\nYou *could* make that work if you allow tx's to use the annex to commit\nto a recent block.\n\nThat is, if you just mined block 740,000 and its hash was\n00000000000000000005f28764680afdbd8375216ff8f30b17eeb26bd98aac63,\nyou construct a bribe tx paying to \"OP_1\", but when you sign it,\nyou add \"50ee070b4aa0d98aac63\" as the annex (tag=ee, length=07,\nvalue[0:3]=height=0b4aa0=470k, value[3:]=d98aac63), and (via a soft fork)\nnodes then only consider that tx valid if the block at \"height\" ends in\n\"d98aac63\". There's then only a 1-in-4B chance that someone who extends\na competitor to your block could claim the bribe, at a cost of 11 extra\nwitness bytes.\n\nBut such txs (and anything that descends from them) would become invalid\nwith as little as a 1-block reorg, which would pretty much defeat the\nentire purpose of the maturity delay...\n\nCheers,\naj"}
