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

Replace account_info::rep_block with representative account #2283

Merged

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Sep 4, 2019

Currently to find the representative from the account_info an extra read is needed to be done to get the rep block contents and get the representative from that. This causes slow-downs in the initial rep caching and delegator RPCs (so should fix #1517). The rep_block has now been replaced with the representative account itself.

To prevent breaking existing service implementations, rep_block will be determined on demand for RPCs which currently add to the responses (@guilhermelawless's recommendation), but will be marked as deprecated. In the new RPC 2.0 it representative should be returned by default rather than require the flag "representative":"true"

Note: Any ledgers used since #2174 will not be valid as this requires a database upgrade and those ledgers will already be on the same version!

@wezrule wezrule added documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability labels Sep 4, 2019
@wezrule wezrule added this to the V20.0 milestone Sep 4, 2019
@wezrule wezrule self-assigned this Sep 4, 2019
Copy link
Contributor

@guilhermelawless guilhermelawless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good change. Noting that anyone with a v20 ledger will have to delete it due to the account info upgrade.

@wezrule wezrule merged commit 72c7317 into nanocurrency:master Sep 6, 2019
@wezrule wezrule deleted the replace_rep_block_with_rep_account branch September 6, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
No open projects
V20
Awaiting triage
Development

Successfully merging this pull request may close these issues.

'delegators' and 'delegators_count' RPC commands run very slowly or not at all
3 participants