Skip to content

Read and write configtxgen artifacts on stdio - #5610

Open
hmdsefi wants to merge 7 commits into
hyperledger:mainfrom
hmdsefi:feat/configtxgen-stdio
Open

hmdsefi wants to merge 7 commits into
hyperledger:mainfrom
hmdsefi:feat/configtxgen-stdio

Conversation

@hmdsefi

@hmdsefi hmdsefi commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • New feature

Description

-outputBlock - and -outputCreateChannelTx - write to stdout. -inspectBlock - and -inspectChannelCreateTx - read from stdin.

-outputBlock - used to create a file named -, because filepath.Dir("-") is ..

The flag help and docs/source/commands/configtxgen.md mention the new meaning.

Additional details

TestBlockStdinAndStdout writes a genesis block to a pipe, unmarshals it, and inspects those bytes from stdin.

go test ./cmd/configtxgen/ -run 'TestBlockStdinAndStdout|TestInspectBlock$|TestInspectConfigTx|TestConfigTxFlags' passes.

Related issues

Fixes #5607

A path of '-' writes a genesis block or channel tx to stdout, and reads a block or channel tx from stdin.

Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
@hmdsefi
hmdsefi requested review from a team as code owners October 8, 2026 19:15
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
Signed-off-by: Hamed Yousefi <hdyousefi@gmail.com>
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.

configtxgen should accept - for stdin and stdout

1 participant