Fork Explorer let's you see the status of a BIP9-style softfork. It relies on bitcoind and its JSON-RPC server.
You need Deno to build and run this project.
Copy .env.template to .env, then configure the fork and bitcoind JSON-RPC
credentials. The .env file is ignored by Git and must stay server-side. On a
multi-user system, restrict it to the service account (for example,
chmod 600 .env).
For deployment-specific rich content, copy config/config.example.tsx to
config/config.tsx and edit the copy using Preact JSX. This is the default
content-module path; set SITE_CONFIG only to use a different path. The
instance file is ignored by Git and is for public page content only. Keep all
credentials in .env.
For development:
deno task devBuild and start for production:
deno task startdeno task start creates a production build and starts the server. To start an
existing build without rebuilding it, use deno task preview. The listening
address is configured with SERVER_HOST and SERVER_PORT in .env.
Configuration is read when the process starts. Restart fork-explorer after
changing .env.
Difficulty period is calculated as floor([any block in the period]/2016).
deno run --allow-net --allow-read --allow-write generate/index.ts [period number]
Once generated, the data is available via API call /blocks/[epoch number] or
[project root]/data/periods/[epoch].json. You can also display generated
periods on the site by going to Settings and changing the "Period" dropdown.
Follow the code style of the file you are working in.
This project uses Prettier for code formatting. To contribute, install and activate the Prettier extension to your editor of choice.
For commits, make descriptive and atomic git commits. You can prefix the page or relevant code you are working with, for example on a frontend change:
index: Add 90% indicator to Progress Bar
Or for the backend:
blocks: Make fakemode not depend on bitcoind
MIT
