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

Additional chain navigation options #4

Open
jan-ferdinand opened this issue Dec 20, 2024 · 2 comments
Open

Additional chain navigation options #4

jan-ferdinand opened this issue Dec 20, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jan-ferdinand
Copy link
Member

Thanks to #2, we now have additional ways to explore the network. Naturally, that leads to the desire to explore the network in even more ways. 😃

From any given block, I would like to navigate to its parent block and, if it exists, its child block. This is distinct from the current options “previous block” and “next block” respectively because the parent (and potential child) of a non-canonical block is not necessarily canonical.

I realize that the UI is starting to get tricky should this option be included.

@jan-ferdinand jan-ferdinand added the enhancement New feature or request label Dec 20, 2024
@dan-da
Copy link
Collaborator

dan-da commented Dec 20, 2024

I was afraid to add the sibling blocks feature because I knew it could open this can of worms. hehe.

I already thought about navigating non canonical chains a bit. some observations:

  1. This has potential to confuse users. Most end-users are likely not even aware of non-canonical chains. (admittedly early adopters will tend to be)
  2. I don't believe this is usually done in block-explorers for other blockchains. Probably because of (1). If there are popular explorers out there with this feature, please let me know.
  3. Forward navigation between blocks is tricky because blocks only know their predecessor's digest. For the canonical chain, the forward html links work by linking to height+1, eg block 5 links to /block/height/6. It is easy to lookup the canonical block for height 6. However to lookup the next block for a non-canonical chain, we would need a new neptune-core API for that which would need both the height and current block digest. So then it would find all blocks for that height and compare if the parent digest matches input digest. This is doable, but afaik, the API does not exist.
  4. The BlockSelector (that converts heights and labels to digests) would need enhancement to support this usage.

In summary: it's a nice idea, and maybe we can support it eventually, but it will require additional neptune-core support, and it's also questionable if desirable for non developers.

@jan-ferdinand
Copy link
Member Author

Totally fair pushback. I agree that this functionality is most useful for devs, and probably only for them. My perspective is the dev perspective, of course. Perhaps the described feature is best left to an eventual network health monitor, where we could even visualize the chain and all its forks. That would greatly simplify navigation. Building up a local database of nodes and how they relate would probably step around the problems you describe as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants