server: add api.enable
flag for Cosmos SDK API server (#908)
* add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
parent
317f5b43b5
commit
0a01cead67
@ -63,6 +63,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
* (ante) [tharsis#819](https://github.com/tharsis/ethermint/pull/819) remove redundant ante handlers
|
* (ante) [tharsis#819](https://github.com/tharsis/ethermint/pull/819) remove redundant ante handlers
|
||||||
* (app) [tharsis#873](https://github.com/tharsis/ethermint/pull/873) Validate code hash in GenesisAccount
|
* (app) [tharsis#873](https://github.com/tharsis/ethermint/pull/873) Validate code hash in GenesisAccount
|
||||||
* (evm) [tharsis#901](https://github.com/tharsis/ethermint/pull/901) Support multiple MsgEthereumTx in single tx.
|
* (evm) [tharsis#901](https://github.com/tharsis/ethermint/pull/901) Support multiple MsgEthereumTx in single tx.
|
||||||
|
* (config) [tharsis#908](https://github.com/tharsis/ethermint/pull/908) Add api.enable flag for Cosmos SDK Rest server
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
2
init.sh
2
init.sh
@ -87,4 +87,4 @@ if [[ $1 == "pending" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||||
ethermintd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner
|
ethermintd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable
|
||||||
|
@ -24,6 +24,11 @@ const (
|
|||||||
GRPCWebAddress = "grpc-web.address"
|
GRPCWebAddress = "grpc-web.address"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RPCEnable Defines if Cosmos-sdk REST server should be enabled
|
||||||
|
const (
|
||||||
|
RPCEnable = "api.enable"
|
||||||
|
)
|
||||||
|
|
||||||
// JSON-RPC flags
|
// JSON-RPC flags
|
||||||
const (
|
const (
|
||||||
JSONRPCEnable = "json-rpc.enable"
|
JSONRPCEnable = "json-rpc.enable"
|
||||||
@ -34,7 +39,6 @@ const (
|
|||||||
JSONRPCEVMTimeout = "json-rpc.evm-timeout"
|
JSONRPCEVMTimeout = "json-rpc.evm-timeout"
|
||||||
JSONRPCTxFeeCap = "json-rpc.txfee-cap"
|
JSONRPCTxFeeCap = "json-rpc.txfee-cap"
|
||||||
JSONRPCFilterCap = "json-rpc.filter-cap"
|
JSONRPCFilterCap = "json-rpc.filter-cap"
|
||||||
JSONRPFeeHistoryCap = "json-rpc.feehistory-cap"
|
|
||||||
JSONRPCLogsCap = "json-rpc.logs-cap"
|
JSONRPCLogsCap = "json-rpc.logs-cap"
|
||||||
JSONRPCBlockRangeCap = "json-rpc.block-range-cap"
|
JSONRPCBlockRangeCap = "json-rpc.block-range-cap"
|
||||||
)
|
)
|
||||||
|
@ -149,6 +149,8 @@ which accepts a path for the resulting pprof file.
|
|||||||
cmd.Flags().Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)")
|
cmd.Flags().Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)")
|
||||||
cmd.Flags().String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on")
|
cmd.Flags().String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on")
|
||||||
|
|
||||||
|
cmd.Flags().Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled")
|
||||||
|
|
||||||
cmd.Flags().Bool(srvflags.JSONRPCEnable, true, "Define if the gRPC server should be enabled")
|
cmd.Flags().Bool(srvflags.JSONRPCEnable, true, "Define if the gRPC server should be enabled")
|
||||||
cmd.Flags().StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled")
|
cmd.Flags().StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled")
|
||||||
cmd.Flags().String(srvflags.JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on")
|
cmd.Flags().String(srvflags.JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on")
|
||||||
|
@ -58,4 +58,4 @@ ethermintd collect-gentxs
|
|||||||
ethermintd validate-genesis
|
ethermintd validate-genesis
|
||||||
|
|
||||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||||
ethermintd start --pruning=nothing --rpc.unsafe --keyring-backend test --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3
|
ethermintd start --pruning=nothing --rpc.unsafe --keyring-backend test --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3 --api.enable
|
||||||
|
Loading…
Reference in New Issue
Block a user