[#1149] go.mod: Bump neo-go up to v0.106.0

Required to work with neo-go v0.106.0 node
with default hardfork configuration. Without
neo-go client version bump, it throws error.

  failed to get network magic: unexpected hardfork: Cockatrice

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
Alexey Vanin 2024-05-29 11:01:01 +03:00 committed by Evgenii Stratonikov
parent cc3f762cf2
commit 4a34d0d40e
5 changed files with 15 additions and 16 deletions

View file

@ -113,7 +113,7 @@ func (l *LocalClient) GetBlockCount() (uint32, error) {
return l.bc.BlockHeight(), nil
}
func (l *LocalClient) GetNativeContracts() ([]state.NativeContract, error) {
func (l *LocalClient) GetNativeContracts() ([]state.Contract, error) {
return l.bc.GetNatives(), nil
}

View file

@ -27,7 +27,7 @@ type Client interface {
invoker.RPCInvoke
GetBlockCount() (uint32, error)
GetNativeContracts() ([]state.NativeContract, error)
GetNativeContracts() ([]state.Contract, error)
GetApplicationLog(util.Uint256, *trigger.Type) (*result.ApplicationLog, error)
GetVersion() (*result.Version, error)
SendRawTransaction(*transaction.Transaction) (util.Uint256, error)

19
go.mod
View file

@ -24,21 +24,21 @@ require (
github.com/mr-tron/base58 v1.2.0
github.com/multiformats/go-multiaddr v0.12.1
github.com/nats-io/nats.go v1.32.0
github.com/nspcc-dev/neo-go v0.105.1
github.com/nspcc-dev/neo-go v0.106.0
github.com/olekukonko/tablewriter v0.0.5
github.com/panjf2000/ants/v2 v2.9.0
github.com/paulmach/orb v0.11.0
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_golang v1.19.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/ssgreg/journald v1.0.0
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.8
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.9
go.opentelemetry.io/otel v1.22.0
go.opentelemetry.io/otel/trace v1.22.0
go.uber.org/zap v1.26.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
golang.org/x/sync v0.6.0
golang.org/x/sys v0.18.0
@ -78,7 +78,6 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@ -99,13 +98,13 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/nspcc-dev/go-ordered-json v0.0.0-20240112074137-296698a162ae // indirect
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240122090917-ef99a7a9e33f // indirect
github.com/nspcc-dev/rfc6979 v0.2.0 // indirect
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 // indirect
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d // indirect
github.com/nspcc-dev/rfc6979 v0.2.1 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect

BIN
go.sum

Binary file not shown.

View file

@ -1,6 +1,7 @@
package chainbase
import (
"bytes"
"context"
"errors"
"fmt"
@ -11,7 +12,6 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util"
"git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
policyengine "git.frostfs.info/TrueCloudLab/policy-engine/pkg/engine"
"github.com/nspcc-dev/neo-go/pkg/util/slice"
"go.etcd.io/bbolt"
)
@ -203,7 +203,7 @@ func (cs *boltLocalOverrideStorage) GetOverride(name chain.Name, target policyen
if serializedChain == nil {
return fmt.Errorf("%w: %w: %s", policyengine.ErrChainNotFound, ErrBucketNotContainsChainID, chainID)
}
serializedChain = slice.Copy(serializedChain)
serializedChain = bytes.Clone(serializedChain)
return nil
}); err != nil {
return nil, err
@ -246,7 +246,7 @@ func (cs *boltLocalOverrideStorage) ListOverrides(name chain.Name, target policy
return err
}
return rbuck.ForEach(func(_, v []byte) error {
serializedChain = slice.Copy(v)
serializedChain = bytes.Clone(v)
serializedChains = append(serializedChains, serializedChain)
return nil
})
@ -315,7 +315,7 @@ func getTargets(tx *bbolt.Tx, name chain.Name) ([]policyengine.Target, error) {
if err := nbucket.Bucket(k).ForEachBucket(func(k []byte) error {
targets = append(targets, policyengine.Target{
Type: ttype,
Name: string(slice.Copy(k)),
Name: string(bytes.Clone(k)),
})
return nil
}); err != nil {