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

feat(vdn): add bootnode implementation #2941

Open
wants to merge 4 commits into
base: develop_vdn
Choose a base branch
from
Open

Conversation

MatusKysel
Copy link
Contributor

@MatusKysel MatusKysel commented Mar 7, 2025

Description

This PR is adding new Rendezvous VDN bootnode standalone binary. With this we will be able to bootstrap new network easily.

Example

make all
./build/bin/vdn-bootnode -debug -external-ip 127.0.0.1

@MatusKysel MatusKysel requested review from galaio and zzzckck March 7, 2025 07:56
}
server.Start()
defer server.Stop()
select {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's may better to add a graceful shutdown logic here~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is defer on line above, I think it should be sufficient

QueueSize int
EnableQuic bool
EnableDiscovery bool
MinimumSyncPeers int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this field MinimumSyncPeers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need it, if there is at least 1 peer you should broadcast right ?

routingDiscovery := drouting.NewRoutingDiscovery(s.dht)
// Advertise ourselves under the Rendezvous string
log.Info("Advertising Rendezvous", "topic", Rendezvous)
dutil.Advertise(s.ctx, routingDiscovery, Rendezvous)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your implementation of Rendezvous is not centralized. Right? It does not relay on a central point, because of every node will Advertise?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Rendezvous guarantee that all nodes will be discovered eventually?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but you need to kind of have a bootstrap address basically, I wanted to make in a way that any node could become bootstrap in case something goes wrong.

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

Successfully merging this pull request may close these issues.

2 participants