Giter VIP home page Giter VIP logo

grin-explorer's Introduction

Grin-Explorer

Grin-Explorer is the first block explorer for the Grin blockchain. This is the source code for the instance running at https://grinexplorer.net.

I hope it provides a useful service for anybody interested in Grin and to its development.

Bugs, Feature Requests, etc.

Please report bugs, feature requests or feedback here or ping me (@hendi) on Gitter.

License

grin-explorer is licensed under the terms of the GNU AGPL 3, see the file LICENSE for details. Basically it allows you to use and modify this code as long as you make all changes available under the same terms. The easiest way to do this is to fork this repo (publically!) and deploy your instance from that repo.p

How to setup your own instance

Requirements

Python >= 3.5 and PostgreSQL >= 9.3 are required.

Grin is required to run as an archival node and basic auth needs to be disabled in its REST API. Set `archive_mode = true` and comment out `api_secret_path` in `grin-server.toml` respectively.

Installation

Start PostgreSQL. Note that the following is just an example to run PostgreSQL, you should ensure you use your own user and credentials when setting it up.

sudo postgresql-setup --initdb
sudo systemctl start postgresql
sudo -u postgres -i
# psql
postgres=# \password postgres
Enter new password:
Enter it again:
postgres=# CREATE USER myuser WITH PASSWORD 'mypass';
postgres=# CREATE DATABASE mydb;
postgres=# GRANT ALL PRIVILEGES ON DATABASE mydb to myuser;
postgres=# \q
sudo systemctl restart postgresql

Start `grin-explorer`. Again, ensure you use your own credentials for Django.

git clone https://github.com/mimblewimble/grin-explorer
cd grin-explorer
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# SECRET_KEY is required by Django
export SECRET_KEY=somesecretkey
# PostgreSQL configuration
export DB_NAME=mydb
export DB_USER=myuser
export DB_PASSWORD=mypass
export DB_HOST=127.0.0.1
export DB_PORT=5432
python3 ./grinexplorer/manage.py migrate
python3 ./grinexplorer/manage.py runserver

Import blockchain

python3 ./grinexplorer/manage.py import_from_tip http://127.0.0.1:13413

grin-explorer's People

Contributors

hendi avatar quentinlesceller avatar garyyu avatar 0xmichalis avatar xiaojay avatar 0xb100d avatar ignopeverell avatar

Watchers

 avatar James Cloos avatar  avatar

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.