Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move genesis docs to genesis package and add note on initial staker handling #3574

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aaronbuchwald
Copy link
Collaborator

This PR moves the documentation for genesis JSON into the genesis/ package and adds an explanation of how funds for initialStakers are handled.

Specifically, if an address included in the genesis is marked as an initialStaker then the UTXOs described by its unlockSchedule are included in the the initial staker transaction instead of creating a UTXO in the genesis state of the P-Chain.

For reference, the flow is:

  1. Initial stakers are added to a set here
  2. When creating initial P-Chain UTXOs, we skip over any address included in initialStakers ref
  3. We create the initial validators with their locked stakes here

genesis/README.md Outdated Show resolved Hide resolved
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: aaronbuchwald <[email protected]>
- `message`: A message to include in the genesis. Not required.

For an example of a JSON representation of genesis data, see [genesis_local.json](https://github.com/ava-labs/avalanchego/blob/master/genesis/genesis_local.json).
See the documentation for the genesis JSON format [here](../genesis/README.md) and an example used for the local network genesis [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
See the documentation for the genesis JSON format [here](../genesis/README.md) and an example used for the local network genesis [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/).
See the documentation for the genesis JSON format [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/README.md) and an example used for the local network genesis [here](https://github.com/ava-labs/avalanchego/blob/master/genesis/).

Because config.md is ported directly to the docs, relative links should be avoided so that a user viewing there doesn't get a dead link.

@@ -0,0 +1,32 @@
# Genesis

The Genesis package converts formatted JSON files into the genesis of the Primary Network. For the simplest example, see the [Local Genesis](./genesis_local.json) JSON file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Genesis package converts formatted JSON files into the genesis of the Primary Network. For the simplest example, see the [Local Genesis](./genesis_local.json) JSON file.
The Genesis package converts formatted JSON files into the genesis of the Primary Network. For the simplest example, see the [Local Genesis](https://github.com/ava-labs/avalanchego/blob/master/genesis/genesis_local.json) JSON file.

This suggestion is only necessary if we also want to import this page into the docs. imo we should cc: @ashucoder9

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.

3 participants