<p>Change write DAO json files to disk strategy</p>
<p>We have written all files each time at each new block which accumulated to about<br>
1 GB of data, this led to stability issues and very high disk IO for the explorer nodes.</p>
<p>Now we write only the data of the new block. We also remove the deletion of all<br>
files at startup.<br>
The dao state is still written in a monolithic file so that cannot be optimized<br>
but we added a new directly where we add each block named by block height.<br>
Looking up the latest written file tells us our last persisted block.<br>
So all that data is equivalent to the monolithic daoState data which should<br>
be removed once the webapp devs have implemented the change to use the blocks directory.</p>
<p>As this code is affecting only explorer nodes I think it can be merged to 1.4.0 without big risk. It would make it easier for operators to use that version instead of waiting to get it once merged into master. Alternatively they could run from my branch but I think it is more clean that way.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4635'>https://github.com/bisq-network/bisq/pull/4635</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Change write json files to disk strategy</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-9961dbd6c9ff194992c19f7cf7a22e1603db44b037c32c9f0ff43ab031972d41">common/src/main/java/bisq/common/file/JsonFileManager.java</a>
    (103)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-d451dd6b1861ee54f6926fd906f2486adfe03e38ace1c0c025dc2127bb986baa">core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-3db1869eb66b61cd8e17c2aad9e502f02babc8b1ae6ec4cea773255f8a4254e2">core/src/main/java/bisq/core/dao/node/BsqNode.java</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-88765cda3932d8e625f3a79bbf084c0a8822eda7820bc01b74e167db6fa12d92">core/src/main/java/bisq/core/dao/node/explorer/ExportJsonFilesService.java</a>
    (200)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-44be01dcd43553e3211dc61dad6a5fe873f2150bf9a5ff7d23ee5c07a39c52d7">core/src/main/java/bisq/core/dao/node/full/FullNode.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-c4aaf359a56e7550b5a03e1c5e78b5122f5a1fd8fc26cc1f078eaf33b1a2c62b">core/src/main/java/bisq/core/dao/node/lite/LiteNode.java</a>
    (13)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-84757b6093f3f1709fd2066f843d0342f0ebbf6d8ec0f5406fd6f6282f42042e">core/src/main/java/bisq/core/offer/OfferBookService.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-f56e2af891f1ddc6122fded5eb337c298c00c818bb8b35a7e8cdf29307ec8c06">core/src/main/java/bisq/core/trade/DumpDelayedPayoutTx.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4635/files#diff-87f19f4592a583b017e7da5ae07b224e6c3a350d4c13cf212608da3755a3e0b1">core/src/main/java/bisq/core/trade/statistics/TradeStatisticsManager.java</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4635.patch'>https://github.com/bisq-network/bisq/pull/4635.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4635.diff'>https://github.com/bisq-network/bisq/pull/4635.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4635">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNS5QTCWKTCWSQNRZHDSKPMQJANCNFSM4SOB2VCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNU5X7Q5S4KVDX47SOTSKPMQJA5CNFSM4SOB2VCKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KXIHARA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4635",
"url": "https://github.com/bisq-network/bisq/pull/4635",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>