1
1
* Grin-Explorer
2
2
3
- Grin-Explorer is the first block explorer for the [[http ://grin-tech.org][Grin]]
3
+ Grin-Explorer is the first block explorer for the [[https ://grin-tech.org][Grin]]
4
4
blockchain. This is the source code for the instance running at
5
5
[[https://grinexplorer.net]].
6
6
7
- I hope it provides a useful service for anybody interested in grin and to its
8
- developers .
7
+ I hope it provides a useful service for anybody interested in Grin and to its
8
+ development .
9
9
10
10
** Bugs, Feature Requests, etc.
11
11
@@ -27,16 +27,50 @@ that repo.p
27
27
28
28
Python >= 3.5 and PostgreSQL >= 9.3 are required.
29
29
30
+ Grin is required to run as an archival node and basic auth needs to be disabled
31
+ in its REST API. Set `archive_mode = true` and comment out `api_secret_path` in
32
+ `grin-server.toml` respectively.
33
+
30
34
*** Installation
31
35
32
- - Clone this repo
33
- - ~cd grin-explorer~
34
- - ~python3 -m venv venv~
35
- - ~source venv/bin/activate~
36
- - ~pip install -r requirements~
37
- - ~cd grinexplorer~
38
- - ~./manage.py runserver~
36
+ Start PostgreSQL. Note that the following is just an example to run PostgreSQL,
37
+ you should ensure you use your own user and credentials when setting it up.
38
+ ```sh
39
+ sudo postgresql-setup --initdb
40
+ sudo systemctl start postgresql
41
+ sudo -u postgres -i
42
+ # psql
43
+ postgres=# \password postgres
44
+ Enter new password:
45
+ Enter it again:
46
+ postgres=# CREATE USER myuser WITH PASSWORD 'mypass';
47
+ postgres=# CREATE DATABASE mydb;
48
+ postgres=# GRANT ALL PRIVILEGES ON DATABASE mydb to myuser;
49
+ postgres=# \q
50
+ sudo systemctl restart postgresql
51
+ ```
52
+
53
+ Start `grin-explorer`. Again, ensure you use your own credentials for Django.
54
+ ```sh
55
+ git clone https://github.com/mimblewimble/grin-explorer
56
+ cd grin-explorer
57
+ python3 -m venv venv
58
+ source venv/bin/activate
59
+ pip install -r requirements.txt
60
+ # SECRET_KEY is required by Django
61
+ export SECRET_KEY=somesecretkey
62
+ # PostgreSQL configuration
63
+ export DB_NAME=mydb
64
+ export DB_USER=myuser
65
+ export DB_PASSWORD=mypass
66
+ export DB_HOST=127.0.0.1
67
+ export DB_PORT=5432
68
+ python3 ./grinexplorer/manage.py migrate
69
+ python3 ./grinexplorer/manage.py runserver
70
+ ```
39
71
40
72
*** Import blockchain
41
- - ~./manage.py import_from_tip http://127.0.0.1:13413~
73
+ ```sh
74
+ python3 ./grinexplorer/manage.py import_from_tip http://127.0.0.1:13413
75
+ ```
42
76
0 commit comments