celo-blockchain icon indicating copy to clipboard operation
celo-blockchain copied to clipboard

Update celo-bls-go dependency to v0.6.1

Open mstraka100 opened this issue 3 years ago • 4 comments
trafficstars

Description

As described in https://github.com/celo-org/celo-blockchain/pull/1898, relying on an older version v0.2.4 of celo-bls-go prevents compilation on M1 processors. Updating to v0.6.1 of this dependency should fix this issue, as it supports M1 processors.

Other changes

Updating celo-bls-go also allows for the use of BLS batch verification code added in v0.6.1

Tested

Running tests in CI to ensure compatibility.

Related issues

N/A

Backwards compatibility

N/A

mstraka100 avatar Jul 08 '22 17:07 mstraka100

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit f4b3f22a082eeb9a965d85b72c07c5d5a54e0296

coverage: 46.1% of statements across all listed packages
coverage:  54.1% of statements in consensus/istanbul
coverage:  23.7% of statements in consensus/istanbul/announce
coverage:  54.5% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  65.7% of statements in consensus/istanbul/core
coverage:  45.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.4% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random
CommentID: 9d9b9159ea

piersy avatar Jul 08 '22 19:07 piersy

Codecov Report

Merging #1919 (86ff9f7) into master (4dd573c) will decrease coverage by 0.07%. The diff coverage is n/a.

:exclamation: Current head 86ff9f7 differs from pull request most recent head b0b32e8. Consider uploading reports for the commit b0b32e8 to get more accurate results

@@            Coverage Diff             @@
##           master    #1919      +/-   ##
==========================================
- Coverage   54.30%   54.23%   -0.08%     
==========================================
  Files         678      678              
  Lines       89317    89317              
==========================================
- Hits        48508    48442      -66     
- Misses      37163    37232      +69     
+ Partials     3646     3643       -3     
Impacted Files Coverage Δ
consensus/istanbul/core/backlog.go 78.72% <0.00%> (-4.97%) :arrow_down:
p2p/discover/v4_udp.go 76.00% <0.00%> (-4.25%) :arrow_down:
accounts/keystore/watch.go 91.66% <0.00%> (-4.17%) :arrow_down:
les/distributor.go 76.55% <0.00%> (-3.45%) :arrow_down:
core/rawdb/freezer.go 21.25% <0.00%> (-2.76%) :arrow_down:
p2p/enode/nodedb.go 74.24% <0.00%> (-2.58%) :arrow_down:
p2p/discover/table.go 80.46% <0.00%> (-2.34%) :arrow_down:
eth/protocols/snap/sync.go 71.45% <0.00%> (-1.80%) :arrow_down:
p2p/simulations/http.go 69.56% <0.00%> (-0.55%) :arrow_down:
consensus/istanbul/backend/engine.go 63.89% <0.00%> (-0.54%) :arrow_down:
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4dd573c...b0b32e8. Read the comment docs.

codecov[bot] avatar Jul 08 '22 19:07 codecov[bot]

I just tried building this locally and ran into the following. Is there some dependency that I'm missing?

# github.com/celo-org/celo-bls-go/bls
ld: warning: directory not found for option '-L/Users/paul/go/pkg/mod/github.com/celo-org/[email protected]/bls/../libs/aarch64-apple-darwin'
ld: library not found for -lbls_snark_sys
clang: error: linker command failed with exit code 1 (use -v to see invocation)
util.go:46: Command failed "/opt/homebrew/Cellar/[email protected]/1.16.15/libexec/bin/go build -ldflags -X main.gitCommit=2a8455cc278955513c0569d4b9289ec6b0e14a45 -X main.gitDate=20220802 -s -trimpath -v -o /Users/paul/Projects/celo-blockchain/build/bin/abidump ./cmd/abidump", err: "exit status 2"

edit: Just tested on 1d47981 as well, and that works for me as well on an M1 mac.

palango avatar Sep 16 '22 09:09 palango

I'm also encountering an error when trying to build this. The error seems to have been introduced in the last commit, the previous commit is working for me.

 go build ./...
# github.com/karalabe/usb
In file included from ../../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:50:
../../go/pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.c:253:39: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
In file included from ../../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:50:
../../go/pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.c:390:26: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
In file included from ../../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:50:
../../go/pkg/mod/github.com/karalabe/[email protected]/libusb/libusb/os/darwin_usb.c:441:60: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
In file included from ../../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:51:
../../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/mac/hid.c:693:34: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
# gopkg.in/olebedev/go-duktape.v3
In file included from _cgo_export.c:4:
debugger.go:23:13: warning: unused function '_duk_debugger_attach' [-Wunused-function]
# github.com/celo-org/celo-bls-go/bls
ld: warning: directory not found for option '-L/Users/piersy/go/pkg/mod/github.com/celo-org/[email protected]/bls/../libs/x86_64-apple-darwin'
ld: library not found for -lbls_snark_sys
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# github.com/celo-org/celo-blockchain/tests/fuzzers/vflux/debug
ld: warning: -no_pie is deprecated when targeting new OS versions

piersy avatar Sep 16 '22 11:09 piersy

Closing this as we don't plan to include this in the short term.

palango avatar Aug 28 '23 15:08 palango