You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2801 was getting too large/ambitious, so I'm closing it and organizing things a bit more in a few PR's and here.
Motivation
Have the explorer API reflect the multiverse better. This requires keeping track of active branches, be able to search for things in multiple branches, and I'd say adding garbage collection because it also affects the API a bit, among other things.
Plans
In GraphQL API
Change block by id query so it searches in all candidate branches.
Change transaction by id query so it searches in all candidate branches.
Change vote plan by id query so it searches in all candidate branches.
Add a Branch graphql type. A Branch is identified by a Block hash, but not all blocks are branches, particularly because for old stable/confirmed blocks we may not have the whole State anymore.
Add query for current tip (this exists already, but to return Branch).
Add query for all tips (or candidate tips).
Move queries to Branch: all_blocks (paginated block history), transactions_by_address, blocks per epoch (maybe just as a filter in all_blocks?)
Change Transaction::block to Transaction::blocks (in graphql, rust syntax is just illustrative)
Add Block::branches to kwow which branches is it in, and by having the chain_length of the tips, an idea of how confirmed it is.
Change block by chain length query to return a list of blocks when needed.
Move branch dependent methods to State, so the ExplorerDB can be used like get_branch(hash) or get_main_branch(hash). Also, just in case, we need to make sure to keep the Ref alive during the query, although it would only have strange behavior in edge cases anyway.
#2801 was getting too large/ambitious, so I'm closing it and organizing things a bit more in a few PR's and here.
Motivation
Have the explorer API reflect the multiverse better. This requires keeping track of active branches, be able to search for things in multiple branches, and I'd say adding garbage collection because it also affects the API a bit, among other things.
Plans
In GraphQL API
Branch
graphql type. A Branch is identified by aBlock
hash, but not all blocks are branches, particularly because for old stable/confirmed blocks we may not have the whole State anymore.Branch
).Transaction::block
toTransaction::blocks
(in graphql, rust syntax is just illustrative)Block::branches
to kwow which branches is it in, and by having the chain_length of the tips, an idea of how confirmed it is.Block::is_confirmed
(Explorer add gc and confirmed block notion #2962)In explorer backend
State
, so theExplorerDB
can be used likeget_branch(hash)
orget_main_branch(hash)
. Also, just in case, we need to make sure to keep theRef
alive during the query, although it would only have strange behavior in edge cases anyway.PR's
Explorer add gc and confirmed block notion #2962
The text was updated successfully, but these errors were encountered: