skycoin / teller

Skycoin exchange service
15 stars 30 forks source link

Implemented Passthrough.checkBalance #215

Closed briancaine closed 6 years ago

gz-c commented 6 years ago

Did you do dep prune?

briancaine commented 6 years ago

When I run dep prune, I get:

Pruning is now performed automatically by dep ensure.
Set prune settings in Gopkg.toml and it it will be applied when running ensure.

dep prune will be removed in a future version, and this command will exit non-0.
Please update your scripts.
gz-c commented 6 years ago

It doesn't look pruned

briancaine commented 6 years ago

What do you suggest I do?

gz-c commented 6 years ago

https://golang.github.io/dep/docs/Gopkg.toml.html#prune

gz-c commented 6 years ago

you have to git checkout the code in the go-ethereum package in order to preserve the C header files it uses, after you prune. The pruner doesn't work with cgo yet

briancaine commented 6 years ago

Yeah, I was trying to figure that out.

What am I git checkout-ing? The go-ethereum package doesn't make it clear.

gz-c commented 6 years ago

The C header files in the vendored go-ethereum package have been manually committed because the dep pruner removes them, yet they are necessary.

After you dep ensure, when you do git status it will show that some go-ethereum files were deleted, if you do git checkout vendor/github.com/go-ethereum/path/to/headers it will restore them. Then you commit the changes as normal

briancaine commented 6 years ago

Yeah, I understand that much.

I tried a few different sets of paths for git checkout, but they either gave me no output, or ... did not match any file(s) known to git.

So I just checked out the go-ethereum repo by hand.

briancaine commented 6 years ago

I think this resolves the issue for now.

Although we'll need to figure out the proper command to run because we'll need to do this regularly, I think.

gz-c commented 6 years ago

git status would show which go-ethereum files to keep if you don't commit the unpruned vendor folder first

briancaine commented 6 years ago

OH, I gotcha.

I was doing all of this after I had already made the commit where the files got deleted.

therealssj commented 6 years ago

https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md as mentioned here dep seems to be deleting the transitive dependencies which can be included in the import graph by listing them in required and it works fine for the most part by defining

required = [
  "github.com/ethereum/go-ethereum",
  "github.com/ethereum/go-ethereum/crypto",
  "github.com/ethereum/go-ethereum/core",
  "github.com/ethereum/go-ethereum/eth",
  "github.com/ethereum/go-ethereum/crypto/secp256k1",
]

but fails when we add github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1 and errros out with

Could not introduce github.com/ethereum/go-ethereum@v1.8.1, as its subpackage github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1 does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)

Not sure right now how to fix this error

--- Edit --- https://github.com/golang/dep/issues/1306 seems we can't fix it right now, manually checking it out before commit seems to be the only solution for the time being.

gz-c commented 6 years ago

217 has the libsecp256k1 libraries preserved