<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by </title>
  <author>
    <name></name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub12kg887ucnasl9h5ygj2c5ks9dexkdu0qsmhx348vuej33aq8dnmsd409h5.rss" />
  <link href="https://nostr.ae/npub12kg887ucnasl9h5ygj2c5ks9dexkdu0qsmhx348vuej33aq8dnmsd409h5" />
  <id>https://nostr.ae/npub12kg887ucnasl9h5ygj2c5ks9dexkdu0qsmhx348vuej33aq8dnmsd409h5</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqsflv9u2ah7hz3d4safzz0vpruv35cxmya5rndffsatj35lg8tw9hqzyp2equlmnz0kruk7s3zftzj6q4hy6eh3uzrwu6x5annx2x85qak0wp9srzq</id>
    
      <title type="html">📅 Original date posted:2021-09-07 📝 Original message:Hello, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsflv9u2ah7hz3d4safzz0vpruv35cxmya5rndffsatj35lg8tw9hqzyp2equlmnz0kruk7s3zftzj6q4hy6eh3uzrwu6x5annx2x85qak0wp9srzq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg9c8394ln23nu98x4nemhy5pgn3xtg42dckxw42k5f0kyvyaanrqn25525&#39;&gt;nevent1q…5525&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-07&lt;br/&gt;📝 Original message:Hello,&lt;br/&gt;&lt;br/&gt;tl;dr: We want to make reorgs on SigNet a reality and are looking for&lt;br/&gt;feedback on approach and parameters.&lt;br/&gt;&lt;br/&gt;One of the ideas for SigNet is the possibility for it to be reliably&lt;br/&gt;unreliable, for example, planned chain reorganizations. These have not&lt;br/&gt;been implemented yet.&lt;br/&gt;&lt;br/&gt;My summerofbitcoin.org mentee Nikhil Bartwal and I have been looking at&lt;br/&gt;implementing support for reorgs on SigNet. We are looking for feedback&lt;br/&gt;on which approach and parameters to use. Please consider answering the&lt;br/&gt;questions below if you or your company is interested in chain&lt;br/&gt;reorganizations on SigNet.&lt;br/&gt;&lt;br/&gt;With feedback from AJ and Kalle Alm (thanks again!), we came up with two&lt;br/&gt;scenarios that could be implemented in the current SigNet miner script&lt;br/&gt;[0]. Both would trigger automatically in a fixed block interval.&lt;br/&gt;Scenario 1 simulates a race scenario where two chains compete for D&lt;br/&gt;blocks. Scenario 2 simulates a chain rollback where the top D blocks get&lt;br/&gt;replaced by a chain that outgrows the earlier branch.&lt;br/&gt;&lt;br/&gt;AJ proposed to allow SigNet users to opt-out of reorgs in case they&lt;br/&gt;explicitly want to remain unaffected. This can be done by setting a&lt;br/&gt;to-be-reorged version bit flag on the blocks that won&amp;#39;t end up in the&lt;br/&gt;most work chain. Node operators could choose not to accept to-be-reorged&lt;br/&gt;SigNet blocks with this flag set via a configuration argument.&lt;br/&gt;&lt;br/&gt;The reorg-interval X very much depends on the user&amp;#39;s needs. One could&lt;br/&gt;argue that there should be, for example, three reorgs per day, each 48&lt;br/&gt;blocks apart. Such a short reorg interval allows developers in all time&lt;br/&gt;zones to be awake during one or two reorgs per day. Developers don&amp;#39;t&lt;br/&gt;need to wait for, for example, a week until they can test their reorgs&lt;br/&gt;next. However, too frequent reorgs could hinder other SigNet users.&lt;br/&gt;&lt;br/&gt;We propose that the reorg depth D is deterministically random between a&lt;br/&gt;minimum and a maximum based on, e.g., the block hash or the nonce of the&lt;br/&gt;last block before the reorg. Compared to a local randint() based&lt;br/&gt;implementation, this allows reorg-handling tests and external tools to&lt;br/&gt;calculate the expected reorg depth.&lt;br/&gt;&lt;br/&gt;# Scenario 1: Race between two chains&lt;br/&gt;&lt;br/&gt;For this scenario, at least two nodes and miner scripts need to be&lt;br/&gt;running. An always-miner A continuously produces blocks and rejects&lt;br/&gt;blocks with the to-be-reorged version bit flag set. And a race-miner R&lt;br/&gt;that only mines D blocks at the start of each interval and then waits X&lt;br/&gt;blocks. A and R both have the same hash rate. Assuming both are well&lt;br/&gt;connected to the network, it&amp;#39;s random which miner will first mine and&lt;br/&gt;propagate a block. In the end, the A miner chain will always win the race.&lt;br/&gt;&lt;br/&gt;# Scenario 2: Chain rollback&lt;br/&gt;&lt;br/&gt;This scenario only requires one miner and Bitcoin Core node but also&lt;br/&gt;works in a multiminer setup. The miners mine D blocks with the&lt;br/&gt;to-be-reorged version bit flag set at the start of the interval. After&lt;br/&gt;allowing the block at height X&#43;D to propagate, they invalidate the block&lt;br/&gt;at height X&#43;1 and start mining on block X again. This time without&lt;br/&gt;setting the to-be-reorged version bit flag. Non-miner nodes will reorg&lt;br/&gt;to the new tip at height X&#43;D&#43;1, and the first-seen branch stalls.&lt;br/&gt;&lt;br/&gt;# Questions&lt;br/&gt;&lt;br/&gt;    1. How do you currently test your applications reorg handling? Do&lt;br/&gt;       the two discussed scenarios (race and chain rollback) cover your&lt;br/&gt;       needs? Are we missing something you&amp;#39;d find helpful?&lt;br/&gt;&lt;br/&gt;    2. How often should reorgs happen on the default SigNet? Should&lt;br/&gt;       there be multiple reorgs a day (e.g., every 48 or 72 blocks&lt;br/&gt;       assuming 144 blocks per day) as your engineers need to be awake?&lt;br/&gt;       Do you favor less frequent reorgs (once per week or month)? Why?&lt;br/&gt;&lt;br/&gt;    3. How deep should the reorgs be on average? Do you want to test&lt;br/&gt;       deeper reorgs (10&#43; blocks) too?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;# Next Steps&lt;br/&gt;&lt;br/&gt;We will likely implement Scenario 1, the race between two chains, first.&lt;br/&gt;We&amp;#39;ll set up a public test-SigNet along with a faucet, block explorer,&lt;br/&gt;and a block tree visualization. If there is interest in the second&lt;br/&gt;approach, chain rollbacks can be implemented too. Future work will add&lt;br/&gt;the possibility to include conflicting transactions in the two branches.&lt;br/&gt;After enough testing, the default SigNet can start to do periodical&lt;br/&gt;reorgs, too.&lt;br/&gt;&lt;br/&gt;Thanks,&lt;br/&gt;0xB10C&lt;br/&gt;&lt;br/&gt;[0]: &lt;a href=&#34;https://github.com/bitcoin/bitcoin/blob/master/contrib/signet/miner&#34;&gt;https://github.com/bitcoin/bitcoin/blob/master/contrib/signet/miner&lt;/a&gt;
    </content>
    <updated>2023-06-08T00:58:46&#43;02:00</updated>
  </entry>

</feed>