Giter VIP home page Giter VIP logo

eos-producer-heartbeat-plugin's Introduction

EOSIO Block Producer Hearbeat Plugin by LiquidEOS (WIP)

Heartbeat plugin to coordinate BP node status and metadata on-chain.

The goal is to show that a standby or active BP is ready for block production in terms version, blacklist sync, configuration, etc.

This plugin is intended for both standby and active BPs. it is intended to run on the block producing node.

producer-heartbeat plugin features

Periodic on-chain heartbeat

Contains version, head_block_num

Blacklist Hashes - TBD

Latency data from other BPs - TBD

Sign a field with the real producer private key - TBD

Installation instructions

Requirements

  • Works on any EOSIO node that runs v1.1.4 and up.

Building the plugin [Install on your nodeos server]

  1. run
cd <eosio-source-dir>/plugins
git clone https://github.com/bancorprotocol/eos-producer-heartbeat-plugin.git producer_heartbeat_plugin
  1. Add the following line to <eosio-source-dir>/plugins/CMakeLists.txt with other add_subdirectory items
add_subdirectory(producer_heartbeat_plugin)
  1. Add the following line to the bottom of <eosio-source-dir>/programs/nodeos/CMakeLists.txt
target_link_libraries( nodeos PRIVATE -Wl,${whole_archive_flag} producer_heartbeat_plugin -Wl,${no_whole_archive_flag})
  1. Build and install nodeos as usual. You could even just cd <eosio-source-dir>/build and then sudo make install

How to setup on your nodeos

Enable this plugin using --plugin option to nodeos or in your config.ini. Use nodeos --help to see options used by this plugin.

Edit your nodeos config.ini (probably easier)

Setup permissions

Use a dedicated key for this action.

cleos create key # HEARBEAT_PRIVATE_KEY and HEARBEAT_PUB_KEY 
cleos set account permission PRODUCERACCT heartbeat '{"threshold":1,"keys":[{"key":"HEARBEAT_PUB_KEY","weight":1}]}' "active" -p PRODUCERACCT@active
cleos set action permission PRODUCERACCT heartbeat123 heartbeat heartbeat

Enable plugin in config.ini

plugin = eosio::producer_heartbeat_plugin
heartbeat-period = 300
heartbeat-signature-provider = HEARBEAT_PUB_KEY=KEY:HEARBEAT_PRIVATE_KEY
heartbeat-contract = heartbeat123

Check if the plugin has loaded

  • You should see an entry for producer_heartbeat_plugin in the logs when you restart nodeos.

Feedback & development

  • Any suggestions and pull requests are welcome :)

eos-producer-heartbeat-plugin's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.