gcosmos

command module
v0.0.0-...-40b18d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

gcosmos

This repository integrates Gordian with the Cosmos SDK.

Refer to the _docs directory for more technical details about how gcosmos works.

Quickstart

Start the example Gordian-backed Cosmos SDK chain with four validators

make testnet-start
Interact

In a second terminal, interact with the running chain

Show validator address

VAL_ADDR=$(./gcosmos --home ./test/val1 keys show val --address)
echo $VAL_ADDR

Query bank balance of validator, it has 9000000stake.

./gcosmos q bank balance $VAL_ADDR stake
Transaction Testing

Send 100stake from the first validator to a new account.

./gcosmos --home ./test/val1 --chain-id gchain-1 tx bank send val cosmos10r39fueph9fq7a6lgswu4zdsg8t3gxlqvvvyvn 100stake

Wait a few seconds for the block to be produced, then confirm the balance in the new account. It now has 100stake.

./gcosmos q bank balance cosmos10r39fueph9fq7a6lgswu4zdsg8t3gxlqvvvyvn stake
Shutdown

Shutdown the testnet by pressing Ctrl+C in the first terminal.

Additional Information

Refer to the http*.go files in the gserver/internal/gsi directory for more details on available HTTP paths.

Documentation

Overview

Command gcosmos wraps the Cosmos SDK simappv2 and adds a "gstart" subcommand to run parts of Gordian.

Directories

Path Synopsis
gccrypto
Package gserver contains a Component type satisfying the Cosmos SDK server component interface.
Package gserver contains a Component type satisfying the Cosmos SDK server component interface.
internal/gp2papi
Package gp2papi manages the handlers for nodes that choose to serve public gcosmos (Gordian-Cosmos, not plain Cosmos) APIs over libp2p.
Package gp2papi manages the handlers for nodes that choose to serve public gcosmos (Gordian-Cosmos, not plain Cosmos) APIs over libp2p.
internal/gsbd
Package gsbd (short for "Gordian Server Block Data") provides utilities for hosting and retrieving block data out of band from the consensus engine.
Package gsbd (short for "Gordian Server Block Data") provides utilities for hosting and retrieving block data out of band from the consensus engine.
internal
copy/gchan
Package gchan contains helpers for common operations with channels.
Package gchan contains helpers for common operations with channels.
gci

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL