Skip to content

Lessons Learned in 24 hours#19

Merged
ReverseControl merged 8 commits intoProjectFactor:mainfrom
ReverseControl:GREEN
Apr 21, 2022
Merged

Lessons Learned in 24 hours#19
ReverseControl merged 8 commits intoProjectFactor:mainfrom
ReverseControl:GREEN

Conversation

@ReverseControl
Copy link
Copy Markdown
Contributor

A few things we got wrong on launch:

  1. There was a math error on when GetBlockTemplate is called. When nBits turns odd the block reward becomes zero. [Fixed]
  2. There is one check done by GetBlockSubsidy that should also be done by CheckProofOfWork to reject non strong semiprime solutions to a block, i.e solutions where the two primes that factor a number do not have the same size in bits. Previously, the blockchain would accept any factorization of an nBits number where both numbers were prime, but reward you 0 coins for it.
  3. Asserting the genesis blocks was added back. Forgot to do this after developing for so long.
  4. Difficulty level for testnet was lowered to 210 because 228 is too difficult for testnet.
  5. Fixed the typo for the date in the genesis block message to 4/20/2022 from 04/Apr/2022. Have you ever programmed on 4/20 during an all nighter at 5AM in the morning while copying a newspaper headline and tried to get the date right? I don't recommend it.

Did some comment cleaning for DNS things we won't be using now. That is all. These mistakes are severe enough that I decided to restart the blockchain from zero with them fixed. After all, I was the only one mining so its of no consequence to do it now.

@patricklodder
Copy link
Copy Markdown
Collaborator

code review ACK
tested mining on testnet - looks good

@ReverseControl ReverseControl merged commit c5d72a6 into ProjectFactor:main Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants