Official Go implementation of the Klever blockchain protocol.
Klever is a high-performance blockchain network designed for decentralized applications, asset management, and smart contract execution. This repository contains the core node implementation, virtual machine (KVM), and CLI tools for interacting with the Klever network.
Key Features:
- High Performance: Optimized slot-based consensus mechanism
- Smart Contracts: WebAssembly-based virtual machine (KVM) for secure contract execution
- Native KApps: Protocol-level applications (KDA, staking, governance, marketplace)
- Developer Friendly: Comprehensive CLI tools and REST API
- Installation
- Building from Source
- Quick Start
- Running a Node
- CLI Tools
- Configuration
- Development
- Testing
- API Documentation
- Architecture
- Contributing
- Security
- Support
- Resources
- License
- Go 1.25 or higher
- Git
- Make
- Protocol Buffers compiler (protoc) - for development
- Swag - for API documentation generation
git clone https://github.com/klever-io/klever-go.git
cd klever-go
make prepare
make buildThis will build all binaries in the cmd/ directories.
make buildThis creates the following executables in ./bin/:
validator- Full blockchain validator nodeoperator- CLI tool for blockchain operationsseednode- Network bootstrap nodekeygenerator- Key generation utilityconnector- Node connection provider
# Build only the validator node
make build-validator
# Build only the seed node
make build-seednode
# Build only the operator CLI
make build-operator
# Build only the key generator
make build-keygeneratormake docker-build./bin/keygenerator --helpGenerate validator and wallet keys for running a node or submitting transactions. See cmd/keygenerator/CLI.md for detailed options.
./bin/validatorBy default, the node looks for configuration files in ./config/node/. See Running a Node for details.
./bin/seednodeBy default, the seed node looks for configuration in ./config/seednode/. See cmd/seednode/CLI.md for detailed options.
# View available commands
./bin/operator --help
# View account commands
./bin/operator account --help
# View KDA commands
./bin/operator kda --help
# View validator commands
./bin/operator validator --helpFor detailed CLI documentation, see cmd/operator/docs/.
For comprehensive node setup and operation instructions, see the official documentation:
Validator Node:
./bin/validatorNote: A node participates in consensus only if its public key is registered and staked in the network. Otherwise, it syncs the blockchain as an observer.
Seed Node (bootstrap peer for network discovery):
./bin/seednodeBy default, the node looks for configuration files in ./config/node/. Each file can be overridden individually:
| File | Flag | Description |
|---|---|---|
config.yaml |
--config |
Main node configuration (P2P, logging, storage) |
enableEpochs.yaml |
--config-epochs |
Feature activation schedule by epoch |
gasScheduleV1.yaml |
--config-gas-schedule |
Smart contract gas costs |
api.yaml |
--config-api |
REST API endpoint configuration |
external.yaml |
--config-external |
External integrations (ElasticSearch) |
genesis.json |
--genesis-file |
Genesis block configuration |
nodesSetup.json |
--nodes-setup-file |
Initial validator set |
Example - Override a specific config:
./bin/validator --config-external /path/to/custom/external.yamlFor detailed configuration options, see the Node Operations documentation.
klever-go/
├── cmd/ # Executables (node, operator, seednode)
├── core/ # Core blockchain logic
│ ├── consensus/ # Consensus mechanism
│ ├── process/ # Block and transaction processing
│ └── kapp/ # Protocol-level KApps
├── kvm/ # Klever Virtual Machine
│ ├── vmhost/ # VM execution engine
│ └── wasmer2/ # WASM runtime
├── data/ # Data structures (blocks, transactions)
├── storage/ # Storage backends (LevelDB, memory)
├── network/ # P2P networking and API
├── crypto/ # Cryptographic operations
├── config/ # Configuration files
└── integrationTest/ # Integration tests
- Implement the feature in the appropriate package
- Add unit tests alongside your code (
*_test.go) - Update configuration if needed (
enableEpochs.yaml) - Add integration tests in
integrationTest/ - Update documentation and CHANGELOG
- Run
make goimportsbefore committing - Follow standard Go conventions and idioms
- See CONTRIBUTING.md for detailed guidelines
make testsmake tests-unitmake tests-integrationmake tests-kvmmake tests-e2ego test ./core/process/block/preprocess/
go test ./kvm/vmhost/...go test -cover ./...The node exposes a REST API for blockchain queries and operations.
Swagger Documentation: Auto-generated API docs are available at:
- Running node:
http://localhost:8080/swagger/index.html - Source file: docs/node_swagger.yaml
Klever blockchain features:
- Consensus: Slot-based mechanism with validator coordination
- KVM: WebAssembly-based smart contract execution engine
- KApps: Protocol-level applications (KDA, Staking, Governance, ITO, Marketplace)
- Storage: Pluggable backends with multi-layer caching
- Networking: libp2p-based P2P network
For detailed architecture documentation, see docs.klever.org
We welcome contributions! Please read:
- CONTRIBUTING.md - Contribution guidelines and workflow
- CODE_OF_CONDUCT.md - Community standards
Quick start:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
make testsandmake goimports - Submit a Pull Request
Report security vulnerabilities: See SECURITY.md
For bug bounty and security audit information, contact: [email protected]
The Klever Forum is the official channel for technical support and community feedback. Use it to:
- Ask technical questions about running nodes or development
- Discuss ideas and get guidance from the community
- Engage with the Klever team and other developers
For bug reports and feature requests, please use GitHub Issues.
- Website: https://klever.org
- Documentation: https://docs.klever.org
- Explorer: https://kleverscan.org
- Forum: https://forum.klever.org
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
This project is derived from MultiversX (formerly Elrond), originally licensed under GPL v3. We acknowledge and thank the MultiversX team for their foundational work.
Built with: