Code Monkey home page Code Monkey logo

check-bridge-health-util's Introduction

explorer health-check util

This repository contains the alt-eth explorer health check util. Compatible for Kekchain Explorer: https://github.com/lol-chain/explorer

how to use it frens?

Clone the health-check util into a directory within the explorer path. Assumes explorer has been built for production, directions may be passed on later;

Installation Example:

1a) Clone explorer (later recursively)
git clone https://github.com/lol-chain/explorer

1b) Build explorer for production, with distillery. (more details for explorer installation at explorer repository)

example for releases compile: mix distillery.release

2a) Change directory into explorer, and clone health-util cd explorer && git clone https://github.com/lol-chain/check-explorer-health-util health

2b) Fix start/stop permissions (ensure executable) chmod ug+x exe_start.sh && chmod ug+x exe_stop.sh

note: this program is best run with screen, and requires an env.txt file in explorer path. (env not provided, env.example in explorer repository)

3a) Open screen screen -S explorer-health

3b) Change directory into health, and execute the strategy (90 second loop) sh run.sh

Success outputs:

145785
145785
Proceeding comparison of block numbers...MATCH
145794
145794
Proceeding comparison of block numbers...MATCH
145803
145803
Proceeding comparison of block numbers...MATCH

Error cases handled:

  • If RPC||EXP blockNumber type != integer;
  • If RPC||EXP blockNumber not matching;
  • If EXP > RPC return success, and dissalow Explorer reboot;
  • write log files on success, or error;
  • more!

Safety Solutions:

  • ensure type safety && divert strategy if mismatch detected
  • ensure Explorer is not on alt-chain
  • ensure Explorer won't reboot if RPC is down or unreachable
  • ensure RPC is reachable
  • ensure Explorer is on main chain, not alt-chain forked
  • safe Explorer height > RPC height won't trigger reboot
  • retry comparison of block heights every 5 seconds in 4 statements
  • reiterate health strategy every 90 seconds

Made with <3

Thank to our affiliates, and donors for sponsoring the future of cryptocurrency development! Kekchain https://kekchain.com Crystaleum https://crystaleum.org Electronero Network https://electronero.org

Donations welcomed! Any alt-ethereum or EVM chain accepted. Devs wallet 0xD87243a8629905813c28fB82136f99d6Ab29E46e

Contact

To reach devs message us on Telegram.

Interchained: https://t.me/interchained Bill Aure: https://t.me/billaure

check-bridge-health-util's People

Contributors

ethgr0wth 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.