mirror of https://github.com/poanetwork/gecko.git
make JSON-RPC local by default; add basic logging for C-Chain
This commit is contained in:
parent
5847e69e45
commit
70ab3160ce
|
@ -107,7 +107,7 @@ func init() {
|
|||
consensusIP := fs.String("public-ip", "", "Public IP of this node")
|
||||
|
||||
// HTTP Server:
|
||||
httpHost := fs.String("http-host", "", "Address of the HTTP server")
|
||||
httpHost := fs.String("http-host", "127.0.0.1", "Address of the HTTP server")
|
||||
httpPort := fs.Uint("http-port", 9650, "Port of the HTTP server")
|
||||
fs.BoolVar(&Config.EnableHTTPS, "http-tls-enabled", false, "Upgrade the HTTP server to HTTPs")
|
||||
fs.StringVar(&Config.HTTPSKeyFile, "http-tls-key-file", "", "TLS private key file for the HTTPs server")
|
||||
|
|
|
@ -294,7 +294,10 @@ func (n *Node) initVMManager() error {
|
|||
AVA: avaAssetID,
|
||||
Platform: ids.Empty,
|
||||
}),
|
||||
n.vmManager.RegisterVMFactory(genesis.EVMID, &rpcchainvm.Factory{Path: path.Join(n.Config.PluginDir, "evm")}),
|
||||
n.vmManager.RegisterVMFactory(genesis.EVMID, &rpcchainvm.Factory{
|
||||
Log: n.Log,
|
||||
Path: path.Join(n.Config.PluginDir, "evm"),
|
||||
}),
|
||||
n.vmManager.RegisterVMFactory(spdagvm.ID, &spdagvm.Factory{TxFee: n.Config.AvaTxFee}),
|
||||
n.vmManager.RegisterVMFactory(spchainvm.ID, &spchainvm.Factory{}),
|
||||
n.vmManager.RegisterVMFactory(timestampvm.ID, ×tampvm.Factory{}),
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
--api-ipcs-enabled="{{ api_ipcs_enabled }}"
|
||||
--xput-server-enabled="{{ xput_server_enabled }}"
|
||||
--xput-server-port="{{ xput_server_port }}"
|
||||
>/dev/null 2>&1 &
|
||||
> ava.log 2>&1 &
|
||||
environment:
|
||||
PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
- name: Kill Node
|
||||
command: killall -SIGINT ava
|
||||
command: killall -SIGTERM ava
|
||||
ignore_errors: true
|
||||
|
||||
- name: Kill EVM
|
||||
command: killall -SIGTERM evm
|
||||
ignore_errors: true
|
||||
|
|
|
@ -8,6 +8,8 @@ import (
|
|||
"os/exec"
|
||||
|
||||
"github.com/hashicorp/go-plugin"
|
||||
|
||||
"github.com/ava-labs/gecko/utils/logging"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -16,6 +18,7 @@ var (
|
|||
|
||||
// Factory ...
|
||||
type Factory struct {
|
||||
Log logging.Logger
|
||||
Path string
|
||||
}
|
||||
|
||||
|
@ -25,6 +28,9 @@ func (f *Factory) New() (interface{}, error) {
|
|||
HandshakeConfig: Handshake,
|
||||
Plugins: PluginMap,
|
||||
Cmd: exec.Command("sh", "-c", f.Path),
|
||||
Stderr: f.Log,
|
||||
SyncStdout: f.Log,
|
||||
SyncStderr: f.Log,
|
||||
AllowedProtocols: []plugin.Protocol{
|
||||
plugin.ProtocolNetRPC,
|
||||
plugin.ProtocolGRPC,
|
||||
|
|
Loading…
Reference in New Issue