GithubHelp home page GithubHelp logo

papi's People

Contributors

mcgin avatar micimize avatar peerchemist avatar saeveritt avatar youngpascal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

papi's Issues

Database Rollback

A rollback of the database needs to be executed once the server receives an alert of a blockchain reorganization.

Papi missing transfers and issuances

papi has no record of the issuance with txid=229f04efa082d2087bdc31bdefb95f448c6a5ad2289682ab2679e2b8e5d0b2e08e9, but we've confirmed with pacli that it exists:

pacli card decode 6a0f08011201011801220675ab5ab5ab5a
version:             1
number_of_decimals:  1
amount:              [1]
asset_specific_data: b'u\xabZ\xb5\xabZ'

Deck spawning is still working fine, so I guess it's not just an issue of synchronization

Discovered as a result of investigating the problem's effect on chizukeki

Design asyncio coroutines

Replace the application initialization functions with proper coroutines to be scheduled for execution with asyncio tasks.

Required for jobs.py

jobs.py needs the following.

@rq.job recurring 5 minute crontask that checks the Queue class found in sync.py ( redis connection ) for transactions that need to be processed. These transactions come from walletnotify. The transactions need to be put together in a batch gettransaction rpc call and parsed to determine if they're valid PeerAssets transactions. If so, determine which deck they belong to and add them to the papi database then update their respective deckstates.

@rq.job recurring 5 minute crontask that grabs the most recent card recorded into papi.db, grabs the checkpoint (blockhash) of that card, and then validates that the blockhash is still valid on the chain with a getblock <blockhash> rpc call. If not, grab the next card until a valid blockhash appears. From that point remove all cards/decks that come after that checkpoint chronologically and rescan/recalculate deckstates.

Docker settings for rq worker. May need to define the FLASK_APP environment variable so the
flask rq scheduler or flask rq worker points to the correct directory.

Blockchain Reorg Detection

There needs to be a background task, perhaps initialized by blocknotify, that checks for blockchain reorganizations. If one is detected then throw an alert to the server.

Docker

The app should preferably be deployed via docker container.

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.