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

GETH Trusted, Static and Bootstrap Peers #22348

Closed
ceds opened this issue Feb 19, 2021 · 6 comments
Closed

GETH Trusted, Static and Bootstrap Peers #22348

ceds opened this issue Feb 19, 2021 · 6 comments

Comments

@ceds
Copy link

ceds commented Feb 19, 2021

I've been struggling for a long time trying to get my GETH node to only accept peers that I specify. For some reason it never works as expected.

I selected 100 peers that I would like my GETH node to use. Those 100 peers are added in the config.toml file as BootstrapNodes, BootstrapNodesV5, TrustedNodes and StaticNodes. I also set NoDiscovery to false.

If I pull the peers after using such configuration, GETH still has about 50% peers that are not in my list of 100 nodes.

How is this possible? What am I missing?

@ceds ceds added the type:docs label Feb 19, 2021
@karalabe
Copy link
Member

You can disable discovery (set nodiscover to true!), but that doesn't prevent others from connecting to you via IP if your data already leaked into the network. You'd need to regenerate your node key to have an unleaked one.

You can specify your desired peers as trusted, and they will always be allowed in no matter how full your node is. You could specify the desired peers as static too to dial them, but the max peer count limit isn't allowed to be exceeded by them.

@aniquejapan
Copy link

How can i set peer only to static? Also wanted to know by doing this geth speed will be slow receiving and sending tx.

@ceds
Copy link
Author

ceds commented Feb 24, 2021

You can disable discovery (set nodiscover to true!), but that doesn't prevent others from connecting to you via IP if your data already leaked into the network. You'd need to regenerate your node key to have an unleaked one.

You can specify your desired peers as trusted, and they will always be allowed in no matter how full your node is. You could specify the desired peers as static too to dial them, but the max peer count limit isn't allowed to be exceeded by them.

Thanks, that explains what I'm seeing. Will regenerate node key if I don't want to be discovered.

@ceds ceds closed this as completed Feb 24, 2021
@ceds
Copy link
Author

ceds commented Feb 24, 2021

Answer by aniquejapan resolved this question

@zhengger
Copy link

zhengger commented Apr 9, 2021

You can specify your desired peers as trusted

"You can specify your desired peers as trusted", how to set a peer as trusted or not?
Thanks!

@fomotrader
Copy link
Contributor

You can disable discovery (set nodiscover to true!), but that doesn't prevent others from connecting to you via IP if your data already leaked into the network. You'd need to regenerate your node key to have an unleaked one.

Can allowing any node to discover/connect to my node be harmful? If so how and where can I find out more info about this as I have a new node that I spent a lot of money on?

You can specify your desired peers as trusted, and they will always be allowed in no matter how full your node is. You could specify the desired peers as static too to dial them, but the max peer count limit isn't allowed to be exceeded by them.

Why would I want to use trusted peers?

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

No branches or pull requests

5 participants