Git Product home page Git Product logo

gaia-x-testnet-statistics-api's People

Contributors

abrom8 avatar moritzkirstein avatar oceanbyte avatar

gaia-x-testnet-statistics-api's Issues

[Enhancement] Add return types to functions

Motivation / Problem

Currently, most functions do not have a return type. So we do not benefit from the full advantages of Typescript type checking.

Solution

Add return types to all functions.

[Enhancement] Add simple block time health check

Motivation / Problem

As a Gaia-X testnet node provider,
I must know if all nodes are syncing as expected
because malicious nodes might affect the network resulting in either unresponsiveness or log spamming.

Solution

  • Check if blocks are produced every ~5 seconds
  • create a notification for Slack when the network deviates from expected blocktimes

[BUG] duplicate cron jobs running in parallel

Summary

Because of slow data fetching it's possible that the same cron job runs multiple times in parallel.

Current Behavior

Same cron job runs in parallel

Expected Behavior

Same cron jobs can not start if already running

[Enhancement] Naming convention & style guide

Motivation / Problem

TypeScript team recommends not I-prefixing interfaces. See a detailed answer here: https://stackoverflow.com/a/41967120

Solution

Refactor our interfaces to not use the "I"-prefix anymore. This also means we need to rename some other components, like models & implementations.

I suggest using names like

interface Cat { }

class Lion implements Cat { }

// Database models
class CatModel {}

Alternatives

We can simply keep the "I" prefix for interfaces and not care about the drawbacks.

[BUG] blockNumber undefined when started with empty database

Current Behavior

When the DB is empty and the data fetching is started the error below is thrown.

Cannot read properties of undefined (reading 'blockNumber') at getLatestEventBlockNumberFromDb 

Expected Behavior

When the DB is empty the program will start to fetch blocks from 0.

[Enhancement] Improve block fetching speed

Motivation / Problem

Block fetching takes a long time. We want investigate on possibilities to improve fetching speed.

Solution

Check the use of Promise.all in the block fetching function => running several queries in parallel instead of sequentially

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.