Skip to content

Commit 3129bde

Browse files
authored
Upgrade NeoGo (#3040)
2 parents 35def84 + cb2aedf commit 3129bde

File tree

13 files changed

+179
-150
lines changed

13 files changed

+179
-150
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Changelog for NeoFS Node
1717
### Removed
1818

1919
### Updated
20+
- NeoGo dependency to 0.107.0 (#3040)
2021

2122
### Updating from v0.44.0
2223

cmd/neofs-adm/internal/modules/fschain/container.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ func getContainerContractHash(cmd *cobra.Command, inv *invoker.Invoker, c Client
4040
}
4141

4242
func getContainersList(inv *invoker.Invoker, ch util.Uint160) ([][]byte, error) {
43-
res, err := inv.Call(ch, "list", "")
44-
if err != nil {
43+
res, err := unwrap.ArrayOfBytes(inv.Call(ch, "list", ""))
44+
if err != nil && !errors.Is(err, unwrap.ErrNull) {
4545
return nil, fmt.Errorf("%w: %w", errInvalidContainerResponse, err)
4646
}
47-
itm, err := unwrap.Item(res, err)
48-
if _, ok := itm.(stackitem.Null); !ok {
49-
return unwrap.ArrayOfBytes(res, err)
50-
}
51-
return nil, nil
47+
return res, nil
5248
}
5349

5450
func dumpContainers(cmd *cobra.Command, _ []string) error {

cmd/neofs-adm/internal/modules/fschain/initialize_register.go

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package fschain
22

33
import (
4-
"errors"
54
"fmt"
65
"math/big"
76

@@ -136,26 +135,12 @@ func (c *initializeContext) transferNEOFinished() (bool, error) {
136135
return bal.Int64() < native.NEOTotalSupply, nil
137136
}
138137

139-
var errGetPriceInvalid = errors.New("`getRegisterPrice`: invalid response")
140-
141138
func (c *initializeContext) getCandidateRegisterPrice() (int64, error) {
142139
switch c.Client.(type) {
143140
case *rpcclient.Client:
144141
reader := neo.NewReader(c.ReadOnlyInvoker)
145142
return reader.GetRegisterPrice()
146143
default:
147-
neoHash := neo.Hash
148-
res, err := invokeFunction(c.Client, neoHash, "getRegisterPrice", nil, nil)
149-
if err != nil {
150-
return 0, err
151-
}
152-
if len(res.Stack) == 0 {
153-
return 0, errGetPriceInvalid
154-
}
155-
bi, err := res.Stack[0].TryInteger()
156-
if err != nil || !bi.IsInt64() {
157-
return 0, errGetPriceInvalid
158-
}
159-
return bi.Int64(), nil
144+
return unwrap.Int64(invokeFunction(c.Client, neo.Hash, "getRegisterPrice", nil, nil))
160145
}
161146
}

go.mod

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,52 @@ require (
99
github.com/google/go-github/v39 v39.2.0
1010
github.com/google/uuid v1.6.0
1111
github.com/hashicorp/golang-lru/v2 v2.0.7
12-
github.com/klauspost/compress v1.17.7
12+
github.com/klauspost/compress v1.17.9
1313
github.com/mitchellh/go-homedir v1.1.0
1414
github.com/mr-tron/base58 v1.2.0
1515
github.com/multiformats/go-multiaddr v0.12.2
1616
github.com/nspcc-dev/hrw/v2 v2.0.1
1717
github.com/nspcc-dev/locode-db v0.6.0
18-
github.com/nspcc-dev/neo-go v0.106.3
18+
github.com/nspcc-dev/neo-go v0.107.1
1919
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240827150555-5ce597aa14ea
2020
github.com/nspcc-dev/neofs-contract v0.20.0
2121
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12.0.20240809202351-256513c1b29b
2222
github.com/nspcc-dev/tzhash v1.8.0
2323
github.com/olekukonko/tablewriter v0.0.5
2424
github.com/panjf2000/ants/v2 v2.9.0
25-
github.com/prometheus/client_golang v1.19.0
25+
github.com/prometheus/client_golang v1.20.2
2626
github.com/spf13/cast v1.6.0
27-
github.com/spf13/cobra v1.8.0
27+
github.com/spf13/cobra v1.8.1
2828
github.com/spf13/pflag v1.0.5
2929
github.com/spf13/viper v1.18.2
3030
github.com/stretchr/testify v1.9.0
31-
go.etcd.io/bbolt v1.3.9
31+
go.etcd.io/bbolt v1.3.11
3232
go.uber.org/zap v1.27.0
33-
golang.org/x/net v0.26.0
34-
golang.org/x/sync v0.7.0
35-
golang.org/x/sys v0.21.0
36-
golang.org/x/term v0.21.0
33+
golang.org/x/net v0.28.0
34+
golang.org/x/sync v0.8.0
35+
golang.org/x/sys v0.24.0
36+
golang.org/x/term v0.23.0
3737
google.golang.org/grpc v1.64.1
38-
google.golang.org/protobuf v1.33.0
38+
google.golang.org/protobuf v1.34.2
3939
gopkg.in/yaml.v3 v3.0.1
4040
)
4141

4242
require (
4343
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20221202181307-76fa05c21b12 // indirect
4444
github.com/beorn7/perks v1.0.1 // indirect
45-
github.com/bits-and-blooms/bitset v1.13.0 // indirect
46-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
45+
github.com/bits-and-blooms/bitset v1.14.2 // indirect
46+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4747
github.com/consensys/bavard v0.1.13 // indirect
48-
github.com/consensys/gnark-crypto v0.12.2-0.20231013160410-1f65e75b6dfb // indirect
48+
github.com/consensys/gnark-crypto v0.14.0 // indirect
4949
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
5050
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
51-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
51+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
5252
github.com/fsnotify/fsnotify v1.7.0 // indirect
5353
github.com/golang/snappy v0.0.4 // indirect
5454
github.com/google/go-querystring v1.1.0 // indirect
55-
github.com/gorilla/websocket v1.5.1 // indirect
55+
github.com/gorilla/websocket v1.5.3 // indirect
5656
github.com/hashicorp/hcl v1.0.0 // indirect
57-
github.com/holiman/uint256 v1.2.4 // indirect
57+
github.com/holiman/uint256 v1.3.1 // indirect
5858
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5959
github.com/ipfs/go-cid v0.4.1 // indirect
6060
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
@@ -68,16 +68,17 @@ require (
6868
github.com/multiformats/go-multibase v0.2.0 // indirect
6969
github.com/multiformats/go-multihash v0.2.3 // indirect
7070
github.com/multiformats/go-varint v0.0.7 // indirect
71-
github.com/nspcc-dev/dbft v0.2.0 // indirect
72-
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 // indirect
71+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
72+
github.com/nspcc-dev/dbft v0.3.1 // indirect
73+
github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b // indirect
7374
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240729160116-d8e3e57f88f2 // indirect
74-
github.com/nspcc-dev/rfc6979 v0.2.1 // indirect
75+
github.com/nspcc-dev/rfc6979 v0.2.3 // indirect
7576
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
7677
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
7778
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
78-
github.com/prometheus/client_model v0.6.0 // indirect
79-
github.com/prometheus/common v0.48.0 // indirect
80-
github.com/prometheus/procfs v0.12.0 // indirect
79+
github.com/prometheus/client_model v0.6.1 // indirect
80+
github.com/prometheus/common v0.55.0 // indirect
81+
github.com/prometheus/procfs v0.15.1 // indirect
8182
github.com/rivo/uniseg v0.4.7 // indirect
8283
github.com/russross/blackfriday/v2 v2.1.0 // indirect
8384
github.com/sagikazarmark/locafero v0.4.0 // indirect
@@ -88,12 +89,12 @@ require (
8889
github.com/subosito/gotenv v1.6.0 // indirect
8990
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 // indirect
9091
github.com/twmb/murmur3 v1.1.8 // indirect
91-
github.com/urfave/cli/v2 v2.27.2 // indirect
92-
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
92+
github.com/urfave/cli/v2 v2.27.4 // indirect
93+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
9394
go.uber.org/multierr v1.11.0 // indirect
94-
golang.org/x/crypto v0.24.0 // indirect
95-
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
96-
golang.org/x/text v0.16.0 // indirect
95+
golang.org/x/crypto v0.26.0 // indirect
96+
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
97+
golang.org/x/text v0.17.0 // indirect
9798
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
9899
gopkg.in/ini.v1 v1.67.0 // indirect
99100
lukechampine.com/blake3 v1.2.1 // indirect

0 commit comments

Comments
 (0)