Code Monkey home page Code Monkey logo

talib's Introduction

Talib Blockchain Explorer for MANY Protocol

Login

All modifying endpoints to the Talib server are protected by a password. Currently, there is no update frontend that would allow you to login and make modifications, so a user would have to login manually via the command line and use the JWT token to make requests.

For example, to add a new neighborhood instance, first login to get a JWT:

# The admin password is set in the .env file.
$ curl -X POST -H "Content-Type: application/json" -d '{"username": "admin", "password":"admin"}' http://localhost:3000/api/v1/auth/login
{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjAsInVzZXJuYW1lIjoiYWRtaW4iLCJpYXQiOjE2ODU2NTE3MDcsImV4cCI6MTY4NTY1MTc2N30.iR41GGP2zqNrfyoTXd6Ul7t7_Q4tHg0r1gHZj7D_OvA"}

An easier way to set the environment would be to extract the token and set it to a TALIB_TOKEN environment variable like so:

$ set TALIB_TOKEN "$(curl -X POST -H "Content-Type: application/json" -d '{"username": "admin", "password":"admin"}' http://localhost:3000/api/v1/auth/login | jq -r .access_token)"

Then, use the token to make the update request:

$ curl http://localhost:3000/api/v1/neighborhoods -X PUT -H "Authorization: Bearer $TALIB_TOKEN" -H "Content-Type: application/json" -d '{"name": "Manifest QA Neighborhood", "description": "The Ledger QA neighborhood of the Manifest network.", "url": "https://qa-api.liftedinit.tech"}'
{"id":4,"address":"mae6o6amfv5upukm4n42rnnz4vicewllq3nx2k3yprhr3vny33","url":"https://qa-api.liftedinit.tech/","name":"Manifest QA Neighborhood","description":null}โŽ

talib's People

Contributors

cefe-herrera avatar dependabot[bot] avatar hansl avatar jgryffindor avatar mjsorribas avatar rfisch avatar stanleyjones avatar

Watchers

 avatar  avatar

talib's Issues

Create Block List Component for Mobile View

Create a Block List Component with this fields:

Block
Time
Number of Txs
Size data
Nodes
Add pagination as subcomponent

note: fields "mined by" and "Block reward" will not be include

Tokens Endpoint and View

  • Add ledger.info to network module
  • Add tokens table and GET endpoints
  • Add service for injecting and retrieving all tokens for a network
  • Add custom tokens to frontend views, refactor KNOWN_TOKENS to pull token name, precision and address from the database instead

Mint/burn transactions should show accounts and amounts

They currently look like this:

{
    "hash": "2f2631a3e2d81c4c37ec7b2a835b177a4b0fe0e548d0a6089bbdf5f2a8cc3268",
    "blockHash": "77785f6d1b60ddf09c8eb4f516ee134cbad84b9d2f884c05ab3741da4c810f76",
    "blockHeight": 10996018,
    "blockIndex": 3,
    "dateTime": "2023-04-18T18:46:10.000Z",
    "method": "tokens.mint",
    "argument": {
        "symbol": "mqbh742x4s356ddaryrxaowt4wxtlocekzpufodvowrirfrqaaaaa3l",
        "amounts": {
            "0": "Mint transaction for Node Providers Initial on 2023-03-29"
        },
        "memo": [
            "Mint transaction for Node Providers Initial on 2023-03-29"
        ]
    },
    "result": null,
    "error": null,
    "request": "84587aa3012704581d014ffe6afc96fbe18c11c46e075a7cb5e6b7088acbe8570eaeb45112c6666b6579736574584e81a6010102581d014ffe6afc96fbe18c11c46e075a7cb5e6b7088acbe8570eaeb45112c603270481022006215820cb438e3f7ebdb0386fb9683c3e384e1686a14d063d182539a151212e01965f8da059010cd92711a501d92710581d014ffe6afc96fbe18c11c46e075a7cb5e6b7088acbe8570eaeb45112c6036b746f6b656e732e6d696e740458bca300d927105820804ffe6afc96fbe18c11c46e075a7cb5e6b7088acbe8570eaeb45112c600000001a2d92710581d01117939cb05bb22ca8299d2ab0a20a6b5a28985606d32f8665b98494a1b0000617c88dca300d92710581d0150b0ff4b4e6d386ed75fb02b799bec7f3351704318a9380de01350991b0000c2f911b94600028178394d696e74207472616e73616374696f6e20666f72204e6f64652050726f76696465727320496e697469616c206f6e20323032332d30332d323905c11a6424be9d07505fa9819f6cb9c726ac3c2d7bf84de060584041e0c49349af4c8bc099f3824b49f162e2fc6485ab1868dcb748e790354d1c8f9693f4185222352bf7c385076aacf01af4ebf80b11a255f60f8c375f5c8b3305",
    "response": "8440a0582dd92712a302d92710581d014ffe6afc96fbe18c11c46e075a7cb5e6b7088acbe8570eaeb45112c60441f605c10040"
}

I'd expect "amounts" to look this this:

"amounts" : {
  "[somebody's many address]": 123456,
  "[somebody else's many address]": 234567,
}

bug: geo scheduler fails if no locations

Describe the bug
Geo scheduler fails when no items in database:

[Nest] 21736  - 03/07/2024, 11:00:00 AM   DEBUG [MetricsSchedulerService] No prometheus queries in database...
[Nest] 21736  - 03/07/2024, 11:00:00 AM   DEBUG [SchedulerService] No neighborhoods in database...
[Nest] 21736  - 03/07/2024, 11:00:00 AM   DEBUG [GeoUpdater] Seeding geolcations...
[Nest] 21736  - 03/07/2024, 11:00:00 AM     LOG [GeoUpdater] Error happened while updating geolocation:
TypeError: Cannot read properties of null (reading 'name')
    at GeoUpdater.seedLocationValues (/Users/justingriffin/git/lifted/many-product/talib/server/src/services/geo-scheduler/geo-updater/updater.ts:134:34)
    at GeoUpdater.run (/Users/justingriffin/git/lifted/many-product/talib/server/src/services/geo-scheduler/geo-updater/updater.ts:214:18)
    at GeoSchedulerService.updateLocations (/Users/justingriffin/git/lifted/many-product/talib/server/src/services/geo-scheduler/geo-scheduler.service.ts:68:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at GeoSchedulerService.run (/Users/justingriffin/git/lifted/many-product/talib/server/src/services/geo-scheduler/geo-scheduler.service.ts:44:9)

To Reproduce
Steps to reproduce the behavior:

  1. Delete all data in the database
  2. Run the server

Expected behavior
Should log an info message No locations in database... after checking before attempting to run

Create nodeList Desktop Component

Create nodes list component to show this information in a table for Desktop view.
Fields:
node_name
node_ip
address
time
total_staked
total_rewards
total_computing_power
latency

UI/UX
Image

FE: Design new home page

Design new home page with this components:

  • Network Status Visualizer
  • Block Height
  • Protocol Version
  • Software Version

Add apiCall to get the information from backend.

Design:

Image

Add to the table component the ability to include links dynamically

Add to the table component the ability to include links dynamically to other pages depending on the data processed.

  • Create Link component
  • Create Condition method to generate the url
  • Create method to validate if the json data comes with url

notes: include in the demodata a new field to define the url of any data will be linked to some page.

Balances

As a user, I need to see the correct balances associated with a specific address at a particular blockchain block height. This feature ensures that I can verify the historical accuracy of an address's balance at a precise point in the blockchain's transaction history, facilitating transparent and verifiable auditing of my financial transactions.

Migrations Endpoint

  • Create a migration table, populate table from scheduler
  • Create an endpoint to GET the migration transaction data
  • Create an endpoint to PUT status to the migration table row for each migration job
  • Lock rows, and lock management to prevent tampering
  • Add field for migration failure reason
  • Add endpoint for token
  • Vault - Deploy dev vault to kube
  • Debug KVStore endpoint failures in dev - network related issue with one of the prod kvs containers
  • Add token info to talib frontend for transactions
    • error handling for neighborhood tokens context
  • Fix type issues with bigint/number on ledger.send argument.amount

Blocks require page refresh to update

Describe the bug
Blocks require a page refresh to update whereas before these were streaming in automatically.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the home page of a network
  2. Refresh the page to get new blocks

Expected behavior
Should stream blocks in and auto-refresh the tables.

Screenshots

Desktop (please complete the following information):

  • All

Smartphone (please complete the following information):

  • All

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.