Fix incorrect block hash into work function - v1.0.6

This commit is contained in:
stjet
2024-12-15 06:05:47 +00:00
parent 53482cb9fa
commit f185cadd21
67 changed files with 151 additions and 148 deletions

View File

@@ -27,7 +27,7 @@ how to install banani on react.js</p>
<li>if Boompow goes offline (as it has done in the past), many Banano services will go down, which is not great for users and is not a very decentralized or resilient way to make your thing</li>
</ul>
<p>Unrelated, do remember that Nano has harder work thresholds than Banano.</p>
<a id="md:using-for-nano-instead-of-banano" class="tsd-anchor"></a><h2><a href="#md:using-for-nano-instead-of-banano">Using for Nano instead of Banano</a></h2><p>The main differences between Nano and Banano; or at least those relevant to a library like this, are the different amount of decimals. So, when creating a <code>Wallet</code> with banani, make sure to do <code>my_rpc.DECIMALS = 31</code> otherwise your sends will be off by two magnitudes which is bad.</p>
<a id="md:using-for-nano-instead-of-banano" class="tsd-anchor"></a><h2><a href="#md:using-for-nano-instead-of-banano">Using for Nano instead of Banano</a></h2><p>The main differences between Nano and Banano; or at least those relevant to a library like this, are the different amount of decimals. So, when creating a <code>Wallet</code> with banani, make sure to do <code>rpc.DECIMALS = banani.NANO_DECIMALS</code> otherwise your sends will be off by one magnitude which is bad.</p>
<p>Also, a different preamble should be used for message signing.</p>
<a id="md:dependencies" class="tsd-anchor"></a><h2><a href="#md:dependencies">Dependencies</a></h2><p>Banani has two external dependencies, tweetnacl and blake2b. Blake2b probably has its own dependencies, but I haven&#39;t checked.</p>
<p>Tweetnacl is not listed as a dependency in the package.json because it has been modified to use blake2b for the hashing algorithm. So, a modified version of it is distributed directly along with the package (see <code>tweetnacl_mod.js</code>). Clone the repo and run <code>npm run cryptodiff</code> to see the changes made from regular tweetnacl.</p>