CalDescent 8b69b65712 Initial implementation of batch block reward distributions.
There are 3 values that need to be specified for this feature trigger:

- blockRewardBatchSize: the number of blocks per batch (1000 recommended).

- blockRewardBatchStartHeight: the block height at which the system switches to batch reward distributions. Must be a multiple of blockRewardBatchSize. Ideally this would be set to a block height that will occur at least 1-2 weeks after the release / auto update goes live.

- blockRewardBatchAccountsBlockCount: the number of blocks to include online accounts in the lead up to the batch reward distribution block (25 recommended).

Once active, rewards are no longer distributed every block and instead are distributed every 1000th block. This includes all fees from the distribution block and the previous 999 blocks.

The online accounts used for the distribution are taken from one of the previous 25 blocks (e.g. blocks xxxx975-xxxx999). The validation ensures that it is always the block with the highest number of online accounts in this range. If this number of online accounts is shared by multiple blocks, it will pick the one with the lowest height.

The idea behind 25 blocks is that it's low enough to reduce load in the other 975 blocks, but high enough for it to be extremely difficult for block signers to influence reward payouts.

Batch distribution blocks contain a copy of the online accounts from one of these 25 preceding blocks. However, online account signatures and online accounts timestamp are excluded to save space. The core will validate that the copy of online accounts is exactly matching those of the earlier validated block, and are therefore valid.

Fairly comprehensive unit tests have been written but this needs a lot more testing on testnets before it can be considered stable.

Future note: Once released, the online accounts mempow can optionally be scaled back so that it is no longer running 24/7, and instead is only running for 2-3 hours each day in the lead up to the batch distribution block. In each 1000 block cycle, the mempow would ideally start at least an hour before block xxxx975 is due to be minted, and continue for an hour after block xxxx000 (the reward distribution block). None of the ideas mentioned in this last paragraph are coded yet.
2023-09-17 15:04:37 +01:00
2022-11-05 14:02:04 +00:00
2023-09-08 03:30:06 -04:00
2021-02-21 17:12:02 +00:00
2021-02-06 10:59:31 +00:00
2022-01-23 16:48:34 -08:00
2022-01-02 20:50:38 +00:00
2023-08-25 16:13:23 +01:00
2023-05-25 17:26:29 -04:00
2023-05-24 16:20:05 -07:00

Qortal Project - Official Repo

Build / run

  • Requires Java 11. OpenJDK 11 recommended over Java SE.
  • Install Maven
  • Use Maven to fetch dependencies and build: mvn clean package
  • Built JAR should be something like target/qortal-1.0.jar
  • Create basic settings.json file: echo '{}' > settings.json
  • Run JAR in same working directory as settings.json: java -jar target/qortal-1.0.jar
  • Wrap in shell script, add JVM flags, redirection, backgrounding, etc. as necessary.
  • Or use supplied example shell script: start.sh
Description
Qortal Core - Main Code Repository Decentralized Data Network - Blockchain - TRUE Cross-Chain Trading - Application and Website Hosting - Much More - Qortal is the future internet infrastructure for the global digital world.
Readme 434 MiB
Languages
Java 98%
JavaScript 0.6%
Shell 0.5%
HTML 0.5%
Perl 0.3%