Appendix A: BlockScout Explorer
To use Blockscout explorer follow this repo: https://github.com/poanetwork/blockscout-terraform
On the bootnode for blockscout, add/replace the following sections in the node.toml file. Restart poa-parity.service
1
[rpc]
2
apis = ["web3","eth","net", "parity", "traces"]
3
processing_threads = 2
4
server_threads = 2
5
cors=["all"]
6
7
[footprint]
8
tracing = "on"
9
pruning = "archive"
10
fat_db = "on"
11
12
[websockets]
13
#max_connections = 1000
14
apis = ["web3","eth","net","parity", "pubsub", "traces"]
Copied!
Also, add the following section into the /etc/nginx/conf.d/default.conf file to enable websockets.
1
location /ws {
2
proxy_set_header Host localhost:8546;
3
proxy_set_header X-Real-IP $remote_addr;
4
proxy_set_header Content-Type application/json;
5
#add_header Access-Control-Allow-Origin "*";
6
#add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
7
8
if ($request_method = 'OPTIONS') {
9
add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
10
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
11
add_header Access-Control-Allow-Origin "*";
12
add_header Access-Control-Max-Age 600;
13
add_header Content-Type 'text/plain charset=UTF-8';
14
add_header Content-Length 0;
15
return 204;
16
}
17
proxy_pass http://localhost:8546;
18
proxy_read_timeout 3600s;
19
proxy_send_timeout 3600s;
20
proxy_http_version 1.1;
21
proxy_set_header Upgrade $http_upgrade;
22
proxy_set_header Connection "upgrade";
23
}
Copied!
When configuring blockscout, you need to assign a public domain name to this node (make sure 443 port is open), e.g. https://blockscout-node-trace-ws.nowhere and use it for blockscout configuration, along with wss://blockscout-node-trace-ws.nowhere/ws for web-sockets.
Last modified 1yr ago
Export as PDF
Copy link