> For the complete documentation index, see [llms.txt](https://risu.gitbook.io/risu-ecosystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://risu.gitbook.io/risu-ecosystem/whitepaper-2.0-documentation/genesis-file.md).

# Genesis File

### Genesis File

This document explains how the genesis file of the Risu Chain is structured.

### What is a Genesis File <a href="#what-is-a-genesis-file" id="what-is-a-genesis-file"></a>

A genesis file is a JSON file which defines the initial state of your blockchain. It can be seen as height `0` of your blockchain. The first block, at height `1`, will reference the genesis file as its parent.

The state defined in the genesis file contains all the necessary information, like initial token allocation, genesis time, default parameters, and more. Let us break down these information.

### Explaination <a href="#explaination" id="explaination"></a>

* **chainId**

57522 for main-net. To compatible with third party service that already supports Ethereum, we’d better not use network id that Ethereum ecology that already used.

* **period**

Minimum difference between two consecutive block’s timestamps.

* **epoch**

Number of blocks after which to checkpoint and reset the pending votes.

* **nonce**

The nonce is the cryptographically secure mining proof-of-work that proves beyond reasonable doubt that a particular amount of computation has been expended in the determination of this token value.

In Risu Chain, this value is always set to 0x0.

* **timestamp**

Must be at least the parent timestamp + BLOCK\_PERIOD.

* **extraData**
  * EXTRA\_VANITY: Fixed number of extra-data prefix bytes reserved for signer vanity. Suggested 32 bytes
  * Signer Info: validator address
  * EXTRA\_SEAL bytes (fixed) is the signer’s signature sealing the header.
* **gasLimit**

A scalar value equal to the current chain-wide limit of Gas expenditure per block. Note: this does not indicate that we should not pay attention to the Gas consumption of our Contracts.

* **difficulty**

A scalar value corresponding to the difficulty level applied during the nonce discovering of this block.

* **mixHash**

Reserved for fork protection logic, similar to the extra-data during the DAO. Must be filled with zeroes during normal operation.

* **coinbase**

System controled address for collecting block rewards

* **number**

Block height in the chain, where the height of the genesis is block 0.

* **parentHash**

The Keccak 256-bit hash of the entire parent block’s header (including its nonce and mixhash). Pointer to the parent block, thus effectively building the chain of blocks. In the case of the Genesis block, and only in this case, it's 0.

### Account and Address <a href="#account-and-address" id="account-and-address"></a>

This default wallet would use a similar way to generate keys as Ethereum, i.e. use 256 bits entropy to generate a 24-word mnemonic based on BIP39, and then use the mnemonic and an empty passphrase to generate a seed; finally use the seed to generate a master key, and derive the private key using BIP32/BIP44 with HD prefix as "44'/60'/", which is the same as Ethereum's derivation path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://risu.gitbook.io/risu-ecosystem/whitepaper-2.0-documentation/genesis-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
