HASHCASH - Prescrypto/RexChain GitHub Wiki
INTRO
The Proof of Work used in the RexChain blockchain is through Hashcash, the implementation was in Python language and can be seen here
RexChain Analysis
We carried out an analysis of RexChain with real data, for which the information of the blocks created on August 8, 9, 10, 11 and 12 in the RexChain Production environment was taken. (Before the Performance)
If you want to check the raw data, you can see here.
All the information obtained is shown in the following table 1:
_Table 1 _
Info / Days | 2022-08-08 | 2022-08-09 | 2022-08-10 | 2022-08-11 | 2022-08-12 | Total |
---|---|---|---|---|---|---|
Rxs | 1048 | 1095 | 1305 | 1291 | 1276 | 6015 |
Blocks | 71 | 60 | 88 | 77 | 77 | 373 |
Also, we show the detailed data per hour in the following table 2:
_Table 2 _
In conclusion:
-
We have that the highest traffic of RexChain is approximately 100 Rxs per hour during a time from 16:00 to 23:59 in UTC ± 00:00 time.
-
The total of the sample was 6015 Rxs and 373 blocks between the dates of August 08 to 12, 2022.
-
32 blocks were created with 1 Rx, this represents approximately 9% of the total number of blocks created; but this amount can be double (or a little more) if we consider blocks created with 10 or less Rxs.
PERFOMANCE
The performance was as follows:
- The payload shown in the README.md was taken (see https://github.com/Prescrypto/RexChain#create-block)
- 15 blocks were created where HC bits and HC random took the values 2 and 4, 4 and 8, and 8 and 8; respectively (see table 3)
- The tests were carried out in the RexChain development environment.
Table 3
Payloads | HC bits | HC random | Average | V Min | V Max | Median | Mode | Block Ids | INFO | Values by block |
---|---|---|---|---|---|---|---|---|---|---|
90 | 2 | 4 | 12.4 | 2 | 30 | 11 | 11,8,3 | 456-479 | DEV | 22, 29, 8, 11, 30, 8, 19, 3, 10, 3, 12, 13, 5, 2, 11 |
340 | 4 | 8 | 21.3 | 1 | 87 | 10 | 3 | 481-494 | PROD | 15, 1, 87, 3, 27, 3, 7, 47, 19, 5, 46, 8, 39, 2, 10 |
2700 | 8 | 8 | 169 | 15 | 417 | 148 | 15 | 496-510 | 15, 148, 246, 50, 87, 417, 104, 101, 236, 301, 186, 367, 229, 33, 15 |
Where Payloads indicates the total number of Rxs needed to make 15 blocks, HC bits indicates the difficulty that the proof of work will have, we recommend using multiples of eight, HC random is the length of a random chain in the hashcash, Block Ids indicates the IDs internals of the blocks used in the test, and INFO indicates if those values are used in any RexChain environment.
CONCLUSION
The conclusions:
We are not in a position to increase the values related to Hashcash; since according to the performance and analysis of RexChain, a block would be generated approximately every 2 hours.
A solution would be to add a conditional that generates a new hashcash if the block to be created has 10 or less Rxs, thus maintaining the average of 40 Rxs per block and lowering the rate of blocks per day by approximately 20%, that is from 373 to 310 approximately. This solution is the not "kosher", i.e. this solution does not have the essence of hashcash.