ChorusOne / solview

0 stars 0 forks source link

Solview improvements - feedback from @ruuda 2021q3 #2

Open kucharskim opened 3 years ago

kucharskim commented 3 years ago

https://chorusone.slack.com/archives/CV89K1VB2/p1632925506230000?thread_ts=1632912320.217500&cid=CV89K1VB2

It registers variables for the gauges that it serves, and then updates the gauges. Not sure if these gauges include timestamps, but it doesn't appear so. This means that:

Also:

There is no easy way to fix this, it requires atomically reading multiple accounts, something like read transactions. There exists only a single RPC call that can do this, getMultipleAccounts, but it is very low-level. If you want to read the balances of e.g. SPL token accounts, then you have to manually parse the data. (I complained about this many times to the Solana team but they don't seem to understand the value of read transactions ...)

Some Python footguns:

kucharskim commented 3 years ago

Another one from @ruuda, in pull request #1:

Also if you want to handle the exceptions instead of crashing the app, try this one weird trick to make your application more reliable.