Boka / 波卡 / bō kǎ: A JAM implementation built with Swift, brought to you by Laminar Labs.
Install tools and dependencies:
macOS
brew install swiftlint swiftformat rocksdb opensslLinux
apt-get install librocksdb-dev libzstd-dev libbz2-dev liblz4-dev libssl-devSetup the project:
# Install precommit hooks
make githooks
# Pull submodules
git submodule update --init --recursive
# Setup dependencies
make deps- Run the node:
make run - Run a devnet:
make devnet
The Boka CLI supports the following arguments:
--base-path <path>: Base path to database files.--chain <chain>: A preset config or path to chain config file. Default:minimal.--rpc <address>: Listen address for RPC server. Pass 'no' to disable. Default:127.0.0.1:9955.--p2p <address>: Listen address for P2P protocol. Default:127.0.0.1:0.--peers <address>: Specify peer P2P addresses.--validator: Run as a validator.--operator-rpc <address>: Listen address for operator RPC server. Pass 'false' to disable.--dev-seed <seed>: For development only. Seed for validator keys.--name <name>: Node name. For telemetry only.--local: Enable local mode, whereas peers are not expected.--dev: Enable dev mode. This is equivalent to--local --validator.
- Run Swift tests:
make test - Run Rust tests:
make test-cargo - Run tests with coverage:
make test-coverage
- Boka
- The CLI entrypoint. Handles CLI arg parsing and launch
Nodewith corresponding config.
- The CLI entrypoint. Handles CLI arg parsing and launch
- Node
- The API for the blockchain node. Provide API to create various components and assemble the blockchain node.
- Blockchain
- Implements the data structure, state transform function and consensus. Used by
Node.
- Implements the data structure, state transform function and consensus. Used by
- RPC
- Provide the RPC interface for the blockchain node. Uses
Blockchainand used byBoka.
- Provide the RPC interface for the blockchain node. Uses
- Database
- Provide the database interface for the blockchain node. Used by
Node.
- Provide the database interface for the blockchain node. Used by
- Networking
- Provide the networking interface for the blockchain node. Used by
Node.
- Provide the networking interface for the blockchain node. Used by
- PolkaVM
- The PVM implementation.
- Codec
- The JAM codec implementation.
- Utils
- Provide the common utilities for the blockchain node.