peer

Opere um peer Convex — crie, inicie, liste, faça backup ou instancie um genesis de rede. Use ao executar um peer contra uma rede ou ao configurar uma nova rede.

npx skills add https://github.com/convex-dev/convex --skill peer

Running a Convex Peer

A peer participates in consensus (CPoS), holds state in an Etch store, and optionally serves the REST API.

For local development and testing you almost always want the local-network skill instead — it starts a throwaway network in one command. Use this skill when running a peer against a real network, or setting up a new one.

peer accepts -c / --config for a configuration file.

Joining an Existing Network

java -jar convex.jar peer create --host <existing-peer>

Configures and creates a peer against a running network. Needs an existing peer to bootstrap from and a valid peer controller account; generates a new peer key unless one is supplied.

Then start it:

java -jar convex.jar peer start

Useful start options:

OptionEffect
--peer-port NPort for the peer protocol
--api-port NPort for the REST API
--url / --base-urlExternally visible URL for this peer
-a, --addressPeer controller account
--genesisStart from a genesis state
--resetReset stored state before starting
--recalcRecalculate state from a given block position
--norestDo not start the REST server
--no-trayNo system tray icon
--protocol-version NPin the protocol version

--reset discards local peer state. Confirm before using it on anything that is not disposable.

Creating a New Network

java -jar convex.jar peer genesis

Instantiates a new Convex network — a genesis state with this peer as the first participant. --governance-key sets the governance key; --protocol-version pins the protocol version.

This creates a new network, not a connection to an existing one. Do not run it when the intent was to join Protonet or a testnet.

Managing

java -jar convex.jar peer list                    # peers in the current store
java -jar convex.jar peer backup -o <file>        # back up stored peer data

Back up before any operation that resets or migrates peer state. See the etch skill for working on the underlying store directly.

Keys

Peer keys are separate from account keys: --peer-key and --peer-keypass select the peer's key from the keystore. The peer controller account is set with -a / --address.

Mais skills de convex-dev

convex-lisp
convex-dev
Referência da linguagem Convex Lisp — convenções da CVM, chamada de código de biblioteca, definições de atores, códigos de juice e erro. Use ao escrever ou depurar código fonte da CVM para…
ecosystem
convex-dev
Orientação no ecossistema Convex — o que vive em qual repositório, onde estão as especificações e documentos, e quais bibliotecas cliente existem. Use quando precisar de contexto…
local-network
convex-dev
Execute uma rede de teste Convex local para desenvolvimento. Use ao testar alterações contra uma rede ativa, reproduzir um problema de um peer ou quando não houver rede remota…
protocol-versions
convex-dev
Versões de protocolo, migrações e o upgrade v1 — quais semânticas usar, e como mudar o comportamento do CVM sem bifurcar a rede. Use quando…
etch
convex-dev
Inspecione e mantenha um armazenamento Etch — o banco de dados endereçado por conteúdo da Convex. Use ao examinar armazenamento de pares, diagnosticar corrupção, coletar lixo, ou…
juice
convex-dev
Contabilidade de Juice — o custo de computação e largura de banda na CVM. Use ao raciocinar sobre o custo de execução de transações, diagnosticar uma falha de :JUICE, ou…
trust
convex-dev
Trust monitors — o modelo de autorização on-chain composável da Convex. Use ao escrever controle de acesso, restringindo funções de atores, definindo quem pode cunhar ou…
memory
convex-dev
Contabilidade e limites de memória — o custo do armazenamento on-chain e como minimizá-lo e recuperá-lo. Use ao raciocinar sobre o crescimento do estado, diagnosticar um…