nodo docker come abilitare RPC?
2 risposta
- voti
-
- 2019-02-16
Almomento sembrafunzionare quanto segue:
alphanet.sh start --rpc-port 127.0.0.1:8732
.Nota
--rpc-port
e NON--rpc-addr
,questa è un'opzione di caso specialein alphanet.sh.Questoinserirà una voce:
ports: - "127.0.0.1:8732:8732"
nel docker-compose.yamlgenerato,facendo sì che l'RPC vengaesposto a localhost sullaporta specificata -eragiàesposto come al solito con
--rpc-addr
neltezos-node stesso,ma solo all'interno del contenitore.Questo è documentato,una specie di:
./scripts/alphanet.sh start [--rpc-port <int>] [OPTIONS] Launch a full Tezos alphanet node in a docker container automatically generating a new network identity. OPTIONS (others than --rpc-port) are directly passed to the Tezos node, see './scripts/alphanet.sh shell tezos-node config --help' for more details. By default, the RPC port is not exported outside the docker container. WARNING: when exported some RPCs could be harmful (e.g. 'inject_block', 'force_validation', ...), it is advised not to export them publicly.
Anche seeraprevista unaporta (
<int>
),--rpc-port 127.0.0.1:8732
sembrafunzionaree dovrebbeesseregeneralmentepiù sicuro.At the moment the following appears to work:
alphanet.sh start --rpc-port 127.0.0.1:8732
.Note
--rpc-port
and NOT--rpc-addr
, this is a special case option in alphanet.sh.This will insert a entry:
ports: - "127.0.0.1:8732:8732"
into the generated docker-compose.yaml, causing the RPC to be exposed to localhost at the specified port -- it was already exposed as usual with
--rpc-addr
in the tezos-node itself, but only inside the container.This is documented, sort of:
./scripts/alphanet.sh start [--rpc-port <int>] [OPTIONS] Launch a full Tezos alphanet node in a docker container automatically generating a new network identity. OPTIONS (others than --rpc-port) are directly passed to the Tezos node, see './scripts/alphanet.sh shell tezos-node config --help' for more details. By default, the RPC port is not exported outside the docker container. WARNING: when exported some RPCs could be harmful (e.g. 'inject_block', 'force_validation', ...), it is advised not to export them publicly.
Even though a port was expected (
<int>
),--rpc-port 127.0.0.1:8732
happens to work, and should be generally safer. -
- 2019-03-22
Per avviare rpc sullaporta 8732,utilizzare
./alphanet.sh start --rpc-port 8732
Comemenzionatonelfile di script alphanet.sh,puoi utilizzare l'opzione --rpc-portnel comando di avvio comeindicato di seguito,specificando laporta.
./alphanet.sh start [--rpc-port <int>] [OPTIONS]"
Avvia automaticamente unnodo Tezos alphanet completoin un container Docker " generare unanuovaidentità di rete. "OPZIONI (diverse da --rpc-port) vengonopassati direttamente al "nodo Tezos,vedere '$ 0 shelltezos-node config --help '"permaggiori dettagli."Perimpostazionepredefinita,laporta RPCnon lo è esportato al difuori del contenitore "docker. ATTENZIONE: quandoesportato alcuni Gli RPCpotrebberoessere dannosi "(ades." Inject_block ","force_validation ",...), si "consiglia dinonesportarlipubblicamente".
To start rpc at 8732 port use
./alphanet.sh start --rpc-port 8732
As mentioned in alphanet.sh script file, you can use --rpc-port option in the start command as mentioned below, specifying the port.
./alphanet.sh start [--rpc-port <int>] [OPTIONS]"
Launch a full Tezos alphanet node in a docker container" automatically generating a new network identity." OPTIONS (others than --rpc-port) are directly passed to the" Tezos node, see '$0 shell tezos-node config --help'" for more details." By default, the RPC port is not exported outside the docker" container. WARNING: when exported some RPCs could be harmful" (e.g. 'inject_block', 'force_validation', ...), it is" advised not to export them publicly."
-
Come ho dettonellamia risposta,generalmente saràpiù sicuro usare `--rpc-port 127.0.0.1: 8732`,quando l'RPCnon deveessere accessibile danessun altro host oltre all'host docker.As I said in my answer, it is generally going to be safer to use `--rpc-port 127.0.0.1:8732`, when the RPC need not be accessible from any other host besides the docker host.
- 1
- 2019-03-22
- Tom
Utilizzoi nodi docker.CLIfunzionabene.ma quando lo uso.nonfunziona.al doc dire --- è disabilitatoperimpostazionepredefinita.manon so come abilitare rpc conilnodo docker
Vado allafinestramobile.trovailfile config.jsonma 8732 o 18732nonfunziona. Uso ./alphanet.sh start dockernode