Skip to content

A little web based calcutor for running a "guess the next block nonce" game

License

Notifications You must be signed in to change notification settings

notmandatory/nonce_guess

Repository files navigation

Nonce Guess

Local Testing

Tools:

Install tailwindcss standalone-cli and make sure it's in your executables path, for example:

curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 ~/bin/tailwindcss
  1. Prettier plugin for tailwindcss (optional):
    npm install -D prettier prettier-plugin-tailwindcss

Build and Run:

  1. Set env variables, defaults are
    # if `NONCE_GUESS_DB_FILE` not set the data is stored in temporary file.
    export NONCE_GUESS_DB_FILE=/data/nonce_guess.redb
    export NONCE_GUESS_MEMPOOL_URL=/data/nonce_guess.redb
  2. Start the server, it will also serve the latest web client
    RUST_LOG=debug cargo run

Create Release Build

  1. Build the server binary, this will include the web artifacts
    cargo build --release

To run the resulting self-contained binary use RUST_LOG=debug target/release/ng_server.

In test or release mode the web client can be found at: http://localhost:8081/

Build Docker Container

  1. docker build -t nonce_guess .
  2. docker run -d --rm -it -p 8081:8081 -v nonce_vol:/data --name nonce_guess_app nonce_guess
  3. Visit http://localhost:8081/ in a browser

Note: on linux above steps also work with podman instead of docker.

About

A little web based calcutor for running a "guess the next block nonce" game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published