You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bnb-smart-chain/developers/json_rpc/bsc-api-list.md
+95-7Lines changed: 95 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,22 @@
1
1
---
2
-
title: Finality API - BSC Develop
2
+
title: Bsc API List- BSC Develop
3
3
---
4
4
5
+
## Finality API
5
6
Finality is a crucial aspect of blockchain security, ensuring that once a block is confirmed, it cannot be reversed or altered. This provides users with the confidence to act on the information in the block without delay.
6
7
7
-
## Probabilistic Finality and Economic Finality
8
+
###Probabilistic Finality and Economic Finality
8
9
9
10
In probabilistic finality, the deeper a block is buried in the chain, the lower the likelihood of it being reverted. The more blocks follow a particular block, the more likely the chain containing that block will be the longest. **Typically, BSC users should wait for at least 11 or 15 different validators to seal a block. If validators are allowed to produce multiple consecutive blocks, the number of blocks required to achieve probabilistic finality is approximately 11\*n or 15\*n, where "n" is the number of consecutive blocks produced.**
10
11
11
12
Economic Finality refers to the high cost associated with reverting a block. In proof-of-stake systems that use a slashing mechanism (such as Casper FFG, Tendermint, or BSC Fast Finality), if validators violate the voting rules, part or all of their stake can be forfeited. This economic penalty makes it extremely expensive to undermine finality. Generally, block n achieves economic finality by block n+2, meaning that BSC Fast Finality reduces the confirmation time to two blocks in most cases. This improves the user experience by making transaction confirmation faster and more reliable.
12
13
13
-
## Economic Finality API
14
+
###Economic Finality API
14
15
15
16
### [eth_getHeaderByNumber](<https://www.quicknode.com/docs/kaia/eth_getHeaderByNumber>) as in the Ethereum client.
16
17
**Parameters**
17
18
18
-
QUANTITY|TAG
19
+
**BlockNumber**QUANTITY|TAG
19
20
20
21
* HEX String - an integer block number
21
22
* String "earliest" for the earliest/genesis block
@@ -26,15 +27,15 @@ QUANTITY|TAG
26
27
### [eth_getBlockByNumber](<https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber>) as in the Ethereum client.
27
28
**Parameters**
28
29
29
-
QUANTITY|TAG
30
+
**BlockNumber**QUANTITY|TAG
30
31
31
32
* HEX String - an integer block number
32
33
* String "earliest" for the earliest/genesis block
33
34
* String "latest" - for the latest mined block
34
35
* String "safe" - for the latest justified head block
35
36
* String "**finalized**" - for the latest finalized block
36
37
37
-
Boolean
38
+
**Full_transaction_flag**Boolean
38
39
39
40
- If true it returns the full transaction objects, if false only the hashes of the transactions.
Copy file name to clipboardExpand all lines: docs/bnb-smart-chain/developers/json_rpc/json-rpc-endpoint.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
-
title: RPC - BSC Develop
2
+
title: JSON-RPC-Endpoint - BSC Develop
3
3
---
4
4
5
5
6
-
# JSON-RPCEndpoint
6
+
# JSON-RPC-Endpoint
7
7
8
8
JSON-RPC endpoints refers to the network location where a program could transfer its RPC requests to access server data. Once you connect a decentralized application to an RPC endpoint, you can access the functionalities of different operations, which could enable real-time usage of blockchain data. BNB Chain provides several RPC endpoints for connectinto both its Minent and Testnet. In this section, we list the JSON-RPC endpoints that can be used for connecting to BNB Smart Chain.
Please refer to this [wiki page](https://github.com/ethereum/wiki/wiki/JSON-RPC) or use Postman: <https://documenter.getpostman.com/view/4117254/ethereum-json-rpc/RVu7CT5J?version=latest>
80
+
BSC (BNB Smart Chain) is EVM-compatible and strives to be as compatible as possible with the Go-Ethereum API. However, BSC also has unique features, such as faster finality and the storage of blob data on the execution layer, which require their own specialized APIs.
81
81
82
+
### Geth(Go-Ethereum) API
83
+
84
+
BSC is nearly fully compatible with the Geth APIs. Any exceptions or incompatibilities are explicitly listed. If you're looking for detailed usage of a specific API, you will most likely find the answer in the following link:
85
+
86
+
[Geth JSON-RPC API documentation](https://geth.ethereum.org/docs/interacting-with-geth/rpc).
87
+
88
+
### Finality
89
+
90
+
Ethereum's PoS consensus protocol, known as "Gasper," is built on LMD-GHOST (a fork choice rule) and Casper FFG (a finality gadget). Similarly, BSC's consensus protocol, called "Parlia," is constructed on top of a difficulty-based fork choice mechanism with FFG, as described in [BEP-126](https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP126.md). To further enhance BSC's throughput, validators are allowed to produce multiple consecutive blocks, as explained in [BEP-341](https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-341.md). These differences result in BSC having a unique finality process compared to Ethereum. For more details, please refer to the the following doc:
91
+
92
+
[BSC Finality API](bsc-api-list.md#finality-api).
93
+
94
+
### Blob
95
+
96
+
Bsc implement EIP-4844, which support Shard Blob Transactions, as described in [BEP-336](https://github.com/bnb-chain/BEPs/blob/master/BEPs/BEP-336.md). For more details, please refer to the the following doc: [BSC Blob API](bsc-api-list.md#blob-api).
97
+
98
+
### Other BSC API
99
+
100
+
Bsc implement some others apis, as described in: [BSC API](bsc-api-list.md#others).
0 commit comments