lisk-engine

module
v0.0.0-...-77dcbbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2024 License: Apache-2.0

README

Logo

Lisk Engine

Build status GitHub tag (latest by date) GitHub repo size GitHub issues GitHub closed issues

Lisk Engine is a consensus engine written in Golang implementing the Lisk v4 protocol.

Requirements

  • Go v1.21 or above

Development

Linting

golangci-lint is used for linting. To setup the local environment, refer to Editor Integration in the usage guide.

Documentation

Execute the folllowing command to view the generated documentation locally:

make godocs
Usage

Execute the folllowing command to run Lisk Engine against a known ABI server:

make run.lengine PATH_TO_ABI_SERVER PATH_TO_CONFIG

# Example
# make run.lengine path=~/.lisk/dpos-mainchain/tmp/sockets/abi.ipc config=./cmd/debug/app/config.json
Codecs

To generate a new codec:

  1. Define a new struct with a tag on each property fieldNumber: "n"
  2. Add //go:generate go run github.com/LiskHQ/lisk-engine/pkg/codec/gen at the top of the file
  3. Call make generate.codec
Tests

To run the tests:

  • make test - To run all the tests and show a summary
  • make test.coverage - To run all the tests and show a detailed coverage report
  • make test.coverage.html - To run all the tests and produce a HTML coverage report

Contributors

https://github.com/LiskHQ/lisk-engine/graphs/contributors

Disclaimer

[!WARNING] By using the source code of Lisk Engine, you acknowledge and agree that you have an adequate understanding of the risks associated with the use of the source code of Lisk Engine and that it is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. To the fullest extent permitted by law, in no event shall the Lisk Foundation or other parties involved in the development of Lisk Engine have any liability whatsoever to any person for any direct or indirect loss, liability, cost, claim, expense or damage of any kind, whether in contract or in tort, including negligence, or otherwise, arising out of or related to the use of all or part of the source code of Lisk Engine.

License

Copyright 2016-2024 Lisk Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
cmd
debug/app
app runs blockchain node with the default configurations for debugging.
app runs blockchain node with the default configurations for debugging.
debug/app/modules/mock
Package auth implements auth module following [LIP-0041].
Package auth implements auth module following [LIP-0041].
debug/p2p/nat
nat runs P2P client against specified node for debugging and testing NAT functionality of libp2p library.
nat runs P2P client against specified node for debugging and testing NAT functionality of libp2p library.
debug/p2p/ping
p2p runs P2P client against specified node for debugging and demonstration purpose.
p2p runs P2P client against specified node for debugging and demonstration purpose.
debug/smt
smt runs updates on a database multiple times for benchmark and for debugging.
smt runs updates on a database multiple times for benchmark and for debugging.
lengine
lengine is a CLI which runs Lisk engine process.
lengine is a CLI which runs Lisk engine process.
pkg
blockchain
Package blockchain implements common blockchain concepts and logic to store them for the Lisk protocol.
Package blockchain implements common blockchain concepts and logic to store them for the Lisk protocol.
codec
Package codec implements serialization and deserialization defined in [LIP-0027] and [LIP-0064] and lisk32 representation of address defined in [LIP-0018].
Package codec implements serialization and deserialization defined in [LIP-0027] and [LIP-0064] and lisk32 representation of address defined in [LIP-0018].
codec/gen
gen generates encoding/decoding codes for struct using "fieldNumber" tag.
gen generates encoding/decoding codes for struct using "fieldNumber" tag.
codec/gen/internal
Code generated for package internal by go-bindata DO NOT EDIT.
Code generated for package internal by go-bindata DO NOT EDIT.
codec/internal/codec_test
Package codec_test is a test package for codec.
Package codec_test is a test package for codec.
collection
Package collection provides utility functions for slices.
Package collection provides utility functions for slices.
collection/bytes
Package bytes provides utility functions for byte slices.
Package bytes provides utility functions for byte slices.
collection/ints
Package ints provides utility functions for int slices.
Package ints provides utility functions for int slices.
collection/strings
Package strings provides utility functions for string slices.
Package strings provides utility functions for string slices.
consensus
Package consensus implements block execution according to the Lisk BFT protocol following [LIP-0055].
Package consensus implements block execution according to the Lisk BFT protocol following [LIP-0055].
consensus/certificate
Package certificate implements block certificate generation protocol following [LIP-0061].
Package certificate implements block certificate generation protocol following [LIP-0061].
consensus/contradiction
Package contradiction package provides functions to determin contradiction between 2 block headers as defined in [LIP-0014].
Package contradiction package provides functions to determin contradiction between 2 block headers as defined in [LIP-0014].
consensus/forkchoice
Package forkchoice implements block comparison logic for the fork choice mechanism as defined in [LIP-0014].
Package forkchoice implements block comparison logic for the fork choice mechanism as defined in [LIP-0014].
consensus/liskbft
Package liskbft implements state transition logics for BFT protocol following [LIP-0056] and [LIP-0058].
Package liskbft implements state transition logics for BFT protocol following [LIP-0056] and [LIP-0058].
consensus/sync
Package sync provides block synchronization mechanism following the BFT protocol.
Package sync provides block synchronization mechanism following the BFT protocol.
consensus/validator
Package validator implements utility functions regarding BFT validators.
Package validator implements utility functions regarding BFT validators.
crypto
Package crypto provides crypto related utility functions.
Package crypto provides crypto related utility functions.
db
Package db implements key-value database functionality with prefix feature.
Package db implements key-value database functionality with prefix feature.
db/batchdb
Package batchdb provides the prefixed db feature without diff functionality.
Package batchdb provides the prefixed db feature without diff functionality.
db/diffdb
Package diffdb provides diff functionality, which is used for rolling back the stored data.
Package diffdb provides diff functionality, which is used for rolling back the stored data.
engine
Package engine implements blockchain engine using other packages.
Package engine implements blockchain engine using other packages.
engine/config
Package config provides config structure for engine.
Package config provides config structure for engine.
engine/endpoint
Package endpoint implements RPC endpoint handlers for engine.
Package endpoint implements RPC endpoint handlers for engine.
event
Package event implements Pub-Sub using channel.
Package event implements Pub-Sub using channel.
framework
Package framework provides interface to build blockchain client with modular architecture.
Package framework provides interface to build blockchain client with modular architecture.
framework/blueprint
Package blueprint provides blueprint for framework modules.
Package blueprint provides blueprint for framework modules.
framework/config
Package config provides framework config structure.
Package config provides framework config structure.
generator
Package generator implements block generation.
Package generator implements block generation.
labi
Package labi defines ABI interface to communicate with Lisk Application.
Package labi defines ABI interface to communicate with Lisk Application.
labi_client
Package labi_client implements ABI client using IPC protocol.
Package labi_client implements ABI client using IPC protocol.
log
Package log implements logger
Package log implements logger
math
Package math provides safe math operations for blockchain usage.
Package math provides safe math operations for blockchain usage.
p2p
Package p2p implements P2P protocol using libp2p library.
Package p2p implements P2P protocol using libp2p library.
router
Package router provides request routing logic for JSON RPC server pkg/github.com/LiskHQ/lisk-engine/pkg/rpc.
Package router provides request routing logic for JSON RPC server pkg/github.com/LiskHQ/lisk-engine/pkg/rpc.
rpc
Package rpc provides JSON RPC server for IPC.
Package rpc provides JSON RPC server for IPC.
statemachine
Package statemachine provides implementation to execute state changes using modular architecture.
Package statemachine provides implementation to execute state changes using modular architecture.
trie/rmt
Package rmt implements regular merkle tree following [LIP-0031].
Package rmt implements regular merkle tree following [LIP-0031].
trie/smt
package smt implements sparse merkle tree following [LIP-0039].
package smt implements sparse merkle tree following [LIP-0039].
txpool
Package txpool provides transaction pool which maintain transactions by nonce asc and fee desc order.
Package txpool provides transaction pool which maintain transactions by nonce asc and fee desc order.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL