mimblewimble / grin-explorer

Blockchain explorer for grin
GNU Affero General Public License v3.0
59 stars 53 forks source link

Add more complete instructions on how to setup grin-explorer #30

Closed 0xmichalis closed 5 years ago

0xmichalis commented 5 years ago

@hendi

0xmichalis commented 5 years ago

Note that I still can't run a fully functional grin-explorer.

When hitting the local endpoint I get a 500: https://pastebin.com/XgwR7DWw

Also, when trying to load the grin blockchain: https://pastebin.com/AcgikaVt

hendi commented 5 years ago

Sorry for the very brief instructions :-)

The first 500 entry is likely due to the empty blockchain, it's easy to fix, I'll get to it.

The second one would also profit from a better error message. I assume its cause is that your grin-server hasn't archive_mode = true in its config file, and the import script crashes when it asks for an old block that doesn't exist on your node.

hendi commented 5 years ago

Can you please try the better-errors branch regarding the import error?

0xmichalis commented 5 years ago

Looks like an improved error message

$ python3 ./grinexplorer/manage.py import_from_tip http://127.0.0.1:13413
Decoding JSON failed (did you set `archive_mode=true` in grin-server.toml?
resp=''

but I still cannot make the explorer work even with an archive_mode=true node..

0xmichalis commented 5 years ago

Hrm, after a brief look at the code, it may be that the auth secret is not used for the request to grin?

0xmichalis commented 5 years ago

Hrm, after a brief look at the code, it may be that the auth secret is not used for the request to grin?

After uncommenting the secret from the server config I can successfully import the blockchain.

0xmichalis commented 5 years ago

After uncommenting the secret from the server config I can successfully import the blockchain.

Opened https://github.com/mimblewimble/grin-explorer/issues/32 - I am going to add documentation in this PR denoting that grin needs to run as an archival node and basic auth needs to be disabled currently in order for the explorer to work. Will ping you once I am done.

0xmichalis commented 5 years ago

Updated with instructions on how to setup Grin, also added notes to ensure folks use their own credentials when setting up both PostgreSQL and the explorer.

hendi commented 5 years ago

This is great, thank you very much!