From dab7137e272155a799a350c895384d2c667f1ebf Mon Sep 17 00:00:00 2001 From: Bogdan Rosianu Date: Wed, 1 Nov 2023 11:02:41 +0200 Subject: [PATCH 1/2] update rc/v1.6.0 dependencies --- api/groups/baseBlockGroup_test.go | 18 ++-- cmd/proxy/config/config.toml | 2 +- cmd/proxy/main.go | 12 ++- data/block.go | 4 +- data/mock/pubKeyConverterMock.go | 21 +++- facade/baseFacade_test.go | 3 +- faucet/mock/pubKeyConverterMock.go | 19 +++- faucet/privateKeysLoader_test.go | 11 +-- go.mod | 52 +++++----- go.sum | 139 +++++++++++++-------------- process/accountProcessor_test.go | 6 +- process/blockProcessor.go | 6 +- process/blockProcessor_test.go | 38 ++++---- process/faucetProcessor.go | 2 +- process/hyperblockBuilder.go | 4 +- process/hyperblockBuilder_test.go | 10 +- process/mock/pubKeyConverterMock.go | 19 +++- process/scQueryProcessor_test.go | 2 +- process/transactionProcessor_test.go | 17 ++-- 19 files changed, 218 insertions(+), 167 deletions(-) diff --git a/api/groups/baseBlockGroup_test.go b/api/groups/baseBlockGroup_test.go index ee19ad06..9e6c17eb 100644 --- a/api/groups/baseBlockGroup_test.go +++ b/api/groups/baseBlockGroup_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/gin-gonic/gin" + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" apiErrors "github.com/multiversx/mx-chain-proxy-go/api/errors" "github.com/multiversx/mx-chain-proxy-go/api/groups" "github.com/multiversx/mx-chain-proxy-go/api/mock" @@ -329,11 +329,11 @@ func TestGetAlteredAccountsByNonce(t *testing.T) { t.Run("should work", func(t *testing.T) { t.Parallel() - alteredAcc1 := &outport.AlteredAccount{ + alteredAcc1 := &alteredAccount.AlteredAccount{ Address: "addr1", Balance: "1000", Nonce: 4, - Tokens: []*outport.AccountTokenData{ + Tokens: []*alteredAccount.AccountTokenData{ { Identifier: "token1", Balance: "10000", @@ -342,7 +342,7 @@ func TestGetAlteredAccountsByNonce(t *testing.T) { }, }, } - alteredAcc2 := &outport.AlteredAccount{ + alteredAcc2 := &alteredAccount.AlteredAccount{ Address: "addr2", Balance: "4444", Nonce: 3333, @@ -350,7 +350,7 @@ func TestGetAlteredAccountsByNonce(t *testing.T) { } expectedApiResponse := &data.AlteredAccountsApiResponse{ Data: data.AlteredAccountsPayload{ - Accounts: []*outport.AlteredAccount{alteredAcc1, alteredAcc2}, + Accounts: []*alteredAccount.AlteredAccount{alteredAcc1, alteredAcc2}, }, Error: "", Code: "success", @@ -425,11 +425,11 @@ func TestGetAlteredAccountsByHash(t *testing.T) { t.Run("should work", func(t *testing.T) { t.Parallel() - alteredAcc1 := &outport.AlteredAccount{ + alteredAcc1 := &alteredAccount.AlteredAccount{ Address: "addr1", Balance: "1000", Nonce: 4, - Tokens: []*outport.AccountTokenData{ + Tokens: []*alteredAccount.AccountTokenData{ { Identifier: "token1", Balance: "10000", @@ -438,7 +438,7 @@ func TestGetAlteredAccountsByHash(t *testing.T) { }, }, } - alteredAcc2 := &outport.AlteredAccount{ + alteredAcc2 := &alteredAccount.AlteredAccount{ Address: "addr2", Balance: "4444", Nonce: 3333, @@ -446,7 +446,7 @@ func TestGetAlteredAccountsByHash(t *testing.T) { } expectedApiResponse := &data.AlteredAccountsApiResponse{ Data: data.AlteredAccountsPayload{ - Accounts: []*outport.AlteredAccount{alteredAcc1, alteredAcc2}, + Accounts: []*alteredAccount.AlteredAccount{alteredAcc1, alteredAcc2}, }, Error: "", Code: "success", diff --git a/cmd/proxy/config/config.toml b/cmd/proxy/config/config.toml index 13ea7789..da7b6c19 100644 --- a/cmd/proxy/config/config.toml +++ b/cmd/proxy/config/config.toml @@ -75,5 +75,5 @@ [[Observers]] ShardId = 4294967295 - Address = "http://127.0.0.1:8083 + Address = "http://127.0.0.1:8083" IsFallback = false diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index 1d4e4be5..d32470a1 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -39,16 +39,20 @@ const ( logFilePrefix = "mx-chain-proxy-go" logFileLifeSpanInSec = 86400 logFileMaxSizeInMB = 1024 + addressHRP = "erd" ) // commitID and appVersion should be populated at build time using ldflags // // Usage examples: // linux/mac: -// go build -i -v -ldflags="-X main.appVersion=$(git describe --tags --long --dirty) -X main.commitID=$(git rev-parse HEAD)" +// +// go build -i -v -ldflags="-X main.appVersion=$(git describe --tags --long --dirty) -X main.commitID=$(git rev-parse HEAD)" +// // windows: -// for /f %i in ('git describe --tags --long --dirty') do set VERS=%i -// go build -i -v -ldflags="-X main.appVersion=%VERS%" +// +// for /f %i in ('git describe --tags --long --dirty') do set VERS=%i +// go build -i -v -ldflags="-X main.appVersion=%VERS%" var commitID = common.UndefinedCommitString var appVersion = common.UnVersionedAppString @@ -419,7 +423,7 @@ func createVersionsRegistry( apiConfigDirectoryPath string, closableComponents *data.ClosableComponentsHandler, ) (data.VersionsRegistryHandler, error) { - pubKeyConverter, err := pubkeyConverter.NewBech32PubkeyConverter(cfg.AddressPubkeyConverter.Length, log) + pubKeyConverter, err := pubkeyConverter.NewBech32PubkeyConverter(cfg.AddressPubkeyConverter.Length, addressHRP) if err != nil { return nil, err } diff --git a/data/block.go b/data/block.go index c8605e83..1c213a26 100644 --- a/data/block.go +++ b/data/block.go @@ -1,8 +1,8 @@ package data import ( + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" ) // AtlasBlock is a block, as required by BlockAtlas @@ -92,5 +92,5 @@ type AlteredAccountsApiResponse struct { // AlteredAccountsPayload wraps altered accounts payload type AlteredAccountsPayload struct { - Accounts []*outport.AlteredAccount `json:"accounts"` + Accounts []*alteredAccount.AlteredAccount `json:"accounts"` } diff --git a/data/mock/pubKeyConverterMock.go b/data/mock/pubKeyConverterMock.go index 26ed81fc..c4234362 100644 --- a/data/mock/pubKeyConverterMock.go +++ b/data/mock/pubKeyConverterMock.go @@ -2,9 +2,11 @@ package mock import ( "encoding/hex" + + "github.com/multiversx/mx-chain-core-go/core" ) -// PubkeyConverterMock - +// PubKeyConverterMock - type PubKeyConverterMock struct { len int } @@ -15,7 +17,22 @@ func (pcm *PubKeyConverterMock) Decode(humanReadable string) ([]byte, error) { } // Encode - -func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) string { +func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) (string, error) { + return hex.EncodeToString(pkBytes), nil +} + +// EncodeSlice - +func (pcm *PubKeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error) { + results := make([]string, 0) + for _, pk := range pkBytesSlice { + results = append(results, hex.EncodeToString(pk)) + } + + return results, nil +} + +// SilentEncode - +func (pcm *PubKeyConverterMock) SilentEncode(pkBytes []byte, _ core.Logger) string { return hex.EncodeToString(pkBytes) } diff --git a/facade/baseFacade_test.go b/facade/baseFacade_test.go index 4e136fa2..52e4fbda 100644 --- a/facade/baseFacade_test.go +++ b/facade/baseFacade_test.go @@ -11,7 +11,6 @@ import ( crypto "github.com/multiversx/mx-chain-crypto-go" "github.com/multiversx/mx-chain-crypto-go/signing" "github.com/multiversx/mx-chain-crypto-go/signing/ed25519" - logger "github.com/multiversx/mx-chain-logger-go" "github.com/multiversx/mx-chain-proxy-go/common" "github.com/multiversx/mx-chain-proxy-go/data" "github.com/multiversx/mx-chain-proxy-go/facade" @@ -25,7 +24,7 @@ type testStruct struct { Hash string } -var publicKeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, logger.GetOrCreate("facade_test")) +var publicKeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, "erd") func TestNewProxyFacade_NilActionsProcShouldErr(t *testing.T) { t.Parallel() diff --git a/faucet/mock/pubKeyConverterMock.go b/faucet/mock/pubKeyConverterMock.go index 1a04ce69..c4234362 100644 --- a/faucet/mock/pubKeyConverterMock.go +++ b/faucet/mock/pubKeyConverterMock.go @@ -2,6 +2,8 @@ package mock import ( "encoding/hex" + + "github.com/multiversx/mx-chain-core-go/core" ) // PubKeyConverterMock - @@ -15,7 +17,22 @@ func (pcm *PubKeyConverterMock) Decode(humanReadable string) ([]byte, error) { } // Encode - -func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) string { +func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) (string, error) { + return hex.EncodeToString(pkBytes), nil +} + +// EncodeSlice - +func (pcm *PubKeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error) { + results := make([]string, 0) + for _, pk := range pkBytesSlice { + results = append(results, hex.EncodeToString(pk)) + } + + return results, nil +} + +// SilentEncode - +func (pcm *PubKeyConverterMock) SilentEncode(pkBytes []byte, _ core.Logger) string { return hex.EncodeToString(pkBytes) } diff --git a/faucet/privateKeysLoader_test.go b/faucet/privateKeysLoader_test.go index 50ded013..52b96f78 100644 --- a/faucet/privateKeysLoader_test.go +++ b/faucet/privateKeysLoader_test.go @@ -1,7 +1,6 @@ package faucet_test import ( - "io/ioutil" "os" "strings" "testing" @@ -13,7 +12,7 @@ import ( func TestNewPrivateKeysLoader_NilShardCoordinatorShouldErr(t *testing.T) { pemFileName := "testWallet.pem" - err := ioutil.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) + err := os.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) require.Nil(t, err) defer func() { _ = os.Remove(pemFileName) @@ -36,7 +35,7 @@ func TestNewPrivateKeysLoader_PemFileNotFoundShouldErr(t *testing.T) { func TestNewPrivateKeysLoader_NilPubKeyConverterShouldErr(t *testing.T) { pemFileName := "testWallet.pem" - err := ioutil.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) + err := os.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) require.Nil(t, err) defer func() { _ = os.Remove(pemFileName) @@ -49,7 +48,7 @@ func TestNewPrivateKeysLoader_NilPubKeyConverterShouldErr(t *testing.T) { func TestNewPrivateKeysLoader_OkValsShouldWork(t *testing.T) { pemFileName := "testWallet.pem" - err := ioutil.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) + err := os.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) require.Nil(t, err) defer func() { _ = os.Remove(pemFileName) @@ -62,7 +61,7 @@ func TestNewPrivateKeysLoader_OkValsShouldWork(t *testing.T) { func TestPrivateKeysLoader_MapOfPrivateKeysByShardInvalidPemFileContentShouldErr(t *testing.T) { pemFileName := "wrong-test.pem" - err := ioutil.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) + err := os.WriteFile(pemFileName, []byte(getWrongPemFileContent()), 0644) require.Nil(t, err) defer func() { _ = os.Remove(pemFileName) @@ -82,7 +81,7 @@ func TestPrivateKeysLoader_MapOfPrivateKeysByShardInvalidPemFileContentShouldErr func TestPrivateKeysLoader_MapOfPrivateKeysByShardShouldWork(t *testing.T) { pemFileName := "test.pem" - err := ioutil.WriteFile(pemFileName, []byte(getTestPemFileContent()), 0644) + err := os.WriteFile(pemFileName, []byte(getTestPemFileContent()), 0644) require.Nil(t, err) defer func() { _ = os.Remove(pemFileName) diff --git a/go.mod b/go.mod index 5db0cf58..2b5d36b5 100644 --- a/go.mod +++ b/go.mod @@ -1,52 +1,58 @@ module github.com/multiversx/mx-chain-proxy-go -go 1.17 +go 1.20 require ( github.com/elastic/go-elasticsearch/v7 v7.12.0 - github.com/gin-contrib/cors v0.0.0-20190301062745-f9e10995c85a + github.com/gin-contrib/cors v1.4.0 github.com/gin-contrib/pprof v1.4.0 github.com/gin-contrib/static v0.0.1 - github.com/gin-gonic/gin v1.8.1 - github.com/multiversx/mx-chain-core-go v1.1.37 - github.com/multiversx/mx-chain-crypto-go v1.2.6 - github.com/multiversx/mx-chain-es-indexer-go v1.3.7 - github.com/multiversx/mx-chain-logger-go v1.0.11 + github.com/gin-gonic/gin v1.9.1 + github.com/multiversx/mx-chain-core-go v1.2.16 + github.com/multiversx/mx-chain-crypto-go v1.2.9 + github.com/multiversx/mx-chain-es-indexer-go v1.4.13 + github.com/multiversx/mx-chain-logger-go v1.0.13 github.com/pkg/errors v0.9.1 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.4 github.com/urfave/cli v1.22.10 gopkg.in/go-playground/validator.v8 v8.18.2 ) require ( github.com/btcsuite/btcd/btcutil v1.1.3 // indirect + github.com/bytedance/sonic v1.9.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denisbrodbeck/machineid v1.0.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect - github.com/go-playground/validator/v10 v10.10.0 // indirect - github.com/goccy/go-json v0.9.7 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/leodido/go-urn v1.2.1 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/pelletier/go-toml v1.9.3 // indirect - github.com/pelletier/go-toml/v2 v2.0.1 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect - golang.org/x/crypto v0.3.0 // indirect - golang.org/x/net v0.2.0 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.4.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6e5e1922..6b5981c1 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,7 @@ -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.0 h1:V2/ZgjfDFIygAX3ZapeigkVBoVUtOJKSwrhZdlpSvaA= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= @@ -22,6 +20,12 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -39,32 +43,37 @@ github.com/elastic/go-elasticsearch/v7 v7.12.0 h1:j4tvcMrZJLp39L2NYvBb7f+lHKPqPH github.com/elastic/go-elasticsearch/v7 v7.12.0/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gin-contrib/cors v0.0.0-20190301062745-f9e10995c85a h1:zBycVvXa03SIX+jdMv8wGu9TMDMWdN8EhaR1FoeKHNo= -github.com/gin-contrib/cors v0.0.0-20190301062745-f9e10995c85a/go.mod h1:pL2kNE+DgDU+eQ+dary5bX0Z6LPP8nR6Mqs1iejILw4= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= +github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg= github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90= -github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-contrib/static v0.0.1 h1:JVxuvHPuUfkoul12N7dtQw7KRn/pSMq7Ue1Va9Swm1U= github.com/gin-contrib/static v0.0.1/go.mod h1:CSxeF+wep05e0kCOsqWdAWbSszmc31zTIbD8TvWl7Hs= -github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -76,31 +85,28 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/herumi/bls-go-binary v1.0.0/go.mod h1:O4Vp1AfR4raRGwFeQpr9X/PQtncEicMoOe6BQt1oX0Y= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -110,32 +116,29 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/multiversx/mx-chain-core-go v1.1.30/go.mod h1:8gGEQv6BWuuJwhd25qqhCOZbBSv9mk+hLeKvinSaSMk= -github.com/multiversx/mx-chain-core-go v1.1.37 h1:2EYoUWjr+8zUYEt3TBMnQ+0UUZwDb71HA+KBwqDUpVQ= -github.com/multiversx/mx-chain-core-go v1.1.37/go.mod h1:8gGEQv6BWuuJwhd25qqhCOZbBSv9mk+hLeKvinSaSMk= -github.com/multiversx/mx-chain-crypto-go v1.2.6 h1:yxsjAQGh62los+iYmORMfh3w9qen0xbYlmwU0juNSeg= -github.com/multiversx/mx-chain-crypto-go v1.2.6/go.mod h1:rOj0Rr19HTOYt9YTeym7RKxlHt91NXln3LVKjHKVmA0= -github.com/multiversx/mx-chain-es-indexer-go v1.3.7 h1:R0hbySmg9QIfEyn1eFlYqtVP7kYjmw5FRNlYv4C2Ajw= -github.com/multiversx/mx-chain-es-indexer-go v1.3.7/go.mod h1:IV42GfhkqQ5vVO0OzGaF/ejp8TQrLkNo4LSB3TPnVhg= -github.com/multiversx/mx-chain-logger-go v1.0.11 h1:DFsHa+sc5fKwhDR50I8uBM99RTDTEW68ESyr5ALRDwE= -github.com/multiversx/mx-chain-logger-go v1.0.11/go.mod h1:1srDkP0DQucWQ+rYfaq0BX2qLnULsUdRPADpYUTM6dA= -github.com/multiversx/mx-chain-vm-common-go v1.3.34/go.mod h1:sZ2COLCxvf2GxAAJHGmGqWybObLtFuk2tZUyGqnMXE8= +github.com/multiversx/mx-chain-core-go v1.2.16 h1:m0hUNmZQjGJxKDLQOHoM9jSaeDfVTbyd+mqiS8+NckE= +github.com/multiversx/mx-chain-core-go v1.2.16/go.mod h1:BILOGHUOIG5dNNX8cgkzCNfDaVtoYrJRYcPnpxRMH84= +github.com/multiversx/mx-chain-crypto-go v1.2.9 h1:OEfF2kOQrtzUl273Z3DEcshjlTVUfPpJMd0R0SvTrlU= +github.com/multiversx/mx-chain-crypto-go v1.2.9/go.mod h1:fkaWKp1rbQN9wPKya5jeoRyC+c/SyN/NfggreyeBw+8= +github.com/multiversx/mx-chain-es-indexer-go v1.4.13 h1:3Ayaw9bSpeNOF+Z3L/11MN1rIJH8Rc6dqtt+o4Wfdno= +github.com/multiversx/mx-chain-es-indexer-go v1.4.13/go.mod h1:g0REyU8rqJfoBq6mIfqEi6IdpLofECLEvKKGMJO8ZhM= +github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpAXmqjT02klNT/JnY= +github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -147,8 +150,9 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -163,46 +167,45 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5I github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/urfave/cli v1.22.10 h1:p8Fspmz3iTctJstry1PYS3HVdllxnEzTEsgIgtxTrCk= github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -210,17 +213,13 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -235,29 +234,24 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -267,8 +261,9 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -285,9 +280,9 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/process/accountProcessor_test.go b/process/accountProcessor_test.go index eeef7123..61f0f13a 100644 --- a/process/accountProcessor_test.go +++ b/process/accountProcessor_test.go @@ -8,7 +8,6 @@ import ( "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/pubkeyConverter" "github.com/multiversx/mx-chain-core-go/core/sharding" - logger "github.com/multiversx/mx-chain-logger-go" "github.com/multiversx/mx-chain-proxy-go/common" "github.com/multiversx/mx-chain-proxy-go/data" "github.com/multiversx/mx-chain-proxy-go/process" @@ -237,7 +236,7 @@ func TestAccountProcessor_GetShardIForAddressShouldWork(t *testing.T) { shardC, err := sharding.NewMultiShardCoordinator(uint32(2), 0) require.NoError(t, err) - bech32C, _ := pubkeyConverter.NewBech32PubkeyConverter(32, logger.GetOrCreate("test")) + bech32C, _ := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") // this addressShard0 should be in shard 0 for a 2 shards configuration addressShard0 := "erd1ffqlrryvwrnfh2523wmzrhvx5d8p2wmxeau64fps4lnqq5qex68q7ax8k5" @@ -289,8 +288,7 @@ func TestAccountProcessor_GetShardIDForAddressShouldError(t *testing.T) { func TestAccountProcessor_GetTransactions(t *testing.T) { t.Parallel() - log := logger.GetOrCreate("test") - converter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, log) + converter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") ap, _ := process.NewAccountProcessor( &mock.ProcessorStub{}, converter, diff --git a/process/blockProcessor.go b/process/blockProcessor.go index a983262d..a3f5075a 100644 --- a/process/blockProcessor.go +++ b/process/blockProcessor.go @@ -5,8 +5,8 @@ import ( "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/core/check" + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-proxy-go/common" "github.com/multiversx/mx-chain-proxy-go/data" ) @@ -174,8 +174,8 @@ func (bp *BlockProcessor) addShardBlocks( return nil } -func (bp *BlockProcessor) getAlteredAccountsIfNeeded(options common.HyperblockQueryOptions, notarizedBlock *api.NotarizedBlock) ([]*outport.AlteredAccount, error) { - ret := make([]*outport.AlteredAccount, 0) +func (bp *BlockProcessor) getAlteredAccountsIfNeeded(options common.HyperblockQueryOptions, notarizedBlock *api.NotarizedBlock) ([]*alteredAccount.AlteredAccount, error) { + ret := make([]*alteredAccount.AlteredAccount, 0) if !options.WithAlteredAccounts { return ret, nil } diff --git a/process/blockProcessor_test.go b/process/blockProcessor_test.go index 729e6e9c..23c3cd63 100644 --- a/process/blockProcessor_test.go +++ b/process/blockProcessor_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/multiversx/mx-chain-core-go/core" + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/transaction" "github.com/multiversx/mx-chain-proxy-go/common" "github.com/multiversx/mx-chain-proxy-go/data" @@ -993,7 +993,7 @@ func TestBlockProcessor_GetAlteredAccountsByNonce(t *testing.T) { t.Parallel() requestedShardID := uint32(1) - alteredAcc := &outport.AlteredAccount{Address: "erd1q"} + alteredAcc := &alteredAccount.AlteredAccount{Address: "erd1q"} t.Run("could not get observers, should return error", func(t *testing.T) { t.Parallel() @@ -1058,7 +1058,7 @@ func TestBlockProcessor_GetAlteredAccountsByNonce(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Error = "" ret.Code = "success" - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc} return 0, nil }, } @@ -1068,7 +1068,7 @@ func TestBlockProcessor_GetAlteredAccountsByNonce(t *testing.T) { require.Nil(t, err) require.Equal(t, &data.AlteredAccountsApiResponse{ Data: data.AlteredAccountsPayload{ - Accounts: []*outport.AlteredAccount{alteredAcc}, + Accounts: []*alteredAccount.AlteredAccount{alteredAcc}, }, Error: "", Code: "success", @@ -1080,7 +1080,7 @@ func TestBlockProcessor_GetAlteredAccountsByHash(t *testing.T) { t.Parallel() requestedShardID := uint32(1) - alteredAcc := &outport.AlteredAccount{Address: "erd1q"} + alteredAcc := &alteredAccount.AlteredAccount{Address: "erd1q"} t.Run("could not get observers, should return error", func(t *testing.T) { t.Parallel() @@ -1145,7 +1145,7 @@ func TestBlockProcessor_GetAlteredAccountsByHash(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Error = "" ret.Code = "success" - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc} return 0, nil }, } @@ -1155,7 +1155,7 @@ func TestBlockProcessor_GetAlteredAccountsByHash(t *testing.T) { require.Nil(t, err) require.Equal(t, &data.AlteredAccountsApiResponse{ Data: data.AlteredAccountsPayload{ - Accounts: []*outport.AlteredAccount{alteredAcc}, + Accounts: []*alteredAccount.AlteredAccount{alteredAcc}, }, Error: "", Code: "success", @@ -1167,8 +1167,8 @@ func TestBlockProcessor_GetHyperBlockByNonceWithAlteredAccounts(t *testing.T) { t.Parallel() observerAddr := "observerAddress" - alteredAcc1 := &outport.AlteredAccount{Address: "erd1q"} - alteredAcc2 := &outport.AlteredAccount{Address: "erd1w"} + alteredAcc1 := &alteredAccount.AlteredAccount{Address: "erd1q"} + alteredAcc2 := &alteredAccount.AlteredAccount{Address: "erd1w"} callGetEndpointCt := 0 getObserversCt := 0 @@ -1223,7 +1223,7 @@ func TestBlockProcessor_GetHyperBlockByNonceWithAlteredAccounts(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Code = data.ReturnCodeSuccess - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc1} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc1} case 3: require.Equal(t, &data.BlockApiResponse{}, value) require.Equal(t, "/block/by-hash/hash2?withTxs=true", path) @@ -1237,7 +1237,7 @@ func TestBlockProcessor_GetHyperBlockByNonceWithAlteredAccounts(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Code = data.ReturnCodeSuccess - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc2} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc2} } callGetEndpointCt++ @@ -1256,13 +1256,13 @@ func TestBlockProcessor_GetHyperBlockByNonceWithAlteredAccounts(t *testing.T) { { Shard: 1, Hash: "hash1", - AlteredAccounts: []*outport.AlteredAccount{alteredAcc1}, + AlteredAccounts: []*alteredAccount.AlteredAccount{alteredAcc1}, MiniBlockHashes: make([]string, 0), }, { Shard: 2, Hash: "hash2", - AlteredAccounts: []*outport.AlteredAccount{alteredAcc2}, + AlteredAccounts: []*alteredAccount.AlteredAccount{alteredAcc2}, MiniBlockHashes: make([]string, 0), }, }, @@ -1284,8 +1284,8 @@ func TestBlockProcessor_GetHyperBlockByHashWithAlteredAccounts(t *testing.T) { t.Parallel() observerAddr := "observerAddress" - alteredAcc1 := &outport.AlteredAccount{Address: "erd1q"} - alteredAcc2 := &outport.AlteredAccount{Address: "erd1w"} + alteredAcc1 := &alteredAccount.AlteredAccount{Address: "erd1q"} + alteredAcc2 := &alteredAccount.AlteredAccount{Address: "erd1w"} callGetEndpointCt := 0 getObserversCt := 0 @@ -1340,7 +1340,7 @@ func TestBlockProcessor_GetHyperBlockByHashWithAlteredAccounts(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Code = data.ReturnCodeSuccess - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc1} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc1} case 3: require.Equal(t, &data.BlockApiResponse{}, value) require.Equal(t, "/block/by-hash/hash2?withTxs=true", path) @@ -1354,7 +1354,7 @@ func TestBlockProcessor_GetHyperBlockByHashWithAlteredAccounts(t *testing.T) { ret := value.(*data.AlteredAccountsApiResponse) ret.Code = data.ReturnCodeSuccess - ret.Data.Accounts = []*outport.AlteredAccount{alteredAcc2} + ret.Data.Accounts = []*alteredAccount.AlteredAccount{alteredAcc2} } callGetEndpointCt++ @@ -1373,13 +1373,13 @@ func TestBlockProcessor_GetHyperBlockByHashWithAlteredAccounts(t *testing.T) { { Shard: 1, Hash: "hash1", - AlteredAccounts: []*outport.AlteredAccount{alteredAcc1}, + AlteredAccounts: []*alteredAccount.AlteredAccount{alteredAcc1}, MiniBlockHashes: make([]string, 0), }, { Shard: 2, Hash: "hash2", - AlteredAccounts: []*outport.AlteredAccount{alteredAcc2}, + AlteredAccounts: []*alteredAccount.AlteredAccount{alteredAcc2}, MiniBlockHashes: make([]string, 0), }, }, diff --git a/process/faucetProcessor.go b/process/faucetProcessor.go index 1f2bbdce..e934a52a 100644 --- a/process/faucetProcessor.go +++ b/process/faucetProcessor.go @@ -99,7 +99,7 @@ func (fp *FaucetProcessor) SenderDetailsFromPem(receiver string) (crypto.Private return nil, "", err } - senderPubKeyString := fp.pubKeyConverter.Encode(senderPubKeyBytes) + senderPubKeyString := fp.pubKeyConverter.SilentEncode(senderPubKeyBytes, log) return senderPrivKey, senderPubKeyString, nil } diff --git a/process/hyperblockBuilder.go b/process/hyperblockBuilder.go index a348316c..435ae39b 100644 --- a/process/hyperblockBuilder.go +++ b/process/hyperblockBuilder.go @@ -1,14 +1,14 @@ package process import ( + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/transaction" ) type shardBlockWithAlteredAccounts struct { shardBlock *api.Block - alteredAccounts []*outport.AlteredAccount + alteredAccounts []*alteredAccount.AlteredAccount } type hyperblockBuilder struct { diff --git a/process/hyperblockBuilder_test.go b/process/hyperblockBuilder_test.go index 8cc612d4..7d28b39f 100644 --- a/process/hyperblockBuilder_test.go +++ b/process/hyperblockBuilder_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/multiversx/mx-chain-core-go/core" + "github.com/multiversx/mx-chain-core-go/data/alteredAccount" "github.com/multiversx/mx-chain-core-go/data/api" - "github.com/multiversx/mx-chain-core-go/data/outport" "github.com/multiversx/mx-chain-core-go/data/transaction" "github.com/stretchr/testify/require" ) @@ -155,7 +155,7 @@ func TestHyperblockBuilderWithAlteredAccounts(t *testing.T) { Shard: 0, Nonce: 40, }, - alteredAccounts: []*outport.AlteredAccount{ + alteredAccounts: []*alteredAccount.AlteredAccount{ { Address: "alice", Balance: "100", @@ -168,7 +168,7 @@ func TestHyperblockBuilderWithAlteredAccounts(t *testing.T) { Shard: 1, Nonce: 41, }, - alteredAccounts: []*outport.AlteredAccount{ + alteredAccounts: []*alteredAccount.AlteredAccount{ { Address: "bob", Balance: "101", @@ -188,7 +188,7 @@ func TestHyperblockBuilderWithAlteredAccounts(t *testing.T) { { Shard: 0, Nonce: 40, - AlteredAccounts: []*outport.AlteredAccount{ + AlteredAccounts: []*alteredAccount.AlteredAccount{ { Address: "alice", Balance: "100", @@ -199,7 +199,7 @@ func TestHyperblockBuilderWithAlteredAccounts(t *testing.T) { { Shard: 1, Nonce: 41, - AlteredAccounts: []*outport.AlteredAccount{ + AlteredAccounts: []*alteredAccount.AlteredAccount{ { Address: "bob", Balance: "101", diff --git a/process/mock/pubKeyConverterMock.go b/process/mock/pubKeyConverterMock.go index 1a04ce69..c4234362 100644 --- a/process/mock/pubKeyConverterMock.go +++ b/process/mock/pubKeyConverterMock.go @@ -2,6 +2,8 @@ package mock import ( "encoding/hex" + + "github.com/multiversx/mx-chain-core-go/core" ) // PubKeyConverterMock - @@ -15,7 +17,22 @@ func (pcm *PubKeyConverterMock) Decode(humanReadable string) ([]byte, error) { } // Encode - -func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) string { +func (pcm *PubKeyConverterMock) Encode(pkBytes []byte) (string, error) { + return hex.EncodeToString(pkBytes), nil +} + +// EncodeSlice - +func (pcm *PubKeyConverterMock) EncodeSlice(pkBytesSlice [][]byte) ([]string, error) { + results := make([]string, 0) + for _, pk := range pkBytesSlice { + results = append(results, hex.EncodeToString(pk)) + } + + return results, nil +} + +// SilentEncode - +func (pcm *PubKeyConverterMock) SilentEncode(pkBytes []byte, _ core.Logger) string { return hex.EncodeToString(pkBytes) } diff --git a/process/scQueryProcessor_test.go b/process/scQueryProcessor_test.go index dcfd4461..9fe8ddcd 100644 --- a/process/scQueryProcessor_test.go +++ b/process/scQueryProcessor_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" ) -var testPubKeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, log) +var testPubKeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, "erd") var dummyScAddress = "erd1l453hd0gt5gzdp7czpuall8ggt2dcv5zwmfdf3sd3lguxseux2fsmsgldz" func TestNewSCQueryProcessor_NilCoreProcessorShouldErr(t *testing.T) { diff --git a/process/transactionProcessor_test.go b/process/transactionProcessor_test.go index 4ad18a51..0fbbfdad 100644 --- a/process/transactionProcessor_test.go +++ b/process/transactionProcessor_test.go @@ -6,9 +6,9 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" "math/big" "net/http" + "os" "strings" "sync/atomic" "testing" @@ -36,7 +36,8 @@ var funcNewTxCostHandler = func() (process.TransactionCostHandler, error) { } var logsMerger, _ = logsevents.NewLogsMerger(hasher, &marshal.JsonMarshalizer{}) -var testPubkeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, &mock.LoggerStub{}) +var testPubkeyConverter, _ = pubkeyConverter.NewBech32PubkeyConverter(32, "erd") +var testLogger = logger.GetOrCreate("process_test") type scenarioData struct { Transaction *transaction.ApiTransactionResult `json:"transaction"` @@ -45,7 +46,7 @@ type scenarioData struct { func loadJsonIntoTxAndScrs(tb testing.TB, path string) *scenarioData { scenarioDataInstance := &scenarioData{} - buff, err := ioutil.ReadFile(path) + buff, err := os.ReadFile(path) require.Nil(tb, err) err = json.Unmarshal(buff, scenarioDataInstance) @@ -1026,8 +1027,8 @@ func TestTransactionProcessor_ComputeTransactionShouldWork2(t *testing.T) { txHash, err := tp.ComputeTransactionHash(&data.Transaction{ Nonce: protoTx.Nonce, Value: protoTx.Value.String(), - Receiver: pubKeyConv.Encode(protoTx.RcvAddr), - Sender: pubKeyConv.Encode(protoTx.SndAddr), + Receiver: pubKeyConv.SilentEncode(protoTx.RcvAddr, testLogger), + Sender: pubKeyConv.SilentEncode(protoTx.SndAddr, testLogger), GasPrice: protoTx.GasPrice, GasLimit: protoTx.GasLimit, Data: protoTx.Data, @@ -1633,8 +1634,7 @@ func TestTransactionProcessor_GetTransactionPool(t *testing.T) { // GetTransactionsPoolForSender + GetLastPoolNonceForSender + GetTransactionsPoolNonceGapsForSender t.Run("no txs in pool", func(t *testing.T) { t.Parallel() - log := logger.GetOrCreate("test") - providedPubKeyConverter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, log) + providedPubKeyConverter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") providedShardId := uint32(0) providedSenderStr := "erd1kwh72fxl5rwndatsgrvfu235q3pwyng9ax4zxcrg4ss3p6pwuugq3gt3yc" addrObs0 := "observer0" @@ -1684,8 +1684,7 @@ func TestTransactionProcessor_GetTransactionPool(t *testing.T) { t.Run("txs in pool, with gaps", func(t *testing.T) { t.Parallel() - log := logger.GetOrCreate("test") - providedPubKeyConverter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, log) + providedPubKeyConverter, _ := pubkeyConverter.NewBech32PubkeyConverter(32, "erd") providedShardId := uint32(0) providedSenderStr := "erd1kwh72fxl5rwndatsgrvfu235q3pwyng9ax4zxcrg4ss3p6pwuugq3gt3yc" addrObs0 := "observer0" From 4125e1fa2a1e82a7c3f01f5bca3181b24c07ce8d Mon Sep 17 00:00:00 2001 From: Bogdan Rosianu Date: Wed, 1 Nov 2023 11:06:06 +0200 Subject: [PATCH 2/2] update go version in workflows --- .github/workflows/pr-build.yml | 4 ++-- .github/workflows/pr-tests.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index ac140523..065a4f1e 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -12,10 +12,10 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - name: Set up Go 1.17.6 + - name: Set up Go 1.20.7 uses: actions/setup-go@v2 with: - go-version: 1.17.6 + go-version: 1.20.7 id: go - name: Check out code into the Go module directory diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index e8c96323..09f938bd 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -11,10 +11,10 @@ jobs: name: Unit runs-on: ubuntu-latest steps: - - name: Set up Go 1.17.6 + - name: Set up Go 1.20.7 uses: actions/setup-go@v2 with: - go-version: 1.17.6 + go-version: 1.20.7 id: go - name: Check out code