Skip to content

Commit 608917b

Browse files
dsahdrephdtrg
authored andcommitted
add fork description
1 parent edf0c02 commit 608917b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ A Python library for interacting with Ethereum.
1010

1111
---
1212

13+
## Rock'N'Block Fork
14+
Added support of multiple rpc nodes for HTTPProvider.
15+
Usage:
16+
```
17+
from web3 import Web3
18+
19+
web3 = Web3(
20+
Web3.HTTPProvider(
21+
[endpoint1, endpoint2, ...]
22+
)
23+
)
24+
```
25+
For a backwards compatibility you can still pass a single string rpc provider as usual, i.e. ```Web3.HTTPProvider('endpoint')```
26+
27+
For any blockchain call using web3 (simple requests like "gas_price", or contract interactions and filters,), web3 instance will try to make a call using one provider at once in cycle, and will change provider if any RequestException is thrown. If all endpoints are invalid, built-in "CannotHandleRequest" Exception is thrown.
28+
29+
1330
## Quickstart
1431

1532
[Get started in 5 minutes](https://web3py.readthedocs.io/en/latest/quickstart.html) or

0 commit comments

Comments
 (0)