- Introduction of Binance Smart Chain
- How to Run A Fullnode on Binance Smart Chain
- Fullnodes Functions
- Supported Platforms
- Minimum Requirements
- Fullnode
- Validator
- Suggested Requirements
- Fullnode
- Validator
- Settings
- Common Problems With Connectivity
- Chaindata Snapshot
- Sync Mode
- Steps to Run a Fullnode
- Binance Smart Chain
- What is Binance Smart Chain?
- Why is Binance Smart Chain designed as a separate chain from Binance Chain?
- How does Binance Smart Chain work? What is the architecture and consensus used?
- Can you tell more about Proof of Staked Authority(PoSA)? What is it?
- What are the benefits for developers to build on Binance Smart chain?
- What are the benefits for developers to build on Binance chain?
- How many assets are issued on Binance chain?
- What make Binance Smart Chain different?
- Binance Smart Chain is EVM-compatible. What does that mean?
- Can developers make hybrid Dapps using both Binance Chain and Binance Smart Chain in one single Dapp?
- How to query the current system parameters
- Binance Smart Chain Price Feeds from Chainlink
- Introduction to Price Feeds
- Get the Latest Price
- Get Historical Price Data
- API Reference
- Functions
- decimals
- getRoundData
- version
- Contract Addresses
- Binance Chain Documentation
- What are Binance Chain and Binance DEX?
- What is Binance Smart Chain?
- What can I do with Binance Chain?
- What can I do with Binance Smart Chain?
- Comparision Between BC and BSC
- BNB (and Other Coins) MainNet Switch
- BNB Staking
- Trading on Binance DEX
- Technology Details
Introduction of Binance Smart Chain
Binance Smart Chain is an innovative solution to bring programmability and interoperability to Binance Chain. Binance Smart Chain relies on 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.
The Binance Smart Chain also supports EVM-compatible smart contracts and protocols. Cross-chain transfer and other communication are possible due to native support of interoperability. Binance DEX remains a liquid venue of the exchange of assets on both chains. This dual-chain architecture will be ideal for users to take advantage of the fast trading on one side and build their decentralized apps on the other side. The Binance Smart Chain will be:
- A self-sovereign blockchain: Provides security and safety with elected validators.
- EVM-compatible: Supports all the existing Ethereum tooling along with faster finality and cheaper transaction fees.
- Interoperable: Comes with efficient native dual chain communication; Optimized for scaling high-performance dApps that require fast and smooth user experience.
- 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.
Источник
How to Run A Fullnode on Binance Smart Chain
Fullnodes Functions
- Stores the full blockchain history on disk and can answer the data request from the network.
- Receives and validates the new blocks and transactions.
- Verifies the states of every accounts.
Supported Platforms
We support running a full node on Mac OS X and Linux .
Minimum Requirements
The hardware must meet certain requirements to run a node.
Fullnode
- VPS running recent versions of Mac OS X or Linux.
- 1T GB of free disk space, solid-state drive(SSD).
- 8 cores of CPU and 16 gigabytes of memory (RAM).
- A broadband Internet connection with upload/download speeds of at least 1 megabyte per second
Validator
- VPS running recent versions of Mac OS X or Linux.
- 1T GB of free disk space, solid-state drive(SSD).
- 8 cores of CPU and 16 gigabytes of memory (RAM).
- A broadband Internet connection with upload/download speeds of at least 1 megabyte per second
Suggested Requirements
Fullnode
- VPS running recent versions of Mac OS X or Linux.
- 1T GB of free disk space, solid-state drive(SSD).
- 8 cores of CPU and 32 gigabytes of memory (RAM).
- A broadband Internet connection with upload/download speeds of 5 megabyte per second
Validator
- VPS running recent versions of Mac OS X or Linux.
- 2T GB of free disk space, solid-state drive(SSD).
- 8 cores of CPU and 32 gigabytes of memory (RAM)
- Suggest m5zn.2xlarge instance type on AWS, or c2-standard-8 on Google cloud.
- A broadband Internet connection with upload/download speeds of 10 megabyte per second
Settings
Common Problems With Connectivity
Sometimes you just can’t get synced. The most common reasons are as follows:
You have started geth without the discovery protocol, you can set the —nodiscover parameter to False . You only want this if you are running full node with fixed nodes.
Geth also supports a feature called static nodes if you have certain peers you always want to connect to. Static nodes are re-connected on disconnects. You can configure permanent static nodes by putting something like the following into /geth/static-nodes.json :
You can also add static nodes at runtime via the js console using admin.addPeer():
Geth supports trusted nodes that are always allowed to reconnect, even if the peer limit is reached. They can be added permanently via a config file /geth/trusted-nodes.json or temporary via RPC call.
Chaindata Snapshot
Please download the chain data snapshot and extract to your home folder to speed up
Sync Mode
The default sync mode. Synchronizes a full node doing a fast synchronization by downloading the entire state database, requesting the headers first, and filling in block bodies and receipts afterward. Once the fast sync reaches the best block of the Binance Smart Chain network, it switches to full sync mode.
Synchronizes a full node starting at genesis, verifying all blocks and executing all transactions. This mode is a bit slower than the fast sync mode but comes with increased security.
Steps to Run a Fullnode
1.Build from source code
Make sure that you have installed Go 1.13+ and have added GOPATH to PATH environment variable
or you can download the pre-build binaries from release page or follow the instructions below:
Источник
Binance Smart Chain
What is Binance Smart Chain?
Binance Smart Chain brings EVM-compatible programmability and native cross-chain communication with Binance Chain using an innovative consensus of Proof of Staked Authority(PoSA)
Why is Binance Smart Chain designed as a separate chain from Binance Chain?
The execution of a Smart Contract may slow down the exchange function and add non-deterministic factors to trading. Even if that compromise could be tolerated, it might be a straightforward idea to introduce a new Virtual Machine specification based on Tendermint, based on the current underlying consensus protocol and major RPC implementation of Binance Chain. But all these will increase the learning requirements for all existing dApp communities, and will not be very welcomed.
How does Binance Smart Chain work? What is the architecture and consensus used?
Binance Smart Chain relies on a system of 21 validators with Proof of Staked Authority (PoSA) consensus that can support short block time and lower fees.
There will be fewer validators on Binance Smart Chain testnet.
Can you tell more about Proof of Staked Authority(PoSA)? What is it?
PoSA is a combination of PoA and PoS. Blocks are produced by a limited set of validators, they are elected in and out based on a staking based governance. Validators take turns to produce blocks in a PoA manner
What are the benefits for developers to build on Binance Smart chain?
- EVM-compatible: Binance Smart Chain supports all the existing Ethereum tooling Fast block time, cheaper cost
- Native cross-chain trasfer & communication: Binance DEX remains a liquid venue of exchange of assets on Binance Chain and Binance Smart Chain»
What are the benefits for developers to build on Binance chain?
Binance Chain opens the gate for users to take advantage of the fast transferring and trading
How many assets are issued on Binance chain?
There are already 140 assets on Binance Chain
The introduction of BEP8 is an innovative way for tokenization of properties
What make Binance Smart Chain different?
Native Cross-Chain Communication
Expand the use cases of BNB token
Binance Smart Chain is EVM-compatible. What does that mean?
EVM means Ethereum Virtual Machine. Any smart-contract written to run in EVM can be easily ported to Binance Smart Chain.
Can developers make hybrid Dapps using both Binance Chain and Binance Smart Chain in one single Dapp?
Yes, with the help of native cross-chain functions
How to query the current system parameters
minimium delegate amount: 1BNB
Источник
Binance Smart Chain Price Feeds from Chainlink
Introduction to Price Feeds
Chainlink Price Feeds are the quickest way to connect your smart contracts to the real-world market prices of assets. They enable smart contracts to retrieve the latest price of an asset in a single call.
Often, smart contracts need to act upon prices of assets in real-time. This is especially true in DeFi. For example, Synthetix use Price Feeds to determine prices on their derivatives platform. Lending and Borrowing platforms like AAVE use Price Feeds to ensure the total value of the collateral.
Get the Latest Price
This section explains how to get the latest price of BNB inside smart contracts using Chainlink Price Feeds, on the Binance Smart Chain.
Solidity Contract
To consume price data, your smart contract should reference AggregatorV3Interface , which defines the external functions implemented by Price Feeds.
Javascript Web3
Python Web3
Get Historical Price Data
The most common use case for Price Feeds is to get the latest price. However, AggregatorV3Interface also exposes functions which can be used to retrieve price data of a previous round ID.
Solidity Contract
Python Web3
API Reference
Functions
Name | Description |
---|---|
decimals | The number of decimals in the response. |
description | The description of the aggregator that the proxy points to. |
getRoundData | Get data from a specific round. |
latestRoundData | Get data from the latest round. |
version | The version representing the type of aggregator the proxy points to. |
decimals
Get the number of decimals present in the response value.
«`javascript Solidity function decimals() external view returns (uint8)
- RETURN : The description of the underlying aggregator.
getRoundData
Get data about a specific round, using the roundId .
«`javascript Solidity function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound )
Return Values
- roundId : The round ID.
- answer : The price.
- startedAt : Timestamp of when the round started.
- updatedAt : Timestamp of when the round was updated.
- answeredInRound : The round ID of the round in which the answer
- was computed.
version
The version representing the type of aggregator the proxy points to.
javascript Solidity function version() external view returns (uint256)
- RETURN : The version number.
Contract Addresses
Chainlink price feed contracts are updated on a regular basis by multiple Chainlink nodes. This section lists the contract addresses for Price Feeds on the Binance Smart Chain.
Источник
Binance Chain Documentation
Welcome to the Binance Chain documentation site!
Please note that both the Binance Chain software and this documentation site will improve over time and is still a work-in-progress.
Be sure to engage with our community channels to stay updated.
Have fun trading and see you on chain!
What are Binance Chain and Binance DEX?
Binance Chain is a blockchain software system developed by Binance and its community. Binance DEX refers to the decentralized exchange features developed on top of Binance Chain.
Please read the FAQ to get started.
What is Binance Smart Chain?
Binance Smart Chain is an innovative solution to bring programmability and interoperability to Binance Chain. Binance Smart Chain relies on 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.
Please read the FAQ to get started.
What can I do with Binance Chain?
The purpose of the new blockchain and DEX is to create an alternative marketplace for issuing and exchanging digital assets in a decentralized manner.
For traders, you can:
- Propose to create trading pairs between two different tokens
- Send orders to buy or sell assets through trading pairs created on the chain withSDK
- Watch the DEX market to confirm price and market activity of certain assets
For developers, you can also:
- Explore the transaction history and blocks on the chain, via Binance Chain Explore, API and node RPC interfaces.
- Run a full node to listen to and broadcast live updates on transactions, blocks, and consensus activities
- Extract other data of Binance Chain via full node or APIs
- Develop tools and application to help users use Binance Chain and Binance DEX
What can I do with Binance Smart Chain?
Binance Smart Chain (BSC) is best described as a blockchain that runs in parallel to the Binance Chain. Unlike Binance Chain, BSC boasts smart contract functionality and compatibility with the Ethereum Virtual Machine (EVM). The design goal here was to leave the high throughput of Binance Chain intact while introducing smart contracts into its ecosystem.
Because BSC is EVM-compatible, it launched with support for the rich universe of Ethereum tools and DApps. In theory, this makes it easy for developers to port their projects over from Ethereum. For users, it means that applications like MetaMask can be easily configured to work with BSC. Seriously – it’s just a matter of tweaking a couple of settings. Check out Use MetaMask for Binance Smart Chain to get started.
- Send and receive BNB and other BEP2 tokens cross-chain
- Explore the transaction history and blocks on the chain, via bscscan, API and node RPC interfaces.
- Stake you BNB to earn some block rewards
Developers can also:
- Issue new tokens to digitalize assets
- Migrate existing DApps
- Run a full node to listen to and broadcast live updates on transactions, blocks, and consensus activities
- Become a validator of BSC
- Develop wallets and tools to help users use Dapps
Comparision Between BC and BSC
Binance Chain | Binance Smart Chain | |
---|---|---|
Consensus | DPoS | PoSA |
No. of Validators | 11 | up to 21 |
Mean Block Time | getOwner and decimals . Read the full proposal here: https://github.com/binance-chain/BEPs/blob/master/BEP20.md |
BNB (and Other Coins) MainNet Switch
Binance Coin (BNB) was an ERC20 token on the Ethereum network.
After the launch of Binance Chain, Binance Coin (BNB) is being converted into native BNB tokens on the main network via the exchange platform at binance.com, a pragmatic and efficient way to perform the initial token swap.
Binance Chain is ready for other projects to migrate their tokens to take advantage of performant transactions with more liquidity options and native marketplace features.
More information about how projects can set themselves up for this (via binance.com or partners) will come soon.
BNB Staking
Please read the guide here
Trading on Binance DEX
Binance DEX is the native marketplace on Binance Chain, allowing you to exchange digital assets issued and listed on it.
The matching happens within the blockchain nodes and all of the transactions are recorded on-chain, therefore forming a complete, auditable ledger of activity.
ATTENTION: The match logic on DEX is quite different from normal centralized exchange.
Please go over the trading and match spec below to get the best interests for your orders.
Technology Details
Continue reading below if you are interested in what is happening under the hood!
- Binance Chain as a Block Chain: about consensus, software stack, network layout and roles.
- Connect to Binance Chain: how to connect to Binance Chain and DEX via different ways.
- Run a Binance Chain full node: how to run a full node and become part of the p2p network of Binance Chain.
- Run a Binance Chain light client: how to run a light client.
- Binance Chain Governance: about proposal, vote, and join as a validator.
Источник