Skip to content

Commit

Permalink
add rpc.enabledeprecatedpersonal flag
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Aug 1, 2023
1 parent a2da3bb commit cfef444
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions builder/files/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
# [jsonrpc.http]
# enabled = false
# port = 8545
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/bootnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@

- ```save-key```: path to save the ecdsa private key

- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false)
- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false)
2 changes: 1 addition & 1 deletion docs/cli/debug_pprof.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ The ```debug pprof <enode>``` command will create an archive containing bor ppro

- ```output```: Output directory

- ```skiptrace```: Skip running the trace (default: false)
- ```skiptrace```: Skip running the trace (default: false)
1 change: 1 addition & 0 deletions docs/cli/example_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ devfakeauthor = false # Run miner without validator set authorization
evmtimeout = "5s" # Sets a timeout used for eth_call (0=infinite)
txfeecap = 5.0 # Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap)
allow-unprotected-txs = false # Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false)
enabledeprecatedpersonal = false # Enables the (deprecated) personal namespace
[jsonrpc.http]
enabled = false # Enable the HTTP-RPC server
port = 8545 # http.port
Expand Down
8 changes: 5 additions & 3 deletions docs/cli/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The ```bor server``` command runs the Bor client.

- ```gpo.maxblockhistory```: Maximum block history of gasprice oracle (default: 1024)

- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 5000000000000)
- ```gpo.maxprice```: Maximum gas price will be recommended by gpo (default: 500000000000)

- ```gpo.ignoreprice```: Gas price below which gpo will ignore transactions (default: 2)

Expand Down Expand Up @@ -134,6 +134,8 @@ The ```bor server``` command runs the Bor client.

- ```rpc.allow-unprotected-txs```: Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC (default: false)

- ```rpc.enabledeprecatedpersonal```: Enables the (deprecated) personal namespace (default: false)

- ```ipcdisable```: Disable the IPC-RPC server (default: false)

- ```ipcpath```: Filename for IPC socket/pipe within the datadir (explicit paths escape it)
Expand Down Expand Up @@ -258,7 +260,7 @@ The ```bor server``` command runs the Bor client.

- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071)

- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) (default: 127.0.0.1:4317)
- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port)

- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false)

Expand Down Expand Up @@ -290,4 +292,4 @@ The ```bor server``` command runs the Bor client.

- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768)

- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s)
5 changes: 5 additions & 0 deletions internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ type JsonRPCConfig struct {
HttpTimeout *HttpTimeouts `hcl:"timeouts,block" toml:"timeouts,block"`

AllowUnprotectedTxs bool `hcl:"allow-unprotected-txs,optional" toml:"allow-unprotected-txs,optional"`

// EnablePersonal enables the deprecated personal namespace.
EnablePersonal bool `hcl:"enabledeprecatedpersonal,optional" toml:"enabledeprecatedpersonal,optional"`
}

type AUTHConfig struct {
Expand Down Expand Up @@ -662,6 +665,7 @@ func DefaultConfig() *Config {
TxFeeCap: ethconfig.Defaults.RPCTxFeeCap,
RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout,
AllowUnprotectedTxs: false,
EnablePersonal: false,
Http: &APIConfig{
Enabled: false,
Port: 8545,
Expand Down Expand Up @@ -1280,6 +1284,7 @@ func (c *Config) buildNode() (*node.Config, error) {
Version: params.VersionWithCommit(gitCommit, gitDate),
IPCPath: ipcPath,
AllowUnprotectedTxs: c.JsonRPC.AllowUnprotectedTxs,
EnablePersonal: c.JsonRPC.EnablePersonal,
P2P: p2p.Config{
MaxPeers: int(c.P2P.MaxPeers),
MaxPendingPeers: int(c.P2P.MaxPendPeers),
Expand Down
7 changes: 7 additions & 0 deletions internal/cli/server/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,13 @@ func (c *Command) Flags() *flagset.Flagset {
Default: c.cliConfig.JsonRPC.AllowUnprotectedTxs,
Group: "JsonRPC",
})
f.BoolFlag(&flagset.BoolFlag{
Name: "rpc.enabledeprecatedpersonal",
Usage: "Enables the (deprecated) personal namespace",
Value: &c.cliConfig.JsonRPC.EnablePersonal,
Default: c.cliConfig.JsonRPC.EnablePersonal,
Group: "JsonRPC",
})
f.BoolFlag(&flagset.BoolFlag{
Name: "ipcdisable",
Usage: "Disable the IPC-RPC server",
Expand Down
1 change: 1 addition & 0 deletions packaging/templates/mainnet-v1/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ gcmode = "archive"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
1 change: 1 addition & 0 deletions packaging/templates/testnet-v4/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ gcmode = "archive"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ syncmode = "full"
# evmtimeout = "5s"
# txfeecap = 5.0
# allow-unprotected-txs = false
# enabledeprecatedpersonal = false
[jsonrpc.http]
enabled = true
port = 8545
Expand Down

0 comments on commit cfef444

Please sign in to comment.