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

Keep a local list of peers to facilitate bootstrapping upon reboot #1856

Open
experiencedft opened this issue Jun 12, 2020 · 8 comments
Open

Comments

@experiencedft
Copy link

@mhluongo said on Discord that "It would be really nice to have some way to save peers between restarts".

Indeed it would, as this would both limit the risk of eclipse attacks as underlined by Matt, as well as prevent issues such as outdated bootstrap peers list in the config file that would require manual update.

One way to do it would be for the node to keep a routing table in the persistence folder and use it as a bootstrap list.

@experiencedft
Copy link
Author

I have identified a possible way to implement this for this. I would like to do this first for the ECDSA client. I know which Go routines I want to change - however I need help setting up a local environment to build everything and test my changes as I am new to this and the documentation hasn't helped for what I want to do.

@mhluongo Would anyone from the team be willing to provide some help, perhaps through a call with screen sharing or something of the sort?

@mhluongo
Copy link
Member

I don't think we could do 1:1 for a bit, considering deadlines for existing work. We're happy to help here or we could maybe do a group dev call to make the time higher leverage

@experiencedft
Copy link
Author

experiencedft commented Jun 17, 2020

I'm fine with a group dev call. Anything to make it clearer to community devs how to run things locally to test various kinds of changes. I think a few other people would be interested, maybe we could gauge interest on Discord.

Apparently there is not much interest for that so no need to take some time from the devs who are working on deadlines. I'll figure it out.

@mhluongo
Copy link
Member

cc @Shadowfiend @sthompson22 ideas or pointers on a better local setup?

@jeremyid anything you can share about your issues here would help!

@experiencedft
Copy link
Author

I think I am almost there thanks to help from various community members.

What I'm trying to do involves changes in both keep-core/.../libp2p.go and keep-ecdsa/.../start.go. What I did:

  • Forked both repos
  • Added an instruction the replaceof keep-ecdsa's go.mod to point to my own forked repo: github.com/keep-network/keep-core => github.com/jeremyid/keep-core v.1.2.3-rc
  • Built the ECDSA docker image by running docker build . from keep-ecdsa

I was able to run this image after creating the config.toml and other appropriate files / folders.

The only thing left to do is figuring out how to work with v1.0.0 instead of v1.1.1-rc which is the last release that was available when I forked my repo. I believe this is a noob Git problem though so I can probably figure it out on my own.

@mhluongo
Copy link
Member

On the last point, branching off a tag would be the way to go. I'm not certain you should be off v1.0.0 though- @sthompson22 what are the bootstraps running?

@experiencedft
Copy link
Author

experiencedft commented Jun 17, 2020

My own ECDSA Ropsten node as well as the bootstrap list I put in the config.toml are running v1.0.0 afaik, althought it is my understanding that new contracts will be communicated soon for use with new clients. When that happens, I will have to change my setup, I believe just by pulling the changes to my working branch.

I think I managed to branch off the v1.0.0 tag. Currently working on this local branch with the change I mentioned to the replace statement in the go.mod. I tried to compile with docker build . but got the following error:

image

Could this be a compatibility problem between the new keep-core v.1.2.3-rc and the old keep-ecdsa v1.0.0?

I know the keep-core v.1.2.3-rc refuses connections from older clients, but in this case I'm building the ECDSA client, not Random Beacon, it's a bit surprising that there would be any issue when compiling it, even referring to the newer version of the Random Beacon.

@experiencedft
Copy link
Author

I have solved this problem. Now proceeding with implementation.

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

2 participants