forked from cerc-io/laconicd-deprecated
rpc: configure gas cap (#457)
* rpc: configure gas cap * c++ * rm old const * docs
This commit is contained in:
@@ -22,7 +22,19 @@ ethermintd start --json-rpc.enable
|
||||
ethermintd start --json-rpc.api eth,txpool,personal,net,debug,web3,miner
|
||||
```
|
||||
|
||||
### CORS
|
||||
## Set a Gas Cap
|
||||
|
||||
`eth_call` and `eth_estimateGas` define a global gas cap over rpc for DoS protection. You can override the default gas cap value of 25,000,000 by passing a custom value when starting the node:
|
||||
|
||||
```bash
|
||||
# set gas cap to 85M
|
||||
ethermintd start --json-rpc.gas-cap 85000000000
|
||||
|
||||
# set gas cap to infinite (=0)
|
||||
ethermintd start --json-rpc.gas-cap 0
|
||||
```
|
||||
|
||||
## CORS
|
||||
|
||||
If accessing the RPC from a browser, CORS will need to be enabled with the appropriate domain set. Otherwise, JavaScript calls are limit by the same-origin policy and requests will fail:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user