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

Add tracking tips explorer multiverse #2981

Merged
merged 9 commits into from
Feb 8, 2021

Conversation

ecioppettini
Copy link
Contributor

@ecioppettini ecioppettini commented Feb 1, 2021

Intermediate step, see #2963

This essentially changes the explorer backend/indexing, but without adding the breaking changes to graphql.

This may conflict with #2962, it's not really dependent, but it touches the same things. I would merge #2962 first anyway, so maybe I'll rebase this one on top.

Backend

  • Add tip tracking multiverse wrapper (proxy)
  • Move branch dependent methods/queries to State, so the ExplorerDB can be used like get_branch(hash) or get_main_branch(hash). Also, change the graphql queries so they use get_main_branch, so this PR still retains most of the current behaviour.

GraphQL API

The changes to the graphql/mod.rs are only to make things still compile, most queries keep the current behavior except for

  • block by id searches in all candidate branches.
  • transaction by id searches in all candidate branches.
  • vote plan by id searches in all candidate branches.

breaking changes will come in the next PR.

@ecioppettini ecioppettini added the A-explorer Area: Explorer API and backend label Feb 1, 2021
@ecioppettini ecioppettini self-assigned this Feb 1, 2021
@ecioppettini ecioppettini marked this pull request as ready for review February 2, 2021 20:10
Copy link
Contributor

@eugene-babichenko eugene-babichenko left a comment

Choose a reason for hiding this comment

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

LGTM. The tests are passing on my machine. Please resolve the linter warnings. They are preventing the project from being compiled due to -D warnings.

display("the explorer's database couldn't be initialized: {}", msg)
}
}
#[derive(Debug, Error)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Woohoo, removing last error_chain pieces!

@ecioppettini ecioppettini force-pushed the add-tracking-tips-explorer-multiverse branch from 038a68b to f985ae4 Compare February 4, 2021 15:31
although unlikely, it may report false positives otherwise

also, it's probably a bit more efficient
@mzabaluev
Copy link
Contributor

The nightly failure is resolved in #2995.

@mzabaluev mzabaluev merged commit 0fb223f into master Feb 8, 2021
@mzabaluev mzabaluev deleted the add-tracking-tips-explorer-multiverse branch February 8, 2021 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-explorer Area: Explorer API and backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants