polkascan / explorer-ui Goto Github PK
View Code? Open in Web Editor NEWPolkascan Explorer UI
License: GNU General Public License v3.0
Polkascan Explorer UI
License: GNU General Public License v3.0
Hello, can I run polkascan and its supporting services myself? Something like what polkascan.io provides: give it an account and it lists the TX history for example: https://polkascan.io/polkadot/account/16ZL8yLyXv3V3L3z9ofR1ovFLziyXaN1DPq4yffMAZ9czzBD I'd like to download and install such an explorer on my own infrastructure. And I don't necessarily need the UI, but only a REST API. I looked through the various repos here, but didn't find clear answers.
Is there an "indexer" component that polls a DOT node, populates a DB, and provides an API to clients needing information such as account TX history, current block chain height, account balances etc.?
Example: https://explorer-dev.polkascan.io/polkadot/account/16aG7XMZv96rpJj2vWcYwPWbHvNkF76Ge8mymxQmzqV7eunt
Caused by pagination?
The search bar should always be available, instead of showing it only on the dashboard as it is now. While typing, the search bar will show a preview with results for the user's search query.
USD Data-points per day give an unexpected result:
https://explorer-dev.polkascan.io/polkadot/account/16UUCv3zkncxucaYKF544rvHiJJpeCUChJ9D8M3VTGnwiEPn
I would expect something like Etherscan :
Other interesting accounts:
In case a websocket connection is slow or not available a new connection is trying to be created, but this happens too fast, resulting in a reconnect loop. This may overload the explorer api.
See for example this account:
https://explorer-dev.polkascan.io/polkadot/account/16hp43x8DUZtU8L3cJy9Z8JMwTzuu8ZZRWqDZnpMhp464oEd
It creates this query, which uses the blockLimit for the pageSize :
query { getEventsByAccount( filters: { accountId: "0xfc4d6069cb980fcde6ef73a46f1894d66c152e9ddfac3a499cf6a1654ff5f55b" }, pageSize: 500000, blockLimitOffset: 13053521 ) { objects { blockNumber, eventIdx, attributeName, accountId, attributes, pallet, eventName, blockDatetime, sortValue, extrinsicIdx }, pageInfo { pageSize, pageNext, pagePrev, blockLimitOffset, blockLimitCount } } }
Block detail does not update extrinsics and events list
When attempting to view Kusama session data for any session > 11260, the server returns the following CORS error: Cross Origin Resource Sharing error: MissingAllowOriginError
These URLs (for sessions > 11260) will trigger the CORs error
https://polkascan.io/kusama/session/session/11261
https://polkascan.io/kusama/session/session/11270
These URLs (for sessions <= 11260) work as expected
https://polkascan.io/kusama/session/session/11260
https://polkascan.io/kusama/session/session/11227
It seems on some browsers that there is no offline/online events being fired. Websockets are not being triggered to reconnect.
For details on the deliverables, see our proposal document.
I keep coming across an error building the dockerfile on an M1 Pro.
This was due to not being able to install chromium for arm64.
=> ERROR [polkascan/explorer-ui builder 4/24] RUN npm i 108.3s
------
> [polkascan/explorer-ui builder 4/24] RUN npm i:
#0 79.88 npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
#0 107.6 npm notice
#0 107.6 npm notice New minor version of npm available! 9.5.0 -> 9.6.0
#0 107.6 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.0>
#0 107.6 npm notice Run `npm install -g [email protected]` to update!
#0 107.6 npm notice
#0 107.6 npm ERR! code 1
#0 107.6 npm ERR! path /app/polkadapt/node_modules/puppeteer
#0 107.6 npm ERR! command failed
#0 107.6 npm ERR! command sh -c node install.js
#0 107.6 npm ERR! The chromium binary is not available for arm64.
#0 107.6 npm ERR! If you are on Ubuntu, you can install with:
#0 107.6 npm ERR!
#0 107.6 npm ERR! sudo apt install chromium
#0 107.6 npm ERR!
#0 107.6 npm ERR!
#0 107.6 npm ERR! sudo apt install chromium-browser
#0 107.6 npm ERR!
#0 107.6 npm ERR! ERROR: Failed to set up Chromium r1095492! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
#0 107.6 npm ERR! Error
#0 107.6 npm ERR! at handleArm64 (/app/polkadapt/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:137:11)
#0 107.6 npm ERR! at BrowserFetcher.download (/app/polkadapt/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:284:13)
#0 107.6 npm ERR! at async downloadBrowser (/app/polkadapt/node_modules/puppeteer/lib/cjs/puppeteer/node/install.js:61:5)
#0 107.6
#0 107.6 npm ERR! A complete log of this run can be found in:
#0 107.6 npm ERR! /root/.npm/_logs/2023-03-03T00_30_48_200Z-debug-0.log
See: https://stackoverflow.com/a/72291691/7101091
I was able to fix it using
diff --git a/explorer-ui/Dockerfile b/explorer-ui/Dockerfile
index 4a5c777..29afd6b 100644
--- a/explorer-ui/Dockerfile
+++ b/explorer-ui/Dockerfile
@@ -2,6 +2,12 @@
FROM node:lts as builder
+RUN apt update
+RUN apt install -y chromium
+
+# skips puppeteer installing chrome and points to correct binary
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
+
# The application depends on PolkADAPT, so we have to install and build PolkADAPT first.
WORKDIR /app/polkadapt
I have previous translation experience. I would like to discuss about it !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.