Ravin Perera 948113398c Ledger query infrastructure. (#275)
* Added json ledger query param parser.

* Added initial query response creation.

* Updated client lib.

* Implemented get ledger by seq no.

* Added ledger query execution wrappers.

* Included log record info.

* Fixed empty output hash issue.

* Added bson support.

* Added db file existance check.

* Added requesy/reply tracking for queries in client lib.

* Improved multi connection usage in client lib.

* Added genesis ledger query support.

* Updated naming convention of query result fields.

* Comments.

* Used sqlite bind() for query param.

* Used binary hashes in ledger sqlite db.

* Missing const.
2021-03-29 11:20:15 +05:30
2021-03-29 11:20:15 +05:30
2019-12-21 07:05:20 +05:30

Hot Pocket Consensus Engine

What's here?

In development

A C++ version of hotpocket designed for production envrionments, original prototype here: https://github.com/codetsunami/hotpocket

Libraries

Setting up Hot Pocket development environment

Run the setup script located at the repo root (tested on Ubuntu 18.04).

./dev-setup.sh

Build Hot Pocket

  1. Run cmake . (You only have to do this once)
  2. Run make (Hot Pocket binary will be created as ./build/hpcore)
  3. Refer to the Wiki for instructions on running Hot Pocket.

FlatBuffers message definitions

If you update flatbuffers message definitions, you need to run the flatbuffers code generator to update the stubs.

Example: When you make a change to p2pmsg.fbs defnition file, you need to run this:

flatc -o src/msg/fbuf/ --gen-mutable --cpp src/msg/fbuf/p2pmsg.fbs

Code structure

Code is divided into subsystems via namespaces.

conf:: Handles configuration. Loads and holds the central configuration object. Used by most of the subsystems.

crypto:: Handles cryptographic activities. Wraps libsodium and offers convenience functions.

sc:: Handles smart contract process execution and managing user/SC I/O and npl I/O. Makes use of usr, p2p and hpfs.

usr:: Handles user connections. Makes use of crypto and comm.

p2p:: Handles peer-to-peer connections and message exchange between nodes. Makes use of crypto and comm.

consensus:: Handles consensus and proposal rounds. Makes use of usr, p2p and sc

ledger:: Maintains the ledger and handles ledger syncing activites.

comm:: Handles generic web sockets communication functionality. Mainly acts as a wrapper for hpws.

util:: Contains shared data structures/helper functions used by multiple subsystems.

hpfs:: hpfs state management client helpers.

Description
Consensus Engine for Codius, Linux and Mac Hosts
Readme 19 MiB
Languages
C++ 92.9%
Shell 4.5%
JavaScript 2%
CMake 0.4%
C 0.1%