Update neofs-sdk-go #73

Closed
opened 2025-12-28 17:36:02 +00:00 by sami · 1 comment
Owner

Originally created by @KirillovDenis on GitHub (Aug 8, 2022).

Originally assigned to: @KirillovDenis on GitHub.

With go1.19 app panic:

/$ neofs-http-gw --config config.yaml

2022-08-08T13:32:20.043+0300    info    neofs-http-gw/app.go:152        add connection  {"address": "st1.t5.fs.neo.org:8080", "weight": 1, "priority": 1}
panic: crypto/elliptic: attempted operation on invalid point

goroutine 1 [running]:
crypto/elliptic.panicIfNotOnCurve({0x107d9c0?, 0x17c5700?}, 0x80?, 0x7?)
        /home/user/go/go1.19/src/crypto/elliptic/elliptic.go:182 +0xa5
crypto/elliptic.Marshal({0x107d9c0, 0x17c5700}, 0xc0001a07a0?, 0xc000444f88?)
        /home/user/go/go1.19/src/crypto/elliptic/elliptic.go:75 +0x31
github.com/nspcc-dev/neofs-crypto.marshalXY(...)
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-crypto@v0.3.0/ecdsa.go:44
github.com/nspcc-dev/neofs-crypto.Sign(0xaab782?, {0x0?, 0x20?, 0xaab81b?})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-crypto@v0.3.0/ecdsa.go:217 +0xd8
github.com/nspcc-dev/neofs-api-go/v2/util/signature.sign(0xc00045e040?, 0x10774f8?, {0x0?, 0xc0001a46d0?, 0x0?})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/util/signature/options.go:53 +0x165
github.com/nspcc-dev/neofs-api-go/v2/util/signature.SignDataWithHandler(0xc0001a07a0, {0x10774f8, 0xc0001a46d0}, 0xc000445108, {0x0, 0x0, 0xc000445118?})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/util/signature/data.go:43 +0xe6
github.com/nspcc-dev/neofs-api-go/v2/signature.signServiceMessagePart(0xe83700?, {0x10755b8?, 0x0}, 0xc000445238)
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/signature/sign.go:200 +0xb9
github.com/nspcc-dev/neofs-api-go/v2/signature.SignServiceMessage(0x0?, {0xe83700?, 0xc000446090})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/signature/sign.go:172 +0x36c
github.com/nspcc-dev/neofs-sdk-go/client.(*contextCall).writeRequest(0xc0001a0780)
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/common.go:163 +0xca
github.com/nspcc-dev/neofs-sdk-go/client.(*contextCall).processCall(0xc0001a0780)
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/common.go:268 +0x89
github.com/nspcc-dev/neofs-sdk-go/client.(*Client).NetworkInfo(0xc00016e0e0, {0x107b8e0, 0xc000514080}, {{{0x0?, 0x0?, 0x0?}}})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/netmap.go:213 +0x2cf
github.com/nspcc-dev/neofs-sdk-go/pool.(*clientWrapper).networkInfo(0xc00016e0e0, {0x107b8e0, 0xc000514080}, {})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:405 +0x6d
github.com/nspcc-dev/neofs-sdk-go/pool.initSessionForDuration({0x107b8e0, 0xc000514080}, 0xc000445930, {0x1087d68, 0xc00016e0e0}, 0x64, {{{0x107d9c0, 0x17c5700}, 0xc0000a4220, 0xc0000a4240}, ...})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:1553 +0x6b
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).Dial(0xc000122100, {0x107b8e0, 0xc000514080})
        /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:1310 +0x53c
main.newApp({0x107b8e0, 0xc000514080}, {0xc000513f60, 0x2, 0x3?})
        /home/user/github/nspcc/neofs-http-gw/app.go:161 +0xbb8
main.main()
        /home/user/github/nspcc/neofs-http-gw/main.go:20 +0x11f

So we should update sdk when it will support a new version of neofs-crypto: https://github.com/nspcc-dev/neofs-crypto/issues/15

Originally created by @KirillovDenis on GitHub (Aug 8, 2022). Originally assigned to: @KirillovDenis on GitHub. With go1.19 app panic: ```shell /$ neofs-http-gw --config config.yaml 2022-08-08T13:32:20.043+0300 info neofs-http-gw/app.go:152 add connection {"address": "st1.t5.fs.neo.org:8080", "weight": 1, "priority": 1} panic: crypto/elliptic: attempted operation on invalid point goroutine 1 [running]: crypto/elliptic.panicIfNotOnCurve({0x107d9c0?, 0x17c5700?}, 0x80?, 0x7?) /home/user/go/go1.19/src/crypto/elliptic/elliptic.go:182 +0xa5 crypto/elliptic.Marshal({0x107d9c0, 0x17c5700}, 0xc0001a07a0?, 0xc000444f88?) /home/user/go/go1.19/src/crypto/elliptic/elliptic.go:75 +0x31 github.com/nspcc-dev/neofs-crypto.marshalXY(...) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-crypto@v0.3.0/ecdsa.go:44 github.com/nspcc-dev/neofs-crypto.Sign(0xaab782?, {0x0?, 0x20?, 0xaab81b?}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-crypto@v0.3.0/ecdsa.go:217 +0xd8 github.com/nspcc-dev/neofs-api-go/v2/util/signature.sign(0xc00045e040?, 0x10774f8?, {0x0?, 0xc0001a46d0?, 0x0?}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/util/signature/options.go:53 +0x165 github.com/nspcc-dev/neofs-api-go/v2/util/signature.SignDataWithHandler(0xc0001a07a0, {0x10774f8, 0xc0001a46d0}, 0xc000445108, {0x0, 0x0, 0xc000445118?}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/util/signature/data.go:43 +0xe6 github.com/nspcc-dev/neofs-api-go/v2/signature.signServiceMessagePart(0xe83700?, {0x10755b8?, 0x0}, 0xc000445238) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/signature/sign.go:200 +0xb9 github.com/nspcc-dev/neofs-api-go/v2/signature.SignServiceMessage(0x0?, {0xe83700?, 0xc000446090}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-api-go/v2@v2.13.0/signature/sign.go:172 +0x36c github.com/nspcc-dev/neofs-sdk-go/client.(*contextCall).writeRequest(0xc0001a0780) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/common.go:163 +0xca github.com/nspcc-dev/neofs-sdk-go/client.(*contextCall).processCall(0xc0001a0780) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/common.go:268 +0x89 github.com/nspcc-dev/neofs-sdk-go/client.(*Client).NetworkInfo(0xc00016e0e0, {0x107b8e0, 0xc000514080}, {{{0x0?, 0x0?, 0x0?}}}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/client/netmap.go:213 +0x2cf github.com/nspcc-dev/neofs-sdk-go/pool.(*clientWrapper).networkInfo(0xc00016e0e0, {0x107b8e0, 0xc000514080}, {}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:405 +0x6d github.com/nspcc-dev/neofs-sdk-go/pool.initSessionForDuration({0x107b8e0, 0xc000514080}, 0xc000445930, {0x1087d68, 0xc00016e0e0}, 0x64, {{{0x107d9c0, 0x17c5700}, 0xc0000a4220, 0xc0000a4240}, ...}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:1553 +0x6b github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).Dial(0xc000122100, {0x107b8e0, 0xc000514080}) /home/user/go/pkg/mod/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.5.0.20220725101411-90f1cc7a1a77/pool/pool.go:1310 +0x53c main.newApp({0x107b8e0, 0xc000514080}, {0xc000513f60, 0x2, 0x3?}) /home/user/github/nspcc/neofs-http-gw/app.go:161 +0xbb8 main.main() /home/user/github/nspcc/neofs-http-gw/main.go:20 +0x11f ``` So we should update sdk when it will support a new version of neofs-crypto: https://github.com/nspcc-dev/neofs-crypto/issues/15
sami 2025-12-28 17:36:02 +00:00
  • closed this issue
  • added the
    bug
    U3
    labels
Author
Owner

@KirillovDenis commented on GitHub (Aug 15, 2022):

Also blocked by https://github.com/nspcc-dev/neofs-sdk-go/issues/316

@KirillovDenis commented on GitHub (Aug 15, 2022): Also blocked by https://github.com/nspcc-dev/neofs-sdk-go/issues/316
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-http-gw#73
No description provided.