forked from cerc-io/plugeth
core: eth: implement Kiln-v2 spec (#24506)
* core/beacon: eth/catalyst: updated engine api to new version * core: implement exchangeTransitionConfig * core/beacon: prevRandao instead of Random * eth/catalyst: Fix ExchangeTransitionConfig, add test * eth/catalyst: stop external miners on TTD reached * node: implement --authrpc.vhosts flag * core: allow for config override on non-mainnet networks * eth/catalyst: fix peters comments * eth/catalyst: make stop remote sealer more explicit * eth/catalyst: add log output * cmd/utils: rename authrpc.host to authrpc.addr * eth/catalyst: disable the disabling of the miner * eth: core: remove notion of terminal pow block * eth: les: more of peters nitpicks
This commit is contained in:
+6
-2
@@ -139,12 +139,16 @@ type Config struct {
|
||||
// HTTPPathPrefix specifies a path prefix on which http-rpc is to be served.
|
||||
HTTPPathPrefix string `toml:",omitempty"`
|
||||
|
||||
// AuthHost is the listening address on which authenticated APIs are provided.
|
||||
AuthHost string `toml:",omitempty"`
|
||||
// AuthAddr is the listening address on which authenticated APIs are provided.
|
||||
AuthAddr string `toml:",omitempty"`
|
||||
|
||||
// AuthPort is the port number on which authenticated APIs are provided.
|
||||
AuthPort int `toml:",omitempty"`
|
||||
|
||||
// AuthVirtualHosts is the list of virtual hostnames which are allowed on incoming requests
|
||||
// for the authenticated api. This is by default {'localhost'}.
|
||||
AuthVirtualHosts []string `toml:",omitempty"`
|
||||
|
||||
// WSHost is the host interface on which to start the websocket RPC server. If
|
||||
// this field is empty, no websocket API endpoint will be started.
|
||||
WSHost string
|
||||
|
||||
+2
-1
@@ -50,8 +50,9 @@ var (
|
||||
var DefaultConfig = Config{
|
||||
DataDir: DefaultDataDir(),
|
||||
HTTPPort: DefaultHTTPPort,
|
||||
AuthHost: DefaultAuthHost,
|
||||
AuthAddr: DefaultAuthHost,
|
||||
AuthPort: DefaultAuthPort,
|
||||
AuthVirtualHosts: DefaultAuthVhosts,
|
||||
HTTPModules: []string{"net", "web3"},
|
||||
HTTPVirtualHosts: []string{"localhost"},
|
||||
HTTPTimeouts: rpc.DefaultHTTPTimeouts,
|
||||
|
||||
+3
-3
@@ -439,12 +439,12 @@ func (n *Node) startRPC() error {
|
||||
initAuth := func(apis []rpc.API, port int, secret []byte) error {
|
||||
// Enable auth via HTTP
|
||||
server := n.httpAuth
|
||||
if err := server.setListenAddr(n.config.AuthHost, port); err != nil {
|
||||
if err := server.setListenAddr(n.config.AuthAddr, port); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := server.enableRPC(apis, httpConfig{
|
||||
CorsAllowedOrigins: DefaultAuthCors,
|
||||
Vhosts: DefaultAuthVhosts,
|
||||
Vhosts: n.config.AuthVirtualHosts,
|
||||
Modules: DefaultAuthModules,
|
||||
prefix: DefaultAuthPrefix,
|
||||
jwtSecret: secret,
|
||||
@@ -454,7 +454,7 @@ func (n *Node) startRPC() error {
|
||||
servers = append(servers, server)
|
||||
// Enable auth via WS
|
||||
server = n.wsServerForPort(port, true)
|
||||
if err := server.setListenAddr(n.config.AuthHost, port); err != nil {
|
||||
if err := server.setListenAddr(n.config.AuthAddr, port); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := server.enableWS(apis, wsConfig{
|
||||
|
||||
Reference in New Issue
Block a user