Join 96,122 users already on read.cash

How my RPi4 handles Scalenet's 256MB blocks

1 11845 exc
Avatar for mtrycz
Written by   87
1 year ago

中文

Preparation:

Check out Mr Toomim's awesome article regarding Scalenet. Also, check out the other articles in this series: 2, 3, 4.


My setup:

  • BCH's Scalenet

  • RaspberryPi4 (8GB version, with a 64bit OS), with a nice passive cooling case (keeps temeprature below 60C and helps with throttling)

  • an 8GB Sd card I had lying around

  • A spare 256GB NVMe SSD attached through an USB3 adapter (I upgraded my laptop to 1TB, so I found a use for this one).

  • BCHN node software (release version 22.2.0 with no particular patches)

  • RPi Monitor software

Total cost: 20 tx fees on the BTC network. (as of time of writing - subject to change)


Methodology:

I got a couple of nodes on Digital Ocean, one for generating transactions, with BU and txunami, the other for mining with BCHN and cpuminer.

Generated transactions at the first node at a rate of 1100tx/s. The transactions propagated across the network to the second node, which was mining. Unfortunately there is no incentive to mine on scalenet, so we don't get a nice average of 6 blocks per hour, but generally less.

The RPi was listening and accepting transactions to its (reasonably smaller) mempool, and performance of block validation was monitored.


Results:

Over the span of 6 hours, 14 blocks have been mined of which 11-12 were full 256MB blocks with 1.3M synthetic transactions each, and a 2-3 were smaller blocks with 500k-800k transactions each. This represented an actual throughput of more than 600tx/s mined and validated.

This is the chart of loadavg of my RPi, the highlighted area is the 6 hour span of the test. There is clearly computation going around as the propagated transactions are accepted to the mempool, and the spikes represent the times at which mined blocks arrived and were validated.

The RPi handled the blocks fine. The blocks were not generated at regular intervals, as I don't have the ability to mine reliably, but several blocks were mined close to each other and it didn't seem to be a problem.

I did find that the earlier blocks were faster to validate than the latter, possibly due to swapping at some point.


There is still A LOT of work to do, but having an RPi4 handle Scalenet is hella cool. A lot of bottlenecks have been singledout over the past months, and some have already been addressed.

Let me know if you like these writeups! I'll hang around later today if you have any questions.

Cheers!

22
$ 30.34
$ 20.00 from @jtoomim
$ 2.00 from @jimtendo
$ 2.00 from @moto
+ 11
Avatar for mtrycz
Written by   87
1 year ago
Enjoyed this article?  Earn Bitcoin Cash by sharing it! Explain
...and you will also help the author collect more tips.

Comments

"Total cost: 20 BTC transaction fees." 👍👍👍👍👍👍👍👍👍👍👍👍👍

$ 0.50
1 year ago