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

Genesis config #23

Closed
JoshOrndorff opened this issue Mar 2, 2023 · 0 comments · Fixed by #128
Closed

Genesis config #23

JoshOrndorff opened this issue Mar 2, 2023 · 0 comments · Fixed by #128

Comments

@JoshOrndorff
Copy link
Contributor

JoshOrndorff commented Mar 2, 2023

The current genesis config could be a little nicer.

https://github.com/Off-Narrative-Labs/Tuxedo/blob/7f1dabe37ce8621deb9df47d102ea775bbe2f763/frameless-runtime/src/lib.rs#L107-L109

In the UTXO model the state is (basically) just the utxo set. In this sense, the current design is perfect with its single Vec of outputs. But there are still a few things that may be desired.

  1. Including a money in the default genesis config is unusual. The default should be empty and the output that goes to SHAWN_PUB_KEY should be expressed in one or more of the specs in chain_spec.rs.
  2. We should figure out the best-practice way of expressing the genesis utxo set in the chain_spec.rs file and provide helper functions or builder pattern or something if necessary. Off the top of my head, maybe something like.
let genesis_utxo_set = vec![
  (Coin(5), SigCheck(ALICE_PUB_KEY)).into(),
  (Amoeba{ generation: 5, ..Default::default() }, UpForGrabs).into()
];
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 a pull request may close this issue.

1 participant