No Genesis Block Parameter in ChainParams.cpp file #32261

issue dryuvrajk openend this issue on April 13, 2025
  1. dryuvrajk commented at 10:19 am on April 13, 2025: none

    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

  2. maflcko closed this on Apr 13, 2025

  3. maflcko commented at 10:39 am on April 13, 2025: member

    Usually the issue tracker is used to track technical issues related to the Bitcoin Core code base.

    General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange or the #bitcoin IRC channel on Libera Chat, or one of the Bitcoin subreddits, or any other place that you feel is well suited.

  4. maflcko added the label Questions and Help on Apr 13, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-04-16 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me