Private chain 21 validators#131
Conversation
- set useLatestBscClinet to true to compile geth with latest geth on github - xargs -r to ignore error if no previous geth found
Add Dockerfile and environment setup for BSC cluster
- cause in local Pebble take too much of my storage space
- allow monitoring access from the host machine via Docker port forwarding.
…ics_access Feat/storage optimized and metrics access
* fix: prevent OOM kills by geth cache limit - Without this, geth implicitly bumps the default cache to 4096MB when treating the setup as mainnet, which instantly exhausts Docker's memory limit (~8GB) when spinning up a 4-node local cluster. * Add comments to clarify code logic * feat: new script for docker spin up - modify p2p address from localhost to use docker internal DNS name - only handle geth initialization, but not start the node * feat: implement dynamic compose generation - Introduce `NODE_TYPE` and `NODE_INDEX` environment variables to uniquely identify each container and correctly mount its respective data dir (`.local/nodeX`). * feat: add docker entrypoint for bsc cluster - Makefile for lifecycle - docker initialization script "node_entrypoint.sh" for booting geth based on node type (validator, sentry, fullnode) * fix: redirect geth logs to docker stdout forces Geth to output logs to standard output instead of local files, enabling docker's default logging driver to capture * feat: optimize geth build cache - Replaced `mv` with `cp` when extracting the compiled geth binary. prevent redundant rebuilds. - Removed unused `exit_previous` func - Add cluster-restart for fast restart without wiping blockchain data or trigger re-initialization. * docs: update readme with sequence diagram
…on flow (#5) Improves the BSC load test environment, including validator registration automation and protocol alignment. It ensures the BSC cluster can work smoothly with the load tester.
Add patch_for_private_chain() that pushes Plato/Luban to block 100M and disables post-Plato time-based forks for genesis. Required for private chains with more validators than the default 4-validator setup, where fast-finality (BEP-126) panics during reorg at parlia/snapshot.go:411 when DoubleSign forks occur at block 2 due to multi-validator startup race conditions on a WAN. Also sort validators by consensusAddr ascending in validators.template so genesis extraData matches Parlia's snapshot.validators() ordering (otherwise block 1 sealing fails with "unauthorized validator" because in-turn calculation uses sorted-ascending while extraData was unsorted). Replace forge install --no-git with direct git clone of forge-std, because forge install fails when the parent directory is itself a git repo (submodule path lookup fails for forge-std's ds-test). Toggle: DISABLE_FAST_FINALITY=true (default) applies the patches. Set DISABLE_FAST_FINALITY=false in .env to preserve upstream 4-validator behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request ReviewThis PR introduces a Docker-first workflow for running a local/private BSC cluster, adding new infrastructure files ( Sensitive ContentBlockchain Address:
Security Issues🔴 [CRITICAL] Unrestricted debug/telemetry exposure (pprof and metrics bound to 0.0.0.0)
🔴 [CRITICAL] Insecure RPC configuration enables dangerous account operations over network
Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
… fix The BNB Chain team confirmed the >9-validator fast-finality panic at consensus/parlia/snapshot.go:411 and pushed a fix to the 'skip-execution' branch on bnb-chain/bsc: https://github.com/bnb-chain/bsc/tree/skip-execution Add BSC_GETH_BRANCH env var (default 'master') to control which bsc branch prepare_bsc_client() builds. Use 'BSC_GETH_BRANCH=skip-execution' to pull the fix. Once that branch lands in master, this can be reverted to default. Also handle the case where /workspace/bsc/Makefile already exists (from a previous build) by fetching+checking out the requested branch instead of just running git pull on whatever branch was already checked out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request ReviewThis PR introduces a full Docker-based workflow for running a local multi-validator BSC cluster, including a new Sensitive ContentBlockchain Address:
Security Issues🔴 [CRITICAL] Unauthenticated debug and metrics endpoints exposed on all interfaces
🔴 [CRITICAL] Node HTTP/WS RPC exposed with insecure unlock settings
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
No description provided.