Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consume metrics into DB/Prometheus for Econ Stress Test #5681

Closed
dckc opened this issue Jun 28, 2022 · 10 comments
Closed

Consume metrics into DB/Prometheus for Econ Stress Test #5681

dckc opened this issue Jun 28, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol
Milestone

Comments

@dckc
Copy link
Member

dckc commented Jun 28, 2022

What is the Problem Being Solved?

Econ Stress test needs a bunch of data in a convenient form.

Design

up to @arirubinstein and co

Security Considerations

gets a whole bunch of moving parts, including a private signing key, out of the equasion

Test Plan

manual, with, Nalin, @btulloh and co.

@dckc dckc added the enhancement New feature or request label Jun 28, 2022
@dckc dckc self-assigned this Jun 28, 2022
@dckc
Copy link
Member Author

dckc commented Jun 29, 2022

amm, vaults w/governance working via RPC

TODO: PSM, Reserve, BLD Boost

Among the other targets from #5421:

We have all but Oracle available, to at least some extent:

$ agd query vstorage keys published
children:
- amm
- psm
- reserve
- stakeFactory
- vaultFactory

Oracle???

I'm not sure if we have clear plans for this one. p.s. yes, we do: #4652

That reminds me...

chainStorage for unprivileged contracts?

How do ordinary contracts publish their data for read-only RPC? chainStorage is currently privileged.

for follow-up, see #5687

@dckc dckc added the Inter-protocol Overarching Inter Protocol label Jul 5, 2022
@dckc
Copy link
Member Author

dckc commented Jul 6, 2022

6cd8054 is working pretty well. no individual vaults yet. nor reserve etc.

@dckc
Copy link
Member Author

dckc commented Jul 7, 2022

I'm not sure what to make of this:

PROOF VERIFICATION FAILURE; crashing follower (Error#4)
Error#4: {"code":-32603,"message":"Internal error","data":"min height 76703 can't be greater than max height 76702"}

for now, I set proof: 'none'

ist-monitor2.mjs 09d5a8d

p.s. @gibson042 suspects a timing issue with follow-up queries going out too early or some such.

@dckc
Copy link
Member Author

dckc commented Jul 7, 2022

I deployed it to GCP using a systemd user unit... it gets the starting / current values, but doesn't seem to update as new values come in.

ist-monitor.service

@dckc
Copy link
Member Author

dckc commented Jul 21, 2022

@arirubinstein I'd like to go over ist-monitor.service with you.

I went over ist-monitor2.mjs with @gibson042 ; using that as a throw-away prototype, the two of you should be able to put together a service that works for @btulloh and Nalin.

Using a google sheet is not necessary; whatever works for the customer is fine by me. But I'd be a little surprised if the "write CSV or JSON to stdout" approach works, since then the customer has to install and run the code and maintain updates.

@dckc
Copy link
Member Author

dckc commented Jul 21, 2022

@gibson042 re insertedAt vs. block time, I found the issue: #5508

@Tartuffo Tartuffo assigned arirubinstein and gibson042 and unassigned dckc Jul 22, 2022
@Tartuffo Tartuffo changed the title migrate econ dashboard to read-only RPC Provide real-time Inter Protocol contract data needed for Econ Stress Test Jul 22, 2022
@dckc dckc added the e2e1 label Aug 4, 2022
@dckc dckc changed the title Provide real-time Inter Protocol contract data needed for Econ Stress Test Consume metrics into DB/Prometheus for Econ Stress Test Aug 5, 2022
@Tartuffo Tartuffo removed the e2e1 label Aug 5, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 RC0 milestone Aug 10, 2022
@Tartuffo
Copy link
Contributor

Handing off to @arirubinstein

@dckc
Copy link
Member Author

dckc commented Aug 12, 2022

dev work on this is planned for after we have a network running with the features in this release such as

@dckc
Copy link
Member Author

dckc commented Aug 17, 2022

vault detail available via RPC on xnet

published.vaultFactory.manager0.vaults.vault2
$ ~/go/bin/agd --node=https://xnet.rpc.agoric.net:443 query vstorage data published.vaultFactory.manager0.vaults.vault2 -o json | jq '.value | fromjson | {body: .body | fromjson, slots}'
{
  "body": {
    "debtSnapshot": {
      "debt": {
        "brand": {
          "@qclass": "slot",
          "iface": "Alleged: IST brand",
          "index": 0
        },
        "value": {
          "@qclass": "bigint",
          "digits": "30300000"
        }
      },
      "interest": {
        "denominator": {
          "brand": {
            "@qclass": "slot",
            "index": 0
          },
          "value": {
            "@qclass": "bigint",
            "digits": "100"
          }
        },
        "numerator": {
          "brand": {
            "@qclass": "slot",
            "index": 0
          },
          "value": {
            "@qclass": "bigint",
            "digits": "100"
          }
        }
      }
    },
    "locked": {
      "brand": {
        "@qclass": "slot",
        "iface": "Alleged: IbcATOM brand",
        "index": 1
      },
      "value": {
        "@qclass": "bigint",
        "digits": "50000"
      }
    },
    "vaultState": "active"
  },
  "slots": [
    "board0074",
    "board03446"
  ]
}

@dckc
Copy link
Member Author

dckc commented Aug 18, 2022

@arirubinstein gave a demo of

@nalinbhatt plans to try it out. Presuming that works out, I'm closing this. (Feel free to re-open if doesn't work and you can't otherwise find out how to get the data you need).

@dckc dckc closed this as completed Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Inter-protocol Overarching Inter Protocol
Projects
None yet
Development

No branches or pull requests

4 participants