[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10529":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},10529,"bsc","bnb-chain\u002Fbsc","bnb-chain","A BNB Smart Chain client based on the go-ethereum fork","",null,"Go",3258,1793,119,6,0,13,31.76,"GNU Lesser General Public License v3.0",false,"master",true,[24,25,26],"blockchain","bnb","ethereum","2026-06-12 02:02:23","## BNB Smart Chain\n\nThe goal of BNB Smart Chain is to bring programmability and interoperability to BNB Beacon Chain. In order to embrace the existing popular community and advanced technology, it will bring huge benefits by staying compatible with all the existing smart contracts on Ethereum and Ethereum tooling. And to achieve that, the easiest solution is to develop based on go-ethereum fork, as we respect the great work of Ethereum very much.\n\nBNB Smart Chain starts its development based on go-ethereum fork. So you may see many toolings, binaries and also docs are based on Ethereum ones, such as the name \"geth\".\n\n[![API Reference](\nhttps:\u002F\u002Fpkg.go.dev\u002Fbadge\u002Fgithub.com\u002Fethereum\u002Fgo-ethereum\n)](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fethereum\u002Fgo-ethereum?tab=doc)\n[![Build Test](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc\u002Factions\u002Fworkflows\u002Fbuild-test.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc\u002Factions)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdiscord-join%20chat-blue.svg)](https:\u002F\u002Fdiscord.gg\u002Fz2VpC455eU)\n\nBut from that baseline of EVM compatible, BNB Smart Chain introduces a system of 21 validators with Proof of Staked Authority (PoSA) consensus that can support short block time and lower fees. The most bonded validator candidates of staking will become validators and produce blocks. The double-sign detection and other slashing logic guarantee security, stability, and chain finality.\n\n**The BNB Smart Chain** will be:\n\n- **A self-sovereign blockchain**: Provides security and safety with elected validators.\n- **EVM-compatible**: Supports all the existing Ethereum tooling along with faster finality and cheaper transaction fees.\n- **Distributed with on-chain governance**: Proof of Staked Authority brings in decentralization and community participants. As the native token, BNB will serve as both the gas of smart contract execution and tokens for staking.\n\nMore details in [White Paper](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fwhitepaper\u002Fblob\u002Fmaster\u002FWHITEPAPER.md).\n\n## Release Types\nThere are three types of release, each with a clear purpose and version scheme:\n\n- **1.Stable Release**: production-ready builds for the vast majority of users.  Format: `v\u003CMajor>.\u003CMinor>.\u003CPatch>`, example: [v1.5.19](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Ftag\u002Fv1.5.19).\n- **2.Feature Release**: early access to a single feature without affecting the core product. Format: `v\u003CMajor>.\u003CMinor>.\u003CPatch>-feature-\u003CFeatureName>`, example: [v1.5.19-feature-SI](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Ftag\u002Fv1.5.19-feature-SI).\n- **3.Preview Release**: bleeding-edge builds for users who want the latest code. Format: `v\u003CMajor>.\u003CMinor>.\u003CPatch>-\u003CMeta>`, Meta values indicate maturity: alpha (experimental), beta (largely complete), rc (release candidate), example: [v1.5.0-alpha](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Ftag\u002Fv1.5.0-alpha).\n\n## Key features\n\n### Proof of Staked Authority \nAlthough Proof-of-Work (PoW) has been approved as a practical mechanism to implement a decentralized network, it is not friendly to the environment and also requires a large size of participants to maintain the security. \n\nProof-of-Authority(PoA) provides some defense to 51% attack, with improved efficiency and tolerance to certain levels of Byzantine players (malicious or hacked). \nMeanwhile, the PoA protocol is most criticized for being not as decentralized as PoW, as the validators, i.e. the nodes that take turns to produce blocks, have all the authorities and are prone to corruption and security attacks.\n\nOther blockchains, such as EOS and Cosmos both, introduce different types of Deputy Proof of Stake (DPoS) to allow the token holders to vote and elect the validator set. It increases the decentralization and favors community governance. \n\nTo combine DPoS and PoA for consensus, BNB Smart Chain implement a novel consensus engine called Parlia that:\n\n1. Blocks are produced by a limited set of validators.\n2. Validators take turns to produce blocks in a PoA manner, similar to Ethereum's Clique consensus engine.\n3. Validator set are elected in and out based on a staking based governance on BNB Smart Chain.\n4. Parlia consensus engine will interact with a set of [system contracts](https:\u002F\u002Fdocs.bnbchain.org\u002Fbnb-smart-chain\u002Fstaking\u002Foverview\u002F#system-contracts) to achieve liveness slash, revenue distributing and validator set renewing func.\n\n## Native Token\n\nBNB will run on BNB Smart Chain in the same way as ETH runs on Ethereum so that it remains as `native token` for BSC. This means,\nBNB will be used to:\n\n1. pay `gas` to deploy or invoke Smart Contract on BSC\n\n## Building the source\n\nMany of the below are the same as or similar to go-ethereum.\n\nFor prerequisites and detailed build instructions please read the [Installation Instructions](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Fgetting-started\u002Finstalling-geth).\n\nBuilding `geth` requires both a Go (version 1.24 or later) and a C compiler (GCC 5 or higher). You can install\nthem using your favourite package manager. Once the dependencies are installed, run\n\n```shell\nmake geth\n```\n\nor, to build the full suite of utilities:\n\n```shell\nmake all\n```\n\nIf you get such error when running the node with self built binary:\n```shell\nCaught SIGILL in blst_cgo_init, consult \u003Cblst>\u002Fbindinds\u002Fgo\u002FREADME.md.\n```\nplease try to add the following environment variables and build again:\n```shell\nexport CGO_CFLAGS=\"-O -D__BLST_PORTABLE__\" \nexport CGO_CFLAGS_ALLOW=\"-O -D__BLST_PORTABLE__\"\n```\n\n## Executables\n\nThe bsc project comes with several wrappers\u002Fexecutables found in the `cmd`\ndirectory.\n\n|  Command   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n| :--------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`geth`** | Main BNB Smart Chain client binary. It is the entry point into the BSC network (main-, test- or private net), capable of running as a full node (default), archive node (retaining all historical state) or a light node (retrieving data live). It has the same and more RPC and other interface as go-ethereum and can be used by other processes as a gateway into the BSC network via JSON RPC endpoints exposed on top of HTTP, WebSocket and\u002For IPC transports. `geth --help` and the [CLI page](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Finterface\u002Fcommand-line-options) for command line options. |\n|   `clef`   | Stand-alone signing tool, which can be used as a backend signer for `geth`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |\n|  `devp2p`  | Utilities to interact with nodes on the networking layer, without running a full blockchain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n|  `abigen`  | Source code generator to convert Ethereum contract definitions into easy to use, compile-time type-safe Go packages. It operates on plain [Ethereum contract ABIs](https:\u002F\u002Fdocs.soliditylang.org\u002Fen\u002Fdevelop\u002Fabi-spec.html) with expanded functionality if the contract bytecode is also available. However, it also accepts Solidity source files, making development much more streamlined. Please see our [Native DApps](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Fdapp\u002Fnative-bindings) page for details.                                                                                               |\n| `bootnode` | Stripped down version of our Ethereum client implementation that only takes part in the network node discovery protocol, but does not run any of the higher level application protocols. It can be used as a lightweight bootstrap node to aid in finding peers in private networks.                                                                                                                                                                                                                                                                                                            |\n|   `evm`    | Developer utility version of the EVM (Ethereum Virtual Machine) that is capable of running bytecode snippets within a configurable environment and execution mode. Its purpose is to allow isolated, fine-grained debugging of EVM opcodes (e.g. `evm --code 60ff60ff --debug run`).                                                                                                                                                                                                                                                                                                            |\n| `rlpdump`  | Developer utility tool to convert binary RLP ([Recursive Length Prefix](https:\u002F\u002Fethereum.org\u002Fen\u002Fdevelopers\u002Fdocs\u002Fdata-structures-and-encoding\u002Frlp)) dumps (data encoding used by the Ethereum protocol both network as well as consensus wise) to user-friendlier hierarchical representation (e.g. `rlpdump --hex CE0183FFFFFFC4C304050583616263`).                                                                                                                                                                                                                                                                                 |\n\n## Running `geth`\n\nGoing through all the possible command line flags is out of scope here (please consult our\n[CLI Wiki page](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Ffundamentals\u002Fcommand-line-options)),\nbut we've enumerated a few common parameter combos to get you up to speed quickly\non how you can run your own `geth` instance.\n\n### Hardware Requirements\n\nThe hardware must meet certain requirements to run a full node on mainnet:\n- VPS running recent versions of Mac OS X, Linux, or Windows.\n- IMPORTANT 3 TB(Dec 2023) of free disk space, solid-state drive(SSD), gp3, 8k IOPS, 500 MB\u002FS throughput, read latency \u003C1ms. (if node is started with snap sync, it will need NVMe SSD)\n- 16 cores of CPU and 64 GB of memory (RAM)\n- Suggest m5zn.6xlarge or r7iz.4xlarge instance type on AWS, c2-standard-16 on Google cloud.\n- A broadband Internet connection with upload\u002Fdownload speeds of 5 MB\u002FS\n\nThe requirement for testnet:\n- VPS running recent versions of Mac OS X, Linux, or Windows.\n- 500G of storage for testnet.\n- 4 cores of CPU and 16 gigabytes of memory (RAM).\n\n### Steps to Run a Fullnode\n\n#### 1. Download the pre-build binaries\n```shell\n# Linux\nwget $(curl -s https:\u002F\u002Fapi.github.com\u002Frepos\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Flatest |grep browser_ |grep geth_linux |cut -d\\\" -f4)\nmv geth_linux geth\nchmod -v u+x geth\n\n# MacOS\nwget $(curl -s https:\u002F\u002Fapi.github.com\u002Frepos\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Flatest |grep browser_ |grep geth_mac |cut -d\\\" -f4)\nmv geth_macos geth\nchmod -v u+x geth\n```\n\n#### 2. Download the config files\n```shell\n\u002F\u002F== mainnet\nwget $(curl -s https:\u002F\u002Fapi.github.com\u002Frepos\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Flatest |grep browser_ |grep mainnet |cut -d\\\" -f4)\nunzip mainnet.zip\n\n\u002F\u002F== testnet\nwget $(curl -s https:\u002F\u002Fapi.github.com\u002Frepos\u002Fbnb-chain\u002Fbsc\u002Freleases\u002Flatest |grep browser_ |grep testnet |cut -d\\\" -f4)\nunzip testnet.zip\n```\n\n#### 3. Download snapshot\nDownload latest chaindata snapshot from [here](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fbsc-snapshots). Follow the guide to structure your files.\n\n#### 4. Start a full node\n```shell\n## It will run with Path-Base Storage Scheme by default and enable inline state prune, keeping the latest 600000 blocks' history state.\n.\u002Fgeth --config .\u002Fconfig.toml --datadir .\u002Fnode  --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0\n\n## It is recommend to run fullnode with `--tries-verify-mode none` if you want high performance and care little about state consistency.\n.\u002Fgeth --config .\u002Fconfig.toml --datadir .\u002Fnode  --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --tries-verify-mode none\n```\n\n#### 5. Monitor node status\n\nMonitor the log from **.\u002Fnode\u002Fbsc.log** by default. When the node has started syncing, should be able to see the following output:\n```shell\nt=2022-09-08T13:00:27+0000 lvl=info msg=\"Imported new chain segment\"             blocks=1    txs=177   mgas=17.317   elapsed=31.131ms    mgasps=556.259  number=21,153,429 hash=0x42e6b54ba7106387f0650defc62c9ace3160b427702dab7bd1c5abb83a32d8db dirty=\"0.00 B\"\nt=2022-09-08T13:00:29+0000 lvl=info msg=\"Imported new chain segment\"             blocks=1    txs=251   mgas=39.638   elapsed=68.827ms    mgasps=575.900  number=21,153,430 hash=0xa3397b273b31b013e43487689782f20c03f47525b4cd4107c1715af45a88796e dirty=\"0.00 B\"\nt=2022-09-08T13:00:33+0000 lvl=info msg=\"Imported new chain segment\"             blocks=1    txs=197   mgas=19.364   elapsed=34.663ms    mgasps=558.632  number=21,153,431 hash=0x0c7872b698f28cb5c36a8a3e1e315b1d31bda6109b15467a9735a12380e2ad14 dirty=\"0.00 B\"\n```\n\n#### 6. Interact with fullnode\nStart up `geth`'s built-in interactive [JavaScript console](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Finterface\u002Fjavascript-console),\n(via the trailing `console` subcommand) through which you can interact using [`web3` methods](https:\u002F\u002Fweb3js.readthedocs.io\u002Fen\u002F) \n(note: the `web3` version bundled within `geth` is very old, and not up to date with official docs),\nas well as `geth`'s own [management APIs](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Frpc\u002Fserver).\nThis tool is optional and if you leave it out you can always attach to an already running\n`geth` instance with `geth attach`.\n\n#### 7. More\n\nMore details about [running a node](https:\u002F\u002Fdocs.bnbchain.org\u002Fbnb-smart-chain\u002Fdevelopers\u002Fnode_operators\u002Ffull_node\u002F) and [becoming a validator](https:\u002F\u002Fdocs.bnbchain.org\u002Fbnb-smart-chain\u002Fvalidator\u002Fcreate-val\u002F)\n\n*Note: Although some internal protective measures prevent transactions from\ncrossing over between the main network and test network, you should always\nuse separate accounts for play and real money. Unless you manually move\naccounts, `geth` will by default correctly separate the two networks and will not make any\naccounts available between them.*\n\n### Configuration\n\nAs an alternative to passing the numerous flags to the `geth` binary, you can also pass a\nconfiguration file via:\n\n```shell\n$ geth --config \u002Fpath\u002Fto\u002Fyour_config.toml\n```\n\nTo get an idea of how the file should look like you can use the `dumpconfig` subcommand to\nexport your existing configuration:\n\n```shell\n$ geth --your-favourite-flags dumpconfig\n```\n\n### Programmatically interfacing `geth` nodes\n\nAs a developer, sooner rather than later you'll want to start interacting with `geth` and the\nBSC network via your own programs and not manually through the console. To aid\nthis, `geth` has built-in support for a JSON-RPC based APIs ([standard APIs](https:\u002F\u002Fethereum.org\u002Fen\u002Fdevelopers\u002Fdocs\u002Fapis\u002Fjson-rpc\u002F),\n[`geth` specific APIs](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Finteracting-with-geth\u002Frpc), and [BSC's JSON-RPC API Reference](rpc\u002Fjson-rpc-api.md)).\nThese can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based\nplatforms, and named pipes on Windows).\n\nThe IPC interface is enabled by default and exposes all the APIs supported by `geth`,\nwhereas the HTTP and WS interfaces need to manually be enabled and only expose a\nsubset of APIs due to security reasons. These can be turned on\u002Foff and configured as\nyou'd expect.\n\nHTTP based JSON-RPC API options:\n\n  * `--http` Enable the HTTP-RPC server\n  * `--http.addr` HTTP-RPC server listening interface (default: `localhost`)\n  * `--http.port` HTTP-RPC server listening port (default: `8545`)\n  * `--http.api` API's offered over the HTTP-RPC interface (default: `eth,net,web3`)\n  * `--http.corsdomain` Comma separated list of domains from which to accept cross-origin requests (browser enforced)\n  * `--ws` Enable the WS-RPC server\n  * `--ws.addr` WS-RPC server listening interface (default: `localhost`)\n  * `--ws.port` WS-RPC server listening port (default: `8546`)\n  * `--ws.api` API's offered over the WS-RPC interface (default: `eth,net,web3`)\n  * `--ws.origins` Origins from which to accept WebSocket requests\n  * `--ipcdisable` Disable the IPC-RPC server\n  * `--ipcpath` Filename for IPC socket\u002Fpipe within the datadir (explicit paths escape it)\n\nYou'll need to use your own programming environments' capabilities (libraries, tools, etc) to\nconnect via HTTP, WS or IPC to a `geth` node configured with the above flags and you'll\nneed to speak [JSON-RPC](https:\u002F\u002Fwww.jsonrpc.org\u002Fspecification) on all transports. You\ncan reuse the same connection for multiple requests!\n\n**Note: Please understand the security implications of opening up an HTTP\u002FWS based\ntransport before doing so! Hackers on the internet are actively trying to subvert\nBSC nodes with exposed APIs! Further, all browser tabs can access locally\nrunning web servers, so malicious web pages could try to subvert locally available\nAPIs!**\n\n### Operating a private network\n- [BSC-Deploy](https:\u002F\u002Fgithub.com\u002Fbnb-chain\u002Fnode-deploy\u002F): deploy tool for setting up BNB Smart Chain.\n\n## Running a bootnode\n\nBootnodes are super-lightweight nodes that are not behind a NAT and are running just discovery protocol. When you start up a node it should log your enode, which is a public identifier that others can use to connect to your node. \n\nFirst the bootnode requires a key, which can be created with the following command, which will save a key to boot.key:\n\n```\nbootnode -genkey boot.key\n```\n\nThis key can then be used to generate a bootnode as follows:\n\n```\nbootnode -nodekey boot.key -addr :30311 -network bsc\n```\n\nThe choice of port passed to -addr is arbitrary. \nThe bootnode command returns the following logs to the terminal, confirming that it is running:\n\n```\nenode:\u002F\u002F3063d1c9e1b824cfbb7c7b6abafa34faec6bb4e7e06941d218d760acdd7963b274278c5c3e63914bd6d1b58504c59ec5522c56f883baceb8538674b92da48a96@127.0.0.1:0?discport=30311\nNote: you're using cmd\u002Fbootnode, a developer tool.\nWe recommend using a regular node as bootstrap node for production deployments.\nINFO [08-21|11:11:30.687] New local node record                    seq=1,692,616,290,684 id=2c9af1742f8f85ce ip=\u003Cnil> udp=0 tcp=0\nINFO [08-21|12:11:30.753] New local node record                    seq=1,692,616,290,685 id=2c9af1742f8f85ce ip=54.217.128.118 udp=30311 tcp=0\nINFO [09-01|02:46:26.234] New local node record                    seq=1,692,616,290,686 id=2c9af1742f8f85ce ip=34.250.32.100  udp=30311 tcp=0\n```\n\n## Contribution\n\nThank you for considering helping out with the source code! We welcome contributions\nfrom anyone on the internet, and are grateful for even the smallest of fixes!\n\nIf you'd like to contribute to bsc, please fork, fix, commit and send a pull request\nfor the maintainers to review and merge into the main code base. If you wish to submit\nmore complex changes though, please check up with the core devs first on [our discord channel](https:\u002F\u002Fdiscord.gg\u002Fbnbchain)\nto ensure those changes are in line with the general philosophy of the project and\u002For get\nsome early feedback which can make both your efforts much lighter as well as our review\nand merge procedures quick and simple.\n\nPlease make sure your contributions adhere to our coding guidelines:\n\n * Code must adhere to the official Go [formatting](https:\u002F\u002Fgolang.org\u002Fdoc\u002Feffective_go.html#formatting)\n   guidelines (i.e. uses [gofmt](https:\u002F\u002Fgolang.org\u002Fcmd\u002Fgofmt\u002F)).\n * Code must be documented adhering to the official Go [commentary](https:\u002F\u002Fgolang.org\u002Fdoc\u002Feffective_go.html#commentary)\n   guidelines.\n * Pull requests need to be based on and opened against the `master` branch.\n * Commit messages should be prefixed with the package(s) they modify.\n   * E.g. \"eth, rpc: make trace configs optional\"\n\nPlease see the [Developers' Guide](https:\u002F\u002Fgeth.ethereum.org\u002Fdocs\u002Fdevelopers\u002Fgeth-developer\u002Fdev-guide)\nfor more details on configuring your environment, managing project dependencies, and\ntesting procedures.\n\n## License\n\nThe bsc library (i.e. all code outside of the `cmd` directory) is licensed under the\n[GNU Lesser General Public License v3.0](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.en.html),\nalso included in our repository in the `COPYING.LESSER` file.\n\nThe bsc binaries (i.e. all code inside of the `cmd` directory) is licensed under the\n[GNU General Public License v3.0](https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Fgpl-3.0.en.html), also\nincluded in our repository in the `COPYING` file.\n","BNB Smart Chain 是一个基于 go-ethereum 分支的智能合约平台，旨在为 BNB Beacon Chain 带来可编程性和互操作性。该项目通过兼容以太坊上的所有现有智能合约和工具，实现了快速开发和社区接受度提升。其核心技术特点包括采用权益证明权威共识机制（PoSA），由21个验证者组成的系统支持较短的区块时间和更低的交易费用，同时确保了链的安全性和最终性。BNB Smart Chain 适合需要高性能、低成本区块链解决方案的应用场景，如去中心化金融（DeFi）应用、游戏及更多需要高效处理交易的环境。此外，项目还提供多种版本发布类型，满足不同用户需求。",2,"2026-06-11 03:29:01","top_topic"]