codechain-io / codechain-explorer Goto Github PK
View Code? Open in Web Editor NEWBlock Explorer for CodeChain
Home Page: https://explorer.codechain.io/
License: Apache License 2.0
Block Explorer for CodeChain
Home Page: https://explorer.codechain.io/
License: Apache License 2.0
While using yarn 1.9.2, node v10.4.1.
OS: Ubuntu 18.04 LTS running above WSL(Windows System for Linux)
paik@DESKTOP-VRRAM6B:~/Workspace/codechain-explorer$ yarn install
yarn install v1.9.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[-----------------------------------------------------------------------------------------] 0/1293(node:6682) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "babel-core@6".
warning " > [email protected]" has unmet peer dependency "babel-runtime@^6.23.0".
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.14.3".
error An unexpected error occurred: "ENOENT: no such file or directory, copyfile '/home/paik/.cache/yarn/v1/npm-istanbul-reports-1.3.0-2f322e81e1d9520767597dca3c20a0cce89a3554/lib/json-summary/index.js' -> '/home/paik/Workspace/codechain-explorer/node_modules/istanbul-reports/lib/json-summary/index.js'".
The default limit is 1000
Show the node information such as version
and commitHash
.
Create a docker image containing a specific version of CodeChain, ElasticSearch, Explorer.
Remove the parcels container when it is empty
Add invoid field to below pages.
/tx/:hash
/parcel/:hash
1f5cfcbe6e61e22be0e392819353c2d05601c275f0abed83d11ec7f7704dd6c1
to
0x1f5cfcbe6e61e22be0e392819353c2d05601c275f0abed83d11ec7f7704dd6c1
The following URLs show the same genesis block.
/block/0
/block/00
/block/000
/block/0000
Accept only /block/00
as the canonical URL and reject other URLs.
Explain the role of client, server and worker respectively.
index.js:2178 Warning: Can't call setState (or forceUpdate) on an unmounted component.
This is a no-op, but it indicates a memory leak in your application.
To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Home (created by Route)
Move it production config file
Add link(sending to block page) to block number in parcel page
It's located in /parcel/:parcelHash page.
if (!block) {
return <RequestBlock id={id} onBlock={this.onBlock} onError={this.onError} />;
}
return ( /* Draw */ )
Currently, the above code is configured to draw nothing if there is no data. Draw in advance what we can draw even if we do not have data.
Request block, parcel, transaction dynamically according to pagination in each page.
The current Webpack configuration prevents importing modules from outside the client. So I copied the "db" folder inside the client. Delete the "db" folder by changing the Webpack settings accordingly.
Failed with error that index 'block' did not exist.
[0] [index_not_found_exception] no such index, with { resource.type="index_or_alias" & resource.id="block" & index_uuid="_na_" & index="block" } :: {"path":"/block/_doc/_search","query":{},"body":"{\"sort\":[{\"number\":{\"order\":\"desc\"}}],\"size\":1,\"query\":{\"bool\":{\"must\":{\"term\":{\"isRetracted\":false}}}}}","statusCode":404,"response":"{\"error\":{\"root_cause\":[{\"type\":\"index_not_found_exception\",\"reason\":\"no such index\",\"resource.type\":\"index_or_alias\",\"resource.id\":\"block\",\"index_uuid\":\"_na_\",\"index\":\"block\"}],\"type\":\"index_not_found_exception\",\"reason\":\"no such index\",\"resource.type\":\"index_or_alias\",\"resource.id\":\"block\",\"index_uuid\":\"_na_\",\"index\":\"block\"},\"status\":404}"}
[0] at respond (C:\Users\gk\Desktop\codechain-explorer\node_modules\elasticsearch\src\lib\transport.js:308:15)
[0] at checkRespForFailure (C:\Users\gk\Desktop\codechain-explorer\node_modules\elasticsearch\src\lib\transport.js:267:7)
[0] at HttpConnector.<anonymous> (C:\Users\gk\Desktop\codechain-explorer\node_modules\elasticsearch\src\lib\connectors\http.js:165:7)
[0] at IncomingMessage.wrapper (C:\Users\gk\Desktop\codechain-explorer\node_modules\lodash\lodash.js:4949:19)
[0] at emitNone (events.js:110:20)
[0] at IncomingMessage.emit (events.js:207:7)
[0] at endReadableNT (_stream_readable.js:1056:12)
[0] at _combinedTickCallback (internal/process/next_tick.js:138:11)
[0] at process._tickDomainCallback (internal/process/next_tick.js:218:9)
And when the index was manually created in the ES backend, failed with errors about absence of mapping, and then another index named 'transaction' so on...
These should be auto created on start, or please provider a script that can be run to setup the whole ES index and mappings.
Currently, searching transaction query returns hole block containing searching transaction. So we have to filter to get the specific transaction. Modify to use "inner hits" feature in elastic search. To use this feature, change the format of mapping field to nested type.
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-inner-hits.html
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.