尚未偵測到更新。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: