尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证a Bitcoin SV Block Explorer
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Bitblocks is a Phoenix/Elixir application that syncs Bitcoin SV blockchain data from a Bitcoin SV node and provides a web interface to explore blocks and transactions. It connects to a BSV node via RPC, stores blockchain data in PostgreSQL, and serves it through Phoenix LiveView.
Clone the repository
git clone https://github.com/afomi/bitblocks.git
cd bitblocks
Install dependencies
mix deps.get
Configure your Bitcoin SV node connection
Set environment variables for your Bitcoin SV node:
export BITCOIN_NODE_URL=http://your-node-ip:8332
export BITCOIN_NODE_RPC_USERNAME=your_rpc_username
export BITCOIN_NODE_RPC_PASSWORD=your_rpc_password
export BITCOIN_NODE_RPC_URL=http://your-node-ip:8332
Setup the database
mix ecto.create
mix ecto.migrate
Install and build assets
mix assets.setup
mix assets.build
Start the Phoenix server:
mix phx.server
Or start it inside IEx (Interactive Elixir) for debugging and manual operations:
iex -S mix phx.server
Visit http://localhost:4000 to view the web interface.
Note: The web interface includes a sync dashboard at http://localhost:4000/sync for managing blockchain synchronization through the UI.
Use IEx to sync blockchain data from your Bitcoin SV node:
# Start the server with IEx
iex -S mix phx.server
# Sync blocks 0-1000
Bitblocks.Sync.get_blocks(0..1000)
# Sync a specific range
Bitblocks.Sync.get_blocks(100_000..200_000)
# Get full transaction data for a specific block
Bitblocks.Sync.get(100)
The sync process works in two stages:
get_blocks/1 - Fetches block metadata and transaction IDsget/1 - Fetches full raw transaction data for each transaction in the blockOnce synced, you can browse the data:
http://localhost:4000/statushttp://localhost:4000/blockshttp://localhost:4000/blocks/:height_or_hashhttp://localhost:4000/transactionshttp://localhost:4000/transactions/:txidmix ecto.create # Create database
mix ecto.migrate # Run migrations
mix ecto.reset # Drop, recreate, and migrate database
# Run all tests (excluding accessibility tests that require ChromeDriver)
mix test
# Run accessibility tests (requires ChromeDriver)
mix test --only accessibility_axe
# Run with visible browser for debugging
HEADLESS=false mix test --only accessibility_axe
Accessibility Testing Requirements:
brew install chromedriver (macOS)test/bitblocks_web/ACCESSIBILITY.md for full documentationmix assets.build # Build Tailwind CSS and esbuild
mix assets.deploy # Build and minify for production
The application requires access to a Bitcoin SV node with RPC enabled. Configure your node in bitcoin.conf:
server=1
rpcuser=your_username
rpcpassword=your_secure_password
rpcallowip=your_app_ip
BITCOIN_NODE_URL - Bitcoin SV node URL (e.g., http://localhost:8332)BITCOIN_NODE_RPC_USERNAME - RPC usernameBITCOIN_NODE_RPC_PASSWORD - RPC passwordBITCOIN_NODE_RPC_URL - RPC endpoint URL (usually same as BITCOIN_NODE_URL)Production runs on AWS. Deployment is automated via GitHub Actions — there is no manual deploy step.
On push to main or develop (.github/workflows/aws-deploy.yml):
bitblocks:<sha> and :latest), tagged in us-east-1.restart.yml, which rolls the running EC2 instances onto the new image.Required GitHub secrets: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY.
Runtime secrets (SECRET_KEY_BASE, DATABASE_URL, BITCOIN_NODE_*, PHX_HOST) are supplied to the running task via the AWS environment, read in config/runtime.exs.
For any deployment target, set:
SECRET_KEY_BASE (generate with mix phx.gen.secret)DATABASE_URL for your PostgreSQL instancePHX_HOST to your domainSee config/runtime.exs for production configuration details.
lib/bitcoinsv_cli.ex) - Bitcoin SV RPC client wrapperlib/bitblocks/sync.ex) - Blockchain synchronization logiclib/bitblocks/chain.ex) - Data context for blocks and transactionsFor detailed architecture documentation, see CLAUDE.md.
We welcome contributions! Please see CONTRIBUTING.md for details on how to get started.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with: