Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Update Geth to 1.9.0 #117

Merged
merged 4 commits into from
Jul 29, 2019
Merged

Update Geth to 1.9.0 #117

merged 4 commits into from
Jul 29, 2019

Conversation

rmulhol
Copy link
Contributor

@rmulhol rmulhol commented Jul 15, 2019

This diff looks unnecessarily large because I deleted vendor/ 🎉 🚀 ✂️

Would appreciate if folks would give a go at checking out the branch and running make build. The reason I deleted vendor/ is that I was having trouble executing make build after running go mod vendor due to .h and .c files not getting pulled in. If it works with versioned deps specified in go.mod and no vendor/, I'm thinking we might be able to safely delete ~2 million lines of code.

Important: these changes require go 1.12 and export GO111MODULE=on

@@ -220,7 +220,7 @@ var _ = Describe("Parser", func() {
Expect(err).ToNot(HaveOccurred())

selectMethods := p.GetMethods([]string{})
Expect(len(selectMethods)).To(Equal(22))
Expect(len(selectMethods)).To(Equal(25))
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-norden it seems like the changes to Geth caused this function to return more methods - do you know if this is a problem?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems they fixed something.. inspecting the ABI for that contract shows that there are 25 functions, not 22... Not sure what exactly was changed such that 3 of the functions that were previously not considered methods are now considered as such, but I don't think it is a problem either way. Will update if I find anything else out!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just noticed this is a WIP, I may have approved prematurely 🙃

@i-norden i-norden self-requested a review July 17, 2019 15:53
@rmulhol rmulhol changed the title [WIP] Update Geth to 1.9.0 Update Geth to 1.9.0 Jul 17, 2019
@i-norden
Copy link
Collaborator

i-norden commented Jul 17, 2019

I wasn't able to figure out how to use un-versioned dependencies with go mod (I'm not sure it is possible) which caused some major issues with the seed node, state-diffing, and pg-ipfs work... makes me hesitant to make the switch although I know there a bunch of advantages to it vs dep ensure

@rmulhol rmulhol force-pushed the geth-1.9.0 branch 3 times, most recently from b37082d to a2b2634 Compare July 17, 2019 20:01
@rmulhol
Copy link
Contributor Author

rmulhol commented Jul 17, 2019

@i-norden with this approach the versions are specified in go.mod - think that would resolve the issues you were running into?

@m0ar
Copy link
Contributor

m0ar commented Jul 18, 2019

@i-norden Or do you mean you need dependencies without version? 🤔

@m0ar
Copy link
Contributor

m0ar commented Jul 18, 2019

Also this is really sexy 💯 🥇

@i-norden
Copy link
Collaborator

i-norden commented Jul 18, 2019

Yeah I mean dependencies that aren't versioned. go-mod restricts us to working with only versioned dependencies, so we can't use any forked repos or any work that hasn't been in an official release (afaik). Obviously it is best practice to only use versioned dependencies, but the reality is if we want to patch something together with, for example, our own fork of Geth or IPFS (i.e. the seed node work) I don't think we can do that with go-mod. This is something that I have to do a lot, which is why I'm a bit concerned by this introduction. I'll have to switch from using go-mod back to dep on every branch I want to experiment with non-versioned dependencies on.

@rmulhol
Copy link
Contributor Author

rmulhol commented Jul 18, 2019

@i-norden why not just release a version of our fork?

@i-norden
Copy link
Collaborator

@rmulhol that's a good point, I'll just do that. I wasn't sure how version releases work on forks- those releases are only local to the fork and require no approval from the original repo maintainers? I see it being somewhat cumbersome having to do a new release of a dependency any time we want to test any changes we make to it- no matter how small- but I'll adjust!

@i-norden
Copy link
Collaborator

i-norden commented Jul 18, 2019

If the releases on a fork are local to that fork only, can go-mod find it and distinguish it from a release of the same version on the master branch?

E.g. normally a dependency is declared like

github.com/ethereum/go-etheruem v0.0.1

How can we change the source to the vulcanizedb repo to use a version there?

@rmulhol
Copy link
Contributor Author

rmulhol commented Jul 18, 2019

@i-norden good question! I think the replace directive might greatly simplify things - looks like you can point to release on a fork, or even to the local filesystem. That said, I'm totally open to postponing the use of go mod if we want to test it out a bit first.

Also, if we are ultimately pointing at a release on a fork, I think we can pretty easily delete and replace them (if we don't want to clutter the fork repo during development).

@i-norden
Copy link
Collaborator

@rmulhol awesome! That replace directive is exactly the thing I need- thanks for pointing that out, and sorry for missing that! Don't postpone for me, I think all my concerns have been allayed.

@elizabethengelman
Copy link
Contributor

elizabethengelman commented Jul 19, 2019

I'm able to build this with the go modules!

However, I'm seeing a weird error when I run composeAndExecute on this branch (pointing to this config file).

It looks to be trying to find an old configuration variable, but we don't have any references of that var in our current mcd_transformers code base on staging. 🤔 I'll share the stacktrace in slack to avoid sharing mcd specific code here.

Other than that, I'm really into these changes but would like to take a closer. 😄

@aaizuss
Copy link

aaizuss commented Jul 22, 2019

I can build this with go modules 😄

Copy link
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

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

This LGTM! :shipit:

I may have missed it, but do you think it would be helpful to add a note about the replace go mod directive in the README or something?

@rmulhol rmulhol mentioned this pull request Jul 23, 2019
@rmulhol rmulhol merged commit f2547b5 into staging Jul 29, 2019
@rmulhol rmulhol deleted the geth-1.9.0 branch July 29, 2019 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants