blockchain
Usage: postchain-mc blockchain [OPTIONS] COMMAND [ARGS]...
Interact with blockchains
Options:
-h, --help Show this message and exit
Commands:
add Propose a new blockchain in a specific container. Change is
applied after voting within the deployer voter set of the cluster
that the container belongs to.
update Propose new configuration to blockchain at specific height.
remove Propose removal of blockchain. Command is irreversible
stop Propose stopping a blockchain from building blocks
start Propose starting a chain that has previously been stopped.
replicas List blockchain replicas
signers List blockchain signers
list List blockchains
get Get blockchain configuration
replica Blockchain replica commands
The blockchain command (postchain-mc cluster
) consists of sub-commands to interact with blockchains. For example, list existing blockchains, create new blockchains, and remove blockchains.
add
Usage: postchain-mc blockchain add [OPTIONS]
Propose a new blockchain in a specific container. Change is applied
after voting within the deployer voter set of the cluster that the container
belongs to.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-bc, --blockchain-config PATH Configuration file of blockchain (GtvML
(*.xml) or Gtv (*.gtv))
-c, --container TEXT Name of container to run in
-n, --name TEXT Name of blockchain
-h, --help Show this message and exit
The add command (postchain-mc blockchain add
) proposes a new blockchain in a specific container.
Example usage:
Pmc blockchain add –blockchain-config ‘./config.xml’ –container <container-name> –name <blockchain-name>
update
Usage: postchain-mc blockchain update [OPTIONS]
Propose new configuration to blockchain at specific height. Height must be >
current height and > all previously approved configuration heights. Use
force flag -f to override previously added configs or to squeeze in a
configuration at a height < previously approved config heights. Change is applied after voting.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-bc, --blockchain-config PATH Blockchain config to propose
-brid, --blockchain-rid VALUE Blockchain RID
-h, --height INT
-f, --force
--help Show this message and exit
The update command (postchain-mc blockchain update
) proposes a new configuration for a running blockchain. You can only apply the new configurations at a block height higher than the current height and the block height specified in all previously approved configuration updates.
This can be overseen by using the force flag (-f
), which overrides previously added configuration updates. Changes are applied after voting.
remove
Usage: postchain-mc blockchain remove [OPTIONS]
Propose removal of blockchain. This command is irreversible.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-h, --help Show this message and exit
The remove command (postchain-mc blockchain remove
) proposes the removal of a blockchain.
stop
Usage: postchain-mc blockchain stop [OPTIONS]
Propose stopping a blockchain from building blocks.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-h, --help Show this message and exit
The stop command (postchain-mc blockchain stop
) proposes to stop a blockchain from building blocks.
start
Usage: postchain-mc blockchain start [OPTIONS]
Propose starting a chain that has previously been stopped.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-h, --help Show this message and exit
The start command (postchain-mc blockchain start
) proposes to start a blockchain that has previously been stopped.
replicas
Usage: postchain-mc blockchain replicas [OPTIONS]
List blockchain replicas
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-i, --includeinactive Include disabled/removed clusters (not
implemented yet)
-h, --help Show this message and exit
The replicas command (postchain-mc blockchain replicas
) lists all the blockchain replicas.
signers
Usage: postchain-mc blockchain signers [OPTIONS]
List blockchain signers
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-i, --includeinactive Include disabled/removed clusters (not
implemented yet)
-h, --help Show this message and exit
The signers command (postchain-mc blockchain signers
) lists all the blockchain signers.
list
Usage: postchain-mc blockchain list [OPTIONS]
List blockchains
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-i, --includeinactive Include disabled/removed clusters (not implemented
yet)
-h, --help Show this message and exit
The list command (postchain-mc blockchain list
) lists all blockchains.
get
Usage: postchain-mc blockchain get [OPTIONS]
Get blockchain configuration
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-h, --height INT
--save PATH where to save configuration XML
--help Show this message and exit
The get command (postchain-mc blockchain get
) receives the configuration of a given blockchain. The configuration can be saved to a desired path. It's possible to get the blockchain config at a specific block height using the –h
flag.
Example usage:
Pmc blockchain get -brid <blockchain-rid> –height 200 –save <path-on-local-machine>
replica
Usage: postchain-mc blockchain replica [OPTIONS] COMMAND [ARGS]...
Blockchain replica commands
Options:
-h, --help Show this message and exit
Commands:
add add replica of a blockchain. The node is verifying but not building
blocks.
remove remove replica of a blockchain
- Use the (
postchain-mc blockchain replica add
) command to add a replica to the blockchain.
Usage: postchain-mc blockchain replica add [OPTIONS]
add replica of a blockchain. The node is verifying but not building blocks.
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-pk, --pubkey VALUE Public key
-h, --help Show this message and exit
- Use the (
postchain-mc blockchain replica remove
) command to remove a blockchain replica.
Usage: postchain-mc blockchain replica remove [OPTIONS]
remove replica of a blockchain
Options:
-cfg, --config VALUE Configuration file for PMC (overrides system
configuration)
-brid, --blockchain-rid VALUE Blockchain RID
-pk, --pubkey VALUE Public key
-h, --help Show this message and exit