-
Notifications
You must be signed in to change notification settings - Fork 379
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
[META] Genesis Management #1203
Labels
🌱 feature
New update to Gno
Comments
This was referenced Oct 7, 2023
Looks great! I recommend reading #1105, even if we don't merge everything. I believe this collection of libraries and tools should be placed in gnosdk/pkg/genesis. |
This was referenced Oct 11, 2023
4 tasks
7 tasks
moul
pushed a commit
that referenced
this issue
Oct 28, 2023
## Description This PR introduces the genesis.json command suite, as outlined in #1203. Closes #1203 and #1189 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
gfanton
pushed a commit
to gfanton/gno
that referenced
this issue
Nov 9, 2023
## Description This PR introduces the genesis.json command suite, as outlined in gnolang#1203. Closes gnolang#1203 and gnolang#1189 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
moul
pushed a commit
to moul/gno
that referenced
this issue
Nov 14, 2023
## Description This PR introduces the genesis.json command suite, as outlined in gnolang#1203. Closes gnolang#1203 and gnolang#1189 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
This task proposes the introduction of a top-level
genesis
tool that is capable of executing operations related to a chain'sgenesis.json
, as outlined in #1189 (library requirements).It is worth noting that gno currently has a structure for the genesis document, but does not have the tools to fully utilize it:
gno/tm2/pkg/bft/types/genesis.go
Lines 21 to 43 in fa8eb77
Below, you can find the proposal for the entire suite of subcommands relating to genesis manipulation and creation.
generate
The
generate
subcommand should generate agenesis.json
file on disk.Flags
--output-path
- the output path for thegenesis.json
. If there is agenesis.json
already there, the command fails--genesis-time
- unix time for the genesis block--chain-id
- the ID of the chain--block-max-tx-bytes
- the max size of the block transaction--block-max-data-bytes
- the max size of the block data--block-max-gas
- the max gas limit for the block--block-time-iota
- the block time iota (in ms)validator
The
validator
subcommand should manage validators in thegenesis.json
.Flags
--genesis-path
- the path to thegenesis.json
validator add
The
validator add
subcommand should add a new validator to thegenesis.json
. The command should fail if the validator already exists in thegenesis.json
.Flags
--address
- the string address of the validator--pub-key
- the hex representation of the validator's public key--name
- the name of the validator (must be unique)--power
- the voting power of the validatorvalidator remove
The
validator remove
subcommand should remove a validator from thegenesis.json
. The command should fail if the validator does not exist in thegenesis.json
.Flags
--address
- the string address of the validatorverify
The
verify
subcommand validates thegenesis.json
, according to different section rules:Flags
--genesis-path
- the path to thegenesis.json
balances
The
balances
subcommand manages thegenesis.json
balances information.Flags
--genesis-path
- the path to thegenesis.json
balances add
The
balances add
subcommand adds in the balance information from a specified source (see flags) to thegenesis.json
.Flags (EITHER-OR)
--balance-sheet
- the path to the balance file containing addresses in the format<address>=<amount>ugnot
--single
- the direct balance addition in the format<address>=<amount>ugnot
--parse-export
- the path to the tx-archive export containing a list of transactions. The command should parse the exported transactions and calculate balances of initialized accountsbalances remove
The
balances remove
subcommand removes the balance information of a specific account from thegenesis.json
.Flags
--address
- the address of the account whose balance information should be removed fromgenesis.json
txs
The
txs
subcommand manages the initial transaction data in thegenesis.json
.Flags
--genesis-path
- the path to thegenesis.json
txs add
The
txs add
subcommand imports the transactions from a tx-archive backup to thegenesis.json
. Existing transactions are skipped.Flags
--parse-export
- the path to the tx-archive export containing a list of transactions.txs remove
The
txs remove
subcommand removes the transaction from thegenesis.json
. If the transaction doesn't exist, the command failsFlags
--hash
- the transaction hash (hex format)PR against branch: feat/genesis
The text was updated successfully, but these errors were encountered: