Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the default http.api configuration to avoid overwriting configuration in geth.yml. #1505

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

jiangbo0216
Copy link
Contributor

@jiangbo0216 jiangbo0216 commented Sep 7, 2023

https://geth.ethereum.org/docs/interacting-with-geth/rpc#http-server

The default whitelist allows access to the eth, net and web3 namespaces.

@yorickdowne
Copy link
Contributor

yorickdowne commented Sep 7, 2023

What are you looking to accomplish? This used to be in geth.yml and is now in docker-entrypoint.sh so it works with the custom testnet setup

If you have your own preferred list, does that still work when added to EL_EXTRAS?

@jiangbo0216
Copy link
Contributor Author

thanks for reply,
I think set EL_EXTRAS= --http.api web3,eth,net,debug will be ok.
but that is not straightforward, and for me the config(--http.api) will be better in geth.yml, I don't know the reason, why it is moved to docker-entrypoint.sh ?

in this PR, eth, net and web3 namespaces is geth default config. so I think remove it will be ok, and it's also convenient for custom namespace for http.api.

may be this PR is unnecessary , Other approaches are also available to achieve config customization.
if this PR is not helpful, please close it.

@yorickdowne
Copy link
Contributor

yorickdowne commented Sep 11, 2023

EL_EXTRAS in .env is the usual way to add parameters to the EL. This is less intrusive than editing the yml and committing the change.

Overall Eth Docker’s philosophy is to have a lot available in .env so users don’t have to make local changes and deal with a merge message on every update.

The api parameter moved into the entrypoint to support custom testnets, where a broader set of APIs is enabled by default. It’s debatable whether that was strictly necessary. As long as specifying the parameter with EL_EXTRAS again works, I am inclined to leave it as is.

If EL_EXTRAS cannot override the parameter then I think you are right, another solution would be necessary.

I will think on these defaults some. I am trying to avoid a situation where the defaults change and a broader API range is enabled without that being a deliberate choice.

@jiangbo0216
Copy link
Contributor Author

get your point,I agree that to have a lot available in .env is better.

for these defaults, if eth-docker's geth component is same with the official default is better, it can reduce cognitive load.

and I understand your consideration, avoid a situation where the defaults change and a broader API range is enabled is ok, but if there are difference between eth-docker and official geth. it need to document.

I appreciate your input and thoughtful contribution. I offer my ideas, I hope it will be helpful.

If everything is clear, we can close this pull request.

@yorickdowne
Copy link
Contributor

Fair enough, you convinced me

@yorickdowne yorickdowne merged commit 4ebb451 into eth-educators:main Sep 11, 2023
15 checks passed
@gitpoap-bot
Copy link

gitpoap-bot bot commented Sep 11, 2023

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2023 eth-docker Contributor:

GitPOAP: 2023 eth-docker Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants