se3000 / ruby-eth

Gem for creating and signing Ethereum transactions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libsecp256k1.zip has wrong hash during Eth 0.5.0 gem installaton on OSX

Wertster opened this issue · comments

Hi there, excellent gem ! I just got hit with a bundle install fail for eth 0.5.0 on my osx workstation? Is this hardwired signature embedded in the gem extension build script which is embedded in the gem source when versioned (such that if there'a new release of the referenced zip, a new gem version would be needed)?

/vendor/bundle/ruby/2.7.0/gems/mini_portile2-2.7.1/lib/mini_portile2/mini_portile.rb:333:in `verify_file': Downloaded file
'/.../vendor/bundle/ruby/2.7.0/gems/rbsecp256k1-5.1.0/ext/rbsecp256k1/ports/archives/libsecp256k1.zip' has wrong hash: expected: 188c6252ab9e829da02c962fe59a329f798c615577ac128ae1f0697126ebb2fc is:
80583aecaa4249403f7d7c82cbe9f00ee4cf1d8305d2ccb9d01d595a9928e91a (RuntimeError)
	from extconf.rb:50:in `download'
	from /.../vendor/bundle/ruby/2.7.0/gems/mini_portile2-2.7.1/lib/mini_portile2/mini_portile.rb:178:in `cook'
	from extconf.rb:83:in `<main>'
commented

What Ruby version are you using? 2.7? And what bundler version?

Are you using mini portile? What for? Do you have some custom setup?

Could you share more logs?

commented

Is this hardwired signature embedded in the gem extension build script which is embedded in the gem source when versioned (such that if there'a new release of the referenced zip, a new gem version would be needed)?

To answer this directly: no. We do not specify anything but the name of the dependency and the version.

https://github.com/q9f/eth.rb/blob/main/eth.gemspec#L43-L44

commented

Seems to be related to

etscrivner/rbsecp256k1@cf23dfc
etscrivner/rbsecp256k1#54

Can you try to delete libsecp256k1.zip and try again?

cc @chainoperator @etscrivner

Hi, folks,
To answer the questions above I'm on ruby 2.7.5, and I'll attach the logs shortly when I've reproduced on a clean env.
Adding more clarity also I located this in the dependent gem rbsecp256k1 - which does have a codified expectation which in my example has now stopped working...
image

Interesting - I went to the github link https://github.com/etscrivner/rbsecp256k1 and followed the instruction below and subsequently the gem installed correctly. Apologies for raising the issue a little prematurely but at least may assist others hitting such an event.
image

commented

Ok, glad it worked out!