Giter VIP home page Giter VIP logo

block-explorer's Introduction

Kadena Block Explorer

Deployment Configs

To deploy the block explorer, use the deployment functionality from Obelisk. Alternatively, you can build locally with nix-build -A exe, run the makeLinks script to create appropriate symlinks, and then run with result/backend. Before deploying you may want to create some or all of the following configs:

Data Backends

The block explorer gets blockchain data from a node's p2p and service APIs as well as optionally getting more data from a chainweb-data server. This needs to be configured something like the following in config/frontend/data-backends:

{
  "mainnet01": {
    "p2p": "https://node.example.com:443",
    "service": "http://node.example.com:1848",
    "data": "http://chainweb-data.example.com:8000"
  },
  "testnet04": {
    "p2p": "https://testnet-node.example.com:443",
    "service": "http://testnet-node.example.com:1848",
    "data": "http://testnet-chainweb-data.example.com:8000"
  }
}

This object will be used to look up the server given the chainwebVersion that is being used by the node that the explorer is talking to.

Google Analytics

Put the Google Analytics tracking ID in config/frontend/tracking-id. If you don't want to enable the tracking ID, create an empty file with the following:

echo no-tracking > config/frontend/tracking-id

block-explorer's People

Contributors

alexfmpe avatar emmanueldenloye avatar enobayram avatar fosskers avatar ggobugi27 avatar jmininger avatar lindaortega avatar mightybyte avatar randynamic avatar ryantrinkle avatar sirlensalot avatar taylorrolfe avatar thanos420noscope avatar tomsmalley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

block-explorer's Issues

Explorer shows error writing to k:

I am getting this error in explorer when writing to chainweaver wallet from KD5 box through poolflare.
ERROR
An unexpected error occured when processing request key: k:b01c5a40355efb38596f4095db6038f7bc3d64d00ed6dafa08fc8c9b2fe6d418
Help us make our tools better by filing an issue with the below message at www.github.com/kadena-io/block-explorer :
"Error in $: Failed reading: not a valid json value"

Sequence of events:
In response to KIP0012.

Based on various recommendations I established a wallet on Chainweaver (Account Name: b01c5a40355efb38596f4095db6038f7bc3d64d00ed6dafa08fc8c9b2fe6d418) using the Chainweaver web access portal (chainweaver.kadena.network) and because of exchange irregularities (Kucoin & Zelcor)

As a test I configured the miner to mine to b01c5a40355efb38596f4095db6038f7bc3d64d00ed6dafa08fc8c9b2fe6d418@stratum+tcp//kda-us-ss.poolflare.com:443 the pool refused the connection.

So assuming that KIP0012 was fully implemented at the pool I switched the pool settings to k:b01c5a40355efb38596f4095db6038f7bc3d64d00ed6dafa08fc8c9b2fe6d418@stratum+tcp//kda-us-ss.poolflare.com:443 the miner connected.

There were two payouts from the miner and one manual transfer from Zelcore

TX_IDs : https://explorer.chainweb.com/mainnet/txsearch?q=k%3Ab01c5a40355efb38596f4095db6038f7bc3d64d00ed6dafa08fc8c9b2fe6d418

But i see no balance updates in chainweaver wallet.

Add forward and backward links between transactions and their continuations

Currently, there's (AFAIK) no way to go from a transaction to any of its continuation transactions.

It's easier to go from a continuation transaction back to its initial transaction as long as the continuation has succeeded, because that's when we show the Pact Id field in the Transaction Output, so one could copy-paste that id to the txdetail URL, but that's obviously not an ideal UX. It's even worse when the continuation has failed, because then we don't even display the Pact Id.

Here are some example links for convenience:

Ideally, in the txdetail page, the Code field of a continuation transaction wouldn't just say "Continuation", but it would rather say Continuation of <Pact Id> and it would be a link to the txdetail page of Pact Id. For convenience, it should also display the code of the initial transaction below that link (unless the initial is itself a continuation, in which case we could skip trying to display some code there).

Make internal links CTRL-clickable

Following a hyperlink with CTRL-click and CMD-click should open a new tab. This works fine on the block explorer's external links but not on internal links.

Add request key search box

User enters a request key, clicks search (or hits enter), and gets redirected to the new poll endpoint.

Negative with block times glitch

On Windows using Firefox browser, I ran into this glitch on testnet:
explorer-bug

I had switched tabs for a few minutes and when I came back, the times glitched out. Only seems to happen on testnet, haven't ran into this on mainnet. Has anyone else run into this before?

Edit: actually I did see it on mainnet, (maybe to a lesser extent?):
explorer-bug-mainnet

Implement height range selection in transfers view

#66 has introduced new block-explorer functionality that allows the user to filter the block height range displayed in the transfers view by manually adding the maxheight and minheight query parameters to the page URL. So the purpose of this ticket is to expose that functionality directly in the transfers view in the form of range pickers or the like.

Improve the block transactions view

Here's the transactions view for an example block containing a non-continuation transaction followed by two continuation transactions:

image

For the non-continuation transaction, we're displaying its code, while for the continuation transactions, we just display the request key of the initial transaction.

The goal of this ticket is to improve this view by making the following changes:

  • Instead of a list of drop down items that reveal the txdetails when clicked, display a brief (table-like) structured summary of each transaction with a link to each txdetail page.
  • (Expanding on "brief structured summary") For each transaction, display:
    • Its success/failure status
    • Its requestkey (as a link that points at the txdetail page).
    • (If it's a continuation) the request key of the initial transaction (as a link that points at the txdetail page).
    • Its code
      • For continuation transactions, the code of the initial transaction, unless the initial transaction is itself a continuation.

Builds broken in nix-build (Nix) 2.22.1

Upgraded from nix 2.16 and 2.18 to nix-build (Nix) 2.22.1. Builds are now broken in block-explorer.

root@mightybyte-sexy:/home/chainweb-explorer/block-explorer# nix-build -A exe
error: stack overflow (possible infinite recursion)

Issues during nix-build w/ aeson. Resolved (for me at least) with steps in issue.

Ran the nix-build -A exe

Ran into errors on /nix/store/4nhckqi5k6pncszwcgpgk6lh1b8acnb8-aeson-1.4.5.0.drv.

encodeToTextBuilder (Data/Aeson/Encode.hs:29) Warning: Data.Aeson.Types: could not find link destinations for: GToJSON CoerceText GetConName ConstructorNames SumFromString GFromJSON' withBoundedScientific Warning: Data.Aeson: could not find link destinations for: GToJSON CoerceText GetConName ConstructorNames SumFromString GFromJSON' withBoundedScientific Warning: Data.Aeson.TH: could not find link destinations for: JSONFun ToJSONFun Encoding sumToValue StarKindStatus opaqueSumToValue recordSumToValue Documentation created: dist/doc/html/aeson/index.html, dist/doc/html/aeson/aeson.txt installing Installing library in /nix/store/m4wa4zai1jy840l7fgcc68xf4whqn9fp-aeson-1.4.5.0/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/aeson-1.4.5.0-8jgeKLQhDRAASR5idYdkt0 Setup: Error: Could not find module: Data.Aeson with any suffix: ["dyn_hi"] in the search path: ["dist/build"] error: builder for '/nix/store/4nhckqi5k6pncszwcgpgk6lh1b8acnb8-aeson-1.4.5.0.drv' failed with exit code 1 error: 1 dependencies of derivation '/nix/store/gsr7wc189g92k3hcv6hhxalsdrnql0x9-common-0.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/pjinxa0c5mk1xnyhissiy7ns9r1fn058-constraints-extras-0.3.0.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/m0nx67w09clwzhr6ivla5x7y0pbrp0rn-hlint-2.2.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/4j37dglddyrb8avrcfpn4f7g8k2sny7s-http-conduit-2.3.7.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/0997z5f9z5vg36r3j0m9i2k8w1r1wvpp-http2-2.0.3.drv' failed to build error: 1 dependencies of derivation '/nix/store/hgnh0kdi1y3r0badpx7vz8qjgrh0mq34-jsaddle-0.9.7.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/bll0r2srn6jy6kwwx8q83ygbylrif5by-jsaddle-warp-0.9.7.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/fy023k544m3ycc170ldzz1690g6r4ksg-monoidal-containers-0.6.0.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/imrjdicp5cxdn912pm6q3wqgi7rrlw65-obelisk-route-0.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/pkqi88bqcisf54mlran47lbwyiy8rf7n-reflex-dom-core-0.6.1.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/x1rdkww0gnwk7ir8ck7w32yzya21hxbf-snap-1.1.2.0.drv' failed to build error: 1 dependencies of derivation '/nix/store/q3wmh2h17s2z18kllyz4rfmgvfgnxnn8-these-1.0.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/5qpxx394f5avdiarn1s636wq4bgnhij3-wai-extra-3.0.28.drv' failed to build error: 1 dependencies of derivation '/nix/store/r561qbaizf8dlr3gxh6fbzl6smgfnjv0-backend-0.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/m70may0rqzx00n83h052jl38y48s86ws-serverExe.drv' failed to build

Looks like something might have been missing on the cabal file.

Resolved via:

  1. sudo apt-get install cabal-install
  2. cd ~/mightbyteissexy/Source/block-explorer
  3. cabal update
  4. cabal install aeson
  5. nix-build -A exe

Block payload query failed

This block cant seem to be displayed and shows this error on the page:

Block payload query failed: Error in $.transactions[2][0]: Error in $.payload: parsing Exec failed, expected Object, but encountered Null

Deployment Documentation

I wanted to test deploy an instance of the block explorer.
Is there any documentation for deploying the block explorer ?

Transactions before June 2021

Transactions before June 2021 are not available on the explorer, nor are they available on estats to be pulled.

The explorer gives us this error:

https://explorer.chainweb.com/mainnet/tx/Ns0gRQU_q4lF0PSRWeHwbBAk2T-xciWjVger4WakKmk

An unexpected error occured when processing request key: Ns0gRQU_q4lF0PSRWeHwbBAk2T-xciWjVger4WakKmk
Help us make our tools better by filing an issue with the below message at www.github.com/kadena-io/block-explorer :
"Error in $['Ns0gRQU_q4lF0PSRWeHwbBAk2T-xciWjVger4WakKmk']: key "events" not present"

Better rendering for tx outputs

PactResult was previously defined in chainweb-api to be a sum Either Value Value, which was displayed by simply unwrapping the JSON values and doing some minimal parsing. What we'd want to do, now that PactResult is available from the pact library, is to fully render this data as a PactResult

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.