-
Notifications
You must be signed in to change notification settings - Fork 181
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
blst Go bindings no longer compile with Go 1.24 #245
Comments
Thanks for the heads-up! Unfortunately getting rid of = in type declaration doesn't cut it. Could you test #247, i.e. go1.24 branch in https://github.com/dot-asm/blst, with whatever you're working on? |
mark-rushakoff
added a commit
to gordian-engine/gordian
that referenced
this issue
Jan 8, 2025
This uses the supranational/blst package for an implementation of BLS signatures. We use the minimized signature form, hence the package name. The package includes a BLS-backed gcrypto.PubKey implementation and a CommonMessageSignatureProof implementation. There are likely some missing details in the BLS setup, at least in adding configurability for the signatures' salt. I think the domain separation tag is correct. I cannot find the whitepaper or technical document that introduced me to the concept, but the model of arranging the validators in a tree for key and signature aggregation is based on the concept that the leftmost validators are trustworthy and likely to be online, while the rightmost validators are the least expected to vote. See further documentation on the SignatureProof type. It has not been fully integrated yet, but we have tests around the usage of both of those types. Next up are some slight interface changes that will affect the ed25519 implementation too. And I think we may need some special handling such that the signature committed to chain is a "final aggregation" of keys that would not normally be aggregated together. For instance, if there are only four validators, then during consensus gossip, we would pair 0-1 and 2-3, but never 0-2 or 1-3. If the final votes were only from 0, 1, and 3 -- that is to say validator 2 was absent or perhaps voted nil -- then we would commit with the aggregated signaure 0-1-3, to minimize space used for signatures. This also removes the gmerkle package, which was left in for specifically this use case, but which turned out to be an incorrect fit. Note that with the introduction of this package, we have a dependency on supranational/blst, which is a C dependency; and there is currently the outstanding issue supranational/blst#245 which prevents building blst with Go 1.24. However, supranational/blst#247 is an open PR that fixes the build for Go 1.24 and Go tip.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried building Go code that references blst at the latest release, and with go1.24rc1 the blst bindings fail to build.
This failure can be reproduced from the blst repository, in the
bindings/go
directory.Tests run fine with go1.23:
With go1.24rc1, the bindings fail to build:
This appears to be a deliberate change in the Go toolchain, according to the draft Go 1.24 release notes:
The HTML comments at that paragraph indicate golang/go#60725 and golang/go#57926.
The fix is probably changing this set of types:
blst/bindings/go/blst.go
Lines 171 to 182 in bef14ca
to "normal" type definitions (e.g.
type Scalar C.blst_scalar
without the=
in the middle) and then defining the required methods, including forwarding all the other methods that already exist on theC.blst_scalar
type. I think this would avoid breaking any existing usage, but I haven't really used this package yet so it's a bit of a guess on my part.The text was updated successfully, but these errors were encountered: