Skip to content

Hypha backend tech dive notes

Max Gravitt edited this page Feb 4, 2021 · 8 revisions

Here are some items on the tactical road map:

Release

  • Top top top priority is to get the release out and stabilize with any hot fixes

Overviews

Repositories

image

Accounting

  • Get a month’s worth of transactions categorized/configured by Sienara and run them through the accounting contracts as a real world test

Export to journal

While the GUI will offer basic reporting, advanced reporting will be provided by ledger/hledger reporting tools. These tools are all very similar and essentially require a plain text file with the transactions in a specific format.

The task is to write an application, in Node, Go, etc, to walk the chart of accounts on chain and output a plain text file in the journal format. See link for examples.

Oracle to populate unreviewed transactions

This oracle will query the web services that provide the transactions (see bash script below) and call the smart contract to create the document on chain.

Script for querying unreviewed transactions:

#!/bin/bash
curl -X GET "http://ec2-3-236-210-156.compute-1.amazonaws.com:3000/api/btc/list-trx?wallet=btc-treasury-1" -H "accept: application/json" > btc-treasury-1-history.json
curl -X GET "http://ec2-3-236-210-156.compute-1.amazonaws.com:3000/api/btc/list-trx?wallet=btc-treasury-2" -H "accept: application/json" > btc-treasury-2-history.json
curl -X GET "http://ec2-3-236-210-156.compute-1.amazonaws.com:3000/api/btc/list-trx?wallet=btc-treasury-3" -H "accept: application/json" > btc-treasury-3-history.json
curl -X GET "http://ec2-3-236-210-156.compute-1.amazonaws.com:3000/api/btc/list-trx?wallet=btc-treasury-5" -H "accept: application/json" > btc-treasury-5-history.json
curl -X GET "http://ec2-3-236-210-156.compute-1.amazonaws.com:3000/api/ether/list-trx?address=0xC20f453a4B4995CA032570f212988F4978B35dDd" -H  "accept: application/json" > eth-treasury-history.json
curl -X GET "https://api.telos.kitchen/v1/chain/get_table_rows" -d '{
  "json": true,
  "code": "bank.hypha",
  "scope": "bank.hypha",
  "table": "redemptions",
  "table_key": "",
  "lower_bound": "",
  "upper_bound": "",
  "limit": 1000,
  "key_type": "",
  "index_position": "",
  "encode_type": "dec",
  "reverse": false,
  "show_payer": false
}' > requested_redemptions.json
curl -X GET "https://api.telos.kitchen/v1/chain/get_table_rows" -d '{
  "json": true,
  "code": "bank.hypha",
  "scope": "bank.hypha",
  "table": "payments",
  "table_key": "",
  "lower_bound": "",
  "upper_bound": "",
  "limit": 1000,
  "key_type": "",
  "index_position": "",
  "encode_type": "dec",
  "reverse": false,
  "show_payer": false
}' > recorded_redemption_payments.json

Treasury

  • Treasury processes - walkthrough of process
  • Enhancements to Bitcoin & Ethereum integrations
    • Improved software
    • Better security
    • BTC Pay Server?

DHO

People and Profiles

  • Profiles work - lots to unpack here
    • on-chain data
    • off-chain (mutable) public data
    • off-chain (mutable) private data
  • Starting point is to enable what is needed for Leonie's specs
  • Posts/content, reply to content, add notes when voting

Hypha Cloud

  • Hypha micro services and various tools in a Kubernetes cluster
    • Multi-chain treasury services
    • Document cache / DGraph
    • UI helper services, such as evaluating if proposals are passing
  • dfuse and/or Hyperion and nodeos hosting
  • Multiple test environments
  • Metrics and telemetry integrated with Prometheus and Grafana
  • Graph navigator hosting
  • CI/CD, "12 factor apps" design