Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
Hello Bitcoin Core team,
I’m currently working on a research-based Bitcoin fork and using the latest Bitcoin Core v24 as my starting point.
In earlier versions (such as v0.19–v22), the function CreateGenesisBlock()
was clearly defined or easily located within chainparams.cpp
, making it simple to modify the genesis block parameters (e.g., timestamp, nonce, pubkey, reward, etc.). I also cant find genesis.cpp.
In v24 and above, however, the actual definition of CreateGenesisBlock()
seems to have been moved, and the chainparams.cpp
file now simply calls the function without any visible reference to its parameters or where it’s defined.
Request:
Could you kindly clarify:
- Where exactly is
CreateGenesisBlock()
now defined in v24 to 28.1? - What’s the recommended way to customize the genesis block in this modularized structure?
- Should one now modify
src/block/genesis.cpp
or another component?
Context:
This would be very helpful for developers building forks for research, education, or alternative chain use cases.
Thanks in advance for your time, guidance, and for maintaining such a well-structured and evolving codebase.
Expected behaviour
In the file Chainparams.cpp and chainparams.h, the genesis parameter was supposed to be there which is not there. Without this the genesis token cannot be generated.
Steps to reproduce
In the SRC folder, find chainparams.cpp file, open the file and search for genesis parameter.
Relevant log output
No response
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
V24
Operating system and version
Ubuntu 22.
Machine specifications
No response