<div dir="ltr"><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">T</span>he <span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">short</span> script<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">*</span> below<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"></span> <span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">could </span>function as a cross platform (need only have python 2 and curl) way to make a LOT=False function like a<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"> LOT=true node. This sort of script was mentioned recently in the ##taproot-activation IRC channel.<br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"></span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">It is unclear to me with this sort of script what happens if a LOT=false but running this script announces a to-be-marked-bad block to a similar peer that has already marked that block invalid. It could lead to nodes partitioning themselves from one another, but I am uncertain of the particulars of invalidate block's relationship to DoS rules.<br></span></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">Therefore it may be a harm reduction, should core release with LOT=false, to have opt-in configurability natively. Configurability is superior to a situation where, near to the timeout with LOT=true seeming more likely, users unable to switch binaries reach for such a convenience script.<br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">The counterargument would be that running a script is still a hoop to jump through more difficult than a config flag and we don't want user's choosing consensus rules via config flags. However, it seems more in the spirit of user choice to make the core release suitable for either preference.<br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></span></div><div><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"></span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">*<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"></span>completely untested<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">,</span> unverified<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">, never even run</span> mind you -- obviously <span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">needs review </span>before actually running it</span></div><br><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"> </span>1         import sys, json, subprocess<br> 2         from time import sleep<br> 3         LOTHEIGHT=600000<br> 4         LOTSTOP= LOTHEIGHT + 2016<br> 5         FORK="taproot"<br> 6         credential="blah:blah"<br> 7         host = "<a href="http://127.0.0.1:8332">http://127.0.0.1:8332</a>"<br> 8         contenttype ='content-type:text/plain;'<br> 9         def make_command(command, args):<br>10             return json.dumps({"jsonrpc": "1.0",<br>11             "id":"curltext",<br>12             "method": command,<br>13             "params": args})<br>14         def call(command, args):<br>15             res = subprocess.run("curl", ["--user", credential, "--data-binary", make_command(command, args), "-H", contenttype, host])<br>16             return res.stdout<br>17  <br>18         should_sleep = False<br>19         while True:<br>20             if should_sleep: sleep(10)<br>21             should_sleep = True<br>22             try:<br>23                 data = json.load(call("getblockchaininfo", []))<br>24                 possible = True<br>25                 if data['blocks']  >= LOTHEIGHT and data['blocks'] < LOTSTOP:<br>26                     if not data['softforks'][FORK]['statistics']['possible']:<br>27                         call("invalidateblock", [data["bestblockhash"]])<br>28                         should_sleep = False<br>29             except: pass<br><br></div>