smartcontracts / simple-optimism-node

The easiest way to run an Optimism node
MIT License
318 stars 105 forks source link

Running Optimism node with local Ethereum RPC #100

Closed dandavid3000 closed 8 months ago

dandavid3000 commented 10 months ago

Hi !

I cannot run the optimism node with docker compose from a local Ethereum RPC. It requires a flag --net=host to use local network. However, I tried to add here

network_mode: "host"

There was a conflict between docker configurations. It says

"host" network_mode is incompatible with port_bindings

Does anyone know how to solve this issue?

Thank you

dandavid3000 commented 9 months ago

@smartcontracts Could you please help or give any suggestions ? I'd like to use my local Ethereum RPC instead of other providers (Alchemy, quicknode pro) Let's say my local node is at 127.0.0.1:8649 I setup OP_NODE__RPC_ENDPOINT=http://127.0.0.1:8649 But I cannot get data from localhost. What should I change in the config in order to achieve this? Thanks

tajelp commented 9 months ago

Same problem here. I get this:

simple-optimism-node-healthcheck-1     | {"level":50,"time":1694893509505,"msg":"target client not connected"}
dandavid3000 commented 8 months ago

Do not use docker but run manually op-node and op-geth from the official guide