peer

Vận hành một peer Convex — tạo, khởi động, liệt kê, sao lưu hoặc khởi tạo genesis mạng. Sử dụng khi chạy một peer với mạng hoặc thiết lập một mạng mới.

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.

Thêm skills từ convex-dev

account
convex-dev
Tạo hoặc kiểm tra các account Convex. Sử dụng khi người dùng muốn thiết lập account mới, kiểm tra chi tiết account, hoặc quản lý keys.
account
convex-dev
Tạo hoặc kiểm tra tài khoản Convex. Sử dụng khi người dùng muốn thiết lập tài khoản mới, kiểm tra chi tiết tài khoản hoặc quản lý khóa.
token
convex-dev
Tạo và quản lý token có thể thay thế trên Convex. Sử dụng khi người dùng muốn tạo token mới, kiểm tra số dư token, hoặc quản lý nguồn cung token.
build-convex
convex-dev
Xây dựng dự án Convex từ mã nguồn. Sử dụng khi một người đóng góp muốn biên dịch, kiểm thử hoặc đóng gói Convex.
convex-db
convex-dev
Sử dụng Convex DB — cơ sở dữ liệu SQL hỗ trợ lattice. Sử dụng khi giúp người dùng viết truy vấn, kết nối qua JDBC hoặc máy khách PostgreSQL, tạo bảng, chèn/truy vấn dữ liệu,…
convex-lisp
convex-dev
Tài liệu tham khảo ngôn ngữ Convex Lisp — quy ước CVM, gọi mã thư viện, định nghĩa actor, mã juice và lỗi. Sử dụng khi viết hoặc gỡ lỗi mã nguồn CVM cho…
deploy
convex-dev
Triển khai một actor (hợp đồng thông minh) lên mạng Convex. Sử dụng khi người dùng muốn tạo một actor trên chuỗi mới với các hàm được xuất.
ecosystem
convex-dev
Định hướng trong hệ sinh thái Convex — thứ gì nằm trong repository nào, specs và docs ở đâu, và những thư viện client nào tồn tại. Sử dụng khi bạn cần ngữ cảnh…