This repository was archived by the owner on Apr 17, 2026. It is now read-only.
feat: add block_height/chain_id to backup + genesis-assemble cmd#70
Draft
moul wants to merge 2 commits into
Draft
feat: add block_height/chain_id to backup + genesis-assemble cmd#70moul wants to merge 2 commits into
moul wants to merge 2 commits into
Conversation
Populate BlockHeight and ChainID in GnoTxMetadata during backup. ChainID is fetched once from the node status RPC at backup start. BlockHeight comes from the block being processed. Supports the chain upgrade tx export workflow.
New subcommand that reads a JSONL tx export and assembles a genesis.json with the transactions in app_state.txs. Supports: - --input: JSONL file path - --output: genesis.json output path - --chain-id: new chain ID - --initial-height: starting block height (default: inferred from max block_height + 1) - --genesis-template: optional base genesis.json to merge into Part of the chain upgrade (gnoland1 → gnoland-1) export pipeline.
This was referenced Apr 1, 2026
This was referenced Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BlockHeightandChainIDinGnoTxMetadataduring tx backup. Chain ID is fetched once from node status RPC at backup start.genesis-assemblereads a JSONL tx export and assembles agenesis.jsonwith txs inapp_state.txs--input: JSONL file path--output: genesis.json output path--chain-id: new chain ID--initial-height: starting block height (default: inferred from max block_height + 1)--genesis-template: optional base genesis.json to merge intoContext
Part of the chain upgrade (gnoland1 → gnoland-1) tx export/import pipeline.
Depends on: gnolang/gno PR extending
GnoTxMetadatawithBlockHeightandChainIDfields (go.mod update needed once that merges).Note:
GenesisDoc.InitialHeightdoesn't exist yet in tm2 — Jae is working on that. The genesis-assemble command computes and logs the value, ready to set once the field is available.Related: gnolang/gno#5334, gnolang/gno#5368, gnolang/gno#5376, gnolang/gno#5377
Test plan
block_heightandchain_idgenesis-assembleon exported JSONL, verify genesis.json structureAI-assisted: code generated with Claude Code