Giter Site home page Giter Site logo

neptune-explorer's Introduction

neptune-explorer

A web-based block explorer for the Neptune blockchain. neptune-explorer provides a basic HTML view and a REST RPC API.

As of 2024-05-22 this code is running at https://explorer.neptune.cash.

Some design notes are available.

Installing

Compile from Source -- Linux Debian/Ubuntu

You may need to:

sudo apt install pkg-config libssl-dev

Then

git clone https://github.com/Neptune-Crypto/neptune-explorer.git
cd neptune-explorer
cargo install --locked --path .

Windows, Mac

not tested or supported. Please let us know if you get it work. patches accepted.

Running

  1. install neptune-core and start it, or otherwise find a running neptune-core instance.
  2. start neptune-explorer
nohup neptune-explorer 2>&1 > /path/to/logs/neptune-explorer.log &

Notes:

  • The block-explorer automatically uses the same network (mainnet, testnet, etc) as the neptune-core instance it is connected to, and the network is displayed in the web interface.
  • If neptune-core RPC server is running on a non-standard port, you can provide it with the --neptune-rpc-port flag.
  • neptune-explorer listens for http requests on port 3000 by default. This can be changed with the --listen-port flag.
  • Site name can be specified with the --site-name flag.

Connecting via Browser

Just navigate to http://localhost:3000/

SSL/TLS, Nginx, etc.

If hosting for public use, it is suggested to use nginx or similar in reverse-proxy mode to connect to http://localhost:3000. Nginx can then handle SSL/TLS certs and connections, as neptune-explorer has no built-in support for that.

Logging

All logging is output to standard out.

The log level can be set through the environment variable RUST_LOG. Valid values are: trace, debug, info, warn, and error. The default value is info. E.g.: RUST_LOG=trace cargo run.

neptune-explorer's People

Contributors

dan-da avatar

Stargazers

Jan Ferdinand Sauer avatar Thorkil Værge avatar

Watchers

 avatar Jan Ferdinand Sauer avatar  avatar Thorkil Værge avatar

neptune-explorer's Issues

feat: handle neptune-core disconnect

At present if neptune-core disconnects for any reason (eg restart) then tarpc returns RpcErr::ShutDown for every rpc call and there is never any attempt to reconnect or to notify an admin.

I think a good solution would be to start a watchdog task that monitors the RpcClient and periodically checks if it is connected or not. On any state change from connected to disconnected or vice versa the watchdog would send email notification to admin with the new state. When in disconnected state the watchdog would periodically try to reconnect.

A minor drawback of this approach is that in order for this to work the Arc must become mutable with some kind of lock for interior mutability. Probably an RwLock because only the watchdog task needs to mutate AppState. All the route handlers can remain read-only.

Also we will need to add an optional admin-email field to the Config.

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.