Skip to content
A modified version of the EOSIO Watcher Plugin that utilizes the ZeroMQ messages from https://github.com/cc32d9/eos_zmq_plugin
C++ CMake Shell
Branch: master
Clone or download
Pull request Compare This branch is 32 commits ahead, 17 commits behind eosauthority:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
watcher_plugin Ignore failed deferred tx Nov 2, 2018
.gitignore Remove JSON file + update gitignore Sep 3, 2018
LICENSE.txt LICENSE update Jul 26, 2018
README.md Update README.md Sep 8, 2018
build.sh Update watcher plugin to push notifications for cancelorder actions Sep 10, 2018

README.md

EOSIO Watcher Plugin + ZeroMQ

This is a modified version of the EOSIO Watcher Plugin (https://github.com/eosauthority/eosio-watcher-plugin) with the ZeroMQ Plugin (https://github.com/cc32d9/eos_zmq_plugin). It uses the approach in the watcher plugin where only transactions that make it into an accepted block are processed, but uses ZeroMQ to avoid http endpoint saturation when replaying the blockchain. Additionally since ZeroMQ push is a blocking operation, it is guaranteed that events (blocks) are processed in order at the work receiver endpoint performing the pull.

Requirements

Building the plugin [Install on your nodeos server]

  1. Copy watcher_plugin folder to <eosio-source-dir>/plugins/ You should now have <eosio-source-dir>/plugins/watcher_plugin
  2. Add the following line to <eosio-source-dir>/plugins/CMakeLists.txt with other add_subdirectory items
add_subdirectory(watcher_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} watcher_plugin -Wl,${no_whole_archive_flag})
  1. Install dependencies:

macOS

brew install pkg-config
brew link pkg-config
brew install zmq

Download the C++ bindings for ZeroMQ by cloning this repository: https://github.com/zeromq/cppzmq, and copy zmq.hpp to /usr/local/include putting it next to zmq.h

  1. Build and install nodeos with eosio_build.sh and eosio_install.sh. 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.

Configuration

Add the following to config.ini to enable the plugin:

#Enable watcher plugin
plugin = eosio::watcher_plugin

#Set account:action so eosauthority:spaceinvader or just eosauthority: for all actions on eosauthority
watch=chintaitest1:

#Age limit in seconds for blocks to send notifications. No age limit if set to negative. Used to prevent old actions from trigger HTTP request while on replay (seconds)
watch-age-limit = -1

#ZMQ sender socket binding
zmq-sender-bind = tcp://127.0.0.1:3001
You can’t perform that action at this time.