Increase the performance of getstakeinfo #47

Merged
merged 1 commit into from Feb 23, 2016

Projects

None yet

3 participants

@cjepson
cjepson commented Feb 22, 2016

getstakeinfo caused issues on the stake pool because of very slow performance.
The speed of the RPC call has been improved by reading more local information
instead of fetching it from the remote daemon.

@jcvernaleo
Member

Do you think we should vendor that @jrick repo first?

Other than that, OK

@jcvernaleo
Member

That repo has been vendored as github.com/decred/bitset

Please update the import path, sqaush, then I'll merge in all 3.

@cjepson cjepson Increase the performance of getstakeinfo
getstakeinfo caused issues on the stake pool because of very slow
performance. The speed of the RPC call has been improved by reading
more local information instead of fetching it from the remote daemon.
New RPC calls for getrawmempool and existslivetickets are used, which
are substantially faster than the previous RPC calls.
e875bf3
@jcvernaleo jcvernaleo merged commit e875bf3 into decred:master Feb 23, 2016
@chappjc

Seems to work. 👍 Release it!

Is the following expected output? (I've redacted "live" and "totalsubsidy", but they look reasonable).

{
  "poolsize": 33998,
  "difficulty": 2,
  "allmempooltix": 20,
  "ownmempooltix": 0,
  "immature": 28,
  "live": yy,
  "proportionlive": 0.009029942937819871,
  "voted": 19,
  "totalsubsidy": XX.xxxxxx,
  "missed": 0,
  "proportionmissed": 0,
  "revoked": 0
}```

Yes, looks good. Caught a panic in it, you may want to pull on master tomorrow after the hotfix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment