blockchainaptos

How can I create the `framework.mrb` file to generate my own genesis file?


I try to construct my own private Aptos network.

To do this, I'm following the guidelines in "Generating genesis" document.

In this document, "Building the Aptos Framework" part seems like wrong, because provided commands in the document does not build the framework.mrb file.

My try is using the command cargo build --release --package aptos-framework. This command builds aptos-framework file in the target/release directory.

However, when I executed the aptos -- genesis generate-genesis --local-repository-dir . command, it produced an error like "Unable to read file './framework.mrb". So, I changed the name of the previously created aptos-framework file to framework.mrb. Then, it produced an error like "exceeded max sequence length: 3487268175". My guess is that I tried with a different file.

So, my question is, how can I create a framework.mrb file to generate my own genesis file?

Thanks.


Solution

  • I found the answer.

    To get framework.mrb, you first build aptos-framework.

    To do this, on the aptos-core repository, do the below command:

    cargo run --package aptos-framework
    

    Then, you can find a aptos-framework binary file in the target/debug directory.

    Using this binary, you can create a .mrb file.

    ./aptos-framework release
    

    Then, in the same directory, you can find a head.mrb file. Change the name of this file to framework.mrb.