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

Auto refresh when block mined #37

Closed
limebell opened this issue Oct 8, 2019 · 18 comments
Closed

Auto refresh when block mined #37

limebell opened this issue Oct 8, 2019 · 18 comments
Assignees
Labels
hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed

Comments

@limebell
Copy link
Member

limebell commented Oct 8, 2019

It will be great if the main block page is auto refreshed when new block is mined or the chain is swapped.

@limebell limebell added hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed labels Oct 8, 2019
@MaxStalker
Copy link
Contributor

@limebell I would like to help you with this one :)

@MaxStalker
Copy link
Contributor

Stumbled into some road blocks here.
Apparently GraphQL API at http://52.231.65.77:5000/graphql/ is not responding.
Wanted to run my own locally, but that one requires BLOCKCHAIN_STORE_PATH - can you tell me what I shall put there?

@dahlia
Copy link
Contributor

dahlia commented Oct 18, 2019

@MaxStalker Please try this dummy data: https://send.firefox.com/download/2c48e7b706539261/#A3tl2924DprWW68LhDrtoA. It's dumped from my local node.

@MaxStalker
Copy link
Contributor

I would really appreciate if you can bring up public graphql endpoint 🙇‍♂️
I've encountered several issues with running local version of explorer, unfortunately 😟

@longfin
Copy link
Member

longfin commented Oct 18, 2019

I would really appreciate if you can bring up public graphql endpoint 🙇‍♂️

@MaxStalker I'll launch public graphql endpoint. please wait for minutes.

@longfin
Copy link
Member

longfin commented Oct 18, 2019

I would really appreciate if you can bring up public graphql endpoint 🙇‍♂️

@MaxStalker I'll launch public graphql endpoint. please wait for minutes.

@MaxStalker Please try this endpoint.

http://52.231.74.24:31235/graphql

@MaxStalker
Copy link
Contributor

Thank you @longfin!
This works perfectly ^__^

@MaxStalker
Copy link
Contributor

After I've read through the code I have a feeling that issue is missing some critical points in description :)

  • how one can check that new block was mined? Shall I setup polling and check if there are new blocks in response and then update the view? Or it's possible to setup subscriptions to specific event?
  • "when the chain is swapped" - is this specific event or? How one can observe it?

@limebell
Copy link
Member Author

After I've read through the code I have a feeling that issue is missing some critical points in description :)

  • how one can check that new block was mined? Shall I setup polling and check if there are new blocks in response and then update the view? Or it's possible to setup subscriptions to specific event?
  • "when the chain is swapped" - is this specific event or? How one can observe it?

@MaxStalker Sorry for late reply. Here's additional description for this issue.

  • Currently, polling should be set because explorer does not have any event for it.
  • If chain is swapped or new block is appened, blockchain's tip will be changed. So by observing blockchain's tip (tip is a blockchain's latest block), u can resolve this issue ;)

@dahlia
Copy link
Contributor

dahlia commented Oct 21, 2019

At present, the easiest way to implement this would be setting up polling IMO? Or we could declare a subscription at GraphQL level, but this needs to change code on libplanet-explorer (which is a .NET project).

@MaxStalker
Copy link
Contributor

Roger.
Next one would be - is it possible to speed up block mining? Last one was mined 4 days ago, which a bit hard to track and check that UI updates correctly :)
Same for chain swap - any way to test it?

@limebell
Copy link
Member Author

Sorry for inconvenience. Now block explorer is offline and using static blockchain file. We will gonna make it work online, server will be turned off for while 😥

@MaxStalker
Copy link
Contributor

Got it.
I think I can mock the response to check that UI is updated properly and then will wait for news from your side ;)

@limebell
Copy link
Member Author

Currently working on explorer, fixed some problems, still suffering on multiple issues :(

We will do our best and notify you as soon as explorer is online.

@limebell
Copy link
Member Author

@MaxStalker Explorer is now online :)

@MaxStalker
Copy link
Contributor

@longfin @limebell Can you bring that GraphQL api back online? :)
Can't reach it now :\

@longfin
Copy link
Member

longfin commented Oct 24, 2019

@longfin @limebell Can you bring that GraphQL api back online? :)
Can't reach it now :\

@MaxStalker I restarted API backend now. please check again.

longfin added a commit that referenced this issue Oct 26, 2019
@limebell
Copy link
Member Author

Closed by #43.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants