EOS.IO Cpp client

Link to Github project: EOS.IO-cpp-client

Introduction

EOSIO is a blockchain that aims to :

EOSIO is designed for enterprise-grade use cases and built for both public and private blockchain deployments.

EOSIO

This blockchain enable easy decentralized application creation.

What is the EOS.IO-cpp-client project about?

This project aims to have a 100% standalone EOS client that can: build, sign, and send transactions to an EOS node. This program also demonstrates that it is possible to run a client application in C++ for the EOSIO blockchain.

How does it work?

In EOS.IO, the client application needs to follow these steps :

  1. Initialize variables and objects (JSON object, cryptography object, etc.)
  2. Retrieve node information:
    1. Get the node last irreversible block number ID: is the identifier of the last immutable block that has been pushed to the blockchain ledger
    2. Get the node chain ID: an identifier for the EOS node
    3. Get the last irreversible ref block prefix and build expiration based on block timestamp
    4. Get the transaction smart contract ABI (and cache it)
  3. Build the transaction:
    1. Transform the transaction action (a JSON string object describing the inputs for the smart contract action) into a binary format
    2. Pack the transaction with all previous data (transaction JSON to binary)
    3. Built a signature with the transaction binary
    4. Append signature to the transaction
  4. Send the transaction

After a quick profiling of the program with valdgrind you’d get:

profiling valdring
Valdgrind profiling of the app


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *